:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #64748b;
  --paper: #f2f7fb;
  --paper-2: #e5f2fb;
  --card: #ffffff;
  --sidebar: #f7fbfe;
  --rule: #e4eef6;
  --rule-strong: #d3e4f0;
  --sky: #0ea5e9;
  --sky-2: #38bdf8;
  --sky-deep: #0369a1;
  --sky-ink: #0c4a6e;
  --sky-soft: #e0f2fe;
  --good: #059669;
  --good-bg: #e7f8f1;
  --bad: #e11d48;
  --bad-bg: #ffe4e6;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --info: #0284c7;
  --info-bg: #e0f2fe;
  --sans: "Segoe UI", Candara, sans-serif;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(14, 116, 164, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: #bae6fd; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.app { height: 100%; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
  background: linear-gradient(180deg, #f8fcff 0%, var(--sidebar) 42%, #f3f8fc 100%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--rule);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 18px 14px; }
.mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 12px; color: #fff;
  background: linear-gradient(160deg, #38bdf8, #0369a1);
  box-shadow: 0 8px 16px rgba(2, 132, 199, .28);
  font-size: 18px; font-weight: 800; line-height: 1;
}
.brand strong { display: block; letter-spacing: -.03em; font-size: 18px; font-weight: 800; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.nav { flex: 1; overflow: auto; padding: 4px 12px 12px; }
.nav-group { padding: 2px 0; }
.nav-group p {
  margin: 14px 12px 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 2px 0;
  color: #334155; text-decoration: none;
  border-radius: 14px;
  font-size: 14.5px; font-weight: 600;
}
.nav-link:hover { background: rgba(224, 242, 254, .85); color: var(--sky-deep); }
.nav-link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(180deg, #0ea5e9, #0369a1);
  box-shadow: 0 8px 16px rgba(2, 132, 199, .22);
}
.aside-foot {
  padding: 14px 18px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  border-top: 1px solid var(--rule);
}
.scrim { display: none; }
.main {
  min-width: 0; height: 100%; overflow: auto;
  background:
    radial-gradient(880px 380px at 92% -120px, rgba(125, 211, 252, .45), transparent 62%),
    radial-gradient(640px 320px at -8% -80px, rgba(14, 165, 233, .14), transparent 58%),
    var(--paper);
}
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px 8px;
  background: rgba(242, 247, 251, .78);
  backdrop-filter: blur(16px);
}
.topbar h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
}
.page-sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.page-sub:empty { display: none; }
.top-title { flex: 1; min-width: 0; }
.period { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 4px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.period input { width: 150px; border: 0; background: transparent; padding: 6px 8px; }
.nav-toggle { display: none; }
.view { padding: 8px 28px 80px; max-width: 1180px; }
.m-only, .m-brand, .m-tools, .dock { display: none; }

.kicker, .hero-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}
.figure {
  margin: 0;
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.sub { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }
.muted { color: var(--muted); }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.mono { font-family: var(--mono); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat, .card {
  background: var(--card);
  border: 1px solid rgba(211, 228, 240, .95);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}
.card h3, .wallet-card h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 22px 0 10px;
}
.section-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.section-head h2 em { font-style: normal; color: var(--sky); font-weight: 800; margin-right: 8px; }
.section-note { color: var(--muted); font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: 1.35fr .85fr; gap: 14px; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; margin-top: 14px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.dash-grid > * { min-width: 0; }
.dash-grid > .span-2 { grid-column: 1 / -1; }
.dash-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wallet-strip { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; }
.wallet-pill {
  display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 200px;
  padding: 14px 16px; background: #fff; border: 1px solid rgba(211, 228, 240, .95); border-radius: 18px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wallet-pill:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(14, 116, 164, .12); }
.wallet-copy { flex: 1; min-width: 0; }
.wallet-copy > span { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-share { display: block; height: 6px; margin-top: 8px; background: #e0f2fe; border-radius: 99px; overflow: hidden; }
.wallet-share b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0284c7, #38bdf8); }
.wallet-pill strong { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.debt-row { margin: 0 0 14px; }
.debt-row:last-child { margin-bottom: 0; }
.debt-row header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.debt-row header span { min-width: 0; font-weight: 800; }
.debt-row header small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.debt-row header b, .debt-row em { font-variant-numeric: tabular-nums; font-style: normal; }
.debt-row header b { font-weight: 800; }
.debt-row em { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.flow-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.flow-col h4 {
  margin: 0 0 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 800;
}
.flow-line { margin: 0 0 12px; }
.flow-line:last-child { margin-bottom: 0; }
.flow-line header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13.5px; }
.flow-line header span { min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-line header b { font-weight: 800; font-variant-numeric: tabular-nums; }
.flow-col .hint { margin: 2px 0 0; }
.bar > span.in { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.bar > span.out { background: linear-gradient(90deg, #fb7185, #e11d48); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 22px 28px;
  align-items: center;
  margin-top: 8px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.2);
  color: #f8fbff;
  background:
    radial-gradient(720px 240px at 100% 0%, rgba(255,255,255,.32), transparent 56%),
    radial-gradient(480px 200px at 0% 100%, rgba(8, 47, 73, .28), transparent 62%),
    linear-gradient(152deg, #0c4a6e 0%, #0369a1 36%, #0ea5e9 70%, #7dd3fc 130%);
  box-shadow: 0 20px 44px rgba(3, 105, 161, .24);
}
.hero-kicker { color: rgba(255,255,255,.78); }
.hero-figure {
  margin: 0;
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .95;
  font-variant-numeric: tabular-nums;
}
.hero-figure small { font-size: .42em; font-weight: 700; margin-right: 8px; letter-spacing: 0; opacity: .9; }
.hero-figure.is-neg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; color: #fff; }
.hero-sign {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px;
  background: #e11d48; color: #fff; font-size: 13px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1;
}
.hero-formula {
  margin: 12px 0 0; max-width: 38rem; color: rgba(255,255,255,.92);
  font-size: 14px; font-weight: 700; line-height: 1.45;
}
.hero-op { white-space: nowrap; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-chips span {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  color: #fff; font-size: 12.5px; font-weight: 700;
}
.hero-chips b { font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-chips em { font-style: normal; font-weight: 700; opacity: .78; }
.hero-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.hero-metrics > div {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 18px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
}
.hero-metrics span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 700; }
.hero-metrics strong { display: block; margin-top: 4px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-metrics em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.75); }
.hero-metrics strong.out { color: #ffe4e6; }

.pace { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; }
.pace.is-lone { grid-template-columns: 1fr; justify-items: center; }
.pace-ring {
  width: 104px; height: 104px; border-radius: 50%;
  background: conic-gradient(var(--sky) calc(var(--p) * 1%), var(--sky-soft) 0);
  display: grid; place-items: center;
}
.pace-ring > span {
  width: 80px; height: 80px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05;
}
.pace-ring small { color: var(--muted); font-size: 11px; }
.pace-ring strong { font-size: 26px; letter-spacing: -.04em; }
.pace-row { margin-bottom: 10px; }
.pace-row header { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }
.pace-row header span { font-weight: 700; }
.pace-row header em { font-style: normal; color: var(--muted); font-size: 12.5px; flex: 1; }
.pace-row header b { font-variant-numeric: tabular-nums; }

.banner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; align-items: center;
  padding: 12px 14px; margin: 8px 0 14px;
  background: var(--sky-soft); border: 1px solid #bae6fd; border-radius: 18px;
}
.banner p { margin: 2px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.stamp {
  display: inline-block; margin-right: 8px; padding: 1px 7px;
  border-radius: 99px; background: #fff; color: var(--sky-deep);
  letter-spacing: .08em; font-size: 10.5px; font-weight: 800;
}

.cal-title { margin: 0 0 8px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; color: #94a3b8; font-size: 11px; font-weight: 700; padding-bottom: 4px; }
.cal-day {
  min-height: 72px; border-radius: 12px; background: #f8fafc;
  padding: 6px 3px; text-align: center;
}
.cal-day b { display: block; font-size: 13px; font-weight: 700; }
.cal-day small { display: block; margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.cal-day.is-empty { background: transparent; }
.cal-day.is-in { background: var(--sky-soft); color: var(--sky-deep); }
.cal-day.is-out { background: var(--bad-bg); color: var(--bad); }
.cal-day.is-mix { background: #f8fafc; color: var(--ink); }
.cal-day .cal-in { color: var(--good); }
.cal-day .cal-out { color: var(--bad); }
.cal-day.is-in .cal-in { color: var(--sky-deep); }
.cal-day.is-out .cal-out { color: var(--bad); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--sky); }
.cal-stats { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cal-avg {
  display: flex; align-items: center; gap: 12px; margin: 0;
  padding: 10px 12px; border-radius: 16px;
  background: #f8fafc; border: 1px solid var(--rule);
}
.cal-avg::before {
  content: ""; width: 8px; height: 8px; border-radius: 99px; flex: none;
  background: #94a3b8;
}
.cal-avg.is-ops {
  background: linear-gradient(180deg, #f8fcff 0%, var(--sky-soft) 100%);
  border-color: #bae6fd;
}
.cal-avg.is-ops::before { background: var(--sky); box-shadow: 0 0 0 4px rgba(14, 165, 233, .16); }
.cal-avg-copy { min-width: 0; flex: 1; }
.cal-avg-copy span { display: block; font-size: 13px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.cal-avg-copy em { display: block; margin-top: 1px; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cal-avg b {
  margin: 0; flex: none; white-space: nowrap;
  font-size: 15px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.cal-avg.is-ops b { color: var(--sky-ink); }
.cal-avg.is-ops .cal-avg-copy em { color: var(--sky-deep); }

.txn-list { display: flex; flex-direction: column; gap: 4px; }
.txn-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; text-align: left; background: transparent; border: 0; border-radius: 14px; padding: 8px;
}
.txn-row:hover { background: var(--paper); }
.txn-ico {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sky-soft); color: var(--sky-deep); font-weight: 800;
}
.txn-ico.in { background: var(--good-bg); color: var(--good); }
.txn-ico.out { background: var(--bad-bg); color: var(--bad); }
.txn-ico.move { background: #f1f5f9; color: #475569; }
.txn-ico.wait { background: #e0f2fe; color: #0369a1; }
.txn-amt.wait, td.num.wait { color: #0369a1; }
.txn-copy { min-width: 0; }
.txn-copy strong, .txn-copy small { display: block; }
.txn-copy strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-copy small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-amt { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

.nature { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.nature div { padding-top: 8px; border-top: 1px solid var(--rule); }
.nature span { display: block; color: var(--muted); font-size: 12px; }
.nature strong { font-variant-numeric: tabular-nums; }

.stack { display: flex; height: 10px; width: 100%; background: var(--paper-2); margin-top: 12px; border-radius: 99px; overflow: hidden; }
.stack span { display: block; height: 100%; flex: none; }
.mix { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.mix-ring {
  width: 112px; height: 112px; border-radius: 50%;
  -webkit-mask: radial-gradient(circle 36px, transparent 98%, #000 100%);
  mask: radial-gradient(circle 36px, transparent 98%, #000 100%);
}
.mix-ring.is-empty { background: #e0f2fe; }
.legend { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; color: var(--ink-soft); font-size: 12.5px; }
.legend li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.legend .share { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.legend i { width: 8px; height: 8px; border-radius: 99px; }
.legend b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
p.legend { flex-direction: row; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
p.legend span { display: inline-flex; align-items: center; gap: 6px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.block-title { margin: 26px 0 10px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.attn-list { display: flex; flex-direction: column; gap: 2px; }
.attn {
  display: flex; gap: 10px; align-items: center; width: 100%;
  text-align: left; background: transparent; border: 0; border-radius: 12px;
  padding: 7px 4px; color: inherit; text-decoration: none;
}
button.attn:hover, a.attn:hover { background: var(--paper); }
.attn i { width: 8px; height: 8px; border-radius: 99px; flex: none; background: var(--warn); }
.attn i.bad { background: var(--bad); }
.attn i.info { background: var(--sky); }
.attn i.good { background: var(--good); }
.attn span { min-width: 0; display: flex; flex-direction: column; }
.attn strong { font-size: 14px; font-weight: 700; }
.attn small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn-clear { margin: 8px 0 0; color: var(--good); font-weight: 800; }
.mini-meter { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.mini-meter .bar { margin-top: 0; }
.stats.slim { grid-template-columns: repeat(auto-fit, minmax(160px, 220px)); margin-top: 14px; }

.chart { display: flex; align-items: flex-end; justify-content: center; gap: 10px; height: 210px; }
.chart .col { flex: 1 1 0; max-width: 84px; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.pair { height: 140px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.pair i { display: block; width: 14px; min-height: 2px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #7dd3fc, #0284c7); }
.pair i.out { background: linear-gradient(180deg, #fda4af, #e11d48); }
.chart .name { font-size: 11px; color: var(--muted); font-weight: 700; }
.chart .net { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart .col.is-current { background: linear-gradient(180deg, transparent, rgba(14, 165, 233, .14)); border-radius: 16px; }
.chart .col.is-current .name { color: var(--sky-deep); }
.legend-inline { display: flex; gap: 14px; color: var(--ink-soft); font-size: 12px; margin-bottom: 8px; }
.swatch { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 99px; }
.swatch.in { background: var(--sky); }
.swatch.out { background: #fb7185; }
.card-head .muted { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.card-head .muted .linkish { font-family: var(--sans); font-size: 12.5px; }
.viz-legend { display: flex; justify-content: center; gap: 16px; margin: 0 0 8px; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.viz-legend span { display: inline-flex; align-items: center; }
.swatch.avg { width: 14px; height: 0; border-radius: 0; background: transparent; border-top: 2px dashed var(--sky-deep); }
.viz-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 16px; background: linear-gradient(180deg, #f8fcff 0%, #fff 70%); }
.viz svg { width: 100%; height: auto; display: block; }
.viz .grid { stroke: #d7e7f2; stroke-width: 1; }
.viz .axis { fill: var(--muted); font-size: 11px; font-weight: 700; font-family: var(--sans); }
.viz .axis-x { text-anchor: middle; }
.viz .axis-y { text-anchor: end; dominant-baseline: middle; }
.viz .axis-cat { text-anchor: end; font-size: 11px; }
.viz .area { stroke: none; }
.viz .avg { stroke: #0369a1; stroke-width: 1.4; stroke-dasharray: 4 4; }
.viz .dot { fill: #fff; stroke: #e11d48; stroke-width: 2; }
.viz .dot.is-peak { fill: #e11d48; stroke: #fff; stroke-width: 1.5; }
.viz-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.viz-sub { margin: 4px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.table-wrap.flat { border: 0; background: transparent; border-radius: 0; }
.table-wrap.budget-progress table { width: 100%; min-width: 0; }
.table-wrap.budget-progress th,
.table-wrap.budget-progress td { white-space: normal; }
.table-wrap.budget-progress th.num,
.table-wrap.budget-progress td.num { white-space: nowrap; }
.budget-progress td:first-child { font-weight: 700; }
.budget-progress tbody tr.is-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.budget-progress tbody tr.is-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.budget-progress tbody tr.is-good td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.budget-progress tbody tr.is-info td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.insight { display: grid; gap: 12px; }
.insight-lead { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.insight-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.insight-chip { min-width: 0; background: var(--paper); border-radius: 16px; padding: 12px 14px; }
.insight-chip span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.insight-chip strong { display: block; margin-top: 4px; font-size: clamp(16px, 1.7vw, 22px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.15; }
.insight-chip strong.pos { color: var(--good); }
.insight-chip strong.neg { color: var(--bad); }
.insight-usage { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.insight-usage > b { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.insight-track { height: 10px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.insight-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #fb7185, #e11d48); }
.insight-track i.is-over { background: var(--bad); }

.bar { height: 8px; background: var(--paper-2); margin-top: 6px; border-radius: 99px; overflow: hidden; }
.debt-meter { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 0; font-size: 13px; }
.debt-meter span { color: var(--ink-soft); font-weight: 700; }
.debt-meter strong { font-weight: 800; }
.bar > span { display: block; height: 100%; background: var(--sky); border-radius: 99px; }
.bar > span.is-over { background: var(--bad); }
.bar > span.is-warn { background: var(--warn); }
.budget-line { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.budget-line header { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.finding { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.finding .code { font-family: var(--mono); color: var(--sky-deep); font-size: 12px; padding-top: 2px; }
.finding p { margin: 2px 0 0; color: var(--ink-soft); font-size: 13px; }
.finding ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; }

.toolbar, .row-actions, .modal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar { margin: 8px 0 12px; }
.toolbar h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.code-lock {
  margin: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--sky-soft);
  color: var(--sky-deep);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
}
.toolbar .grow { flex: 1; min-width: 180px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select, .filters input, .field input, .field select, .field textarea {
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  padding: 9px 12px;
}
.filters select { max-width: 190px; }
.filters input[data-filter="q"] { flex: 1; min-width: 200px; }
tr.total td { font-weight: 700; border-top: 1px solid var(--ink); }

.btn, .icon-btn {
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 700;
}
.btn:hover, .icon-btn:hover { background: var(--sky-soft); border-color: #bae6fd; }
.btn-primary {
  background: linear-gradient(180deg, #0ea5e9, #0369a1);
  color: #fff; border-color: #0284c7; border-radius: 999px;
  box-shadow: 0 8px 16px rgba(2, 132, 199, .24);
}
.btn-primary:hover { background: var(--sky-deep); border-color: var(--sky-deep); }
.btn-danger { color: var(--bad); border-color: #fecdd3; background: #fff; }
.btn-small { padding: 5px 10px; font-size: 12.5px; }
.icon-btn { width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; border-radius: 12px; }
.linkish {
  background: none; border: 0; padding: 0;
  color: var(--info); font-family: var(--mono); font-size: 12px;
  text-decoration: underline; text-underline-offset: 2px; font-weight: 700;
}

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 800; white-space: nowrap;
}
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-mute { background: var(--paper-2); color: var(--ink-soft); }
.badge-info { background: var(--info-bg); color: var(--info); }

.table-wrap { overflow: auto; border: 1px solid var(--rule); background: var(--card); border-radius: 18px; }
.table-wrap table { width: max-content; min-width: 100%; }
.table-wrap th,
.table-wrap td,
.table-wrap .linkish { white-space: nowrap; }
.table-wrap td.actions { white-space: normal; min-width: 240px; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sky-ink); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--rule);
  background: #f3f9fd;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 14px; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-void { color: var(--muted); }
tr.is-void .num { text-decoration: line-through; }
tr.is-draft td { background: #f0f9ff; }
.who { display: block; font-weight: 700; }
.hint { display: block; color: var(--muted); font-size: 12px; }

.wallet-card header, .split { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 99px; flex: none; }
.wallet-card .figure { margin-top: 14px; }

.doc-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 8px; }
.doc-head h2 { font-weight: 800; font-size: 32px; margin: 0; letter-spacing: -.04em; }
.doc-meta { display: grid; grid-template-columns: auto auto; gap: 2px 12px; font-size: 13px; }
.doc-meta span { color: var(--muted); }
.tabs { display: flex; gap: 6px; margin: 12px 0; }
.tabs .btn { border-radius: 999px; }
.tabs button[aria-selected="true"] { background: var(--sky); color: #fff; border-color: var(--sky); }
.statement td:first-child { width: 46%; }
.statement tr.group td { padding-top: 16px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sky-deep); font-weight: 800; border-bottom: 0; }
.statement tr.total td { font-weight: 700; border-top: 1px solid var(--ink); }
.statement tr.grand td { font-weight: 800; background: var(--sky-soft); }
.indent { padding-left: 22px !important; }
.tie { margin-top: 10px; padding: 10px 12px; background: var(--sky-soft); color: var(--sky-ink); font-weight: 700; border-radius: 12px; }
.note-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-soft); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.field small, .form-error { font-size: 12.5px; line-height: 1.4; }
.field small { color: var(--muted); }
.form-error { color: var(--bad); margin: 0 0 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; font-size: 13.5px; }
.check input { margin-top: 3px; }
.modal-back {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(15, 23, 42, .42);
  display: flex; justify-content: center; align-items: center; align-items: safe center;
  padding: 40px 16px; overflow: auto;
}
.modal {
  width: min(720px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.modal-sm { width: min(440px, calc(100vw - 32px)); }
.modal h2 { margin: 0; font-weight: 800; font-size: 26px; letter-spacing: -.03em; }
.modal-sm h2 { font-size: 20px; letter-spacing: -.02em; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.confirm-copy { margin-top: 0; }
.modal-actions { justify-content: flex-end; margin-top: 4px; }

#toast-root { position: fixed; left: 20px; bottom: 20px; z-index: 40; }
body:has(#modal-root .modal-back) #toast-root { top: 16px; bottom: auto; }
.toast {
  max-width: 380px;
  background: var(--sky-ink);
  color: #f8fbff;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(12, 74, 110, .28);
}
.empty { padding: 28px 8px; color: var(--ink-soft); }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-weight: 800; font-size: 24px; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 10px; }
.settings-block { margin-top: 18px; }
.wallet-card .row-actions, .card .row-actions { margin-top: 12px; }
.lock-note { margin: 0 0 12px; padding: 8px 12px; background: var(--sky-soft); border-radius: 12px; font-size: 13.5px; }

.sheet { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; }
.sheet-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.sheet-label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 800;
}
.sheet-block small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.fee-line { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.fee-line .line { flex: 1; min-width: 0; }
.plan-note { margin: 0 0 12px; }
.plan-tabs { margin-bottom: 14px; }
.plan-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 14px; align-items: start; }
.plan-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#plan-out { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.plan-form .sheet-label { margin: 12px 0 8px; }
.plan-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.plan-card-head h3 { margin: 0; }
.plan-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 2px 0 6px; }
.plan-line span { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.plan-val { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.plan-val.is-sky { color: var(--sky-deep); }
.plan-val.is-good { color: var(--good); }
.plan-val.is-warn { color: var(--warn); }
.plan-val.is-bad { color: var(--bad); }
.plan-form input.plan-range { width: 100%; margin: 0 0 8px; padding: 0; border: 0; background: transparent; accent-color: var(--sky); height: 28px; }
.plan-money { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 12px; margin: 0 0 12px; }
.plan-money span { color: var(--muted); font-weight: 800; }
.plan-form .plan-money input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 0; font-weight: 800; font-size: 16px; }
.plan-choices { display: grid; gap: 8px; margin-bottom: 12px; }
.plan-choices-2 { grid-template-columns: 1fr 1fr; }
.plan-choices-3 { grid-template-columns: 1fr 1fr 1fr; }
.plan-choices-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-choice { appearance: none; text-align: left; border: 1px solid var(--rule-strong); background: #fff; border-radius: 16px; padding: 10px 12px; min-width: 0; }
.plan-choice strong { display: block; font-size: 13px; line-height: 1.3; }
.plan-choice small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.plan-choice.is-on { background: var(--sky-soft); border-color: var(--sky); color: var(--sky-ink); }
.plan-choice.is-on small { color: var(--sky-deep); }
.plan-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.plan-hero-num { margin: 4px 0 8px; font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.plan-badge { display: inline-flex; align-items: center; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; color: var(--ink-soft); background: #fff; }
.plan-hero .bar { height: 10px; margin-top: 8px; }
.plan-hero .bar > span { background: linear-gradient(90deg, #0ea5e9, #34d399); }
.plan-split, .plan-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-split { margin-top: 14px; }
.plan-split > div, .plan-duo > div:not(.field) { background: var(--paper); border-radius: 16px; padding: 12px; min-width: 0; }
.plan-split span, .plan-duo > div:not(.field) > span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.plan-split strong, .plan-duo > div:not(.field) > strong { display: block; margin-top: 4px; font-size: 18px; }
.plan-duo .field { margin-bottom: 0; }
.plan-alloc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan-alloc article { background: var(--paper); border-radius: 16px; padding: 12px; min-width: 0; }
.plan-alloc header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.plan-alloc header strong { font-size: 13.5px; }
.plan-alloc header span { color: var(--sky-deep); font-weight: 800; font-size: 13px; }
.plan-alloc-num { margin: 8px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-alloc .sub { margin-top: 4px; }
.plan-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.plan-metric { background: var(--paper); border-radius: 16px; padding: 12px; min-width: 0; }
.plan-metric span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.plan-metric strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-strategy.is-best { border-color: #7dd3fc; box-shadow: 0 10px 30px rgba(14, 165, 233, .12); }
.plan-strategy h3 { margin-bottom: 4px; }
.plan-facts { margin: 12px 0 0; }
.plan-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); }
.plan-facts dt { color: var(--ink-soft); font-size: 13px; }
.plan-facts dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.plan-save { margin: 12px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--good-bg); color: var(--good); font-size: 13px; font-weight: 800; }
.plan-alert { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bad-bg); border-radius: 18px; padding: 12px 14px; }
.plan-alert p { margin: 0; color: var(--ink); font-weight: 700; }
.plan-alert strong { color: var(--good); white-space: nowrap; }
.plan-switch, .plan-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-presets { margin-bottom: 0; }
.plan-presets span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.plan-switch .btn.is-on, .plan-presets .btn.is-on { background: var(--sky); border-color: var(--sky); color: #fff; }
.plan-chart { margin-top: 12px; }
.plan-chart svg { width: 100%; height: auto; display: block; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.plan-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; }
.plan-list { margin: 8px 0 0; padding-left: 18px; }
.plan-list li { padding: 4px 0; }
.debt-card { background: var(--paper); border-radius: 16px; padding: 12px; margin-bottom: 10px; min-width: 0; }
.debt-card-top { display: flex; align-items: center; gap: 8px; }
.debt-card .debt-name { flex: 1; min-width: 0; border: 0; background: transparent; padding: 2px 0; font-weight: 800; font-size: 15px; }
.debt-meta { margin: 2px 0 8px; color: var(--ink-soft); font-size: 12.5px; }
.debt-meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.debt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.debt-fields .field { margin: 0; min-width: 0; }
.debt-fields .field:last-child { grid-column: 1 / -1; max-width: 160px; }
.debt-fields input { width: 100%; min-width: 0; }
.plan-rate { flex: none; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 800; background: var(--sky-soft); color: var(--sky-deep); }
.plan-rate.is-good { background: var(--good-bg); color: var(--good); }
.plan-rate.is-warn { background: var(--warn-bg); color: var(--warn); }
.plan-rate.is-bad { background: var(--bad-bg); color: var(--bad); }
.plan-meter { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin: 0 0 8px; }
.plan-meter > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #34d399, #0ea5e9); }
.plan-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-tile .plan-hero-num { font-size: clamp(26px, 3vw, 36px); }
.plan-tile .plan-badge { margin-top: 8px; }
tr.plan-on td { background: var(--sky-soft); }
.type-row, .choice-row, .date-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  width: 0; min-width: 100%; max-width: 100%;
}
.type-pill, .choice, .date-chip {
  appearance: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--rule-strong); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13.5px; line-height: 1.2;
}
.type-pill:not(.is-on), .date-chip:not(.is-on) { color: var(--muted); }
.type-pill.is-on, .choice.is-on, .date-chip.is-on { background: var(--sky); border-color: var(--sky); color: #fff; }
.type-pill.icon-only, .date-chip.icon-only {
  width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 14px;
}
.type-pill .ico, .date-chip .ico { width: 16px; height: 16px; }
.chip-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.bank-mark {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 18px; padding: 0 4px; border-radius: 5px;
  font-size: 9px; font-weight: 800; letter-spacing: 0; line-height: 1; flex: none;
}
.bank-mark.lg { min-width: 42px; height: 32px; padding: 0 6px; border-radius: 8px; font-size: 12px; margin-top: 2px; }
.bank-pick { display: flex; align-items: center; gap: 8px; }
.bank-pick select { flex: 1; min-width: 0; }
.wait-note { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.wait-note p { margin: 0; }
.amount-row {
  display: flex; align-items: center; gap: 8px;
  width: 0; min-width: 100%; max-width: 100%;
  background: var(--paper); border-radius: 14px; padding: 6px 14px;
}
.amount-row .rp { color: var(--muted); font-weight: 700; }
.amount-row input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font-size: 22px; font-weight: 800; padding: 8px 0;
}
.amount-row input::placeholder { color: #94a3b8; font-weight: 700; }
.amount-row input:focus,
.amount-row input:focus-visible { outline: none; }
.amount-row:focus-within { box-shadow: inset 0 0 0 2px var(--sky); }
.amount-row input[readonly] { color: var(--ink-soft); }
.pay-card { background: var(--paper); border-radius: 16px; padding: 12px 14px; width: 0; min-width: 100%; max-width: 100%; }
.pay-name { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 8px; }
.pay-name .badge { letter-spacing: .06em; text-transform: uppercase; font-size: 10px; }
.pay-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13.5px; padding: 2px 0; min-width: 0; }
.pay-line strong { margin-left: auto; text-align: right; }
.pay-line span { color: var(--ink-soft); }
.pay-line .paid { color: var(--info); font-weight: 800; }
.pay-line .left { color: var(--bad); font-weight: 800; }
.pay-card .sub { margin: 8px 0 0; font-size: 12px; }
.cat-search { margin-bottom: 8px; }
.sheet .date-row input.date-text {
  flex: 1 1 9em; width: auto; min-width: 8.5em; margin: 0;
  padding: 8px 12px; font-variant-numeric: tabular-nums;
}
.sheet .date-row input.date-text.is-bad { box-shadow: inset 0 0 0 2px var(--bad); }
.sheet select.line, .sheet input.line, .sheet textarea.line {
  width: 100%; background: var(--paper); border: 0; border-radius: 12px; padding: 12px 14px;
}
.sheet textarea.line { min-height: 72px; resize: vertical; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.sheet-actions .check { margin: 0; }
.btn-block { width: 100%; border-radius: 14px; display: flex; justify-content: center; padding: 12px 16px; }
.btn-primary.btn-block { border-radius: 14px; }
.sheet-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.sheet-pair > * { min-width: 0; }
.kind-row { flex-wrap: nowrap; overflow-x: auto; }
.kind-row .type-pill { flex: none; }
.line-search { position: relative; color: var(--muted); }
.line-search .ico { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; }
.line-search input.line { padding-left: 36px; color: var(--ink); }
.invest-actions { display: grid; grid-template-columns: 1fr 1.2fr; }
.invest-actions .btn { display: flex; justify-content: center; border-radius: 14px; padding: 12px 16px; }
.invest-actions .btn-danger { grid-column: 1 / -1; }
.invest-history { margin-top: 20px; }
.invest-history h3 { margin: 0 0 8px; }
.table-wrap.history-table td.note { white-space: normal; min-width: 140px; }
.btn-quiet { width: 100%; background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-quiet:hover { background: var(--paper); }

.m-dash-intro { margin: 4px 0 14px; }
.m-dash-intro h2, .m-page-head h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
}
.m-hello, .m-page-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.m-month {
  appearance: none; border: 0; padding: 0; background: transparent;
  color: var(--sky-deep); font-weight: 800; font-size: 15px;
}
.m-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 4px 0 14px; }
.m-add {
  appearance: none;
  width: 48px; height: 48px; flex: none;
  border: 0; border-radius: 16px;
  background: linear-gradient(180deg, #0ea5e9, #0369a1);
  color: #fff; font-size: 28px; font-weight: 700; line-height: 1;
  box-shadow: 0 8px 16px rgba(2, 132, 199, .28);
}
.m-sum {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 4px 12px;
  color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.m-sum b { color: var(--sky); font-size: 14px; letter-spacing: 0; text-transform: none; }
.m-menu h3 { margin-bottom: 16px; }
.m-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 4px;
  text-align: center;
}
.m-menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0;
  color: var(--ink); text-decoration: none; font-size: 11px; font-weight: 700;
}
.m-menu-ico {
  width: 48px; height: 48px; border-radius: 50%;
  background: #f1f5f9; color: #334155;
  display: grid; place-items: center;
}
.m-menu-ico .ico { width: 22px; height: 22px; }
.m-stat-grid { display: grid; gap: 12px; }
.m-vs {
  display: inline-flex; margin-top: 10px; padding: 4px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
}
.m-vs.is-down { background: var(--bad-bg); color: var(--bad); }
.m-vs.is-up { background: var(--good-bg); color: var(--good); }
.m-ring-wrap {
  width: 220px; height: 220px; margin: 8px auto 4px;
  border-radius: 50%;
  background: conic-gradient(var(--sky) var(--p, 0deg), #e8eef3 0);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.m-ring-wrap::before {
  content: ""; position: absolute; inset: 24px;
  background: #fff; border-radius: 50%;
}
.m-ring-wrap small, .m-ring-wrap strong { position: relative; z-index: 1; text-align: center; }
.m-ring-wrap small {
  display: block; color: var(--muted); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.m-ring-wrap strong {
  display: block; margin-top: 4px; font-size: 22px; font-weight: 800;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.m-bills { background: #141414; color: #fff; border: 0; }
.m-bills h3 { color: #fff; }
.m-bill {
  appearance: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; margin-top: 10px; padding: 14px;
  background: #1c1c1c; color: #fff; border: 0; border-radius: 16px; text-align: left;
}
.m-bill small { display: block; margin-top: 2px; color: #94a3b8; font-size: 12px; }
.m-bill span { min-width: 0; }
.m-bill b { color: #7dd3fc; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-empty { margin: 28px 0 12px; text-align: center; color: var(--muted); }
.m-neraca-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 6px 0; font-size: 14px;
}
.m-neraca-row b { font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.m-neraca-row.is-debt b { color: var(--bad); }
.m-neraca-row.is-total {
  margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule);
  font-weight: 800;
}
.m-neraca-row.is-total span, .m-neraca-row.is-total b { font-size: 16px; }
.m-feed { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 18px; }
.m-day {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 10px 4px 2px; color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.m-day:first-child { margin-top: 4px; }
.m-day b { font-size: 12px; letter-spacing: 0; text-transform: none; }
.m-txn {
  appearance: none;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 14px 16px; text-align: left;
  background: #fff; border: 1px solid rgba(211, 228, 240, .95); border-radius: 20px;
  box-shadow: var(--shadow);
}
.m-brand { align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.m-brand strong { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.m-tools { align-items: center; gap: 8px; flex: none; flex-shrink: 0; margin-left: auto; }
.m-tool {
  appearance: none;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rule); background: #fff; color: var(--ink);
  display: grid; place-items: center; text-decoration: none; padding: 0;
  flex: none;
}
.m-tool .ico { width: 18px; height: 18px; }
.m-tool[aria-current="page"] { color: var(--sky); border-color: #bae6fd; background: var(--sky-soft); }
.dock-link {
  display: grid; place-items: center; height: 44px; color: #94a3b8;
  text-decoration: none; border-radius: 14px;
}
.dock-link .ico { width: 22px; height: 22px; }
.dock-link[aria-current="page"] { color: var(--sky); background: var(--sky-soft); }
.dock-fab {
  appearance: none;
  width: 56px; height: 56px; margin-top: -22px; padding: 0;
  border: 0; border-radius: 50%;
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .42);
  display: grid; place-items: center;
}
.dock-fab .ico { width: 26px; height: 26px; stroke-width: 2.2; }
.m-only { display: none; }
.m-brand, .m-tools, .dock { display: none; }

@media (max-width: 980px) {
  .stats, .grid-2, .grid-2.even, .cards, .nature, .dash-split { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-2.even, .dash-split, .dash-grid, .plan-layout, .plan-compare, .plan-alloc, .plan-tiles { grid-template-columns: 1fr; }
  .plan-metrics, .plan-choices-3, .plan-choices-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  html { -webkit-text-size-adjust: 100%; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(280px, 88vw); z-index: 20;
    transform: translateX(-105%); transition: transform .18s ease;
    box-shadow: 12px 0 40px rgba(15, 23, 42, .12);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .sidebar.is-open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 19; }
  .nav-toggle { display: none !important; }
  .page-sub { display: none; }
  .view { padding: 6px 16px calc(108px + env(safe-area-inset-bottom, 0px)); }
  .topbar {
    flex-wrap: nowrap; gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: rgba(242, 247, 251, .9);
  }
  .top-title,
  .topbar > .btn-primary,
  #period-lock,
  .m-clip {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .m-brand, .m-tools { display: flex; }
  .d-only { display: none !important; }
  .m-only { display: block; }
  .m-page-head { display: flex; }
  .m-stat-grid { display: grid; }
  .m-menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .m-feed { display: flex; }
  body { overflow-x: hidden; }
  .m-sum { display: flex; }
  .wallet-strip { display: flex; margin-top: 12px; }
  .wallet-pill { min-width: 220px; flex: 0 0 auto; }
  .dash-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .dash-grid > .span-2, .dash-rail { grid-column: 1 / -1; }
  .viz-scroll { -webkit-overflow-scrolling: touch; }
  .card-head h3 { min-width: 0; }
  .mix-ring { margin: 0 auto; }
  .chart { height: 180px; gap: 6px; }
  .insight-usage { grid-template-columns: 1fr; }
  .insight-usage > b { white-space: normal; }
  .period {
    position: static; opacity: 1; overflow: hidden;
    pointer-events: auto; flex: none;
    height: 36px; padding: 0 6px; border-radius: 999px;
  }
  .period .btn { display: none; }
  .period input { width: 118px; height: 32px; padding: 0 4px; font-size: 13px; font-weight: 700; }
  .m-tool[data-action="focus-period"] { display: none; }
  .hero {
    grid-template-columns: 1fr;
    padding: 22px 18px 16px;
    border-radius: 28px;
    background:
      radial-gradient(420px 160px at 100% 0%, rgba(56, 189, 248, .22), transparent 62%),
      linear-gradient(165deg, #171717 0%, #0b1220 72%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
  }
  .hero-formula { display: block; font-size: 12.5px; max-width: none; }
  .hero-op { white-space: normal; }
  .hero-chips { display: flex; }
  .hero-metrics { min-width: 0; padding-top: 8px; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-metrics > div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); padding: 10px 12px; border-radius: 16px; }
  .hero-metrics span { color: rgba(255, 255, 255, .55); }
  .hero-metrics strong.out { color: #fb7185; }
  .hero-figure { font-size: 34px; }
  .pace, .mix, .flow-split { grid-template-columns: 1fr; justify-items: start; }
  .card-head { align-items: flex-start; flex-wrap: wrap; }
  .card-head h3 { flex: 1 1 auto; min-width: 12em; }
  .card-head .muted { flex: 1 1 12em; white-space: normal; text-align: right; }
  .filters { flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
  .filters input[data-filter="q"] {
    flex: 1 1 100%; min-width: 0; border-radius: 16px; padding: 12px 16px;
  }
  .filters select {
    flex: none; max-width: none; border-radius: 999px; padding: 8px 14px; background: #fff;
  }
  .cards { grid-template-columns: 1fr; }
  .wallet-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px;
    align-items: center; padding: 16px;
  }
  .wallet-card header { padding-right: 0; align-items: center; min-width: 0; grid-column: 1; }
  .wallet-card header .badge { display: none; }
  .wallet-card h3 { margin: 0 0 2px; font-size: 16px; }
  .wallet-card .sub { margin: 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
  .wallet-card .figure {
    position: static; grid-column: 2; grid-row: 1; margin: 0;
    font-size: 16px; text-align: right; white-space: nowrap;
  }
  .wallet-card > .sub, .wallet-card > .hint { display: none; }
  .wallet-card .row-actions { grid-column: 1 / -1; margin-top: 4px; }
  .wallet-card .bank-mark.lg { margin-top: 0; }
  .wallet-pill strong { white-space: nowrap; }
  .dock {
    position: fixed; z-index: 15;
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-template-columns: 1fr 1fr 56px 1fr 1fr; align-items: center;
    height: 64px; padding: 0 8px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .14);
  }
  body.modal-open .dock { display: none; }
  #toast-root { left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .cal-day.is-today { box-shadow: inset 0 0 0 2px var(--sky); }
}
@media (max-width: 640px) {
  .plan-choices-2, .plan-choices-3, .plan-choices-4, .plan-split, .plan-duo, .debt-fields, .plan-metrics { grid-template-columns: 1fr; }
  .plan-alert { flex-direction: column; align-items: flex-start; }
  .plan-alert strong { white-space: normal; }
  .modal-back { padding: 0; align-items: flex-end; overflow: hidden; }
  .modal, .modal-sm {
    width: 100%; max-width: 100%; margin: 0;
    border-radius: 22px 22px 0 0;
    max-height: 92dvh;
    display: flex; flex-direction: column;
    padding: 14px 14px 0;
    overflow: hidden;
  }
  .modal-head { flex: none; }
  .modal > form { overflow: auto; flex: 1 1 auto; min-height: 0; }
  .sheet-actions, .modal form .modal-actions {
    position: sticky; bottom: 0; z-index: 1;
    background: var(--card);
    border-top: 1px solid var(--rule);
    padding-top: 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .stats, .cards, .nature, .form-grid { grid-template-columns: 1fr; }
  .doc-head { flex-direction: column; align-items: flex-start; }
  .finding { grid-template-columns: 1fr; }
  .insight-results { grid-template-columns: 1fr; }
  .budget-progress th, .budget-progress td { padding: 8px 6px; }
  .budget-progress .badge { font-size: 10.5px; }
  .insight-chip { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; }
  .insight-chip span { min-width: 0; }
  .insight-chip strong { margin-top: 0; font-size: 16px; text-align: right; }
  .cal-day { min-height: 64px; padding: 4px 2px; }
  .cal-day small { font-size: 9px; }
  .sheet-pair { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .wallet-pill { transition: none; }
}
@media print {
  .sidebar, .scrim, .topbar, .no-print, #toast-root, #modal-root, .dock, .m-brand, .m-tools { display: none !important; }
  .app { display: block; height: auto; }
  .main { height: auto; overflow: visible; }
  .view { margin: 0; border: 0; padding: 0; max-width: none; }
  body { background: white; }
  .card, .stat, .hero, tr { break-inside: avoid; }
  .hero { color: #0f172a; background: #e0f2fe; box-shadow: none; }
  .hero-metrics > div { background: transparent; border-color: transparent; }
  .hero-metrics span, .hero-metrics em, .hero-chips span, .hero-chips em { color: #475569; }
  .hero-chips span { background: transparent; border-color: #bae6fd; }
  .hero-figure.is-neg, .hero-metrics strong.out { color: var(--bad); }
  .hero-formula { color: #334155; }
  .hero-sign { background: var(--bad); color: #fff; }
}

.gate-body {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f8fcff 0%, var(--paper) 55%);
}
.gate {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}
.gate .brand { padding: 0 0 16px; }
.gate h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; }
.gate form { display: grid; gap: 14px; margin-top: 16px; }
.gate .field { display: grid; gap: 6px; }
.gate .field span { font-size: 12px; font-weight: 700; color: var(--muted); }
.gate .error { margin: 0; color: var(--bad); font-size: 13px; font-weight: 600; }
