/* =========================================================
   CatatAja — styles.css
   Palet: Pine (hijau tua merek), Marigold (aksen mic), Leaf (masuk),
   Chili (keluar). Font: Plus Jakarta Sans.
   ========================================================= */
:root {
  --pine: #0E3B2E;
  --pine-2: #17543F;
  --pine-3: #23705A;
  --marigold: #F2B33D;
  --marigold-deep: #C98A12;
  --leaf: #1A8754;
  --chili: #CF4330;
  --sky: #2F6FD0;

  --paper: #F2F5F2;
  --surface: #FFFFFF;
  --surface-2: #E9EFEA;
  --ink: #13201A;
  --ink-2: #56665D;
  --ink-3: #8A988F;
  --line: #DFE7E1;
  --focus: #2F6FD0;
  --shadow: 0 1px 2px rgba(14, 59, 46, .06), 0 8px 24px -12px rgba(14, 59, 46, .18);

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
body.dark {
  --paper: #0C1411;
  --surface: #141F1A;
  --surface-2: #1C2A23;
  --ink: #EAF1EC;
  --ink-2: #A3B4AA;
  --ink-3: #6E8277;
  --line: #24342C;
  --leaf: #3DB27A;
  --chili: #EC6A55;
  --sky: #6C9BE6;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 24px -14px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--paper);
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}
@media (min-width: 520px) { body { background: #DCE4DE; } body.dark { background: #070C0A; } }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--paper); position: relative; }

/* =================== OVERLAY SCREENS (auth, paywall, PIN) =================== */
.screen {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: var(--pine); color: #EEF5F0;
  display: flex; justify-content: center;
}
.screen-inner { width: 100%; max-width: 480px; min-height: 100%; padding: calc(36px + env(safe-area-inset-top, 0px)) 24px calc(32px + var(--safe-b)); display: flex; flex-direction: column; }
.screen .brandmark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brandmark .bm-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--marigold); display: grid; place-items: center; color: var(--pine); }
.brandmark .bm-icon svg { width: 19px; height: 19px; stroke-width: 2.4; }
.screen h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; margin: 28px 0 10px; }
.screen h2 { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; margin: 26px 0 8px; }
.screen .lead { font-size: 15.5px; color: #B9CEC2; max-width: 36ch; }
.screen .spacer { flex: 1; min-height: 24px; }
.screen .field { margin-top: 14px; }
.screen label { display: block; font-size: 13.5px; font-weight: 600; color: #CFE0D6; margin-bottom: 7px; }
.screen input {
  width: 100%; padding: 15px 16px; border-radius: 14px; font-size: 16px;
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.14); color: #fff; outline: none;
}
.screen input::placeholder { color: rgba(238,245,240,.4); }
.screen input:focus { border-color: var(--marigold); }
.screen input[readonly] { opacity: .75; }
.btn-primary {
  width: 100%; padding: 16px; border-radius: 16px; font-weight: 800; font-size: 16px;
  background: var(--marigold); color: #2B1D02; display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 24px -10px rgba(242,179,61,.6);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .6; }
.btn-ghost {
  width: 100%; padding: 15px; border-radius: 16px; font-weight: 700; font-size: 15px;
  border: 1.5px solid rgba(255,255,255,.2); color: #EEF5F0; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-link { color: #EEF5F0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: 14.5px; padding: 6px 2px; }
.screen .msg { min-height: 20px; margin-top: 12px; font-size: 14px; text-align: center; color: #FFB4A6; }
.screen .msg.ok { color: #9BE3BC; }
.screen .fine { font-size: 13px; color: #9DB5A8; text-align: center; margin-top: 14px; line-height: 1.55; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row-center { display: flex; justify-content: center; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-size: 14.5px; color: #B9CEC2; }

/* Welcome: demo kalimat suara sebagai elemen utama */
.voice-demo { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.vd-bubble { align-self: flex-start; background: rgba(255,255,255,.08); border-radius: 18px 18px 18px 6px; padding: 12px 15px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.vd-bubble svg { color: var(--marigold); width: 18px; height: 18px; }
.vd-result { align-self: flex-end; background: #F7FAF8; color: var(--ink); border-radius: 18px 18px 6px 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; min-width: 70%; }
.vd-result .vd-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #FCEBDD; color: #D0661C; }
.vd-result .vd-t { font-weight: 700; font-size: 14.5px; }
.vd-result .vd-m { font-size: 13px; color: #56665D; }
.vd-result .vd-a { margin-left: auto; font-weight: 800; color: #CF4330; }
.perks { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: #DCE9E1; }
.perks li svg { color: var(--marigold); margin-top: 1px; }

/* Paywall */
.price-card { margin-top: 22px; border-radius: 22px; background: #F7FAF8; color: var(--ink); padding: 20px; }
.price-row { display: flex; align-items: baseline; gap: 10px; }
.price-big { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.price-strike { color: #8A988F; text-decoration: line-through; font-size: 15px; }
.price-note { font-size: 14px; color: #56665D; margin-top: 2px; }
.price-card ul { list-style: none; margin-top: 14px; display: grid; gap: 9px; }
.price-card li { display: flex; gap: 10px; font-size: 14.5px; }
.price-card li svg { color: var(--leaf); width: 18px; height: 18px; margin-top: 1px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pay-methods span { font-size: 12.5px; font-weight: 700; padding: 5px 9px; border-radius: 8px; background: #E9EFEA; color: #3E4D45; }

/* Payment status */
.status-orb { width: 84px; height: 84px; border-radius: 50%; margin: 34px auto 4px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--marigold); }
.status-orb svg { width: 38px; height: 38px; }
.status-orb.spin svg { animation: spin 1.1s linear infinite; }
.status-orb.ok { background: var(--marigold); color: var(--pine); }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
.screen .center .lead { margin: 0 auto; }

/* PIN */
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 30px 0 34px; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); transition: background .12s, border-color .12s; }
.pin-dot.filled { background: var(--marigold); border-color: var(--marigold); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; max-width: 290px; margin: 0 auto; }
.key { aspect-ratio: 1.15; border-radius: 22px; background: rgba(255,255,255,.07); color: #fff; font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.key:active { background: rgba(255,255,255,.18); }
.key.ghost { background: none; pointer-events: none; }
.key svg { width: 24px; height: 24px; }

/* Onboarding */
.ob-dots { display: flex; gap: 6px; margin-top: 22px; }
.ob-dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.22); transition: width .2s; }
.ob-dot.active { width: 26px; background: var(--marigold); }
.ob-icon { width: 76px; height: 76px; border-radius: 24px; background: rgba(242,179,61,.16); color: var(--marigold); display: grid; place-items: center; margin-top: 46px; }
.ob-icon svg { width: 36px; height: 36px; }

/* =================== APP =================== */
#app { display: none; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
#app.ready { display: block; }

.topbar { display: flex; align-items: center; gap: 10px; padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 6px; }
.hello { flex: 1; min-width: 0; }
.hello-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 2px 0; }
.wallet-chip svg { width: 15px; height: 15px; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); }
.avatar { width: 42px; height: 42px; border-radius: 14px; background: var(--pine); color: var(--marigold); font-weight: 800; font-size: 15px; display: grid; place-items: center; }

.view { display: none; padding: 8px 20px 20px; }
.view.active { display: block; }
.view-head { display: flex; align-items: center; gap: 10px; padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 4px; }
.view-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; flex: 1; }
.back-btn { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); }

/* Hero saldo */
.hero {
  margin-top: 12px; border-radius: 26px; padding: 20px 20px 16px; color: #F0F6F2; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, var(--pine-3) 0%, transparent 55%), var(--pine);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-label { font-size: 14.5px; color: #B9D2C4; font-weight: 600; }
.eye-btn { width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.08); color: #DDEBE3; display: grid; place-items: center; }
.eye-btn svg { width: 18px; height: 18px; }
.hero-balance { font-size: 38px; line-height: 1.1; margin: 6px 0 6px; letter-spacing: -0.035em; font-weight: 800; }
.hero-delta { font-size: 13.5px; color: #9FD8B8; display: flex; align-items: center; gap: 5px; }
.hero-delta.neg { color: #FFB4A6; }
.hero-delta svg { width: 15px; height: 15px; }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hero-cell { background: rgba(255,255,255,.07); border-radius: 16px; padding: 11px 13px; }
.hero-cell .hc-l { font-size: 13px; color: #B9D2C4; display: flex; align-items: center; gap: 6px; }
.hero-cell .hc-l svg { width: 15px; height: 15px; }
.hero-cell.in .hc-l svg { color: #7FE0AA; }
.hero-cell.out .hc-l svg { color: #FF9F8C; }
.hero-cell .hc-v { font-size: 16.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-top: 14px; }
.seg button { flex: 1; padding: 9px 0; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.action { background: var(--surface); border-radius: var(--r-md); padding: 13px 8px 11px; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); }
.action .a-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }

.banner { margin-top: 14px; border-radius: var(--r-md); padding: 13px 14px; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.banner.trial { background: #FFF4DC; color: #5C4108; }
body.dark .banner.trial { background: #2E2412; color: #F6D28A; }
.banner.warn { background: #FDE9E5; color: #7A2214; }
body.dark .banner.warn { background: #34190F; color: #FFB4A6; }
.banner b { font-weight: 800; }
.banner .b-cta { margin-left: auto; font-weight: 800; padding: 8px 12px; border-radius: 11px; background: var(--pine); color: var(--marigold); white-space: nowrap; font-size: 13.5px; }

.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.section-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.section-head .link { font-size: 14px; font-weight: 700; color: var(--pine-3); }
body.dark .section-head .link { color: #7FD0A8; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 6px 16px; box-shadow: var(--shadow); }
.card.pad { padding: 16px; }
.empty { text-align: center; color: var(--ink-2); font-size: 14.5px; padding: 26px 12px; }
.empty svg { width: 34px; height: 34px; color: var(--ink-3); margin-bottom: 8px; }

/* Baris transaksi */
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.tx:last-child { border-bottom: none; }
.cat-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font-size: 19px; }
.cat-ico svg { width: 20px; height: 20px; }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.tx-amt { font-size: 15px; white-space: nowrap; }
.tx-amt.in { color: var(--leaf); }
.tx-amt.out { color: var(--ink); }
.day-head { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding: 14px 2px 4px; }

/* Kategori bars */
.catbar { padding: 11px 0; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.catbar:last-child { border-bottom: none; }
.catbar .cb-body { flex: 1; min-width: 0; }
.catbar .cb-top { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; margin-bottom: 7px; gap: 8px; }
.catbar .cb-top span:last-child { color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.track { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.fill { height: 100%; border-radius: 5px; }

/* Laporan */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.month-nav button { width: 40px; height: 40px; border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; }
.month-nav button[disabled] { opacity: .35; }
.month-nav .mn-label { font-weight: 800; font-size: 17px; }
.stat3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat3 > div:last-child { grid-column: span 2; display: flex; justify-content: space-between; align-items: baseline; }
.stat3 > div { background: var(--surface); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat3 .s-l { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.stat3 .s-v { font-size: 17px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-wrap { display: flex; gap: 16px; align-items: center; }
.donut-wrap svg.donut { width: 132px; height: 132px; flex-shrink: 0; }
.legend { flex: 1; min-width: 0; display: grid; gap: 8px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend span:last-child { color: var(--ink-2); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar { width: 42%; max-width: 16px; border-radius: 5px 5px 2px 2px; min-height: 3px; }
.bar.in { background: var(--leaf); opacity: .85; }
.bar.out { background: var(--chili); }
.bar-col.dim .bar { opacity: .35; }
.bar-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.bar-col.sel .bar-label { color: var(--ink); font-weight: 800; }
.chart-legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.insight { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.insight:last-child { border-bottom: none; }
.insight svg { color: var(--marigold-deep); margin-top: 1px; }
.budget { padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; display: block; }
.budget:last-child { border-bottom: none; }
.budget .bd-top { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; gap: 8px; }
.budget .bd-name { display: flex; align-items: center; gap: 9px; }
.budget .bd-name .cat-ico { width: 32px; height: 32px; border-radius: 10px; }
.budget .bd-name .cat-ico svg { width: 16px; height: 16px; }
.budget .bd-amt { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.budget .bd-warn { font-size: 13px; font-weight: 700; margin-top: 6px; }

.btn-soft { width: 100%; padding: 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; color: var(--ink); }
.btn-soft.wa { color: #0F7A3E; }
body.dark .btn-soft.wa { color: #5BD58C; }
.btn-dashed { width: 100%; padding: 14px; border-radius: var(--r-md); border: 1.5px dashed var(--line); font-weight: 700; font-size: 15px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }

/* Tabungan */
.goal { background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.goal-top { display: flex; align-items: center; gap: 12px; }
.goal-emoji { width: 46px; height: 46px; border-radius: 15px; background: #FFF4DC; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
body.dark .goal-emoji { background: #2E2412; }
.goal-name { font-weight: 700; font-size: 15.5px; }
.goal-sub { font-size: 13px; color: var(--ink-2); }
.goal-pct { margin-left: auto; font-size: 18px; font-weight: 800; color: var(--leaf); }
.goal .track { height: 10px; margin: 14px 0 8px; }
.goal .fill { background: linear-gradient(90deg, var(--leaf), #39B57A); }
.goal-amts { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.goal-amts b { color: var(--ink); }
.goal-btns { display: flex; gap: 8px; margin-top: 12px; }
.goal-btns button { flex: 1; padding: 10px; border-radius: 12px; background: var(--surface-2); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.goal-btns button svg { width: 17px; height: 17px; }
.goal-btns button.primary { background: var(--pine); color: var(--marigold); }
.goal-eta { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

/* Lainnya (menu) */
.menu-group { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-top: 14px; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 13px; padding: 14px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.menu-item:last-child { border-bottom: none; }
.menu-item .mi-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--pine-3); }
body.dark .menu-item .mi-ico { color: #7FD0A8; }
.menu-item .mi-body { flex: 1; min-width: 0; }
.menu-item .mi-sub { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.menu-item .mi-right { color: var(--ink-3); }
.menu-item.danger { color: var(--chili); }
.menu-item.danger .mi-ico { color: var(--chili); }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { background: var(--leaf); }
.switch.on::after { transform: translateX(18px); }
.plan-card { margin-top: 12px; border-radius: var(--r-lg); padding: 16px; background: var(--pine); color: #EEF5F0; display: flex; align-items: center; gap: 14px; }
.plan-card .pc-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--marigold); color: var(--pine); display: grid; place-items: center; }
.plan-card .pc-t { font-weight: 800; font-size: 16px; }
.plan-card .pc-s { font-size: 13.5px; color: #B9D2C4; }
.plan-card .b-cta { margin-left: auto; font-weight: 800; padding: 9px 13px; border-radius: 12px; background: var(--marigold); color: #2B1D02; font-size: 14px; white-space: nowrap; }
.app-version { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 18px; }

/* Investasi & utang */
.dark-card { border-radius: 24px; padding: 18px 20px; color: #EEF5F0; background: radial-gradient(120% 90% at 100% 0%, #2B4E7A 0%, transparent 60%), #16263B; margin-top: 10px; }
.dark-card .dc-l { font-size: 14px; color: #B8C8DC; font-weight: 600; }
.dark-card .dc-v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; }
.dark-card .dc-s { font-size: 13.5px; color: #8FE0B2; margin-top: 4px; }
.dark-card .dc-s.neg { color: #FFB4A6; }
.caption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.debt-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.debt-sum > div { border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow); background: var(--surface); }
.debt-sum .ds-l { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.debt-sum .ds-v { font-size: 18px; margin-top: 2px; }
.pill { font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); }
.pill.ok { background: #DDF3E6; color: #11643D; }
body.dark .pill.ok { background: #143726; color: #7FE0AA; }
.pill.late { background: #FDE9E5; color: #A32A18; }
.tabs2 { display: flex; gap: 8px; margin-top: 16px; }
.tabs2 button { padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2); }
.tabs2 button.active { background: var(--pine); color: var(--marigold); }

/* Semua transaksi */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 15px; padding: 0 14px; box-shadow: var(--shadow); margin-top: 10px; }
.search svg { color: var(--ink-3); }
.search input { flex: 1; border: none; outline: none; background: none; padding: 14px 0; font-size: 15.5px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }

/* =================== NAV + MIC =================== */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 480px; margin: 0 auto;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); height: 100%; justify-content: center; }
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--ink); }
.nav-item.active svg { color: var(--pine-3); stroke-width: 2.3; }
body.dark .nav-item.active svg { color: var(--marigold); }
.mic-slot { position: relative; height: 100%; display: flex; justify-content: center; }
.mic-btn {
  position: absolute; top: -24px; width: 70px; height: 70px; border-radius: 50%;
  background: var(--marigold); color: #2B1D02; display: grid; place-items: center;
  box-shadow: 0 0 0 6px var(--paper), 0 14px 28px -8px rgba(201,138,18,.7);
  transition: transform .12s;
}
.mic-btn svg { width: 30px; height: 30px; stroke-width: 2.2; }
.mic-btn:active { transform: scale(.94); }
.mic-btn.listening { background: var(--chili); color: #fff; }

/* Panel mendengarkan */
.listen {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-width: 480px; margin: 0 auto;
  background: var(--pine); color: #EEF5F0; border-radius: 28px 28px 0 0;
  padding: 22px 22px calc(24px + var(--safe-b)); transform: translateY(105%); visibility: hidden;
  transition: transform .28s cubic-bezier(.32,.72,0,1), visibility 0s linear .28s;
}
.listen.open { transform: translateY(0); visibility: visible; transition-delay: 0s; }
.listen-head { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; color: #B9D2C4; font-weight: 600; }
.listen-head button { color: #DDEBE3; width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.wave { display: flex; gap: 5px; align-items: center; height: 54px; margin: 16px 0 6px; justify-content: center; }
.wave span { width: 6px; border-radius: 3px; background: var(--marigold); height: 10px; animation: wave 1s ease-in-out infinite; }
.wave span:nth-child(2) { animation-delay: .1s } .wave span:nth-child(3) { animation-delay: .2s }
.wave span:nth-child(4) { animation-delay: .3s } .wave span:nth-child(5) { animation-delay: .4s }
.wave span:nth-child(6) { animation-delay: .5s } .wave span:nth-child(7) { animation-delay: .6s }
@keyframes wave { 0%,100% { height: 10px } 50% { height: 46px } }
.listen.idle .wave span { animation: none; height: 8px; opacity: .5; }
.transcript { min-height: 56px; font-size: 20px; font-weight: 700; text-align: center; line-height: 1.35; letter-spacing: -0.01em; }
.transcript.placeholder { color: rgba(238,245,240,.45); font-weight: 600; font-size: 17px; }
.listen-hint { text-align: center; font-size: 13.5px; color: #9DB5A8; margin-top: 10px; }
.listen-stop { margin: 16px auto 0; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; border-radius: 16px; background: var(--marigold); color: #2B1D02; font-weight: 800; font-size: 15.5px; }

/* =================== SHEETS =================== */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(8, 20, 15, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 480px; margin: 0 auto;
  background: var(--paper); border-radius: 28px 28px 0 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(24px + var(--safe-b)); transform: translateY(105%); visibility: hidden;
  transition: transform .3s cubic-bezier(.32,.72,0,1), visibility 0s linear .3s;
}
.sheet.open { transform: translateY(0); visibility: visible; transition-delay: 0s; }
.grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.x-btn { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; }
.x-btn svg { width: 18px; height: 18px; }
.type-toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.type-toggle button { padding: 11px 0; border-radius: 11px; font-weight: 700; font-size: 15px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 7px; }
.type-toggle button svg { width: 17px; height: 17px; }
.type-toggle button.active.out { background: var(--surface); color: var(--chili); box-shadow: var(--shadow); }
.type-toggle button.active.in { background: var(--surface); color: var(--leaf); box-shadow: var(--shadow); }
.amount-box { background: var(--surface); border-radius: 20px; padding: 14px 16px; display: flex; align-items: baseline; gap: 8px; box-shadow: var(--shadow); margin-bottom: 8px; }
.amount-box span { font-size: 20px; font-weight: 700; color: var(--ink-3); }
.amount-box input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.amount-words { font-size: 13px; color: var(--ink-2); min-height: 18px; margin: 0 4px 12px; }
.quick-amts { display: flex; gap: 8px; overflow-x: auto; margin: -4px 0 16px; scrollbar-width: none; }
.quick-amts::-webkit-scrollbar { display: none; }
.quick-amts button, .chip { padding: 9px 13px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.chip.active { border-color: var(--pine-3); background: #E2F2E9; color: #0E3B2E; }
body.dark .chip.active { background: #173A2C; color: #CFF2DE; border-color: #3DB27A; }
.chip .cat-ico { width: 24px; height: 24px; border-radius: 8px; font-size: 13px; }
.chip .cat-ico svg { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.f-label { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; display: block; }
.f-row { margin-bottom: 16px; }
.input { width: 100%; padding: 14px 15px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 16px; outline: none; }
.input:focus { border-color: var(--pine-3); }
textarea.input { resize: none; }
.f-msg { color: var(--chili); font-size: 14px; min-height: 20px; text-align: center; margin: -4px 0 8px; }
.btn-save { width: 100%; padding: 16px; border-radius: 16px; background: var(--pine); color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
body.dark .btn-save { background: var(--marigold); color: #2B1D02; }
.btn-del { width: 100%; padding: 14px; margin-top: 8px; font-weight: 700; color: var(--chili); font-size: 15px; }
.scan-assist { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 16px; padding: 10px; margin-bottom: 14px; box-shadow: var(--shadow); }
.scan-assist img { width: 56px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.scan-assist .sa-t { font-size: 13.5px; color: var(--ink-2); margin-bottom: 7px; }
.scan-assist .chips { margin-bottom: 0; gap: 6px; }
.scan-assist .chip { padding: 6px 10px; font-size: 13.5px; }
.batch-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.batch-item input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--leaf); flex-shrink: 0; }
.batch-item .tx-main { cursor: pointer; }
.heard { background: var(--surface-2); border-radius: 14px; padding: 10px 13px; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; display: flex; gap: 8px; }
.heard svg { width: 17px; height: 17px; margin-top: 1px; flex-shrink: 0; }
.emoji-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.emoji-grid button { width: 46px; height: 46px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-size: 21px; }
.emoji-grid button.active { border-color: var(--pine-3); background: #E2F2E9; }
body.dark .emoji-grid button.active { background: #173A2C; }
.hist { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.hist:last-child { border-bottom: none; }
.hist .h-r { display: flex; gap: 8px; align-items: center; }
.mini { width: 34px; height: 34px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.mini svg { width: 16px; height: 16px; }
.mini.danger { color: var(--chili); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 30px); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: #13201A; color: #EEF5F0; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; font-weight: 600;
  display: flex; gap: 14px; align-items: center; width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 12px 30px -10px rgba(0,0,0,.45);
}
body.dark .toast { background: #EAF1EC; color: #13201A; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: var(--marigold); font-weight: 800; }
body.dark .toast button { color: #8A5B00; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Sheet ajakan beli (mode demo) */
.demo-what { font-size: 15px; color: var(--ink-2); margin: -6px 0 14px; }
.demo-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.demo-price .money { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.demo-price span:last-child { font-size: 14px; color: var(--ink-2); }
.demo-list { list-style: none; display: grid; gap: 9px; margin-bottom: 18px; }
.demo-list li { display: flex; gap: 10px; font-size: 14.5px; }
.demo-list svg { color: var(--leaf); width: 18px; height: 18px; margin-top: 1px; }
