/* Papan Jatah: gaya ringan, satu keluarga dengan Peta Lunas (token sama). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: 84px; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 46% at 8% -4%, var(--glow-1), transparent 70%), radial-gradient(46% 40% at 104% 6%, var(--glow-2), transparent 70%), radial-gradient(50% 38% at 70% 108%, var(--glow-3), transparent 70%), linear-gradient(180deg, var(--bg), var(--bg-2)); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.2; margin: 0 0 var(--s2); letter-spacing: -.012em; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); } h2 { font-size: 1.15rem; display: flex; align-items: center; gap: var(--s2); }
p { margin: 0 0 var(--s3); } a { color: var(--brand); text-underline-offset: 3px; }
.muted { color: var(--ink-3); } .kecil { font-size: .875rem; } .tebal { font-weight: 700; } .tengah { text-align: center; }
.hid { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.angka, .uang { font-variant-numeric: tabular-nums lining-nums; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.lompat { position: absolute; left: var(--s3); top: -60px; z-index: 300; background: var(--brand); color: var(--brand-ink); padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.lompat:focus { top: var(--s3); }

/* kerangka */
.atas { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--s2); padding: calc(env(safe-area-inset-top) + var(--s2)) var(--s4) var(--s2); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: var(--kaca); -webkit-backdrop-filter: var(--kaca); border-bottom: 1px solid var(--line); }
.merek { display: flex; align-items: center; gap: var(--s3); margin-right: auto; color: var(--ink); text-decoration: none; min-height: 44px; }
.merek img { width: 36px; height: 36px; border-radius: 11px; box-shadow: var(--shadow-1); }
.merek .nm { display: block; font: 750 1.08rem/1.1 var(--f-display); } .merek .br { display: block; font: 600 .7rem/1.2 var(--f-body); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.ibtn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--ink-2); border-radius: var(--r-sm); cursor: pointer; transition: background var(--d-fast) var(--ease), transform var(--d-fast) var(--ease); }
.ibtn:hover { background: var(--surface-2); } .ibtn:active { transform: scale(.92); } .ibtn svg { width: 22px; height: 22px; }
main { max-width: 680px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); outline: none; }
.pg { display: none; } .pg.on { display: block; animation: naik var(--d-slow) var(--ease) both; }
.pg.on > * { animation: naik var(--d-slow) var(--ease) both; } .pg.on > *:nth-child(2) { animation-delay: 40ms; } .pg.on > *:nth-child(3) { animation-delay: 80ms; } .pg.on > *:nth-child(n+4) { animation-delay: 120ms; }
@keyframes naik { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kaki { max-width: 680px; margin: 0 auto; padding: 0 var(--s4) var(--s4); text-align: center; color: var(--ink-3); font-size: .8rem; line-height: 1.5; }
.kaki b { color: var(--ink-2); }
.bawah { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; padding: 6px var(--s2) calc(env(safe-area-inset-bottom) + 6px); background: color-mix(in srgb, var(--surface-solid) 82%, transparent); backdrop-filter: var(--kaca); -webkit-backdrop-filter: var(--kaca); border-top: 1px solid var(--line); }
.bawah button { flex: 1; min-height: 56px; border: 0; background: none; color: var(--ink-3); font-size: .72rem; font-weight: 650; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: var(--r-sm); cursor: pointer; transition: color var(--d) var(--ease), background var(--d) var(--ease); }
.bawah button svg { width: 24px; height: 24px; transition: transform var(--d) var(--ease); }
.bawah button[aria-current="page"] { color: var(--brand); } .bawah button[aria-current="page"] svg { transform: translateY(-2px); }
.bawah button:active { background: var(--surface-2); }
.rail { display: none; }
@media (min-width: 900px) {
  body { padding: 0 0 0 232px; }
  .rail { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 232px; padding: var(--s5) var(--s3); gap: var(--s2); border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 70%, transparent); backdrop-filter: var(--kaca); }
  .rail .merek { margin: 0 0 var(--s4) var(--s2); }
  .rail button { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s4); border: 0; background: none; color: var(--ink-2); border-radius: var(--r-sm); cursor: pointer; font-weight: 600; transition: background var(--d) var(--ease); }
  .rail button:hover { background: var(--surface-2); } .rail button svg { width: 22px; height: 22px; }
  .rail button[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
  .bawah { display: none; } .atas .merek { visibility: hidden; } body { padding-bottom: 0; }
  main { max-width: 760px; padding-top: var(--s6); }
}

/* komponen */
.kartu { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); margin-bottom: var(--s4); box-shadow: var(--shadow-1), var(--hi); backdrop-filter: var(--kaca); -webkit-backdrop-filter: var(--kaca); }
.kartu > :last-child { margin-bottom: 0; }
.hero { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 16%, var(--surface-solid)), var(--surface)); }
.big { font: 750 clamp(1.9rem, 1.4rem + 2.4vw, 2.6rem)/1.1 var(--f-display); letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; }
.big.neg { color: var(--accent); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s4); }
.kpi { padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.kpi b { display: block; font: 750 1.15rem/1.3 var(--f-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .kpi span { font-size: .78rem; color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 650; background: var(--surface-2); color: var(--ink-2); }
.pill.ok { background: var(--good-soft); color: var(--good); } .pill.bad { background: var(--accent-soft); color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 46px; padding: 0 var(--s5); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; transition: transform var(--d-fast) var(--ease), background var(--d) var(--ease), filter var(--d); }
.btn:hover { background: var(--surface-2); } .btn:active { transform: scale(.96); } .btn svg { width: 18px; height: 18px; }
.btn.p { background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.p:hover { filter: brightness(1.06); } .btn.a { background: linear-gradient(160deg, var(--accent-fill), color-mix(in srgb, var(--accent-fill) 80%, #000)); color: #fff; border-color: transparent; }
.btn.t { background: transparent; border-color: transparent; color: var(--brand); } .btn.d { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: transparent; }
.btn.blok { width: 100%; }
.baris { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; } .baris > .f { flex: 1; min-width: 0; }
label { display: block; font-size: .85rem; font-weight: 650; margin: 0 0 4px; color: var(--ink-2); }
input, select { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-solid); color: var(--ink); transition: border-color var(--d) var(--ease), box-shadow var(--d) var(--ease); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.f { margin-bottom: var(--s3); }
.bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width 600ms var(--ease); }
.pos { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 6px; margin-bottom: var(--s3); align-items: center; padding-bottom: var(--s3); border-bottom: 1px dashed var(--line); }
.pos:last-of-type { border-bottom: 0; }
.pos select { grid-column: 1 / 3; min-height: 40px; font-size: .88rem; } .pos .cek { grid-column: 3; display: flex; flex-direction: column; align-items: center; font-size: .68rem; margin: 0; font-weight: 600; color: var(--ink-3); gap: 2px; min-height: 40px; justify-content: center; }
.pos .cek input { width: 22px; min-height: 22px; accent-color: var(--brand); }
.pos .hapus { color: var(--accent); }
.catatan { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); margin-bottom: var(--s4); }
.catatan.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); } .catatan svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--brand); }
.catatan b { display: block; }
.cta { background: linear-gradient(150deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); color: var(--brand-ink); border-color: transparent; }
.cta h2 { color: inherit; } .cta p { opacity: .94; } .cta .btn { background: #f6efe3; color: #1f3f31; font-weight: 700; border-color: transparent; width: 100%; }
:root[data-tema="gelap"] .cta, :root:not([data-tema="terang"]) .cta { color: #fff; }
.cta-kecil { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* grid 30 hari */
.papan { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (min-width: 560px) { .papan { grid-template-columns: repeat(10, 1fr); } }
.sel { aspect-ratio: 1; min-height: 44px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-3); font-weight: 700; font-size: .9rem; border: 2px solid transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform var(--d-fast) var(--ease), filter var(--d); }
.sel:hover { filter: brightness(.95); } .sel:active { transform: scale(.92); }
.sel.ok { background: var(--brand); color: var(--brand-ink); } .sel.bad { background: var(--accent-fill); color: #fff; }
.sel.now { border-color: var(--accent); } .sel.pil { outline: 3px solid var(--ink); outline-offset: 1px; }
.kbd { font-size: .78rem; color: var(--ink-3); margin-top: var(--s3); } kbd { background: var(--surface-3); border-radius: 5px; padding: 0 6px; font: inherit; font-weight: 700; }

/* grafik */
.donutwrap { display: flex; gap: var(--s5); align-items: center; flex-wrap: wrap; justify-content: center; }
.donut { width: 190px; height: 190px; flex: none; position: relative; } .donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 6.5; cursor: pointer; transition: stroke-dasharray 700ms var(--ease), stroke-width var(--d-fast); } .donut circle:hover { stroke-width: 8.5; }
.dc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 34px; } .dc b { font: 750 1.05rem/1.2 var(--f-display); } .dc span { font-size: .75rem; color: var(--ink-3); }
.leg { flex: 1; min-width: 180px; } .leg button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 8px; border: 0; background: none; border-radius: 8px; font-size: .9rem; cursor: pointer; text-align: left; } .leg button:hover { background: var(--surface-2); }
.leg i { width: 12px; height: 12px; border-radius: 4px; flex: none; } .leg span { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; max-height: 280px; display: block; touch-action: pan-y; } .tip { min-height: 1.6em; font-size: .88rem; margin: 6px 0 0; }
.ring { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); flex: none; transition: background 600ms; }
.ring span { width: 80px; height: 80px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; font: 750 1.6rem var(--f-display); color: var(--brand); }
.tangga { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }

/* modal & toast */
.lapisan { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: pudar var(--d) var(--ease) both; }
.lembar { width: 100%; max-width: 480px; max-height: 90dvh; overflow: auto; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s6) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom)); box-shadow: var(--shadow-2); animation: naik-lembar var(--d-slow) var(--ease) both; }
@media (min-width: 560px) { .lapisan { align-items: center; } .lembar { border-radius: var(--r-lg); } }
@keyframes pudar { from { opacity: 0; } } @keyframes naik-lembar { from { transform: translateY(24px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 120; max-width: min(92vw, 420px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r-pill); font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-2); animation: naik var(--d-slow) var(--ease) both; }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* privasi & gerak */
body.privasi .uang { filter: blur(7px); cursor: pointer; transition: filter var(--d); } body.privasi .uang.buka { filter: none; }
:root[data-gerak="kurang"] *, :root[data-gerak="kurang"] *::before { animation-duration: .001ms !important; transition-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
.rangka { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--r-sm); } .rangka::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 9%, transparent), transparent); animation: kilau 1.3s infinite; } @keyframes kilau { to { transform: translateX(100%); } }
