/* Геометрия раздела. Общие компоненты определяются в aart-ui. */
@layer aart-legacy {
/* Три режима мастерской: представление не пересоздаёт канонические формы. */
#production-panel [hidden] { display:none!important; }
#production-panel.production-workspace-ready #prod-intro { display:none; }
#production-panel #prod-template-section { margin:0 0 16px; padding:16px 20px; grid-template-columns:minmax(150px,auto) minmax(280px,1fr); gap:10px 24px; align-items:center; }
#prod-template-section .production-heading { gap:16px; margin:0; }
#prod-template-section .production-heading h3 { font-size:16px; line-height:1.35; white-space:nowrap; }
#prod-template-section .production-heading .button { padding:8px 12px; font-size:12px; min-height:36px; }
#prod-template-section>.production-fields { margin:0; }
#prod-template-section label { font-size:11px; }
#prod-template-section select { min-height:42px; }
#prod-template-create { margin-top:0; }
#prod-template-create>summary { font-size:12px; }
#prod-workspace-navigation { margin:0 0 18px; scroll-margin-top:100px; }
.production-workspace-tabs { display:flex; align-items:center; gap:4px; border-bottom:1px solid var(--border,#e1e4ec); }
.production-workspace-tabs [role=tab] { position:relative; border:0; border-radius:10px 10px 0 0; background:transparent; color:var(--muted,#657084); padding:14px 28px; font:inherit; font-size:14px; font-weight:650; cursor:pointer; }
.production-workspace-tabs [role=tab][aria-selected=true] { color:var(--purple,#6f13ff); background:#f3edff; }
.production-workspace-tabs [role=tab][aria-selected=true]::after { content:''; position:absolute; height:3px; background:var(--purple,#6f13ff); left:16px; right:16px; bottom:-1px; border-radius:3px; }
.production-workspace-tabs [role=tab]:focus-visible { outline:3px solid #cbb0ff; outline-offset:-3px; }
.production-workspace-context { display:flex; align-items:center; flex-wrap:wrap; gap:10px 24px; min-height:38px; font-size:12px; padding:9px 3px 0; color:var(--muted,#657084); }
#prod-workspace-item { font-weight:650; color:var(--ink,#22252d); }
#prod-workspace-save { color:#128263; }
#prod-workspace-save.needs-save { color:#b36014; }
#prod-workspace-party { margin-left:auto; white-space:nowrap; }
#prod-data-section,#prod-jobs-section,#prod-delivery-section { margin-top:0; scroll-margin-top:100px; }
#prod-data-section { padding:22px; }
#prod-table-view>.production-heading { align-items:center; margin-bottom:10px; }
#prod-table-view>.production-heading h3 { font-size:20px; line-height:1.3; }
#prod-table-view>.production-heading .production-actions { margin:0; }
#prod-table-next { font-size:12px; padding:10px 14px; }
#prod-table-view .production-table-hint { margin:0 0 18px; max-width:900px; }
#prod-table-view .production-product-toolbar { margin-bottom:18px; }
#prod-table-view .production-import-tools { margin-top:18px; }
#prod-table-view>.production-actions { margin:0; }
#prod-editor-view { scroll-margin-top:100px; }
.production-focus-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:-2px 0 22px; padding-bottom:16px; border-bottom:1px solid var(--border,#e1e4ec); }
.production-focus-toolbar .text-button { font-weight:650; padding:8px 0; }
#prod-editor-next { font-size:12px; padding:10px 16px; }
#prod-editor-view .production-data-layout { border-top:0; padding-top:0; margin-top:0; align-items:start; }
#prod-editor-view .production-editor-heading { margin-bottom:18px; }
#prod-editor-view .production-editor-heading h4 { font-size:21px; margin:5px 0 10px; }
#prod-editor-view .production-editor-heading .section-kicker { font-size:9px; }
#prod-editor-view .production-preview-heading { margin-bottom:14px; }
#prod-editor-view .production-preview-heading p { margin:5px 0; }
.production-image-file-details { margin:8px 0 0; font-size:11px; }
.production-image-file-details>summary { cursor:pointer; color:var(--muted,#657084); }
.production-image-file-details[open] select { margin-top:8px; }
#prod-jobs-section>.production-heading h3,#prod-delivery-section>.production-heading h3 { font-size:21px; }
#prod-jobs-section>.production-heading,#prod-delivery-section>.production-heading { margin-bottom:12px; }
#prod-jobs-section>.production-heading+p,#prod-delivery-section>.production-heading+p { max-width:900px; font-size:13px; line-height:1.65; color:var(--muted,#657084); }
@media(max-width:1100px) {
 #prod-table-view>.production-heading { align-items:flex-start; flex-direction:column; }
 .production-focus-toolbar { align-items:flex-start; }
}
@media(max-width:700px) {
 #production-panel #prod-template-section { display:block; }
 #prod-template-section>.production-fields { margin-top:12px; }
 .production-workspace-tabs [role=tab] { padding:12px 14px; font-size:12px; }
 #prod-workspace-party { margin-left:0; }
 .production-focus-toolbar { flex-wrap:wrap; }
 #prod-data-section { padding:16px; }
}

/* Открытие товара и выбор партии — разные, видимые действия. */
#production-panel #prod-template-section.production-template-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) auto auto; gap:12px 18px; padding:12px 18px; align-items:center; }
.production-template-choice { display:flex; align-items:center; gap:14px; min-width:0; }
.production-template-choice label { flex:none; white-space:nowrap; margin:0; font-size:12px; font-weight:650; }
.production-template-choice select { min-width:0; width:100%; max-width:680px; }
#prod-template-section>#prod-refresh { min-height:36px; padding:8px 12px; font-size:12px; }
#prod-template-section>#prod-template-create { grid-column:auto; margin:0; }
#prod-template-create>summary { white-space:nowrap; padding:10px 0; }
#prod-template-section>#prod-template-create[open] { grid-column:1/-1; border-top:1px solid var(--line,#e1e4ec); padding-top:10px; }
.production-product-grid .product-actions-col { width:140px; }
.production-product-grid tbody tr { cursor:pointer; transition:background-color .12s; }
.production-product-grid tbody tr:hover { background:var(--surface-raised,#f8f7fc); }
.production-product-grid tbody tr.is-active:hover { background:var(--accent-soft,#f4edff); }
.production-product-grid tbody tr:focus-visible { outline:2px solid var(--purple,#6f13ff); outline-offset:-3px; }
.production-product-grid td[data-product-select-cell] { cursor:default; text-align:center; }
.production-product-grid td[data-product-select-cell]:hover { background:var(--accent-soft,#f4edff); }
.production-product-grid input[type=checkbox] { cursor:pointer; }
.production-product-grid .production-product-name { display:block; width:100%; min-width:0; border:0; padding:3px 0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.production-product-name strong { display:block; color:var(--purple,#6f13ff); font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.production-product-name span { display:block; margin-top:5px; color:var(--muted,#657084); line-height:1.5; overflow-wrap:anywhere; }
.production-product-name:hover strong { text-decoration:underline; text-underline-offset:3px; }
.production-product-grid .production-product-photo { display:block; width:54px; min-height:67px; border:0; border-radius:7px; padding:0; background:transparent; cursor:pointer; }
.production-product-grid .production-product-photo:hover { box-shadow:0 0 0 2px var(--accent-line,#d4bfff); }
.production-product-grid .production-product-photo:focus-visible,.production-product-grid .production-product-name:focus-visible { outline:2px solid var(--purple,#6f13ff); outline-offset:3px; border-radius:4px; }
.production-product-grid .production-product-name:disabled,.production-product-grid .production-product-photo:disabled { opacity:.55; cursor:wait; }
.production-product-grid .production-product-identity>[data-product-inline] { margin-top:6px; }
.production-product-grid [data-product-inline] { max-height:140px; }
.production-product-grid .production-row-actions .button { min-height:36px; font-size:12px; white-space:normal; }
@media(max-width:1100px) {
 #production-panel #prod-template-section.production-template-toolbar { grid-template-columns:minmax(180px,1fr) auto; }
 #prod-template-section>#prod-template-create { grid-column:1/-1; }
}
@media(max-width:700px) {
 #production-panel #prod-template-section.production-template-toolbar { grid-template-columns:1fr; }
 .production-template-choice { align-items:flex-start; flex-direction:column; gap:6px; }
 #prod-template-section>#prod-template-create { grid-column:auto; }
}

/* Партия начинается сразу после выбора шаблона, без пустого пояса формы. */
#prod-table-view>.production-heading h3 { margin:0; }
#prod-table-view .production-table-hint { margin:0 0 12px; }
#prod-table-view .production-product-toolbar { margin:0 0 14px; }
#prod-table-view .production-product-toolbar input,#prod-table-view .production-product-toolbar select { margin:6px 0 0; }
#prod-table-view .production-product-toolbar>p { margin:0 0 10px auto; }
.production-no-fields-note { border:1px solid var(--accent-line,#d4bfff); background:var(--accent-soft,#f4edff); border-radius:10px; padding:12px 14px; margin:0 0 18px; }
.production-no-fields-note p { margin:0 0 8px; font-size:13px; }
.production-no-fields-note .text-button { padding:0; font-size:13px; }

/* Состав выдачи виден здесь, даже когда таблица товаров находится в другой вкладке. */
.production-delivery-selection { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:18px 0; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface-raised); }
.production-delivery-selection>div { min-width:0; }
.production-delivery-selection strong { font-size:13px; }
.production-delivery-selection p { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin:7px 0 0; color:var(--muted); font-size:12px; }
.production-delivery-selection p>span { display:block; max-width:150px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.production-delivery-selection .button { flex:none; min-height:36px; padding:8px 12px; font-size:12px; }
@media(max-width:700px) { .production-delivery-selection { align-items:flex-start; flex-direction:column; } }

/* Сохранение завершается видимым переходом; длинные данные прокручиваются отдельно. */
#prod-editor-view .production-editor-heading { margin-bottom:12px; }
#prod-editor-view .production-editor-heading h4 { font-size:19px; margin:5px 0; }
#prod-editor-view .production-editor-heading p { margin-top:5px; }
#prod-editor-view #prod-data-progress { margin-top:10px; }
#prod-editor-view .production-data-tools { margin-top:12px; padding:10px; }
#prod-editor-view .production-data-tools .production-actions { margin-top:0; }
#prod-editor-view .production-data-table { max-height:min(62vh,680px); overflow:auto; border:1px solid var(--line); border-radius:10px; margin-top:12px; }
#prod-editor-view .production-data-table thead { position:sticky; top:0; z-index:2; }
#prod-editor-view .production-data-table th,#prod-editor-view .production-data-table td { padding:9px 8px; }
#prod-editor-view .production-data-table textarea { min-height:48px; max-height:240px; resize:vertical; }
#prod-editor-view .production-source-value { max-height:150px; overflow:auto; margin-bottom:6px; }
#prod-editor-view .production-source-value>span { line-height:1.45; }
.production-data-save { margin-top:14px; }
.production-data-save>.production-actions { margin:0; }
#prod-product-next { min-height:42px; }
#prod-product-state[data-saved=true] { color:#176745; background:#eef9f2; border-color:#c7e8d5; }

/* Запуск и результат занимают верх экрана, сведения о подключении раскрываются по запросу. */
#prod-jobs-section { min-width:0; }
#prod-jobs-section>.production-heading { align-items:center; margin-bottom:14px; }
#prod-jobs-section>.production-heading h3 { margin:4px 0 0; }
#prod-jobs-section>.production-heading>.button { min-height:36px; padding:8px 12px; font-size:12px; }
.production-launch { padding:16px; border:1px solid var(--accent-line); border-radius:12px; background:var(--accent-soft); }
.production-launch .production-batch-summary { border:0; background:transparent; padding:0; font-size:12px; }
.production-launch-actions { display:flex; align-items:end; gap:14px; flex-wrap:wrap; margin-top:14px; }
.production-launch-actions>#prod-start { min-height:46px; }
.production-export-scale { display:grid; gap:5px; color:var(--muted); font-size:11px; }
.production-export-scale select { width:auto; min-width:128px; min-height:38px; margin:0; padding:8px 28px 8px 10px; background:var(--surface); font-size:13px; }
.production-advanced { position:relative; font-size:12px; }
.production-advanced>summary { cursor:pointer; padding:10px 0; color:var(--purple); }
.production-advanced[open] { flex-basis:100%; padding-top:10px; border-top:1px solid var(--accent-line); }
.production-advanced p { margin:6px 0 12px; max-width:700px; color:var(--muted); }
.production-advanced>label { display:block; margin:14px 0 6px; }
.production-advanced>select { min-height:38px; margin:0 8px 8px 0; max-width:100%; }
#prod-launch-state { margin:12px 0 0; font-size:13px; color:var(--purple); }
.production-service-details { margin:12px 0 18px; padding:10px 14px; border:1px solid var(--line); border-radius:9px; font-size:12px; color:var(--muted); }
.production-service-details>summary { cursor:pointer; }
.production-service-details[data-state=ready]>summary { color:#176745; }
.production-service-details .production-executor { margin:12px 0 0; }
.production-queue-summary { display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; padding:16px; margin-top:16px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); }
.production-queue-summary>div:first-child { display:grid; gap:6px; }
.production-queue-summary strong { font-size:17px; }
.production-queue-summary>div>span { font-size:12px; color:var(--muted); }
.production-queue-counts { display:flex; flex-wrap:wrap; gap:12px; }
.production-queue-counts b { color:var(--ink); }
.production-job-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.production-job-stages { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); list-style:none; gap:10px; margin:16px 0; padding:0; }
.production-job-stages li { display:grid; align-content:start; gap:6px; margin:0; padding:12px; border:1px solid var(--line); border-radius:9px; font-size:12px; background:var(--surface-raised); }
.production-job-stages li strong { font-size:12px; }
.production-job-stages li span,.production-job-stages li small { color:var(--muted); }
.production-job-stages li[data-state=running] { border-color:var(--purple); background:var(--accent-soft); }
.production-job-stages li[data-state=succeeded] { border-color:#c7e8d5; background:#f2faf5; }
.production-job-stages li[data-state=failed] { border-color:#e8bcb7; }
.production-job-result { margin-top:10px; }
.production-export-action { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.production-export-wait { display:block; margin-top:12px; font-size:12px; color:var(--muted); }
.production-repeat-export { margin-top:14px; font-size:12px; color:var(--muted); }
.production-repeat-export>summary { cursor:pointer; }
.production-repeat-export p { max-width:700px; line-height:1.6; }
.production-job-images button { display:grid; gap:6px; width:110px; font-size:12px; padding:0; color:var(--purple); background:transparent; border:0; text-align:left; cursor:pointer; }

/* Проверка всех слайдов остаётся в проекте: крупный холст и последовательное листание. */
#prod-previews.production-previews { display:block; margin:20px 0; padding:18px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); scroll-margin-top:100px; }
.production-review-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; }
.production-review-heading h4 { margin:5px 0; font-size:18px; }
.production-review-heading p { margin:0; font-size:12px; color:var(--muted); }
.production-review-heading .production-actions { margin:0; }
.production-review-layout { display:grid; grid-template-columns:78px minmax(0,1fr); gap:14px; }
.production-review-filmstrip { display:grid; align-content:start; gap:8px; max-height:620px; overflow:auto; padding:2px; }
.production-review-filmstrip button { display:grid; justify-items:center; gap:4px; padding:5px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--muted); font-size:11px; cursor:pointer; }
.production-review-filmstrip button[aria-pressed=true] { border:2px solid var(--purple); padding:4px; color:var(--purple); background:var(--accent-soft); }
.production-review-filmstrip img { width:54px; height:72px; object-fit:contain; background:var(--canvas); border:0; }
#prod-previews .production-review-canvas { display:grid; align-content:center; justify-items:center; gap:10px; margin:0; padding:14px; min-width:0; background:var(--canvas); border-radius:10px; }
#prod-previews .production-review-canvas>img { display:block; width:auto; height:auto; max-height:min(68vh,700px); max-width:100%; object-fit:contain; border:1px solid var(--line); background:var(--surface); }
#prod-previews .production-review-canvas>figcaption { margin:0; font-size:11px; color:var(--muted); }
.production-review-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-top:14px; }
.production-review-footer>.production-actions { margin:0; font-size:12px; }
.production-review-footer details { max-width:460px; font-size:12px; color:var(--muted); }
.production-review-footer summary { cursor:pointer; }
.production-review-footer details p { line-height:1.6; }
@media(max-width:700px) {
 .production-launch-actions { align-items:stretch; }
 .production-launch-actions>#prod-start { width:100%; }
 .production-review-heading { align-items:flex-start; flex-direction:column; }
 .production-review-layout { grid-template-columns:minmax(0,1fr); }
 .production-review-filmstrip { display:flex; max-height:none; overflow:auto; }
 .production-review-filmstrip button { flex:0 0 64px; }
 #prod-previews.production-previews { padding:12px; }
 #prod-previews .production-review-canvas { padding:8px; }
 .production-job-stages { grid-template-columns:1fr; }
}
.production-launch-details { margin:0 0 14px; }
.production-launch-details>summary { color:var(--purple); font-size:12px; cursor:pointer; padding:4px 0 12px; }
.production-launch-details:not([open])>summary { padding:8px 0; }
#prod-previews .button { width:auto; }
#prod-previews .production-review-footer>.production-actions { display:flex; flex-wrap:wrap; }
#prod-previews.production-previews,.production-job { scroll-margin-top:170px; }
@media(max-width:700px) { #prod-previews.production-previews,.production-job { scroll-margin-top:150px; } }

.production-data-save .production-actions .button { min-height:38px; padding:8px 12px; font-size:12px; }

.production-job-heading>div { min-width:0; }
.production-job-meta { display:block; margin-top:6px; font-size:11px; line-height:1.5; color:var(--muted); }
}
