:root {
  --bg: #f6f4f8;
  --surface: #ffffff;
  --surface-2: #faf8fb;
  --text: #1c1920;
  --muted: #6c6574;
  --line: #e6e1ea;
  --accent: #bc04bc;          /* пурпурный из логотипа iStore Kosta */
  --accent-strong: #a003a0;   /* кнопки, ссылки — контраст с белым текстом */
  --accent-soft: #fbe7fb;
  --accent-ink: #860386;
  --side: #000000;
  --side-2: #161317;
  --side-text: #c9c3cf;
  --side-active: #f59cf5;
  --ok: #18865b; --ok-soft: #e3f4ec;
  --warn: #a8670b; --warn-soft: #fbf0dd;
  --danger: #c4314b; --danger-soft: #fbe6ea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 16, 36, .05), 0 4px 16px rgba(28, 16, 36, .04);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-strong); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }

/* ---------- каркас */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; color: #fff; }
.brand-logo { width: 120px; height: auto; display: block; }
.brand-logo.big { width: 100%; max-width: 380px; }
.side .brand small { font-size: 10px; letter-spacing: .14em; color: #a497ab; border-left: 1px solid #2c262e; padding-left: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: linear-gradient(140deg, #2a2230 0%, #000 55%); border: 1px solid #3a2f40;
  display: grid; place-items: center; }
.brand b { font-size: 16px; font-weight: 800; display: block; }
.brand small { color: #a497ab; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.side-user { background: var(--side-2); border-radius: 10px; padding: 10px 12px; margin: 0 4px 14px; font-size: 13px; }
.side-user b { color: #fff; display: block; }
.side-user span { color: #9d93a4; font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group > button, .nav a.top-link { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 0; background: none; color: var(--side-text); border-radius: 8px; cursor: pointer; text-align: left; font-weight: 600; }
.nav-group > button:hover, .nav a.top-link:hover { background: var(--side-2); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-group .chev { margin-left: auto; transition: transform .15s; width: 14px; height: 14px; }
.nav-group.open .chev { transform: rotate(90deg); }
.nav-sub { display: none; flex-direction: column; padding: 2px 0 6px 28px; }
.nav-group.open .nav-sub { display: flex; }
.nav-sub a { color: #a9a0b0; padding: 7px 12px; border-radius: 7px; font-size: 13px; }
.nav-sub a:hover { color: #fff; background: var(--side-2); }
.nav a.active { color: var(--side-active); background: rgba(188, 4, 188, .16); }
.side-foot { margin-top: auto; padding: 14px 8px 0; }
.side-foot button { width: 100%; background: none; border: 1px solid #2c2731; color: #b3a9b9; padding: 8px; border-radius: 8px; cursor: pointer; }
.side-foot button:hover { color: #fff; border-color: #4a4050; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .burger { display: none; }
.top-title { font-weight: 700; font-size: 15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-ink); font-weight: 700; font-size: 12px; border: 0; cursor: pointer; white-space: nowrap; }
#page { padding: 24px 28px 48px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; font-weight: 800; }
.page-head .sp { flex: 1; }

/* ---------- элементы */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: end; }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fld.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 9px 11px;
  outline: none; min-height: 40px; transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(188, 4, 188, .16); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent-strong); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; min-height: 40px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: var(--accent-strong); color: #fff;
  padding: 10px 16px; border-radius: 9px; font-weight: 700; cursor: pointer; min-height: 40px; white-space: nowrap; }
.btn:hover { background: #860386; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #cfc5d6; background: var(--surface-2); }
.btn.danger { background: var(--danger); }
.btn.dark { background: var(--side); }
.btn.sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn.big { padding: 14px 22px; font-size: 15px; width: 100%; letter-spacing: .04em; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 7px; color: var(--muted); line-height: 1; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn svg { width: 17px; height: 17px; display: block; }
.link { background: none; border: 0; color: var(--accent-strong); cursor: pointer; padding: 0; font-weight: 600; }
.f-actions { display: flex; gap: 8px; justify-content: flex-end; grid-column: 1 / -1; }
.filters { padding-bottom: 14px; }
.filters summary { cursor: pointer; font-weight: 700; margin-bottom: 4px; list-style: none; display: flex; align-items: center; gap: 6px; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary svg, .btn svg { width: 17px; height: 17px; flex: none; }
.filters details[open] summary { margin-bottom: 14px; }
.tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 700; color: var(--muted); }
.tabs button.on { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- таблицы */
.tbl-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:hover td { background: #fcfaFD; }
.tbl tr.muted td { color: var(--muted); }
.tbl tr.muted td:not(:last-child) { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .act { white-space: nowrap; text-align: right; }
.tbl tfoot td { font-weight: 800; background: var(--surface-2); }
.tbl input { min-height: 34px; padding: 6px 9px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
.sub { color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 12px; color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: #efecf2; color: #5b5463; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pos { color: var(--ok); }
.neg { color: var(--danger); }

/* ---------- статистика */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .k-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .k-val { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .k-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi.hero { background: linear-gradient(135deg, #bc04bc 0%, #8f038f 100%); color: #fff; border-color: #a003a0; }
.kpi.hero .k-label, .kpi.hero .k-sub { color: rgba(255, 255, 255, .88); }
.stat-list { display: grid; gap: 8px; }
.stat-list div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.stat-list div:last-child { border-bottom: 0; }
.stat-list b { font-variant-numeric: tabular-nums; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: hidden; }
.chart-empty { padding: 48px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.chart .tip { position: absolute; pointer-events: none; background: var(--side); color: #fff; padding: 7px 10px; border-radius: 8px;
  font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); display: none; z-index: 2; }
.chart rect.bar { fill: var(--accent); }
.chart rect.bar.neg { fill: var(--danger); }
.chart g.col:hover rect.bar { fill: var(--accent-strong); }

/* ---------- продажа */
.sale-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.pay-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.pay-section h4 { margin: 0 0 10px; font-size: 13px; }
.sum-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.sum-box div { display: flex; justify-content: space-between; padding: 3px 0; }
.sum-box .total { font-size: 18px; font-weight: 800; }
.scan { display: flex; gap: 8px; align-items: end; }
.scan .fld { flex: 1; }
.inline { display: flex; gap: 8px; align-items: end; }
.inline > * { flex: 1; }
.inline > .btn, .inline > .icon-btn { flex: none; }

/* ---------- модалки, уведомления */
.modal-bg { position: fixed; inset: 0; background: rgba(17, 12, 20, .45); display: grid; place-items: center; padding: 16px; z-index: 100;
  animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(980px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal header h3 { font-size: 16px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.modal .err:not(:empty), .form-err:not(:empty) { margin: 0 20px; padding: 10px 12px; background: var(--danger-soft); color: var(--danger); border-radius: 8px; font-weight: 600; }
.form-err:not(:empty) { margin: 12px 0 0; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--side); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 600;
  border-left: 4px solid var(--accent); animation: fade .15s; max-width: 380px; }
.toast.err { border-left-color: #ff6b84; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- вход: чёрный фон в цвет логотипа */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px;
  background: #000; color: #f4eef5; overflow: hidden; }
.auth-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 100%, rgba(188, 4, 188, .28) 0%, rgba(188, 4, 188, 0) 70%),
              radial-gradient(40% 30% at 50% 0%, rgba(188, 4, 188, .10) 0%, rgba(188, 4, 188, 0) 70%); }
.auth-col { position: relative; width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; }
.auth-logo { width: min(300px, 82%); height: auto; display: block; }
.auth-tag { margin: 10px 0 26px; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: #9d8fa3; }
.auth-card { width: 100%; background: rgba(22, 18, 24, .92); border: 1px solid #2c2430; border-radius: 18px; padding: 26px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(188, 4, 188, .06); }
.auth-card form { display: grid; gap: 14px; }
.auth-card h1 { font-size: 22px; font-weight: 800; color: #fff; }
.auth-sub, .auth-card .hint { margin: -6px 0 4px; color: #9d8fa3; font-size: 13px; }
.auth-card .fld > span { color: #b9adbf; }
.auth-card input { background: #0d0b0e; border-color: #342c38; color: #fff; }
.auth-card input::placeholder { color: #6f6375; }
.auth-card input:focus { border-color: #e33be3; box-shadow: 0 0 0 3px rgba(227, 59, 227, .22); }
.auth-card input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 40px #0d0b0e inset; }
.auth-card .btn.big { margin-top: 6px; background: #bc04bc; }
.auth-card .btn.big:hover { background: #a003a0; }
.auth-card .form-err:not(:empty) { background: rgba(255, 122, 144, .12); color: #ff9aac; }
.auth-foot { margin-top: 22px; font-size: 12px; color: #6f6375; }

/* ---------- ревизия и прочее */
.rev-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
body.no-scroll { overflow: hidden; }
.menu-backdrop { display: none; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.talon-preview { white-space: pre-wrap; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; }
.hint { color: var(--muted); font-size: 12.5px; }

/* ---------- мобильная версия */
@media (max-width: 1100px) {
  .sale-grid { grid-template-columns: 1fr; }
  .rev-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .app.menu-open .side { transform: none; }
  .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .5);
    opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
  .side { touch-action: pan-y; }
  .top { padding: 0 16px; }
  .top .burger { display: block; }
  .top-right .hide-sm { display: none; }
  #page { padding: 16px 16px 40px; }
  .grid.g2, .grid.g3 { grid-template-columns: 1fr; }
  .tbl-wrap { margin: 0 -18px; }
}
@media print {
  .side, .top, .no-print { display: none !important; }
  .app { display: block; }
}

/* ---------- курс */
.chip-src { font-weight: 600; opacity: .75; font-size: 11px; }
.rate-info { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }

/* ---------- дашборд */
.dash-tabs { margin-bottom: 0; }
.dash-h { font-size: 16px; font-weight: 800; margin: 6px 0 12px; }
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis-6 .k-val { font-size: 21px; }
@media (max-width: 1350px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.delta { display: inline-block; font-size: 12px; font-weight: 700; margin-top: 4px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--muted); font-weight: 600; }
.kpi.hero .delta, .kpi.hero .delta.up, .kpi.hero .delta.down, .kpi.hero .delta.flat { color: #fff; }
.dash-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.dash-grid > .card { margin-bottom: 0; }
.dash-grid .span-2 { grid-column: span 2; }
.hbars { display: grid; gap: 12px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.hbar-top b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { height: 8px; background: var(--surface-2); border-radius: 4px; margin-top: 5px; overflow: hidden; border: 1px solid var(--line); }
.hbar-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.recent { display: grid; }
.recent > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recent > div:last-child { border-bottom: 0; }
.recent b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart g.col:hover .pt { r: 6; }
.chart .pt { opacity: 0; }
.chart g.col:hover .pt { opacity: 1; }

/* тёмный вариант — свои токены, без автоматической инверсии */
.dark-dash { --surface: #121013; --surface-2: #1b181c; --line: #2c262e; --text: #f4eef5; --muted: #a99fac;
  --accent: #e33be3; --danger: #ff7a90; --ok: #6fdba5;
  background: #000; color: var(--text); border-radius: 18px; padding: 22px; margin: 0 -4px; }
.dark-dash .card, .dark-dash .kpi { background: var(--surface); border-color: var(--line); box-shadow: none; }
.dark-dash .dash-grid { margin-top: 16px; }
.dark-dash .chart .tip { background: #f4eef5; color: #000; }
.dd-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: end; padding: 22px 24px; margin-bottom: 16px; border-radius: 16px;
  background: radial-gradient(circle at 85% 0%, rgba(227, 59, 227, .35) 0%, rgba(0,0,0,0) 55%), #0d0a0e; border: 1px solid #2c262e; }
.dd-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.dd-big { font-size: clamp(32px, 5vw, 54px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.dd-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dd-mini > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.dd-mini span { display: block; color: var(--muted); font-size: 12px; }
.dd-mini b { font-size: 17px; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .span-2 { grid-column: auto; }
  .dd-hero { grid-template-columns: 1fr; }
  .dark-dash { padding: 14px; }
}

/* ---------- оплата кнопками */
.pay-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-btn { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 14px; font-weight: 700; cursor: pointer; min-height: 42px; }
.pay-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.pay-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.pay-btn[data-method="debt"] { border-style: dashed; color: var(--muted); }
#pay-rows { display: grid; gap: 8px; margin-top: 12px; }
.pay-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto auto; gap: 8px; align-items: center; }
.pay-row .pay-name { font-weight: 700; font-size: 13px; }
.pay-row input[type=date] { width: 150px; }

/* ---------- постоянные расходы, план, склад */
.rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rec-head h3 { margin: 0; }
.rec-head .sp { flex: 1; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.plan-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan-top .k-val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan-top .sp { flex: 1; }
.plan-track { position: relative; height: 14px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); margin: 12px 0 8px; overflow: hidden; }
.plan-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #bc04bc, #e33be3); }
.plan-pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .55; }
.plan-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.plan-meta b { color: var(--text); }
.dark-dash .plan-card { background: var(--surface); }
.days { font-variant-numeric: tabular-nums; white-space: nowrap; }
.period-btns .btn.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.stat-list div.hl { background: var(--accent-soft); border: 0; border-radius: 9px; padding: 9px 10px; margin-top: 4px; }
.stat-list div.hl span, .stat-list div.hl b { color: var(--accent-ink); font-weight: 800; }
.stat-list div.hl b { font-size: 16px; }
.dark-dash .stat-list div.hl { background: rgba(227, 59, 227, .16); }
.dark-dash .stat-list div.hl span, .dark-dash .stat-list div.hl b { color: #f59cf5; }

/* ---------- дашборд без пустот: графики парой, карточки плиткой по колонкам */
.chart-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.chart-pair > .card { margin: 0; }
.masonry { column-count: 3; column-gap: 16px; }
.masonry > .card { break-inside: avoid; page-break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 16px; }
.dark-dash .masonry { margin-top: 16px; }
@media (max-width: 1250px) { .masonry { column-count: 2; } }
@media (max-width: 900px) { .chart-pair { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .masonry { column-count: 1; } }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.masonry-2 { column-count: 2; }
@media (max-width: 900px) { .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .masonry-2 { column-count: 1; } }
.receipt-frame { width: 260px; height: 640px; border: 0; display: block; margin: 0 auto; background: #fff; }

/* ---------- резерв и действия у товара */
.row-actions { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.reserve-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }
.reserve-note svg { width: 13px; height: 13px; }
.tbl .col-prod { min-width: 240px; }
.reserve-note { line-height: 1.35; }
.sum-box .comm span { color: var(--muted); font-size: 13px; }
.sum-box .profit-line { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
