:root {
  color-scheme: light;
  --bg: #eef3fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #dfe9ff 0%, transparent 60%), radial-gradient(900px 500px at -10% 10%, #efe6ff 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f3f6fc;
  --border: #e1e8f4;
  --text: #0e1626;
  --text-2: #46506a;
  --muted: #6f7890;
  --accent: #2a78d6;
  --accent-2: #6250d6;
  --accent-ink: #ffffff;
  --accent-soft: #e2edfd;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --ref: #8a93a8;
  --grid: #e9eef6;
  --good: #1a8a4e;
  --good-soft: #def5e8;
  --warn: #b36b00;
  --warn-soft: #fdf0d8;
  --bad: #c43c3b;
  --bad-soft: #fde4e3;
  --info-soft: #e2edfd;
  --c-blue: #e2edfd; --c-violet: #ebe7ff; --c-orange: #ffe9df; --c-aqua: #dcf6ee; --c-pink: #fde6ef; --c-yellow: #fff2d4; --c-green: #def5e8;
  --shadow: 0 1px 2px rgb(16 32 72 / .05), 0 8px 24px rgb(16 32 72 / .06);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1020;
    --bg-grad: radial-gradient(1000px 520px at 100% -10%, #15254a 0%, transparent 60%), radial-gradient(800px 480px at -10% 10%, #221a46 0%, transparent 55%);
    --surface: #121a2d;
    --surface-2: #19233b;
    --border: #233050;
    --text: #eef2fa;
    --text-2: #b9c3da;
    --muted: #8590ab;
    --accent: #3987e5;
    --accent-2: #9085e9;
    --accent-soft: #1a2b4c;
    --series-1: #3987e5;
    --series-2: #d95926;
    --ref: #6f7a96;
    --grid: #1f2a44;
    --good: #4cc27e;
    --good-soft: #143223;
    --warn: #e2a33a;
    --warn-soft: #33270e;
    --bad: #e66767;
    --bad-soft: #3a1b1f;
    --info-soft: #1a2b4c;
    --c-blue: #1a2b4c; --c-violet: #262050; --c-orange: #3a2216; --c-aqua: #12332b; --c-pink: #3a1a2a; --c-yellow: #352a10; --c-green: #143223;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1020;
  --bg-grad: radial-gradient(1000px 520px at 100% -10%, #15254a 0%, transparent 60%), radial-gradient(800px 480px at -10% 10%, #221a46 0%, transparent 55%);
  --surface: #121a2d;
  --surface-2: #19233b;
  --border: #233050;
  --text: #eef2fa;
  --text-2: #b9c3da;
  --muted: #8590ab;
  --accent: #3987e5;
  --accent-2: #9085e9;
  --accent-soft: #1a2b4c;
  --series-1: #3987e5;
  --series-2: #d95926;
  --ref: #6f7a96;
  --grid: #1f2a44;
  --good: #4cc27e;
  --good-soft: #143223;
  --warn: #e2a33a;
  --warn-soft: #33270e;
  --bad: #e66767;
  --bad-soft: #3a1b1f;
  --info-soft: #1a2b4c;
  --c-blue: #1a2b4c; --c-violet: #262050; --c-orange: #3a2216; --c-aqua: #12332b; --c-pink: #3a1a2a; --c-yellow: #352a10; --c-green: #143223;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Heebo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1.2em; margin: 0; font-size: 14px; }
svg { width: 20px; height: 20px; flex: none; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="date"] { direction: ltr; text-align: right; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }

/* Segmented */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 12px; }
.seg button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 600;
  font-size: 14px; padding: 6px 12px; border-radius: 9px; cursor: pointer;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg.small button { font-size: 13px; padding: 4px 10px; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: min(380px, 100%); display: grid; gap: 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 32px 24px; box-shadow: var(--shadow);
}
.login-card p { margin: 0; }
.logo-big { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.logo-big svg { width: 32px; height: 32px; }

/* Shell */
.app { min-height: 100dvh; }
.sidebar {
  position: fixed; z-index: 20; inset: auto 0 0 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.brand { display: none; }
.nav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 64px; }
.nav a, .nav-add {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600;
  border: 0; background: none; font-family: inherit; cursor: pointer;
}
.nav a.on { color: var(--accent); }
.nav-add span { display: none; }
.nav-add svg { width: 26px; height: 26px; }
.nav-add {
  width: 54px; height: 54px; margin: -22px auto 0; border-radius: 18px; justify-content: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent);
}
.main {
  max-width: 1240px; margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
}
.view { display: grid; gap: 16px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.view-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.view-head p { margin: 4px 0 0; }
.desk-only { display: none; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); min-width: 0;
}
.label { color: var(--text-2); font-size: 13px; font-weight: 600; }
.hero-grid { display: grid; gap: 12px; }
.hero {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #0a2a55));
  border: 0; color: #fff; display: grid; gap: 6px; padding: 20px;
}
.hero .label { color: rgb(255 255 255 / .85); }
.hero-num { display: flex; align-items: baseline; gap: 8px; }
.hero-num span { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-num small { font-size: 15px; opacity: .85; }
.hero-sub { font-size: 14px; opacity: .9; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: rgb(255 255 255 / .18); font-weight: 600; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 2px; align-content: start; padding: 14px; }
.kpi b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi small { font-size: 12px; line-height: 1.35; }

.chart-grid { display: grid; gap: 12px; }
.chart-card { display: grid; gap: 10px; }
.chart-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.chart-head p { margin: 2px 0 0; font-size: 13px; }
.chart-box { position: relative; height: 220px; }

/* Insights */
.insights { display: grid; gap: 10px; }
.insight {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.insights.compact .insight { background: var(--surface-2); border-color: transparent; }
.insight .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--info-soft); }
.insight.good .ico { background: var(--good-soft); }
.insight.warn .ico { background: var(--warn-soft); }
.insight.bad .ico { background: var(--bad-soft); }
.insight h3 { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.insight p { margin: 0; color: var(--text-2); font-size: 14px; }
.insight .tag { font-size: 12px; font-weight: 700; margin-inline-start: 6px; }
.insight.good .tag { color: var(--good); }
.insight.warn .tag { color: var(--warn); }
.insight.bad .tag { color: var(--bad); }
#view-insights .insights { grid-template-columns: 1fr; }

/* History */
.table-card { display: none; padding: 0; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 12px; text-align: right; white-space: nowrap; }
.table th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); }
.table td { border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); margin-inline-start: 4px; }
.badge.info { background: var(--info-soft); color: var(--accent); }
.dim { color: var(--muted); }

.fill-list { display: grid; gap: 10px; }
.month-head { font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 4px 0; display: flex; justify-content: space-between; }
.fill-card {
  display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; text-align: right; font: inherit; color: inherit; width: 100%;
}
.fill-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fill-top .date { font-weight: 700; }
.fill-top .amt { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fill-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fill-stats div { background: var(--surface-2); border-radius: 10px; padding: 6px 8px; display: grid; }
.fill-stats small { color: var(--muted); font-size: 11px; }
.fill-stats b { font-size: 14px; font-variant-numeric: tabular-nums; }

/* Forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.form small { font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span2 { grid-column: 1 / -1; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.switch { display: flex !important; grid-auto-flow: column; align-items: center; gap: 10px !important; cursor: pointer; color: var(--text) !important; font-size: 15px !important; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 28px; border-radius: 99px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(-18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }
.preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preview:empty { display: none; }
.preview div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; display: grid; }
.preview small { color: var(--muted); font-size: 11px; }
.preview b { font-variant-numeric: tabular-nums; }

/* Dialog: bottom sheet on mobile */
dialog.sheet {
  border: 0; padding: 0; color: var(--text); background: var(--surface);
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgb(0 0 0 / .2);
}
dialog.sheet[open] { animation: up .25s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
dialog::backdrop { background: rgb(0 0 0 / .4); backdrop-filter: blur(2px); }
dialog .form { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet-head, .sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }

.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 600;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Chart tooltip */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 700px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-card.wide { grid-column: 1 / -1; }
  .chart-card.wide .chart-box { height: 280px; }
  #view-insights .insights, .insights.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog.sheet { width: min(560px, calc(100% - 32px)); margin: auto; border-radius: 22px; }
}
@media (min-width: 1000px) {
  .sidebar {
    inset: 0 0 0 auto; width: 240px; border-top: 0; border-inline-start: 1px solid var(--border);
    padding: 20px 14px; display: flex; flex-direction: column; gap: 24px; background: var(--surface);
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
  .brand small { display: block; font-size: 12px; }
  .brand-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #fff; }
  .nav { display: flex; flex-direction: column; align-items: stretch; height: auto; gap: 4px; }
  .nav a, .nav-add { flex-direction: row; gap: 10px; font-size: 15px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); }
  .nav a:hover { background: var(--surface-2); }
  .nav a.on { background: var(--accent-soft); color: var(--accent); }
  .nav-add { order: -1; width: auto; height: 44px; margin: 0 0 10px; border-radius: 12px; justify-content: center; color: var(--accent-ink); }
  .nav-add span { display: inline; }
  .nav-add svg { width: 20px; height: 20px; }
  .main { margin-inline-start: 240px; margin-inline-end: auto; padding: 32px 32px 48px; max-width: none; }
  .view { max-width: 1180px; margin: 0 auto; }
  .hero-grid { grid-template-columns: minmax(280px, 1fr) 2fr; }
  .hero { align-content: center; }
  .chart-box { height: 240px; }
  .table-card { display: block; }
  .fill-list { display: none; }
  .desk-only { display: inline-flex; }
  .toast { bottom: 32px; }
}

/* ---------- v2: color & login ---------- */
body { background: var(--bg-grad), var(--bg); background-attachment: fixed; }
.btn.grad, .nav-add { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; }
.hero { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent); }

.login { position: relative; overflow: hidden; background: linear-gradient(140deg, #1d4fb8 0%, #4a3bc4 55%, #8a3fb8 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.b1 { width: 420px; height: 420px; background: #3fb8ff; top: -120px; right: -120px; animation: float 14s ease-in-out infinite; }
.b2 { width: 360px; height: 360px; background: #ff7aa8; bottom: -140px; left: -100px; animation: float 18s ease-in-out infinite reverse; }
.b3 { width: 260px; height: 260px; background: #ffc24a; bottom: 10%; right: 15%; opacity: .35; animation: float 22s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(30px, -40px) scale(1.08); } }
.login-card {
  position: relative; z-index: 1; color: #fff;
  background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgb(10 10 50 / .35);
}
.login-card h1 { font-size: 28px; }
.login-sub { color: rgb(255 255 255 / .8); }
.logo-big { width: 72px; height: 72px; border-radius: 22px; background: #fff; color: var(--accent-2); box-shadow: 0 10px 30px rgb(0 0 0 / .2); }
.login-card input { background: rgb(255 255 255 / .95); border-color: transparent; color: #0e1626; text-align: center; font-size: 20px; letter-spacing: .2em; height: 52px; }
.login-card input::placeholder { letter-spacing: normal; font-size: 16px; color: #8a93a8; }
.login-card .btn { height: 50px; font-size: 16px; box-shadow: 0 8px 20px rgb(0 0 0 / .2); }
.login-card .err { color: #ffd2d2; }

.sidebar .brand-icon { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.kpi { position: relative; padding-top: 14px; }
.kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; margin-bottom: 6px; }
.c-blue { background: var(--c-blue); } .c-violet { background: var(--c-violet); } .c-orange { background: var(--c-orange); }
.c-aqua { background: var(--c-aqua); } .c-pink { background: var(--c-pink); } .c-yellow { background: var(--c-yellow); } .c-green { background: var(--c-green); }

.hero-col { display: grid; gap: 12px; align-content: start; }
.save-card { display: grid; gap: 3px; border-color: color-mix(in srgb, var(--good) 35%, var(--border)); background: linear-gradient(160deg, var(--good-soft), var(--surface) 70%); }
.save-top { display: flex; align-items: center; gap: 8px; }
.save-top .kpi-ico { margin: 0; }
.save-card > b { font-size: 30px; font-weight: 800; color: var(--good); font-variant-numeric: tabular-nums; }
.save-card small { color: var(--text-2); font-size: 13px; }

.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.neutral { background: var(--surface-2); color: var(--muted); }
.save-strip { font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 10px; }
.save-strip.good { background: var(--good-soft); color: var(--good); }
.save-strip.bad { background: var(--bad-soft); color: var(--bad); }
.save-strip.neutral { background: var(--surface-2); color: var(--muted); }

.max-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.max-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; }
.max-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 4px 4px 4px 10px; padding-inline-start: 10px; font-size: 14px; }
.max-list .icon-btn { width: 28px; height: 28px; }
.max-list .icon-btn svg { width: 14px; height: 14px; }
@media (max-width: 480px) { .max-form { grid-template-columns: 1fr 1fr; } .max-form .btn { grid-column: 1 / -1; } }

/* ---------- v3: calm dark (default) ---------- */
:root[data-theme="dark"] {
  --bg: #11151c;
  --bg-grad: radial-gradient(900px 480px at 100% -10%, rgb(57 135 229 / .07) 0%, transparent 60%);
  --surface: #171c25;
  --surface-2: #1e2430;
  --border: #262d3a;
  --text: #e6e9ef;
  --text-2: #aab2c0;
  --muted: #7a8394;
  --accent: #4a8fe0;
  --accent-2: #4a8fe0;
  --accent-soft: #1c2a3e;
  --series-1: #3987e5;
  --series-2: #d95926;
  --ref: #6b7385;
  --grid: #222935;
  --good: #5bbf8a;
  --good-soft: #17271f;
  --info-soft: #1c2a3e;
  --c-blue: #1e2430; --c-violet: #1e2430; --c-orange: #1e2430; --c-aqua: #1e2430; --c-pink: #1e2430; --c-yellow: #1e2430; --c-green: #17271f;
  --shadow: 0 1px 2px rgb(0 0 0 / .35);
}
/* one accent instead of gradients */
.btn.grad, .nav-add { background: var(--accent); }
.nav-add { box-shadow: 0 6px 16px rgb(0 0 0 / .35); }
.sidebar .brand-icon { background: var(--accent); }
.hero {
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--surface)) 0%, var(--surface) 75%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  color: var(--text); box-shadow: var(--shadow);
}
.hero .label { color: var(--text-2); }
.hero-num small, .hero-sub { color: var(--text-2); opacity: 1; }
.pill { background: var(--accent-soft); color: var(--text); }
.save-card { background: var(--surface); border-color: var(--border); }
.save-card > b { color: var(--good); }
.kpi-ico, .insight .ico { filter: saturate(.35); opacity: .9; }
.insight .ico { background: var(--surface-2); }
.insights.compact .insight { background: var(--surface-2); }

/* login: dark, quiet glow */
.login { background: radial-gradient(600px 400px at 50% 30%, rgb(57 135 229 / .14), transparent 70%), var(--bg); }
.login .blob { display: none; }
.login-card { color: var(--text); background: var(--surface); border-color: var(--border); backdrop-filter: none; box-shadow: 0 20px 50px rgb(0 0 0 / .4); }
.login-sub { color: var(--muted); }
.logo-big { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.login-card input { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.login-card .btn { box-shadow: none; }
.login-card .err { color: var(--bad); }
:root[data-theme="light"] .login { background: radial-gradient(600px 400px at 50% 30%, rgb(42 120 214 / .10), transparent 70%), var(--bg); }
:root[data-theme="light"] .hero { color: var(--text); }
:root[data-theme="light"] {
  --bg: #f3f5f8;
  --bg-grad: radial-gradient(900px 480px at 100% -10%, rgb(42 120 214 / .06) 0%, transparent 60%);
  --accent-2: #2a78d6;
  --c-blue: #f0f3f8; --c-violet: #f0f3f8; --c-orange: #f0f3f8; --c-aqua: #f0f3f8; --c-pink: #f0f3f8; --c-yellow: #f0f3f8;
}
