:root {
  --dk: 0%; --dkt: 0%;   /* тема: 0% — светлая, 100% — тёмная (см. themeApply в app.js) */
  --bg: #f5f6f8; --panel: #fff; --line: #e3e6eb; --text: #1d232b; --muted: #6b7480;
  --acc: #5b3df5; --acc-2: #efeaff; --ok: #138a4b; --ok-bg: #e6f6ed; --warn: #a15c00; --warn-bg: #fff3df;
  --err: #c0262d; --err-bg: #fdecec; --side: #17151f; --side-text: #c9c6d6; --r: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
.hidden { display: none !important; }
a { color: var(--acc); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.err { color: var(--err); margin-top: 8px; white-space: pre-wrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* layout */
.app { display: flex; min-height: 100vh; }
.side { width: 220px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.brand { color: #fff; font-weight: 700; font-size: 16px; padding: 18px 18px 12px; }
.side nav { flex: 1; overflow: auto; padding: 4px 8px; }
.side nav a { display: flex; align-items: center; gap: 10px; color: var(--side-text); padding: 8px 10px; border-radius: 8px; margin: 1px 0; }
.side nav a:hover { background: #24212f; color: #fff; }
.side nav a.on { background: var(--acc); color: #fff; }
.side nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7d7890; margin: 14px 10px 4px; }
.side nav .badge { margin-left: auto; background: #ff4d6d; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; }
.side-foot { padding: 12px 18px; border-top: 1px solid #2a2735; font-size: 12px; display: flex; justify-content: space-between; }
main { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h2 { font-size: 18px; }
.top-r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.burger { display: none; }
.brand { display: flex; align-items: center; gap: 8px; }
.side-pin { margin-left: auto; background: none; border: 0; color: #7d7890; font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.side-pin:hover { background: #24212f; color: #fff; }
.side-hot { display: none; }
/* меню прячется у левого края и выезжает при наведении (кнопка ⇤/⇥ — закрепить) */
@media (min-width: 861px) {
  .app:not(.pinned) .side { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .18s ease .3s, box-shadow .18s ease .3s; }
  .app:not(.pinned) .side-hot:hover + .side, .app:not(.pinned) .side:hover, .app:not(.pinned) .side.open { transform: none; transition-delay: 0s; box-shadow: 6px 0 24px rgba(0, 0, 0, .25); }
  .app:not(.pinned) .side-hot { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 14px; z-index: 39; }
  .app:not(.pinned) .side-hot::after { content: ''; position: absolute; left: 0; top: 50%; height: 64px; margin-top: -32px; width: 4px; border-radius: 0 4px 4px 0; background: var(--acc); opacity: .45; }
  .app:not(.pinned) .burger { display: inline-block; }
}
@media (max-width: 860px) { .side-pin { display: none; } }
#view { padding: 20px 24px 60px; }

/* elements */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi .v { font-size: 24px; font-weight: 650; margin-top: 4px; }
.kpi .l { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.chk { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc-2); border-color: var(--acc); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--acc); }
textarea { min-height: 90px; resize: vertical; }
.btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 7px 13px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c9ccd3; background: #fafbfc; }
.btn.primary { background: var(--acc); color: #fff; border-color: var(--acc); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-color: var(--acc); font-weight: 600; }

/* tables */
.tbl-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafaff; }
tr.click { cursor: pointer; }
tfoot td { font-weight: 600; background: #fafbfc; }
td input, td select { padding: 4px 6px; width: 100%; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef0f3; color: #3c4450; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.err { background: var(--err-bg); color: var(--err); }
.pill.acc { background: var(--acc-2); color: var(--acc); }
.neg { color: var(--err); }
.thumb { width: 34px; height: 44px; object-fit: cover; border-radius: 4px; background: #eee; }
.note { background: var(--warn-bg); color: #5d3a00; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.note.info { background: var(--acc-2); color: #2c1d8c; }

/* timesheet */
.ts td, .ts th { padding: 3px 4px; font-size: 12px; }
.ts td.cell { min-width: 64px; cursor: pointer; text-align: center; line-height: 1.25; }
.ts td.cell:hover { outline: 2px solid var(--acc); outline-offset: -2px; }
.ts td.we { background: #f7f5ff; }
.ts .m-off { background: #eceff3; } .ts .m-holiday { background: #ffe9c7; } .ts .m-vacation { background: #d9f2ff; }
.ts .m-sick { background: #ffe0e0; } .ts .m-absent { background: #ffd0d8; } .ts .m-x15 { background: #e3f7d9; }
.ts .m-trainee { background: #fff8c7; } .ts .m-warning { background: #ffb3b3; } .ts .m-praise { background: #c8f0e0; }
.ts th.name { position: sticky; left: 0; background: #fff; z-index: 2; min-width: 170px; text-align: left; }
.ts td.name { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 500; white-space: nowrap; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(20, 18, 30, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 50; overflow: auto; padding: 40px 12px; }
.modal-box { background: #fff; border-radius: 14px; width: min(980px, 100%); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box.sm { width: min(520px, 100%); }
.modal-box h3 { margin-top: 0; font-size: 17px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 60; max-height: 280px; overflow: auto; }
.ac-list div { padding: 7px 10px; cursor: pointer; }
.ac-list div:hover, .ac-list div.on { background: var(--acc-2); }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: #22202b; color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 420px; box-shadow: 0 8px 24px rgba(0,0,0,.2); white-space: pre-wrap; }
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 340px; display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { font-size: 20px; }

.bars { display: flex; gap: 6px; align-items: flex-end; height: 120px; }
.bars div { flex: 1; background: var(--acc); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bars span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.bars b { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; }

@media (max-width: 860px) {
  .side { position: fixed; left: -240px; z-index: 40; transition: left .2s; }
  .side.open { left: 0; }
  .burger { display: inline-block; }
  #view { padding: 14px 10px 60px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* табель как в Google Таблице: даты слева, ФИО сверху */
.ts2-wrap { max-height: calc(100vh - 170px); }
.ts2 { border-collapse: separate; border-spacing: 0; }
.ts2 th, .ts2 td { padding: 0; font-size: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.ts2 thead th { position: sticky; top: 0; z-index: 3; background: #dfe7f5; padding: 5px 8px; font-weight: 600; }
.ts2 thead tr:nth-child(2) th { top: 29px; font-weight: 500; font-size: 12px; }
.ts2 th.fio { font-size: 13.5px; border-bottom: 1px solid #c7d2e6; }
.ts2 th.hh { background: #c9d6f0; }
.ts2 .dt { position: sticky; left: 0; z-index: 2; background: #dfe7f5; font-weight: 600; padding: 5px 10px; min-width: 96px; }
.ts2 thead th.dt { z-index: 4; text-transform: capitalize; }
.ts2 td.dt.we { color: #b0284a; }
.ts2 td.in input { width: 64px; border: 0; background: transparent; text-align: center; font: inherit; padding: 6px 4px; border-radius: 0; }
.ts2 td.in input:focus { outline: 2px solid var(--acc); outline-offset: -2px; background: #fff; }
.ts2 td.h { background: #e9eef8; cursor: pointer; padding: 5px 8px; min-width: 56px; }
.ts2 td.h:hover { outline: 2px solid var(--acc); outline-offset: -2px; }
.ts2 td.hd { background: #dfe7f5; padding: 5px 8px; min-width: 64px; border-right: 2px solid #b8c4dc; }
.ts2 td.gray { background: #d6d6d6; }
.ts2 td.h.gray, .ts2 td.hd.gray { background: #cfd6e4; }
.ts2 .mk { display: block; font-size: 10px; line-height: 1.1; color: #333; }
.ts2 td.m-vacation { background: #d9f2ff; } .ts2 td.m-sick { background: #ffe0e0; } .ts2 td.m-x15 { background: #e3f7d9; }
.ts2 td.m-absent { background: #ffd0d8; } .ts2 td.m-holiday { background: #ffe9c7; } .ts2 td.m-trainee { background: #fff8c7; }
.ts2 tfoot td { position: sticky; bottom: 0; z-index: 2; background: #fff36b; font-weight: 700; padding: 6px 8px; border-top: 2px solid #333; }
.ts2 tfoot td.dt { z-index: 3; background: #fff36b; }

.ts2 th.fio .x-rm { border: 0; background: transparent; color: #8a94a6; cursor: pointer; font-size: 12px; padding: 0 4px; }
.ts2 th.fio .x-rm:hover { color: #c62828; }

/* Аналитика: «Продажи (данные)» */
.an { font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
.an th, .an td { padding: 4px 7px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.an thead th { position: sticky; top: 0; background: #f6f7f9; z-index: 2; vertical-align: bottom; white-space: normal; min-width: 54px; max-width: 110px; font-weight: 600; line-height: 1.2; }
.an thead tr.g th { top: 0; text-align: center; background: #e9edf3; border-left: 2px solid #fff; }
.an thead tr.h th { top: 25px; }
.an td.k, .an th.k { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 240px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.an thead th.k { z-index: 3; background: #e9edf3; }
.an tr.par td { background: #f3f6fb; font-weight: 600; cursor: pointer; }
.an tr.par td.k { background: #f3f6fb; }
.an tr.par td.k::before { content: '▸ '; color: #8a94a6; }
.an tr.par.open td.k::before { content: '▾ '; }
.an tr.sz td.k { padding-left: 22px; color: #44506a; }
.an td.z { color: #c3c8d2; }
.an td.neg { color: #c62828; }
.an .bl { border-left: 2px solid #e3e7ee; }
.an-state { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.an-state b.err { color: #c62828; }
.anset table td, .anset table th { padding: 3px 6px; font-size: 12.5px; }
.anset select { padding: 2px 4px; font-size: 12.5px; }
.an select.dSt { width: 118px; padding: 1px 2px; font-size: 12px; }
.an input.dPl { padding: 1px 4px; font-size: 12.5px; }
.an select.sSt { width: 120px; padding: 1px 2px; font-size: 12px; }
.an input.sSew, .an input.sRes { padding: 1px 4px; font-size: 12.5px; }
.an tr.shared td.num.sh, .an-state .sh { background: #efe3fb; }
.an.pr select.pMeth { width: 130px; padding: 1px 2px; font-size: 12px; }
.an.pr input.pFilm { padding: 1px 4px; font-size: 12px; }

/* размер + артикул — одна ссылка на карточку товара */
a[data-prod] .muted { color: inherit; opacity: .75; }
a[data-prod]:hover .muted { opacity: 1; text-decoration: underline; }

/* выбор с поиском (select.combo) */
.combo-wrap { position: relative; display: inline-block; min-width: 260px; }
label .combo-wrap, td .combo-wrap { display: block; width: 100%; }
.combo-in { width: 100%; padding-right: 26px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 9px center; }
.combo-list { position: absolute; z-index: 50; left: 0; width: max-content; max-width: 460px; top: calc(100% + 2px); max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); min-width: 240px; }
.combo-opt { padding: 7px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt.hi, .combo-opt:hover { background: #eef2ff; }
td .combo-wrap, .anset .combo-wrap { min-width: 110px; }
td .combo-in { padding: 4px 22px 4px 6px; background-position: right 6px center; }
.anset .combo-in { padding: 2px 20px 2px 4px; font-size: 12.5px; background-position: right 5px center; }

/* архив заказов в пошив */
.arch th.amh { cursor: pointer; white-space: nowrap; }
.arch th.amh:hover { color: var(--acc); }
.arch .am { background: #f3f0ff; }
.arch td.ad, .arch th.ad { background: #faf9ff; font-size: 12.5px; }
.arch td.ed { cursor: pointer; }
.arch td.ed:hover { outline: 1px solid #b9b0f5; }
.arch tr.tot td { font-weight: 600; background: #f6f7f9; }
.an.arch thead tr.h th { top: 0; }
.arch th.amh, .arch th.ad { max-width: none; min-width: 64px; }

/* свёрнутые показатели (foldKpi) */
.kpi-fold { margin-bottom: 10px; }
.kpi-fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.kpi-fold > summary::-webkit-details-marker { display: none; }
.kpi-fold > summary::before { content: '▸'; color: #888; }
.kpi-fold[open] > summary::before { content: '▾'; }
.kpi-fold > summary .kf b { font-size: 15px; }
.kpi-fold[open] > summary { border-radius: 10px 10px 0 0; }
.kpi-fold > .cards { margin-top: 10px; }

/* кнопки «развернуть / свернуть все группы строк» */
.ga { display: inline-flex; gap: 2px; margin-right: 8px; vertical-align: middle; }
.ga a { display: inline-block; width: 22px; height: 22px; line-height: 20px; text-align: center; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #444; text-decoration: none; font-size: 15px; font-weight: 400; }
.ga a:hover { background: #eef2ff; color: #3d2fc4; border-color: #b9b0f5; }

/* сборка NF */
.nf tr.nf-bad td { background: #fbe3e1; }
.nf tr.nf-short td { background: #fdf0d5; }
.nf tr.nf-multi td { background: #fff8dc; }
.nf tr.nf-ok td { background: #eef7ea; }
.nf tr.nf-rnd td, .nf tr.nf-skip td { background: #f1f1f1; }
tr.nf-short td { background: #fdf0d5; }
.nf-tag { padding: 2px 8px; border-radius: 10px; font-size: 12.5px; }
.nf-tag.nf-ok { background: #e3f2dc; } .nf-tag.nf-short { background: #fde9c3; } .nf-tag.nf-bad { background: #f8d7d4; } .nf-tag.nf-rnd { background: #ececec; }
.nf-count { font-size: 15px; color: #1a73e8; margin: 6px 0 10px; }
.nf-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.nf-pick { display: grid; grid-template-columns: 34px 1fr 44px minmax(90px, 22%) 200px; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.nf-pick:last-child { border-bottom: 0; }
.nf-pick input { width: 22px; height: 22px; margin: 0; }
.nf-pick .q { font-weight: 700; text-align: center; }
.nf-pick .o { color: #80868b; font-size: 12.5px; }
.nf-pick.done { background: #b7e1cd; color: #5f6368; }
.nf-pick.done .nm .t, .nf-pick.done .q { text-decoration: line-through; }
.nf-rhead { margin: 14px 0 6px; padding: 8px 12px; background: #fce8b2; border-radius: 8px; font-weight: 600; }
@media (max-width: 700px) { .nf-pick { grid-template-columns: 30px 1fr 36px; } .nf-pick .o, .nf-pick .s { grid-column: 2 / 4; } }
.nf-pick .s select { width: 100%; font-size: 12.5px; padding: 4px 6px; }
.nf-pick .rp { font-size: 12.5px; margin-top: 3px; text-decoration: none; }
.nf-pick.done .rp { text-decoration: none; }

.nf-drop { display: block; border: 2px dashed #c9c3f3; border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; background: #faf9ff; }
.nf-drop.over { background: #eef2ff; border-color: #6b5ce7; }
.nf-drop #nfFileList { margin-top: 6px; text-align: left; display: inline-block; }

/* запуск новинок */
.ln td.ph { width: 46px; padding: 2px 4px; }
.ln td.ph img { width: 40px; height: 54px; object-fit: cover; border-radius: 4px; display: block; }
.ln td.k { min-width: 200px; }
.ln select.lnPS { border-radius: 12px; padding: 3px 8px; font-weight: 600; border: 0; min-width: 130px; }
.ln .lnCL { min-width: 170px; }
.ln .lnCL a { text-decoration: none; color: inherit; }
.ln-bar { height: 6px; background: #eceef2; border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.ln-bar i { display: block; height: 100%; background: #34a853; }
.modal-box.wide { max-width: 760px; width: 96vw; }
.ln-stage { margin: 12px 0 4px; padding: 6px 10px; background: #f3f0ff; border-radius: 8px; }
.ln-item { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ln-item input { width: 18px; height: 18px; margin: 0; }
.ln-item .d { font-size: 12.5px; color: #5f6368; white-space: nowrap; }
.ln-item.done { background: #eef7ea; }
.ln-item.done .t { text-decoration: line-through; color: #5f6368; }
.ln-item.late .d { color: #c5221f; font-weight: 600; }
.ln-item .ln-upto { font-size: 12px; white-space: nowrap; }
.ln-sz { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.ln-g { padding: 10px; }
.ln-g table { width: 100%; margin-top: 6px; }
.ln-g .tot td { font-weight: 600; border-top: 1px solid var(--line); }
.ln-red { background: #f8d7d4; color: #b00202; }
.ln-or { background: #fde9c3; color: #8a5a00; }
.arch th.ayt { white-space: nowrap; min-width: 84px; }
.arch th.k, .arch td.k { box-shadow: 1px 0 0 #e5e7eb; }
.tklog { background:#0f172a; color:#e2e8f0; padding:10px 12px; border-radius:8px; max-height:55vh; min-height:120px; overflow:auto; font-size:12px; white-space:pre-wrap; }
.btn-group { display:inline-flex; gap:4px; padding:2px; border:1px dashed #c9c2f5; border-radius:8px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; }
.grid2 label { display:flex; flex-direction:column; font-size:12px; color:#556; gap:2px; }
@media (max-width:700px) { .grid2 { grid-template-columns:1fr; } }
.pos { color: var(--ok); }

/* шаги «Сборки FBS» */
.fbs-steps { flex-wrap: wrap; gap: 6px; }
.stepn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.08); font-size: 11px; margin-right: 6px; }
.btn.primary .stepn { background: rgba(255,255,255,.28); }

.nf-rsum { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-weight: 400; font-size: 13.5px; }

/* страницы списков */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0; }
.pager > .muted:first-child { margin-right: 8px; }
.pager label { margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; }
.pager select { width: auto; padding: 3px 6px; }

/* отчёт по инвентаризации */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.kpis .kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.kpis .kpi b { display: block; font-size: 22px; font-weight: 650; margin: 4px 0; }
.kpis b.ok { color: var(--ok); } .kpis b.warn { color: var(--warn); } .kpis b.err, .kpis b.neg { color: var(--err); }
/* возврат: строка уходит не на склад из шапки */
select.line-store-other { background: var(--warn-bg); }
/* тема: подсказки в полях — цветом «muted», чтобы читались на любом фоне */
::placeholder { color: var(--muted); opacity: .85; }

/* выделение ячеек как в таблице (сумма/среднее внизу справа) */
td.xsel, th.xsel { background: var(--acc-2) !important; box-shadow: inset 0 0 0 1px var(--acc); }
body.xdrag, body.xdrag * { user-select: none !important; cursor: cell !important; }
.xsel-bar { position: fixed; right: 16px; bottom: 16px; z-index: 300; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px 8px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 13px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.xsel-bar b { color: var(--acc); }
body:has(.xsel-bar:not(.hidden)) #toasts { bottom: 70px; }   /* уведомления — над плашкой суммы */
