/* Сайт «Склад и поставки», спека 023. Экраны склада: станция и файлы дня, очередь.
   Файлы site*.css подключаются в base.html по порядку: порядок задаёт каскад. Цвета - только в :root из site.css. */

/* ---------- Экраны склада: станция и файлы дня ---------- */

.warehouse { font-size: var(--text-warehouse); line-height: 1.4; }

.warehouse .lead { font-size: var(--text-warehouse); }

.warehouse h2 { font-size: 32px; }

.warehouse .btn { min-height: 72px; font-size: 25px; }

.warehouse .mock-panel { bottom: auto; top: 104px; }

.warehouse .switcher a { font-size: 24px; padding: 12px 22px; }

.warehouse .switcher a small { font-size: 20px; }

.station-top {
  background: var(--surface); border-bottom: 1px solid var(--line);
}

.station-top .inner {
  max-width: 980px; margin: 0 auto; padding: 18px var(--gap);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}

.station-top .who { font-family: var(--display); font-weight: 600; font-size: 34px; }

.station-top a { font-size: 20px; color: var(--ink-faint); }

.station { max-width: 980px; margin: 0 auto; padding: 28px var(--gap) 280px; }

.station-count { font-family: var(--mono); font-size: 52px; line-height: 1; }

.station-count small { font-size: 26px; color: var(--ink-dim); font-family: var(--display); }

.scan-zone {
  margin-top: 24px; padding: 36px; border-radius: var(--radius-card);
  background: var(--surface); border: 3px solid var(--line-strong); box-shadow: var(--shadow);
}

.scan-zone.ok { border-color: var(--green-ink); }

.scan-zone.start { text-align: center; padding: 56px 36px; }

.scan-zone.start .actions { justify-content: center; margin-top: 32px; }

.scan-zone.start .btn-main { min-height: 88px; font-size: 32px; padding: 18px 56px; }

.scan-zone.wait-code { border-color: var(--amber); }

.scan-zone.wrong { border-color: var(--amber-ink); background: var(--amber-soft); }

.scan-zone .say { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1.2; }

.scan-zone .what { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1.15; }

.scan-zone .then { margin-top: 12px; font-size: 28px; color: var(--ink-dim); }

.scan-zone .then.ok { color: var(--green-ink); }

.sticker {
  display: inline-flex; flex-direction: column; margin-top: 20px;
  padding: 14px 22px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
}

.sticker span { font-family: var(--mono); font-size: 20px; letter-spacing: .12em; color: var(--ink-dim); }

.sticker b { font-family: var(--mono); font-size: 52px; line-height: 1; }

.code-picture { display: inline-grid; grid-template-columns: repeat(5, 11px); gap: 3px; vertical-align: middle; margin-left: 12px; }

.code-picture i { width: 11px; height: 11px; background: var(--ink); }

.code-picture i:nth-child(3n) { background: transparent; }

.collected { list-style: none; margin-top: 16px; }

.collected li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }

.collected .last-digits { font-family: var(--mono); font-size: 38px; }

.collected .last-digits small { font-size: 20px; color: var(--ink-faint); }

.station-buttons { margin-top: 18px; }

.station-buttons .inner { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }

/* Карточка вещи после скана: фото, артикул, полка */
.item-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; align-items: center; }

.photo { width: 132px; height: 132px; border-radius: var(--radius-card); border: 1px solid var(--line-strong); }

.item-facts { margin-top: 8px; font-size: 26px; color: var(--ink-dim); }

.item-facts .mono { color: var(--ink); font-weight: 700; }

/* Что осталось собрать */
.station-note { font-size: var(--text-warehouse); margin-top: 6px; }

.station-search { display: block; margin-top: 18px; font-size: var(--text-warehouse); color: var(--ink-dim); }

.station-search input, .shelf-form input, .card label input:not([hidden]) {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius);
}

.to-collect-list { list-style: none; margin-top: 16px; }

.to-collect { border-bottom: 1px solid var(--line); }

.to-collect summary {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px 20px; align-items: baseline;
  padding: 18px 0; cursor: pointer; list-style: none;
}

.to-collect summary::-webkit-details-marker { display: none; }

.to-collect .shelf { font-size: 30px; font-weight: 700; grid-row: 1 / 3; }

.to-collect .name { font-family: var(--display); font-weight: 600; }

.to-collect .progress { text-align: right; font-size: 22px; }

.to-collect .waits { grid-column: 2 / 4; font-size: 20px; color: var(--ink-faint); }

.to-collect .waits.old { color: var(--amber-ink); font-weight: 600; }

.to-collect .orders { list-style: none; padding: 0 0 18px 116px; }

.order-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 10px 0; font-size: 21px; }

.order-line .last-digits { font-family: var(--mono); font-size: 30px; }

.order-line .last-digits small { font-size: 20px; color: var(--ink-faint); }

.order-line .btn { min-height: 56px; font-size: 20px; }

/* Счётчики перед выводом кодов */
.counters { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.counters li { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 15px; color: var(--ink-dim); }

.counters b { font-size: 20px; color: var(--ink); }

.last-digits b { font-size: 26px; }

/* Полки и короба: список слева, выбранное справа */
.shelves-layout { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 20px; align-items: start; }

.shelves-layout .card { margin: 0; }

.shelf-list { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }

.shelf-button {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px;
  font: inherit; text-align: left; color: var(--ink); background: transparent;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
}

.shelf-button:hover { background: var(--bg); }

.shelf-button[aria-current="true"] { background: var(--surface-2); border-color: var(--line-strong); font-weight: 600; }

.shelf-button .mono { font-size: 20px; }

.shelf-button .dim { font-size: 15px; font-weight: 400; }

.shelf-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 12px; }

.shelf-form label { font-size: 16px; color: var(--ink-dim); width: 120px; }

.upload { cursor: pointer; position: relative; }

/* Поле файла не прячем атрибутом hidden: тогда до него не дойти с клавиатуры. */
label.upload input[type="file"] { position: absolute; inset: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; }

.upload:focus-within { outline: 3px solid var(--amber-ink); outline-offset: 2px; }

.station-shop { font-family: var(--display); font-weight: 600; font-size: var(--text-warehouse); color: var(--ink-dim); margin-bottom: 6px; }

.code-cell { word-break: break-all; }

.fbo-steps.three { grid-template-columns: repeat(3, 1fr); }

.add-panel { margin-top: 20px; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-card); background: var(--bg); }

.add-panel h3 { font-family: var(--display); font-size: 20px; margin-bottom: 8px; }

.add-panel .shelf-form label { width: auto; }

.size-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.size-grid label { width: 84px; font-family: var(--display); font-weight: 600; }

.size-grid input { width: 100%; min-height: 48px; font-size: 20px; text-align: center; }

.product-list { list-style: none; margin-top: 14px; }

.product-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }

.product-list li:last-child { border-bottom: 0; }

.product-list .photo { width: 72px; height: 72px; }

.product-list b { font-family: var(--display); font-weight: 600; }

.product-list .dim { font-size: 15px; margin-top: 2px; overflow-wrap: anywhere; }

.product-side { text-align: right; font-size: 16px; }

.counter { display: inline-flex; align-items: center; gap: 4px; }

.counter .btn { min-height: 40px; padding: 4px 12px; font-size: 22px; }

.counter b { min-width: 32px; text-align: center; font-size: 19px; }

/* Шаги FBO */
.fbo-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: none; }

.fbo-steps li { display: flex; gap: 10px; align-items: center; font-family: var(--display); font-weight: 600; color: var(--ink-faint); }

.fbo-steps .mark {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); border: 1px solid var(--line-strong);
}

.fbo-steps .done { color: var(--green-ink); }

.fbo-steps .done .mark { border-color: var(--green-ink); }

.fbo-steps .now { color: var(--ink); }

.fbo-steps .now .mark { background: var(--amber); border-color: var(--amber); }

/* Этикетки коробов 58×40 */
.box-labels { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }

.box-label {
  width: 232px; height: 160px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--ink);
  border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; gap: 4px 12px;
}

.box-label-title { grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-size: 18px; }

.box-label .code-picture { margin: 0; grid-row: 2 / 4; align-self: center; }

.box-label-code { font-size: 34px; font-weight: 700; align-self: center; line-height: 1; }

.box-label-code small { font-size: 14px; font-weight: 400; color: var(--ink-dim); }

.box-label-n { font-size: 20px; text-align: right; }

.station-buttons .btn { min-height: 84px; font-size: 27px; }

.files-list { list-style: none; }

.files-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }

.files-list b { font-family: var(--display); font-weight: 600; font-size: 29px; }

.files-list .meta { grid-column: 1; font-size: 22px; color: var(--ink-dim); }

.files-list .btn { grid-row: 1 / 3; grid-column: 2; }

/* ---------- Очередь ---------- */

.queue { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.queue .card { margin: 0; display: flex; flex-direction: column; gap: 12px; }

.queue .card.first { border-color: var(--amber); }
