/* Catatan Uang — UI gelap-terang ala kartu bank modern.
   Layar: onboarding hitam → header hitam + sheet putih → detail transaksi. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --black: #000000;
  --ink: #0B0B0F;
  /* Abu-abu yang lolos WCAG AA di atas putih: 6.45:1 dan 4.78:1.
     Nilai lama (#8E8E93 / #A9A9B0) cuma 3.26:1 dan 2.34:1. */
  --muted: #5E5E63;
  --faint: #6C6C73;
  --line: #ECECF0;
  --field: #F6F6F8;
  --green: #1B7F3B;
  --red: #D0021B;
  --amber: #96610A;
  --card: #1C1C1E;
  --maxw: 460px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --tap: 44px;

  /* Skala tipografi. Satuannya rem supaya ikut Dynamic Type iOS —
     app.js yang menyetel ukuran dasar dari -apple-system-body. */
  --t-xs: 0.6875rem;   /* 11px — batas minimum iOS */
  --t-sm: 0.75rem;     /* 12px */
  --t-md: 0.8125rem;   /* 13px */
  --t-lg: 0.875rem;    /* 14px */
  --t-xl: 0.9375rem;   /* 15px */
  --t-2xl: 1rem;       /* 16px */
  --t-3xl: 1.0625rem;  /* 17px */
  --t-4xl: 1.1875rem;  /* 19px */
  --t-5xl: 1.375rem;   /* 22px */
  --t-6xl: 1.75rem;    /* 28px */
  --t-7xl: 2.1875rem;  /* 35px */

  /* Token dashboard — swap ini nanti buat tema hijau terang. */
  --dash-bg: rgba(28, 28, 30, .94);
  --dash-bg-photo: rgba(12, 12, 14, .78);
  --dash-border: rgba(255, 255, 255, .1);
  --dash-text: #ffffff;
  --dash-text-soft: rgba(255, 255, 255, .68);
  --dash-text-muted: rgba(255, 255, 255, .55);
  --dash-accent: #ffffff;
  --dash-accent-soft: rgba(255, 255, 255, .14);
  --dash-accent-alt: #2C2C2E;
  --dash-deco: rgba(255, 255, 255, .06);
  --dash-blur: 22px;
  --dash-donut-cap: rgba(255, 255, 255, .52);
  --dash-radius: 20px;
  --dash-radius-sm: 16px;
  --dash-over: #FF6961;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Dynamic Type: -apple-system-body bikin ukuran dasar ikut setelan Ukuran Teks
   iOS. app.js mengunci hasilnya ke rentang 15–23px supaya layout ponsel tetap
   utuh di ukuran aksesibilitas paling besar. */
html {
  font: -apple-system-body;
  font-family: var(--font);
}

html, body {
  height: 100%;
  background: var(--black);
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-size: var(--t-xl);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }

/* Scroll tetap mulus tanpa batang scroll yang kelihatan. */
.sheet-body, .fullsheet-body, .sheetmodal { scrollbar-width: none; }
.sheet-body::-webkit-scrollbar,
.fullsheet-body::-webkit-scrollbar,
.sheetmodal::-webkit-scrollbar { width: 0; height: 0; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }
.ic.chev { width: 15px; height: 15px; stroke-width: 2.2; }
.ic.back { transform: rotate(180deg); }

/* Semua lapisan utama dikunci selebar ponsel supaya rapi juga di layar lebar. */
.intro, .stage, .fullsheet, .sheetmodal, .scrim {
  position: fixed;
  left: 50%;
  width: min(100%, var(--maxw));
  --ty: 0px;
  transform: translate(-50%, var(--ty));
}

/* ══════════ 1. Onboarding ══════════ */

.intro {
  inset: 0 auto 0 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--black);
  padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 20px);
  z-index: 90;
  transition: opacity .45s ease, transform .45s var(--ease);
}
.intro.leaving { opacity: 0; transform: translate(-50%, -14px); pointer-events: none; }

.intro-art { flex: 1 1 auto; min-height: 0; border-radius: 20px; overflow: hidden; background: #111; }
.intro-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.intro-copy { flex: none; padding: 26px 4px 0; }
.intro-copy h1 {
  font-size: clamp(29px, 8.6vw, 37px);
  line-height: 1.07;
  letter-spacing: -.033em;
  font-weight: 650;
  color: #fff;
}
.intro-copy p {
  margin-top: 13px;
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--muted);
  max-width: 33ch;
}

.cta {
  margin-top: 24px;
  width: 100%;
  height: 56px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 24px;
  font-size: var(--t-xl);
  font-weight: 560;
  letter-spacing: -.01em;
  transition: background .2s;
}
.cta:active { background: rgba(255, 255, 255, .08); }
.cta-arrow { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; }
.cta-arrow .ic { width: 18px; height: 18px; stroke-width: 1.9; }

.setup { overflow: auto; -webkit-overflow-scrolling: touch; }
.setup-top { padding: 8px 4px 0; }
.setup-stepn { font-size: var(--t-sm); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.setup-top h1 { margin-top: 10px; font-size: clamp(28px, 8vw, 36px); letter-spacing: -.03em; color: #fff; font-weight: 650; }
.setup-top p, .setup-hint { margin-top: 10px; font-size: var(--t-md); line-height: 1.5; color: var(--muted); }
.setup-form { padding: 18px 0 calc(env(safe-area-inset-bottom) + 8px); }
.setup .fld span { color: #A1A1A8; }
.setup .fld input,
.setup .fld input:focus,
.setup .amtwrap,
.setup .amtwrap:focus-within {
  background: #16161A;
  border-color: #3A3A42;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}
.setup .fld input::placeholder { color: #6F6F78; -webkit-text-fill-color: #6F6F78; }
.setup .amtwrap input,
.setup .amtwrap input:focus {
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  background: transparent;
}
.setup .amtwrap i { color: #9A9AA4; }
.setup .fld input:-webkit-autofill,
.setup .fld input:-webkit-autofill:hover,
.setup .fld input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #16161A inset;
  border-color: #3A3A42;
}
.setup-back { color: #A1A1A8 !important; }
.setup-wal {
  display: grid; grid-template-columns: 22px 1fr minmax(88px, 34%);
  gap: 10px; align-items: center;
  margin-top: 10px; padding: 12px 12px;
  border-radius: 16px; background: #16161A; border: 1px solid #2A2A30;
}
.setup-wal.on { border-color: #3D3D46; }
.setup-wal-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.setup-name, .setup-kind {
  width: 100%; min-height: var(--tap); border: 0; border-radius: 10px;
  background: #0C0C0E; color: #fff; padding: 0 10px; font-size: var(--t-lg);
  -webkit-text-fill-color: #fff; caret-color: #fff;
}
.setup-kind { color: #fff; }
.setup-wal input[type="checkbox"] { width: 18px; height: 18px; accent-color: #fff; }
.setup-add { margin-top: 12px !important; color: #C8C8D0 !important; }
.setup-link { color: #8EB4FF; text-decoration: underline; }
.setup-link.dark { color: #0A5FD6; }
.setup-bal {
  height: 40px; border: 0; border-radius: 10px; background: #0C0C0E;
  color: #fff; text-align: right; padding: 0 10px; font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.setup-bal:disabled { opacity: .35; }

.rowbtn-ic.in { background: #E8F8EE; color: var(--green); }
.scan-alts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.scan-alt { margin-top: 0 !important; min-height: var(--tap) !important; font-size: var(--t-md) !important; }
.pdf-prev { padding: 28px 16px; text-align: center; color: #fff; font-size: var(--t-lg); font-weight: 560; }

/* ══════════ 2. Rangka aplikasi ══════════ */

.stage {
  inset: 0 auto 0 50%;
  height: 100%;
  background: var(--black);
  overflow: hidden;
  /* Diisi ulang oleh app.js sesuai tinggi topbar & hero sebenarnya. */
  --sheet-top-min: 52px;
  --sheet-y: 158px;
  --sheet-pad: 158px;
}
.app { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* Layer foto background yang bisa diatur di Personalisasi. */
.stage-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--black) center / cover no-repeat;
  --dim-top: .3; --dim-bot: .7;
}
.stage-bg::after {
  content: ""; position: absolute; inset: 0;
  /* Scrim atas nolak foto terang biar angka & label tetap kebaca. */
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, .5) 0%,
      rgba(0, 0, 0, .22) 34%,
      rgba(0, 0, 0, 0) 58%),
    linear-gradient(180deg,
      rgba(0, 0, 0, var(--dim-top)) 0%,
      rgba(0, 0, 0, calc((var(--dim-top) + var(--dim-bot)) / 2)) 55%,
      rgba(0, 0, 0, var(--dim-bot)) 100%);
}
.stage-bg:not(.has-photo) { background: radial-gradient(125% 68% at 50% -8%, #18181D 0%, #000 60%); }
.stage-bg:not(.has-photo)::after { background: none; }

/* Ajakan pasang foto — cuma tab statistik, biar dashboard beranda nggak penuh. */
.bg-hint { display: none; }
.stage.at-collapsed:not(.has-photo) #dash-stats-hero:not([hidden]) ~ .bg-hint {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; height: 38px; padding: 0 16px; border-radius: 19px;
  border: 1px dashed rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .6);
  font-size: var(--t-md); font-weight: 500; letter-spacing: -.01em;
  animation: riseIn .42s .06s var(--ease) both;
}
.bg-hint .ic { width: 16px; height: 16px; }
.bg-hint:active { background: rgba(255, 255, 255, .07); }

/* Teks header dibikin lebih tahan baca kalau ada foto di belakangnya. */
.stage.has-photo .hero-label,
.stage.has-photo .hero-sub { color: rgba(255, 255, 255, .74); }
.stage.has-photo .hero-sub b { color: #fff; }
.stage.has-photo .hero-num,
.stage.has-photo .who-name { text-shadow: 0 1px 12px rgba(0, 0, 0, .68); }
.stage.has-photo .dash-card,
.stage.has-photo .flowpill {
  background: var(--dash-bg-photo);
  -webkit-backdrop-filter: blur(var(--dash-blur)) saturate(120%);
  backdrop-filter: blur(var(--dash-blur)) saturate(120%);
}
.stage.has-photo .monthnav button {
  background: rgba(22, 22, 24, .5);
  border-color: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

.topbar {
  position: relative; z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 8px) 18px 0;
}
.who { display: flex; align-items: center; gap: 9px; color: #fff; padding: 4px 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(140deg, #5E5CE6, #0A84FF);
  display: grid; place-items: center;
  font-size: var(--t-sm); font-weight: 700; color: #fff;
}
.who-name { font-size: var(--t-xl); font-weight: 600; letter-spacing: -.015em; }
.who .chev { opacity: .45; }
.iconbtn { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: #fff; border-radius: 50%; }
.iconbtn:active { background: rgba(255, 255, 255, .1); }
.iconbtn.ghost { color: var(--ink); }
.iconbtn.ghost:active { background: #F0F0F3; }

.hero { position: relative; z-index: 2; padding: 8px 18px 14px; }

/* ── Dashboard beranda ── */
.dash { display: flex; flex-direction: column; gap: 12px; animation: riseIn .42s var(--ease) both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

.dash-card {
  position: relative; overflow: hidden;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  -webkit-backdrop-filter: blur(var(--dash-blur)); backdrop-filter: blur(var(--dash-blur));
}

.dash-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dash-deco::before,
.dash-deco::after {
  content: ""; position: absolute; border-radius: 16px;
  background: var(--dash-deco);
}
.dash-deco::before {
  width: 68px; height: 68px; top: 10%; right: 6%; opacity: .7;
}
.dash-deco::after {
  width: 44px; height: 44px; top: 42%; right: 16%; opacity: .45;
}

.dash-bal { padding: 16px 18px 14px; }
.dash-bal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-bal-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-sm); font-weight: 500; color: var(--dash-text-soft); letter-spacing: -.005em;
}
.dash-eye, .dash-menu {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--dash-text-soft);
}
.dash-eye:active, .dash-menu:active { background: var(--dash-accent-soft); }
.dash-eye .ic, .dash-menu .ic { width: 16px; height: 16px; stroke-width: 1.8; }
.dash-bal-amt {
  margin-top: 6px;
  font-size: clamp(28px, 8.4vw, 34px);
  font-weight: 700; letter-spacing: -.038em;
  color: var(--dash-text); font-variant-numeric: tabular-nums; line-height: 1.08;
}
.dash-bal-amt.over { color: var(--dash-over); }
.dash-bal-amt.masked { letter-spacing: .12em; font-size: clamp(24px, 7vw, 30px); }
.dash-bal-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--dash-border);
}
.dash-k { display: block; font-size: var(--t-xs); color: var(--dash-text-muted); letter-spacing: -.005em; }
.dash-v { display: block; margin-top: 3px; font-size: var(--t-md); font-weight: 600; color: var(--dash-text); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.dash-foot-hit {
  text-align: left; border-radius: 10px; padding: 2px 4px; margin: -2px -4px;
  color: inherit;
}
.dash-foot-hit:active { background: var(--dash-accent-soft); }

.dash-chart-body {
  display: flex; align-items: center; gap: 14px;
  margin-top: 10px;
}
/* Pill arus kas di bawah kartu saldo — ringkas, cuma buat dilihat sekilas. */
.flowpills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flowpill {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 7px 12px 7px 7px; border-radius: 16px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--dash-border);
}
.flowpill-ic {
  width: 30px; height: 30px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
}
.flowpill-ic .ic { width: 15px; height: 15px; stroke-width: 2.3; }
.flowpill-ic.in { background: rgba(76, 217, 100, .2); color: #5AE07A; }
.flowpill-ic.out { background: rgba(255, 120, 90, .2); color: #FF9A7A; }
.flowpill-tx { min-width: 0; }
.flowpill-tx i {
  display: block; font-style: normal; font-size: var(--t-xs); font-weight: 500;
  color: var(--dash-text-soft); letter-spacing: -.005em;
}
.flowpill-tx b {
  display: block; margin-top: 1px; font-size: var(--t-md); font-weight: 700;
  letter-spacing: -.02em; color: var(--dash-text); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.dash-donut-wrap {
  position: relative; width: 132px; height: 132px; flex: none;
}
.dash-donut { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.dash-donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.dash-donut-pct { font-size: var(--t-4xl); font-weight: 700; letter-spacing: -.03em; color: var(--dash-text-soft); font-variant-numeric: tabular-nums; }
.dash-donut-cap { font-size: var(--t-xs); font-weight: 500; color: var(--dash-donut-cap); margin-top: 1px; letter-spacing: -.005em; }

.dash-legend { flex: 1 1 auto; min-width: 0; display: grid; gap: 7px; }
.dash-leg { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dash-leg i {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
}
.dash-leg-n {
  flex: 1 1 auto; min-width: 0;
  font-size: var(--t-sm); font-weight: 600; color: var(--dash-text-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-leg-v {
  flex: none; font-size: var(--t-xs); font-weight: 600; color: var(--dash-text-muted);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}

/* Donat pindah dari hero gelap ke sheet terang — warnanya harus dibalik. */
.donutcard { padding: 14px 16px; margin-top: 10px; }
.donutcard .dash-chart-body { margin-top: 0; }
.donutcard .dash-donut-pct { color: var(--ink); }
.donutcard .dash-donut-cap { color: var(--muted); }
.donutcard .dash-leg-n { color: var(--ink); }
.donutcard .dash-leg-v { color: var(--muted); }

/* Header tab Statistik */
.hero-stats .hero-label { font-size: var(--t-sm); font-weight: 500; color: var(--dash-text-soft); letter-spacing: -.005em; }
.hero-num {
  margin-top: 3px;
  font-size: clamp(31px, 9.2vw, 39px);
  font-weight: 700;
  letter-spacing: -.038em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.hero-num.over { color: #FF6961; }
.hero-sub { margin-top: 5px; font-size: var(--t-sm); color: var(--dash-text-soft); }
.hero-sub b { color: #D8D8DE; font-weight: 600; }

.monthnav { display: flex; align-items: center; gap: 4px; margin-top: 15px; }
.monthnav button {
  width: 32px; height: 32px; border-radius: 16px;
  background: var(--card); color: #fff; display: grid; place-items: center;
}
.monthnav button:disabled { opacity: .3; }
.monthnav span { font-size: var(--t-md); font-weight: 600; color: #fff; padding: 0 8px; min-width: 116px; text-align: center; }
.monthnav .ic { width: 14px; height: 14px; stroke-width: 2.2; }

/* ── Sheet putih yang bisa ditarik (3 titik snap) ── */
.sheet {
  position: absolute;
  left: 0; right: 0;
  top: var(--sheet-top-min);
  height: calc(100% - var(--sheet-top-min));
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 34px rgba(0, 0, 0, .4);
  transform: translate3d(0, var(--sheet-y), 0);
  will-change: transform;
}
.stage.ready .sheet { transition: transform .44s var(--ease); }
.sheet.dragging { transition: none; }

.sheet-handle { flex: none; touch-action: none; cursor: grab; }
.sheet.dragging .sheet-handle { cursor: grabbing; }
.grab { width: 36px; height: 4.5px; border-radius: 3px; background: #D6D6DC; margin: 9px auto 0; flex: none; transition: background .2s, width .2s; }
/* Grabber yang bisa difokus butuh area sentuh sungguhan. Kotaknya 44x28 tapi
   ditarik balik pakai margin negatif, jadi tinggi header sheet nggak berubah. */
.grab[role="button"] {
  position: relative; width: var(--tap); height: 28px; background: none;
  margin: 2px auto -14px; border-radius: 8px;
}
.grab[role="button"]::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 36px; height: 4.5px;
  margin-left: -18px; border-radius: 3px; background: #D6D6DC; transition: background .2s, width .2s;
}
.sheet-handle:active .grab[role="button"]::after { background: #B4B4BC; width: 44px; margin-left: -22px; }
.grab[role="button"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.grab.dark { background: #D6D6DC; margin: 10px auto 2px; }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 18px 6px 20px;
}
.sheet-head h2 { font-size: var(--t-5xl); font-weight: 700; letter-spacing: -.028em; }

.searchbar {
  flex: none; display: flex; align-items: center; gap: 8px;
  margin: 4px 20px 2px; padding: 0 12px; height: 40px;
  background: var(--field); border-radius: 13px; color: var(--muted);
}
.searchbar .ic { width: 17px; height: 17px; }
.searchbar input { flex: 1; border: 0; background: none; font-size: var(--t-2xl); letter-spacing: -.01em; outline: 0; }
.searchbar input::placeholder { color: var(--faint); }
.searchbar button { color: var(--muted); display: grid; place-items: center; }

.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* --sheet-pad menjaga item terakhir tetap di atas tab bar di semua posisi snap. */
  padding: 0 20px calc(108px + env(safe-area-inset-bottom) + var(--sheet-pad, 0px));
}

/* ── Daftar transaksi ── */
.wrap-banner {
  display: block; width: 100%; min-height: var(--tap); border-radius: 22px;
  background: rgba(255,255,255,.1); color: var(--dash-text-soft);
  font-size: var(--t-sm); font-weight: 650;
}
.wrap-banner:active { opacity: .75; }
/* Varian buat sheet terang. */
.wrap-banner.light { background: var(--field); color: var(--ink); margin-top: 10px; }

.wchips {
  display: flex; gap: 7px; overflow-x: auto; padding: 0 2px 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wchips::-webkit-scrollbar { display: none; }
/* Kantong sekarang di sheet terang, bukan hero gelap. */
.wchip {
  flex: none; min-width: 96px; min-height: var(--tap); padding: 8px 12px; border-radius: 14px;
  background: var(--field); border: 1px solid transparent;
  text-align: left; color: var(--ink);
}
.wchip.on { border-color: var(--ink); }
.wchip b { display: block; font-size: var(--t-sm); font-weight: 700; letter-spacing: -.015em; }
.wchip i { display: block; margin-top: 2px; font-size: var(--t-xs); font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.wchip.neg i { color: var(--red); }

.moretx {
  display: block; width: 100%; margin: 14px 0 4px; height: 40px; border-radius: 20px;
  background: var(--field); color: var(--ink); font-size: var(--t-md); font-weight: 650;
}
.moretx:active { transform: scale(.98); }

.tab { position: relative; }
.tab-dot {
  position: absolute; top: 6px; right: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: #FF3B30;
}

.review-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.review-row b { font-size: var(--t-xl); letter-spacing: -.02em; }
.review-row i { font-style: normal; font-size: var(--t-sm); color: var(--muted); }
.review-acts { display: flex; gap: 8px; }
.review-acts button {
  flex: 1; min-height: var(--tap); border-radius: 22px; font-size: var(--t-md); font-weight: 650;
  background: var(--field);
}
.review-acts .ok { background: var(--ink); color: #fff; }
.review-acts .no { color: var(--red); }

.wrap-body { display: flex; flex-direction: column; gap: 18px; padding-bottom: 48px; }
.wrap-slide {
  padding: 22px 4px 8px;
}
.wrap-k { font-size: var(--t-md); font-weight: 650; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.wrap-v { margin-top: 8px; font-size: clamp(28px, 8vw, 36px); font-weight: 720; letter-spacing: -.035em; }
.wrap-s { margin-top: 6px; font-size: var(--t-xl); color: var(--muted); letter-spacing: -.015em; }
.wrap-list { margin-top: 14px; display: grid; gap: 10px; }
.wrap-list div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-xl); font-weight: 550; }
.wrap-list i { font-style: normal; color: var(--muted); }

.chipbar { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 10px; }
.chipbar:empty { display: none; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 10px 0 13px; border-radius: 18px;
  background: var(--ink); color: #fff; font-size: var(--t-sm); font-weight: 550;
}
.fchip .ic { width: 13px; height: 13px; stroke-width: 2.4; opacity: .7; }

.dayhdr {
  font-size: var(--t-xs); font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
  padding: 19px 0 7px;
}
.tx {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 7px 0; text-align: left;
  border-radius: 12px;
  transition: background .15s;
}
.tx:active { background: #F6F6F8; }
.tx-main { flex: 1 1 auto; min-width: 0; }
.tx-name {
  display: block;
  font-size: var(--t-xl); font-weight: 600; letter-spacing: -.017em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-sub { display: block; font-size: var(--t-sm); color: var(--muted); margin-top: 1.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt {
  flex: none; font-size: var(--t-xl); font-weight: 600; letter-spacing: -.022em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.tx-amt.in { color: var(--green); }

/* ── Lencana logo ── */
.logo {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--logo-bg, #fff);
  display: grid; place-items: center;
}
.logo.plain { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.logo.cat { color: var(--logo-fg, var(--muted)); }
.logo svg { width: 76%; height: 76%; display: block; }
.logo.cat svg { width: 58%; height: 58%; }

.empty { padding: 44px 10px; text-align: center; color: var(--faint); font-size: var(--t-md); line-height: 1.6; }

/* ── Tab bar mengambang ── */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 13px);
  display: flex; gap: 4px; padding: 5px;
  background: rgba(28, 28, 30, .93);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border-radius: 26px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .38);
  z-index: 40;
}
/* Ikon tanpa label bikin nebak-nebak — tiap tab dikasih nama. */
.tab {
  min-width: 72px; min-height: var(--tap); padding: 6px 10px 5px; border-radius: 18px;
  display: grid; justify-items: center; gap: 2px; color: rgba(255, 255, 255, .62);
  transition: color .2s, background .2s;
}
.tab span { font-size: var(--t-xs); font-weight: 600; letter-spacing: -.005em; }
.tab.is-active { color: #fff; background: rgba(255, 255, 255, .1); }
.tab:active { transform: scale(.94); }
/* "Catat" bukan tujuan navigasi, tapi aksi — dibedakan pakai tombol isi. */
.tab.add { color: #fff; }
.tab-plus {
  display: grid; place-items: center; width: 28px; height: 22px; border-radius: 11px;
  background: #fff; color: var(--ink);
}
.tab-plus .ic { width: 17px; height: 17px; stroke-width: 2.4; }

/* ══════════ 3. Detail transaksi ══════════ */

.scrim {
  inset: 0 auto 0 50%; height: 100%;
  background: rgba(0, 0, 0, .45);
  z-index: 55; opacity: 0; transition: opacity .34s ease;
}
.scrim.open { opacity: 1; }

.fullsheet {
  top: calc(env(safe-area-inset-top) + 46px);
  bottom: 0;
  background: #fff;
  border-radius: 26px 26px 0 0;
  z-index: 60;
  --ty: 100%;
  transition: transform .42s var(--ease);
  overflow: hidden;
}
.fullsheet.open { --ty: 0px; }
.fullsheet-body { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 26px 22px calc(34px + env(safe-area-inset-bottom)); }

/* Lingkaran abu-abunya tetap 32px, tapi area sentuhnya 44px lewat ::before. */
.closebtn {
  position: absolute; top: 11px; right: 11px; z-index: 3;
  width: var(--tap); height: var(--tap); border-radius: 50%;
  background: none; color: #3A3A3C; display: grid; place-items: center;
}
.closebtn::before {
  content: ""; position: absolute; width: 32px; height: 32px;
  border-radius: 50%; background: #F1F1F5;
}
.closebtn .ic { position: relative; }
.closebtn .ic { width: 15px; height: 15px; stroke-width: 2.2; }

.d-head { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
#d-logo .logo { width: 46px; height: 46px; }
.d-name { font-size: var(--t-4xl); font-weight: 700; letter-spacing: -.028em; }
.d-cat { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.d-amt { margin-top: 19px; font-size: var(--t-7xl); font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.d-amt.in { color: var(--green); }
.d-when { margin-top: 5px; font-size: var(--t-sm); color: var(--muted); }

.d-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 20px; }
.d-actions.four { grid-template-columns: repeat(4, 1fr); gap: 7px; }
.d-actions.four .actbtn span { font-size: var(--t-xs); }
.actbtn {
  height: 70px; border: 1px solid var(--line); border-radius: 15px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  color: var(--ink); transition: background .15s;
}
.actbtn:active { background: #F6F6F8; }
.actbtn .ic { width: 18px; height: 18px; }
.actbtn span { font-size: var(--t-xs); font-weight: 550; letter-spacing: -.01em; }
.actbtn.danger { color: var(--red); }

.secttl { margin: 26px 0 4px; font-size: var(--t-3xl); font-weight: 700; letter-spacing: -.024em; }

.drow { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 41px; }
.drow .k { font-size: var(--t-lg); color: var(--muted); flex: none; }
.drow .v { font-size: var(--t-lg); font-weight: 550; letter-spacing: -.01em; text-align: right; display: flex; align-items: center; gap: 7px; min-width: 0; }
.drow .v span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cardmark { width: 26px; height: 18px; flex: none; }
.cardmark svg { width: 100%; height: 100%; }
.okdot { display: inline-flex; align-items: center; gap: 5px; color: var(--green); }
.okdot .ic { width: 14px; height: 14px; stroke-width: 2.6; }

.items { margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.items > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; font-size: var(--t-md); }
.items > div + div { border-top: 1px solid var(--line); }
.items .nm { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .pr { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.items:empty { display: none; }

.impact {
  margin-top: 6px; height: 118px; border-radius: 16px;
  background: linear-gradient(145deg, #1C1C1E 0%, #131315 100%);
  padding: 16px 17px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.impact-top { display: flex; align-items: baseline; justify-content: space-between; }
.impact-cat { font-size: var(--t-md); font-weight: 600; letter-spacing: -.01em; }
.impact-pct { font-size: var(--t-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.impact-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.impact-bar i { display: block; height: 100%; border-radius: 4px; background: #fff; transition: width .5s var(--ease); }
.impact-bar i.warn { background: var(--amber); }
.impact-bar i.over { background: #FF6961; }
.impact-foot { display: flex; justify-content: space-between; font-size: var(--t-xs); color: rgba(255, 255, 255, .5); }
.impact-cap { margin-top: 9px; font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }

/* ══════════ Statistik ══════════ */

.statcards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-top: 12px; }
.statcard { background: var(--field); border-radius: 16px; padding: 13px 14px; }
.statcard .k { font-size: var(--t-xs); color: var(--muted); font-weight: 500; }
.statcard .v { margin-top: 3px; font-size: var(--t-4xl); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.statcard .v.warn { color: var(--amber); }
.statcard .v.over { color: var(--red); }
.statcard .s { margin-top: 2px; font-size: var(--t-xs); color: var(--faint); }

.chart-wrap { margin-top: 6px; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 108px; }
.chart .bar { flex: 1 1 0; background: #E6E6EB; border-radius: 2px; min-height: 2px; transition: height .4s var(--ease); }
.chart .bar.has { background: var(--ink); }
.chart .bar.hot { background: var(--red); position: relative; }
.chart .bar.hot::after {
  content: ""; position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--red);
}
.chart-axis { display: flex; justify-content: space-between; margin-top: 7px; font-size: var(--t-xs); color: var(--faint); }

.catrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.catrow .cat-main { flex: 1 1 auto; min-width: 0; }
.catrow .cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.catrow .cat-nm { font-size: var(--t-lg); font-weight: 600; letter-spacing: -.015em; }
.catrow .cat-amt { font-size: var(--t-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.catrow .bar2 { height: 6px; border-radius: 3px; background: #EEEEF2; margin-top: 7px; overflow: hidden; }
.catrow .bar2 i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width .5s var(--ease); }
.catrow .bar2 i.warn { background: var(--amber); }
.catrow .bar2 i.over { background: var(--red); }
.catrow .cat-sub { margin-top: 5px; font-size: var(--t-xs); color: var(--muted); }
.flag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: #FFECEB; color: var(--red); font-size: var(--t-xs); font-weight: 700; letter-spacing: .02em; }
.flag.soft { background: #FFF4DE; color: var(--amber); }

/* ══════════ Bottom sheets ══════════ */

.sheetmodal {
  bottom: 0;
  background: #fff;
  border-radius: 26px 26px 0 0;
  z-index: 60;
  padding: 0 20px calc(18px + env(safe-area-inset-bottom));
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  --ty: 100%;
  transition: transform .42s var(--ease);
}
.sheetmodal.open { --ty: 0px; }
.modal-ttl { font-size: var(--t-5xl); font-weight: 700; letter-spacing: -.028em; margin: 12px 0 4px; }
.modal-p { font-size: var(--t-md); color: var(--muted); line-height: 1.55; margin-top: 4px; }
.subttl { font-size: var(--t-sm); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 20px 0 8px; }

.rowbtn {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 13px 14px; margin-top: 10px;
  background: var(--field); border-radius: 16px; text-align: left;
}
.rowbtn:active { background: #EFEFF2; }
.rowbtn-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.rowbtn-ic.accent { background: linear-gradient(140deg, #5E5CE6, #0A84FF); }
.rowbtn-ic .ic { width: 18px; height: 18px; }
.rowbtn-tx { flex: 1 1 auto; min-width: 0; }
.rowbtn-tx b { display: block; font-size: var(--t-xl); font-weight: 600; letter-spacing: -.017em; }
.rowbtn-tx i { display: block; font-style: normal; font-size: var(--t-sm); color: var(--muted); margin-top: 1px; }
.rowbtn .chev { color: var(--faint); }

.fld { display: block; margin-top: 14px; }
.fld > span { display: block; font-size: var(--t-sm); font-weight: 550; color: var(--muted); margin-bottom: 6px; }
.fld input, .fld select {
  width: 100%; height: 48px;
  border: 1px solid #E7E7EC; border-radius: 14px; background: var(--field);
  padding: 0 14px; font-size: var(--t-2xl); letter-spacing: -.01em;
  -webkit-appearance: none; appearance: none; outline: 0;
}
.fld select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.7 6 7.8l3-3.1' fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
  padding-right: 34px;
}
.fld input:focus, .fld select:focus { border-color: #C9C9D0; background: #fff; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.amtwrap { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid #E7E7EC; border-radius: 14px; padding: 0 14px; height: 62px; }
.amtwrap i { font-style: normal; font-size: var(--t-4xl); font-weight: 600; color: var(--faint); }
.amtwrap input { flex: 1; height: 100%; border: 0; background: none; padding: 0; font-size: var(--t-6xl); font-weight: 700; letter-spacing: -.03em; outline: 0; font-variant-numeric: tabular-nums; }

.btn { width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 26px; font-size: var(--t-xl); font-weight: 600; letter-spacing: -.015em; margin-top: 12px; transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); min-height: var(--tap); margin-top: 4px; }

.dropzone {
  width: 100%; margin-top: 12px; padding: 30px 20px;
  border: 1.5px dashed #D9D9E0; border-radius: 18px; background: #FBFBFC;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink);
}
.dropzone .ic { width: 26px; height: 26px; stroke-width: 1.5; color: var(--muted); }
.dropzone b { font-size: var(--t-xl); font-weight: 600; letter-spacing: -.017em; }
.dropzone i { font-style: normal; font-size: var(--t-sm); color: var(--muted); text-align: center; }

.preview { margin-top: 12px; border-radius: 16px; overflow: hidden; max-height: 190px; background: #000; }
.preview img { width: 100%; height: 100%; max-height: 190px; object-fit: contain; display: block; }
.status { margin-top: 11px; font-size: var(--t-md); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status.err { color: var(--red); }
.status.ok { color: var(--green); }
.status .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #DDD; border-top-color: var(--ink); animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg) } }
.fld.pending input, .fld.pending .amtwrap { opacity: .55; }
.fld.flash input, .fld.flash .amtwrap { animation: scanfill .4s ease; }
@keyframes scanfill { from { background: #E8F5E9; } to { background: var(--field); } }
.warn { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #FFF4DE; color: var(--amber); font-size: var(--t-sm); line-height: 1.45; }

.seg { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.seg button { min-height: var(--tap); padding: 0 14px; border-radius: 17px; background: var(--field); font-size: var(--t-md); font-weight: 550; letter-spacing: -.01em; color: var(--ink); }
.seg button.on { background: var(--ink); color: #fff; }
.monthgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.monthgrid button { min-height: var(--tap); border-radius: 13px; background: var(--field); font-size: var(--t-md); font-weight: 550; }
.monthgrid button.on { background: var(--ink); color: #fff; }

/* ── Personalisasi ── */
.pcard { position: relative; margin-top: 12px; height: 132px; border-radius: 18px; overflow: hidden; background: #111; }
.pcard-bg { position: absolute; inset: 0; background: #111 center / cover no-repeat; --dim-top: .3; --dim-bot: .7; }
.pcard-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, var(--dim-top)), rgba(0, 0, 0, var(--dim-bot)));
}
.pcard-fg { position: absolute; inset: 0; z-index: 1; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.pcard-fg .avatar { width: 34px; height: 34px; font-size: var(--t-md); margin-bottom: 7px; }
.pcard-fg b { font-size: var(--t-3xl); font-weight: 650; letter-spacing: -.02em; color: #fff; }
.pcard-fg i { font-style: normal; font-size: var(--t-xs); color: rgba(255, 255, 255, .6); }

.photorow { display: flex; gap: 8px; align-items: stretch; }
.photopick {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; border-radius: 14px; background: var(--field); border: 1px solid #E7E7EC;
  font-size: var(--t-lg); font-weight: 550; letter-spacing: -.015em; color: var(--ink);
}
.photopick:active { background: #EFEFF2; }
.photopick .ic { width: 18px; height: 18px; color: var(--muted); }
.photodrop { flex: none; width: 48px; border-radius: 14px; background: #FFECEB; color: var(--red); display: grid; place-items: center; }
.photodrop .ic { width: 16px; height: 16px; stroke-width: 2.2; }

.steps { list-style: none; margin-top: 14px; display: grid; gap: 11px; }
/* Nomor langkah diposisikan absolut biar teksnya tetap mengalir dan bisa wrap. */
.steps li { position: relative; padding-left: 35px; min-height: 24px; font-size: var(--t-lg); letter-spacing: -.01em; line-height: 1.45; }
.steps li span { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: var(--t-sm); font-weight: 700; display: grid; place-items: center; }
.ic.inline { width: 15px; height: 15px; vertical-align: -2px; display: inline-block; }

/* ── baris salin (alamat + token shortcut) ── */
.copyrow {
  display: flex; align-items: center; gap: 10px; margin-top: 9px;
  padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--field);
}
.copyrow-tx { flex: 1; min-width: 0; }
.copyrow-tx i { display: block; font-style: normal; font-size: var(--t-xs); color: var(--muted); }
.copyrow-tx b {
  display: block; margin-top: 2px; font-size: var(--t-md); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copyrow-tx b.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-sm); }
.copybtn {
  flex: none; min-height: var(--tap); padding: 0 16px; border-radius: 22px;
  background: var(--ink); color: #fff; font-size: var(--t-md); font-weight: 650;
}
.copybtn:active { opacity: .8; }
.copybtn.done { background: var(--green); }

/* ══════════ Toast ══════════ */

.toast {
  position: fixed; left: 50%; z-index: 80;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  transform: translate(-50%, 16px);
  max-width: min(calc(100% - 40px), 380px);
  padding: 11px 18px; border-radius: 22px;
  background: rgba(28, 28, 30, .97);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: #fff; font-size: var(--t-md); font-weight: 500; letter-spacing: -.01em;
  text-align: center; line-height: 1.4;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease, transform .28s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.has-act {
  display: flex; align-items: center; gap: 4px; text-align: left;
  padding: 7px 7px 7px 18px; pointer-events: auto;
}
.toast-msg { flex: 1; min-width: 0; }
.toast-act {
  flex: none; min-height: var(--tap); padding: 0 16px; border-radius: 22px;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-size: var(--t-md); font-weight: 650; letter-spacing: -.01em;
}
.toast-act:active { background: rgba(255, 255, 255, .26); }

/* ── Bagi rata ── */
.stepper { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.stepper button {
  flex: none; width: 52px; height: 52px; border-radius: 26px;
  background: var(--field); color: var(--ink); display: grid; place-items: center;
}
.stepper button:active { background: #EAEAEF; }
.stepper button[disabled] { opacity: .4; }
.stepper button .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.stepper-val { flex: 1; text-align: center; }
.stepper-val b { display: block; font-size: var(--t-6xl); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stepper-val i { display: block; margin-top: 1px; font-style: normal; font-size: var(--t-md); color: var(--muted); }
.splitout {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 16px; padding: 14px 16px; border-radius: 15px; background: var(--field);
}
.splitout span { font-size: var(--t-lg); color: var(--muted); }
.splitout b { font-size: var(--t-4xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ══════════ Preferensi sistem ══════════ */

/* Reduce Motion: hentikan animasi dan transisi, sisakan perubahan opacity
   supaya sheet tetap kelihatan muncul dan hilang. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .sheetmodal, .fullsheet, .scrim, .toast {
    transition: opacity .12s linear !important;
  }
  .tab:active, .btn:active { transform: none; }
}

/* Increase Contrast: teks sekunder jadi hampir sehitam teks utama dan
   garis pemisah dipertegas. */
@media (prefers-contrast: more) {
  :root {
    --muted: #3A3A3F;
    --faint: #4A4A50;
    --line: #C7C7CC;
    --green: #146B31;
    --red: #A80014;
    --amber: #6F4800;
    --dash-text-soft: rgba(255, 255, 255, .92);
    --dash-text-muted: rgba(255, 255, 255, .82);
    --dash-border: rgba(255, 255, 255, .32);
  }
  .tab { color: rgba(255, 255, 255, .72); }
  .fld input, .fld select { border: 1px solid var(--line); }
}

/* Sembunyikan semuanya sampai app.js memutuskan layar mana yang tampil. */
body.booting .intro, body.booting .app { visibility: hidden; }

/* Layar pendek: dashboard dipadatkan supaya muat di atas sheet yang mengintip. */
/* Dipakai app.js kalau dashboard lebih tinggi dari ruang di atas sheet. */
.hero.tight .dash { gap: 6px; }
.hero.tight .dash-bal { padding: 11px 14px 10px; }
.hero.tight .dash-bal-amt { font-size: var(--t-5xl); margin-top: 2px; }
.hero.tight .dash-bal-foot { margin-top: 8px; padding-top: 8px; }

.hero.tight2 .dash { gap: 5px; }
.hero.tight2 .dash-bal { padding: 10px 13px 8px; }
.hero.tight2 .dash-bal-amt { font-size: var(--t-4xl); }
.hero.tight2 .dash-bal-foot { margin-top: 6px; padding-top: 6px; }

@media (max-height: 700px) {
  .hero { padding: 6px 16px 10px; }
  .dash { gap: 9px; }
  .dash-bal { padding: 13px 15px 11px; }
  .dash-bal-amt { font-size: clamp(24px, 7.2vw, 28px); margin-top: 4px; }
  .dash-bal-foot { margin-top: 10px; padding-top: 10px; }
}

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