/* Геометрия раздела. Общие компоненты определяются в aart-ui. */
@layer aart-legacy {
/* Поля и проверка данных используют тему A·ART и не меняют геометрию макета. */
.production-data-field { display: grid; align-content: start; gap: 7px; margin: 18px 0; }
.production-data-field > small { font-size: 12px; overflow-wrap: anywhere; }
.production-data-field textarea { min-height: 76px; }
.production-image-choice { width: 92px; height: 118px; object-fit: contain; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
#prod-import-result { max-width: 100%; overflow-x: auto; }
#prod-import-result table { width: 100%; border-collapse: collapse; margin-block: 12px; font-size: 13px; }
#prod-import-result td, #prod-import-result th { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
/* Пустая структура скана ещё не готовый шаблон; следующий шаг занимает один экран. */
.production-panel { max-width:1160px; padding:22px clamp(18px,2.2vw,32px) 32px; }
.production-panel [hidden] { display:none !important; }
.production-panel.production-needs-template { background:transparent; }
.production-guidance { max-width:760px; margin:0 auto; padding:24px; border:1px solid var(--line-strong); border-radius:16px; background:var(--surface); }
.production-guidance .section-kicker { font-size:10px; }
.production-guidance h2 { margin:12px 0; font-size:23px; line-height:1.3; letter-spacing:-.5px; }
.production-guidance p { max-width:650px; margin:0 0 20px; font-size:14px; line-height:1.7; color:var(--muted); }
.production-guidance .production-actions { margin:0; gap:12px; }
.production-guidance .button { min-height:40px; padding:11px 18px; font-size:13px; }
.production-guidance .text-button { font-size:12px; }
.production-panel > .figma-intro { margin-bottom:14px; }
.production-panel > .figma-intro h2 { font-size:26px; margin:12px 0; }
.production-panel > .figma-intro p { font-size:14px; max-width:760px; }
.production-panel .production-box { padding:22px; margin:18px 0; }
.production-panel .production-box h3 { font-size:20px; margin:0 0 20px; }
.production-panel .production-steps { margin:16px 0; gap:8px; }
.production-panel .production-steps a { font-size:13px; padding:8px 12px; }
/* Комплектация: три явных PNG, точные ревизии и read-only порядок до сборки. */
.delivery-assembly { min-width:0; }
.delivery-export-setting { padding:7px 10px; border:1px solid var(--line); border-radius:8px; font-size:12px; color:var(--muted); white-space:nowrap; }
.delivery-assembly > p { max-width:850px; font-size:14px; line-height:1.65; }
.delivery-assembly h4 { margin:24px 0 10px; font-size:16px; }
.delivery-assembly .muted { font-size:13px; line-height:1.6; }
.delivery-assembly form { padding:14px 0; }
.delivery-assembly input, .delivery-assembly select, .delivery-assembly textarea { min-width:0; width:100%; }
.delivery-assembly #prod-profile-form > textarea { margin:8px 0; }
.delivery-extra-slots { display:grid; gap:10px; }
.delivery-extra-slot { display:grid; grid-template-columns:24px 60px minmax(0,1fr) auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.delivery-slot-number { font-size:15px; font-weight:700; color:var(--purple); }
.delivery-extra-slot > img, .delivery-picked img { width:60px; height:80px; object-fit:contain; border-radius:5px; background:var(--canvas); }
.delivery-extra-slot label { display:block; font-size:12px; margin:0 0 5px; }
.delivery-extra-slot input, .delivery-extra-slot select { font-size:13px; padding:8px 10px; min-height:35px; margin:0 0 8px; }
.delivery-extra-slot input:last-child { margin-bottom:0; }
.delivery-row-actions { display:flex; align-items:center; gap:5px; flex-wrap:wrap; max-width:155px; }
.delivery-row-actions .button { min-height:32px; padding:6px 10px; font-size:12px; }
.delivery-no-image { display:grid; place-items:center; width:60px; height:80px; border:1px dashed var(--line); border-radius:5px; font-size:11px; color:var(--muted); }
.delivery-picked { list-style:decimal; padding:0; margin:12px 0; }
.delivery-picked > li { display:flex; align-items:center; gap:12px; padding:10px; margin:8px 0; border:1px solid var(--line); border-radius:10px; }
.delivery-picked > li > div:nth-child(2) { display:grid; gap:4px; flex:1; min-width:0; font-size:13px; }
.delivery-picked small { font-size:10px; color:var(--muted); overflow-wrap:anywhere; }
.delivery-related-choice { display:grid; gap:7px; margin:10px 0; font-size:13px; }
.delivery-legacy { border:1px solid var(--line-strong); border-radius:10px; background:var(--accent-soft); padding:14px; font-size:13px; }
.delivery-legacy ol { max-height:220px; overflow:auto; padding-left:25px; }
.delivery-assembly .production-profile { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.delivery-assembly .production-profile > label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; flex:1; min-width:0; }
.delivery-assembly .production-profile input { width:auto; }
.delivery-plan-summary { display:grid; gap:8px; padding:14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--accent-soft); font-size:14px; }
.delivery-plan-summary span { color:var(--muted); font-size:12px; line-height:1.55; }
.delivery-plan-table { max-width:100%; overflow:auto; margin:12px 0 20px; }
.delivery-plan-table table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:12px; }
.delivery-plan-table th, .delivery-plan-table td { padding:9px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; overflow-wrap:anywhere; }
.delivery-plan-table th:nth-child(1) { width:40px; }
.delivery-plan-table th:nth-child(2) { width:145px; }
.delivery-plan-table th:nth-child(4) { width:180px; }
.delivery-plan-table img, .delivery-plan-table .delivery-no-image { display:block; width:38px; height:50px; object-fit:contain; margin-bottom:6px; }
.delivery-plan-table code { font-size:11px; }
.delivery-plan-table small { display:block; color:var(--muted); font-size:10px; margin-top:6px; overflow-wrap:anywhere; }
.delivery-assembly .production-bundle { margin-top:20px; }
/* Значения макета и данные товара расположены рядом; PNG не имитирует подстановку. */
.production-panel .production-data-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:20px; align-items:start; }
.production-data-layout > form, .production-data-side { min-width:0; }
.production-data-layout > form > .production-fields { grid-template-columns:1fr 1fr; }
.production-data-table { width:100%; margin-top:20px; }
.production-data-table table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:13px; }
.production-data-table thead th { padding:9px 8px; background:var(--accent-soft); font-size:11px; text-align:left; }
.production-data-table thead th:nth-child(1) { width:24%; }
.production-data-table thead th:nth-child(2) { width:33%; }
.production-data-table th, .production-data-table td { padding:12px 8px; border-bottom:1px solid var(--line-strong); text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.production-data-table tbody th label { display:block; font-weight:650; }
.production-data-table small { display:block; margin-top:6px; color:var(--muted); font-size:10px; font-weight:400; overflow-wrap:anywhere; }
.production-data-table textarea, .production-data-table select { width:100%; min-width:0; min-height:66px; margin:0; font-size:13px; padding:9px; border-radius:8px; }
.production-data-table .production-source-value { margin-bottom:12px; }
.production-source-value > span { display:block; white-space:pre-wrap; line-height:1.6; }
.production-source-value > div { display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
.production-source-value .button { padding:5px 7px; min-height:25px; font-size:10px; border-radius:6px; }
.production-data-table tr.is-source-selected { background:var(--accent-soft); }
.production-data-hint { margin-top:12px; font-size:11px; line-height:1.7; }
.production-source-preview { padding:14px; margin-bottom:20px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); }
.production-source-preview h4 { margin:0 0 10px; font-size:14px; }
.production-source-tabs { display:flex; flex-wrap:wrap; gap:5px; margin:0 0 12px; }
.production-source-tabs button { max-width:100%; padding:6px 8px; font-size:11px; color:var(--muted); border:1px solid var(--line-strong); border-radius:6px; background:var(--surface); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.production-source-tabs button.active { background:var(--accent-soft); border-color:var(--accent-line); color:var(--purple); }
.production-source-preview figure { margin:0; }
.production-source-preview figure img { display:block; width:100%; max-height:330px; object-fit:contain; border:1px solid var(--line); border-radius:5px; background:var(--canvas); }
.production-source-preview figcaption { display:block; margin:10px 0; font-size:12px; font-weight:650; }
.production-source-preview figcaption small { display:block; font-size:10px; font-weight:400; color:var(--muted); line-height:1.6; margin-top:7px; }
.production-source-preview .text-button { font-size:11px; }
.production-data-side h4 { font-size:15px; margin:10px 0; }
.production-data-side .production-product { display:block; padding:10px; }
.production-data-side .production-product > label { font-size:12px; }
.production-data-side .production-product .button { margin-top:8px; min-height:30px; font-size:11px; padding:7px 10px; }

.production-panel #prod-data-section { scroll-margin-top:96px; }

/* Видимые значения формы не подменяют сохранённую ревизию задания. */
.production-product-state { color:var(--muted); font-size:12px; line-height:1.6; margin:12px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:9px; }
.production-product-state.needs-save { color:#8d5319; background:#fff9ef; border-color:#f5d6aa; }
.production-batch-summary { font-size:13px; line-height:1.65; padding:12px 14px; border:1px solid var(--accent-line); border-radius:9px; background:var(--accent-soft); overflow-wrap:anywhere; }
.production-image-upload { position:relative; display:inline-flex; margin:10px 0 0; min-height:32px; padding:7px 9px; font-size:11px; cursor:pointer; }
.production-panel .production-image-upload input[type=file] { position:absolute; top:0; left:0; width:1px; height:1px; min-width:0; min-height:0; padding:0; border:0; opacity:0; clip-path:inset(50%); overflow:hidden; }
.production-image-upload:focus-within { outline:2px solid var(--primary); outline-offset:2px; }
.production-image-upload:has(input:disabled) { opacity:.6; cursor:wait; }
.production-image-upload-state { font-size:11px; line-height:1.5; margin:7px 0 0; overflow-wrap:anywhere; }

/* Предварительный просмотр импорта занимает ширину данных; прокрутка ограничена таблицей. */
#prod-import-result { scroll-margin-top:96px; margin-top:18px; font-size:13px; line-height:1.6; min-width:0; }
.production-import-heading h4 { font-size:17px; margin:0 0 6px; }
.production-import-heading p { margin:0 0 12px; color:var(--muted); }
.production-import-unused { padding:10px 12px; background:var(--accent-soft); border:1px solid var(--accent-line); border-radius:8px; overflow-wrap:anywhere; }
.production-import-table { max-width:100%; overflow:auto; border:1px solid var(--line); border-radius:9px; }
#prod-import-result .production-import-table table { width:max-content; min-width:100%; max-width:none; margin:0; table-layout:fixed; }
#prod-import-result .production-import-table th,#prod-import-result .production-import-table td { min-width:150px; width:180px; max-width:240px; padding:10px; vertical-align:top; overflow-wrap:anywhere; }
#prod-import-result .production-import-table th:first-child,#prod-import-result .production-import-table td:first-child { min-width:80px; width:80px; }
.production-import-table th { background:var(--surface-raised); }
.production-import-table th small,.production-import-table td small { display:block; font-size:10px; font-weight:400; color:var(--muted); overflow-wrap:anywhere; }
.production-import-table img { width:54px; height:72px; object-fit:contain; display:block; margin-bottom:6px; border:1px solid var(--line); border-radius:4px; }
.production-import-value { max-height:160px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
.production-import-table .is-unused { background:var(--accent-soft); }
.production-import-pages { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:10px 0; }
.production-import-pages small { flex-basis:100%; color:var(--muted); font-size:11px; }

/* Ключ и имя сохранённого фото остаются читаемыми в узкой колонке данных. */
#prod-unmapped-images .production-data-field > strong, #prod-unmapped-images .production-data-field > span { overflow-wrap:anywhere; }

/* Реальные данные: повторяющиеся места сведены к одному значению, действия рядом с формой. */
.production-data-progress { color:var(--muted); font-size:13px; }
.production-data-tools { margin:18px 0 0; padding:14px; background:var(--surface-raised); border:1px solid var(--line); border-radius:12px; }
.production-data-tools .production-actions { margin:0 0 12px; }
.production-data-tools .muted { font-size:12px; }
.production-data-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(170px,.55fr); gap:12px; }
.production-data-filters label { min-width:0; font-size:12px; }
.production-data-filters input,.production-data-filters select { width:100%; margin:6px 0 0; font-size:13px; }
#prod-field-count { margin:9px 0 0; }
.production-data-table tr[hidden] { display:none; }
.production-source-locations { width:100%; font-size:11px; }
.production-source-locations > div { display:flex; flex-wrap:wrap; gap:4px; margin-top:8px; max-height:150px; overflow:auto; }
.production-source-locations summary { color:var(--purple); cursor:pointer; }
.production-source-conflict { margin:0 0 10px; font-size:12px; color:#8d5319; line-height:1.6; }
.production-data-table .production-field-state { display:block; margin-top:9px; color:var(--muted); font-size:11px; font-weight:400; }
.production-data-table .production-field-state.needs-attention { color:#9c3c18; }
.production-field-policies { margin-top:12px; font-size:11px; color:var(--muted); }
.production-field-policies p { margin:7px 0; }
.production-data-save { position:sticky; bottom:10px; z-index:3; padding:12px; margin-top:18px; background:var(--surface); border:1px solid var(--line-strong); border-radius:12px; box-shadow:0 6px 24px #20232912; }
.production-data-save .production-actions { margin:0; }
.production-data-save .production-product-state { border:0; padding:8px 0 0; margin:0; background:transparent; }
.production-data-save .form-error { margin:0 0 10px; color:var(--red); font-size:13px; }
.production-data-layout { isolation:isolate; }
@media (max-width:700px) { .production-data-filters { grid-template-columns:minmax(0,1fr); } .production-data-save { bottom:4px; } }

.production-batch-summary > span,.production-batch-attention { display:block; margin-top:8px; }
.production-batch-attention { color:#8d5319; }
.production-batch-summary .button { margin:8px 6px 0 0; font-size:12px; }

.production-box .production-job-error { color:var(--red); font-size:13px; margin:14px 0; scroll-margin-top:100px; }

.production-box .production-local-error { color:var(--red); font-size:13px; line-height:1.6; padding:12px 14px; margin:14px 0; border:1px solid currentColor; border-radius:10px; scroll-margin-top:100px; }

/* Живой ответ исполнителя отделён от сохранённой привязки к проекту. */
.production-executor { padding:14px 16px; margin:14px 0 18px; border:1px solid var(--line-strong); border-radius:12px; background:var(--accent-soft); font-size:13px; }
.production-executor > strong { display:block; font-size:15px; }
.production-executor p { margin:8px 0; line-height:1.6; overflow-wrap:anywhere; }
.production-executor details { margin-top:10px; }
.production-executor .production-actions { margin:12px 0 0; }
.production-executor[data-state="ready"] { background:var(--surface); }
.production-executor:focus { outline:2px solid var(--purple); outline-offset:3px; }

/* Управление сохранённой очередью не зависит от открытого Figma. */
.production-job { scroll-margin-top:100px; overflow-wrap:anywhere; }
.production-job-explanation { font-size:13px; line-height:1.6; color:var(--muted); max-width:760px; }
.production-job-detail { margin-top:18px; padding:16px; border:1px solid var(--line-strong); border-radius:10px; background:var(--canvas); }
.production-job-detail h4 { margin:0 0 12px; font-size:16px; }
.production-job-detail li { margin:8px 0; line-height:1.5; }
.production-job-images { display:flex; flex-wrap:wrap; gap:12px; margin:14px 0; }
.production-job-images a { display:grid; gap:6px; width:110px; font-size:12px; }
.production-job-images img { width:110px; height:146px; object-fit:contain; background:var(--surface); border:1px solid var(--line); border-radius:6px; }

/* Рабочее место дизайнера: партия сверху, один редактор и крупный макет рядом. */
.production-panel { max-width:none; }
.production-panel > .figma-intro h2 { font-size:23px; margin:8px 0; }
.production-panel > .figma-intro p { margin:8px 0; }
.production-panel #prod-template-section { display:grid; grid-template-columns:minmax(190px,.4fr) minmax(280px,1fr); gap:12px 24px; align-items:center; padding:18px 22px; }
.production-panel #prod-template-section > .production-heading { margin:0; gap:10px; align-items:center; }
.production-panel #prod-template-section h3 { font-size:16px; margin:0; }
#prod-template-section > .production-fields { display:block; margin:0; }
#prod-template-section label { font-size:11px; margin:0 0 5px; color:var(--muted); }
#prod-template-section select { width:100%; min-height:40px; margin:0; }
#prod-template-create { grid-column:1/-1; font-size:12px; }
#prod-template-create summary { color:var(--purple); }
.production-panel #prod-data-section > .production-heading { align-items:center; margin-bottom:10px; }
.production-panel #prod-data-section > .production-heading h3 { margin:6px 0 0; font-size:22px; }
.production-table-hint { max-width:980px; font-size:13px; line-height:1.6; margin:8px 0 18px; }
.production-product-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:14px; margin:14px 0; }
.production-product-toolbar label { display:block; font-size:12px; flex:1 1 220px; max-width:430px; }
.production-product-toolbar label:nth-child(2) { flex:0 1 220px; }
.production-product-toolbar input,.production-product-toolbar select { display:block; width:100%; min-height:40px; margin:6px 0 0; font-size:13px; }
.production-product-toolbar > p { margin:0 0 10px auto; font-size:12px; }
.production-product-grid { max-width:100%; overflow:auto; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); }
.production-product-grid table { width:100%; min-width:900px; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:13px; }
.production-product-grid .product-check-col { width:42px; }
.production-product-grid .product-photo-col { width:70px; }
.production-product-grid .product-name-col { width:205px; }
.production-product-grid .product-state-col { width:112px; }
.production-product-grid .product-actions-col { width:116px; }
.production-product-grid th { padding:12px 10px; text-align:left; color:var(--muted); font-size:11px; font-weight:650; background:var(--surface-raised); border-bottom:1px solid var(--line-strong); }
.production-product-grid th small { display:block; margin-top:4px; font-size:10px; font-weight:400; overflow-wrap:anywhere; }
.production-product-grid td { vertical-align:middle; border-bottom:1px solid var(--line); padding:12px 10px; overflow-wrap:anywhere; }
.production-product-grid tbody tr:last-child td { border-bottom:0; }
.production-product-grid tbody tr.is-active { background:var(--accent-soft); }
.production-product-grid tbody tr.is-active td:first-child { box-shadow:inset 3px 0 var(--purple); }
.production-product-grid input[type=checkbox] { width:17px; height:17px; margin:0; accent-color:var(--purple); }
.production-product-grid td[data-row-photo] { padding:8px; }
.production-product-grid img[data-product-thumb] { display:block; width:52px; height:65px; object-fit:contain; background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.production-no-photo { display:grid; place-items:center; width:52px; min-height:65px; padding:5px; text-align:center; border:1px dashed var(--line-strong); border-radius:6px; color:var(--muted); font-size:10px; }
.production-product-identity > strong,.production-product-identity > span { display:block; }
.production-product-identity > strong { font-size:13px; margin-bottom:6px; }
.production-product-identity > span { color:var(--muted); line-height:1.5; }
.production-cell-value { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; line-height:1.5; white-space:pre-wrap; }
.production-product-grid [data-product-inline] { display:block; box-sizing:border-box; width:100%; min-width:0; min-height:38px; max-height:88px; margin:0; padding:8px; border:1px solid var(--accent-line); border-radius:7px; background:var(--surface); font:inherit; line-height:1.45; resize:vertical; }
.production-product-grid textarea[data-product-inline] { height:56px; }
.production-product-grid [data-product-inline]:focus { border-color:var(--purple); outline:2px solid var(--accent-line); outline-offset:1px; }
.production-row-actions { display:grid; gap:6px; }
.production-row-actions .button { padding:7px 9px; min-height:32px; font-size:11px; }
.production-ready-badge { display:inline-block; padding:5px 7px; border-radius:6px; font-size:11px; line-height:1.35; }
.production-ready-badge.is-ready { background:#e9f7ef; color:#176745; }
.production-ready-badge.needs-attention { background:#fff3e2; color:#88501b; }
.production-ready-badge.is-dirty { background:#fff3e2; color:#88501b; }
.production-active-label { display:block; margin-top:7px; font-size:10px; color:var(--purple); }
#prod-products-empty { padding:14px; margin:0; }
.production-import-tools { margin:14px 0 22px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; font-size:13px; }
.production-import-tools summary { color:var(--purple); cursor:pointer; }
.production-import-tools p { max-width:950px; font-size:12px; line-height:1.6; }
.production-import-tools input[type=file] { max-width:430px; margin-right:10px; }
.production-panel .production-data-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr); gap:24px; align-items:start; padding-top:20px; margin-top:6px; border-top:1px solid var(--line-strong); }
.production-editor-heading,.production-preview-heading { margin:0 0 18px; }
.production-editor-heading h4,.production-preview-heading h4 { margin:7px 0; font-size:20px; letter-spacing:-.3px; }
.production-editor-heading p,.production-preview-heading p { margin:8px 0 0; font-size:12px; line-height:1.6; }
.production-data-side { position:sticky; top:92px; }
.production-data-layout > form { min-width:0; }
.production-data-layout > form > .production-fields { gap:14px; }
.production-data-layout .production-data-table { margin-top:16px; }
.production-data-layout .production-data-table thead th:nth-child(1) { width:24%; }
.production-data-layout .production-data-table thead th:nth-child(2) { width:30%; }
.production-data-layout .production-data-tools { padding:12px; }
.production-data-layout .production-data-filters { grid-template-columns:minmax(0,1fr) minmax(130px,.6fr); }
.production-data-side .production-source-preview { padding:14px; }
.production-data-side .production-source-preview figure img { max-height:620px; }
#prod-data-progress { display:block; margin:18px 0 0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:1150px) {
 .production-panel .production-data-layout { gap:18px; grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr); }
 .production-data-layout > form > .production-fields { grid-template-columns:1fr; }
 .production-data-layout .production-data-filters { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:900px) {
 .production-panel .production-data-layout { grid-template-columns:minmax(0,1fr); }
 .production-data-side { position:static; }
 .production-panel #prod-template-section { grid-template-columns:minmax(0,1fr); }
 .production-product-toolbar > p { flex-basis:100%; margin:0; }
}
}
