/* Дизайн: раскладка «Пастельный сервис» (вариант 8, страница 8D1REX3qfAgph4hyPtNdyx) в палитре «Монохром»
   (выбор Дена 13.10.2026, страница Do8JZqPQ9RjMWxGcNgS2Cw): чёрное и белое, цвет только у статусов и денег.
   Меню слева, шрифт Manrope; плитки метрик белые с рамкой (--p1..--p4), «Депозиты всего» - тёмная (--p5). */
:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #efefef;
  --line: #e0e0e0;
  --text: #141414;
  --muted: #696969;
  --accent: #141414;
  --accent-ink: #ffffff;
  --accent-soft: #ebebeb;
  --ok: #12784b;
  --ok-soft: #e1f1e8;
  --warn: #9a5c08;
  --warn-soft: #fbefdc;
  --bad: #c0362f;
  --bad-soft: #fbe5e3;
  --info: #2c5cb4;
  --info-soft: #e6ecf8;
  --violet: #7444ad;
  --violet-soft: #f0e9f7;
  --p1: #ffffff; --p2: #ffffff; --p3: #ffffff; --p4: #ffffff; --p5: #141414; --p5-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --radius: 14px;
  --font: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e; --surface: #171717; --surface-2: #202020; --line: #2c2c2c;
    --text: #ededed; --muted: #979797; --accent: #ededed; --accent-ink: #111111; --accent-soft: #272727;
    --ok: #4ccc8c; --ok-soft: #13281d; --warn: #edb057; --warn-soft: #2b2213;
    --bad: #f57a70; --bad-soft: #321918; --info: #82a8f0; --info-soft: #18213a; --violet: #c3a1f0; --violet-soft: #241c33;
    --p1: #171717; --p2: #171717; --p3: #171717; --p4: #171717; --p5: #ededed; --p5-ink: #111111;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e0e; --surface: #171717; --surface-2: #202020; --line: #2c2c2c;
  --text: #ededed; --muted: #979797; --accent: #ededed; --accent-ink: #111111; --accent-soft: #272727;
  --ok: #4ccc8c; --ok-soft: #13281d; --warn: #edb057; --warn-soft: #2b2213;
  --bad: #f57a70; --bad-soft: #321918; --info: #82a8f0; --info-soft: #18213a; --violet: #c3a1f0; --violet-soft: #241c33;
  --p1: #171717; --p2: #171717; --p3: #171717; --p4: #171717; --p5: #ededed; --p5-ink: #111111;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
h1 { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- каркас ---------- */
/* Компьютер (от 1000 px): меню слева на всю высоту. Уже - полоса сверху: знак, кнопка «☰ раздел», «+ Депозит»;
   разделы, Telegram, тема и выход - в списке, который открывает кнопка (app.js, класс .menu-open). */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); display: flex; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none;
}
.top .menu-btn { display: none; }
.menu-btn .burger { font-size: 16px; line-height: 1; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.on { color: var(--accent); background: var(--accent-soft); }
.count { background: var(--bad); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 17px; display: inline-block; margin-left: 2px; }
.top-right { display: flex; gap: 6px; align-items: center; }
.btn.icon { padding: 7px 10px; }
.main { padding: 28px 30px 60px; max-width: 1240px; width: 100%; min-width: 0; margin: 0 auto; }
@media (min-width: 1000px) {
  body.app { display: grid; grid-template-columns: 216px minmax(0, 1fr); align-items: start; }
  .top { height: 100vh; height: 100dvh; overflow-y: auto; flex-direction: column; align-items: stretch; padding: 22px 14px; border-right: 1px solid var(--line); }
  .nav { flex-direction: column; }
  .top-right { margin-top: auto; flex-wrap: wrap; }
  .top-right .btn.primary { flex-basis: 100%; }
}
@media (max-width: 999px) {
  .top { flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .top .menu-btn { display: inline-flex; }
  .top-right { display: contents; }
  .top-right > .primary { order: 2; margin-left: auto; }
  .top-right > :not(.primary) { display: none; order: 4; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; padding-top: 8px; border-top: 1px solid var(--line); }
  .nav a { padding: 11px 12px; font-size: 15px; }
  .top.menu-open .nav { display: flex; }
  .top.menu-open .top-right > :not(.primary) { display: inline-flex; }
  .top.menu-open .top-right > form.inline { display: inline; }
  .top.menu-open .menu-btn { background: var(--accent-soft); border-color: var(--accent); }
}
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.demo-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 2px 6px;
}

/* ---------- элементы ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2, .card-head { padding: 16px 18px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.alerts-tools { display: flex; align-items: center; gap: 10px; }
.alerts-box > summary { justify-content: flex-start; margin: 0; padding-bottom: 16px; cursor: pointer; list-style: none; }
.alerts-box > summary::-webkit-details-marker { display: none; }
details.card.alerts-box > summary::after { content: none; }
.alerts-box .alerts-hint { margin-left: auto; }
.alerts-box .alerts-hint::after { content: " ▾"; }
.alerts-box[open] .alerts-hint { font-size: 0; }
.alerts-box[open] .alerts-hint::after { content: "свернуть ▴"; font-size: 12px; }
.alerts-box[open] > summary { margin: 0; padding-bottom: 8px; }
.alerts-bar { display: flex; justify-content: flex-end; padding: 0 18px 12px; }
.alerts-box { margin-bottom: 16px; }  /* над плитками «Итогов» - тот же отступ, что между карточками */
.alert-item.gone { opacity: .4; transition: opacity .2s; }
.pill[hidden], .count[hidden] { display: none; }
/* Значок «i» с подсказкой: текст в плавающем окне у body - таблица с прокруткой его не обрезает. */
.tip-i { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; margin-left: 6px; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: italic 700 11px/1 Georgia, serif; cursor: help; }
.tip-i:hover, .tip-i:focus-visible, .tip-i.on { color: var(--text); border-color: var(--muted); }
.tip-pop { position: fixed; z-index: 50; max-width: min(380px, calc(100vw - 32px)); padding: 8px 10px; border-radius: 8px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.18);
  font-size: 12px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; pointer-events: none; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: 1.6fr 1fr; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.gold { background: var(--accent-soft); border-color: transparent; }
.kpi.ok { background: var(--ok-soft); border-color: transparent; }
.kpi.ok .v { color: var(--ok); }
/* 5 метрик - каждая своей пастелью (вариант 8); плитки денег ниже остаются белыми с рамкой. */
.kpi:has(> [data-m]) { box-shadow: none; }
.kpi:has(> [data-m]) .l { color: var(--text); opacity: .7; font-weight: 600; }
.kpi:has(> [data-m="regs"]) { background: var(--p1); }
.kpi:has(> [data-m="verif"]) { background: var(--p2); }
.kpi:has(> [data-m="ftd"]) { background: var(--p3); }
.kpi:has(> [data-m="redep"]) { background: var(--p4); }
.kpi:has(> [data-m="deps"]) { background: var(--p5); border-color: var(--p5); }
.kpi:has(> [data-m="deps"]), .kpi:has(> [data-m="deps"]) .l, .kpi:has(> [data-m="deps"]) .s { color: var(--p5-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
form.inline { display: inline; margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; padding: 3px 10px;
  font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted);
}
.pill::before { content: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.gold { background: var(--accent-soft); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
/* Лента: ширина колонок не зависит от строк - при смене фильтра «Событие» и «Гео» не прыгают. */
table.live { table-layout: fixed; }
table.live .c-time { width: 150px; }
table.live .c-geo { width: 34%; }
table.live.with-client .c-geo { width: 24%; }
table.live .c-client { width: 30%; }
table.live td { overflow-wrap: anywhere; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.fresh { animation: fresh 3s ease-out; }
@keyframes fresh { from { background: var(--accent-soft); } to { background: transparent; } }
td.num, th.num { text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px;
  text-decoration: none; color: var(--muted); font-weight: 500; cursor: pointer; font: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.chip b { color: var(--text); margin-left: 4px; }

.f { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 90px; resize: vertical; }
/* Галочки и переключатели - своего размера, а не на всю ширину, как поля ввода (правка Дена 13.10.2026). */
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; padding: 0; flex: none; margin: 0; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 2px; }
.row-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }

.alert-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line); }
.alert-item .ic { flex: none; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.alert-item .ic.orphan { background: var(--warn-soft); color: var(--warn); }
.alert-item .t { flex: 1; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

/* столбики по дням */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 0 18px 0; }
.bars .d { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; position: relative; }
.bars .r { background: var(--surface-2); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars .dp { background: var(--accent); border-radius: 3px; min-height: 0; }
.bars .d:hover .r { background: var(--line); }
.bars-axis { display: flex; justify-content: space-between; padding: 6px 18px 16px; color: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 9px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.secret { display: inline-flex; gap: 8px; align-items: center; }
.shot { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.timeline li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }

.spark { width: 110px; height: 28px; display: block; }
.spark path { fill: none; stroke: var(--ok); stroke-width: 1.6; }
.spark.neg path { stroke: var(--bad); }

/* мастер отчёта */
.wizard { max-width: 720px; }
.steps { display: flex; gap: 4px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--accent); }
.step { display: none; }
.step.on { display: block; }
.step h2 { font-size: 19px; margin-bottom: 4px; }
.step .q { margin: 0 0 16px; color: var(--muted); }
.step-n { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 6px; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 22px; gap: 10px; }
.big-input { font-size: 22px; font-weight: 700; padding: 12px 14px; }
.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted);
  cursor: pointer; display: block;
}
.drop:hover { border-color: var(--accent); }
.drop img { max-height: 260px; max-width: 100%; border-radius: 8px; margin-top: 10px; }
.summary-list { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; }
.summary-list div:nth-child(odd) { color: var(--muted); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 360px; }
.login .brand { padding: 0 0 18px; justify-content: center; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600;
  opacity: 0; transition: .2s; pointer-events: none; z-index: 50;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.edit-table input { padding: 6px 8px; border-radius: 7px; }
.edit-table td { padding: 6px 8px; }
.sep { height: 1px; background: var(--line); margin: 16px 0; }

@media (max-width: 1000px) {
  .g2, .g3, .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .brand-name { display: none; }
  .main { padding: 18px 16px 50px; }
  .kv, .summary-list { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd, .summary-list div:nth-child(even) { margin-bottom: 8px; }
  th, td { padding: 9px 10px; }
  .hide-m { display: none; }
  table.live .c-time { width: 104px; }
  table.live.with-client { min-width: 560px; }
  table.live .pill { white-space: normal; }
}

.upload-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.upload-bar > div { flex: 1; min-width: 240px; }
.upload-bar input[type=file] { width: auto; max-width: 100%; }
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.section-title:first-child { margin-top: 0; }
.stack { display: grid; gap: 12px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
details.card > summary { cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
details.card > summary::after { content: " ▾"; color: var(--muted); }
details.card[open] > summary { margin-bottom: 14px; }

/* Период, переключатель аккаунтов, таблица по дням */
.period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period .range { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.period input[type=date] { width: auto; }
.acc-switch { margin: -6px 0 16px; }
.bad-text { color: var(--bad); }
/* По дням: плитки итога, строка по аккаунтам, таблица «Люди / Деньги» */
.days-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; padding: 0 18px 14px; }
.days-strip > div { border-radius: 12px; background: var(--surface-2); padding: 9px 12px; display: grid; gap: 1px; min-width: 0; }
.days-strip > div.p { background: var(--warn-soft); }
.days-strip > div.o { background: var(--ok-soft); }
.days-strip span { font-size: 11.5px; color: var(--muted); }
.days-strip b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.days-strip em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.acc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--accent); }
.acc-dot.c1 { background: var(--info); }
.acc-dot.c2 { background: var(--ok); }
.acc-dot.c3 { background: var(--bad); }
.pend { color: var(--warn); }
.okv { color: var(--ok); }
.z { color: var(--line); font-weight: 700; }
.cl { display: block; font-size: 11px; color: var(--muted); font-weight: 400; white-space: nowrap; }
table.days th { line-height: 1.25; }
table.days th.bottom { vertical-align: bottom; }
table.days th.grp { text-align: center; color: var(--text); border-bottom: 0; padding-bottom: 0; }
table.days .gs { border-left: 1px solid var(--line); }
table.days .gm { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
table.days tbody tr:hover td.gm { background: var(--accent-soft); }
table.days .dn { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
table.days .dn.today { color: var(--accent); }
table.days .wd { color: var(--muted); font-size: 11.5px; margin-left: 4px; }
table.days tr.muted .dn { color: var(--muted); }
table.days .chev { display: inline-block; width: 13px; color: var(--muted); transition: transform .15s; }
table.days tr[data-day-toggle] { cursor: pointer; }
table.days tr[data-day-toggle]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table.days tr.open .chev { transform: rotate(90deg); }
table.days tr.open > td { background: var(--surface-2); }
table.days tr.acc td { font-size: 12.5px; color: var(--muted); padding-top: 5px; padding-bottom: 5px; border-bottom-style: dashed; background: var(--surface-2); }
table.days tr.acc td:first-child { padding-left: 32px; }
@media (max-width: 760px) {
  .days-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 12px 12px; gap: 6px; }
  .days-strip > div { grid-column: span 2; padding: 8px 9px; }
  .days-strip > div.p, .days-strip > div.o { grid-column: span 3; }
  .days-strip b { font-size: 16px; }
  table.days th, table.days td { padding: 9px 5px; }
  table.days th:first-child, table.days td:first-child { padding-left: 10px; }
  table.days th:last-child, table.days td:last-child { padding-right: 10px; }
  table.days th { font-size: 10px; letter-spacing: .02em; }
  table.days .cl { font-size: 10.5px; }
  table.days .dn { font-size: 17px; }
  table.days .wd { margin-left: 2px; font-size: 11px; }
  table.days .chev { width: 10px; }
  table.days tr.acc td:first-child { padding-left: 18px; }
}
.acc-tag { font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid transparent; border-radius: 6px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; }
/* Поля, которые админ меняет под себя (как жёлтые ячейки в таблице владельца) */
.yellow input:not([readonly]) { background: var(--warn-soft); }
/* «По гео» на всю ширину: суммы не переносятся, на телефоне колонки ужимаются вместо прокрутки */
.geo-table td.num, .geo-table th.num { white-space: nowrap; }
@media (max-width: 760px) {
  .geo-table th, .geo-table td { padding: 9px 5px; font-size: 12.5px; }
  .geo-table th { font-size: 10px; letter-spacing: .02em; white-space: normal; }
  .geo-table th:first-child, .geo-table td:first-child { padding-left: 10px; }
  .geo-table th:last-child, .geo-table td:last-child { padding-right: 10px; }
  .geo-table td.num .small { display: block; }
}
/* «Выгрузка»: клиент с необычным статусом FxPro или флагом фрода - вся строка красная */
tr.row-bad > td { background: var(--bad-soft); }
tr.row-bad > td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tbody tr.row-bad:hover > td { background: color-mix(in srgb, var(--bad-soft) 75%, var(--bad) 25%); }
/* Плитка-кнопка: по клику таблица ниже показывает только этих клиентов */
.kpi-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.kpi-btn:hover { border-color: var(--accent); }
.kpi-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.kpi-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-only-bar] { gap: 12px; flex-wrap: wrap; }
/* Загрузка отчёта: полоса прогресса */
.upload-progress { flex-basis: 100%; display: grid; gap: 8px; }
.upload-progress[hidden] { display: none; }
.upload-progress .steps { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.upload-progress .steps span::before { content: "○ "; }
.upload-progress .steps span.on { color: var(--text); font-weight: 600; }
.upload-progress .steps span.on::before { content: "● "; color: var(--accent); }
.upload-progress .steps span.past::before { content: "✓ "; color: var(--ok); }
.upload-progress .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.upload-progress .track i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.upload-progress.work .track i { width: 100% !important; background: linear-gradient(90deg, var(--accent-soft), var(--accent), var(--accent-soft)); background-size: 200% 100%; animation: upwork 1.1s linear infinite; }
.upload-progress.ok .track i { width: 100% !important; background: var(--ok); }
.upload-progress.bad .track i { width: 100% !important; background: var(--bad); }
.upload-progress.bad [data-progress-text] { color: var(--bad); }
@keyframes upwork { from { background-position: 200% 0; } to { background-position: 0 0; } }
/* Главная менеджера: красный блок «Нет в статистике» раскрывается списком */
.missing-box { margin-top: 12px; border-color: var(--bad); }
.missing-box > summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; background: var(--bad-soft); border-radius: var(--radius); }
.missing-box[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.missing-box > summary .pill { font-size: 13px; font-weight: 700; }
/* «Боты»: переключатель автозапуска - серый ВЫКЛЮЧЕН / зелёный ВКЛЮЧЕН */
.auto-switch { display: flex; align-items: center; gap: 14px; }
.auto-switch .switch { flex: none; position: relative; width: 46px; height: 26px; border-radius: 99px; border: 0; padding: 0; cursor: pointer; background: var(--line); transition: background .15s; }
.auto-switch .switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.auto-switch.on .switch { background: var(--ok); }
.auto-switch.on .switch i { left: 23px; }
.auto-switch .switch[data-armed] { width: auto; height: auto; padding: 6px 12px; font: inherit; font-size: 12.5px; color: #fff; background: var(--warn); }
.auto-switch .switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auto-switch .state { color: var(--muted); }
.auto-switch.on .state { color: var(--ok); }

/* «Клиенты»: сводка статусов над списком - плитка и фильтр в одном. */
.stage-sum { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 10px; }
@media (max-width: 1100px) { .stage-sum { grid-template-columns: repeat(3, 1fr); } }
.stage-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.stage-tile:hover { background: var(--surface-2); }
.stage-tile.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
.stage-tile.zero:not(.on) { opacity: .6; }
.stage-tile .l { color: var(--muted); font-size: 12px; line-height: 22px; }
.stage-tile .pill { align-self: flex-start; }
.stage-tile .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stage-tile .s { font-size: 12px; color: var(--muted); line-height: 1.35; }
.bot-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; }
.bot-sum .zero { opacity: .55; }
.bot-sum .hint { color: var(--muted); }
@media (max-width: 640px) { .stage-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stage-tile .pill { white-space: normal; } .bot-sum .hint { display: none; } }

/* Полоса прокрутки не сдвигает страницу, когда строк становится больше или меньше. */
html { scrollbar-gutter: stable; }

/* Карточка клиента: найден ли в партнёрке и сколько заплатят. */
.pp-box { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; border: 1px solid transparent; }
.pp-box.ok { background: var(--ok-soft); border-color: var(--ok); }
.pp-box.warn { background: var(--warn-soft); border-color: var(--warn); }
.pp-box.bad { background: var(--bad-soft); border-color: var(--bad); }
.pp-head { font-size: 18px; font-weight: 700; }
.pp-box.ok .pp-head { color: var(--ok); }
.pp-box.warn .pp-head { color: var(--warn); }
.pp-box.bad .pp-head { color: var(--bad); }
.pp-line { margin-top: 4px; }
.pp-pay { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pp-pay .l { color: var(--muted); margin-right: 6px; }
.pp-pay b { font-size: 22px; letter-spacing: -.02em; margin-right: 6px; }
.pp-box.violet { background: var(--violet-soft); border-color: var(--violet); }
.pp-box.violet .pp-head { color: var(--violet); }
