/* ═══ «Штабелёры: потребность» (19.10.2026) ═══════════════════════════════════
   Тепловые таблицы как «Операции по часам» в «Команде»: заливка акцентом по доле,
   больше, чем машин, — бордо. Префикс stk-, чтобы не задеть чужие классы. */
.stk-view .tblock{margin-bottom:14px}
.stk-wait{padding:20px;color:var(--text-2);font-size:13px}

/* Строка выбора: период, день, часы, сколько машин, «Как считаем». */
.stk-ctl{display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap;margin-bottom:12px}
.stk-ctl .mrpick{margin:0}
.stk-f{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-2);font-weight:600}
.stk-f select{min-width:0}
.stk-dash{font-weight:400;color:var(--text-3)}
.stk-how{margin-left:auto}

/* Один день: шапка с возвратом. */
.stk-dayhead{display:flex;align-items:center;gap:14px;margin:0 0 12px}
.stk-dayhead h2{margin:0;font-size:18px;font-weight:700;color:var(--text-1)}

.stk-click{cursor:pointer}
.stk-click:hover{outline:2px solid var(--accent-line,var(--accent));outline-offset:-2px}

/* Тепловая таблица. */
.stk-hw{overflow-x:auto;overscroll-behavior-x:contain}
/* Дни периода листаются внутри: шапка с часами и строки «в среднем» стоят на месте. */
.stk-hw.tall{max-height:640px;overflow:auto;overscroll-behavior:contain}
.stk-hw.tall .stk-hm thead th{position:sticky;top:0;z-index:2}
.stk-hw.tall .stk-hm thead th.lab{z-index:3}
.stk-hw.tall .stk-hm tfoot th,.stk-hw.tall .stk-hm tfoot td{position:sticky;z-index:2}
.stk-hw.tall .stk-hm tfoot tr.avg>*{bottom:56px}
.stk-hw.tall .stk-hm tfoot tr.tasks>*{bottom:28px}
.stk-hw.tall .stk-hm tfoot tr.days>*{bottom:0}
.stk-hw.tall .stk-hm tfoot th.lab{z-index:3}
.stk-hm{border-collapse:collapse;width:100%;font-size:12px;font-variant-numeric:tabular-nums}
.stk-hm th,.stk-hm td{border:1px solid var(--hair-2);padding:0;height:28px;text-align:center;min-width:34px}
.stk-hm thead th{background:var(--surface-head,var(--surface-3));font-size:11px;font-weight:600;color:var(--text-2);height:26px;border-top:0}
.stk-hm th.lab{text-align:left;padding:0 10px;white-space:nowrap;font-weight:600;color:var(--text-1);background:var(--surface-2);min-width:120px;position:sticky;left:0;z-index:1}
.stk-hm thead th.lab{background:var(--surface-head,var(--surface-3))}
.stk-hm th.lab small{margin-left:6px;font-size:11px;font-weight:500;color:var(--text-3)}
.stk-hm th.lab.we{color:var(--loss)}
.stk-hm th.lab[data-d]{cursor:pointer}
.stk-hm th.lab[data-d]:hover{color:var(--accent);text-decoration:underline}
.stk-hm td.c{background:var(--surface-2);color:var(--text-1);font-weight:600}
.stk-hm td.c[data-d]{cursor:pointer}
.stk-hm td.c[data-d]:hover{outline:2px solid var(--accent);outline-offset:-2px}
/* Больше, чем машин: бордо, белые цифры — читаются на тёмной заливке в обеих темах. */
.stk-hm .tot{font-weight:700;padding:0 8px;background:var(--surface-3);white-space:nowrap}
.stk-hm .tot.loss{color:var(--loss)}
.stk-hm tfoot tr.sum th,.stk-hm tfoot tr.sum td{background:var(--surface-3);font-weight:700}
.stk-hm tfoot tr.avg>*{border-top:2px solid var(--edge,var(--hair-2))}
.stk-hm tr.sum.top th,.stk-hm tr.sum.top td{background:var(--surface-3);font-weight:700;border-bottom:2px solid var(--edge,var(--hair-2))}
.stk-hm tr>:first-child{border-left:0}
.stk-hm tr>:last-child{border-right:0}
.stk-hm tbody tr:last-child>*{border-bottom:0}
/* Таблица людей: роль справа от фамилии, строки ниже (Раиль 19.10.2026). */
.stk-ppl th.lab .nm{font-weight:650}
.stk-ppl th.lab .rl{margin-left:8px;font-size:11px;font-weight:500;color:var(--text-3)}
.stk-ppl tbody th,.stk-ppl tbody td{height:24px}
.stk-ppl td.c{min-width:58px;white-space:nowrap;font-size:12px}
.stk-ppl td.c small{font-size:11px;font-weight:500;color:var(--text-2)}
.stk-hm th.srt{cursor:pointer;user-select:none}
.stk-hm th.srt:hover,.stk-hm th.srt.on{color:var(--accent)}
/* Лента дня по 10 минут: клетки мелкие, час отделён линией потолще. */
.stk-tl10 th,.stk-tl10 td{min-width:18px;height:22px;font-size:11px}
.stk-tl10 td.c{font-weight:600}
.stk-tl10 td.hs,.stk-tl10 thead th:not(.lab){border-left:2px solid var(--edge,var(--hair-2))}
.stk-tl10 th.lab{min-width:150px}

/* Профиль недели и клиенты — рядом. */
.stk-pair{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:14px;align-items:stretch}
.stk-pair>.tblock{margin-bottom:14px;min-width:0}
@media (max-width:1280px){.stk-pair{grid-template-columns:minmax(0,1fr)}}
.stk-wk th.lab{min-width:130px}
.stk-scroll{max-height:420px;overflow:auto;overscroll-behavior:contain}
.stk-scroll>table>thead th{position:sticky;top:0;z-index:2;background:var(--surface-head,var(--surface-3))}
.stk-tbl td.nw{white-space:nowrap}
.stk-tbl b.gain{color:var(--gain)}
.stk-note{font-size:12.5px;color:var(--text-2);line-height:1.5;margin:0 0 10px}
.stk-ok{font-size:13px;color:var(--gain);font-weight:600;padding:4px 0}
.stk-adv{padding:2px 0}

/* Лента дня: строка на человека, полоса — штабелёр у него. */
.stk-tl{display:flex;flex-direction:column;gap:2px;padding:4px 0}
.stk-tl-row{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;min-height:26px}
.stk-tl-row .nm{font-size:12.5px;font-weight:600;color:var(--text-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:10px}
.stk-tl-row .nm small{margin-left:6px;font-weight:500;color:var(--text-3);font-size:11px}
.stk-tl-row .tr{position:relative;height:18px;background:var(--surface-3);border-radius:4px}
.stk-tl-row .tr .g{position:absolute;top:0;bottom:0;width:1px;background:var(--hair-2)}
.stk-tl-row .tr .bar{position:absolute;top:2px;bottom:2px;background:var(--accent);border-radius:3px;min-width:2px}
.stk-tl-row .tr .ov{position:absolute;top:2px;bottom:2px;background:var(--loss);border-radius:3px;min-width:2px}
.stk-tl-row.axis .tr{background:none;height:16px}
.stk-tl-row.axis .tr span:first-child{transform:none}
.stk-tl-row.axis .tr span:last-child{transform:translateX(-100%)}
.stk-tl-row.axis .tr span{position:absolute;transform:translateX(-50%);font-size:11px;color:var(--text-3);font-variant-numeric:tabular-nums}
.stk-tl-row.ovr .nm{color:var(--loss)}

/* Окна. */
.stk-modal{min-width:min(640px,92vw)}
.stk-modal .modal-head{display:flex;align-items:center;gap:12px;padding:12px 14px 12px 20px}
.stk-modal .modal-head h2{margin:0;font-size:16px;font-weight:600}
.stk-modal .modal-head .th-note{margin-left:auto;font-size:12px;color:var(--text-3)}
.stk-modal .modal-body{padding:14px 20px 18px}
.stk-how-l{margin:0;padding-left:18px;font-size:13px;line-height:1.55;color:var(--text-1)}
.stk-how-l li+li{margin-top:6px}

@media (max-width:720px){
  .stk-view .bento.c5{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stk-how{margin-left:0}
  .stk-tl-row{grid-template-columns:110px minmax(0,1fr)}
  .stk-tl-row .nm small{display:none}
}

/* Объём за час: задачи со штабелёром и коробки в них — нейтрально, без заливки. */
.stk-hm tr.sum.vol td.c{color:var(--text-1);font-weight:700}
.stk-hm tr.sum.vol th.lab{color:var(--text-2)}
.stk-hm tfoot tr.tasks td.c{background:var(--surface-3)}

/* ═══ 19.10.2026 (вечер), по Раилю ═══════════════════════════════════════════
   Границы — почти чёрные и одной толщины, как в «Команде» (--grid-line). Шкала: меньше, чем машин, —
   зелёный по насыщенности; столько же — жёлтый; +1 — оранжевый; +2 — красный; ещё больше — тёмно-красный.
   Клетка заливается целиком, без второй рамки внутри. */
.stk-view{--grid-line:color-mix(in srgb,var(--text-1) 72%,transparent);
  --h-g1:color-mix(in srgb,var(--gain) 16%,var(--surface-2));
  --h-g2:color-mix(in srgb,var(--gain) 30%,var(--surface-2));
  --h-g3:color-mix(in srgb,var(--gain) 46%,var(--surface-2));
  --h-y:color-mix(in srgb,var(--mid) 42%,var(--surface-2));
  --h-o:color-mix(in srgb,color-mix(in srgb,var(--mid) 45%,var(--loss)) 55%,var(--surface-2));
  --h-r:color-mix(in srgb,var(--loss) 52%,var(--surface-2));
  --h-rr:color-mix(in srgb,var(--loss) 88%,var(--surface-2))}
.stk-view .stk-hm th,.stk-view .stk-hm td,.stk-view .stk-tbl th,.stk-view .stk-tbl td{border:1px solid var(--grid-line)}
.stk-view .stk-hm tfoot tr.avg>*,.stk-view .stk-hm tr.sum.top th,.stk-view .stk-hm tr.sum.top td,
.stk-view .stk-tl10 td.hs,.stk-view .stk-tl10 thead th:not(.lab){border-width:1px}
.stk-view .stk-hm thead th{border-top:1px solid var(--grid-line)}
.stk-view .stk-hm tr>:first-child{border-left:1px solid var(--grid-line)}
.stk-view .stk-hm tr>:last-child{border-right:1px solid var(--grid-line)}
.stk-view .stk-hm tbody tr:last-child>*{border-bottom:1px solid var(--grid-line)}
.stk-view .stk-hm td.c.g1{background:var(--h-g1)}
.stk-view .stk-hm td.c.g2{background:var(--h-g2)}
.stk-view .stk-hm td.c.g3{background:var(--h-g3)}
.stk-view .stk-hm td.c.y{background:var(--h-y)}
.stk-view .stk-hm td.c.o{background:var(--h-o)}
.stk-view .stk-hm td.c.r{background:var(--h-r);font-weight:800}
.stk-view .stk-hm td.c.rr{background:var(--h-rr);color:#fff;font-weight:800}
.stk-view .stk-hm td.c.rr small{color:#fff}
/* Строки итогов: серый фон, шкала поверх него. */
.stk-hm tr.sum th.lab{background:var(--surface-3)}

/* «Кого можно было сдвинуть» — ниже строки и короче пояснение. */
.stk-adv .stk-tbl th{height:22px;padding:3px 9px;font-size:10px}
.stk-adv .stk-tbl td{height:24px;padding:2px 9px;font-size:12.5px}
.stk-adv .stk-tbl td.k:last-child{font-size:12px;color:var(--text-2)}

/* ═══ 20.10.2026, по Раилю ═══════════════════════════════════════════════════
   Все границы во всех таблицах раздела — почти чёрные, одной толщины: общие правила сайта для таблиц
   (шапки, итоги, липкий первый столбец) местами перебивали цвет на серый. */
.stk-view table.stk-hm th,.stk-view table.stk-hm td,
.stk-view table.stk-tbl th,.stk-view table.stk-tbl td{border:1px solid var(--grid-line) !important}
/* «12 м / 3 з»: задачи отделены пробелами и другим цветом, чтобы не сливались с минутами. */
.stk-ppl td.c{min-width:78px}
.stk-ppl td.c .zd{color:var(--accent);font-weight:600;font-size:11.5px}
.stk-view .stk-hm td.c.rr .zd{color:#fff}
/* Лента дня: штабелёр у человека — один цвет. */
.stk-view .stk-hm td.c.on{background:color-mix(in srgb,var(--accent) 26%,var(--surface-2))}

/* ═══ 20.10.2026 (вечер), по Раилю ═══════════════════════════════════════════
   Строки итогов внизу прилипают при прокрутке, и при общих («схлопнутых») границах браузер рисует
   их фон поверх линий — между клетками оставались светлые щели. Границы теперь у каждой клетки свои:
   справа и снизу, у первого столбца — слева, у первой строки шапки — сверху. */
.stk-view table.stk-hm{border-collapse:separate;border-spacing:0}
.stk-view table.stk-hm th,.stk-view table.stk-hm td{border:0 !important;border-right:1px solid var(--grid-line) !important;border-bottom:1px solid var(--grid-line) !important}
.stk-view table.stk-hm tr>:first-child{border-left:1px solid var(--grid-line) !important}
.stk-view table.stk-hm thead tr:first-child>*{border-top:1px solid var(--grid-line) !important}
/* «Задач» за день — число чёрным, заливка по самому загруженному дню. */
.stk-hm td.c.n{padding:0 8px;min-width:52px}
/* Задачи — чёрным, не тусклым (Раиль 20.10.2026). */
.stk-ppl td.c .zd,.stk-view .stk-hm td.c .zd{color:var(--text-1);font-weight:600}
.stk-view .stk-hm td.c.rr .zd{color:#fff}
.stk-hm tr.sum.vol th.lab{color:var(--text-1)}
.stk-view table.stk-tbl{border-collapse:separate;border-spacing:0}
.stk-view table.stk-tbl th,.stk-view table.stk-tbl td{border:0 !important;border-right:1px solid var(--grid-line) !important;border-bottom:1px solid var(--grid-line) !important}
.stk-view table.stk-tbl tr>:first-child{border-left:1px solid var(--grid-line) !important}
.stk-view table.stk-tbl thead tr:first-child>*{border-top:1px solid var(--grid-line) !important}
.stk-wk tbody th,.stk-wk tbody td{height:40px}

/* ═══ 20.10.2026 (поздно), по Раилю ══════════════════════════════════════════
   Шапка списка клиентов при прокрутке: первая ячейка шапки стояла в одном слое с первым столбцом строк
   (общее правило сайта закрепляет первый столбец), и строки наезжали на «Клиент». Шапка — слоем выше. */
.stk-view .stk-scroll>table>thead>tr>th{position:sticky;top:0;z-index:5 !important}
/* Клиент выбирается нажатием, Ctrl или ⌘ — несколько. */
.stk-cl tbody tr{cursor:pointer}
.stk-view .stk-cl tbody tr:hover>td{--col-stick:var(--surface-3);background:var(--surface-3) !important}
.stk-view .stk-cl tbody tr.sel>td{--col-stick:color-mix(in srgb,var(--accent) 16%,var(--surface-2));background:color-mix(in srgb,var(--accent) 16%,var(--surface-2)) !important;font-weight:650}
.stk-view .stk-cl tbody tr.sel>td:first-child{box-shadow:inset 3px 0 0 var(--accent)}
/* Примерка переноса. */
.stk-mctl{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;margin:0 0 10px}
.stk-hm .tot.gain{color:var(--gain)}
.stk-view .bento .bv.gain{color:var(--gain)}
.stk-mctl{padding:10px 12px 0}
.stk-warn{padding:8px 12px 0;color:var(--loss);font-weight:600}
