/* WBai v2 — дизайн-система. Без внешних шрифтов и библиотек. */
:root {
  /* Нейтральная основа, бренд — фиолетовый WBai, как в расширении. Цвет — только для смысла и действий. */
  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-2: #f3f3f6;
  --ink: #111114;
  --ink-2: #45454f;
  --ink-3: #82828c;
  --line: #e7e7ec;
  --brand: #6d3cf5;
  --brand-2: #5a2ae0;
  --brand-soft: #f0ebff;
  --accent: #e8851a;
  --accent-soft: #fdf1e1;
  --red: #d92d20;
  --red-soft: #fdecea;
  --yellow: #b7791f;
  --yellow-soft: #fdf5e2;
  --green: #0f9d63;
  --green-soft: #e4f6ee;
  --grey-soft: #f0f0f3;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(17, 17, 20, .04), 0 2px 8px rgba(17, 17, 20, .04);
  --shadow-lg: 0 12px 40px rgba(17, 17, 20, .12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0b0e;
  --surface: #131317;
  --surface-2: #1b1b21;
  --ink: #f2f2f5;
  --ink-2: #b9b9c4;
  --ink-3: #82828f;
  --line: #24242c;
  --brand: #9b7bff;
  --brand-2: #b29aff;
  --brand-soft: #231a3d;
  --accent: #f0a443;
  --accent-soft: #3a2a14;
  --red: #ff6b5e;
  --red-soft: #3a1714;
  --yellow: #f0c048;
  --yellow-soft: #33290f;
  --green: #3ddc97;
  --green-soft: #0f2a1f;
  --grey-soft: #1f1f26;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; font-feature-settings: 'cv11', 'ss01'; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* Кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border .15s, box-shadow .15s; width: 100%; }
textarea.input { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.hint { font-size: 12px; color: var(--ink-3); }

/* Карточки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ink-3); flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); }

/* Таблицы */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--surface-2); }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; }
.kpi .label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.kpi .value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 13px; margin-top: 4px; color: var(--ink-3); }
.kpi.lead-kpi { background: linear-gradient(135deg, var(--brand), #0a5c47); color: #fff; border: 0; }
.kpi.lead-kpi .label, .kpi.lead-kpi .sub { color: rgba(255, 255, 255, .8); }
[data-theme="dark"] .kpi.lead-kpi { background: linear-gradient(135deg, #14634e, #0b3d31); }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }
.kpi.lead-kpi .delta.up, .kpi.lead-kpi .delta.down { color: #fff; }

/* Приложение */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; padding: 4px 8px 14px; color: var(--ink); text-decoration: none !important; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.nav-group { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 550; text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.topbar h1 { font-size: 20px; margin-right: auto; }
.content { padding: 24px 28px 60px; display: flex; flex-direction: column; gap: 20px; max-width: 1320px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi .value.neg { color: inherit; }
tr.sub td { font-size: 13px; color: var(--ink-2); }
.summary { font-size: 18px; line-height: 1.55; }
.summary b { font-weight: 700; }
.actions { list-style: none; margin: 0; padding: 0; }
.action { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.action:last-child { border-bottom: 0; }
.action .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.action.stock .n { background: var(--red-soft); color: var(--red); }
.action.price .n, .action.ads .n { background: var(--accent-soft); color: var(--accent); }
.action .t { font-weight: 650; }
.action .why { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.action .do { font-size: 14px; margin-top: 6px; }
.action .do::before { content: "→ "; color: var(--brand); font-weight: 700; }
.stage { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-3); }
.lights { display: flex; gap: 10px; flex-wrap: wrap; }
.light-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar span { display: block; height: 100%; }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }
.banner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); border: 1px solid transparent; }
.banner.info { background: var(--brand-soft); }
.banner .grow { flex: 1; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 8px; min-height: 18px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--red); color: #fff; }
.chip { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); margin: 2px 4px 0 0; }
.flag { font-size: 13px; margin-top: 3px; }
.flag.red { color: var(--red); } .flag.yellow { color: var(--yellow); } .flag.grey { color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.unit-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.unit-row:last-child { border: 0; }
pre.brief { white-space: pre-wrap; font-family: var(--font); background: var(--surface-2); padding: 16px; border-radius: 12px; margin: 0; font-size: 14px; }
.mobile-nav { display: none; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 0; z-index: 40; height: 100vh; width: 82vw; box-shadow: var(--shadow); }
  .side.open { display: flex; }
  .mobile-nav { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 14px 60px; }
  .kpi .value { font-size: 22px; }
  .grid-3, .form-grid { grid-template-columns: 1fr; }
  .action { grid-template-columns: 26px 1fr; }
  .action > :last-child { grid-column: 2; }
}

/* Лендинг */
.site-head { display: flex; align-items: center; gap: 24px; padding: 18px 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.site-head nav { display: flex; gap: 22px; margin-left: 12px; }
.site-head nav a { color: var(--ink-2); font-weight: 550; }
.site-head .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 52px; letter-spacing: -.03em; line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 19px; color: var(--ink-2); margin-top: 18px; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 18px; margin-top: 22px; color: var(--ink-3); font-size: 14px; flex-wrap: wrap; }
.preview { padding: 18px; }
.preview .pv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.preview .pv-head span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.section { padding: 64px 0; }
.section h2 { font-size: 36px; letter-spacing: -.02em; }
.section .sub { color: var(--ink-2); font-size: 17px; margin-top: 10px; max-width: 42em; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.feature { padding: 22px; }
.feature .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 14.5px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; counter-reset: s; }
.step { padding: 22px; position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; right: 20px; font-size: 40px; font-weight: 800; color: var(--line); }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.price { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.price.best { border: 2px solid var(--brand); }
.price .amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.price ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.price li::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.faq details { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 650; cursor: pointer; }
.faq p { color: var(--ink-2); margin-top: 10px; }
.site-foot { padding: 36px 0; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; display: flex; gap: 20px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; } .hero h1 { font-size: 38px; }
  .features, .prices, .steps { grid-template-columns: 1fr; }
  .site-head nav { display: none; }
}

/* Вход */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: 100%; max-width: 420px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.err-text { color: var(--red); font-size: 14px; min-height: 1em; }
.btn svg { width: 18px; height: 18px; flex: none; }
.card-head { flex-wrap: wrap; }
.grid-2 > *, .grid-3 > *, .kpis > * { min-width: 0; }
.main { overflow-x: hidden; }
@media (max-width: 760px) { .card-head .small { display: none; } .banner { flex-direction: column; align-items: flex-start; } }
tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--hover,rgba(127,127,127,.06))}
.row-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row-tools label{display:flex;gap:6px;align-items:center}.input.sm{padding:4px 8px;height:30px}
.cash-month{margin-bottom:12px}.cash-month .bar{height:8px;border-radius:4px;margin-top:4px;min-width:2px}.cash-month .bar.in{background:var(--green,#1f9d55)}.cash-month .bar.out{background:var(--red,#d64545)}
.geo-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,2fr) 90px;gap:12px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.geo-row:last-child{border-bottom:0}.geo-name{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.geo-bar{height:8px;background:var(--line);border-radius:4px;overflow:hidden}.geo-bar span{display:block;height:100%;background:var(--brand)}
.geo-num{text-align:right;font-variant-numeric:tabular-nums;font-size:14px}
.heat{display:grid;grid-template-columns:28px repeat(24,minmax(0,1fr));gap:3px;align-items:center}
.heat-h{font-size:10px;color:var(--ink-3);text-align:center}.heat-d{font-size:12px;color:var(--ink-2)}
.heat-c{aspect-ratio:1;border-radius:3px;background:var(--brand);min-height:10px}
@media print {
  .side, .mobile-nav, #view-tools, .no-print, .banner .btn, button, .demo-banner .btn { display: none !important; }
  .app { display: block !important; }
  .main { overflow: visible !important; }
  body { background: #fff !important; }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; border: 1px solid #ddd !important; }
  .table-wrap { overflow: visible !important; max-height: none !important; }
  .kpi.lead-kpi { background: #fff !important; color: #000 !important; }
  .kpi.lead-kpi * { color: #000 !important; }
  .topbar { position: static !important; border: 0 !important; }
}
.print-only{display:none}@media print{.print-only{display:block;padding:0 28px 8px;color:#555}}
.finding{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-bottom:1px solid var(--line)}.finding:last-child{border-bottom:0}.finding .dot{margin-top:6px;flex:none}
.geo-row.wide{grid-template-columns:minmax(0,1.6fr) minmax(0,1.4fr) 70px}
#jem-out > * + *{margin-top:16px}

/* Период и календарь */
.period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.period-btn svg { width: 16px; height: 16px; color: var(--ink-3); }
.period-btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.period-btn.on svg { color: var(--brand); }
.rp { position: absolute; z-index: 60; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.16); overflow: hidden; }
.rp-presets { display: flex; flex-direction: column; padding: 10px; gap: 2px; border-right: 1px solid var(--line); background: var(--surface-2); min-width: 170px; }
.rp-presets button { text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.rp-presets button:hover { background: var(--surface); color: var(--ink); }
.rp-presets button.on { background: var(--brand); color: #fff; font-weight: 600; }
.rp-cal { padding: 14px 16px; position: relative; }
.rp-nav { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.rp-nav button { pointer-events: auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.rp-nav button:hover { background: var(--surface-2); }
.rp-nav svg { width: 18px; height: 18px; }
.rp-months { display: flex; gap: 22px; }
.rp-month { width: 238px; }
.rp-title { text-align: center; font-weight: 700; font-size: 14px; height: 30px; line-height: 30px; text-transform: capitalize; }
.rp-week, .rp-grid { display: grid; grid-template-columns: repeat(7, 34px); }
.rp-week span { text-align: center; font-size: 11px; color: var(--ink-3); padding: 6px 0; text-transform: uppercase; }
.rp-grid button { height: 34px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; border-radius: 8px; font-variant-numeric: tabular-nums; }
.rp-grid button:hover:not(:disabled):not(.edge) { background: var(--surface-2); }
.rp-grid button.in { background: var(--brand-soft); border-radius: 0; }
.rp-grid button.edge { background: var(--brand); color: #fff; font-weight: 700; }
.rp-grid button.today:not(.edge) { box-shadow: inset 0 0 0 1px var(--brand); }
.rp-grid button.off { color: var(--ink-3); opacity: .4; cursor: default; }
.rp-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.rp-sum { margin-right: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; }
@media (max-width: 760px) { .rp { flex-direction: column; left: 8px !important; right: 8px; } .rp-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } .rp-months .rp-month + .rp-month { display: none; } }

/* Себестоимость */
.badge svg { width: 13px; height: 13px; }
.cost-stats { margin-bottom: 20px; }
.stat { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.stat .label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--ink-3); }
.stat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grey-soft); color: var(--ink-2); flex: none; }
.stat-ic svg { width: 22px; height: 22px; }
.stat-ic.green { background: var(--green-soft); color: var(--green); }
.stat-ic.yellow { background: var(--yellow-soft); color: var(--yellow); }
.tabs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs-chips button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tabs-chips button svg { width: 15px; height: 15px; }
.tabs-chips button b { background: var(--surface-2); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.tabs-chips button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.tabs-chips button.on b { background: var(--brand); color: #fff; }
.search-box { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 240px; }
.search-box svg { width: 16px; height: 16px; color: var(--ink-3); }
.search-box input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); width: 100%; }
.cost-in { display: inline-flex; align-items: center; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding-right: 10px; transition: border-color .15s; }
.cost-in input { border: 0; outline: 0; background: transparent; width: 104px; text-align: right; padding: 0 6px 0 10px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cost-in span { color: var(--ink-3); font-size: 13px; }
.cost-in:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cost-in.need { border-color: var(--yellow); background: var(--yellow-soft); }
.cost-in.ok { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }

/* Налоги магазина */
.tax-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tax-chip svg { width: 14px; height: 14px; }
.tax-chip:hover { border-color: var(--brand); color: var(--brand); }
.tax-chip.warn { background: var(--yellow-soft); color: var(--yellow); border-color: transparent; }
.tax-panel { margin: 0 16px 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); display: grid; gap: 14px; }
.tax-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tax-periods { display: grid; gap: 6px; }
.tax-arrow { text-align: center; color: var(--ink-3); font-size: 18px; }
.tax-period { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; }
.tax-period-head { display: flex; gap: 10px; align-items: center; }
.icon-btn { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); }
.icon-btn svg { width: 16px; height: 16px; }
.regime-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.regime { display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; row-gap: 2px; text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.regime:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.regime.on { border-color: var(--brand); background: var(--brand-soft); }
.regime-ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.regime.on .regime-ic { background: var(--brand); color: #fff; }
.regime-ic svg { width: 18px; height: 18px; }
.regime-t { font-weight: 700; font-size: 14px; }
.regime-d { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.tax-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.tax-label { width: 86px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.rate-chips { display: inline-flex; gap: 4px; }
.rate-chips button { height: 34px; min-width: 44px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.rate-chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.limit { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.limit-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.btn svg { width: 15px; height: 15px; vertical-align: -3px; }
.tax-panel[hidden] { display: none; }
tr.fin-group { cursor: pointer; }
tr.fin-group:hover td { background: var(--surface-2); }
.fin-toggle { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; vertical-align: -5px; color: var(--ink-3); transition: transform .15s; }
.fin-toggle svg { width: 16px; height: 16px; }
tr.fin-group.open .fin-toggle { transform: rotate(90deg); color: var(--brand); }
tr.sub td { background: var(--surface-2); }
tr.sub[hidden] { display: none; }
.banner.info { background: var(--surface-2); border: 1px solid var(--line); }
.stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); }
.stat-btn.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.stat-ic.red { background: var(--red-soft); color: var(--red); }
details summary { cursor: pointer; color: var(--brand); margin-top: 4px; }
.badge.wrap { white-space: normal; line-height: 1.35; padding: 3px 9px; }
.auto-opt { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.camp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; max-height: 260px; overflow: auto; }
.camp-item { align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }


/* ── Дизайн v3: тише хром, плотнее данные (по мотивам Linear / Stripe / Vercel) ── */
.side { background: var(--bg); border-right: 1px solid var(--line); padding: 16px 12px; }
.logo { font-size: 17px; letter-spacing: -.02em; }
.logo-mark { background: linear-gradient(135deg, #7b4bff, #5a2ae0); border-radius: 9px; box-shadow: 0 4px 12px rgba(109, 60, 245, .35); }
.nav a { padding: 7px 10px; font-size: 13.5px; font-weight: 500; border-radius: 8px; }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.nav a.active svg { color: var(--brand); }
.nav-group { font-size: 10.5px; letter-spacing: .09em; padding: 16px 10px 6px; }
.topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); padding: 12px 28px; }
.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.content { padding: 20px 28px 60px; gap: 16px; }
.card { border-radius: 14px; box-shadow: var(--shadow); }
.card-head { padding: 14px 18px; }
.card-head h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.card-pad { padding: 18px; }
.btn { height: 36px; border-radius: 9px; font-weight: 600; font-size: 13.5px; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 1px 2px rgba(17,17,20,.12); }
.btn.secondary, .btn.ghost { box-shadow: none; }
.btn.sm { height: 30px; }
.input, select.input { height: 36px; border-radius: 9px; font-size: 13.5px; }
.input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
table.t { font-size: 13.5px; }
table.t th { font-size: 11px; letter-spacing: .05em; padding: 9px 14px; background: var(--surface); }
table.t td { padding: 10px 14px; }
table.t tr:hover td { background: color-mix(in srgb, var(--brand) 3%, var(--surface)); }
.kpi .label { font-size: 12.5px; font-weight: 550; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.kpi.lead-kpi { background: radial-gradient(120% 140% at 0% 0%, #8a5cff 0%, #6d3cf5 45%, #4b1fc4 100%); box-shadow: 0 10px 30px rgba(109, 60, 245, .35); }
[data-theme="dark"] .kpi.lead-kpi { background: radial-gradient(120% 140% at 0% 0%, #6d3cf5 0%, #3d1c9e 100%); }
.banner { border-radius: 12px; }
.badge { font-weight: 600; }
.seg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.seg button { padding: 5px 11px; }
.empty { color: var(--ink-3); }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

/* Лендинг v3 */
body:has(.site-head) { background:
  radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
  radial-gradient(700px 400px at -10% 10%, color-mix(in srgb, #22c3ee 10%, transparent), transparent 70%), var(--bg); background-repeat: no-repeat; }
.site-head { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero h1 { font-size: 56px; letter-spacing: -.04em; line-height: 1.02; font-weight: 800; }
.hero h1 em { background: linear-gradient(90deg, #7b4bff, #c04bff 60%, #ff6b9a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; line-height: 1.6; }
.preview { border-radius: 18px; box-shadow: var(--shadow-lg); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transition: transform .4s; }
.preview:hover { transform: none; }
.section h2 { font-size: 38px; letter-spacing: -.03em; font-weight: 800; }
.feature { transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature .ic { color: var(--brand); background: var(--brand-soft); }
.price.best { border: 1.5px solid var(--brand); box-shadow: 0 14px 40px color-mix(in srgb, var(--brand) 22%, transparent); }
@media (max-width: 760px) { .hero h1 { font-size: 38px; } .preview { transform: none; } }
