/* OH WONDER — базовые стили (светлая нейтральная основа, бордовые и розовые фирменные акценты, 01.12). Desktop-first, адаптация для смартфона. */
:root {
  --bg: #f7f6f7;
  --panel: #ffffff;
  --ink: #27232a;
  --muted: #827b83;
  --line: #eae6e9;
  --accent: #812746;
  --accent-2: #c76a8d;      /* розовый */
  --lilac-bg: #f8eaf0;     /* бледно-розовый фон (имя переменной историческое) */
  --lilac-line: #efd3de;
  --accent-ink: #ffffff;
  --ok-bg: #e6f3ea;  --ok: #1f7a45;      /* функциональные: зелёный — рост/прибыль */
  --warn-bg: #fdf1dc; --warn: #a15c00;     /* оранжевый — внимание */
  --err-bg: #fdeaea; --err: #c62828;     /* красный — убыток/падение (не путать с бордовым) */
  --info-bg: #e8eef7; --info: #274b80;
  --radius: 10px;
  --sidebar: 240px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.45; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; font-weight: 650; letter-spacing: -0.01em; }
h1 small, .brandmark small { font-weight: 400; color: var(--muted); font-size: 0.6em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 650; }
code { font-size: .85em; background: #f0efea; padding: 1px 4px; border-radius: 4px; }

/* ---------- каркас ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto;
}
.brandmark { display: block; font-weight: 800; font-size: 1.15rem; letter-spacing: .08em; color: var(--accent); text-decoration: none; padding: 0 10px 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: 7px; color: var(--ink); text-decoration: none;
}
.nav-item:hover { background: var(--lilac-bg); }
.nav-item.active { background: var(--accent); color: var(--accent-ink); }
.nav-item.active .badge { color: #f0d0dc; border-color: #a3456a; }
.badge { font-style: normal; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 0 6px; }
.nav-group { margin: 14px 10px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.me { border-top: 1px solid var(--line); padding: 12px 10px 0; margin-top: 12px; }
.me-name { font-weight: 600; }
.me-role { color: var(--muted); font-size: .85rem; }
.me-actions { display: flex; gap: 14px; margin-top: 6px; font-size: .85rem; }
.content { margin-left: var(--sidebar); padding: 24px 32px 60px; max-width: min(1920px, calc(100vw - var(--sidebar))); box-sizing: border-box; min-width: 0; }
body.bare .content { margin: 0 auto; max-width: 440px; padding-top: 12vh; }
.topbar, .nav-toggle { display: none; }

/* ---------- блоки ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.narrow { max-width: 560px; }
.grid2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input[type=text] { flex: 1; min-width: 200px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.auth-card h1 { margin-bottom: .2rem; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: .08em; background: var(--warn-bg); padding: 10px 14px; border-radius: 8px; user-select: all; }

/* ---------- формы ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-weight: 550; font-size: .9rem; }
[hidden] { display: none !important; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], select {
  font: inherit; padding: 8px 10px; border: 1px solid #cfcec8; border-radius: 7px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid #e8b4c5; border-color: var(--accent); }
input:disabled { background: #f3f2ee; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
legend { font-weight: 550; font-size: .9rem; padding: 0 4px; }
.hint { font-weight: 400; font-size: .8rem; color: var(--muted); }
.btn {
  display: inline-block; font: inherit; font-weight: 550; padding: 8px 14px; border-radius: 7px;
  border: 1px solid #cfcec8; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--lilac-bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #641c3a; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

/* ---------- таблицы и метки ---------- */
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #faf8f9; }
/* Заголовки таблиц не уезжают (01.12): карточка с таблицей — своя прокрутка не выше окна, шапка закреплена */
.card.flush:has(> .table), .card.flush:has(> .table-wrap), .card.flush:has(> .table-scroll) { max-height: calc(100vh - 24px); overflow: auto; }
.table thead tr:only-child th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 5px 8px; }
.table tr.inactive td { color: var(--muted); }
.table td.changes { font-size: .85rem; }
.table td.changes s { color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 20px; background: #efeee9; color: var(--muted); white-space: nowrap; }
.tag.confirmed { background: var(--ok-bg); color: var(--ok); }
.tag.partial { background: var(--warn-bg); color: var(--warn); }
.tag.unavailable { background: var(--err-bg); color: var(--err); }
.tag.not_checked { background: #efeee9; color: var(--muted); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.flash.info { background: var(--info-bg); color: var(--info); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- смартфон ---------- */
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
    background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 14px;
  }
  .topbar .brandmark { padding: 0; }
  .burger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 6px; }
  .burger span { display: block; width: 20px; height: 2px; background: var(--ink); }
  .desktop-only { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; z-index: 30; top: 49px; box-shadow: 4px 0 20px rgba(0,0,0,.08); }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .content { margin-left: 0; padding: 18px 14px 50px; max-width: 100vw; }
  body.bare .content { padding-top: 8vh; }
  .table th, .table td { padding: 8px 10px; }
}

/* ---------- товары ---------- */
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--warn); color: #fff; font-size: .75rem; text-align: center; }
.filters { margin-bottom: 14px; }
.filters input[type=text] { flex: 1; min-width: 240px; max-width: 460px; }
a.plainlink { color: var(--ink); text-decoration: none; }
a.plainlink:hover { text-decoration: underline; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.codes code { display: inline-block; margin: 1px 2px 1px 0; }
.listing { margin: 2px 0; white-space: nowrap; }
.tag.ozon { background: #e5ecfb; color: #1f4fbf; }
.tag.lamoda { background: #f2f2f2; color: #111; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.warn { background: var(--warn-bg); border-color: #efd9a8; }
.row.between { justify-content: space-between; align-items: flex-start; }
.row.grow { flex: 1; }
.row.grow select { flex: 1; min-width: 220px; }
.queue-item .actions { margin-top: 12px; }
input.money { width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.cost-actions { margin: -6px 0 14px; }

/* ---------- задачи ---------- */
textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfcec8; border-radius: 7px; resize: vertical; }
input[type=date], input[type=time], input[type=search], input[type=month] { font: inherit; padding: 7px 10px; border: 1px solid #cfcec8; border-radius: 7px; background: #fff; }
.seg { display: inline-flex; border: 1px solid #cfcec8; border-radius: 8px; overflow: hidden; background: #fff; }
.seg a, .seg label { padding: 7px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9rem; cursor: pointer; flex-direction: row; }
.seg a + a, .seg label + label { border-left: 1px solid #e4e3de; }
.seg .on { background: var(--accent); color: #fff; }
.seg input[type=radio] { display: none; }
.filters select, .filters input[type=text] { max-width: 220px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; }
.wide-form { max-width: 980px; }
.product-picker select { width: 100%; font: inherit; }
.product-picker .picker-filter { width: 100%; }
.pre { white-space: pre-wrap; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ecebe6; border-radius: var(--radius); padding: 10px; min-height: 240px; display: flex; flex-direction: column; }
.col h3 { margin: 2px 4px 10px; font-size: .9rem; font-weight: 650; display: flex; justify-content: space-between; }
.col-closed { background: #f4e7ec; }
.col-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.col.drop-target, .cal-day.drop-target, .cal-nodate.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }

.chip { display: block; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #c9c8c1; border-radius: 8px;
        padding: 8px 10px; text-decoration: none; color: var(--ink); font-size: .88rem; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.chip:hover { border-color: #bdbcb4; }
.chip[draggable=true] { cursor: grab; }
.chip.dragging { opacity: .45; }
.chip.prio-urgent { border-left-color: var(--err); }
.chip.prio-high { border-left-color: #e08a1e; }
.chip.prio-low { border-left-color: #e8b4c5; }
.chip.closed .chip-title { text-decoration: line-through; color: var(--muted); }
.chip-title { display: block; font-weight: 550; line-height: 1.3; }
.chip-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: .76rem; color: var(--muted); }
.chip .prio { color: #b35a00; font-weight: 600; }
.chip.overdue .due { color: var(--err); font-weight: 600; }
.chip .prod { color: var(--accent); }
.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--err); }

.task-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.check-btn { background: none; border: 0; font-size: 1.15rem; cursor: pointer; padding: 0 2px; line-height: 1; }
.right-end { margin-left: auto; }
.comment { border-bottom: 1px solid var(--line); padding: 8px 0; }
.comment:last-of-type { margin-bottom: 12px; }
.history li { padding: 6px 0; }
.side-actions { margin-top: 12px; }

/* ---------- календарь ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { background: #fdf9fa; padding: 6px 8px; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-day { background: var(--panel); min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-grid.week .cal-day { min-height: 420px; }
.cal-day.other { background: #f8f8f5; }
.cal-day.other .cal-date span { color: #b3b2ab; }
.cal-day.weekend { background: #fbfbf8; }
.cal-day.today .cal-date span { background: var(--accent); color: #fff; border-radius: 12px; padding: 0 7px; }
.cal-date { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; font-weight: 600; }
.cal-add { visibility: hidden; text-decoration: none; color: var(--muted); font-weight: 400; padding: 0 4px; }
.cal-day:hover .cal-add { visibility: visible; }
.cal-day .chip { padding: 4px 6px; font-size: .78rem; border-left-width: 3px; }
.cal-day .chip-meta { display: none; }
.cal-day .chip.overdue { background: var(--err-bg); }
.cal-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 12px; }
.cal-side h3 { margin: 0 0 10px; font-size: .95rem; }
.cal-nodate { display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
.cal-list-day { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.cal-list-day h3 { font-size: .95rem; margin: 0; }
.cal-list-day h3.today { color: var(--accent); }

@media (max-width: 860px) {
  .task-layout, .cal-layout { grid-template-columns: 1fr; }
  .cal-day { min-height: 70px; }
  .cal-day .chip-title { font-size: .7rem; }
  .board { grid-auto-columns: minmax(78vw, 1fr); }
  .cal-side { position: static; }
}
a.stat { text-decoration: none; color: var(--ink); }
a.stat:hover { border-color: #bdbcb4; }
.task-line { padding: 6px 0; border-bottom: 1px solid var(--line); }
.task-line:last-child { border-bottom: 0; }
.picker-list { max-height: 240px; overflow-y: auto; border: 1px solid #cfcec8; border-radius: 7px; padding: 6px 10px; background: #fff; }
.picker-list label { padding: 2px 0; font-size: .88rem; }
.picker-list .pick-variant { padding-left: 22px; color: #3d3d3a; }
.picker-list .pick-model { margin-top: 4px; }
.tag.error { background: var(--err-bg); color: var(--err); }
.sync-line { margin: -6px 0 12px; }
details summary { cursor: pointer; color: var(--muted); margin-top: 8px; }
code.shape { display: block; white-space: pre-wrap; word-break: break-all; margin-top: 4px; font-size: .75rem; }

/* Продажи на карточке модели */
.pad { padding: 8px 14px 12px; margin: 0; }
.table.sales td:first-child { white-space: nowrap; }
.table.sales th[colspan] { text-align: center; border-left: 1px solid var(--line); }
.table .num, .table th.num { text-align: right; }

/* Аналитика продаж (дашборд) */
.dash-filters .period { margin-right: 6px; }
.dash-filters .period input[type=date] { width: 150px; }
.dash-filters select, .dash-filters input[type=text] { width: auto; min-width: 150px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-link { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; text-decoration: none; color: inherit; background: #fff; }
.chip-link.on { background: var(--accent); border-color: transparent; color: #fff; }
.dash-h { margin: 6px 0 10px; }
/* KPI дашборда (01.12): 4 главные плитки + компактные группы */
.kpi-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
@media (max-width: 1100px) { .kpi-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi.big { position: relative; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  padding: 14px 16px 12px; min-height: 0; overflow: hidden; }
.kpi.big .kpi-title { font-size: .82rem; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.kpi.big .kpi-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.kpi.big .kpi-second { font-size: 1rem; color: var(--muted); font-weight: 600; }
.kpi.big .kpi-delta { font-size: .84rem; margin-top: 4px; font-weight: 600; }
.kpi-diff { font-weight: 600; margin-left: 4px; }
.kpi-vs { color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi .arr { font-size: .75em; }
.spark { display: block; width: 100%; height: 34px; margin-top: 8px; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--lilac-bg); }
.spark-dot { fill: var(--accent); }
.kpi-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px 16px; margin-bottom: 18px; }
.kpi-group:first-child { grid-column: 1 / -1; }
.kpi-group h3 { margin: 0 0 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi-grid.compact { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; margin: 0; }
.kpi.small { background: var(--panel); border: 1px solid var(--line); padding: 9px 12px; min-height: 0; }
.kpi.small .kpi-title { font-size: .76rem; color: var(--muted); }
.kpi.small .kpi-value { font-size: 1.08rem; margin-top: 2px; }
.kpi.small .kpi-value.muted, .kpi.big .kpi-value.muted { font-size: .95rem; font-weight: 500; color: var(--muted); }
.kpi.big .kpi-value.muted { margin-top: 10px; }
.kpi-group:first-child .kpi-grid.compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.kpi.small .kpi-second { font-size: .82rem; color: var(--muted); }
.kpi.small .kpi-delta { font-size: .74rem; margin-top: 1px; }
.kpi.small .kpi-note { font-size: .72rem; }
.kpi.small .kpi-title .i, .kpi.big .kpi-title .i { width: 13px; height: 13px; line-height: 13px; background: #c9c1c7; }
.kpi:hover .kpi-title .i { background: var(--accent); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 86px; }
.kpi.soon { background: #f4f4f1; }
.kpi-title { font-size: .85rem; color: #333; }
.kpi-title .i { display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; background: #222; color: #fff; font-size: .65rem; font-style: italic; }
.kpi-value { font-size: 1.45rem; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-value.muted { font-size: 1.05rem; font-weight: 500; }
.kpi-second { font-size: 1rem; font-weight: 600; color: #444; }
.kpi-delta { font-size: .8rem; margin-top: 2px; }
.kpi-delta.good { color: var(--ok); }
.kpi-delta.bad { color: var(--err); }
.kpi-delta.flat { color: var(--muted); }
.kpi-note { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.dash-chart .series-toggles { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0 4px; font-size: .9rem; }
.dash-chart .series-toggles i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 2px; }
.dash-chart .toggle { font-size: .9rem; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: #e8e8e2; }
svg.chart .zero { stroke: #bbb; }
svg.chart .axis { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .dash-two { grid-template-columns: 1fr; } }
.bar-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; gap: 10px; align-items: center; margin: 8px 0; font-size: .9rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { background: #f0f0ec; border-radius: 4px; height: 12px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent-2); }
.bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rev-stack { display: flex; height: 18px; border-radius: 5px; overflow: hidden; margin: 10px 0; background: #f0f0ec; }
.rev-stack i { display: block; height: 100%; flex: 0 0 auto; }
.legend-row { font-size: .9rem; margin: 4px 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.table-tools { padding: 10px 14px; gap: 8px; }
.table-scroll { overflow-x: auto; }
.card.flush > .table-scroll { overflow: visible; }
.dash-table th a { color: inherit; text-decoration: none; white-space: nowrap; }
.dash-table td { font-size: .88rem; }
svg.chart .off { display: none; }
.dash-table.daily tr.total td { border-top: 2px solid var(--lilac-line); background: var(--lilac-bg); }
.card.flush > .table-tools h2 { margin: 0; }

/* лиловые акценты */
.sidebar { background: var(--panel); }
.kpi.soon { background: #faf6f7; border-color: var(--line); }
.kpi-title .i { background: var(--accent); }
h1 { color: var(--ink); }
.chip-link:hover { border-color: var(--accent-2); }
.card { border-color: var(--line); }

/* ОПиУ */
.neg { color: var(--err); }
.warn-text { color: var(--warn); }
.opex-form { display: grid; grid-template-columns: 150px 180px 1fr 140px 1fr auto; gap: 10px; align-items: end; margin-bottom: 14px; }
@media (max-width: 1100px) { .opex-form { grid-template-columns: 1fr 1fr; } }
.btn.small { padding: 3px 10px; font-size: .8rem; }
.pnl-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pnl-filters .spacer, .pnl-tools .spacer { flex: 1; }
.pnl-tools { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.pnl-kpi .kpi.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.pnl-kpi .kpi.accent .kpi-title, .pnl-kpi .kpi.accent .muted { color: #efd3de; }
.kpi-note { font-size: .8rem; color: #80646e; margin-top: 2px; }
.pnl-kpi .kpi.accent .kpi-note { color: #efd3de; }
.pnl-scroll { max-height: 75vh; overflow: auto; }
.table.pnl2 { border-collapse: separate; border-spacing: 0; }
.table.pnl2 th { position: sticky; top: 0; z-index: 2; background: #fbf5f7; white-space: nowrap; }
.table.pnl2 .sticky { position: sticky; left: 0; z-index: 1; background: var(--panel); min-width: 250px; white-space: nowrap; }
.table.pnl2 td, .table.pnl2 th { padding-left: 10px; padding-right: 10px; }
.table.pnl2 td { font-size: .9rem; }
.table.pnl2 th.sticky { z-index: 3; background: #fbf5f7; }
.table.pnl2 td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table.pnl2 .tot { background: #fdf9fa; font-weight: 600; border-left: 1px solid var(--lilac-line); }
.table.pnl2 .avg { color: #705660; }
.table.pnl2 .pct { color: var(--accent-2); font-size: .8rem; }
.table.pnl2 .pct.block { display: block; }
.table.pnl2 tr.has-kids { cursor: pointer; }
.table.pnl2 tr.has-kids:hover td { background: #fdf4f7; }
.table.pnl2 .caret { display: inline-block; width: 14px; color: var(--accent-2); transition: transform .15s; }
.table.pnl2 tr.open .caret { transform: rotate(90deg); }
.table.pnl2 tr.hidden { display: none; }
.table.pnl2 tr.child td { color: #58444b; font-size: .88rem; }
.table.pnl2 tr.child td.sticky { padding-left: 34px; }
.table.pnl2 tr.child.has-kids td.sticky { padding-left: 20px; }
.table.pnl2 tr.grand td { font-size: .84rem; color: #6d5961; }
.table.pnl2 tr.grand td.sticky { padding-left: 54px; }
.table.pnl2 tr.k-base td { font-weight: 700; }
.table.pnl2 tr.k-result td { font-weight: 700; border-top: 1px solid #e6c6d2; background: #fcf3f6; }
.table.pnl2 tr.k-major td { font-weight: 800; background: #f7e5ec; border-top: 1px solid #e6c6d2; }
.table.pnl2 tr.sep td { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #90727d; background: #fff; padding-top: 14px; }
.table.pnl2 tr.ratio td { color: #50353f; }
.waterfall .zero { stroke: #bbb; stroke-dasharray: 3 3; }
.waterfall .wf-base { fill: var(--accent); }
.waterfall .wf-total { fill: #2f7d55; }
.waterfall .wf-total.neg { fill: var(--err); }
.waterfall .wf-minus { fill: #eaa3a3; }
.waterfall .wf-plus { fill: #7fb59a; }
.waterfall .wf-val { font-size: 11px; fill: #333; }
.waterfall .axis { font-size: 11px; fill: #555; }
/* Налоги */
.tax-acc { margin-bottom: 18px; }
.tax-acc .head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.tax-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .tax-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tax-q { background: var(--lilac-bg); border: 1px solid var(--lilac-line); border-radius: 8px; padding: 8px 10px; }
.tax-q table { width: 100%; border-collapse: collapse; }
.tax-q th { font-size: .72rem; color: var(--muted); font-weight: 600; text-align: right; padding: 0 2px; }
.tax-q td { padding: 2px; font-size: .88rem; }
.tax-q tr.q td { font-weight: 700; border-bottom: 1px solid var(--lilac-line); padding-bottom: 4px; }
.tax-q input { width: 64px; text-align: right; padding: 4px 6px; }
/* фото карточек */
.thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 5px; display: block; background: var(--lilac-bg); border: 1px solid var(--lilac-line); }
.thumb.empty { display: inline-block; }
.thumb.sm { width: 22px; height: 29px; display: inline-block; vertical-align: middle; margin-right: 4px; }
th.ph, td.ph { width: 44px; padding-right: 0 !important; }
.table th.ph, .table td.ph { padding-left: 10px !important; }
.model-title { gap: 14px; align-items: center; }
.model-photo { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--lilac-line); display: block; }
/* доска задач: зоны «Архив» / «Удалить» внизу при перетаскивании */
.task-trash { position: fixed; left: var(--sidebar); right: 0; bottom: 0; display: none; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 12px 36px 18px; background: linear-gradient(180deg, rgba(247,246,247,0) 0%, rgba(247,246,247,.96) 35%); z-index: 50; }
body.task-dragging .task-trash { display: grid; }
.task-trash .zone { border: 2px dashed; border-radius: 12px; padding: 22px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.task-trash .zone.archive { background: #f1edee; border-color: #a9a6b3; color: #55525e; }
.task-trash .zone.delete { background: #fbe6e3; border-color: #d9776a; color: #9b2c1f; }
.task-trash .zone.over { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.task-trash .zone.archive.over { background: #e7dfe2; }
.task-trash .zone.delete.over { background: #f6cfc9; }
.btn.danger { color: var(--err); border-color: #e7b3ab; }
.btn.danger:hover { background: var(--err-bg); }
/* Реклама */
.spend-chart .spend-bar { fill: #c76a8d; }
.spend-chart .spend-bar.hl { fill: var(--accent); }
.spend-chart .grid { stroke: #f3eaed; }
.spend-chart .axis { font-size: 11px; fill: var(--muted); }
.spend-chart .drr-line { fill: none; stroke: #4a4550; stroke-width: 2; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.legend-line { display: inline-block; width: 16px; height: 0; border-top: 2px solid #4a4550; vertical-align: middle; }
.tag.muted { background: #f4eff1; color: #666; }
.camp-table td { vertical-align: top; }
/* Обновление данных (главная) */
.refresh-card { margin: 16px 0; }
.refresh-card h2 { margin-bottom: 2px; }
.refresh-table th { white-space: nowrap; }
.rf-head { display: inline-flex; align-items: center; gap: 4px; }
.rf-btn { border: 1px solid var(--lilac-line); background: var(--lilac-bg); color: var(--accent); border-radius: 6px;
          width: 22px; height: 22px; line-height: 18px; padding: 0; cursor: pointer; font-size: .85rem; }
.rf-btn:hover { background: var(--accent); color: #fff; }
.rf-cell { min-width: 120px; vertical-align: top; }
.rf { font-weight: 600; font-size: .88rem; white-space: nowrap; }
.rf-ok { color: #2f7d55; }
.rf-err { color: var(--err); cursor: help; }
.rf-run { color: var(--accent); }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--lilac-line); border-top-color: var(--accent);
        border-radius: 50%; animation: rfspin .8s linear infinite; vertical-align: -1px; }
@keyframes rfspin { to { transform: rotate(360deg); } }
.btn[disabled] { opacity: .6; cursor: default; }
/* Остатки и дефицит */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 12px; flex-wrap: wrap; }
.tab { padding: 8px 14px; text-decoration: none; color: #58444b; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab:hover { color: var(--accent); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.tab .cnt { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--lilac-bg); font-size: .78rem; text-align: center; }
.tab.on .cnt { background: var(--accent); color: #fff; }
a.kpi-link { text-decoration: none; color: inherit; display: block; }
a.kpi-link:hover { border-color: var(--accent-2); }
.kpi.danger { background: #fbeeee; border-color: #f0c9c9; }
.stock-totals { gap: 22px; margin: -6px 0 14px; color: #58444b; flex-wrap: wrap; }
.stock-table td { vertical-align: middle; }
.stock-table .thumb-cell { width: 44px; padding-right: 0; }
.stock-table tr.hidden { display: none; }
.stock-table tr.has-kids { cursor: pointer; }
.stock-table tr.open .caret { display: inline-block; transform: rotate(90deg); }
.stock-table .caret { color: var(--accent-2); }
.st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.st-out { background: var(--err); color: #fff; }
.st-urgent { background: #fbe0e0; color: #a12a2a; }
.st-soon { background: #fdf0d8; color: #8a5a00; }
.st-ok { background: #e4f3ea; color: #2f7d55; }
.st-excess { background: var(--lilac-bg); color: var(--accent); }
.st-nosales { background: #efeee9; color: #666; }
.st-nodata { background: #efeee9; color: #999; }
.stock-settings { margin-top: 18px; }
.stock-settings summary { cursor: pointer; }
.stock-cfg input[type=number] { width: 90px; }
/* Каталог «Товары» */
.cat-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cat-filters .spacer { flex: 1; }
.cat-search { min-width: 340px; }
.cat-table th a.sort { color: inherit; text-decoration: none; white-space: nowrap; }
.cat-table th a.sort:hover { color: var(--accent); }
.cat-table th a.sort.on { color: var(--accent); }
.cat-table td { vertical-align: middle; }
.cat-table .cat-name { max-width: 320px; }
.cat-table .cat-colors { white-space: nowrap; }
.cat-table tr.hidden { display: none; }
.cat-table tr.child td { background: #fdf9fa; padding-top: 6px; padding-bottom: 6px; }
.chip-btn { border: 1px solid var(--lilac-line); background: var(--lilac-bg); color: var(--accent); border-radius: 999px;
            padding: 2px 10px; font-size: .85rem; cursor: pointer; font-weight: 600; }
.chip-btn:hover { border-color: var(--accent-2); }
.chip-btn .caret::before { content: "▸"; }
.chip-btn.open .caret::before { content: "▾"; }
.dot-warn { color: #c98a00; font-weight: 800; cursor: help; }
.btn.warn-btn { border-color: #f0d6a0; background: #fdf6e6; }
/* Баланс */
.table.bal .sticky { position: sticky; left: 0; background: var(--panel); min-width: 260px; white-space: nowrap; z-index: 1; }
.table.bal td.num { white-space: nowrap; }
.table.bal .bal-in { width: 132px; text-align: right; padding: 3px 6px; font-variant-numeric: tabular-nums; }
.table.bal tr.bal-sec td { font-weight: 700; background: #fcf3f6; border-top: 1px solid #e6c6d2; }
.table.bal tr.bal-sec td.sticky { background: #fcf3f6; }
.table.bal tr.bal-grp td { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #90727d; padding-top: 10px; }
.table.bal tr.bal-major td, .table.bal tr.bal-total td { font-weight: 800; background: #f7e5ec; }
.table.bal tr.bal-major td.sticky, .table.bal tr.bal-total td.sticky { background: #f7e5ec; }
.table.bal tr.bal-total td { background: var(--accent); color: #fff; }
.table.bal tr.bal-total td.sticky { background: var(--accent); }
.table.bal tr.bal-total .neg { color: #ffc9c9; }
.table.bal tr.auto td { color: #50353f; }
.table.bal tr.off-total td { color: #8a8498; }
.x-btn { border: 0; background: none; color: #c8adb7; cursor: pointer; font-size: 1rem; padding: 0 4px; }
.x-btn:hover { color: var(--err); }
.bal-save { position: sticky; bottom: 0; background: var(--panel); padding: 10px 14px; border-top: 1px solid var(--line);
            display: flex; gap: 12px; align-items: center; }
.sr-default { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Меню: сворачиваемые разделы */
details.nav-sec > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
                             user-select: none; }
details.nav-sec > summary::-webkit-details-marker { display: none; }
details.nav-sec > summary::after { content: "▾"; font-size: .8rem; color: var(--muted); margin-right: 2px; }
details.nav-sec:not([open]) > summary::after { content: "▸"; }
details.nav-sec > summary:hover { color: var(--accent); }
.nav-fold { margin: 14px 10px 4px; border: 0; background: none; color: var(--muted); font-size: .78rem; cursor: pointer;
            padding: 0; text-align: left; text-decoration: underline dotted; }
.nav-fold:hover { color: var(--accent); }
/* Баланс v2 */
.pos { color: var(--ok); }
.table.bal td.warn-cell { background: #fdecec; }
.table.bal th.cur-col, .table.bal td.cur-col { background: #fffafc; }
.col-state { display: flex; gap: 4px; justify-content: flex-end; align-items: center; margin-top: 3px; font-weight: 400;
             text-transform: none; letter-spacing: 0; }
.table.bal tr.bal-sec.liab td { background: #fdf3ee; }
.table.bal tr.bal-sec.disputed td { background: #f4f3f0; color: #6d6878; }
.table.bal tr.spacer-row td { height: 10px; background: #fff; border: 0; }
.bal-chart .up { fill: #2f8f5b; }
.bal-chart .down { fill: var(--err); }
.bal-chart .eq-line { fill: none; stroke: #812746; stroke-width: 2.5; }
.bal-chart .eq-dot { fill: #812746; }
.bal-chart .zero { stroke: #ccc; }
.bal-chart .axis { font-size: 11px; fill: var(--muted); }
.flow-form { display: grid; grid-template-columns: 150px 1fr 140px; gap: 8px; align-items: end; margin-bottom: 12px; }
.flow-form .wide { grid-column: 1 / 3; }

/* расшифровка товара в балансе */
tr.warn-row td { background: #fff7ec; }
.kpi.warn .kpi-value { color: var(--warn); }

/* ===== Прогноз ===== */
.row.gap { gap: 12px; align-items: center; }
.fc-accs { margin-bottom: 16px; }
.fc-status { font-size: .88rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.fc-status .spin { width: 14px; height: 14px; border: 2px solid var(--lilac-line); border-top-color: var(--accent); border-radius: 50%;
  animation: fc-spin .8s linear infinite; }
@keyframes fc-spin { to { transform: rotate(360deg); } }
.fc-hero { display: grid; grid-template-columns: minmax(260px, 1fr) 2.2fr; gap: 24px; align-items: center;
  background: linear-gradient(135deg, #662f43 0%, var(--accent) 45%, #ad5877 100%); color: #fff; border: none; padding: 26px 28px; }
.fc-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.fc-big { font-size: 2.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.fc-sub { opacity: .85; }
.fc-hero .pos { color: #9ff0c0; } .fc-hero .neg { color: #ffb3c0; } .fc-hero .muted { color: rgba(255,255,255,.7); }
.fc-formula { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.fc-term { flex: 1; min-width: 150px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.fc-term span { font-size: .8rem; opacity: .8; }
.fc-term b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.fc-term em { font-style: normal; font-size: .82rem; opacity: .85; }
.fc-term.fc-res { background: #fff; color: var(--accent); border-color: #fff; }
.fc-term.fc-res span, .fc-term.fc-res em { color: var(--muted); opacity: 1; }
.fc-op { align-self: center; font-size: 1.6rem; font-weight: 300; opacity: .8; }
@media (max-width: 1100px) { .fc-hero { grid-template-columns: 1fr; } }
svg.fc-chart .ln-t { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
svg.fc-chart .ln-y { fill: none; stroke: #c4b6bb; stroke-width: 2; stroke-linejoin: round; }
svg.fc-chart .ln-f { fill: none; stroke: var(--accent-2); stroke-width: 2.5; stroke-dasharray: 7 6; }
svg.fc-chart .now { stroke: var(--lilac-line); stroke-width: 1.5; stroke-dasharray: 3 4; }
svg.fc-chart .dot-t { fill: var(--accent); stroke: #fff; stroke-width: 2; }
svg.fc-chart .dot-f { fill: #fff; stroke: var(--accent-2); stroke-width: 3; }
svg.fc-chart .dot-y { fill: #c4b6bb; }
.fc-legend { font-size: .85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.fc-legend i { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--accent); margin-left: 10px; }
.fc-legend i.lg-y { border-top: 2px solid #c4b6bb; }
.fc-legend i.lg-f { border-top: 3px dashed var(--accent-2); }
.fc-table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px 12px; }
.fc-table-head h2 { margin: 0; }
.fc-table-head h2 small { font-weight: 400; font-size: .8rem; }
.fc-prod { display: flex; gap: 10px; align-items: center; }
.fc-table td.fc-d { font-weight: 700; font-size: 1.05rem; }
.fc-table td.fc-d .small { font-weight: 500; font-size: .8rem; }
.fc-table td .small { margin-top: 2px; }
.fc-sizes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 5px; }
.fc-sizes .btn .caret { display: inline-block; transition: transform .15s; }
.fc-sizes .btn.open .caret { transform: rotate(180deg); }
.fc-chip { font-size: .76rem; border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.fc-chip.neg { background: #fde8e8; }
.fc-chip.pos { background: #e3f4e8; }
.fc-table tr.fc-size td { background: #fffafc; font-size: .88rem; }
.fc-table tr.fc-size td:first-child { padding-left: 62px; }
.fc-table tr.fc-size td.fc-d { font-size: .95rem; }

/* остатки по кластерам */
.cl-head h2 { margin: 0 0 4px; }
.cl-upload input[type=file] { max-width: 260px; font-size: .85rem; }
.cl-table tr.on td { background: var(--lilac-bg); }
.cl-table tr.cl-special td { color: var(--muted); }
.cl-table tr.cl-special td a { color: var(--muted); }

/* видимость по запросам */
.vis-scroll { max-height: 78vh; overflow: auto; }
.vis-table { border-collapse: separate; border-spacing: 0; }
.vis-table th { position: sticky; top: 0; z-index: 2; }
.vis-table .vis-sticky { position: sticky; left: 0; background: var(--panel); z-index: 1; width: 320px; min-width: 320px; max-width: 320px; white-space: normal; }
.vis-table th.vis-sticky { z-index: 3; background: #fdf9fa; }
.vis-table td, .vis-table th { padding: 6px 8px; }
.vis-day { min-width: 46px; }
.vis-cell { font-variant-numeric: tabular-nums; text-align: center !important; border-left: 1px solid #fff; }
.vis-prod { cursor: pointer; }
.vis-prod td { border-top: 1px solid var(--lilac-line); font-weight: 500; }
.vis-prod.open .caret { display: inline-block; transform: rotate(90deg); }
.vis-prod.loading { opacity: .6; }
.vis-q td { font-size: .85rem; background: #fefbfc; }
.vis-q .vis-sticky { padding-left: 34px; background: #fefbfc; }
.vis-qtext { color: #333; }
.vis-drop { display: inline-block; font-size: .7rem; font-weight: 600; color: #fff; background: var(--err); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.vis-cell.drop { background: #fdecea; }
.vis-cell.nodata { background: #f6f6f3; }
.vis-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 4px 0 10px; }
.vis-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.vl-good { background: hsl(120,62%,76%); } .vl-bad { background: hsl(0,62%,76%); }
tr.hidden { display: none; }
.waterfall .wf-pct { font-size: 12px; font-weight: 700; fill: #b23a3a; }
.waterfall .wf-pct.wf-pct-base { fill: var(--accent); }
.waterfall .wf-pct.wf-pct-total { fill: #2f7d55; }
.waterfall .wf-pct.wf-pct-total.neg { fill: var(--err); }
.waterfall .wf-pct.in { fill: #fff; font-size: 15px; }
.waterfall .wf-pct.in.wf-pct-minus { fill: #7a1f1f; }
.waterfall .wf-pct.in.big { font-size: 20px; }

/* реклама: вкладки раздела, ROMI, РНП */
.rk-tabs { margin-bottom: 16px; }
.romi-grid .kpi.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.romi-grid .kpi.accent .kpi-title, .romi-grid .kpi.accent .kpi-note { color: rgba(255,255,255,.85); }
.rnp-bar { margin: 4px 0 12px; align-items: center; }
.rnp-metrics a { font-size: .85rem; }
.rnp-scroll { max-height: 78vh; overflow: auto; }
.rnp-table { border-collapse: separate; border-spacing: 0; }
.rnp-table th { position: sticky; top: 0; z-index: 2; }
.rnp-table .rnp-sticky { position: sticky; left: 0; z-index: 1; background: var(--panel); width: 360px; min-width: 360px; max-width: 360px; }
.rnp-table th.rnp-sticky { z-index: 3; background: #fdf9fa; }
.rnp-table .rnp-total { background: var(--lilac-bg); }
.rnp-table th.rnp-total { background: #f8eaef; }
.rnp-day { min-width: 68px; }
.rnp-cell { text-align: center !important; font-variant-numeric: tabular-nums; border-left: 1px solid #fff; white-space: nowrap; }
.rnp-table .rnp-total { position: sticky; left: 360px; z-index: 1; width: 120px; min-width: 120px; }
.rnp-table .rnp-spend { position: sticky; left: 480px; z-index: 1; width: 110px; min-width: 110px; background: var(--panel);
  box-shadow: inset -1px 0 0 var(--lilac-line); }
.rnp-table th.rnp-total, .rnp-table th.rnp-spend { z-index: 3; }
.rnp-table th.rnp-spend { background: #fdf9fa; }

/* подсказки графиков (app.js, data-tip) */
.chart-tip { position: fixed; z-index: 1000; pointer-events: none; background: #2e1a21; color: #fff; border-radius: 8px;
  padding: 8px 11px; font-size: .82rem; line-height: 1.45; box-shadow: 0 6px 20px rgba(30, 15, 22, .25); white-space: pre; max-width: 360px; }
.chart-tip .tip-h { font-weight: 600; margin-bottom: 2px; color: #f5cfdd; }
svg.chart .hov-col { fill: transparent; cursor: crosshair; }
svg.chart .hov-guide { stroke: #812746; stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
svg.chart .hov-guide.on { opacity: .55; }
svg.chart [data-tip]:not(.hov-col) { cursor: pointer; }

/* РНП реклама: товары внутри кампании */
.rnp-table tr.has-kids { cursor: pointer; }
.rnp-table tr.has-kids .caret { display: inline-block; width: 12px; color: var(--accent-2); transition: transform .15s; }
.rnp-table tr.has-kids.open .caret { transform: rotate(90deg); }
.rnp-kids { color: var(--accent); font-weight: 500; margin-left: 4px; }
.rnp-table tr.rnp-child td { background: #fffafc; font-size: .86rem; }
.rnp-table tr.rnp-child td.rnp-sticky { padding-left: 34px; background: #fffafc; }
.rnp-table tr.rnp-child td.rnp-total { background: #fbeff3; }
.rnp-table tr.rnp-child td.rnp-cell { background-clip: padding-box; }
.thumb.kid { width: 28px; height: 37px; }

/* РНП по товарам */
.rnp-goods .rnp-plan { position: sticky; left: 480px; z-index: 1; width: 130px; min-width: 130px; background: var(--panel);
  border-right: 1px solid var(--lilac-line); }
.rnp-goods th.rnp-plan { z-index: 3; background: #fdf9fa; }
.rnp-goods tr.rnp-prod { cursor: pointer; }
.rnp-goods tr.rnp-prod .caret { display: inline-block; width: 12px; color: var(--accent-2); transition: transform .15s; }
.rnp-goods tr.rnp-prod.open .caret { transform: rotate(90deg); }
.rnp-goods tr.rnp-prod.loading { opacity: .6; }
.rnp-goods tr.rnp-sum td { background: #fbeff3; font-weight: 600; }
.rnp-goods tr.rnp-sum td.rnp-sticky, .rnp-goods tr.rnp-sum td.rnp-total, .rnp-goods tr.rnp-sum td.rnp-plan { background: #f8e6ed; }
.rnp-goods tr.rnp-metric td { font-size: .84rem; background: #fffafc; }
.rnp-goods tr.rnp-metric td.rnp-sticky { padding-left: 46px; background: #fffafc; }
.rnp-goods tr.rnp-info td { background: #fdf4f7; }
.rnp-goods .rnp-mlabel { color: #444; }
.rnp-goods th.today { color: var(--accent); }
.rnp-cell.anom-bad { box-shadow: inset 0 0 0 2px var(--err); }
.rnp-cell.anom-good { box-shadow: inset 0 0 0 2px #2e8b57; }
.rnp-cell.anom-neutral { box-shadow: inset 0 0 0 2px var(--accent-2); }
.abc { display: inline-block; font-size: .7rem; font-weight: 700; border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.abc-A { background: #d9f2e3; color: #1e6b43; }
.abc-B { background: #fdf0cf; color: #8a6200; }
.abc-C { background: #eee; color: #666; }
.plan-pct { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 4px; padding: 0 5px; }
.plan-pct.ok { background: #d9f2e3; color: #1e6b43; }
.plan-pct.mid { background: #fdf0cf; color: #8a6200; }
.plan-pct.low { background: #fbe0de; color: #a02a1f; }
.rnp-plans .plan-in { width: 120px; text-align: right; }
.rnp-tags-form { margin-top: 6px; gap: 6px; }
.rnp-tags-form input[type=text] { width: 320px; }

/* Группы товаров */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.pick-list { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.pick-list .pick-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f1f0ec; }
.group-sel { max-width: 220px; }
.rnp-vc .v1 { white-space: nowrap; }
.rnp-vc .v2 { font-size: .78rem; color: #555; white-space: nowrap; margin-top: 1px; }
.rnp-stock { color: #444; margin-top: 2px; }
.rnp-stock .low { color: var(--err); }
.rnp-goods .rnp-total { width: 175px; min-width: 175px; max-width: 175px; }
.rnp-goods .rnp-plan { left: 535px; }
.rnp-goods .rnp-day { min-width: 92px; }

/* Юнитка */
.unit-scroll { max-height: 80vh; overflow: auto; }
.unit-table { border-collapse: separate; border-spacing: 0; }
.unit-table th { position: sticky; top: 0; z-index: 2; background: #fdf9fa; }
.unit-table .unit-sticky { position: sticky; left: 0; z-index: 1; background: var(--panel); min-width: 300px; max-width: 300px; }
.unit-table th.unit-sticky { z-index: 3; }
.unit-table td { vertical-align: top; }
.unit-try input { width: 92px; text-align: right; }
.unit-try-out { margin-top: 4px; white-space: nowrap; }
.unit-acts { min-width: 170px; }
.unit-acts .btn .caret { display: inline-block; transition: transform .15s; }
.unit-acts .btn.open .caret { transform: rotate(180deg); }
.unit-table tr.unit-act td { background: #fffafc; font-size: .86rem; }
.unit-table tr.unit-act td.unit-sticky { background: #fcf3f6; padding-left: 26px; }
.unit-act-name { line-height: 1.35; }
.unit-acts .act { font-size: .78rem; border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; display: flex; flex-wrap: wrap; gap: 0 6px; }
.unit-acts .act.in { background: #f8e6ed; }
.unit-acts .act.cand { background: #f4f4f1; }
.unit-acts .act-t { font-weight: 600; width: 100%; }
.mid { color: #8a6200; }

/* РНП реклама: бюджет кампании справа от названия */
.rk-rnp .rnp-sticky { width: 520px; min-width: 520px; max-width: 520px; }
.rk-rnp .rnp-total { left: 520px; }
.rk-rnp .rnp-spend { left: 640px; }
.rk-rnp .fc-prod > div:nth-last-child(2) { flex: 1; min-width: 0; }
.rk-budget { margin-left: auto; min-width: 170px; text-align: right; padding: 4px 8px; border-radius: 8px; font-size: .8rem;
  background: var(--lilac-bg); border: 1px solid var(--lilac-line); line-height: 1.35; white-space: nowrap; }
.rk-budget.low { background: #fdecea; border-color: #f2c4bd; }
.rk-rnp tr.rnp-child .rk-budget { display: none; }

/* «Что нового» (главная, /changes) */
.tag.new { background: var(--accent); color: #fff; font-weight: 600; }
.whatsnew { margin-bottom: 18px; }
.whatsnew-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.whatsnew-head h2 { margin: 0; }
.whatsnew-head form { margin: 0; }
.changes { list-style: none; margin: 12px 0 0; padding: 0; }
.changes li { display: flex; gap: 14px; padding: 8px 10px; border-top: 1px solid var(--line); border-radius: 8px; }
.changes li:first-child { border-top: 0; }
.changes li.is-new { background: var(--lilac-bg); }
.changes .ch-date { flex: 0 0 44px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.changes .small { margin-top: 2px; }
.changes-day h2 { font-size: 1rem; margin: 0 0 4px; }
.changes-day { margin-bottom: 14px; }

/* ---------- Единая панель фильтров (01.12, дизайн шаг 2) ----------
   Все страницы: выпадающие списки, даты, поиск и периоды одной высоты; выбранный фильтр подсвечен (.is-set, app.js),
   «× Сбросить фильтры» появляется сам; периоды — справа. Поиск — по Enter или при уходе из поля, без кнопки. */
.dash-filters, .cat-filters, .pnl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 16px; }
.dash-filters select, .cat-filters select, .pnl-filters select, .dash-filters input[type=search], .cat-filters input[type=search],
.dash-filters input[type=date], .pnl-filters input[type=month], .dash-filters .btn, .cat-filters .btn {
  height: 34px; padding: 0 10px; font-size: .88rem; border: 1px solid #ddd6da; border-radius: 8px; background-color: #fff; box-sizing: border-box; }
.dash-filters .btn, .cat-filters .btn { display: inline-flex; align-items: center; }
.dash-filters select, .cat-filters select, .pnl-filters select { appearance: none; -webkit-appearance: none; padding-right: 28px; min-width: 0; width: auto; max-width: 260px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23827b83' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.dash-filters select:hover, .cat-filters select:hover, .pnl-filters select:hover { border-color: var(--accent-2); }
.dash-filters select.is-set, .cat-filters select.is-set { border-color: var(--accent-2); background-color: var(--lilac-bg); color: var(--accent); font-weight: 600; }
input.q-search { flex: 0 1 320px; min-width: 220px; padding-left: 32px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23827b83' stroke-width='1.5'/%3E%3Cpath d='M9.5 9.5L13 13' stroke='%23827b83' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat 11px center; }
input.q-search:not(:placeholder-shown) { border-color: var(--accent-2); background-color: var(--lilac-bg); }
.dates { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dash-filters .dates input[type=date] { width: 138px; }
.period-seg { margin-left: auto; }
.seg a, .seg label { display: inline-flex; align-items: center; padding: 0 12px; min-height: 32px; font-size: .86rem; }
.seg { border-color: #ddd6da; }
.seg a + a, .seg label + label { border-left-color: #eae6e9; }
.seg a:not(.on):hover, .seg label:not(.on):hover { background: var(--lilac-bg); }
.filters-reset { font-size: .84rem; color: var(--muted); text-decoration: none; padding: 0 4px; white-space: nowrap; }
.filters-reset:hover { color: var(--err); }
.dash-filters label.check { font-size: .88rem; }

/* ---------- Графики (01.12, дизайн шаг 3): подписи осей с единицами, суммы в легенде ---------- */
.chart .axis-title { font-size: 11px; fill: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chart .eq-axis { fill: var(--accent); }
.lg-total { font-weight: 650; color: var(--ink); margin-left: 2px; font-variant-numeric: tabular-nums; }
.series-toggles label.check { padding: 3px 8px; border-radius: 6px; }
.series-toggles label.check:hover { background: var(--lilac-bg); }
.seg a > span, .seg label > span { margin-left: 5px; }

/* ---------- Таблицы (01.12, дизайн шаг 4): плотнее, подсветка строки, закреплённая первая колонка ---------- */
.table { font-size: .93rem; }
.table th { line-height: 1.25; }
.table .thumb:not(.sm):not(.kid) { width: 30px; height: 40px; }
.table tbody tr:hover > td { background-color: #fcf7f9; }
.table tbody tr.hidden:hover > td { background-color: inherit; }
/* .sticky-first — первая колонка не уезжает при прокрутке вбок; .sticky-ph — фото (td.ph) + следующая колонка */
.table.sticky-first > * > tr > :first-child,
.table.sticky-ph > * > tr > .ph, .table.sticky-ph > * > tr > .ph + * {
  position: sticky; z-index: 1; background-color: var(--panel); }
.table.sticky-first > * > tr > :first-child { left: 0; box-shadow: inset -1px -1px 0 var(--line); }
.table.sticky-ph > * > tr > .ph { left: 0; box-shadow: inset 0 -1px 0 var(--line); }
.table.sticky-ph > * > tr > .ph + * { left: var(--ph-w, 44px); box-shadow: inset -1px -1px 0 var(--line); }
.table.sticky-first > thead > tr > :first-child, .table.sticky-ph > thead > tr > .ph, .table.sticky-ph > thead > tr > .ph + * {
  z-index: 3; background-color: #faf8f9; box-shadow: inset -1px -1px 0 var(--line); }
.table.sticky-first > tbody > tr:hover > :first-child, .table.sticky-ph > tbody > tr:hover > .ph,
.table.sticky-ph > tbody > tr:hover > .ph + * { background-color: #fcf7f9; }
.table tfoot td, .table tr.total td { font-weight: 650; }
.stock-prod .st { margin-right: 6px; vertical-align: 1px; }
.stock-table .stock-prod { min-width: 280px; }
/* при прокрутке таблицы вбок заголовок и кнопки карточки остаются на месте */
.card.flush > .row, .card.flush > h2, .card.flush > p, .card.flush > .pad, .card.flush > .table-tools, .card.flush > .fc-table-head { position: sticky; left: 0; }
.dash-table td.txt { min-width: 200px; }

/* ---------- Значки справа сверху (01.12): колокольчик «Что нового» и шестерёнка «Настройки» ---------- */
.content.with-tb { position: relative; }
.content.with-tb > .page-head, .content.with-tb > h1:first-of-type { padding-right: 96px; }
.tb-icons { position: absolute; top: 20px; right: 32px; display: flex; gap: 6px; z-index: 40; }
.tb-pop { position: relative; }
.tb-pop > summary { list-style: none; }
.tb-pop > summary::-webkit-details-marker { display: none; }
.tb-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line); transition: color .15s, border-color .15s; }
.tb-btn:hover, .tb-pop[open] > .tb-btn { color: var(--accent); border-color: var(--accent-2); }
.tb-btn.on { color: var(--accent); background: var(--lilac-bg); border-color: var(--lilac-line); }
.tb-btn.has-new { color: var(--accent); }
.tb-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-style: normal; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg); }
.tb-menu { position: absolute; top: 46px; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(39, 35, 42, .14); padding: 10px; z-index: 50; }
.tb-news { width: 420px; max-height: 70vh; overflow: auto; }
.tb-settings { width: 240px; display: flex; flex-direction: column; }
.tb-menu-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tb-menu-head a { font-size: .85rem; text-decoration: none; }
.tb-news .changes { margin: 0; }
.tb-news .changes li { padding: 8px; }
.tb-link { padding: 8px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.tb-link:hover { background: var(--lilac-bg); }
.tb-link.on { background: var(--accent); color: #fff; }
@media (max-width: 860px) {
  .tb-icons { position: fixed; top: 6px; right: 10px; }
  .tb-btn { width: 36px; height: 36px; }
  .content.with-tb > .page-head, .content.with-tb > h1:first-of-type { padding-right: 0; }
  .tb-news { width: min(420px, calc(100vw - 20px)); }
}

/* ---------- Задачи: галочка «закрыть» и проверка владельцем (02.12) ---------- */
.chip { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.chip-body { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.chip-body:hover .chip-title { color: var(--accent); }
.chk { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; padding: 0; border-radius: 50%; border: 1.6px solid #c4bdc2;
  background: #fff; color: transparent; display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.chk:hover { border-color: #2f7d55; color: #2f7d55; background: #eef7f1; }
.chk.on { background: #2f9e5a; border-color: #2f9e5a; color: #fff; }
.chk.on:hover { background: #fff; color: #2f9e5a; }
.chk.static { cursor: default; }
.chk:disabled { opacity: .6; cursor: progress; }
.chip.done { background: #f3f2f3; border-color: #e3dfe2; border-left-color: #b9b4b8; }
.chip.done .chip-title { color: var(--muted); text-decoration: line-through; text-decoration-color: #b9b4b8; }
.chip.done .chip-meta { color: #a29ca1; }
.chip .who-done { color: var(--muted); }
.chip.done { flex-wrap: wrap; }
.chip-acts { display: flex; gap: 6px; flex: 1 0 100%; justify-content: flex-end; margin-top: -2px; }
.chip-acts .ic { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.chip-acts .ic:hover { color: var(--accent); border-color: var(--accent-2); }
.chip-acts .ic.del:hover { color: var(--err); border-color: #e8a0a0; background: var(--err-bg); }
.col-note { margin: -6px 4px 8px; font-size: .74rem; color: var(--muted); line-height: 1.3; }
.cal-day .chk { width: 15px; height: 15px; margin-top: 0; }
.cal-day .chk svg { width: 9px; height: 9px; }
.cal-day .chip { gap: 5px; }
.cal-day .chip-acts { display: none; }
.task-list .chk-cell { width: 34px; padding-right: 0; }
.task-list tr.row-done td { color: var(--muted); }
.task-list tr.row-done td a { color: var(--muted); text-decoration: line-through; }
.review-note { background: #f3f2f3; border: 1px solid #e3dfe2; color: var(--ink); }
.btn .btn-ic { vertical-align: -2px; margin-right: 4px; }
.col.col-closed { background: #efedee; }

/* ---------- РНП «Анализ» (02.12): подборки, условия, итоги, таблица ---------- */
.an-lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-right: 4px; }
.an-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.an-preset { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border: 1px solid #ddd6da; border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none; font-size: .86rem; }
.an-preset b { font-weight: 700; color: var(--accent); }
.an-preset:hover { border-color: var(--accent-2); }
.an-preset.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.an-preset.on b { color: #fff; }
.an-preset.zero { opacity: .55; }
.an-saved { margin-left: auto; }
.an-saved > summary { list-style: none; cursor: pointer; }
.an-saved > summary::-webkit-details-marker { display: none; }
.an-saved .tb-menu { width: 340px; right: 0; top: 38px; }
.an-saved-row { display: flex; align-items: center; justify-content: space-between; }
.an-saved-row .tb-link { flex: 1; }
.an-save { display: flex; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.an-save input { flex: 1; min-width: 0; }
.pad-s { padding: 4px 8px; }
.an-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.an-chip { padding: 4px 10px; border-radius: 999px; background: var(--lilac-bg); border: 1px solid var(--lilac-line); color: var(--accent);
  text-decoration: none; font-size: .84rem; font-weight: 600; }
.an-chip span { margin-left: 4px; opacity: .7; }
.an-chip:hover span { opacity: 1; color: var(--err); }
.an-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.an-sum > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; }
.an-sum span { font-size: .74rem; color: var(--muted); }
.an-sum b { font-size: 1.15rem; margin: 2px 0 1px; font-variant-numeric: tabular-nums; }
.an-sum i { font-style: normal; font-size: .78rem; color: var(--muted); }
.an-sum em { font-style: normal; font-weight: 600; }
@media (max-width: 1100px) { .an-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-tools { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.an-colsel { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.an-table th a { color: inherit; text-decoration: none; white-space: nowrap; }
.an-table th.sorted, .an-table th.sorted a { color: var(--accent); }
.an-table th:hover a { color: var(--accent); }
.an-table td.num { white-space: nowrap; }
.an-table .g-first { border-left: 1px solid var(--line); }
.an-table td.good { color: var(--ok); font-weight: 600; }
.an-table td.warn { color: var(--warn); font-weight: 600; }
.an-table td.bad { color: var(--err); font-weight: 600; }
.an-table tr.total td { background: #faf8f9; font-weight: 650; }
.an-prod { min-width: 260px; max-width: 320px; }
.an-prod-in { display: flex; gap: 8px; align-items: flex-start; }
.an-art { font-weight: 650; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.an-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; line-height: 1.25; margin-top: 1px; }
.an-days { text-decoration: none; font-size: .74rem; font-weight: 500; margin-left: 2px; }
.an-prod-in > div { min-width: 0; }
.abc { font-size: .68rem; font-weight: 700; border-radius: 4px; padding: 0 5px; line-height: 16px; }
.abc-A { background: #e3f4e8; color: #1f7a45; } .abc-B { background: #fdf1dc; color: #a15c00; } .abc-C { background: #efedee; color: #827b83; }
.an-table.hide-sales .g-sales, .an-table.hide-stock .g-stock, .an-table.hide-money .g-money,
.an-table.hide-funnel .g-funnel, .an-table.hide-plan .g-plan { display: none; }

/* Дашборд: продано без себестоимости (02.12) */
.nocost-card { border-color: #f3c58a; background: #fffaf2; padding: 12px 16px; }
.nocost-card summary { cursor: pointer; list-style: none; line-height: 1.5; }
.nocost-card summary::-webkit-details-marker { display: none; }
.nocost-card summary .link { color: var(--accent); white-space: nowrap; }
.nocost-table { margin-top: 10px; background: #fff; }
td.miss-cost { background: #fff6e8; }
.miss-mark { display: inline-block; width: 15px; height: 15px; line-height: 15px; margin-right: 5px; border-radius: 50%;
  background: var(--warn); color: #fff; font-size: .7rem; font-weight: 700; text-align: center; vertical-align: 1px; }

/* РНП «Анализ»: фильтр в столбце (02.12) */
.an-table th .colf { display: flex; align-items: center; gap: 3px; margin-top: 5px; justify-content: flex-end; }
.an-table th.an-prod .colf { justify-content: flex-start; }
.colf-in { width: 74px; height: 26px; padding: 0 6px; font: inherit; font-size: .8rem; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--ink); text-align: right; border: 1px solid #ddd6da; border-radius: 6px; background: #fff; }
.colf-in.colf-q { width: 100%; min-width: 200px; text-align: left; }
.colf-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--lilac-bg); }
.colf-in.on { border-color: var(--accent); background: var(--lilac-bg); color: var(--accent); font-weight: 600; }
.colf-btn { width: 24px; height: 26px; padding: 0; border: 0; background: none; color: #a59ba3; cursor: pointer; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; }
.colf-btn:hover { background: var(--lilac-bg); color: var(--accent); }
.colf-btn.on { color: var(--accent); }
.an-table th.filtered > a { color: var(--accent); }
.colf-pop { position: absolute; z-index: 60; width: 260px; padding: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(39, 35, 42, .16); }
.colf-pop-title { font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.colf-pop select, .colf-pop input { width: 100%; height: 34px; padding: 0 9px; font: inherit; border: 1px solid #ddd6da; border-radius: 7px; background: #fff; }
.colf-pop select:focus, .colf-pop input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--lilac-bg); }
.colf-vals { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.colf-vals span { color: var(--muted); font-size: .85rem; }
.colf-pop [data-colf-hint] { margin-top: 6px; min-height: 1em; }
.colf-pop-btns { display: flex; gap: 8px; margin-top: 10px; }
.colf-pop-btns .btn { flex: 1; justify-content: center; }
.colf-in::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; color: #a59ba3; }
/* Плавные фильтры (все страницы): содержимое обновляется без перезагрузки — мягкое затемнение, пока идёт запрос */
[data-page] { transition: opacity .15s ease; }
[data-page].soft-loading { opacity: .55; }
[data-page].soft-loading table tbody { pointer-events: none; }

/* Техническая сводка (только владелец) */
.tech-intro p { margin: 0 0 8px; max-width: 980px; }
.tech-form { margin: 10px 0 6px; flex-wrap: wrap; align-items: center; }
.tech-form input { height: 32px; padding: 0 8px; border: 1px solid #ddd6da; border-radius: 7px; font: inherit; }
.tech-text { margin: 0; padding: 14px 16px; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: #fcfbfc; }
