:root {
  --bg: #f4f6fb; --card: #ffffff; --card2: #f8f9fd; --line: #e6e9f2; --text: #172033; --muted: #66708a; --faint: #98a1b8;
  --brand: #4f6bff; --brand-ink: #ffffff; --brand-soft: #e9edff;
  --good: #16a068; --good-soft: #e1f6ec; --warn: #d98a0b; --warn-soft: #fdf1d9; --bad: #e0445c; --bad-soft: #fde6ea; --info: #2f84d8; --info-soft: #e3f0fc;
  --shadow: 0 1px 2px rgba(23, 32, 51, .05), 0 6px 20px rgba(23, 32, 51, .05);
  --radius: 16px; --side: 236px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
:root[data-theme='dark'] {
  --bg: #0e1220; --card: #171c2e; --card2: #1c2236; --line: #283049; --text: #e8ecf8; --muted: #98a2c0; --faint: #6c7595;
  --brand: #7b92ff; --brand-ink: #0e1220; --brand-soft: #222b52;
  --good: #3dd69a; --good-soft: #16342b; --warn: #f2b13d; --warn-soft: #3a2f16; --bad: #ff6f86; --bad-soft: #3d1c27; --info: #61aef5; --info-soft: #17304a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; } .bold { font-weight: 650; } .right { text-align: right; } .center { text-align: center; }
.good { color: var(--good); } .bad { color: var(--bad); } .warnc { color: var(--warn); }
.hide { display: none !important; }
.row-flex { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.gap4 { gap: 4px; } .gap8 { gap: 8px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 750; font-size: 16px; }
.brand .logo { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #9b6bff); display: grid; place-items: center; color: #fff; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: var(--muted); font-weight: 550; }
.nav a:hover { background: var(--card2); color: var(--text); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav a .badge-dot { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
.side .spacer { flex: 1; }
.main { padding: 22px 28px 90px; max-width: 1280px; width: 100%; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.bottomnav { display: none; }
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; height: 56px; padding: 0 22px 0 18px; border-radius: 28px; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 650; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(79, 107, 255, .45); }
.fab:hover { filter: brightness(1.06); }

/* ---------- primitives ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card > h2, .card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--card2); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; } .btn.primary:hover { filter: brightness(1.07); }
.btn.good { background: var(--good); color: #fff; border-color: transparent; }
.btn.danger { color: var(--bad); } .btn.ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--card2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 9px; } .btn.lg { padding: 13px 20px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; } .icon-btn:hover { background: var(--card2); color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card2); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--good-soft); color: var(--good); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); } .chip.info { background: var(--info-soft); color: var(--info); } .chip.brand { background: var(--brand-soft); color: var(--brand); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-color: var(--brand); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- kpis / hero ---------- */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12.5px; }
.hero { background: linear-gradient(135deg, #3d54e8 0%, #7b5bff 100%); color: #fff; border: 0; position: relative; overflow: hidden; }
:root[data-theme='dark'] .hero { background: linear-gradient(135deg, #2b3a9e 0%, #5a3fc0 100%); }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.hero .label { opacity: .85; font-size: 13px; font-weight: 600; }
.hero .big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0; }
.hero .sub { opacity: .88; font-size: 13.5px; }
.hero .mini { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.hero .mini div b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.hero .meter { background: rgba(255, 255, 255, .25); } .hero .meter-fill { background: #fff !important; }
.hero .meter-fill.over { background: #ffd0d8 !important; }

/* ---------- meters, lists ---------- */
.meter { position: relative; width: 100%; background: var(--line); border-radius: 99px; overflow: visible; }
.meter-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.meter-pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .55; border-radius: 1px; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item.click { cursor: pointer; } .item.click:hover { background: var(--card2); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.item .ttl { font-weight: 600; } .item .meta { color: var(--muted); font-size: 12.5px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 17px; background: var(--card2); }
.datehead { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 0 4px; display: flex; justify-content: space-between; }
.item.sched { opacity: .88; background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(127, 140, 180, .06) 8px 16px); }

.insight { display: flex; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--card2); border-left: 4px solid var(--info); }
.insight.danger { border-color: var(--bad); background: var(--bad-soft); } .insight.warn { border-color: var(--warn); background: var(--warn-soft); } .insight.good { border-color: var(--good); background: var(--good-soft); } .insight.info { border-color: var(--info); background: var(--info-soft); }
.insight .t { font-weight: 650; } .insight .d { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.insight details { margin-top: 6px; font-size: 12.5px; color: var(--muted); } .insight summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.insights { display: flex; flex-direction: column; gap: 10px; }

/* ---------- tables ---------- */
.tblwrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; } .tbl .r { text-align: right; } .tbl tr.grp td { background: var(--card2); font-weight: 700; font-size: 12.5px; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--card2); }
.tbl input.inline { width: 92px; text-align: right; padding: 5px 7px; border-radius: 8px; border: 1px solid transparent; background: var(--card2); }
.tbl input.inline:focus { border-color: var(--brand); outline: 0; background: var(--card); }

/* ---------- forms ---------- */
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.fld > label, .lbl { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.fld .hint { font-size: 12px; color: var(--faint); }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=search], input[type=email], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { resize: vertical; min-height: 60px; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .frow3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 550; cursor: pointer; } .check input { width: 17px; height: 17px; accent-color: var(--brand); }
input[type=range] { width: 100%; accent-color: var(--brand); }
.amount-wrap { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 0 12px; }
.amount-wrap span { font-size: 30px; font-weight: 700; color: var(--muted); }
.amount-wrap input { width: 210px; font-size: 40px; font-weight: 800; text-align: center; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: transparent; padding: 4px; font-variant-numeric: tabular-nums; }
.amount-wrap input:focus { outline: 0; border-color: var(--brand); }
.catchips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.catchips button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.catchips button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.searchbar { position: relative; } .searchbar svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); } .searchbar input { padding-left: 36px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }

/* ---------- modal / toast / tooltip ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 28, .55); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 18px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 36px); overflow: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, .4); animation: pop .18s; }
.modal.wide { max-width: 860px; } .modal.xl { max-width: 1040px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.modal-b { padding: 8px 20px 20px; } .modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 0 2px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--card); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #172033; color: #fff; padding: 11px 16px; border-radius: 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); display: flex; gap: 14px; align-items: center; animation: pop .2s; max-width: 92vw; }
.toast button { background: transparent; border: 0; color: #9db4ff; font-weight: 700; }
.tooltip { position: fixed; z-index: 300; pointer-events: none; background: #172033; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; max-width: 280px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart .grid.zero { stroke: var(--faint); } .chart .ref { stroke: var(--faint); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--faint); font-size: 11px; } .chart .ch-big { fill: var(--text); font-size: 22px; font-weight: 750; } .chart .ch-small { fill: var(--muted); font-size: 11px; }
.chart .bar:hover, .chart .seg:hover { filter: brightness(1.12); } .chart .dot:hover { r: 6; }
.chart.donut { max-width: 220px; margin: 0 auto; }
.ring .ring-t { font-size: 17px; font-weight: 750; fill: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 8px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.donut-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; }
.legend-list { display: flex; flex-direction: column; gap: 5px; font-size: 13px; max-height: 210px; overflow: auto; }
.legend-list div { display: flex; align-items: center; gap: 8px; } .legend-list b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .day { min-height: 82px; background: var(--card2); border-radius: 10px; padding: 5px 6px; cursor: pointer; border: 1px solid transparent; overflow: hidden; }
.cal .day.out { opacity: .35; } .cal .day.today { border-color: var(--brand); } .cal .day.sel { background: var(--brand-soft); }
.cal .day .dn { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal .ev { font-size: 11px; padding: 1px 5px; border-radius: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--info-soft); color: var(--info); font-weight: 600; }
.cal .ev.card { background: var(--warn-soft); color: var(--warn); } .cal .ev.inc { background: var(--good-soft); color: var(--good); } .cal .ev.paid { opacity: .55; text-decoration: line-through; }

/* ---------- misc blocks ---------- */
.goal-card { display: flex; flex-direction: column; gap: 12px; }
.goal-top { display: flex; gap: 14px; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; } .stat-grid .k { font-size: 12px; color: var(--muted); } .stat-grid .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-tile { position: relative; overflow: hidden; }
.card-art { height: 6px; border-radius: 99px; margin: -18px -18px 14px; border-radius: 16px 16px 0 0; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-weight: 600; margin-bottom: 16px; flex-wrap: wrap; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.score { display: flex; gap: 16px; align-items: center; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kbd { font-family: ui-monospace, monospace; background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 12px; }
.lock { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.lock .card { width: 100%; max-width: 380px; text-align: center; }

/* ---------- onboarding ---------- */
.ob { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.ob .card { width: 100%; max-width: 720px; padding: 28px; }
.ob .steps { display: flex; gap: 6px; margin-bottom: 20px; } .ob .steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); } .ob .steps i.on { background: var(--brand); }
.ob .rowed { display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr auto; align-items: end; margin-bottom: 8px; }
.ob .choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ob .choice button { text-align: left; padding: 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); } .ob .choice button:hover { border-color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 14px 14px 140px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .g4.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .big { font-size: 34px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px 0; border-radius: 10px; }
  .bottomnav a.active { color: var(--brand); }
  .fab { bottom: 78px; right: 16px; height: 52px; }
  .overlay { align-items: end; padding: 0; } .modal, .modal.wide, .modal.xl { max-width: none; border-radius: 22px 22px 0 0; max-height: 94vh; }
  .filters { grid-template-columns: 1fr 1fr; } .filters .searchbar { grid-column: 1 / -1; }
  .donut-wrap { grid-template-columns: 1fr; } .frow3 { grid-template-columns: 1fr 1fr; }
  .ob .rowed { grid-template-columns: 1fr 1fr; } .ob .choice { grid-template-columns: 1fr; }
  .cal .day { min-height: 56px; } .cal .ev { font-size: 0; height: 6px; padding: 0; } .hide-m { display: none !important; }
  .toasts { bottom: 150px; }
}
@media print {
  .side, .bottomnav, .fab, .topbar .btn, .no-print { display: none !important; }
  .app { display: block; } .main { padding: 0; max-width: none; } body { background: #fff; } .card { box-shadow: none; break-inside: avoid; }
}

/* accounts card */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.acct { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card2); min-width: 0; }
.acct-bal { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.acct-total { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- dashboard polish ---------- */
.hero { padding: 22px 24px; background: radial-gradient(120% 140% at 0% 0%, #5a74ff 0%, #4a49e0 45%, #7a4fe6 100%); }
:root[data-theme='dark'] .hero { background: radial-gradient(120% 140% at 0% 0%, #3b4fc9 0%, #2f2f9e 50%, #5a37b5 100%); }
.hero .big { font-size: 52px; margin: 6px 0 2px; }
.hero-pill { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); padding: 3px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 650; backdrop-filter: blur(4px); }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.hero .mini { margin-top: 0; gap: 26px; } .hero .mini span { font-size: 12px; opacity: .78; }
.spark-wrap { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; } .spark-wrap span { font-size: 11.5px; opacity: .78; }
.spark { width: 130px; height: 40px; } .spark rect { fill: rgba(255, 255, 255, .72); } .spark rect:hover { fill: #fff; }
.hero-bar { margin-top: 16px; } .hero-bar .small { margin-top: 8px; opacity: .9; }
.hero .meter { height: 9px !important; }
.hp { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: center; padding: 4px 0; }
.hp-bar { height: 7px; background: var(--line); border-radius: 9px; overflow: hidden; } .hp-bar i { display: block; height: 100%; border-radius: 9px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 12px; }
.metric { display: flex; gap: 14px; align-items: flex-start; padding: 16px; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.metric:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: 0 10px 28px rgba(23, 32, 51, .09); }
.m-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.m-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.m-value { font-size: 24px; font-weight: 780; letter-spacing: -.02em; line-height: 1.2; margin: 2px 0; }
.m-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; } .m-sub:last-child { margin-bottom: 0; }
.card.attn { border-color: var(--warn); background: linear-gradient(0deg, var(--card), var(--card)), var(--warn-soft); }
details.card > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; } details.card > summary::after { content: '▾'; color: var(--faint); }
details.card[open] > summary::after { content: '▴'; }
.acct { transition: border-color .15s, transform .15s; } .acct:hover { border-color: var(--brand); transform: translateY(-1px); }

/* entrance animation (only when arriving on a page) */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.view.enter > .topbar, .view.enter > .banner, .view.enter > .grid, .view.enter > .card, .view.enter > .metrics, .view.enter > details { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.view.enter .metrics .metric { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(120ms + var(--j, 0) * 45ms); }
.meter-fill { transition: width .8s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .view.enter *, .view.enter { animation: none !important; } .meter-fill { transition: none; } }
@media (max-width: 860px) { .hero .big { font-size: 44px; } .hero { padding: 18px; } .spark-wrap { align-items: flex-start; } .hp { grid-template-columns: 100px 1fr; } }

.acct-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.sum-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); min-width: 0; }
.sum-tile .m-value { font-size: 21px; margin: 0; }
@media (max-width: 860px) { .acct-sum { grid-template-columns: 1fr; } }
