/* WMS Delivery для iPhone. Облик: docs/plans/2026-10-05-wms-delivery-pwa-ui-plan.md, раздел «Облик».
   Цвет — от значка (хвоя), жёлтый складской разметки — только «внимание», реестр с линейками вместо карточек,
   единственный акцент — полоса готовности (.meter). Шрифт Golos Text лежит рядом и работает без сети. */

@font-face {
  font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('./vendor/golos-text-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('./vendor/golos-text-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}

:root {
  color-scheme: light dark;
  --bg: #F5F7F3;          /* накладная */
  --surface: #FFFFFF;
  --text: #16201B;        /* чернила */
  --muted: #56655C;
  --line: #DCE2DA;
  --track: #E3E8E1;
  --brand: #12653C;       /* хвоя */
  --on-brand: #FFFFFF;
  --ok: #12653C;
  --ok-bg: #E2F0E7;
  --mark: #F2B705;        /* складская разметка */
  --warn: #7A5600;
  --warn-bg: #FFF3C7;
  --error: #B3261E;       /* отказ */
  --error-bg: #FBE7E4;
  --idle: #93A096;
  --ochre: #94702A;       /* вычерк без решения: спокойнее складской разметки */
  --ochre-bg: #F4EDDD;
  --btn: #12653C;
  --on-btn: #FFFFFF;
  --desk: #E4EAE2;        /* стол менеджера вокруг листа (компьютер) */
  --t-cap: 13px; --t-body: 15px; --t-name: 17px; --t-qty: 22px; --t-total: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1F15; --surface: #102A1D; --text: #F0F4EE; --muted: #9FB3A6; --line: #21402F; --track: #24452F;
    --brand: #0E4D2F; --on-brand: #F0F4EE; --btn: #2B9A61; --on-btn: #04140C;
    --ok: #63D194; --ok-bg: #143824; --warn: #F2B705; --warn-bg: #3A3006; --error: #FF9A8F; --error-bg: #3D1714; --idle: #5F7868;
    --desk: #061710;
    --ochre: #C9A65E; --ochre-bg: #2A2918;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font: 400 var(--t-body)/1.35 'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif; font-variant-numeric: tabular-nums; overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
h2 { font-size: var(--t-name); font-weight: 600; margin: 0; }
p { margin: 0; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }

.page { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(24px + var(--safe-bottom)); }
.page.with-footer { padding-bottom: calc(96px + var(--safe-bottom)); }
.pre { white-space: pre-line; }
.empty { padding: 28px 16px; color: var(--muted); }
.actions { display: flex; flex-direction: column; gap: 10px; padding: 16px; }

/* Шапка */
.bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 6px; background: var(--brand); color: var(--on-brand);
  padding: calc(6px + var(--safe-top)) 6px 6px 8px; min-height: calc(var(--bar-h) + var(--safe-top)); }
.bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 4px; }
.bar-title b { font-size: var(--t-name); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title small { opacity: .82; font-size: var(--t-cap); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-right { display: flex; align-items: center; }
.icon { background: transparent; border: 0; color: inherit; font-size: 26px; width: 44px; height: 44px; border-radius: 8px; line-height: 1; }
.icon:active { background: rgba(255,255,255,.16); }
.icon-space { width: 4px; }
.link-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; padding: 4px 8px; border-radius: 4px; background: rgba(0,0,0,.2); }
.link-badge i { width: 8px; height: 8px; border-radius: 50%; background: #7BE0A6; }
.link-badge.bridge, .link-badge.offline { background: var(--mark); color: #2B1F00; font-weight: 600; }
.link-badge.bridge i, .link-badge.offline i { background: #2B1F00; }

/* Кнопки */
.btn { border: 1.5px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 14px; min-height: 48px; font-weight: 600; font-size: var(--t-body); }
.btn:active { filter: brightness(.94); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.btn.small { min-height: 44px; padding: 8px 12px; font-size: var(--t-cap); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.link { background: none; border: 0; color: var(--ok); font-weight: 600; font-size: var(--t-cap); }

/* Плашки */
.banner { display: block; width: 100%; margin: 0; padding: 12px 16px 12px 12px; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid var(--brand); text-align: left; font-size: var(--t-body); font-weight: 500; background: var(--surface); color: var(--text); }
.banner.ok { background: var(--ok-bg); color: var(--ok); border-left-color: var(--ok); font-weight: 600; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-left-color: var(--mark); }
.banner.error { background: var(--error-bg); color: var(--error); border-left-color: var(--error); }
.loading-strip { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: var(--t-cap); color: var(--muted); border-bottom: 1px solid var(--line); }
.loading-strip i { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--track); border-top-color: var(--ok); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Вкладки и поиск */
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 6px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0 10px; min-height: 48px; font-size: var(--t-body); font-weight: 500; color: var(--muted); white-space: nowrap; }
.tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--ok); }
.search { display: flex; gap: 8px; padding: 12px 16px; }
.search input, .scanbar input, .field input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); min-height: 48px; font-size: var(--t-name); }

/* Реестр: группы и строки */
.group-head { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 18px 16px 8px; font-size: var(--t-cap); font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--text); list-style: none; }
.group-head > span { font-weight: 700; color: var(--text); }
.group-head .link { margin-left: auto; padding: 0; }
summary.group-head { cursor: pointer; min-height: 48px; align-items: flex-end; }
summary.group-head::-webkit-details-marker { display: none; }
summary.group-head::after { content: 'показать'; margin-left: auto; color: var(--ok); font-weight: 600; }
details[open] > summary.group-head::after { content: 'свернуть'; }
.ledger { list-style: none; margin: 0; padding: 0; background: var(--surface); }
.ledger > li { border-bottom: 1px solid var(--line); }

/* Полоса готовности — единственный акцент */
.meter { display: block; height: 8px; background: var(--track); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 2px; transition: width .35s ease-out; }
.meter.big { height: 14px; border-radius: 3px; }

/* Строка заказа (список и доска) */
.oline { display: grid; grid-template-columns: 1fr 60px 44px; align-items: center; padding-left: 12px; border-left: 4px solid transparent; }
.oline.picking { border-left-color: var(--ok); }
.oline.stale { border-left-color: var(--mark); }
.oline-main { display: flex; flex-direction: column; gap: 7px; padding: 13px 0 12px; background: none; border: 0; text-align: left; min-width: 0; min-height: 72px; }
.oline-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.oline-top b { font-weight: 600; font-size: var(--t-name); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oline-num { flex: none; font-size: var(--t-cap); color: var(--muted); }
.oline-meta { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-cap); color: var(--muted); }
.oline-note { text-align: right; }
.oline.picking .oline-note, .oline.done .oline-note { color: var(--ok); font-weight: 600; }
.oline.stale .oline-note { color: var(--warn); font-weight: 600; }
.oline.assigned .meter i, .oline.closed .meter i { background: var(--idle); }
.oline.closed { opacity: .75; }
.oline-pct { text-align: right; font-size: var(--t-qty); font-weight: 700; }
.oline-pct small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.oline-more { background: none; border: 0; height: 100%; min-height: 48px; font-size: 22px; color: var(--muted); }
.oline-more:active, .oline-main:active { background: var(--bg); }

/* Доска «По сборщикам» */
.board { background: var(--surface); }
.board-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 2px solid var(--text); }
.board-summary > * { display: flex; flex-direction: column; gap: 2px; padding: 14px 8px 12px 16px; text-align: left; background: none; border: 0; border-left: 1px solid var(--line); min-height: 64px; }
.board-summary > *:first-child { border-left: 0; }
.board-summary b { font-size: var(--t-total); line-height: 1; font-weight: 700; }
.board-summary span { font-size: var(--t-cap); color: var(--muted); }
.board-summary button span { color: var(--ok); font-weight: 600; }
.lane { display: grid; grid-template-columns: 112px 1fr; border-bottom: 1px solid var(--line); }
.lane-who { padding: 15px 4px 12px 14px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lane-who b { font-size: var(--t-body); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.lane-who span, .lane-who small { font-size: var(--t-cap); color: var(--muted); }
.lane-who small { margin-top: 6px; }
.lane .ledger > li:last-child { border-bottom: 0; }
.lane .oline { padding-left: 8px; }
.board-idle { padding: 14px 16px 16px; font-size: var(--t-cap); line-height: 1.5; }
.board-idle span { display: block; color: var(--muted); }

/* Отчёт смены: день смены (11:00 → 11:00), итог по сборщикам таблицей, источник данных */
.daybar { display: grid; grid-template-columns: 52px 1fr 52px; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); }
.daybar-step { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--ok); min-height: 60px; }
.daybar-step:disabled { color: var(--idle); cursor: default; }
.daybar-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; text-align: center; cursor: pointer; }
.daybar-day b { font-size: var(--t-name); font-weight: 600; }
.daybar-day span { font-size: var(--t-cap); color: var(--muted); }
/* Нативный выбор даты iOS открывается по нажатию на подпись: поле лежит поверх, прозрачное */
.daybar-day input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.daybar-day:focus-within { outline: 3px solid var(--mark); outline-offset: -3px; }
.report-source { padding: 10px 16px; font-size: var(--t-cap); color: var(--muted); border-bottom: 1px solid var(--line); }
.report-source.warn { color: var(--warn); background: var(--warn-bg); }
/* «9 строк» без веса — ссылка на список товаров */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ok); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.nw-list { list-style: none; margin: 8px -16px 0; padding: 0; border-top: 1px solid var(--line); }
.nw-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.nw-item small { color: var(--muted); font-size: var(--t-cap); }
.nw-docs { list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); font-size: var(--t-cap); }
.report { width: 100%; border-collapse: collapse; border-bottom: 2px solid var(--text); }
.report th, .report td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; }
.report thead th { font-size: var(--t-cap); color: var(--muted); padding-top: 12px; padding-bottom: 8px; }
.report th:first-child { text-align: left; padding-left: 16px; }
.report td:last-child, .report th:last-child { padding-right: 16px; }
.report td { font-weight: 600; }
.report tbody th a { color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.report tbody tr:last-child > * { border-bottom: 0; }
/* Активность смены: строка темпа, табель по часам (насыщенность хвои — сколько отправлено за час), темп сборщиков */
.pace { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.pace-line { font-size: var(--t-name); line-height: 1.35; }
.pace-line b { font-size: var(--t-qty); font-weight: 700; }
.pace-meta { margin-top: 6px; font-size: var(--t-cap); color: var(--muted); line-height: 1.45; }
.tabel { border-bottom: 1px solid var(--line); }
.tabel-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 10px 0 4px; }
.tabel table { border-collapse: separate; border-spacing: 2px; margin: 0 14px 0 8px; }
.tabel th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 2px; text-align: center; }
.tabel tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 0 8px 0 6px; font-size: var(--t-cap); color: var(--text); white-space: nowrap; }
.tabel td { width: 24px; min-width: 24px; height: 28px; padding: 0; border-radius: 3px; cursor: pointer; }
.tabel td.lv0 { background: color-mix(in srgb, var(--track) 45%, transparent); }
.tabel td.lvw { background: color-mix(in srgb, var(--ok) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.tabel td.lv1 { background: color-mix(in srgb, var(--ok) 32%, transparent); }
.tabel td.lv2 { background: color-mix(in srgb, var(--ok) 52%, transparent); }
.tabel td.lv3 { background: color-mix(in srgb, var(--ok) 74%, transparent); }
.tabel td.lv4 { background: var(--ok); }
.tabel-all th { padding-top: 6px; }
.tabel-all td { height: 44px; vertical-align: bottom; background: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.tabel-all td i { display: block; width: 100%; background: var(--text); border-radius: 2px 2px 0 0; }
.tabel-legend { padding: 4px 16px 12px; font-size: var(--t-cap); color: var(--muted); line-height: 1.45; }
.report.rates tbody th b { display: block; font-weight: 600; }
.report.rates tbody th small { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--muted); font-weight: 400; }
.report.rates tbody th { vertical-align: top; }
.report.rates td { vertical-align: top; }
/* Журнал заказов: хронология смены (дорожка на сборщика, заказ — отрезок) и строка на заказ, а не на событие */
.journal { --tl-who: 96px; }
.tl { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.tl-axis { position: relative; height: 16px; margin-left: var(--tl-who); font-size: 11px; color: var(--muted); }
.tl-axis span { position: absolute; transform: translateX(-50%); }
.tl-lane { display: grid; grid-template-columns: var(--tl-who) minmax(0, 1fr); align-items: center; height: 30px; }
.tl-who { font-size: var(--t-cap); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-who small { margin-left: 6px; font-weight: 400; color: var(--muted); }
.tl-track { position: relative; height: 18px; border-radius: 4px; background: var(--track); }
.tl-grid { position: absolute; top: -5px; bottom: -5px; width: 1px; background: var(--line); }
.tl-bar { position: absolute; top: 2px; bottom: 2px; padding: 0; border: 0; border-radius: 3px; background: var(--ok); cursor: pointer; }
.tl-bar.short { background: var(--warn); }
.tl-bar.open { background: transparent; box-shadow: inset 0 0 0 2px var(--ok); }
.tl-bar:hover { filter: brightness(1.2); }
.tl-bar:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.tl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 10px 0 0 var(--tl-who); font-size: var(--t-cap); color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--ok); }
.tl-legend i.short { background: var(--warn); }
.tl-legend i.open { background: transparent; box-shadow: inset 0 0 0 2px var(--ok); }
.jr { list-style: none; margin: 0; padding: 0; }
.jr-row { border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.jr-row.short { border-left-color: var(--mark); }
.jr-row.open { border-left-color: var(--ok); }
.jr-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; width: 100%;
  padding: 9px 16px 9px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.jr-main:hover { background: var(--bg); }
.jr-time { font-weight: 600; color: var(--muted); white-space: nowrap; }
.jr-what { min-width: 0; }
.jr-what b { font-weight: 600; }
.jr-what > span { margin-left: 8px; font-size: var(--t-cap); color: var(--muted); }
.jr-what small { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--muted); }
.jr-who { display: none; font-size: var(--t-cap); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-end { font-size: var(--t-cap); color: var(--muted); text-align: right; }
.jr-n { display: inline-block; min-width: 2.2ch; margin-right: 8px; font-style: normal; font-weight: 700; color: var(--muted); text-align: right; }
.jr-row.short .jr-end { color: var(--warn); font-weight: 600; }
.jr-row.open .jr-end { color: var(--ok); font-weight: 600; }
.jr-row.stale { border-left-color: var(--line); }
.jr-row.stale .jr-end { font-weight: 600; }
@media (min-width: 700px) {
  .journal { --tl-who: 140px; }
  .jr-main { grid-template-columns: 140px minmax(0, 1fr) 90px minmax(0, 420px); padding-left: 20px; }
  .jr-who { display: block; }
  .tl { padding: 16px 24px 14px 24px; }
}

/* Отгрузки: слева сборщики — фильтр («Все» первой строкой), справа одна лента документов по времени смены.
   Акцент — время отгрузки крупной цифрой слева в каждой строке: смена читается сверху вниз, как журнал. */
.ship-who tbody tr { cursor: pointer; }
.ship-who tbody th { padding: 0; }
.ship-who tbody th button { display: block; width: 100%; padding: 11px 8px 11px 12px; border: 0; border-left: 4px solid transparent; background: none;
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.ship-who tbody tr:hover > * { background: var(--bg); }
.ship-who tbody tr.on > * { background: var(--ok-bg); }
.ship-who tbody tr.on th button { border-left-color: var(--ok); color: var(--ok); }
.ship-who tbody tr:first-child > * { border-bottom: 2px solid var(--line); }
.ship-feed { min-width: 0; }
.ship-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 16px 12px; border-bottom: 2px solid var(--text); }
.ship-head b { font-size: var(--t-name); font-weight: 700; }
.ship-head span { font-size: var(--t-cap); color: var(--muted); }
.ship-list { list-style: none; margin: 0; padding: 0; }
.ship-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 16px 11px; border-bottom: 1px solid var(--line); }
.ship-row:last-child { border-bottom: 0; }
.ship-time { font-size: 20px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.ship-row.warn .ship-time { color: var(--warn); }
.ship-what { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ship-what > b { font-size: var(--t-name); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-what > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: var(--t-cap); color: var(--muted); }
.ship-what .linkish { font-weight: 600; }
.ship-doc { color: var(--ok); font-weight: 600; }
.ship-note { color: var(--warn); font-weight: 600; }
.ship-qty { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
.ship-qty b { font-weight: 600; }
.ship-qty span { font-size: var(--t-cap); color: var(--muted); }
.nw-item.short small { color: var(--error); font-weight: 600; }
@media (min-width: 960px) {
  .ship { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; }
  .ship-who { position: sticky; top: calc(var(--bar-h) + var(--safe-top) + 66px); border-right: 1px solid var(--line); border-bottom: 0; }
  .ship-feed { border-left: 1px solid var(--line); margin-left: -1px; min-height: 100%; }
  .ship-head, .ship-row { padding-left: 24px; padding-right: 24px; }
  .ship-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; }
  .shift-report > .board-summary { grid-template-columns: repeat(3, minmax(0, 240px)); }
}

/* Вычерки по товару: полоса причин, строка на товар («не отгружено» — штуки крупно, кг под ними), плашки магазинов */
.xr { padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.xr-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--track); }
/* Закрытые с причиной — нейтральные (решение принято), не закрытые — охра (вопрос открыт). */
.xr-bar i, .xr-list i { display: block; background: var(--idle); }
.xr-bar .r1, .xr-list .r1 { background: var(--muted); }
.xr-bar .open, .xr-list .open { background: var(--ochre); }
.xr-list { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--t-cap); }
.xr-list li { display: inline-flex; align-items: baseline; gap: 6px; }
.xr-list i { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.xr-list b { font-weight: 600; }
.xr-list span { color: var(--muted); }
.xi-head { display: flex; justify-content: space-between; padding: 10px 16px 6px; font-size: var(--t-cap); color: var(--muted); border-bottom: 1px solid var(--line); }
.xi { list-style: none; margin: 0; padding: 0; }
.xi-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.xi-what { min-width: 0; }
.xi-what b { font-weight: 600; }
.xi-what small { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--muted); }
.xi-qty { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.xi-qty b { font-size: var(--t-name); font-weight: 700; line-height: 1.15; }
.xi-qty span { font-size: var(--t-cap); color: var(--muted); }
.xi-shops { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.xc { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; border: 1px dashed var(--idle); border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: var(--t-cap); cursor: pointer; }
.xc b { font-weight: 700; color: var(--muted); }
.xc span { margin-left: -3px; color: var(--muted); }
.xc.open { border: 1px solid var(--ochre); }
.xc.open b { color: var(--ochre); }
/* Недобор по заказу в окошке: реестр — товар, отгружено полоской, не хватило, кг; итог под чертой */
.xt { width: calc(100% + 32px); margin: 6px -16px 0; border-collapse: collapse; font-size: var(--t-cap); }
.xt th, .xt td { padding: 9px 8px; border-top: 1px solid var(--line); text-align: right; font-weight: 400; vertical-align: top; white-space: nowrap; }
.xt th:first-child { padding-left: 16px; text-align: left; white-space: normal; }
.xt td:last-child, .xt th:last-child { padding-right: 16px; }
.xt thead th { padding-top: 8px; padding-bottom: 6px; color: var(--muted); }
.xt tbody th { font-size: var(--t-body); font-weight: 600; color: var(--text); }
.xt tbody th small { display: block; margin-top: 2px; font-size: var(--t-cap); font-weight: 400; color: var(--muted); }
.xt-ship { color: var(--muted); }
.xt-meter { display: inline-block; width: 48px; height: 4px; margin-right: 8px; vertical-align: 3px; border-radius: 2px; background: var(--track); overflow: hidden; }
.xt-meter i { display: block; height: 100%; background: var(--ok); }
.xt td.xt-miss b { font-weight: 700; color: var(--error); }
.xt td.xt-miss small { display: block; margin-top: 2px; color: var(--muted); }
.xt tbody th { position: relative; }
.xt-dot { position: absolute; left: 5px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--ochre); }
.xt tfoot th, .xt tfoot td { border-top: 2px solid var(--text); font-weight: 700; color: var(--text); }
.x-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 4px 0 6px; font-size: var(--t-cap); color: var(--muted); }
.ship-flag { margin-left: 10px; padding: 1px 7px; vertical-align: 2px; font-size: 12px; font-weight: 600; color: var(--ochre); cursor: default; }
.x-state .xc { cursor: default; font-weight: 600; }
.x-state .xc.open { color: var(--ochre); }
.x-state .xc:hover { filter: none; }
.x-sub { margin: 0; padding: 0 0 2px; font-size: var(--t-cap); color: var(--muted); }
.x-sub b { color: var(--text); font-weight: 700; }
.linkish.title-link { font-weight: inherit; text-decoration-thickness: 1px; }
.x-who { margin: 0; padding: 0 0 10px; font-size: var(--t-cap); color: var(--muted); }
.x-who b { color: var(--text); font-weight: 600; }
.nw-item.this b { text-decoration: underline; text-decoration-color: var(--ochre); text-underline-offset: 3px; }
.xc:hover { filter: brightness(1.1); }
.xc:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.xi-note { margin: 0; padding: 10px 16px 12px; font-size: var(--t-cap); color: var(--muted); }
@media (min-width: 960px) {
  .xr, .xi-head, .xi-row, .xi-note { padding-left: 24px; padding-right: 24px; }
  .xi-row { grid-template-columns: minmax(0, 340px) minmax(0, 1fr) 120px; align-items: start; }
  .xi-shops { grid-column: 2; grid-row: 1; }
  .xi-qty { grid-column: 3; grid-row: 1; }
}

/* Выполнение: вычерки (красным — позиция не отгружена совсем) и причина; внизу — заказы, не отгруженные целиком */
.fulfil td small { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--muted); font-weight: 400; }
.fulfil td.miss { white-space: nowrap; }
.fulfil tr.none td.miss { color: var(--error); }
.fulfil td.why, .fulfil thead th:last-child { text-align: left; }
.fulfil td.why { font-weight: 500; width: 34%; }
.fulfil .muted, .fulfil-whole .muted { color: var(--muted); font-weight: 400; }
.fulfil-whole { padding: 12px 16px 14px; border-top: 1px solid var(--line); font-size: var(--t-cap); }
.fulfil-whole b { display: block; margin-bottom: 4px; font-size: var(--t-body); font-weight: 600; }
.fulfil-whole ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.hline.unposted { border-left-color: var(--mark); }
.hline.unposted .oline-note { color: var(--warn); font-weight: 600; }

/* Экран сборки */
.tally { padding: 16px 16px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tally-num { display: flex; align-items: baseline; gap: 8px; }
.tally-num b { font-size: var(--t-total); line-height: 1; font-weight: 700; }
.tally-num span { color: var(--muted); }
.tally .meter { margin-top: 10px; }
.tally-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: var(--t-cap); color: var(--muted); }
.tally-others { flex-basis: 100%; }
.scan-start { padding: 14px 16px 0; }
.scan-btn { min-height: 56px; font-size: var(--t-name); }
.scanbar { display: flex; gap: 8px; padding: 10px 16px 4px; }
.camera { position: sticky; top: calc(var(--bar-h) + var(--safe-top)); z-index: 5; background: #000; }
.camera video { width: 100%; height: 30vh; object-fit: cover; display: block; }
.camera-frame { position: absolute; inset: 24% 12%; border: 3px solid var(--mark); border-radius: 4px; pointer-events: none; }
.camera-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; padding: 16px; text-align: center; }
.camera-close { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); border-color: rgba(255,255,255,.5); color: #fff; }
.last { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-top: 8px; background: var(--ok-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.last-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.last-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-text span { font-size: var(--t-cap); color: var(--ok); font-weight: 600; }
.pline, .sline { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; border-left: 4px solid transparent; }
.pline { padding: 8px 6px 8px 12px; }
.sline { padding: 12px 16px 12px 12px; }
.pline.done { background: var(--ok-bg); border-left-color: var(--ok); }
.pline.over, .pline.extra, .sline.over { background: var(--warn-bg); border-left-color: var(--mark); }
.pline-name { min-width: 0; line-height: 1.3; }
.pline-name small { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--muted); }
.stepper { display: grid; grid-template-columns: 44px minmax(64px, auto) 44px; align-items: stretch; }
.stepper button { background: none; border: 0; min-height: 52px; font-size: 26px; font-weight: 500; color: var(--ok); border-radius: 8px; }
.stepper button:active { background: var(--track); }
.stepper button:disabled { color: var(--idle); opacity: .5; }
.stepper .stepper-qty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text); padding: 0 4px; }
.stepper-qty b { font-size: var(--t-qty); line-height: 1.1; font-weight: 700; }
.stepper-qty span { font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.sline-qty { text-align: right; white-space: nowrap; }
.sline-qty b { font-size: var(--t-qty); font-weight: 700; }
.sline-qty span { margin-left: 6px; font-size: var(--t-cap); color: var(--muted); }
.sline.rest .sline-qty b { font-weight: 600; font-size: var(--t-name); }
.footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 10px 16px calc(10px + var(--safe-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.footer .btn { min-height: 56px; font-size: var(--t-name); }

/* Результат отправки, неотправленное, настройки */
.result { padding: 22px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 6px solid var(--brand); }
.result h2 { font-size: var(--t-qty); font-weight: 700; margin-bottom: 8px; }
.result small { display: block; margin-top: 10px; color: var(--muted); font-size: var(--t-cap); }
.result.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.result.error { border-left-color: var(--error); background: var(--error-bg); }
.oitem { padding: 14px 16px 14px 12px; border-left: 4px solid var(--mark); }
.oitem.stop { border-left-color: var(--error); }
.oitem-state { margin-top: 4px; font-weight: 600; }
.oitem.stop .oitem-state { color: var(--error); }
.oitem-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: var(--t-cap); color: var(--muted); }
.oitem-text { margin-top: 8px; font-size: var(--t-cap); }
.row-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sheet { background: var(--surface); border-bottom: 1px solid var(--line); padding: 4px 16px; }
.ro { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ro:last-child { border-bottom: 0; }
.ro span { color: var(--muted); font-size: var(--t-cap); flex: 0 1 44%; }
.ro b { text-align: right; overflow-wrap: anywhere; font-weight: 600; }

/* Вход */
.hero { background: var(--brand); color: var(--on-brand); padding: calc(28px + var(--safe-top)) 16px 22px; display: flex; flex-direction: column; gap: 4px; }
.hero b { font-size: var(--t-total); font-weight: 700; line-height: 1.1; }
.hero span { opacity: .85; }
.operators { display: flex; flex-direction: column; background: var(--surface); }
.operator { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: none; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; padding: 0 16px 0 12px; min-height: 56px; text-align: left; font-size: var(--t-name); font-weight: 500; }
.operator:active { background: var(--bg); }
.operator small { color: var(--muted); font-size: var(--t-cap); font-weight: 400; }
.operator.last { border-left-color: var(--ok); font-weight: 700; }
.version { padding: 16px; font-size: var(--t-cap); color: var(--muted); }
.pin { max-width: 360px; margin: 0 auto; padding: 28px 24px; }
.pin-dots { display: flex; gap: 16px; justify-content: center; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ok); }
.pin-dots i.on { background: var(--ok); }
.pin-error { min-height: 22px; margin: 12px 0 8px; text-align: center; color: var(--error); font-weight: 600; font-size: var(--t-cap); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { min-height: 64px; font-size: var(--t-total); font-weight: 500; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); }
.pinpad button:active { background: var(--track); }
.pinpad button.ghost { font-size: var(--t-cap); font-weight: 600; background: transparent; border-color: transparent; color: var(--ok); }

/* Диалог снизу, сообщение, вспышка скана */
.overlay { position: fixed; inset: 0; background: rgba(6, 20, 13, .55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.dialog { background: var(--surface); width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto; border-radius: 12px 12px 0 0; padding: 20px 16px calc(16px + var(--safe-bottom)); }
.dialog h2 { margin-bottom: 8px; }
.dialog p { color: var(--muted); }
@media (min-width: 600px) { .overlay { align-items: center; } .dialog { border-radius: 12px; } }
.dialog-buttons { display: flex; gap: 8px; margin-top: 16px; }
.dialog-buttons .btn { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; }
.field span { font-size: var(--t-cap); color: var(--muted); }
.field input { font-size: var(--t-qty); font-weight: 700; }
.choice { display: flex; flex-direction: column; margin: 8px -16px 0; border-top: 1px solid var(--line); }
.choice-item { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; min-height: 52px; display: flex; flex-direction: column; justify-content: center; font-weight: 500; }
.choice-item:active { background: var(--bg); }
.choice-item small { color: var(--muted); font-size: var(--t-cap); font-weight: 400; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(104px + var(--safe-bottom)); z-index: 30; background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 8px; white-space: pre-line; }
.toast.error { background: var(--error); color: #fff; }
.flash { position: fixed; inset: 0; z-index: 15; pointer-events: none; display: flex; align-items: flex-start; justify-content: center; animation: flash-fade .9s ease-out forwards; }
.flash.ok { background: rgba(18, 101, 60, .30); }
.flash.bad { background: rgba(179, 38, 30, .34); animation-duration: 1.4s; }
.flash-text { margin-top: calc(var(--bar-h) + var(--safe-top) + 12px); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 8px; background: #12653C; color: #fff; display: flex; align-items: baseline; gap: 12px; }
.flash.bad .flash-text { background: #B3261E; }
.flash-text b { font-size: var(--t-name); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash-text span { flex: none; font-size: var(--t-qty); font-weight: 700; }
@keyframes flash-fade { 0% { opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .flash { background: none !important; animation: none; }
  .meter i { transition: none; }
  .loading-strip i { animation: none; }
}

/* «Смена»: что сделано за сутки — строки сборок и журнал действий */
.hline { border-left: 4px solid transparent; }
.hline.open { border-left-color: var(--ok); }
.hline.sending { border-left-color: var(--mark); }
.hline-main { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px 16px 11px 8px; background: none; border: 0; text-align: left; min-height: 60px; }
.hline-main:disabled { opacity: 1; cursor: default; }
.hline-main:not(:disabled):active { background: var(--bg); }
.hline.sent .oline-note { color: var(--ok); font-weight: 600; }
.hline.sending .oline-note { color: var(--warn); font-weight: 600; }
.eline { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 11px 16px; align-items: baseline; }
.eline-time { font-weight: 600; color: var(--muted); }
.eline-text b { font-weight: 600; }
.eline-text small { display: block; margin-top: 2px; font-size: var(--t-cap); color: var(--muted); }
.hline-time { flex: none; font-size: var(--t-body); font-weight: 600; }
.hline.idle { border-left-color: var(--mark); }
.hline.idle .oline-note { color: var(--warn); font-weight: 600; }
.hline .oline-note { white-space: nowrap; }

/* Цифры в клетках табеля — только на компьютере, на телефоне клетка слишком мала */
.tabel td .tv { display: none; }

/* ── Компьютер менеджера (от 960 px) ─────────────────────────────────────────
   Лист по центру, по бокам — стол. Смена: слева закреплённый итог, справа документы или активность;
   табель крупный, с килограммами в клетках. Заказы — три колонки по состоянию, доска — сборщики в две колонки.
   Телефонная вёрстка выше не меняется. */
@media (min-width: 960px) {
  html, body { background: var(--desk); }
  .page { max-width: 1280px; margin: 0 auto; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
  .bar { padding-left: 16px; padding-right: 16px; }
  .footer { left: 50%; right: auto; width: min(1280px, 100%); transform: translateX(-50%); }
  .footer .btn { max-width: 480px; margin-left: auto; display: block; }
  .toast { left: 50%; right: auto; width: min(520px, calc(100% - 32px)); transform: translateX(-50%); bottom: 32px; }
  .empty { padding: 32px 24px; }

  /* Список заказов */
  .search { max-width: 760px; padding: 16px 24px; }
  .tabs { padding: 0 18px; }
  .groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; padding: 0 24px 24px; align-items: start; }
  .groups > .group { min-width: 0; }
  .groups .group-head { padding-left: 0; padding-right: 0; }
  .groups .ledger { border: 1px solid var(--line); border-top: 0; }

  /* Доска «По сборщикам»: сборщики в две колонки */
  .board-live { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-live > .board-summary, .board-live > .board-idle, .board-live > .actions, .board-live > .empty { grid-column: 1 / -1; }
  .board-live > .board-summary { grid-template-columns: repeat(3, minmax(0, 220px)); }
  .board-live > .lane:nth-of-type(odd) { border-right: 1px solid var(--line); }
  .lane { grid-template-columns: 160px 1fr; }

  /* Смена: день и вкладки в одну строку */
  .shift-head { display: flex; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); }
  .shift-head .daybar { flex: 0 0 380px; border-bottom: 0; border-right: 1px solid var(--line); }
  .shift-head .tabs { flex: 1; border-bottom: 0; align-items: stretch; padding: 0 16px; }
  .shift-head .tab { min-height: 64px; padding: 0 14px; font-size: var(--t-name); }

  .shift-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; }
  .shift-side { position: sticky; top: calc(var(--bar-h) + var(--safe-top)); max-height: calc(100vh - var(--bar-h) - var(--safe-top));
    overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); }
  .shift-side .board-summary b { font-size: 32px; }
  .shift-main { min-width: 0; min-height: calc(100vh - var(--bar-h) - 64px); background: var(--surface); }
  .lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lanes > .lane:nth-child(odd) { border-right: 1px solid var(--line); }

  /* Активность: строка темпа крупнее, табель — с цифрами */
  .pace { padding: 22px 24px 18px; }
  .pace-line { font-size: 20px; }
  .pace-line b { font-size: 30px; }
  .tabel-scroll { padding: 18px 0 8px; }
  .tabel table { margin: 0 24px 0 16px; border-spacing: 3px; }
  .tabel th { font-size: var(--t-cap); }
  .tabel tbody th { padding-right: 14px; font-size: var(--t-body); }
  .tabel td { width: 52px; min-width: 52px; height: 40px; border-radius: 4px; vertical-align: middle; }
  .tabel td .tv { display: block; text-align: center; font-size: var(--t-cap); font-weight: 600; color: var(--text); }
  .tabel td.lv3 .tv, .tabel td.lv4 .tv { color: var(--on-btn); }
  .tabel td.lvw .tv { color: var(--muted); }
  .tabel-scroll { overflow-y: hidden; }
  .tabel-all td { height: 112px; vertical-align: bottom; }
  .tabel-all td .tv { margin-bottom: 4px; color: var(--muted); font-weight: 600; }
  .tabel-all td i { max-height: 88px; }
  .actions { flex-direction: row; flex-wrap: wrap; padding: 20px 24px; }
  .actions .btn { width: auto; min-width: 240px; }
  .tabel-legend { padding: 6px 24px 16px; max-width: 72ch; }
  .shift-main .group-head { padding-left: 24px; padding-right: 24px; }
  .shift-main .report th:first-child { padding-left: 24px; }
  .shift-main .report td:last-child, .shift-main .report th:last-child { padding-right: 24px; }
  .shift-main .report-source { padding: 12px 24px; max-width: 80ch; }
  .report.rates td { font-size: var(--t-name); }
}

/* ── Страница руководителя «Склад»: один лист, липкая полоса с днём и кнопками-якорями ─────────────── */
.ov-nav { position: sticky; top: calc(var(--bar-h) + var(--safe-top)); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.ov-nav .daybar { border-bottom: 1px solid var(--line); }
.ov-links { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 6px; }
.ov-links::-webkit-scrollbar { display: none; }
.ov-link { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0 12px; min-height: 46px; font-size: var(--t-body); font-weight: 500; color: var(--muted); white-space: nowrap; }
.ov-link.on { color: var(--text); font-weight: 600; border-bottom-color: var(--ok); }
.ov-section { scroll-margin-top: calc(var(--bar-h) + var(--safe-top) + 108px); }
.ov-title { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 28px 16px 10px; font-size: 24px; line-height: 1.15; font-weight: 700; background: var(--bg); border-bottom: 2px solid var(--text); }
.ov-title small { font-size: var(--t-cap); font-weight: 400; color: var(--muted); }
.overview .board-live > .board-summary > div { cursor: default; }

/* Сотрудники: табель за месяц (клетка — смена) и карточка сотрудника */
.staff-month { border-bottom: 1px solid var(--line); }
.staff-month .daybar-day { cursor: default; }
.tabel-month thead th small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.tabel-month thead th.now { color: var(--ok); box-shadow: inset 0 -2px 0 var(--ok); }
.tabel-month td { width: 20px; min-width: 20px; height: 26px; }
.tabel-month .sum { width: auto; min-width: 44px; padding: 0 6px; text-align: right; font-size: var(--t-cap); font-weight: 600; white-space: nowrap; background: none; cursor: default; border-radius: 0; }
.tabel-month thead th.sum { font-weight: 400; color: var(--muted); vertical-align: bottom; }
.tabel-month tbody th .linkish { color: var(--text); text-decoration: none; font-weight: 600; text-align: left; }
.tabel-month .tabel-all td.sum { vertical-align: bottom; border-bottom: 0; padding-bottom: 2px; }
.person .board-summary { border-bottom: 1px solid var(--line); margin: 12px -16px 0; }
.person-strip { display: flex; align-items: flex-end; gap: 2px; height: 64px; padding-top: 12px; border-bottom: 1px solid var(--line); }
.person-strip i { flex: 1; min-height: 2px; background: var(--track); border-radius: 2px 2px 0 0; }
.person-strip i.on { background: var(--ok); }
.person-facts { margin: 4px 0 0; }
.person-facts > div { display: grid; grid-template-columns: 132px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.person-facts dt { font-size: var(--t-cap); color: var(--muted); }
.person-facts dd { margin: 0; font-weight: 500; }
.person-note { margin-top: 10px; font-size: var(--t-cap); color: var(--muted); }

/* Вход на компьютере: выпадающий список и PIN с клавиатуры */
.field select { font: inherit; font-size: var(--t-name); font-weight: 500; min-height: 48px; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--text); }
.login-brand { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.login-brand b { font-size: 28px; line-height: 1.1; font-weight: 700; }
.login-brand span { color: var(--muted); }

@media (min-width: 960px) {
  .page.login-desk { max-width: none; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--desk); box-shadow: none; padding: 24px; }
  .login-card { width: 420px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--brand); padding: 30px 30px 14px; }
  .login-card .field input { letter-spacing: .35em; }
  .login-card .field input::placeholder { letter-spacing: 0; font-weight: 400; font-size: var(--t-name); }
  .login-card .pin-error { text-align: left; margin: 10px 0 6px; }
  .login-card .version { padding: 14px 0 0; }

  .ov-nav { display: flex; align-items: stretch; }
  .ov-nav .daybar { flex: 0 0 380px; border-bottom: 0; border-right: 1px solid var(--line); }
  .ov-links { flex: 1; padding: 0 16px; }
  .ov-link { min-height: 64px; padding: 0 16px; font-size: var(--t-name); }
  .ov-section { scroll-margin-top: calc(var(--bar-h) + var(--safe-top) + 66px); }
  .ov-title { flex-direction: row; align-items: baseline; gap: 14px; padding: 40px 24px 12px; font-size: 30px; }
  .ov-title small { font-size: var(--t-body); }
  .overview .shift-side { position: static; max-height: none; }
  .overview .shift-main { min-height: 0; }

  .staff-month { max-width: 380px; border-right: 1px solid var(--line); }
  .staff-head { border-bottom: 1px solid var(--line); }
  .staff-head .staff-month { border-bottom: 0; }
  .tabel-month td { width: 22px; min-width: 22px; height: 34px; }
  .tabel-month td .tv { font-size: 10px; }
  .tabel-month .sum { min-width: 40px; padding: 0 5px; font-size: var(--t-body); }
  .tabel-month thead th.sum { font-size: var(--t-cap); }
  .tabel-month .tabel-all td { height: 84px; }
  .tabel-month .tabel-all td i { max-height: 60px; }
  .tabel-month .tabel-all td .tv { font-size: 10px; }
}

/* ── Кнопка «i» и окошко с пояснением: подсказки открываются по нажатию, а не висят на экране ─────── */
.info { position: relative; display: inline-flex; vertical-align: middle; }
.info-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0 0 1px; border-radius: 50%;
  border: 1.5px solid var(--idle); background: none; color: var(--muted); font: italic 600 14px/1 Georgia, 'Times New Roman', serif; cursor: pointer;
  transition: color .12s, background-color .12s, border-color .12s; }
.info-btn:hover, .info-btn.on { color: var(--on-btn); background: var(--btn); border-color: var(--btn); }
.info .info-pop { position: absolute; z-index: 12; top: calc(100% + 11px); left: -14px; display: flex; flex-direction: column; gap: 4px; width: 340px; max-width: calc(100vw - 32px);
  padding: 14px 16px 15px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgba(6, 20, 13, .38), 0 2px 6px rgba(6, 20, 13, .08);
  font: 400 var(--t-cap)/1.5 'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif; letter-spacing: 0; text-align: left; white-space: normal; cursor: default;
  animation: info-in .14s ease-out; }
.info .info-pop::before { content: ''; position: absolute; top: -6px; left: 19px; width: 10px; height: 10px; background: var(--surface);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.info .info-pop.left { left: auto; right: -14px; }
.info .info-pop.left::before { left: auto; right: 19px; }
.info .info-pop b { margin-top: 8px; font-size: var(--t-cap); font-weight: 600; color: var(--text); }
.info .info-pop b:first-child { margin-top: 0; }
.info .info-pop span { font-size: var(--t-cap); font-weight: 400; color: var(--muted); }
@keyframes info-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 599px) {
  .info .info-pop, .info .info-pop.left { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(20px + var(--safe-bottom)); width: auto; max-width: none; }
  .info .info-pop::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .info .info-pop { animation: none; } .info-btn { transition: none; } }
.pace-line .info { margin-left: 8px; }
.ov-title > span { display: inline-flex; align-items: center; gap: 10px; }
.staff-head { display: flex; align-items: center; }
.staff-head .staff-month { flex: 1; }
.staff-info { padding: 0 16px; }
@media (min-width: 960px) { .staff-head .staff-month { flex: 0 0 380px; } }

/* Стрелка выпадающего списка — своя, с отступом от правого края как у текста слева (родная прижата к рамке) */
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }

/* «WMS Delivery» по центру шапки на всех экранах. Компьютер и планшет — посередине строки (заголовок экрана не
   заходит под название); телефон — отдельной строкой над заголовком, высота шапки и отступы липких блоков растут вместе. */
.bar { position: sticky; }
.bar-brand { font-weight: 700; color: var(--on-brand); white-space: nowrap; pointer-events: none; letter-spacing: .01em; }
@media (min-width: 600px) {
  .bar-brand { position: absolute; left: 50%; top: calc(50% + var(--safe-top) / 2); transform: translate(-50%, -50%); font-size: var(--t-name); }
  .bar-title { flex: 0 1 auto; max-width: calc(50% - 120px); margin-right: auto; }
}
@media (max-width: 599px) {
  :root { --bar-h: 76px; }
  .bar { flex-wrap: wrap; row-gap: 0; }
  .bar-brand { order: -1; flex: 0 0 100%; text-align: center; font-size: var(--t-cap); line-height: 18px; opacity: .9; }
}

/* Заголовок табеля и переключатель «Вес, кг · Позиции · Заказы»: видно, в чём цифры в клетках */
.tabel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; padding: 14px 16px 2px; }
.tabel-title { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: var(--t-name); font-weight: 600; }
.tabel-title small { font-size: var(--t-cap); font-weight: 400; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--track); }
.seg-btn { border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--t-cap); font-weight: 600; padding: 7px 12px; border-radius: 7px; min-height: 34px; cursor: pointer;
  transition: background-color .12s, color .12s; }
.seg-btn:hover:not(:disabled):not(.on) { color: var(--text); }
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(6, 20, 13, .14), 0 0 0 1px var(--line); }
.seg-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .seg-btn { transition: none; } }
.tabel .tabel-scroll { padding-top: 10px; }
@media (min-width: 960px) {
  .tabel-head { padding: 22px 24px 4px 24px; }
  .tabel-title { font-size: 20px; }
  .seg-btn { font-size: var(--t-body); padding: 8px 16px; }
}
.report thead th { white-space: nowrap; }

/* Время смены: общее, активное, работа сборщиков, темп на сборщика — отдельными полями, а не одной фразой */
.pace-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 14px 0 0; }
.pace-facts > div { display: flex; flex-direction: column; gap: 1px; padding-left: 10px; border-left: 2px solid var(--line); }
.pace-facts dt { font-size: var(--t-cap); color: var(--muted); }
.pace-facts dd { margin: 0; font-size: var(--t-name); font-weight: 600; }
.pace-facts small { font-size: 12px; color: var(--muted); }
@media (min-width: 960px) { .pace-facts { grid-template-columns: repeat(4, minmax(0, 220px)); gap: 16px 24px; } }

/* Выбор дня на компьютере: подпись дня — кнопка с тихим значком календаря, под ней — календарь месяца */
.daybar { position: relative; }
.daybar-pick { border: 0; background: none; color: inherit; font: inherit; border-radius: 8px; margin: 6px 0; transition: background-color .12s; }
.daybar-pick:hover, .daybar-pick.on { background: var(--bg); }
.daybar-pick b { display: inline-flex; align-items: center; gap: 8px; }
.daybar-cal { width: 15px; height: 15px; color: var(--idle); transition: color .12s; }
.daybar-pick:hover .daybar-cal, .daybar-pick.on .daybar-cal { color: var(--ok); }
.daypick { position: absolute; z-index: 15; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 300px; padding: 12px 12px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 22px 48px -14px rgba(6, 20, 13, .42), 0 2px 6px rgba(6, 20, 13, .08); animation: daypick-in .14s ease-out; }
@keyframes daypick-in { from { opacity: 0; transform: translate(-50%, -4px); } }
.daypick-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; margin-bottom: 6px; }
.daypick-head b { text-align: center; font-size: var(--t-body); font-weight: 600; text-transform: none; }
.daypick-step { border: 0; background: none; color: var(--ok); font-size: 22px; line-height: 1; height: 34px; border-radius: 8px; cursor: pointer; }
.daypick-step:hover:not(:disabled) { background: var(--bg); }
.daypick-step:disabled { color: var(--idle); cursor: default; }
.daypick-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.daypick-wd { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0 6px; }
.daypick-wd.we { color: var(--idle); }
.daypick-day { height: 36px; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--t-body); font-variant-numeric: tabular-nums; border-radius: 8px; cursor: pointer; }
.daypick-day:hover:not(:disabled):not(.on) { background: var(--bg); }
.daypick-day.now { box-shadow: inset 0 0 0 1.5px var(--ok); font-weight: 600; }
.daypick-day.on { background: var(--btn); color: var(--on-btn); font-weight: 600; box-shadow: none; }
.daypick-day:disabled { color: var(--idle); opacity: .5; cursor: default; }
.daypick-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.daypick-quick { border: 0; background: none; color: var(--ok); font: inherit; font-size: var(--t-cap); font-weight: 600; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.daypick-quick:hover { background: var(--bg); }
.daypick-foot span { margin-left: auto; font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .daypick { animation: none; } .daybar-pick, .daybar-cal { transition: none; } }
