/* ==========================================================================
   Catatan Keuangan — Stylesheet v1.6.0 (3 tema: premium gelap, minimalis terang, wealth, Playfair Display + Plus Jakarta Sans)
   ========================================================================== */

@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

/* Default: gelap. Mode terang tersedia lewat data-theme="light" atau preferensi sistem. */
:root {
  color-scheme: dark;
  --bg: #08080a;
  --surface: #111114;
  --surface-2: #16161a;
  --surface-3: #1e1e23;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .13);
  --text: #f5f2eb;
  --text-2: #b8b3a8;
  --text-3: #7c776d;
  --gold: #dcb872;
  --gold-hi: #f7e4b5;
  --gold-lo: #9d7330;
  --gold-grad: linear-gradient(135deg, #f7e4b5 0%, #dcb872 42%, #a87c32 100%);
  --gold-soft: rgba(220, 184, 114, .12);
  --primary: #dcb872;
  --on-primary: #1b1407;
  --accent: #e7c886;
  --ring: rgba(220, 184, 114, .3);
  --income: #3fd69a;
  --income-soft: rgba(63, 214, 154, .12);
  --expense: #ff8466;
  --expense-soft: rgba(255, 132, 102, .12);
  --warning: #f3c053;
  --warning-soft: rgba(243, 192, 83, .13);
  --info: #79a8ff;
  --info-soft: rgba(121, 168, 255, .13);
  --chart-income: #199e70;
  --chart-expense: #d95926;
  --chart-line: #dcb872;
  --chart-grid: rgba(255, 255, 255, .06);
  --glow-gold: 0 0 0 1px rgba(220, 184, 114, .25), 0 20px 60px -20px rgba(220, 184, 114, .35);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -16px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .85);
  --radius: 18px;
  --radius-sm: 11px;
  --sidebar-w: 248px;
  --font: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --bg: #f3f6f2; --surface: #ffffff; --surface-2: #fbfcfa; --surface-3: #eef3ee;
    --border: rgba(20, 45, 28, .08); --border-strong: rgba(20, 45, 28, .15);
    --text: #14211a; --text-2: #4c5b52; --text-3: #85928a;
    --gold: #1f8a5b; --gold-hi: #9fe0bf; --gold-lo: #14653f; --gold-soft: rgba(31, 138, 91, .1);
    --gold-grad: linear-gradient(135deg, #46c488 0%, #1f8a5b 60%, #16704a 100%);
    --primary: #1f8a5b; --on-primary: #ffffff; --accent: #1a7a50; --ring: rgba(31, 138, 91, .22);
    --income: #13855a; --income-soft: rgba(19, 133, 90, .1); --expense: #d0443a; --expense-soft: rgba(208, 68, 58, .09);
    --warning: #9c6a00; --warning-soft: rgba(156, 106, 0, .1); --info: #2a63c9; --info-soft: rgba(42, 99, 201, .09);
    --chart-income: #2f9e6a; --chart-expense: #ef5a4c; --chart-line: #1f8a5b; --chart-grid: rgba(20, 45, 28, .07);
    --glow-gold: 0 0 0 1px rgba(31, 138, 91, .16), 0 20px 50px -26px rgba(20, 100, 60, .35);
    --shadow: 0 1px 2px rgba(20, 45, 28, .05), 0 10px 30px -18px rgba(20, 45, 28, .2);
    --shadow-lg: 0 30px 70px -24px rgba(20, 45, 28, .3);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f2; --surface: #ffffff; --surface-2: #fbfcfa; --surface-3: #eef3ee;
  --border: rgba(20, 45, 28, .08); --border-strong: rgba(20, 45, 28, .15);
  --text: #14211a; --text-2: #4c5b52; --text-3: #85928a;
  --gold: #1f8a5b; --gold-hi: #9fe0bf; --gold-lo: #14653f; --gold-soft: rgba(31, 138, 91, .1);
  --gold-grad: linear-gradient(135deg, #46c488 0%, #1f8a5b 60%, #16704a 100%);
  --primary: #1f8a5b; --on-primary: #ffffff; --accent: #1a7a50; --ring: rgba(31, 138, 91, .22);
  --income: #13855a; --income-soft: rgba(19, 133, 90, .1); --expense: #d0443a; --expense-soft: rgba(208, 68, 58, .09);
  --warning: #9c6a00; --warning-soft: rgba(156, 106, 0, .1); --info: #2a63c9; --info-soft: rgba(42, 99, 201, .09);
  --chart-income: #2f9e6a; --chart-expense: #ef5a4c; --chart-line: #1f8a5b; --chart-grid: rgba(20, 45, 28, .07);
  --glow-gold: 0 0 0 1px rgba(31, 138, 91, .16), 0 20px 50px -26px rgba(20, 100, 60, .35);
  --shadow: 0 1px 2px rgba(20, 45, 28, .05), 0 10px 30px -18px rgba(20, 45, 28, .2);
  --shadow-lg: 0 30px 70px -24px rgba(20, 45, 28, .3);
}


/* Tema Wealth: biru gelap + teal, untuk fokus kekayaan & investasi */
:root[data-theme="wealth"] {
  color-scheme: dark;
  --bg: #06131d; --surface: #0b1c2a; --surface-2: #0e2232; --surface-3: #15304a;
  --border: rgba(140, 210, 255, .08); --border-strong: rgba(140, 210, 255, .15);
  --text: #e6f3fa; --text-2: #a3bccb; --text-3: #6b8798;
  --gold: #2dd4bf; --gold-hi: #a5f3fc; --gold-lo: #0e7490; --gold-soft: rgba(45, 212, 191, .12);
  --gold-grad: linear-gradient(135deg, #a5f3fc 0%, #2dd4bf 45%, #0891b2 100%);
  --primary: #2dd4bf; --on-primary: #032a2e; --accent: #5eead4; --ring: rgba(45, 212, 191, .3);
  --income: #34d399; --income-soft: rgba(52, 211, 153, .12); --expense: #fb7185; --expense-soft: rgba(251, 113, 133, .12);
  --warning: #fbbf24; --warning-soft: rgba(251, 191, 36, .12); --info: #60a5fa; --info-soft: rgba(96, 165, 250, .13);
  --chart-income: #10b981; --chart-expense: #f43f5e; --chart-line: #22d3ee; --chart-grid: rgba(140, 210, 255, .07);
  --glow-gold: 0 0 0 1px rgba(45, 212, 191, .25), 0 20px 60px -20px rgba(34, 211, 238, .35);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -16px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .85);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, var(--gold-soft), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(63, 214, 154, .05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
.num, .tx-amount, .stat-value, .summary-strip .v, .table td, .budget-meta, .rank-top .val, .w-bal, .chart-kpis .v, .fig .v {
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.muted { color: var(--text-3); }
.pos { color: var(--income); }
.neg { color: var(--expense); }
.serif { font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--ring); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 14px 14px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; color: inherit; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: var(--glow-gold); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 17.5px; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { display: none; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 18px 12px 8px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .15s, color .15s;
}
.nav a svg { width: 19px; height: 19px; flex: none; stroke-width: 1.7; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { color: var(--text); background: linear-gradient(90deg, var(--gold-soft), transparent); }
.nav a.active svg { color: var(--gold); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-grad); box-shadow: 0 0 12px var(--gold); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.profile-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: inherit; }
.profile-card:hover { border-color: var(--border-strong); }
.profile-card .p-main { min-width: 0; }
.profile-card .p-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-card .p-sub { font-size: 11.5px; color: var(--gold); letter-spacing: .04em; }
.profile-card .chev { margin-left: auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--gold-grad); color: var(--on-primary); font-weight: 700; font-size: 12.5px; letter-spacing: .03em; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); padding: 0 40px 64px; }
.page { max-width: 1200px; margin: 0 auto; }
#view { outline: none; }
.page-enter > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.page-enter > *:nth-child(2) { animation-delay: .04s; }
.page-enter > *:nth-child(3) { animation-delay: .08s; }
.page-enter > *:nth-child(4) { animation-delay: .12s; }
.page-enter > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 30px 0 24px; }
.topbar h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.12; letter-spacing: -0.015em; }
.topbar .subtitle { color: var(--text-3); font-size: 13.5px; margin-top: 6px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-sep { width: 1px; height: 22px; background: var(--border-strong); margin: 0 4px; }
.mobile-header, .bottom-nav { display: none; }

/* ---------- Cards ---------- */
.card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 20px 22px 0; }
.card-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.card-head .link { font-size: 12.5px; font-weight: 600; color: var(--gold); display: inline-flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 99px; background: var(--gold-soft); }
.card-head .link:hover { filter: brightness(1.15); }
.card-head .link svg { width: 14px; height: 14px; }
.card-body { padding: 16px 22px 22px; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.mt { margin-top: 18px; }

/* ---------- Kartu premium (saldo) ---------- */
.hero-row { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 18px; }
.pcard {
  position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1.586; border-radius: 22px; padding: 24px 26px;
  color: #f8ecd0; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 233, 180, .22), transparent 50%),
    radial-gradient(80% 80% at 100% 100%, rgba(220, 184, 114, .18), transparent 60%),
    linear-gradient(135deg, #2b2416 0%, #15120c 48%, #241d10 100%);
  box-shadow: 0 0 0 1px rgba(220, 184, 114, .32), 0 30px 70px -25px rgba(220, 184, 114, .45), 0 18px 40px -20px rgba(0, 0, 0, .9);
}
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 4px);
}
.pcard::after {
  content: ""; position: absolute; top: -60%; left: -40%; width: 40%; height: 220%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 200, .16), transparent);
  transform: rotate(18deg); animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -50%; } 100% { left: 130%; } }
.pcard-top { display: flex; align-items: center; justify-content: space-between; }
.pcard-brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.pcard-brand svg { width: 22px; height: 22px; }
.pcard-chip { width: 44px; height: 33px; border-radius: 7px; background: linear-gradient(135deg, #f7e4b5, #c49a4c 55%, #8e6a2c); position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.pcard-chip::before, .pcard-chip::after { content: ""; position: absolute; background: rgba(60, 40, 10, .35); }
.pcard-chip::before { left: 33%; right: 33%; top: 0; bottom: 0; border-left: 1px solid rgba(60, 40, 10, .4); border-right: 1px solid rgba(60, 40, 10, .4); background: none; }
.pcard-chip::after { top: 50%; left: 0; right: 0; height: 1px; }
.pcard-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(248, 236, 208, .6); display: flex; align-items: center; gap: 8px; }
.pcard-label .eye { border: 0; background: rgba(255, 255, 255, .08); color: inherit; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.pcard-label .eye:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pcard-label .eye svg { width: 14px; height: 14px; }
.pcard-amount { font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; font-size: 40px; line-height: 1.12; margin-top: 6px; white-space: nowrap; background: linear-gradient(180deg, #fff8e6, #e9cd8c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 30px rgba(247, 228, 181, .15); }
.pcard-amount .cur { font-size: .52em; margin-right: 6px; vertical-align: .5em; opacity: .75; }
.pcard-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; font-family: var(--font); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: .14em; color: rgba(248, 236, 208, .78); }
.pcard-bottom .holder { font-family: var(--font); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.pcard-bottom small { display: block; font-size: 9px; letter-spacing: .16em; opacity: .6; margin-bottom: 2px; }
.privacy .blur-num { filter: blur(9px); user-select: none; }

/* Panel arus bulan ini */
.flow { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.flow-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fig { display: flex; gap: 12px; align-items: center; min-width: 0; }
.fig .ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; }
.fig .ic svg { width: 20px; height: 20px; }
.fig .k { font-size: 12px; color: var(--text-3); }
.fig .v { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig .d { font-size: 11.5px; font-weight: 600; }
.flow-chart { flex: 1; min-height: 120px; }

/* Aksi cepat */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.qa { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; transition: border-color .2s, transform .2s, background .2s; }
.qa:hover { border-color: var(--border-strong); transform: translateY(-2px); background: var(--surface-2); }
.qa .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.qa .ic svg { width: 19px; height: 19px; }
.qa b { display: block; font-size: 13.5px; font-weight: 600; }
.qa span { font-size: 12px; color: var(--text-3); }

.ic-income { background: var(--income-soft); color: var(--income); }
.ic-expense { background: var(--expense-soft); color: var(--expense); }
.ic-gold { background: var(--gold-soft); color: var(--gold); }
.ic-info { background: var(--info-soft); color: var(--info); }
.ic-warning { background: var(--warning-soft); color: var(--warning); }
.ic-neutral { background: var(--gold-soft); color: var(--gold); }

/* ---------- Stat tiles ---------- */
.stat { padding: 18px 20px; display: flex; flex-direction: column; }
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.stat-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.stat-icon svg { width: 17px; height: 17px; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 12px; line-height: 1.2; letter-spacing: -0.02em; }
.stat-foot { font-size: 12.5px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; transition: border-color .15s, background .15s, filter .15s, transform .05s; }
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--gold-grad); border: 0; color: var(--on-primary); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--gold) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45); }
:root[data-theme="light"] .btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px rgba(20, 100, 60, .55); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { color: var(--expense); }
.btn-danger:hover { border-color: var(--expense); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); display: inline-grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); }
.icon-btn:hover { color: var(--gold); border-color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }
.kbd { display: none; }

.month-switch { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.month-switch button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.month-switch button:hover { color: var(--gold); }
.month-switch button svg { width: 17px; height: 17px; }
.month-switch .label { min-width: 134px; text-align: center; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.month-switch .label svg { width: 15px; height: 15px; color: var(--gold); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-3); outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 72px; padding: 10px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--ring); }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a39d90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--surface); color: var(--text); }
.form-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.form-row .input, .form-row .select { min-width: 0; }
.hint { font-size: 12.5px; color: var(--text-3); }

.amount-input { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border-radius: 16px; background: var(--surface-3); border: 1px solid var(--border-strong); }
.amount-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--ring); }
.amount-input .cur { color: var(--text-3); font-size: 20px; font-family: var(--serif); font-weight: 600; }
.amount-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums; font-size: 38px; height: 54px; letter-spacing: -0.01em; }
.amount-input.t-income input { color: var(--income); }
.amount-input.t-expense input { color: var(--expense); }
.amount-input.t-transfer input { color: var(--info); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border); }
.segmented button { height: 38px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.segmented button svg { width: 15px; height: 15px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .6); }
.segmented button.active[data-value="income"] { color: var(--income); }
.segmented button.active[data-value="expense"] { color: var(--expense); }
.segmented button.active[data-value="transfer"] { color: var(--info); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 214px; overflow-y: auto; padding: 2px; }
.cat-option { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; font-weight: 500; color: var(--text-2); text-align: center; line-height: 1.2; transition: border-color .15s, background .15s; }
.cat-option:hover { border-color: var(--border-strong); color: var(--text); }
.cat-option.active { border-color: var(--gold); background: var(--gold-soft); color: var(--text); box-shadow: 0 0 0 1px var(--gold) inset; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-pick button { height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; }
.icon-pick button svg { width: 19px; height: 19px; }
.icon-pick button.active { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* ---------- Ikon kategori ---------- */
.cat-icon { --c: #8a857a; width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.cat-icon svg { width: 20px; height: 20px; }
.cat-icon.sm { width: 32px; height: 32px; border-radius: 10px; }
.cat-icon.sm svg { width: 16px; height: 16px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; vertical-align: 1px; background: var(--surface-3); color: var(--text-2); }
.badge svg { width: 12px; height: 12px; }
.badge.income { background: var(--income-soft); color: var(--income); }
.badge.expense { background: var(--expense-soft); color: var(--expense); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }

/* ---------- Transaksi ---------- */
.tx-group + .tx-group { border-top: 1px solid var(--border); }
.tx-date { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 6px; font-size: 11.5px; font-weight: 600; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.tx-item { display: flex; align-items: center; gap: 14px; padding: 10px 22px; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; transition: background .12s; }
.tx-item:hover { background: var(--surface-3); }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amount { font-size: 14px; font-weight: 600; white-space: nowrap; text-align: right; }
.tx-amount.transfer { color: var(--info); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.filters .search { position: relative; flex: 1 1 220px; }
.filters .search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.filters .search .input { padding-left: 40px; }
.filters .select { width: auto; min-width: 150px; flex: 0 1 auto; }
.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.summary-strip > div { padding: 14px 22px; }
.summary-strip > div + div { border-left: 1px solid var(--border); }
.summary-strip .k { font-size: 12px; color: var(--text-3); }
.summary-strip .v { font-size: 17px; font-weight: 600; }

/* ---------- Anggaran ---------- */
.progress { position: relative; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); box-shadow: 0 0 12px rgba(220, 184, 114, .45); animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
.progress.warn > span { background: linear-gradient(90deg, #b07a00, var(--warning)); box-shadow: 0 0 12px rgba(243, 192, 83, .4); }
.progress.over > span { background: linear-gradient(90deg, #a83a22, var(--expense)); box-shadow: 0 0 12px rgba(255, 132, 102, .45); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.budget-list > * + * { border-top: 1px solid var(--border); }
.budget-item { display: flex; gap: 14px; align-items: center; padding: 14px 22px; }
.budget-item + .budget-item { border-top: 1px solid var(--border); }
.budget-main { flex: 1; min-width: 0; }
.budget-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.budget-name { font-weight: 600; font-size: 14px; }
.budget-meta { font-size: 12.5px; color: var(--text-3); }
.budget-meta strong { color: var(--text); font-weight: 600; }
.ring-wrap { display: flex; align-items: center; gap: 24px; }
.ring { position: relative; width: 140px; height: 140px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .ring-label b { font-family: var(--serif); font-weight: 700; font-variant-numeric: lining-nums; font-size: 30px; display: block; line-height: 1.1; }
.ring .ring-label span { font-size: 11.5px; color: var(--text-3); }
.ring-stats { display: grid; gap: 12px; flex: 1; min-width: 0; }
.ring-stats .k { font-size: 12px; color: var(--text-3); }
.ring-stats .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Donat kategori ---------- */
.donut-wrap { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut { position: relative; width: 160px; height: 160px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.donut .seg { transition: opacity .2s, stroke-width .2s; cursor: pointer; animation: sweep 1s cubic-bezier(.2, .7, .2, 1) both; }
.donut:hover .seg { opacity: .35; }
.donut .seg:hover { opacity: 1; stroke-width: 22; }
@keyframes sweep { from { stroke-dasharray: 0 999; } }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center b { font-family: var(--serif); font-weight: 700; font-variant-numeric: lining-nums; font-size: 22px; display: block; line-height: 1.2; }
.donut-center span { font-size: 11px; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.legend-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.legend-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.legend-item .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.legend-item .n small { display: block; color: var(--text-3); font-weight: 400; font-size: 11.5px; }
.legend-item .v { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--gold); font-size: 12.5px; }
.legend-item .n small { font-variant-numeric: tabular-nums; }

/* rank (laporan) */
.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-item { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; }
.rank-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.rank-top .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-top .val { color: var(--text); white-space: nowrap; font-weight: 600; }
.rank-top .val small { color: var(--text-3); margin-left: 8px; font-weight: 400; }
.rank-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rank-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--gold)); min-width: 4px; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }

/* ---------- Wawasan ---------- */
.insight-list { display: flex; flex-direction: column; padding: 8px 0 10px; }
.insight { display: flex; gap: 13px; padding: 12px 22px; align-items: flex-start; }
.insight + .insight { border-top: 1px solid var(--border); }
.insight .stat-icon { margin-top: 1px; }
.insight .i-title { font-weight: 600; font-size: 13.5px; }
.insight .i-text { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- Charts ---------- */
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; overflow: visible; }
.chart-wrap text { font-family: var(--font); }
.chart-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.chart-tooltip { position: absolute; pointer-events: none; z-index: 5; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: 12.5px; min-width: 180px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.chart-tooltip.show { opacity: 1; transform: none; }
.chart-tooltip .t-title { font-weight: 600; margin-bottom: 6px; color: var(--text); }
.chart-tooltip .t-row { display: flex; justify-content: space-between; gap: 14px; color: var(--text-2); }
.chart-tooltip .t-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tooltip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.bar-hit { fill: transparent; cursor: pointer; }
.bar-group:hover .bar-bg { fill: rgba(255, 255, 255, .04); }
.bar-group .bar { transform-box: fill-box; transform-origin: bottom; animation: barUp .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes barUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.line-path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 1.4s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes draw { from { stroke-dashoffset: 1; } }
.area-path { animation: fadeIn 1.2s ease both .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.pt { opacity: 0; transition: opacity .1s; }
.bar-group:hover .pt, .bar-group:hover .vline { opacity: 1; }
.vline { opacity: 0; }
.chart-kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.chart-kpis .k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.chart-kpis .k i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.chart-kpis .v { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 12px 22px; text-align: left; white-space: nowrap; }
.table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); border-bottom: 1px solid var(--border-strong); }
.table td { border-bottom: 1px solid var(--border); }
.table tbody tr:hover td { background: var(--surface-3); }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--gold); color: var(--gold); }

/* ---------- Dompet ---------- */
.wallet-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: border-color .2s, transform .2s; }
.wallet-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.wallet-card .w-top { display: flex; align-items: center; gap: 12px; }
.wallet-card .w-name { font-weight: 600; }
.wallet-card .w-type { font-size: 12.5px; color: var(--text-3); }
.wallet-card .w-bal { font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
.wallet-card .w-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 12px; }
.wallet-card .share { flex: 1; max-width: 120px; display: flex; align-items: center; gap: 8px; }
.wallet-card .share .progress { flex: 1; height: 5px; }
.add-card { border: 1px dashed var(--border-strong); background: transparent; box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); font-weight: 600; min-height: 170px; }
.add-card:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.add-card svg { width: 22px; height: 22px; }

/* ---------- Lists ---------- */
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 22px; }
.list-item + .list-item { border-top: 1px solid var(--border); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 14px; }
.list-item .li-sub { font-size: 12.5px; color: var(--text-3); }
a.list-item, button.list-item { color: inherit; width: 100%; border: 0; background: transparent; text-align: left; }
a.list-item:hover, button.list-item:hover { background: var(--surface-3); }
.li-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.li-icon svg { width: 18px; height: 18px; }
.chev { width: 16px; height: 16px; color: var(--text-3); flex: none; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 30px 20px; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .empty-art { width: 132px; height: 96px; margin-bottom: 8px; }
.empty h4 { color: var(--text); font-size: 15px; font-weight: 600; }
.empty p { max-width: 340px; font-size: 13.5px; }
.empty .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; opacity: 0; transition: opacity .2s; }
.modal-backdrop.show { opacity: 1; }
.modal { width: 100%; max-width: 520px; max-height: calc(100dvh - 40px); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong); display: flex; flex-direction: column; transform: translateY(14px) scale(.98); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.modal-backdrop.show .modal { transform: none; }
.modal.sm { max-width: 410px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 6px; }
.modal-head h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; }
.modal-head .icon-btn { border-color: transparent; background: transparent; }
.modal-body { padding: 12px 22px 8px; overflow-y: auto; overflow-x: hidden; }
.modal-foot { display: flex; gap: 10px; padding: 16px 22px 22px; justify-content: flex-end; }
.modal-foot .spacer { flex: 1; }

/* ---------- Onboarding ---------- */
.onboard { position: fixed; inset: 0; z-index: 150; overflow-y: auto; display: grid; place-items: center; padding: 24px; background: var(--bg); background-image: radial-gradient(800px 500px at 50% -10%, var(--gold-soft), transparent 65%); }
.ob-card { width: 100%; max-width: 460px; }
.ob-steps { display: flex; gap: 6px; margin-bottom: 28px; }
.ob-steps span { flex: 1; height: 3px; border-radius: 3px; background: var(--surface-3); }
.ob-steps span.on { background: var(--gold-grad); box-shadow: 0 0 10px var(--gold); }
.ob-hero { margin: 0 auto 28px; max-width: 340px; }
.ob-hero .pcard { transform: rotate(-4deg); }
.ob-card h2 { font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.12; letter-spacing: -0.015em; }
.ob-card .lead { color: var(--text-2); margin: 12px 0 22px; font-size: 15px; }
.ob-feats { display: grid; gap: 12px; }
.ob-feat { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.ob-feat .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.ob-feat .ic svg { width: 18px; height: 18px; }
.ob-actions { display: flex; gap: 10px; margin-top: 28px; }
.ob-actions .btn { flex: 1; }
.ob-wallet { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 170px); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ob-wallet .n { font-weight: 600; font-size: 14px; }
.ob-wallet .t { font-size: 12px; color: var(--text-3); }
.ob-wallet .input { text-align: right; }
.ob-skip { display: block; margin: 18px auto 0; border: 0; background: none; color: var(--gold); font-size: 13.5px; font-weight: 600; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; }
.toast { background: color-mix(in srgb, var(--surface-3) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); padding: 11px 16px 11px 11px; border-radius: 14px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong); display: flex; align-items: center; gap: 10px; animation: rise .25s ease both; }
.toast .t-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.toast .t-ic svg { width: 14px; height: 14px; stroke-width: 2.6; }
.toast.error .t-ic { background: var(--expense-soft); color: var(--expense); }

.install-banner { display: none; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid rgba(220, 184, 114, .25); background: linear-gradient(135deg, var(--gold-soft), transparent); font-size: 12.5px; color: var(--text-2); }
.install-banner.show { display: flex; flex-direction: column; align-items: stretch; }
.install-banner strong { color: var(--text); display: block; font-size: 13px; }

/* ---------- Aset & Portofolio ---------- */
.nw-card { padding: 22px; display: flex; flex-direction: column; gap: 18px; background-image: radial-gradient(520px 220px at 0% 0%, var(--gold-soft), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.nw-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nw-label { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.nw-amount { font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; margin-top: 6px; }
.nw-amount .cur { font-size: .5em; color: var(--text-3); margin-right: 6px; vertical-align: .45em; }
.nw-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.nw-sub b { color: var(--text-2); font-weight: 600; }
.nw-sub > span { white-space: nowrap; }
.comp-bar { display: flex; gap: 2px; height: 12px; border-radius: 99px; overflow: hidden; }
.comp-bar.empty { background: var(--surface-3); }
.comp-bar span { min-width: 4px; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
.comp-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.comp-item { position: relative; display: flex; flex-direction: column; gap: 2px; padding-left: 14px; min-width: 0; font-size: 12.5px; color: var(--text-3); }
.comp-item i { position: absolute; left: 0; top: 5px; width: 8px; height: 8px; border-radius: 3px; }
.comp-item b { color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-item .p { font-size: 11.5px; }
.asset-tabs { max-width: 560px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ticker { --c: #8a857a; width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent); }
.hold-list { padding: 4px 0 8px; }
.hold-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 96px 56px minmax(160px, auto); gap: 14px; align-items: center; width: 100%; padding: 12px 22px; border: 0; background: transparent; text-align: left; cursor: pointer; transition: background .12s; }
.hold-row + .hold-row { border-top: 1px solid var(--border); }
.hold-row:hover { background: var(--surface-3); }
.h-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-title span { font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-left: 6px; }
.h-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-col .k { font-size: 11px; color: var(--text-3); }
.h-col .v { font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.h-col .d { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.h-val { text-align: right; min-width: 0; }
.h-val .v { font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.h-val .d { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.only-narrow { display: none; }
.sold-list { border-top: 1px solid var(--border); padding: 4px 0 8px; }
.a-gain { font-size: 12px; font-weight: 500; }
.asset-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 22px 0; padding: 10px 14px; border-radius: 12px; background: var(--income-soft); color: var(--text-2); font-size: 13px; }
.asset-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--income); }
.asset-note.warn { background: var(--warning-soft); }
.asset-note.warn svg { color: var(--warning); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-grid > div { padding: 12px 14px; border-radius: 14px; background: var(--surface-3); min-width: 0; }
.detail-grid .k { font-size: 11.5px; color: var(--text-3); }
.detail-grid .v { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-grid .d { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-grid .d:not(.pos):not(.neg) { color: var(--text-3); }
.sd-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sd-hist { max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 14px; }
.sd-hist .tx-item { padding: 10px 14px; }
.sd-hist .tx-item + .tx-item { border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .nw-card { padding: 18px; }
  .nw-amount { font-size: 32px; }
  .comp-legend { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .comp-item { flex-direction: row; align-items: baseline; gap: 8px; }
  .comp-item .n { flex: 1; }
  .comp-item i { top: 4px; }
  .hold-row { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 12px 16px; gap: 12px; }
  .hide-narrow { display: none; }
  .h-title span { display: none; }
  .only-narrow { display: inline; }
  .asset-tabs { max-width: none; }
  .asset-tabs button { font-size: 12.5px; }
  .asset-note { margin: 12px 16px 0; }
}


/* ---------- Beranda v1.6 (hero saldo, aksi cepat bulat, aset terbesar) ---------- */
.show-mobile { display: none; }
.dash-hero {
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 26px 28px;
  position: relative; overflow: hidden;
  background: radial-gradient(620px 280px at 0% 0%, var(--gold-soft), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--glow-gold), var(--shadow);
}
:root[data-theme="light"] .dash-hero { background: radial-gradient(520px 260px at 100% 100%, rgba(70, 196, 136, .16), transparent 70%), linear-gradient(135deg, #e8f6ee 0%, #ffffff 65%); }
:root[data-theme="wealth"] .dash-hero { background: radial-gradient(700px 300px at 100% 0%, rgba(34, 211, 238, .14), transparent 60%), linear-gradient(160deg, #10293b, #0a1a27); }
.dh-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.dh-label .eye { border: 0; background: var(--surface-3); color: var(--text-3); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.dh-label .eye:hover { color: var(--gold); }
.dh-label .eye svg { width: 14px; height: 14px; }
.dh-amount {
  font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.1; margin: 10px 0 8px; white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .dh-amount { background: none; color: var(--text); }
.dh-amount.neg { background: none; color: var(--expense); }
.dh-amount .cur { font-size: .5em; margin-right: 6px; vertical-align: .55em; opacity: .75; }
.delta { font-size: 13px; font-weight: 600; }
.dh-split { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.dh-split b { color: var(--text); font-weight: 700; margin-left: 4px; }
.dh-chart { min-width: 0; }
.quick-round { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.quick-round > * { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--text-2); font-size: 11.5px; font-weight: 600; padding: 0; }
.qr-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); }
.qr-ic svg { width: 21px; height: 21px; }
.qr-main { background: var(--gold-grad); color: var(--on-primary); border: 0; box-shadow: var(--glow-gold); }
.big-list { display: flex; flex-direction: column; }
.big-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.big-row:last-child { border-bottom: 0; }
.bg-main { flex: 1; min-width: 0; }
.bg-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-sub { font-size: 12px; color: var(--text-3); }
.bg-pct { font-weight: 700; color: var(--gold); }
.inv-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.inv-figs .k { font-size: 12px; color: var(--text-3); }
.inv-figs .v { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.inv-figs small { font-size: 12px; font-weight: 600; }


/* ---------- Target Tabungan (v1.7) ---------- */
.progress.done > span { background: linear-gradient(90deg, var(--income), color-mix(in srgb, var(--income) 55%, #fff)); box-shadow: 0 0 12px color-mix(in srgb, var(--income) 45%, transparent); }
.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.goal-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.goal-card.is-done { box-shadow: 0 0 0 1px color-mix(in srgb, var(--income) 35%, transparent), var(--shadow); }
.goal-head { display: flex; align-items: center; gap: 12px; }
.goal-title { flex: 1; min-width: 0; }
.goal-title h3 { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-title .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.goal-head .icon-btn { width: 34px; height: 34px; }
.goal-amt { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-family: var(--serif); font-weight: 600; font-size: 28px; font-variant-numeric: lining-nums tabular-nums; }
.goal-amt .cur { font-size: .55em; margin-right: 4px; opacity: .7; }
.goal-amt small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--text-3); }
.goal-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.goal-meta > .num { font-weight: 700; color: var(--gold); flex: none; }
.goal-meta b { color: var(--text); font-weight: 700; }
.goal-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.goal-mini { display: flex; flex-direction: column; gap: 4px; }
.gm-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border: 0; background: transparent; text-align: left; color: inherit; width: 100%; }
.gm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gm-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.gm-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-pct { font-weight: 700; color: var(--gold); }
.gm-sub { font-size: 12px; color: var(--text-3); }
.icon-pick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.icon-pick button { height: 40px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text-3); display: grid; place-items: center; }
.icon-pick button svg { width: 18px; height: 18px; }
.icon-pick button.active { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.goal-mini-head { display: flex; align-items: center; gap: 12px; }
.gd-hist { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; max-height: 210px; overflow: auto; }
.gd-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--border); }
.gd-row:last-child { border-bottom: 0; }
.gd-row .num { font-weight: 700; flex: none; }
.gd-row .muted { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-del { border: 0; background: transparent; color: var(--text-3); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.gd-del:hover { color: var(--expense); background: var(--expense-soft); }
.gd-del svg { width: 14px; height: 14px; }
@media (max-width: 860px) {
  .goal-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .goal-card { padding: 18px; }
  .goal-amt { font-size: 24px; }
}

/* ---------- Aktivasi ---------- */
.is-locked .app, .is-locked .bottom-nav, .is-locked .fab { visibility: hidden; }
.act-card { text-align: left; }
.act-logo { display: block; width: 64px; height: 64px; border-radius: 18px; margin-bottom: 26px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35), 0 0 28px var(--gold-soft); }
.act-input { height: 56px; font-size: 20px; font-weight: 700; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.act-input::placeholder { letter-spacing: .14em; font-weight: 500; }
.act-err { min-height: 20px; margin: 10px 0 0; font-size: 13px; color: var(--expense); }
#actForm .ob-actions { margin-top: 14px; }

/* ---------- Mode demo ---------- */
.demo-bar {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; font-size: 13px; color: #1b1407; background: var(--gold-grad); text-align: center;
}
.demo-bar .btn-primary { background: #1b1407; color: #f7e4b5; box-shadow: none; height: 30px; }
.is-demo .sidebar { top: var(--demo-h, 0); }
.is-demo .mobile-header { top: var(--demo-h, 0); }
@media (max-width: 860px) {
  .demo-bar { flex-wrap: nowrap; justify-content: space-between; padding: 7px 16px; }
  .demo-long { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  .fig .ic { width: 36px; height: 36px; border-radius: 11px; }
  .fig .ic svg { width: 17px; height: 17px; }
  .fig .v { font-size: 16px; }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .legend-list { width: 100%; }
}
@media (max-width: 1340px) and (min-width: 1181px) {
  .fig .ic { display: none; }
  .hero-row { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
}
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .hero-row { grid-template-columns: minmax(0, 1fr); }
  .hero-row .pcard { max-width: 460px; width: 100%; justify-self: center; }
  .dash-hero { grid-template-columns: minmax(0, 290px) minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 0 16px calc(100px + env(safe-area-inset-bottom)); }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 15; margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
  .mobile-header .mh-left { display: flex; align-items: center; gap: 10px; color: inherit; }
  .mobile-header .brand-logo { width: 30px; height: 30px; border-radius: 9px; }
  .mobile-header .brand-name { font-size: 20px; }
  .mh-actions { display: flex; gap: 8px; }
  #mobileMoreBtn.active { color: var(--gold); border-color: var(--gold); }
  .show-mobile { display: grid; }
  .dash-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 4px; }
  .dh-amount { font-size: 34px; }
  .inv-figs .v { font-size: 15px; }
  .grid.stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row .stat:last-child { grid-column: 1 / -1; }
  .stat-row .stat-value { font-size: 16px; }
  .topbar { padding: 20px 0 16px; }
  .topbar h1 { font-size: 27px; }
  .topbar-actions { width: 100%; }
  .topbar-actions .month-switch { flex: 1; justify-content: space-between; }
  .topbar-actions .month-switch .label { flex: 1; }
  .hide-mobile { display: none !important; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 .stat:nth-child(odd):last-child { grid-column: 1 / -1; }
  .grid { gap: 14px; }
  .mt { margin-top: 14px; }
  .pcard { padding: 20px; border-radius: 20px; }
  .pcard-amount { font-size: 34px; }
  .flow { padding: 18px; }
  .flow-figs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fig { justify-content: flex-start; }
  .fig .v { font-size: 17px; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
  .qa { flex-direction: column; text-align: center; padding: 12px 4px; gap: 7px; border-radius: 14px; }
  .qa span { display: none; }
  .qa b { font-size: 11.5px; font-weight: 600; }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut { width: 180px; height: 180px; }
  .chart-kpis { gap: 10px 22px; }
  .chart-kpis .v { font-size: 15px; }
  .legend-list { width: 100%; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 17px; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .tx-item, .budget-item, .list-item, .insight { padding-left: 16px; padding-right: 16px; }
  .tx-date { padding-left: 16px; padding-right: 16px; }
  .filters { padding: 12px 16px; }
  .filters .select { flex: 1 1 40%; min-width: 0; }
  .summary-strip > div { padding: 10px 12px; min-width: 0; }
  .summary-strip .v { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .table th, .table td { padding: 10px 14px; }
  .ring { width: 116px; height: 116px; }
  .ring .ring-label b { font-size: 28px; }

  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; background: color-mix(in srgb, var(--surface-2) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-strong); border-radius: 22px; padding: 6px; box-shadow: var(--shadow-lg); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); height: 52px; border: 0; background: transparent; border-radius: 16px; }
  .bottom-nav a svg { width: 21px; height: 21px; stroke-width: 1.8; }
  .bottom-nav a.active { color: var(--gold); }
  .bottom-nav .nav-add span { width: 48px; height: 48px; border-radius: 16px; background: var(--gold-grad); color: var(--on-primary); display: grid; place-items: center; box-shadow: 0 8px 24px -6px color-mix(in srgb, var(--gold) 70%, transparent); }
  .bottom-nav .nav-add svg { width: 22px; height: 22px; stroke-width: 2.4; }

  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 24px 24px 0 0; max-height: 94dvh; transform: translateY(40px); }
  .modal-head { position: relative; padding-top: 24px; }
  .modal-head::before { content: ""; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); }
  .modal-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .toast-wrap { bottom: calc(96px + env(safe-area-inset-bottom)); width: calc(100% - 32px); align-items: center; }
  .ob-card h2 { font-size: 30px; }
  .ob-wallet { grid-template-columns: 42px minmax(0, 1fr) minmax(0, 130px); }
}
@media (max-width: 380px) {
  .summary-strip .v { font-size: 12.5px; }
  .summary-strip > div { padding: 10px 8px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .pcard-amount { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .bottom-nav, .mobile-header, .topbar-actions, .filters { display: none !important; }
  .main { margin: 0; padding: 0; }
  .card { break-inside: avoid; }
}
