/* MyPrint WMS — шар 3: екрани.
   Патерни конкретних екранів, адаптивні перевизначення, вхід, робочі потоки й друк (@media print).
   Порядок правил збережено з index.html: від нього залежить каскад. */

/* Page pattern: tasks */
.queue-page { display: grid; gap: var(--space-5); }
.queue-filter-details { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.queue-filter-details > summary { display: none; }
.queue-controls { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: 0; }
.queue-controls label { position: relative; display: grid; gap: 0; color: var(--ink-3); font-family: var(--font-mono); font-size: 0; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.queue-controls label > input, .queue-controls label > select { min-height: var(--control-md); padding: var(--space-2) var(--space-3); font-family: var(--font-primary); font-size: var(--font-size-xs); letter-spacing: 0; text-transform: none; }
/* C-43: на /history підпис «Працівник» видимий — селект без placeholder не може пояснити себе сам */
.queue-controls label.history-worker-control { gap: var(--space-1); font-size: var(--font-size-xs); }
.queue-controls label.search { flex: 1 1 100%; order: -3; }
.queue-controls label.search > input { padding-left: var(--space-8); }
.queue-controls label.search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; z-index: 1; color: var(--ink-3); font-size: var(--font-size-xl); font-weight: 400; line-height: 1; transform: translateY(-50%); }
.queue-controls .advanced-filter { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.queue-controls.custom-filter-visible .advanced-filter { position: relative !important; width: auto !important; height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; clip: auto !important; white-space: normal !important; border: 0 !important; opacity: 1 !important; pointer-events: auto !important; flex: 0 1 150px; gap: var(--space-1); font-size: var(--font-size-xs); }
.sr-control, .queue-controls .readiness-select-control { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.wms-primary-action-well { display: grid; gap: var(--space-3); }
#primaryWorkWell { grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 116px; padding: var(--space-5); box-shadow: var(--shadow-1); }
#primaryWorkWell > .packer-step-label { display: none; }
#primaryWorkWell .work-card-kicker { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-2); }
#primaryWorkWell .work-card-kicker .wms-status-chip { min-height: var(--control-2xs); padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); }
#primaryWorkWell.packer-active-wave--ready { box-shadow: inset 0 0 0 1px var(--accent-line), var(--shadow-1); background: var(--accent-soft); }
#primaryWorkWell.packer-active-wave--blocked { box-shadow: inset 0 0 0 1px var(--st-blocked-line), var(--shadow-1); background: var(--st-prob-bg); }
#primaryWorkWell.packer-active-wave--idle { background: var(--surface); }
.wms-primary-action-well__title { font-size: var(--font-size-lg); font-weight: 650; line-height: 1.25; }
.wms-primary-action-well__hint { margin-top: var(--space-1); color: var(--ink-3); font-size: var(--font-size-sm); }
.packer-mini-stats { display: flex; flex-wrap: wrap; gap: var(--space-1-5); margin-top: var(--space-3); }
.primary-work-progress { width: min(360px, 100%); height: 8px; margin-top: var(--space-3); border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-3); }
.primary-work-progress span { display: block; height: 100%; width: var(--primary-work-progress, 0%); border-radius: var(--radius-pill); background: var(--accent); }
#primaryWorkAction { align-self: center; min-height: var(--control-2xl); min-width: 184px; padding: var(--space-4) var(--space-6); font-size: var(--font-size-lg); white-space: nowrap; box-shadow: var(--shadow-1); }
#takeAssigneeWrap { min-width: 180px; }
.queue-list { border: none; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }

/* Page pattern: queue rows, product media, live updates */
.queue-select { display: inline-flex; align-items: center; justify-content: center; }
.queue-select input { width: 18px; height: 18px; min-height: 18px; padding: 0; }
.queue-number { font-family: var(--font-mono); font-size: var(--font-size-sm); font-weight: 700; }
.queue-order-link { max-width: 100%; min-height: var(--control-xs); justify-content: flex-start; padding: 0; border: 0; background: transparent; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; overflow: hidden; text-overflow: ellipsis; }
.queue-order-link:hover { filter: none; background-image: none; box-shadow: none; color: var(--accent); }
.queue-number { white-space: nowrap; }
/* "Стан" column: data, not a control — dot + text, no box (kills the false affordance) */
.queue-products-list { display: grid; gap: var(--space-1-5); width: 100%; min-width: 0; }
.queue-product-line { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: start; width: 100%; min-height: var(--control-sm); padding: var(--space-1-5) var(--space-2) var(--space-1-5) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink-2); font-size: var(--font-size-xs); line-height: 1.25; }
.queue-product-line.shortage { border-color: var(--st-pack-line); background: var(--st-pack-bg); }
.queue-product-line.unknown { border-color: var(--accent-line); background: var(--accent-soft); }
.queue-product-qty { color: var(--ink-2); font-family: var(--font-mono); font-size: var(--font-size-xs); font-weight: 700; text-align: right; white-space: nowrap; }
.queue-product-detail { grid-column: 1 / -1; min-width: 0; overflow: hidden; color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); text-overflow: ellipsis; white-space: nowrap; }
.queue-product-line.shortage .queue-product-detail { color: var(--st-pack); }
.queue-product-line.unknown .queue-product-detail { color: var(--accent-ink); }
.queue-product-more, .queue-products-empty { min-height: var(--control-xs); display: inline-flex; align-items: center; padding: var(--space-1) var(--space-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-control); background: transparent; color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); font-weight: 650; }
.queue-product-more { width: fit-content; }
.queue-products-empty { box-sizing: border-box; width: 100%; justify-content: flex-start; }
.product-media { min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-2); align-items: center; }
.product-media__thumb { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-2); color: var(--ink-4); font-family: var(--font-mono); font-size: var(--font-size-xs); font-weight: 700; line-height: 1.1; text-align: center; text-transform: uppercase; }
.product-media--loaded .product-media__thumb { cursor: zoom-in; }
.product-media__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-media__body { min-width: 0; display: grid; gap: var(--space-0-5); }
.product-media__link { min-width: 0; color: var(--ink); font-weight: 700; line-height: 1.22; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.product-media__link:hover { color: var(--accent); }
.product-media__meta { min-width: 0; color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); line-height: 1.25; overflow-wrap: anywhere; }
.product-media--queue { grid-template-columns: 46px minmax(0, 1fr); gap: var(--space-2); }
.product-media--queue .product-media__thumb { width: 46px; height: 46px; }
.product-media--queue .product-media__link { display: -webkit-box; max-height: 31px; overflow: hidden; font-size: var(--font-size-xs); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-media--modal { grid-template-columns: 64px minmax(0, 1fr); }
.product-media--modal .product-media__thumb { width: 64px; height: 64px; }
.product-media--card { grid-template-columns: 58px minmax(0, 1fr); }
.product-media--card .product-media__thumb { width: 58px; height: 58px; }
.product-media--card .product-media__link { font-size: var(--font-size-lg); }
.product-media--current { grid-template-columns: 108px minmax(0, 1fr); gap: var(--space-3); align-items: center; }
.product-media--current .product-media__thumb { width: 108px; height: 108px; }
.product-media--current .product-media__link { font-size: var(--font-size-3xl); line-height: 1.12; }
.product-media-preview { position: fixed; left: 0; top: 0; z-index: 130; width: min(280px, calc(100vw - 24px)); max-width: calc(100vw - 24px); padding: var(--space-2); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transform: translate3d(-9999px, -9999px, 0); transition: opacity .08s ease-out; }
.product-media-preview.is-visible { opacity: 1; }
.product-media-preview img { width: 100%; max-height: min(300px, calc(100vh - 96px)); display: block; object-fit: contain; border-radius: var(--radius-control); background: var(--surface-2); }
.product-media-preview__caption { margin-top: var(--space-2); color: var(--ink); font-size: var(--font-size-xs); font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
/* Тонований рецепт кольорів живе у .btn-toned (атом кнопок вище) — тут лише геометрія. */
.live-enter { animation: liveEnterFlash 1.8s ease-out; }
article.live-enter { animation: liveEnterSlide .45s cubic-bezier(.2, .7, .3, 1), liveEnterFlash 1.8s ease-out; }
@keyframes liveEnterSlide { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes liveEnterFlash { 0% { background-color: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-line); } 100% { background-color: transparent; box-shadow: inset 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) {
  article.live-enter { animation: liveEnterFlash 1.8s ease-out; }
}
.queue-empty { min-height: 104px; display: grid; place-items: center; padding: var(--space-5); text-align: center; color: var(--ink-3); }
.queue-empty-retry { margin-top: var(--space-3); }
.queue-board { display: grid; gap: var(--space-4); align-items: start; }
/* Page pattern: waves */
.my-workbench { display: grid; gap: var(--space-4); }
.status-group { display: grid; gap: var(--space-2); padding: 0; border: 0; background: transparent; }
.status-group h3 { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.checking-card-list { display: grid; gap: var(--space-2); }
.checking-card { position: relative; display: grid; gap: var(--space-3); padding: var(--space-4); overflow: hidden; }
.my-work-actions { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }
.my-work-actions { justify-content: flex-end; }
.my-work-actions button { min-height: var(--control-sm); }
.my-work-actions .btn-quiet { border-color: var(--line-strong); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-1); }
.my-work-empty { min-height: 190px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.my-work-empty > div { max-width: 520px; display: grid; gap: var(--space-2); justify-items: start; }
.my-work-empty b { color: var(--ink); font-size: var(--font-size-xl); }
/* Page pattern: queue tabs + packing tab */
.queue-tab-count { min-width: 26px; display: inline-flex; align-items: center; justify-content: center; padding: var(--space-0-5) var(--space-2); border-radius: var(--radius-pill); background: var(--surface-3); color: var(--ink-2); font: 700 var(--font-size-xs)/1.3 var(--font-mono); }
.queue-skew-strip { display: flex; gap: var(--space-3); align-items: center; justify-content: flex-start; padding: var(--space-3) var(--space-4); border: 1px solid var(--st-pack-line); border-radius: var(--radius); background: var(--st-pack-bg); color: var(--st-pack); font-weight: 650; text-align: left; }
.queue-skew-strip span { color: var(--ink-2); font-weight: 400; font-size: var(--font-size-sm); }
.queue-tab-panel { display: grid; gap: var(--space-3); }
#packQueueCards { display: grid; gap: var(--space-3); }
#packQueueCards .status-group { gap: var(--space-2); }
#packQueueCards .status-group h3 { padding: 0 var(--space-0-5); }
.checking-problem-group h3 { color: var(--st-prob); }
#packQueueCards .checking-card-list { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.packing-task-card { gap: var(--space-2); padding: var(--space-3) var(--space-3); }
.packing-task-card.problem { box-shadow: inset 0 0 0 1px var(--st-prob-line), var(--shadow-1); background: var(--st-prob-bg); }
.packing-card-head, .packing-card-kicker, .packing-action-row { display: flex; gap: var(--space-2); align-items: center; justify-content: space-between; }
.packing-card-kicker { justify-content: flex-start; flex-wrap: wrap; min-width: 0; }
.packing-card-kicker .wms-status-chip { min-height: var(--control-2xs); padding: var(--space-0-5) var(--space-2); font-size: var(--font-size-xs); }
.packing-wave-id { color: var(--ink-2); font-family: var(--font-mono); font-size: var(--font-size-xs); font-weight: 700; white-space: nowrap; }
.packing-card-age { flex: 0 0 auto; color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); white-space: nowrap; }
.packing-card-age.is-risk { color: var(--st-prob); font-weight: 700; }
.packing-card-title { display: grid; gap: var(--space-1); }
.packing-card-title b { font-size: var(--font-size-lg); line-height: 1.2; }
.packing-card-title span { color: var(--ink-3); font-size: var(--font-size-xs); line-height: 1.35; }
.packing-meta-grid { display: flex; flex-wrap: wrap; gap: var(--space-1-5); }
.packing-progress { height: 8px; border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-3); }
.packing-progress span { display: block; height: 100%; width: var(--packing-progress, 0%); background: var(--accent); }
.packing-task-card.problem .packing-progress span { background: var(--st-prob); }
.packing-problem-note { padding: var(--space-2) var(--space-3); border: 1px solid var(--st-prob-line); border-radius: var(--radius-tight); background: var(--st-prob-bg); color: var(--ink-2); font-size: var(--font-size-xs); line-height: 1.35; }
.packing-problem-note b { color: var(--st-prob); }
.checking-note { display: grid; gap: var(--space-1-5); color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.checking-note textarea { min-height: var(--control-3xl); padding: var(--space-2) var(--space-3); font-family: var(--font-primary); font-size: var(--font-size-sm); font-weight: 400; letter-spacing: 0; text-transform: none; }
.checking-note-hint { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); }
.packing-action-row { justify-content: flex-end; flex-wrap: wrap; gap: var(--space-3); }
.packing-action-row button { min-height: var(--control-lg); padding: var(--space-3) var(--space-4); font-size: var(--font-size-sm); }
.packing-action-row button:not(.btn-quiet):not(.secondary):not(.danger) { min-height: var(--control-2xl); min-width: 150px; font-size: var(--font-size-md); }
.packing-action-row .btn-quiet { border-color: var(--line); background: transparent; color: var(--ink-2); }
.packing-action-row .problem-path-action { border-color: var(--st-pack-line); background: var(--st-pack-bg); color: var(--st-pack); }
.checking-empty-state { min-height: 150px; display: grid; place-items: center; padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.checking-empty-state > div { max-width: 560px; display: grid; gap: var(--space-2); justify-items: start; }
.toast-layer { position: fixed; right: 16px; top: 120px; z-index: 120; display: grid; gap: var(--space-2); width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); font-size: var(--font-size-sm); line-height: 1.4; pointer-events: auto; }
.toast > div { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.toast.success { border-color: var(--st-done-line); background: var(--st-done-bg); color: var(--st-done); }
.toast.error { border-color: var(--st-prob-line); background: var(--st-prob-bg); color: var(--st-prob); font-weight: 650; }
.toast.warn { border-color: var(--st-pack-line); background: var(--st-pack-bg); color: var(--st-pack); }
.toast .toast-close { min-height: var(--control-2xs); min-width: 24px; padding: 0 var(--space-1-5); border: none; background: transparent; color: inherit; font-size: var(--font-size-lg); line-height: 1; box-shadow: none; }
.toast .muted { color: var(--ink-2); font-weight: 400; }
.confirm-modal__panel { width: min(520px, 100%); display: grid; grid-template-rows: none; gap: var(--space-3); padding: var(--space-5); }
.confirm-modal__panel h2 { font: var(--text-h2); }
.confirm-modal__text { min-width: 0; color: var(--ink-2); font-size: var(--font-size-md); line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.confirm-modal__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: flex-end; }
.confirm-modal__actions button { min-height: var(--control-xl); padding: var(--space-3) var(--space-5); }

/* Page pattern: lead */
.lead-metrics { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.lead-metric { min-height: 74px; padding: var(--space-3) var(--space-3); }
.lead-metric b { margin-top: var(--space-1-5); font-size: var(--font-size-3xl); }
.lead-metric.control-health-tile--blocked { box-shadow: inset 0 0 0 1px var(--st-blocked-line), var(--shadow-1); background: var(--st-prob-bg); }
.lead-metric.control-health-tile--warn { box-shadow: inset 0 0 0 1px var(--st-pack-line), var(--shadow-1); background: var(--st-pack-bg); }
.lead-section { display: grid; gap: var(--space-3); padding: var(--space-4); }
/* «Потрібне твоє рішення» (N6, U-04): першим блоком «Контролю дня», червона рамка проблеми. */
.lead-decisions { box-shadow: inset 0 0 0 1px var(--st-prob-line), var(--shadow-1); }
.lead-decisions > h2 { margin: 0; color: var(--st-prob); font: var(--text-h2); }
#leadDecisions { display: grid; gap: var(--space-2); }
/* one-off intervention-lane tint: intentional, no token */
.lead-worker-table { max-height: 360px; overflow: auto; }
.lead-stats-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.lead-stats-controls { justify-content: flex-end; }
.lead-stats-totals { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lead-stats-totals:empty { display: none; }
.lead-history-error-desc { display: block; max-width: 320px; color: var(--ink-2); }
.history-flag-filters { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }
.history-flag-filters .history-flag { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-sm); padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-pill); color: var(--ink-3); font: 600 var(--font-size-sm)/1.2 var(--font-primary); letter-spacing: 0; text-transform: none; cursor: pointer; }
.history-flag-filters .history-flag:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.history-flag-filters .history-flag > input { width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: var(--accent); }
.history-worker-control select { min-width: 170px; }
/* На окремій сторінці історії таблиця не обмежена 360px (як вбудовані
   панелі /lead): сторінку з 50 рядками гортаємо цілком, а не всередині блоку. */
#historyWrap { max-height: none; }
.history-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.history-pager .history-page-info { font-variant-numeric: tabular-nums; }
.control-history-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.lead-worker-table tr.is-problem { background: var(--st-prob-bg); }
.lead-worker-table tr.is-active { background: var(--surface-veil); }
/* Page pattern: details */
.detail-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
#orderDetailTitle { font: var(--text-h1); letter-spacing: -0.015em; }
#orderDetailMeta { color: var(--ink-3); }
/* meta dates: flat key-value (як .pick-order-card__field), не пігулка */
.my-work-section { display: grid; gap: var(--space-3); }
.my-work-section-title { font-size: var(--font-size-lg); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.my-work-done-today { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink-2); font-weight: 650; }
.my-work-done-today b { color: var(--st-done); font-family: var(--font-mono); }
.my-work-done-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-weight: 550; }
.my-work-done-row:last-child { border-bottom: 0; padding-bottom: 0; }
.my-work-done-row .my-work-done-time { margin-left: auto; font-family: var(--font-mono); color: var(--ink-3); font-weight: 650; }
@media (max-width: 720px) { .my-work-done-row .my-work-done-time { margin-left: 0; } }
/* Паспорт хвилі: оглядові стани (picked/checked/done/packed/cancelled) */
/* Футер дій одним рядом: тихий інструкційний хелпер зліва, група кнопок однакової висоти справа */
/* Паспорт хвилі, дії «Що далі»: заголовок зверху, кнопки wrap-рядком зліва, без дірок */
/* C-35: підтвердження «Натисни ще раз» — помітний warn-банер зі смужкою-таймером
   (тривалість анімації = WAVE_ACTION_CONFIRM_WINDOW_MS в app.js) */
.action-confirm-hint { flex: 1 1 100%; display: block; padding: var(--space-3) var(--space-3); border: 1px solid var(--st-pack-line); border-radius: var(--radius-tight); background: var(--st-pack-bg); color: var(--st-pack); font-size: var(--font-size-sm); font-weight: 600; }
.action-confirm-hint b { display: block; margin-bottom: var(--space-0-5); }
.action-confirm-timer { display: block; height: 3px; margin-top: var(--space-2); border-radius: var(--radius-pill); background: var(--st-pack); transform-origin: left; animation: confirmWindowCountdown 9s linear forwards; }
@keyframes confirmWindowCountdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .action-confirm-timer { animation: none; } }
button.confirm-pending { border-color: var(--st-pack); background: var(--st-pack); color: var(--on-accent); }
/* DS-WAVE-DETAIL-B: quiet utility row used during active picking to host
   the autosave hook and the problem disclosure without competing with the
   active product/slot pick card above. Hooks `data-pick-checklist-save-state`
   and `picking-problem-disclosure` stay functional. */
.checklist-save-state { display: none; }
/* Закритий стан — компактний тихий тогл (не банер на всю ширину), відкритий — повна панель форми */
#waveProblemNoteWrap { display: grid; gap: var(--space-1-5); padding: var(--space-3); border: 1px solid var(--st-pack-line); border-radius: var(--radius); background: var(--st-pack-bg); }

/* Page pattern: order details */
#orderDetailCard { display: grid; gap: var(--space-4); padding: 0; border: 0; background: transparent; }
#orderDetailCard.hidden { display: none !important; }
#orderDetailMeta { display: flex; flex-wrap: wrap; gap: var(--space-1-5) var(--space-3); align-items: center; font-size: var(--font-size-sm); }
.order-status-board, .order-meta-card, .order-actions-card, .order-issue-panel, .order-lines-shell, .order-history-timeline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.order-status-board { display: grid; gap: var(--space-3); padding: var(--space-4); border-color: var(--line-strong); }
.order-title-copy { display: grid; gap: var(--space-1-5); min-width: 0; }
.order-status-chips { display: flex; flex-wrap: wrap; gap: var(--space-1-5); align-items: center; justify-content: flex-end; margin-left: auto; }
.order-readiness-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, auto); gap: var(--space-3); align-items: center; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-tight); background: var(--state-hover-surface); }
.order-readiness-panel--ready { background: var(--bg); }
.order-readiness-panel--partial, .order-readiness-panel--shortage { background: var(--st-pack-bg); }
.order-readiness-panel--problem { background: var(--st-prob-bg); }
.order-readiness-copy { display: grid; gap: var(--space-1); }
.order-readiness-copy b { font-size: var(--font-size-xl); line-height: 1.15; }
.order-readiness-copy span { color: var(--ink-2); font-size: var(--font-size-sm); }
.order-readiness-owner { display: grid; justify-items: end; gap: var(--space-1); color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.order-readiness-owner b { color: var(--ink); font-family: var(--font-primary); font-size: var(--font-size-md); text-transform: none; }
.order-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--space-4); }
.order-meta-card, .order-actions-card { display: grid; gap: var(--space-3); padding: var(--space-4); }
.order-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-2); }
.order-summary-tile { min-height: 72px; display: grid; align-content: center; gap: var(--space-1-5); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-tight); background: var(--state-hover-surface); }
.order-summary-tile span { color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.order-summary-tile b { overflow: hidden; color: var(--ink); font-size: var(--font-size-2xl); line-height: 1; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.order-summary-tile small { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); }
.order-actions-card .route-link { width: 100%; min-height: var(--control-lg); }
.order-action-note { display: grid; gap: var(--space-1); color: var(--ink-3); font-size: var(--font-size-xs); }
.order-action-note b { color: var(--ink-2); }
.order-quiet-links { display: grid; gap: var(--space-2); }
.order-quiet-links .route-link { justify-content: flex-start; }
.order-issue-panel { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--st-pack-line); background: var(--st-pack-bg); }
.order-issue-panel.hidden { display: none !important; }
.order-issue-panel.problem { border-color: var(--st-prob-line); background: var(--st-prob-bg); }
.order-issue-head { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; }
.order-issue-head h3 { font-size: var(--font-size-xl); }
.order-issue-list { display: grid; gap: var(--space-2); }
.order-issue-item { display: grid; grid-template-columns: minmax(0,1fr) repeat(3, minmax(82px, auto)) minmax(180px, .8fr); gap: var(--space-3); align-items: center; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-tight); background: var(--surface-veil); }
.order-issue-item > div { display: grid; gap: var(--space-0-5); }
.order-issue-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-issue-item small { display: block; }
.order-issue-item span { color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.order-issue-item strong { color: var(--ink); font-size: var(--font-size-sm); font-weight: 650; }
.order-lines-shell, .order-history-timeline { display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-4); overflow: hidden; }
.order-section-head { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; justify-content: space-between; }
.order-section-head h2 { font-size: var(--font-size-lg); }
.order-lines-table { table-layout: fixed; }
.order-lines-table th:nth-child(1) { width: 31%; }
.order-lines-table th:nth-child(2) { width: 13%; }
.order-lines-table th:nth-child(3) { width: 10%; }
.order-lines-table th:nth-child(4) { width: 15%; }
.order-lines-table th:nth-child(5) { width: 15%; }
.order-lines-table th:nth-child(6) { width: 16%; }
.order-lines-table td { vertical-align: top; }
.order-line-product { display: grid; gap: var(--space-1); }
.order-line-product b { font-size: var(--font-size-md); line-height: 1.25; }
.order-line-product span { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); }
.order-line-state { min-height: var(--control-2xs); display: inline-flex; align-items: center; gap: var(--space-1-5); width: fit-content; padding: var(--space-1) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: var(--font-size-xs); font-weight: 650; }
.order-line-state::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.order-line-state.ready { border-color: var(--st-done-line); background: var(--st-done-bg); color: var(--st-done); }
.order-line-state.shortage { border-color: var(--st-pack-line); background: var(--st-pack-bg); color: var(--st-pack); }
/* no_location — заготовка незавершеного стану (orderLineReadiness поки його не повертає,
   але мітка no_location уже існує в orderLineStateBadge і stats.noLocationLines): лишаємо. */
.order-line-state.unknown, .order-line-state.no_location { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.order-line-qty b, .order-line-availability b { display: block; font-size: var(--font-size-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.order-line-qty span, .order-line-availability span { color: var(--ink-3); font-size: var(--font-size-xs); }
.order-stock-list, .order-location-list { color: var(--ink-2); font-size: var(--font-size-xs); line-height: 1.35; }
.order-stock-list .preferred { color: var(--ink); font-weight: 650; }
.order-empty-state { padding: var(--space-5) var(--space-3) !important; color: var(--ink-3); text-align: center; }
.order-history-timeline .tbl { table-layout: fixed; }
.order-history-timeline th:nth-child(1) { width: 150px; }
.order-history-timeline th:nth-child(2) { width: 34%; }
.order-history-timeline th:nth-child(3) { width: 170px; }
.order-history-timeline th:nth-child(4) { width: auto; }
.order-history-timeline tr.is-latest td { background: var(--accent-soft); }
.order-history-event { display: grid; gap: var(--space-1); }
.order-history-event b { font-size: var(--font-size-sm); }
.order-history-event span { color: var(--ink-3); font-size: var(--font-size-xs); }
body.queue-order-modal-open { overflow: hidden; }
.queue-order-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--space-8); }
.queue-order-modal.hidden { display: none !important; }
.queue-order-modal__backdrop { position: absolute; inset: 0; background: var(--backdrop); }
.queue-order-modal__panel { position: relative; width: min(1040px, 100%); max-height: min(820px, calc(100vh - 56px)); max-height: min(820px, calc(100dvh - 56px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: none; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-3); }
.queue-order-modal__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); align-items: start; padding: var(--space-5) var(--space-5) var(--space-4); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.queue-order-modal__head h2 { min-width: 0; margin: 0; font: var(--text-h2); overflow-wrap: anywhere; word-break: break-word; }
.queue-order-modal__close { width: 36px; min-width: 36px; min-height: var(--control-sm); padding: 0; border-color: var(--line-strong); background: var(--surface); color: var(--ink); font-size: var(--font-size-2xl); line-height: 1; }
.queue-order-modal__body { min-height: 0; display: grid; align-content: start; gap: var(--space-3); padding: var(--space-4) var(--space-5) calc(var(--space-8) + env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; scroll-padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.queue-order-modal__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.queue-order-modal__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-3); border-radius: var(--radius-control); background: var(--surface-2); }
.queue-order-modal__meta-item { min-height: var(--control-3xl); gap: var(--space-1); }
.queue-order-modal__notice, .queue-order-modal__empty { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-3); border: 1px solid var(--accent-line); border-radius: var(--radius-tight); background: var(--accent-soft); color: var(--accent-ink); }
.queue-order-modal__notice.bad { border-color: var(--st-prob-line); background: var(--st-prob-bg); color: var(--st-prob); }
.queue-order-modal__notice span, .queue-order-modal__empty span { color: var(--ink-3); font-size: var(--font-size-xs); }
.queue-order-modal__lines { display: grid; gap: var(--space-2); }
.queue-order-modal__line { display: grid; grid-template-columns: minmax(220px, 1.5fr) 112px minmax(98px, .5fr) minmax(170px, .9fr) minmax(170px, 1fr); gap: var(--space-2); align-items: center; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-tight); background: var(--surface); }
.queue-order-modal__line--shortage { border-color: var(--st-pack-line); background: var(--st-pack-bg); }
/* --no_location — та сама заготовка незавершеного стану, що й .order-line-state.no_location вище. */
.queue-order-modal__line--unknown { border-color: var(--accent-line); background: var(--accent-soft); }
.queue-order-modal__product { display: grid; gap: var(--space-0-5); min-width: 0; }
.queue-order-modal__product b { overflow: hidden; color: var(--ink); font-size: var(--font-size-sm); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.queue-order-modal__product span { color: var(--ink-3); font-family: var(--font-mono); font-size: var(--font-size-xs); }
.queue-order-modal__qty, .queue-order-modal__availability, .queue-order-modal__location { padding: 0 var(--space-0-5); }
.queue-order-modal__qty b, .queue-order-modal__availability b, .queue-order-modal__location b { font-size: var(--font-size-sm); font-weight: 750; line-height: 1.25; }
.queue-order-modal__qty b { font-size: var(--font-size-lg); }
.queue-order-modal__availability.bad b { color: var(--st-prob); }
.queue-order-modal__availability.warn b { color: var(--st-pack); }
.queue-order-modal__issue { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-1-5); align-items: center; margin-top: -1px; padding: var(--space-2) var(--space-2); border: 1px solid var(--st-pack-line); border-radius: var(--radius-tight); background: var(--surface-veil); color: var(--ink-2); font-size: var(--font-size-xs); line-height: 1.3; }
.queue-order-modal__issue b { color: var(--st-pack); font-size: var(--font-size-xs); }
.queue-order-modal__line--shortage .queue-order-modal__issue b { color: var(--st-prob); }
.queue-order-modal__stock { grid-column: 1 / -1; display: grid; gap: var(--space-1); padding: var(--space-1-5) var(--space-0-5) 0; border: none; border-top: 1px solid var(--line); background: transparent; }
.queue-order-modal__stock > span { color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.queue-order-modal__stock-rows { display: flex; flex-wrap: wrap; gap: var(--space-1-5) var(--space-3); }
.queue-order-modal__stock-rows > div { color: var(--ink-2); font-family: var(--font-mono); font-size: var(--font-size-xs); }
.queue-order-modal__stock-rows > div.preferred { color: var(--ink); font-weight: 700; }
.queue-order-modal__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); background: var(--surface-2); }
.queue-order-modal__reason { color: var(--ink-3); font-size: var(--font-size-sm); line-height: 1.3; }
.queue-order-modal__reason.is-disabled { color: var(--st-prob); font-weight: 650; }
#queueOrderModalTake { min-width: 180px; min-height: var(--control-2xl); padding: var(--space-3) var(--space-5); font-size: var(--font-size-md); }
#queueOrderModalTake:disabled { border-color: var(--line); background: var(--state-disabled-bg); color: var(--ink-3); opacity: 1; }
.not-found { min-height: 260px; display: grid; place-items: center; text-align: center; }
/* Responsive overrides */
@media (max-width: 1179px) {
  .order-detail-grid { grid-template-columns: minmax(0,1fr); }
  .lead-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .order-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .order-issue-item { grid-template-columns: minmax(0,1fr) repeat(3, minmax(78px, auto)); }
  .order-issue-item .order-next-action { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .wms-app-shell, .app { grid-template-columns: 1fr; }
  .wms-sidebar, .sidebar { position: static; height: auto; gap: var(--space-2); padding: var(--space-3) var(--space-3); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { grid-template-columns: 26px minmax(0, 1fr); gap: var(--space-2); padding: 0; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-title { font-size: var(--font-size-md); line-height: 1.05; }
  .brand-version { display: none; }
  .app-nav { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-1-5); }
  .nav-section { display: contents; }
  .sidebar-spacer, .nav-section-title { display: none; }
  .nav-item { min-height: var(--control-sm); gap: var(--space-2); padding: var(--space-2) var(--space-2); font-size: var(--font-size-sm); white-space: nowrap; }
  .nav-icon { font-size: var(--font-size-sm); }
  .worker-card { padding: var(--space-2) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius); }
  .worker-meta { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .worker-avatar { display: none; }
  .header-operator { gap: var(--space-0-5); font-size: var(--font-size-xs); }
  .worker-card .header-operator input { min-height: var(--control-sm); padding: var(--space-1-5) var(--space-2); border: 1px solid var(--line-strong); border-radius: var(--radius-tight); background: var(--surface); font-size: var(--font-size-sm); }
  .wms-topbar, .topbar { position: static; height: auto; min-height: var(--control-lg); flex-wrap: wrap; align-items: flex-start; justify-content: flex-start; gap: var(--space-1) var(--space-2); padding: var(--space-1-5) var(--space-3); }
  .route-breadcrumb { flex: 1 1 100%; min-width: 0; max-width: 100%; font-size: var(--font-size-xs); line-height: 1.25; white-space: nowrap; overflow-wrap: normal; }
  .topbar-right { flex: 1 1 100%; min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: var(--space-1-5) var(--space-2); font-size: var(--font-size-xs); line-height: 1.2; white-space: normal; }
  .runtime-banner { flex: 0 1 auto; min-width: 0; min-height: var(--control-2xs); padding: var(--space-0-5) var(--space-1-5); font-size: var(--font-size-xs); white-space: normal; overflow-wrap: anywhere; }
  .topbar-updated { display: none; }
  .wms-pagebody, .pagebody { padding: var(--space-3) var(--space-3) var(--space-8); }
  #exactPickClaim { order: 2; }
  #queueTabPanelPick { order: 3; }
  #pickFilterDetails { order: 3; }
  #queueBoard { order: 5; }
  .toast-layer { right: 10px; left: 10px; top: 10px; bottom: auto; width: auto; }
  .queue-controls { grid-template-columns: minmax(0,1fr); }
  #primaryWorkWell { grid-template-columns: minmax(0,1fr); }
  .my-work-actions { flex-direction: column; align-items: stretch; }
  .packing-card-head, .packing-action-row { flex-direction: column; align-items: stretch; }
  #primaryWorkAction, .packing-action-row button { width: 100%; }
  .lead-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .order-readiness-panel, .order-summary-grid, .order-issue-item { grid-template-columns: minmax(0,1fr); }
  .order-readiness-owner { justify-items: start; }
  .queue-order-modal { padding: var(--space-3); }
  .queue-order-modal__panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .queue-order-modal__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-order-modal__line { grid-template-columns: minmax(0, 1fr) minmax(108px, auto); }
  .queue-order-modal__product, .queue-order-modal__location { grid-column: 1 / -1; }
  .product-media--current { grid-template-columns: 92px minmax(0, 1fr); }
  .product-media--current .product-media__thumb { width: 92px; height: 92px; }
  .product-media--current .product-media__link { font-size: var(--font-size-2xl); }
  .topbar-right .header-copy { display: none; }
}
@media (max-width: 700px) {
  .product-media--modal, .product-media--card { grid-template-columns: 52px minmax(0, 1fr); }
  .product-media--modal .product-media__thumb, .product-media--card .product-media__thumb { width: 52px; height: 52px; }
  .product-media--current { grid-template-columns: minmax(0, 1fr); }
  .product-media--current .product-media__thumb { width: min(112px, 100%); height: auto; aspect-ratio: 1; justify-self: start; }
  .queue-order-modal__head, .queue-order-modal__foot, .queue-order-modal__meta { grid-template-columns: minmax(0, 1fr); }
  .queue-order-modal__body { padding: var(--space-4) var(--space-4) calc(var(--space-10) + env(safe-area-inset-bottom)); }
  .queue-order-modal__foot { padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); }
  .queue-order-modal__close { position: absolute; top: 12px; right: 12px; }
  .queue-order-modal__head { padding-right: var(--space-16); }
  #queueOrderModalTake { width: 100%; }
  .paper-claim { grid-template-columns: minmax(0, 1fr); padding: var(--space-4); }
  .paper-claim__entry { grid-template-columns: minmax(0, 1fr); }
  .paper-claim__entry button { width: 100%; }
  .paper-feedback-row { grid-template-columns: minmax(0, 1fr); }
  .paper-claim__action { justify-content: stretch; }
  .paper-claim__action label, #exactOrderClaim { width: 100%; }
}
.operator-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: var(--space-5); align-items: center; margin: var(--space-4) 0; padding: var(--space-5); border: 1px solid var(--accent-line); border-radius: var(--radius-control); background: var(--accent-soft); box-shadow: var(--shadow-1); }
.operator-step[hidden] { display: none; }
.operator-step h2 { margin: 0 0 var(--space-1-5); font-size: clamp(var(--font-size-3xl), 2.2vw, var(--font-size-5xl)); line-height: 1.1; letter-spacing: 0; }
.operator-step p { margin: 0; color: var(--ink-3); font-size: var(--font-size-md); line-height: 1.45; }
.operator-step label { display: grid; gap: var(--space-2); color: var(--ink-2); font-weight: 700; }
.operator-step input { width: 100%; min-height: var(--control-2xl); padding: var(--space-3) var(--space-4); border: 1px solid var(--accent-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-size: var(--font-size-2xl); font-weight: 700; }
@media (max-width: 880px){.operator-step{grid-template-columns:minmax(0,1fr);padding:var(--space-4)}}
/* Auth gate: full-screen login / change-password view (shown only when WMS_AUTH_ENABLED) */
.auth-gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--space-6) var(--space-4); background: var(--bg); overflow: auto; }
body.auth-gate-active .wms-app-shell { display: none; }
.auth-card { width: min(380px, 100%); display: grid; gap: var(--space-4); padding: var(--space-8) var(--space-6) var(--space-6); border: none; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-2); }
.auth-card .brand { padding: 0; }
.auth-brand-sub { margin-top: var(--space-1); color: var(--ink-3); font-size: var(--font-size-xs); line-height: 1.2; }
.auth-form { display: grid; gap: var(--space-3); }
.auth-form label { display: grid; gap: var(--space-1-5); color: var(--ink-2); font-size: var(--font-size-xs); font-weight: 650; }
.auth-title { margin: 0; font: var(--text-h2); }
.auth-sub { margin: 0; color: var(--ink-3); font-size: var(--font-size-sm); line-height: 1.45; }
.auth-error { padding: var(--space-2) var(--space-3); border: 1px solid var(--st-prob-line); border-radius: var(--radius-tight); background: var(--st-prob-bg); color: var(--st-prob); font-size: var(--font-size-sm); line-height: 1.4; }
.auth-error[hidden] { display: none; }
.auth-submit { min-height: var(--control-lg); }
.auth-user-line { padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-tight); background: var(--surface-2); color: var(--ink-2); font-size: var(--font-size-xs); line-height: 1.4; overflow-wrap: anywhere; }
.auth-identity { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.auth-identity-role { color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.auth-logout { min-height: var(--control-sm); padding: var(--space-1) var(--space-3); font-size: var(--font-size-xs); }
/* ===== Worker-flow v2: черга + друк + збірка (ітерація 1) ===== */
.print-menu { position: relative; display: inline-block; }
.print-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-sm); padding: var(--space-1-5) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink-2); font-size: var(--font-size-xs); }
.print-menu > summary::-webkit-details-marker { display: none; }
.print-menu[open] > summary { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.print-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: grid; gap: var(--space-1); min-width: 190px; padding: var(--space-1-5); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-control); box-shadow: var(--shadow-2); }
.print-menu__list button { justify-content: flex-start; text-align: left; background: var(--surface); border: 1px solid transparent; color: var(--ink-2); min-height: var(--control-lg); width: 100%; }
.print-menu__list button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-ink); }
.station-picker__panel { width: min(680px, calc(100vw - 32px)); }
.station-picker-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); max-height: 50vh; overflow: auto; }
.station-tile { min-height: var(--control-3xl); font-size: var(--font-size-lg); font-weight: 600; border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--surface-2); color: var(--ink); padding: var(--space-3); }
.station-tile:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.confirm-modal__text { white-space: pre-line; }
.pack-wait-list { display: grid; gap: var(--space-3); }
.pick-active { display: grid; gap: var(--space-4); max-width: 980px; }
.pick-active-head { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.pick-active-head__row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; }
.pick-active-head h1 { min-width: 0; margin: 0; font-size: var(--font-size-2xl); overflow-wrap: anywhere; word-break: break-word; }
.pick-active-hint { margin: 0; color: var(--ink-2); font: var(--text-body); }
.pick-active-order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); overflow: visible; }
.pick-active-order__head { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: var(--radius-card) var(--radius-card) 0 0; }
.pick-active-order__head b { min-width: 0; max-width: 100%; font-size: var(--font-size-lg); overflow-wrap: anywhere; word-break: break-word; }
.pick-active-order__title { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; min-width: 0; }
.pick-active-order__items { display: grid; }
.pick-active-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); background: var(--surface); border-top: 1px solid var(--line); }
.pick-active-item:first-child { border-top: 0; }
.pick-active-item.done { background: var(--st-done-bg); }
.pick-active-item.short { background: var(--st-pack-bg); }
.pick-active-item__name { font-size: var(--font-size-lg); font-weight: 600; color: var(--ink); }
.pick-active-item__qty { font-size: var(--font-size-sm); color: var(--ink-3); }
.pick-active-item__actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pick-active-item__actions button { min-height: var(--control-xl); min-width: 110px; }
.pick-active-item__photo { width: 64px; height: 64px; border-radius: var(--radius-control); overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.pick-active-item__photo img { width: 100%; height: 100%; object-fit: contain; }
.pick-active-shortage-edit { grid-column: 1 / -1; display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; padding-top: var(--space-2); border-top: 1px dashed var(--line); }
.pick-active-shortage-edit input { width: 90px; min-height: var(--control-lg); text-align: center; font-size: var(--font-size-lg); border: 1px solid var(--line-strong); border-radius: var(--radius-control); }
.pick-active-footer { position: sticky; bottom: 8px; z-index: 20; display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; flex-wrap: wrap; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-card); box-shadow: var(--shadow-2); }
.pick-active-footer .pa-finish { min-height: var(--control-2xl); min-width: 220px; font-size: var(--font-size-lg); }
.pick-active-done { display: grid; gap: var(--space-4); justify-items: center; text-align: center; padding: var(--space-12) var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.pick-active-done h1 { margin: 0; font-size: var(--font-size-3xl); }
.pick-active-done .pa-claim-next { min-height: var(--control-2xl); min-width: 240px; font-size: var(--font-size-lg); }
/* ===== Worker-flow v2: пакування (ітерація 2, E3) — реюз pick-active* ===== */
.pack-active-order__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: var(--font-size-sm); color: var(--ink-3); }
/* «Наліпка MyPrint» (N4): нагадування пакувальнику на картці замовлення. */
.pack-active-order__sticker { margin: 0; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--font-size-sm); font-weight: 650; overflow-wrap: anywhere; }
.pack-active-return { padding: var(--space-3) var(--space-4); border-top: 1px dashed var(--line); display: grid; gap: var(--space-2); justify-items: start; }
.pack-active-return-edit { display: grid; gap: var(--space-2); width: 100%; }
.pack-active-return-edit textarea { width: 100%; min-height: var(--control-2xl); padding: var(--space-2) var(--space-3); font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius-control); }
.pack-active-return-edit__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.pack-active-return-edit__head button { min-height: var(--control-lg); }
.pick-active-footer--problem { justify-content: flex-end; }
.pick-active-footer--problem > button { min-height: var(--control-2xl); font-size: var(--font-size-lg); }
/* Швидкі причини «Проблеми» (задача 4080): на комп'ютері — один рядок із переносом, на телефоні — дві колонки. */
.problem-reasons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.problem-reasons .problem-reason { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.problem-reasons .problem-reason[aria-pressed="true"] { border-color: var(--st-prob); background: var(--st-prob-bg); color: var(--st-prob); font-weight: 700; }
/* ===== WF3 hardening (WMS-01): чесний фініш пакування ===== */
/* ===== Worker-flow v2: паспорт + моя робота + контроль дня (ітерація 3, E4/E5/E6) ===== */
.wave-passport-sub { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; color: var(--ink-2); font-size: var(--font-size-md); }
.wave-passport-ttn { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.wave-passport-tracker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.wave-passport-step { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.wave-passport-step b { font-size: var(--font-size-sm); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.wave-passport-step span { font-size: var(--font-size-md); color: var(--ink); }
.wave-passport-step.is-done { border-color: var(--st-done-line); background: var(--st-done-bg); }
.wave-passport-step.is-done b { color: var(--st-done); }
.wave-passport-step.is-wait { border-color: var(--st-pack-line); background: var(--st-pack-bg); }
.wave-passport-step.is-wait b { color: var(--st-pack); }
.wave-passport-step.is-warn { border-color: var(--st-prob-line); background: var(--st-prob-bg); }
.wave-passport-step.is-warn b { color: var(--st-prob); }
.wave-passport-step.is-pending span { color: var(--ink-3); }
.wave-passport-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.wave-passport-actions .pa-finish { min-height: var(--control-2xl); min-width: 240px; font-size: var(--font-size-lg); }
details.wave-recovery { display: block; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); }
.wave-recovery summary { cursor: pointer; font-weight: 650; }
.wave-recovery label { display: block; margin: var(--space-3) 0; }
.wave-recovery select, .wave-recovery textarea { display: block; width: 100%; max-width: 640px; margin-top: var(--space-1-5); }
.wave-recovery button { white-space: normal; }
.checklist-conflict-panel { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 90; width: min(720px, 94vw); padding: var(--space-4); background: var(--surface); border: 2px solid var(--st-pack); border-radius: var(--radius); box-shadow: var(--shadow-3); }
.print-desk { display: grid; gap: var(--space-5); }
.print-desk[hidden] { display: none; }
.print-desk h2 { margin: 0; font-size: var(--font-size-xl); }
.print-desk p { margin: var(--space-1-5) 0; }
.print-preparation-head, .print-preparation-actions, .print-desk-toolbar, .print-desk-pager, .print-recording-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.print-preparation-actions button { white-space: normal; }
.print-desk-toolbar { justify-content: space-between; }
.print-desk-pager { justify-content: space-between; }
.print-recording-notice { padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--st-pack-line); background: var(--st-pack-bg); }
.print-recording-notice[hidden] { display: none; }
.print-recording-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); font-size: var(--font-size-sm); }
.print-recording-row > div { min-width: 0; overflow-wrap: anywhere; }
.print-recording-row p { margin: var(--space-1-5) 0; }
@media (max-width: 880px) { .topbar-right { max-width: 100%; } .print-recording-row { display: grid; } .print-recording-notice { padding: var(--space-3); } }
.wave-passport-composition, .wave-passport-docs, .wave-passport-history { display: grid; gap: var(--space-3); }
.wave-passport-line { display: flex; gap: var(--space-3); align-items: baseline; justify-content: space-between; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.wave-passport-line:first-child { border-top: 0; }
.wave-passport-line.short { background: var(--st-pack-bg); }
.wave-passport-line b { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Довгі назви з каталогу переносяться, а не виштовхують кількість за край (N6, K-2). */
.wave-passport-line > span { min-width: 0; overflow-wrap: anywhere; }
html.phone-mode .wave-passport-line { flex-direction: column; align-items: stretch; gap: var(--space-1); padding: var(--space-2) var(--space-3); font-size: var(--font-size-lg); }
html.phone-mode .wave-passport-line b { white-space: normal; }
.wave-passport-docs { padding: var(--space-4) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.wave-passport-doc { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; font-size: var(--font-size-md); }
.wave-passport-doc-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.wave-passport-doc-actions button { min-height: var(--control-xl); }
.wave-passport-history { padding: var(--space-4) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.wave-passport-event { display: flex; gap: var(--space-3); align-items: baseline; font-size: var(--font-size-md); }
.wave-passport-event time { flex: 0 0 auto; min-width: 84px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.my-work-now-card { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.my-work-now-card.problem { border-color: var(--st-prob-line); background: var(--st-prob-bg); }
.my-work-now-copy { display: grid; gap: var(--space-1); min-width: 0; }
.my-work-now-copy b { font-size: var(--font-size-lg); }
.my-work-now-card .my-work-actions button { min-height: var(--control-xl); min-width: 180px; }
#myWorkNow { display: grid; gap: var(--space-3); }
.lead-now-row { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
.lead-now-row.problem { border-color: var(--st-prob-line); background: var(--st-prob-bg); }
.lead-delay-row { grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto; }
#leadNow, #leadDelays { display: grid; gap: var(--space-2); }
#leadNow .lead-compact-empty, #leadDelays .lead-compact-empty, #leadShipping .lead-compact-empty, .ship-list .lead-compact-empty { display: grid; gap: var(--space-1); justify-items: start; }
@media (max-width: 700px) {
  .pick-active-item { grid-template-columns: 48px minmax(0, 1fr); }
  .pick-active-item__actions { grid-column: 1 / -1; justify-content: stretch; }
  .pick-active-item__actions button { flex: 1; }
  .wave-passport-tracker { grid-template-columns: minmax(0, 1fr); }
  .lead-now-row { grid-template-columns: minmax(0, 1fr); }
}
#printRoot{display:none}
@page{margin:14mm}
@media print{
  body>*:not(#printRoot){display:none!important}
  #printRoot{display:block}
  .inv{break-before:page;page-break-before:always;color:#000;font-family:Arial,sans-serif}
  .inv:first-child{break-before:auto;page-break-before:auto}
  /* Великий номер і QR — у правому верхньому куті першої сторінки; короткі рядки шапки
     (завдання, заголовок, ТТН, телефон) стоять ліворуч, довгий рядок «Дата · Склад · Клієнт» — під QR
     на повну ширину. Тож шапка з ТТН і телефоном не стає вищою; без ТТН вона нижча за QR і росте
     на неминучі ~5 мм. Символ QR 33 модулі = 25 мм (модуль ~0,76 мм). Біле поле ≥ 4 модулі (3,1 мм):
     зверху й справа — поля сторінки 14 мм, зліва — відступ від номера, знизу — текст або
     відступ до таблиці (inv-code--short, коли ТТН немає). */
  .inv-code{float:right;display:flex;align-items:flex-start;gap:3.2mm;margin:0 0 1mm 3.2mm;break-inside:avoid}
  .inv-code--short{margin-bottom:3.2mm}
  .inv-number{font-size:22pt;font-weight:700;line-height:1;white-space:nowrap}
  .inv-qr{display:block;width:25mm;height:25mm}
  .inv table{clear:right}
  .inv-h{font-size:18pt;font-weight:700;margin:0 0 4pt}
  .inv-meta{font-size:11pt;margin:0 0 10pt;line-height:1.5}
  .inv table{width:100%;border-collapse:collapse;margin-top:6pt}
  .inv th,.inv td{border:1px solid #000;padding:5px 8px;text-align:left;font-size:11pt}
  .inv th{background:#eee}
  .inv .num{text-align:center;width:36pt}
  .inv .photo{width:120pt;text-align:center;vertical-align:middle}
  .inv-photo{display:block;margin:0 auto;max-width:112pt;max-height:112pt;width:auto;height:auto;object-fit:contain;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .inv .qty{text-align:right;width:80pt;white-space:nowrap}
  .inv .price,.inv .sum{text-align:right;width:64pt;white-space:nowrap}
  .inv-ttn{font-size:15pt;font-weight:700;margin:0 0 6pt}
  .inv-grand{margin-top:4pt;font-size:12pt;font-weight:700}
  .inv-total{margin-top:8pt;font-size:11pt;font-weight:700}
  .inv-sign{margin-top:28pt;display:flex;justify-content:space-between;font-size:11pt}
}

/* Сторінка коду замовлення /o/<ID> (задача 4057): одна картка, одна головна дія.
   На телефоні — правила мобільного режиму: головна дія на всю ширину 64 px, текст 16 px. */
.order-code-page { width: min(640px, 100%); margin: 0 auto; display: grid; gap: var(--space-4); }
.order-code-card { display: grid; gap: var(--space-4); padding: var(--space-6); }
.order-code-card__head { display: grid; gap: var(--space-2); justify-items: start; }
.order-code-number { margin: 0; font: var(--text-h1); font-variant-numeric: tabular-nums; }
.order-code-title { margin: 0; font: var(--text-h2); }
.order-code-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3) var(--space-4); margin: 0; }
.order-code-facts div { display: grid; gap: var(--space-1); min-width: 0; }
.order-code-facts dt { color: var(--ink-3); font: var(--text-section-label); letter-spacing: .06em; text-transform: uppercase; }
.order-code-facts dd { margin: 0; font-size: var(--font-size-lg); overflow-wrap: anywhere; }
.order-code-status { margin: 0; font-size: var(--font-size-lg); line-height: 1.45; }
.order-code-next { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.order-code-primary { min-height: var(--control-2xl); font-size: var(--font-size-lg); }
.order-code-choices { display: grid; gap: var(--space-3); }
.order-code-choice { display: grid; gap: var(--space-1); justify-items: start; padding: var(--space-4); color: inherit; text-decoration: none; font-size: var(--font-size-lg); }
.order-code-public__site { display: inline-flex; align-items: center; min-height: var(--control-lg); justify-self: start; }
.order-code-public__login { justify-self: start; }
@media (max-width: 700px) {
  .order-code-card { padding: var(--space-4); }
  .order-code-next { display: grid; }
  .order-code-next > * { min-height: var(--control-xl); }
  .order-code-next > .order-code-primary { width: 100%; min-height: var(--control-3xl); }
}

/* ===== Мобільний режим ≤700 px (задача 4057, M2; DESIGN_SYSTEM «Мобільний режим») =====
   Вмикає app.js: html.phone-mode, коли (max-width: 700px) — той самий перемикач будує й розмітку
   робочих екранів. Десктоп ці правила не зачіпають. Значення — лише токени шкали. */
.nav-item.nav-item--phone, .workspace-filters-toggle { display: none; }
.pick-active-meta { margin: 0; color: var(--ink-3); font: var(--text-body); }
.print-menu--up .print-menu__list { top: auto; bottom: calc(100% + var(--space-1)); left: 0; right: auto; }
.print-menu__list a { display: flex; align-items: center; justify-content: flex-start; min-height: var(--control-lg); padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); color: var(--ink-2); text-decoration: none; }
.print-menu__list a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.pack-order-group__check { margin: 0; color: var(--ink-2); }

/* Поля, кнопки й текст: поле < 16 px змушує iPhone збільшувати сторінку; палець — ≥ 48 px. */
html.phone-mode body { font-size: var(--font-size-lg); }
html.phone-mode input:not([type=checkbox]):not([type=radio]), html.phone-mode select, html.phone-mode textarea { min-height: var(--control-xl); font-size: var(--font-size-lg); }
html.phone-mode textarea { min-height: var(--control-xl); }
html.phone-mode button, html.phone-mode .route-link, html.phone-mode summary { min-height: var(--control-xl); font-size: var(--font-size-lg); }
html.phone-mode .toast { font-size: var(--font-size-lg); }
html.phone-mode .toast .toast-close { min-width: var(--control-xl); min-height: var(--control-xl); }

/* Шапка — один рядок «хто я + Вийти»; під нею одна смуга навігації з етапами. */
html.phone-mode .sidebar { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-2) var(--space-3); }
html.phone-mode .sidebar .brand { display: none; }
html.phone-mode .sidebar .worker-card { grid-column: 1; grid-row: 1; padding: 0; border: 0; gap: 0 var(--space-3); align-items: center; }
html.phone-mode .sidebar .worker-card:has(.auth-identity:not(.hidden)) .header-operator input { min-height: var(--control-xl); font-size: var(--font-size-xl); font-weight: 700; }
html.phone-mode .sidebar .auth-identity-role { display: none; }
html.phone-mode .sidebar .auth-logout { min-height: var(--control-xl); padding: 0 var(--space-4); font-size: var(--font-size-lg); }
html.phone-mode .sidebar .app-nav-wrap { grid-column: 1 / -1; }
html.phone-mode .sidebar .app-nav { gap: var(--space-2); }
html.phone-mode .sidebar .nav-item { min-height: var(--control-xl); display: flex; gap: var(--space-1-5); padding: var(--space-2) var(--space-3); font-size: var(--font-size-lg); }
html.phone-mode .sidebar .nav-icon { display: none; }
html.phone-mode .sidebar .nav-item[data-nav-route="queue"] { display: none; }
html.phone-mode .nav-count { font: 650 var(--font-size-lg)/1.2 var(--font-mono); color: var(--ink-3); }
html.phone-mode .nav-item.active .nav-count { color: var(--accent-ink); }
html.phone-mode .topbar { display: none; }
html.phone-mode .topbar:has(.runtime-banner.stale, .runtime-banner.warn) { display: flex; }
html.phone-mode .topbar .route-breadcrumb, html.phone-mode .topbar .topbar-updated, html.phone-mode .topbar .header-copy { display: none; }
html.phone-mode .topbar .topbar-right, html.phone-mode .topbar .runtime-banner { font-size: var(--font-size-lg); }
html.phone-mode .station-context { font-size: var(--font-size-lg); }
html.phone-mode .station-context button { min-height: var(--control-xl); }

/* Етапи — у смузі навігації; дата, пошук і готовність — за однією кнопкою з назвою чинного періоду. */
html.phone-mode .order-workspace .workspace-stages { display: none; }
html.phone-mode .workspace-filters-toggle { display: flex; width: 100%; min-height: var(--control-xl); justify-content: space-between; padding: var(--space-2) var(--space-3); border-color: var(--line-strong); background: var(--surface); color: var(--ink); font-size: var(--font-size-lg); }
html.phone-mode .workspace-filters-toggle::after { content: '▾'; color: var(--ink-3); }
html.phone-mode .workspace-filters-toggle[aria-expanded="true"]::after { content: '▴'; }
html.phone-mode .workspace-filters-toggle.is-filtered { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
html.phone-mode #orderWorkspace:not([data-filters-open="true"]) .workspace-filters { display: none; }
html.phone-mode #orderWorkspace:not([data-filters-open="true"]) ~ #pageQueue #pickFilterDetails { display: none; }
html.phone-mode .order-workspace .workspace-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
html.phone-mode .order-workspace .workspace-date, html.phone-mode .order-workspace .workspace-search { gap: var(--space-1); font-size: var(--font-size-md); }
html.phone-mode .order-workspace .workspace-date input, html.phone-mode .order-workspace .workspace-search input { width: 100%; }
html.phone-mode .wms-filter-group { gap: var(--space-2); }
html.phone-mode .wms-filter-group > button { min-height: var(--control-xl); padding: var(--space-2) var(--space-3); font-size: var(--font-size-lg); }
html.phone-mode .print-preparation { height: auto; grid-template-rows: none; }
html.phone-mode .wms-filter-group > button > b { font-size: var(--font-size-md); }

/* Черга збірки: поле номера, кошик і «Взяти вибрані» в липкому низу, коли щось вибрано. */
html.phone-mode #primaryWorkWell { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-3); }
html.phone-mode #primaryWorkTitle { font-size: var(--font-size-xl); }
html.phone-mode #primaryWorkHint { font-size: var(--font-size-md); }
html.phone-mode #primaryWorkAction { width: 100%; min-height: var(--control-3xl); font-size: var(--font-size-lg); }
html.phone-mode .paper-claim { position: static; height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: var(--space-2); padding: var(--space-3); }
html.phone-mode .paper-claim > * { grid-row: auto; grid-column: auto; }
html.phone-mode .paper-claim > .paper-claim__feedback { order: 1; }
html.phone-mode .paper-claim > .paper-basket, html.phone-mode .paper-claim > .paper-claim__action { order: 2; }
html.phone-mode .paper-claim .paper-claim__copy { display: grid; gap: var(--space-1); }
html.phone-mode .paper-claim .paper-claim__copy h2 { margin: 0; font-size: var(--font-size-xl); }
html.phone-mode .paper-claim .paper-claim__copy p { font-size: var(--font-size-lg); }
html.phone-mode .paper-claim .paper-claim__entry { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
html.phone-mode .paper-claim .paper-claim__entry label { font-size: var(--font-size-lg); }
html.phone-mode .paper-claim .paper-claim__entry textarea { height: var(--control-xl); min-height: var(--control-xl); padding: var(--space-2) var(--space-3); font-size: var(--font-size-lg); }
html.phone-mode .paper-claim .paper-claim__entry button { width: auto; height: var(--control-xl); min-height: var(--control-xl); padding: 0 var(--space-4); font-size: var(--font-size-lg); }
html.phone-mode .paper-claim .paper-claim__feedback { max-height: none; overflow: visible; font-size: var(--font-size-lg); line-height: 1.35; }
/* Помилковий номер (N6, U-11): номер окремим рядком, пояснення під ним на всю ширину — довгі номери й ТТН не налазять на текст. */
html.phone-mode .paper-claim .paper-feedback-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-0-5); padding: var(--space-1) 0; }
html.phone-mode .paper-claim .paper-feedback-row > b { font-family: var(--font-mono); font-size: var(--font-size-xl); overflow-wrap: anywhere; }
html.phone-mode .paper-claim .paper-basket .workspace-details > summary { display: flex; align-items: center; min-height: var(--control-xl); width: auto; font-size: var(--font-size-lg); white-space: normal; }
html.phone-mode .paper-claim .paper-basket .workspace-detail-popover { position: static; width: auto; max-height: none; margin-top: var(--space-2); padding: var(--space-2); box-shadow: none; }
html.phone-mode .paper-claim .paper-basket-item { align-items: center; padding: var(--space-1) var(--space-2); font-size: var(--font-size-lg); }
html.phone-mode .paper-claim .paper-basket-item button { min-width: var(--control-xl); min-height: var(--control-xl); }
html.phone-mode .paper-claim .paper-basket-item__reason { font-size: var(--font-size-md); }
html.phone-mode .paper-claim .paper-claim__action { display: none; }
html.phone-mode .paper-claim[data-basket-count]:not([data-basket-count="0"]) .paper-claim__action { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: stretch; gap: var(--space-2); padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-2); }
html.phone-mode .paper-claim .paper-claim__action #exactOrderClaim { flex: 1 1 auto; width: auto; min-width: 0; min-height: var(--control-3xl); padding: 0 var(--space-4); font-size: var(--font-size-lg); }
html.phone-mode .paper-claim .paper-claim__action #takeAssigneeWrap { width: 40%; flex: 0 0 40%; font-size: var(--font-size-md); line-height: 1.2; gap: var(--space-0-5); }
html.phone-mode .paper-claim .paper-claim__action #takeAssignee { width: 100%; min-height: var(--control-xl); font-size: var(--font-size-lg); }
html.phone-mode body:has(#pageQueue.active .paper-claim[data-basket-count]:not([data-basket-count="0"])) .pagebody { padding-bottom: calc(var(--control-3xl) + var(--space-10)); }
html.phone-mode #pickSummary, html.phone-mode #packQueueSummary { min-height: 0; font-size: var(--font-size-lg); }
html.phone-mode #pickQueue .order-list-header { display: none; }

/* Рядок замовлення ≤ 88 px: номер і час, клієнт, обсяг. Вибір — тапом по всьому рядку. */
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row { position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; min-height: 0; gap: var(--space-0-5); padding: var(--space-2) var(--space-3); font-size: var(--font-size-lg); }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row > span:empty { display: none; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row > div { padding: 0; gap: 0; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .order-identity { grid-column: 1; grid-row: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row :is(.order-customer-cell, .order-volume) { grid-column: 1; grid-row: auto; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .order-volume { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); }
/* Номер-кнопка в рядку (Друк, сторінки замовлень) — ціль під палець ≥ 44 px (N6, K-5); у чергах збірки й пакування ціль — увесь рядок. */
html.phone-mode .order-row .queue-order-link { min-height: var(--control-lg); }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .queue-order-link { min-height: 0; padding: 0; border: 0; background: none; color: var(--ink); font-size: var(--font-size-2xl); font-weight: 700; line-height: 1.2; pointer-events: none; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .order-meta { color: var(--ink-3); font-size: var(--font-size-lg); line-height: 1.2; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .order-customer { display: -webkit-box; overflow: hidden; font-weight: 600; line-height: 1.3; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .order-volume { line-height: 1.3; }
html.phone-mode :is(#pickQueue, .pack-order-group) .order-row .order-warning { font-size: var(--font-size-md); }
html.phone-mode #pickQueue .order-row .wms-status-chip[data-macro-status="queued"], html.phone-mode .pack-order-group .order-row .wms-status-chip { display: none; }
html.phone-mode #pickQueue .order-row .wms-status-chip { font-size: var(--font-size-md); }
html.phone-mode #pickQueue .order-row { padding-right: calc(var(--control-xs) + var(--space-6)); }
html.phone-mode #pickQueue .order-row .queue-select { position: absolute; inset: 0; z-index: 1; display: block; width: auto; min-height: 0; padding: 0; cursor: pointer; }
html.phone-mode #pickQueue .order-row .queue-select input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
html.phone-mode #pickQueue .order-row .queue-select::after { content: ''; position: absolute; top: 50%; right: var(--space-3); box-sizing: border-box; width: var(--control-xs); height: var(--control-xs); transform: translateY(-50%); border: 2px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); }
html.phone-mode #pickQueue .order-row.selected .queue-select::after { content: '✓'; display: grid; place-items: center; border-color: var(--accent); background: var(--accent); color: var(--on-accent); font: 700 var(--font-size-lg)/1 var(--font-primary); }
html.phone-mode #pickQueue .order-row .queue-select:has(input:disabled) { cursor: default; }
html.phone-mode #pickQueue .order-row .queue-select:has(input:disabled)::after { display: none; }
html.phone-mode #pickQueue .order-row .queue-select:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Черга пакування: набір — картка з однією великою кнопкою «Взяти в пакування». */
html.phone-mode #packQueueCards .status-group h3 { font-size: var(--font-size-lg); letter-spacing: 0; text-transform: none; }
html.phone-mode .wms-status-chip { font-size: var(--font-size-md); }
html.phone-mode .wms-status-chip > .wms-status-icon { font-size: var(--font-size-md); }
html.phone-mode .pack-order-group { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
html.phone-mode .pack-order-group > header { padding: 0; color: var(--ink); font-size: var(--font-size-lg); font-weight: 650; }
html.phone-mode .pack-order-group > .order-list { border-radius: var(--radius-control); }
html.phone-mode .pack-order-group__numbers { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; list-style: none; color: var(--ink); font: 700 var(--font-size-2xl)/1.25 var(--font-mono); }
html.phone-mode .pack-order-group > .warn { margin: 0; }
html.phone-mode .pack-order-group > button { width: 100%; min-height: var(--control-2xl); }
html.phone-mode .packing-card-title span, html.phone-mode .packing-meta-grid { font-size: var(--font-size-md); }
html.phone-mode .packing-action-row button { min-height: var(--control-xl); }
html.phone-mode .checking-note { font-size: var(--font-size-md); letter-spacing: 0; text-transform: none; }

/* Збираю / Пакую: короткий заголовок, великі товари, липкий низ — головна дія 64 px і «⋯». */
html.phone-mode .pick-active { gap: var(--space-3); }
html.phone-mode .pick-active-head { gap: var(--space-1-5); padding: var(--space-3); }
html.phone-mode .pick-active-head__row { flex-wrap: nowrap; align-items: flex-start; gap: var(--space-2); }
html.phone-mode .pick-active-head h1 { flex: 1 1 auto; font-size: var(--font-size-2xl); }
html.phone-mode .pick-active-meta, html.phone-mode .pick-active-hint { font-size: var(--font-size-lg); }
html.phone-mode .pick-active-head__row > .pick-active-meta { flex: 1 1 auto; min-width: 0; align-self: center; }
html.phone-mode .pick-active-head .print-menu > summary { padding: 0 var(--space-3); }
html.phone-mode .print-menu__list { min-width: 240px; gap: var(--space-2); }
html.phone-mode .print-menu__list button, html.phone-mode .print-menu__list a { min-height: var(--control-3xl); font-size: var(--font-size-lg); }
html.phone-mode .pick-active-order__head { padding: var(--space-2) var(--space-3); }
html.phone-mode .pick-active-order__head b { font-size: var(--font-size-2xl); }
html.phone-mode .pick-active-order__title { gap: 0 var(--space-3); }
html.phone-mode .pick-active-order__title .muted, html.phone-mode .pack-active-order__meta, html.phone-mode .pack-active-order__sticker { font-size: var(--font-size-lg); }
html.phone-mode .pick-active-item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); }
html.phone-mode .pick-active-item__photo { width: 48px; height: 48px; }
html.phone-mode .pick-active-item__name { font-size: var(--font-size-lg); }
html.phone-mode .pick-active-item__qty { color: var(--ink-2); font-size: var(--font-size-lg); }
html.phone-mode .pick-active-item__actions { grid-column: auto; }
html.phone-mode .pick-active-item.short .pick-active-item__actions { grid-column: 1 / -1; }
/* Довга назва — на всю ширину рядка, кількість і рідкісна «Нестача» — під нею (N6, U-07): схожі товари різняться кінцем назви. */
html.phone-mode .pick-active-item:has(> .pick-active-item__text) { grid-template-areas: "photo name name" "photo qty actions"; align-items: start; }
html.phone-mode .pick-active-item.short:has(> .pick-active-item__text) { grid-template-areas: "photo name name" "photo qty qty" "actions actions actions"; }
html.phone-mode .pick-active-item > .pick-active-item__photo { grid-area: photo; }
html.phone-mode .pick-active-item__text { display: contents; }
html.phone-mode .pick-active-item__text > .pick-active-item__name { grid-area: name; }
html.phone-mode .pick-active-item__text > .pick-active-item__qty { grid-area: qty; align-self: center; }
html.phone-mode .pick-active-item:has(> .pick-active-item__text) > .pick-active-item__actions { grid-area: actions; }
html.phone-mode .pick-active-item__actions button { flex: 1 1 auto; min-width: 0; padding: 0 var(--space-3); }
html.phone-mode .pick-active-shortage-edit { gap: var(--space-2); font-size: var(--font-size-lg); }
html.phone-mode .pick-active .small { font-size: var(--font-size-lg); }
html.phone-mode .pick-active-shortage-edit input { width: 96px; }
html.phone-mode .pick-active-footer { bottom: 0; flex-wrap: nowrap; align-items: stretch; gap: var(--space-2); padding: var(--space-2) var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom)); border-radius: var(--radius-card) var(--radius-card) 0 0; }
html.phone-mode .pick-active-footer .pa-finish { flex: 1 1 auto; min-width: 0; min-height: var(--control-3xl); font-weight: 700; }
html.phone-mode .pick-active-footer .print-menu > summary { min-width: var(--control-3xl); min-height: var(--control-3xl); justify-content: center; font-size: var(--font-size-2xl); }
html.phone-mode .pick-active-done .pa-claim-next { width: 100%; min-height: var(--control-3xl); }
html.phone-mode .pack-active-return-edit textarea { min-height: var(--control-3xl); }
html.phone-mode .pack-active-return-edit__head button { min-height: var(--control-xl); }
html.phone-mode .pick-active-footer--problem { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.phone-mode .pick-active-footer--problem > button { min-width: 0; min-height: var(--control-3xl); padding: 0 var(--space-2); font-weight: 700; line-height: 1.2; white-space: normal; }
html.phone-mode .problem-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Моя робота, вхід, підтвердження. Статуси друку працівнику на телефоні не потрібні. */
html.phone-mode .my-work-now-card { display: grid; gap: var(--space-3); padding: var(--space-3); }
html.phone-mode .my-work-now-copy b { font-size: var(--font-size-xl); }
html.phone-mode .my-work-now-copy .small, html.phone-mode #pageWaves .page-sub { font-size: var(--font-size-lg); }
html.phone-mode #myWorkNow .order-status-number { font-size: var(--font-size-lg); }
html.phone-mode .my-work-now-card .my-work-actions button { width: 100%; min-height: var(--control-3xl); }
html.phone-mode #myWorkNow .wave-order-document .order-document-status { display: none; }
html.phone-mode .my-work-done-row { font-size: var(--font-size-lg); }
html.phone-mode .auth-card { padding: var(--space-6) var(--space-4); }
html.phone-mode .auth-form label, html.phone-mode .auth-sub, html.phone-mode .auth-error { font-size: var(--font-size-lg); }
html.phone-mode .auth-brand-sub { font-size: var(--font-size-md); }
html.phone-mode .auth-submit { min-height: var(--control-2xl); }
html.phone-mode .confirm-modal__text { font-size: var(--font-size-lg); }
html.phone-mode .confirm-modal__actions { display: grid; grid-template-columns: minmax(0, 1fr); }

/* ===== Сканер, вхід на 30 днів і завершення без зв'язку (задача 4057, M3; DESIGN_SYSTEM «Сканер») =====
   Кнопки сканування є лише в мобільному режимі; екран сканування — на весь екран поверх WMS. Десктоп ці
   правила не змінюють: .scan-entry там прихована, а сканер і смуга завершення без зв'язку з'являються лише за дією. */
.scan-entry { display: none; }
html.phone-mode .scan-entry { display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--control-3xl); padding: 0 var(--space-4); font-size: var(--font-size-lg); font-weight: 700; }
html.phone-mode #queueTabPanelPack > .scan-entry { margin: var(--space-2) 0 var(--space-3); }
body.scanner-active { overflow: hidden; }
/* Сканер показує результат сам; тости WMS угорі перекривали б «Закрити» й ліхтарик — під час скану їх сховано. */
body.scanner-active .toast-layer { visibility: hidden; }
.scan-overlay { position: fixed; inset: 0; z-index: 75; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--ink); color: var(--on-accent); font-size: var(--font-size-lg); }
.scan-top { display: flex; align-items: center; gap: var(--space-2); padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-3) var(--space-2); }
.scan-top .scan-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: var(--font-size-lg); }
.scan-top button { min-height: var(--control-xl); padding: 0 var(--space-4); border-color: var(--line-strong); background: var(--surface); color: var(--ink); font-size: var(--font-size-lg); }
.scan-top .scan-torch[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.scan-view { position: relative; overflow: hidden; min-height: 0; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 16% 8%; border: 3px solid var(--on-accent); border-radius: var(--radius-card); pointer-events: none; }
.scan-overlay[data-paused="true"] .scan-frame, .scan-overlay:not([data-camera-state="live"]) .scan-frame { opacity: .35; }
.scan-camera-state { position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-3); margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); background: var(--backdrop); color: var(--on-accent); font-size: var(--font-size-md); text-align: center; }
.scan-overlay[data-camera-state="live"][data-paused="true"] .scan-camera-state { display: none; }
.scan-sheet { display: grid; gap: var(--space-2); max-height: 56vh; overflow: auto; padding: var(--space-3) var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom)); border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--surface); color: var(--ink); }
.scan-hint { margin: 0; color: var(--ink-3); font-size: var(--font-size-md); }
.scan-panel { display: grid; gap: var(--space-2); }
.scan-result { margin: 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-control); font-size: var(--font-size-lg); font-weight: 650; white-space: pre-line; }
.scan-result[data-tone="ok"] { border-color: var(--st-done-line); background: var(--st-done-bg); color: var(--st-done); }
.scan-result[data-tone="error"] { border-color: var(--st-prob-line); background: var(--st-prob-bg); color: var(--st-prob); }
.scan-result[data-tone="info"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
/* Відвантаження: код у черзі чи ще записується — як .ship-result[data-tone="pending"] на сторінці. */
.scan-result[data-tone="pending"] { border-style: dashed; background: var(--surface-2); color: var(--ink-2); }
.scan-set-title { margin: 0; font-size: var(--font-size-lg); }
.scan-set { display: grid; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.scan-set li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); padding: 0 0 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-control); }
.scan-set li[data-tone="error"] { border-color: var(--st-prob-line); background: var(--st-prob-bg); color: var(--st-prob); }
.scan-set li b { font-size: var(--font-size-2xl); }
.scan-set li span { color: var(--ink-3); font-size: var(--font-size-md); }
.scan-set li[data-tone="error"] span { color: var(--st-prob); }
.scan-set li button { min-width: var(--control-xl); min-height: var(--control-xl); font-size: var(--font-size-2xl); }
.scan-choices { display: grid; gap: var(--space-2); }
.scan-overlay .scan-choices button { display: grid; justify-items: start; gap: var(--space-0-5); min-height: var(--control-3xl); padding: var(--space-2) var(--space-3); text-align: left; }
.scan-choices button span { color: var(--ink-3); font-size: var(--font-size-md); }
/* Набір до 10 (задача 4080): список може бути довшим за аркуш — «Взяти N» прилипає до низу аркуша й лишається видимим. */
.scan-overlay .scan-primary { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--control-3xl); font-size: var(--font-size-lg); font-weight: 700; box-shadow: var(--shadow-2); }
.scan-overlay .scan-panel > .secondary { min-height: var(--control-xl); }
.scan-manual > summary { display: flex; align-items: center; min-height: var(--control-xl); color: var(--accent-ink); font-size: var(--font-size-lg); cursor: pointer; }
.scan-manual__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
.scan-manual__form input { min-height: var(--control-xl); font-size: var(--font-size-lg); }
.scan-manual__form button { min-height: var(--control-xl); padding: 0 var(--space-4); font-size: var(--font-size-lg); }
.scan-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.scan-flash[data-tone="ok"] { background: var(--st-done); }
.scan-flash[data-tone="error"] { background: var(--st-prob); }
.scan-flash[data-tone="info"] { background: var(--accent); }
.scan-flash.is-on { animation: scanFlash 420ms ease-out; }
@keyframes scanFlash { from { opacity: .6; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scan-flash.is-on { animation-duration: 1ms; } }
.offline-finish-banner { position: fixed; left: var(--space-3); right: var(--space-3); top: calc(var(--space-2) + env(safe-area-inset-top)); z-index: 70; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--st-picked-line); border-radius: var(--radius-card); background: var(--st-picked-bg); color: var(--st-picked); box-shadow: var(--shadow-2); font-size: var(--font-size-md); }
.offline-finish-banner[data-tone="bad"] { border-color: var(--st-prob-line); background: var(--st-prob-bg); color: var(--st-prob); }
.offline-finish-banner button { min-height: var(--control-lg); }
/* Телефон: угорі живуть тости, тож смуга — над липкою головною дією (64 px + відступи). */
html.phone-mode .offline-finish-banner { top: auto; bottom: calc(var(--control-3xl) + var(--space-4) + env(safe-area-inset-bottom)); font-size: var(--font-size-lg); }
html.phone-mode .offline-finish-banner button { min-height: var(--control-xl); }

/* ===== Відвантаження (задача 4080, N2; DESIGN_SYSTEM «Відвантаження») =====
   4-й етап «Замовлень»: скан етикетки НП кожної коробки перед авто. Дата й пошук робочого місця тут не діють —
   список завжди «запаковано за 7 днів, ще не відвантажено», тож фільтри сховано. Результат скану — великий
   кольоровий рядок: зелений — записано, синій — нічого не сталося, червоний — не вантаж. */
#orderWorkspace[data-stage="shipping"] .workspace-filters, #orderWorkspace[data-stage="shipping"] .workspace-filters-toggle { display: none; }
.ship-page { display: grid; gap: var(--space-4); }
.ship-scan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: var(--space-3) var(--space-6); padding: var(--space-4) var(--space-5); }
.ship-scan__copy h2 { margin: 0 0 var(--space-1); font: var(--text-h2); }
.ship-scan__copy p { margin: 0; color: var(--ink-2); font: var(--text-body); }
.ship-scan__entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-1) var(--space-2); }
.ship-scan__entry label { grid-column: 1 / -1; color: var(--ink-3); font: var(--text-meta); }
.ship-scan__entry input { min-height: var(--control-lg); font-size: var(--font-size-lg); font-family: var(--font-mono); }
.ship-scan__entry button { min-height: var(--control-lg); }
.ship-result-wrap { grid-column: 1 / -1; display: grid; gap: var(--space-2); }
.ship-result-wrap:empty { display: none; }
.ship-result { margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); font-size: var(--font-size-lg); font-weight: 650; line-height: 1.35; white-space: pre-line; }
.ship-result[data-tone="ok"] { border-color: var(--st-done-line); background: var(--st-done-bg); color: var(--st-done); }
.ship-result[data-tone="error"] { border-color: var(--st-prob-line); background: var(--st-prob-bg); color: var(--st-prob); }
.ship-result[data-tone="info"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
/* Скан у черзі чи ще записується: нейтральний штриховий рядок — не зелений, бо ще нічого не записано. */
.ship-result[data-tone="pending"] { border-style: dashed; background: var(--surface-2); color: var(--ink-2); }
.ship-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ship-choices button { display: grid; justify-items: start; gap: var(--space-0-5); min-height: var(--control-lg); padding: var(--space-2) var(--space-3); text-align: left; }
.ship-choices button span { color: var(--ink-3); font-size: var(--font-size-xs); }
.ship-choices .ship-primary { justify-items: center; font-weight: 700; }
.ship-list { display: grid; gap: var(--space-2); }
.ship-list > h3 { margin: 0; font-size: var(--font-size-xs); }
.ship-list > div { display: grid; gap: var(--space-1); }
.ship-row { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); min-height: var(--control-lg); padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); font-size: var(--font-size-sm); }
.ship-row b { font-size: var(--font-size-lg); }
.ship-row > span { min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.ship-row[data-old] { border-color: var(--st-picked-line); background: var(--st-picked-bg); }
.ship-row__seats { padding: var(--space-0-5) var(--space-2); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink-2); font-size: var(--font-size-xs); font-weight: 650; white-space: nowrap; }
.ship-row__seats[data-partial] { background: var(--st-prob-bg); color: var(--st-prob); }
html.phone-mode .ship-page { gap: var(--space-3); }
html.phone-mode .ship-scan { grid-template-columns: minmax(0, 1fr); padding: var(--space-3); }
html.phone-mode .ship-scan__copy h2 { font-size: var(--font-size-xl); }
html.phone-mode .ship-scan__copy p, html.phone-mode .ship-scan__entry label { font-size: var(--font-size-lg); }
html.phone-mode .ship-scan__entry input, html.phone-mode .ship-scan__entry button { min-height: var(--control-xl); }
html.phone-mode .ship-result { font-size: var(--font-size-lg); }
html.phone-mode .ship-choices { display: grid; }
html.phone-mode .ship-choices button { min-height: var(--control-3xl); }
html.phone-mode .ship-choices button span { font-size: var(--font-size-lg); }
html.phone-mode #shipSummary { font-size: var(--font-size-lg); }
html.phone-mode .ship-list > h3 { font-size: var(--font-size-lg); letter-spacing: 0; text-transform: none; }
html.phone-mode .ship-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-0-5) var(--space-2); padding: var(--space-2) var(--space-3); font-size: var(--font-size-lg); }
html.phone-mode .ship-row b { font-size: var(--font-size-2xl); }
html.phone-mode .ship-row > span:not(.ship-row__seats) { grid-column: 1 / -1; grid-row: 2; font-size: var(--font-size-lg); }
html.phone-mode .ship-row__seats { grid-column: 2; grid-row: 1; font-size: var(--font-size-lg); }

/* ===== Технік і підказки друку (задача 4080, N3; DESIGN_SYSTEM «Чекає техніка», «Підказки друку») =====
   Набір із принтером після «Усе зібрано» чекає техніка: окремий блок над «Готові до пакування», рядок з принтером
   і кнопка «Налаштовано» для техніка (решта бачить, чому набір не бере). Підказки друку — рядки під клієнтом:
   помаранчевий ⚠ — одержувач ТТН інший, ніж у замовленні; сірий — тип документа з коментаря. */
.setup-wait-group > h3 { display: flex; align-items: center; gap: var(--space-2); }
.setup-wait { border: 1px solid var(--st-pack-line); border-radius: var(--radius-control); background: var(--st-pack-bg); }
.setup-wait > header { font-size: var(--font-size-xs); }
.setup-wait > header .setup-wait__printer { flex-basis: 100%; color: var(--ink); font-size: var(--font-size-sm); font-weight: 650; overflow-wrap: anywhere; }
.setup-wait > header > .warn { font-size: var(--font-size-xs); }
.order-row .order-hint, .print-check .order-hint { color: var(--ink-2); font-size: var(--font-size-xs); line-height: 1.3; overflow-wrap: anywhere; }
.order-row .order-hint[data-tone="warn"], .print-check .order-hint[data-tone="warn"] { color: var(--st-pack); font-weight: 650; }
.order-row .order-hint[data-tone="sticker"], .print-check .order-hint[data-tone="sticker"] { color: var(--accent-ink); font-weight: 650; }
/* «Звір перед стопкою» (рецензія N3, R1): підказки щойно надрукованого під панеллю набору; помаранчевий — коли є розбіжність ТТН. */
.print-check { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
.print-check[hidden] { display: none; }
.print-check[data-tone="warn"] { border-color: var(--st-pack-line); background: var(--st-pack-bg); }
.print-check__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.print-desk .print-check__head h2 { font-size: var(--font-size-md); }
.print-check__meta { flex: 1 1 12rem; min-width: 0; color: var(--ink-2); font-size: var(--font-size-xs); overflow-wrap: anywhere; }
.print-check__head > button, .print-check__error > button { min-height: var(--control-lg); font-size: var(--font-size-sm); }
.print-check__list { display: grid; gap: var(--space-1-5); margin: 0; padding: 0; list-style: none; }
.print-check__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); font-size: var(--font-size-sm); }
.print-check__row > b { white-space: nowrap; }
.print-check__hints { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); min-width: 0; }
.print-desk .print-check__error { margin: 0; color: var(--st-prob); font-size: var(--font-size-xs); overflow-wrap: anywhere; }
html.phone-mode .setup-wait { padding: var(--space-3); }
html.phone-mode .setup-wait > header, html.phone-mode .setup-wait > header .setup-wait__printer, html.phone-mode .setup-wait > header > .warn { font-size: var(--font-size-lg); }
html.phone-mode .order-row .order-hint { font-size: var(--font-size-lg); }
html.phone-mode .print-desk .print-check__head h2 { font-size: var(--font-size-xl); }
html.phone-mode .print-check__meta, html.phone-mode .print-check__row, html.phone-mode .print-check .order-hint, html.phone-mode .print-desk .print-check__error { font-size: var(--font-size-lg); }
html.phone-mode .print-check__head > button, html.phone-mode .print-check__error > button { min-height: var(--control-xl); font-size: var(--font-size-lg); }
