/* Keuma app: "Kuning hangat, navy tegas" (design: Keuma — Eksplorasi Logo Maskot).
   Krem 50% · Kuning 25% · Navy 15% · Toska and Koral as accents. One typeface: Plus Jakarta Sans. */

@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/PlusJakartaSans-Medium.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/PlusJakartaSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/PlusJakartaSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/PlusJakartaSans-ExtraBold.ttf") format("truetype"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #1D2846;       /* Navy Malam: mascot, wordmark, main text */
  --navy-deep: #0E1529;
  --yellow: #FFC83D;     /* Kuning Kuma: main color, primary buttons, the allowance card */
  --cream: #FFF6E0;      /* Krem Susu: app background */
  --cream-deep: #F6EBCD; /* tracks and hovers on cream */
  --teal: #0B7A73;       /* Toska: income and savings (white text) */
  --teal-soft: #DDF1EE;
  --coral: #FF7A4D;      /* Koral: spending and warnings (navy text) */
  --coral-soft: #FFE6DB;
  --white: #FFFFFF;
  --text-2: #4A5470;     /* secondary text */
  --text-3: #6B7286;     /* placeholders, times */
  --on-yellow: #3A3F52;
  --line: #EADFC4;       /* hairlines and outlines */
  --danger: #B42318;
  /* old names, kept so every screen picks up the new palette */
  --ink: var(--navy);
  --paper: var(--cream);
  --orange: var(--coral);
  --blue: var(--teal-soft);
  --pink: var(--coral-soft);
  --muted: var(--text-2);
  --faint: var(--text-3);
  --display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; /* aligned tables in replies only */
  --shadow: 0 1px 2px rgba(29, 40, 70, .05), 0 4px 14px rgba(29, 40, 70, .05);
  --nav-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #F3E8C9;
  color: var(--navy);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
a:hover { color: var(--navy-deep); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: relative; max-width: 480px; min-height: 100%; margin: 0 auto; background: var(--cream); }
@media (min-width: 481px) { .app { box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgba(29, 40, 70, .08); } }
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); }
.boot img { border-radius: 18px; }
.noscript { padding: 24px; text-align: center; }

/* ---------- brand */
.kuma { flex: none; display: block; }
.lockup { display: flex; align-items: center; gap: 10px; }
.lockup svg:last-child { margin-top: 3px; }

/* ---------- screens & nav */
.screen { padding: 20px 20px calc(var(--nav-h) + 28px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.screen.chat { padding: 0; height: calc(100vh - var(--nav-h) - var(--safe-b)); height: calc(100dvh - var(--nav-h) - var(--safe-b)); gap: 0; }
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 8px 10px calc(8px + var(--safe-b));
  background: var(--white); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 18px; text-decoration: none; color: var(--text-2);
  font-size: 12px; font-weight: 700;
}
.nav a[aria-current="page"] { background: var(--yellow); color: var(--navy); }

/* ---------- type */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.label { font-size: 14px; font-weight: 700; color: var(--text-2); }
.h1 { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.h2 { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; margin: 0; }
.big { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.mono { font-variant-numeric: tabular-nums; font-weight: 600; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 8px 0 -4px; }

/* ---------- surfaces */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 16px 18px; }
.card.yellow { background: var(--yellow); border-color: transparent; }
.card.yellow .label, .card.yellow .muted { color: var(--on-yellow); }
.card.teal { background: var(--teal); border-color: transparent; color: var(--white); }
.card.teal .label, .card.teal .muted, .card.teal .small { color: #E4F4F2; }
.card.dashed { background: transparent; border-style: dashed; border-color: #D9CBA6; }
.card.flat { padding: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row > svg, .tip > svg { flex: none; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; width: 100%; background: none; border: 0; text-align: left; text-decoration: none; }
button.item:hover, a.item:hover { background: #FFFBF0; }
.item .grow { flex: 1 1 45%; min-width: 0; }
.item .title { font-weight: 700; font-size: 16px; }
.item .sub { color: var(--text-2); font-size: 13px; }
.item .value { flex: 0 1 auto; max-width: 55%; color: var(--text-2); text-align: right; overflow-wrap: anywhere; }
.item > svg { color: var(--text-3); }
.chev { flex: none; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--cream); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--cream); vertical-align: middle; }
.tag.yellow { background: var(--yellow); }
.tag.blue { background: var(--teal); color: var(--white); }
.tag.orange { background: var(--coral); color: var(--navy); }

/* ---------- controls */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font-weight: 700; text-decoration: none; }
.btn:hover { background: #FFFBF0; }
.btn.dark { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.btn.dark:hover { background: var(--navy-deep); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); }
.btn.orange { background: var(--coral); border-color: var(--coral); color: var(--navy); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.dashed { border-style: dashed; border-color: #D9CBA6; background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.orange { background: var(--navy); box-shadow: none; color: var(--cream); }
.icon-btn.small { width: 44px; height: 44px; }
.icon-btn.tiny { width: 32px; height: 32px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.chat-bar .icon-btn:not(.orange) { background: var(--cream); box-shadow: none; }
.input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding: 0 18px; font-size: 16px; font-weight: 500; }
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(255, 200, 61, .5); }
textarea.input { border-radius: 18px; padding: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 700; font-size: 14px; }
.switch { position: relative; flex: none; width: 56px; height: 32px; border-radius: 999px; border: 0; background: var(--cream-deep); padding: 0; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(29, 40, 70, .25); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--teal); }
.switch[aria-checked="true"]::after { transform: translateX(24px); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding: 4px; }
.seg button { min-height: 44px; border: 0; background: none; font-weight: 700; font-size: 15px; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--cream); }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; color: var(--navy); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.lines { white-space: pre-line; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.chip.add { width: 40px; padding: 0; border-style: dashed; border-color: #D9CBA6; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.select { appearance: none; min-height: 44px; padding: 0 40px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231D2846' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; font-weight: 700; color: var(--navy); }

/* ---------- home */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hello { display: flex; flex-direction: column; gap: 2px; margin-top: -4px; }
.hello .h2 { font-size: 20px; }
.logo { flex: none; display: flex; align-items: center; justify-content: center; }
.bell { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: var(--navy); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.jatah-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.jatah-top .stack { gap: 2px; min-width: 0; }
.jatah-top .kuma { margin: -4px -4px 0 0; }
.bar { height: 10px; border-radius: 999px; background: rgba(29, 40, 70, .15); overflow: hidden; display: flex; }
.bar > i { display: block; background: var(--navy); border-radius: 999px; }
.bar.over > i { background: var(--coral); }
.porsi { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px 0 8px; border: 0; border-radius: 999px; background: var(--white); color: var(--navy); font: inherit; font-weight: 700; font-size: 14px; text-align: left; }
button.porsi { cursor: pointer; }
button.porsi:hover { background: #FFFBF0; }
.kurs-icon { flex: none; display: block; }
.kurs-value { display: inline-flex; align-items: center; gap: 6px; }
.kurs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kurs-pick { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 20px; border: 1px solid var(--line); background: var(--white); padding: 0; }
.kurs-pick:hover { background: #FFFBF0; }
.kurs-pick[aria-checked="true"] { background: var(--yellow); border-color: var(--yellow); box-shadow: inset 0 0 0 2px var(--navy); }
.kurs-preview { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--white); font-weight: 700; }
.ledger { background: var(--white); border-radius: 18px; padding: 12px 14px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ledger .l { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.ledger .rule { border-top: 1px dashed #D9CBA6; margin: 6px 0; }
.ledger .strong { font-weight: 800; }
.ledger .sub { font-size: 12px; color: var(--text-2); padding: 0 0 4px; }
.ledger .head { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); padding-top: 8px; }
.ledger .head:first-child { padding-top: 0; }
.ledger.notes .l > span:first-child { min-width: 0; }
.ledger.notes .l.after { color: var(--teal); font-weight: 700; }
.ledger.notes .l.act { align-items: center; padding: 3px 0; }
.ledger.notes .l.act .btn { flex: none; min-height: 30px; padding: 0 10px; font-size: 12px; gap: 4px; }
.ledger.notes .gap { height: 6px; }
.ledger.notes .tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.tag.done { gap: 4px; background: var(--teal-soft); color: var(--teal); }
.rfoot-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--on-yellow); }
/* Rincian jatah (v1.16.1): white cards inside the allowance card */
.rcard { background: var(--white); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--navy); }
.rcard .row.between { align-items: baseline; }
.rtitle { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.rtoggle { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-align: left; cursor: pointer; }
.rtoggle .rtitle { flex: 1; }
.rsum { margin: 0; font-size: 13px; color: var(--text-2); }
.rsum b { color: var(--navy); }
.rsum b.in { color: var(--teal); }
.rsum.late { color: var(--danger); }
.rcard p { margin: 0; }
.rcard > .btn { align-self: flex-start; }
.rsaldo .stack { gap: 0; }
.rsaldo { font-size: 13px; color: var(--text-2); gap: 10px; }
.rsaldo b { color: var(--navy); font-size: 14px; }
.rsaldo small { font-size: 11.5px; color: var(--text-3); }
.jused { margin-top: -4px; color: var(--on-yellow); }
.jmoved { align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; background: var(--white); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jmoved b { font-size: 15px; line-height: 1; }
.jmoved.up b { color: var(--teal); }
.jmoved.down b { color: var(--coral); }
.chev-space { flex: none; width: 14px; }
.rcheck small.ok { color: var(--teal); font-weight: 600; }
.rbar { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--cream-deep); }
.rbar i { display: block; height: 100%; }
.rbar i.held { background: var(--navy); border-radius: 999px 0 0 999px; }
.rbar i.free { background: var(--yellow); border-radius: 0 999px 999px 0; }
.rbar.empty i { display: none; }
.rleg { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--navy); text-align: left; }
button.rleg:not(:disabled) { cursor: pointer; }
button.rleg:disabled { opacity: 1; cursor: default; }
.rleg .grow { flex: 1; }
.rleg.strong { font-weight: 800; }
.rleg.strong .mono { font-weight: 800; }
.rleg .mono.neg { color: var(--danger); }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dot.held { background: var(--navy); }
.dot.free { background: var(--yellow); box-shadow: 0 0 0 1.5px #B58A12 inset; }
.rheld { margin: -6px 0 0 20px; padding: 6px 0 2px 10px; border-left: 2px solid var(--cream-deep); font-size: 13px; color: var(--text-2); }
.rheld .l { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.rhow { background: var(--cream); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.rhow .label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.rhow b { font-size: 15px; font-variant-numeric: tabular-nums; }
.rhow small { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.rhow .rres { font-size: 19px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.rtoday { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.rtoday > .label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-bottom: 2px; }
.rtoday .rleg { padding: 2px 0; }
.rtoday .rleg.muted { color: var(--text-2); }
.rtoday .rhow { margin-top: 6px; }
.rtoday .l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.rtoday .l.act { align-items: center; padding-top: 6px; }
.rtoday .l.act .btn { flex: none; min-height: 30px; padding: 0 10px; font-size: 12px; }
.rtoday small { font-size: 12px; line-height: 1.4; }
.tline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tnode { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.tnode:last-child { padding-bottom: 0; }
.tnode::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--cream-deep); }
.tnode:last-child::before { display: none; }
.tdot { position: relative; z-index: 1; flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: 2px; background: var(--white); border: 2px solid #B9BFCC; }
.tnode.in .tdot { background: var(--teal); border-color: var(--teal); }
.tnode.late .tdot { background: var(--coral); border-color: var(--coral); }
.tnode.end .tdot { background: var(--navy); border-color: var(--navy); }
.tbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tbody .row.between { align-items: center; gap: 8px; }
.tbody b { font-size: 14.5px; }
.tbody small { font-size: 12px; line-height: 1.4; }
.tbody small.up { color: var(--teal); font-weight: 700; }
.tbody small.late { color: var(--danger); font-weight: 600; }
.tdate { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.pill { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--cream-deep); color: var(--navy); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.in { background: var(--teal); color: var(--white); }
.rseg { display: flex; gap: 4px; }
.rseg i { flex: 1; height: 6px; border-radius: 999px; background: #E6E8EE; }
.rseg i.on { background: var(--teal); }
.rseg.cont { background: #E6E8EE; border-radius: 999px; }
.rseg.cont i { flex: none; }
.rchecks { display: flex; flex-direction: column; }
.rcheck { display: flex; align-items: flex-start; gap: 12px; width: 100%; background: none; border: 0; padding: 11px 0; font: inherit; color: var(--navy); text-align: left; cursor: pointer; }
.rcheck + .rcheck { border-top: 1px solid #F0EADB; }
.rcheck .box { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #4A5470; display: grid; place-items: center; margin-top: 1px; }
.rcheck.done .box { background: var(--teal); border-color: var(--teal); color: var(--white); }
.rcbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rcname { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.rcname .mono { font-weight: 800; }
.rcbody small { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.rcheck.done small { color: var(--teal); font-weight: 600; }
.rcheck:hover .rcname b { text-decoration: underline; text-underline-offset: 3px; }
.card.yellow .warn.small { font-size: 13px; font-weight: 600; }
.spread { background: var(--white); border-radius: 14px; padding: 8px 12px; font-size: 13px; }
.runout { font-size: 13px; line-height: 1.45; }
.runout.warn { background: var(--coral-soft); border-radius: 14px; padding: 8px 12px; font-weight: 500; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: inherit; cursor: pointer; }
.compose { display: flex; gap: 10px; align-items: center; }
.compose .input { flex: 1; min-width: 0; }
.receipt .head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px dashed #D9CBA6; }
button.line { width: 100%; background: none; border: 0; padding-left: 0; padding-right: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.line:hover .d { text-decoration: underline; }
.receipt .line { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; padding: 9px 0; font-size: 15px; align-items: baseline; }
.receipt .line + .line { border-top: 1px solid #F3ECDB; }
.receipt .line .t { color: var(--text-3); font-size: 13px; }
.receipt .line .d { overflow-wrap: anywhere; font-weight: 600; }
.receipt .line .d small { color: var(--text-3); font-weight: 500; }
.receipt .line .a { text-align: right; white-space: nowrap; font-weight: 700; }
.receipt .line .a.in { color: var(--teal); }
.receipt .line .a.soft { color: var(--text-3); font-weight: 600; }
.receipt .line.group .d { font-weight: 800; }
.receipt .foot { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px dashed #D9CBA6; font-weight: 800; font-size: 16px; }
.empty { text-align: center; color: var(--text-2); padding: 10px 0; }
.pager { display: flex; align-items: center; gap: 6px; }
.pager .label { color: var(--navy); }
.past { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between; background: var(--teal-soft); border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.past .linkish { min-height: 0; padding: 0; }

/* ---------- notes inside a reply: each one tappable */
.rows { display: flex; flex-direction: column; margin: 4px 0; white-space: normal; }
.rhead { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); padding: 10px 0 4px; border-bottom: 1px dashed var(--line); }
.rhead:first-child { padding-top: 0; }
.rrow { display: grid; grid-template-columns: 1fr auto 14px; gap: 8px; align-items: center; width: 100%; background: none; border: 0; border-bottom: 1px solid #F3ECDB; padding: 8px 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.rrow:last-child { border-bottom: 0; }
.rrow:hover .rt > span { text-decoration: underline; }
.rrow .rt { display: flex; flex-direction: column; min-width: 0; }
.rrow .rt > span { overflow-wrap: anywhere; font-weight: 600; }
.rrow small { color: var(--text-3); font-size: 12px; }
.rrow .ra { font-size: 14px; font-weight: 700; white-space: nowrap; }
.rrow svg { color: var(--text-3); }
.rrow.struck .rt > span, .rrow.struck .ra { text-decoration: line-through; color: var(--text-3); }
.rfoot { white-space: pre-wrap; padding-top: 6px; color: var(--text-2); }
.rfoot b { color: var(--navy); }

/* ---------- stats */
.chart-card { display: flex; flex-direction: column; gap: 8px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { font-family: var(--body); }
svg.chart .grid { stroke: #F3ECDB; stroke-width: 1; }
svg.chart .base { stroke: var(--line); stroke-width: 1; }
svg.chart .tick { font-size: 9px; font-weight: 600; fill: var(--text-3); }
svg.chart .tick.strong { fill: var(--navy); font-weight: 800; }
svg.chart .cutmark { stroke: var(--white); stroke-width: 2.5; }
svg.chart .peak { font-size: 10px; font-weight: 800; fill: var(--navy); }
svg.chart .hit { fill: transparent; }
svg.chart .bar { fill: var(--navy); }
svg.chart .over .bar { fill: var(--coral); }
svg.chart .jatah { stroke: var(--teal); stroke-width: 2; stroke-linecap: round; }
svg.chart .col { cursor: pointer; outline: none; }
svg.chart .col:hover .hit, svg.chart .col:focus .hit { fill: var(--cream); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend .sw.ink { background: var(--navy); }
.legend .sw.orange { background: var(--coral); }
.legend .sw.tick { height: 2px; width: 12px; background: var(--teal); border-radius: 1px; }
.cats { display: grid; grid-template-columns: minmax(0, 1.1fr) 1fr auto; gap: 14px 14px; align-items: center; }
.cats .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cats .n small.chg { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); }
.cats .v { font-size: 14px; font-weight: 700; text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.cats .v svg { color: var(--text-3); }
.cats .bar { height: 12px; background: var(--cream-deep); }
.cats .bar > i { background: var(--yellow); }
.cats .top .bar > i { background: var(--coral); }
.cats .v.ok { color: inherit; }
.cats .top .n::before { content: "● "; color: var(--coral); }
.cats > div { display: contents; cursor: pointer; }
.cats .cat:hover .n { text-decoration: underline; }
.pocket[role="button"] { cursor: pointer; }
.pocket[role="button"]:hover { background: #FFFBF0; }
.bowls { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tip { display: flex; gap: 12px; align-items: center; background: var(--white); border-radius: 18px; padding: 12px 14px; font-weight: 600; }

/* ---------- savings */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.duo .btn { white-space: normal; text-align: center; padding: 6px 12px; line-height: 1.2; }
.duo .card { padding: 14px; }
.duo .label { font-size: 12px; }
.duo .amt { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.pocket { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.pocket .name { font-weight: 800; font-size: 17px; }
.pocket .bar > i { background: var(--teal); }
.warn.stack { align-items: flex-start; }
.warn { background: var(--coral-soft); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.ok { font-weight: 800; color: var(--teal); }
.lunas { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--teal); color: var(--white); font-weight: 700; }

/* ---------- profile */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 20px; background: var(--white); padding: 12px; min-width: 0; }
.tile.yellow { background: var(--yellow); border-color: var(--yellow); }
.tile b { display: block; font-family: var(--display); font-weight: 800; font-size: 19px; white-space: nowrap; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.tile span { color: var(--text-2); font-size: 13px; }
.tile.yellow span { color: var(--on-yellow); }
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > * + * { border-left: 1px solid var(--line); }
.split .item { justify-content: center; font-weight: 700; }
.danger { color: var(--danger); }

/* ---------- chat */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; background: var(--cream); }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who b { display: block; font-size: 18px; font-weight: 800; }
.chat-head .who span { color: var(--text-2); font-size: 13px; }
.chat-jatah { margin: 0 16px 4px; padding: 12px 16px; border-radius: 20px; background: var(--yellow); display: flex; flex-direction: column; gap: 6px; }
.chat-jatah .row { gap: 8px; }
.chat-jatah b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.chat-jatah span { color: var(--on-yellow); font-size: 13px; font-weight: 600; }
.chat-jatah .bar { height: 8px; }
.persona { flex: none; display: flex; align-items: center; justify-content: center; }
.log { flex: 1; overflow-y: auto; padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--white); }
.chat-bar .input { min-height: 44px; }
.msg { max-width: 88%; display: flex; flex-direction: column; gap: 8px; }
.msg.me { align-self: flex-end; max-width: 78%; }
.msg.bot { align-self: flex-start; }
.msg.bot.with-kuma { flex-direction: row; align-items: flex-end; gap: 8px; max-width: 94%; }
.msg.bot.with-kuma > .col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bubble { border-radius: 20px; padding: 12px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--navy); color: var(--cream); font-weight: 600; border-bottom-right-radius: 6px; }
.msg.bot .bubble { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me .bubble.file { font-size: 13px; }
.bubble pre { margin: 6px 0; font-family: var(--mono); font-size: 12px; white-space: pre; overflow-x: auto; background: var(--cream); border-radius: 12px; padding: 8px 10px; }
.bubble code { -webkit-box-decoration-break: clone; box-decoration-break: clone; font-family: var(--body); font-weight: 700; font-size: .92em; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; cursor: pointer; }
.bubble .cmdchip { display: inline; font: inherit; font-weight: 700; font-size: .92em; color: var(--navy); background: var(--yellow); border: 1px solid transparent; border-radius: 8px; padding: 0 6px; margin: 0 1px; cursor: pointer; line-height: inherit; }
.bubble .cmdchip:hover, .bubble .cmdchip:focus-visible { border-color: var(--navy); outline: none; }
.msg.me .bubble code { background: rgba(255, 246, 224, .15); border-color: transparent; color: var(--cream); }
.bubble img { display: block; max-width: 100%; border-radius: 14px; margin-bottom: 8px; }
.bubble.typing { color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { white-space: normal; text-align: left; min-height: 40px; font-size: 14px; padding: 0 16px; }
.stamp { align-self: center; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: 12px; font-weight: 700; color: var(--text-2); }
.download { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; }
.dots { display: inline-flex; gap: 5px; align-items: center; height: 18px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--navy); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- sheet & toast */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(29, 40, 70, .4); display: flex; justify-content: center; align-items: flex-end; }
.sheet { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: var(--cream); border-radius: 28px 28px 0 0; padding: 10px 18px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; animation: up .18s ease-out; box-shadow: 0 -8px 30px rgba(29, 40, 70, .15); }
.sheet .grip { align-self: center; width: 44px; height: 5px; border-radius: 999px; background: var(--navy); opacity: .2; }
.sheet .msg { max-width: 100%; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@keyframes up { from { transform: translateY(32px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .switch::after { transition: none; } .dots i { animation: none; opacity: .6; } }
.toast { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 60; max-width: 90vw; padding: 10px 18px; border-radius: 999px; background: var(--navy); color: var(--cream); font-weight: 700; box-shadow: var(--shadow); }

/* ---------- sign-in */
.login { min-height: 100vh; padding: 32px 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.login-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 0 4px; }
.code { font-weight: 800; font-size: 40px; letter-spacing: .08em; text-align: center; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps code { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1px 6px; }
.copy { border: 0; background: none; padding: 0; text-decoration: underline; font-weight: 700; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--cream-deep); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { background: var(--coral-soft); border-radius: 16px; padding: 12px 14px; font-weight: 600; }

.jatah-pick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px; }
.jatah-pick .chip { background: rgba(255, 255, 255, .7); border-color: transparent; flex: none; min-height: 36px; padding: 0 14px; font-size: 14px; }
.jatah-pick .chip[aria-pressed="true"] { background: var(--navy); color: var(--cream); }
.money { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px; font: inherit; color: var(--navy); cursor: pointer; }
.money .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.money .strong { font-weight: 800; }
.warn-text, .item .sub.warn-text { color: var(--danger); font-weight: 600; }
.item .mono { white-space: nowrap; }
.linkish.center { align-self: center; text-align: center; padding: 8px 0; min-height: 44px; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--white); text-decoration: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.row.wrap { flex-wrap: wrap; gap: 8px; }
.login .seg { margin-top: 4px; }

.item.muted .title, .item.muted .mono { color: var(--muted, #6B7286); }

/* v1.14: first-run guide and subscription */
.welcome { min-height: 100vh; max-width: 560px; margin: 0 auto; padding: 28px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.welcome .h1 { font-size: 24px; line-height: 1.25; }
.wpoint { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.wpoint b { display: block; margin-bottom: 2px; }
.wpoint p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.wicon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--yellow); color: var(--navy); display: grid; place-items: center; }
.wtrial { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 14px; }
.center { text-align: center; }
.guide { display: flex; flex-direction: column; gap: 10px; }
.gbar { height: 6px; border-radius: 999px; background: #EFE4C6; overflow: hidden; }
.gbar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.gformula { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.gformula b { color: var(--navy); }
.gnext { display: flex; flex-direction: column; gap: 6px; background: var(--cream); border-radius: 14px; padding: 12px 14px; }
.gnext p { margin: 0; line-height: 1.45; }
.gbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gsteps { display: flex; flex-direction: column; padding: 4px 0; }
.gstep { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; color: var(--navy); }
.gstep + .gstep { border-top: 1px solid var(--line); }
.gstep .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #D9CBA6; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--text-2); margin-top: 1px; }
.gstep.done .tick { background: var(--teal); border-color: var(--teal); color: var(--white); }
.gstep .linkish { align-self: flex-start; }
.gtext { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gtitle { font-weight: 700; font-size: 14.5px; }
.gtext small { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.guide .linkish { color: var(--text-2); }
.tip { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; background: var(--teal-soft); border-radius: 18px; padding: 10px 14px; }
.tip p { flex: 1; min-width: 180px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--navy); }
.tip .linkish { margin-left: 46px; color: var(--teal); }
.access { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 16px; padding: 10px 14px; font: inherit; font-size: 14px; color: var(--navy); cursor: pointer; }
.access.soon { background: var(--teal-soft); }
.access.over { background: var(--coral-soft); }
.access b { flex: none; text-decoration: underline; text-underline-offset: 3px; }

/* v1.14.3: scorecards (Statistik), small fixes */
.kpis { display: flex; flex-direction: column; gap: 8px; }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; font: inherit; color: var(--navy); min-width: 0; }
button.kpi { cursor: pointer; }
button.kpi:hover { background: #FFFBF0; }
.klabel { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.klabel i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kpi.in .klabel i { background: var(--teal); }
.kpi.out .klabel i { background: var(--coral); }
.kval { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kdelta { font-size: 12px; font-weight: 700; color: var(--text-2); }
.kdelta.good { color: var(--teal); }
.kdelta.bad { color: var(--danger); }
.ksub { font-size: 12px; color: var(--text-3); }
.kmiss { display: flex; flex-direction: column; gap: 8px; background: var(--coral-soft); border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.kmiss p { margin: 0; }
.knet b.na { color: var(--text-2); }
.klink { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer; }
.ledger.recon { font-size: 13.5px; padding: 14px 16px; }
.ledger.recon .l { align-items: baseline; padding: 4px 0; }
.ledger.recon .l .stack { gap: 0; }
.ledger.recon .l small { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.ledger.recon .l.strong .mono { font-weight: 800; }
.fixes { display: flex; flex-direction: column; gap: 10px; }
.fixrow { background: var(--white); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.fixrow .stack { gap: 0; }
.fixrow small { font-size: 12px; color: var(--text-2); }
.fixrow .mono.pos { color: var(--teal); }
.fixrow .mono.neg { color: var(--danger); }
.fixcmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--cream); border-radius: 12px; padding: 8px 12px; }
.fixcmp > span { display: flex; flex-direction: column; }
.fixcmp small { font-size: 11px; color: var(--text-3); }
.fixcmp .mono { font-size: 13.5px; }
.fixrow .late { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 12px; padding: 8px 10px; }
.fixrow .late p { flex: 1; margin: 0; }
.item .linkrow { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.kmiss .row { gap: 14px; align-items: center; flex-wrap: wrap; }
.knet { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 0 4px; font-size: 14px; }
.knet b { font-weight: 800; color: var(--teal); }
.knet b.neg { color: var(--danger); }
.knet small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }
.ledger .l.sub .up { color: var(--teal); font-weight: 700; }

/* v1.19.1: install on the phone (PWA) */
.install { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 12px 8px 12px 16px; box-shadow: var(--shadow); }
.install .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.install b { font-size: 15px; }
.install span { font-size: 13px; color: var(--text-2); }
.install .icon-btn.tiny { box-shadow: none; background: transparent; color: var(--text-3); }
ol.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
