:root{
  /* "Kantong" theme — modern fintech, app-in-your-pocket.
     Plus Jakarta Sans for UI, IBM Plex Mono for every money figure. */
  --bg:#F4F6F3; --surface:#FFFFFF; --surface2:#ECF1EC; --border:#E0E7E0;
  --text:#0E1613; --muted:#5C6B62; --faint:#93A198;
  --primary:#0E8A5A; --primary-ink:#0B6B46; --tint:#E2F3EA;
  --accent:#F0B429; --success:#12A164; --warning:#E39D17; --danger:#DE5449;
  --shadow:0 1px 2px rgba(14,22,19,.05),0 10px 30px -18px rgba(14,22,19,.18);
  --radius:18px; --radius-sm:12px;
  --font-body:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,monospace;
}
[data-theme="dark"]{
  --bg:#0C120F; --surface:#141B17; --surface2:#1B241F; --border:#26312A;
  --text:#ECF2ED; --muted:#9DABA1; --faint:#69776D;
  --primary:#2FBF7F; --primary-ink:#27A76E; --tint:#17281F;
  --success:#34C784; --danger:#EF6B60;
  --shadow:0 1px 2px rgba(0,0,0,.35),0 14px 34px -18px rgba(0,0,0,.6);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{animation:none!important;transition:none!important}}
body{font-family:var(--font-body);background:var(--bg);color:var(--text);line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button,input,select{font-family:inherit}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
.mono,.value,.stat .value{font-family:var(--font-mono);font-variant-numeric:tabular-nums}

/* ---------- app shell ---------- */
.app-shell{display:flex;min-height:100vh}
.sidebar{width:250px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);
  display:flex;flex-direction:column;padding:20px 14px;position:sticky;top:0;height:100vh;overflow-y:auto}
.brand{display:flex;align-items:center;gap:10px;padding:0 8px 22px}
.brand .logo{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#fff;
  background:var(--primary);font-weight:800;font-size:13px;letter-spacing:-.02em}
.brand b{font-size:15.5px;font-weight:800;letter-spacing:-.02em}
.brand span{font-size:10.5px;color:var(--faint);display:block;font-weight:500}
.nav{display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:12px;
  font-size:13.5px;font-weight:600;color:var(--muted);transition:background .15s,color .15s}
.nav a:hover{background:var(--surface2);color:var(--text)}
.nav a.active{background:var(--tint);color:var(--primary-ink)}
[data-theme="dark"] .nav a.active{color:var(--primary)}
.nav .heading{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--faint);padding:16px 12px 6px;font-weight:700}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;padding:14px 22px;
  background:color-mix(in srgb,var(--bg) 78%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--border)}
.topbar h1{font-size:19px;font-weight:800;letter-spacing:-.02em}
.topbar .sub{font-size:12px;color:var(--faint);font-weight:500}
.content{padding:22px;display:flex;flex-direction:column;gap:18px}

/* ---------- bottom tab bar (mobile) — the app feel ---------- */
.tabbar{display:none}
@media(max-width:860px){
  .sidebar{display:none}
  .scrim{display:none!important}
  .hamburger{display:none!important}
  .content{padding:16px;padding-bottom:96px}
  .topbar{padding:12px 16px;background:var(--surface);backdrop-filter:none}
  .topbar .sub{display:none}
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:50;display:flex;align-items:flex-end;
    justify-content:space-around;background:var(--surface);
    border-top:1px solid var(--border);
    padding:8px 6px calc(10px + env(safe-area-inset-bottom))}
  .tabbar a{display:flex;flex-direction:column;align-items:center;gap:3px;flex:1;
    font-size:10.5px;font-weight:600;color:var(--faint);padding:4px 2px;border-radius:12px}
  .tabbar a .tic{font-size:19px;line-height:1}
  .tabbar a.active{color:var(--primary-ink)}
  [data-theme="dark"] .tabbar a.active{color:var(--primary)}
  .tabbar .fab{flex:0 0 auto;margin:0 4px;transform:translateY(-14px)}
  .tabbar .fab span{display:grid;place-items:center;width:52px;height:52px;border-radius:999px;
    background:var(--primary);color:#fff;font-size:26px;font-weight:600;
    box-shadow:0 10px 22px -8px color-mix(in srgb,var(--primary) 70%,transparent)}
}

/* ---------- components ---------- */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:18px;transition:transform .18s ease}
.card.hover:hover{transform:translateY(-2px)}
.grid{display:grid;gap:14px}
.stat .label{color:var(--muted);font-size:12.5px;font-weight:600}
.stat .value{font-size:23px;font-weight:600;letter-spacing:-.01em;margin-top:10px}
.stat .icon{padding:8px;border-radius:12px;display:inline-flex}
.section-title{font-size:15px;font-weight:800;letter-spacing:-.01em;margin-bottom:14px}
.progress{background:var(--surface2);border-radius:999px;height:8px;overflow:hidden}
.progress>span{display:block;height:100%;border-radius:999px;transition:width .8s ease}
.badge{font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:999px}
.btn{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;border-radius:999px;border:1px solid var(--border);
  background:var(--surface);color:var(--text);font-size:13px;font-weight:700;cursor:pointer;transition:.15s}
.btn:hover{background:var(--surface2)}
.btn-primary{border:none;color:#fff;background:var(--primary)}
.btn-primary:hover{background:var(--primary-ink)}
.btn-danger{border:none;background:var(--danger);color:#fff}
.btn-sm{padding:6px 12px;font-size:12px}
.input,select.input{width:100%;padding:11px 14px;border-radius:14px;border:1.5px solid var(--border);
  background:var(--surface);color:var(--text);font-size:14px;outline:none;transition:border-color .15s}
.input:focus{border-color:var(--primary)}
label.field{display:block;font-size:12.5px;font-weight:700;color:var(--muted);margin:12px 0 6px}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--faint);font-weight:700;padding:12px 16px}
td{padding:12px 16px;border-top:1px solid var(--border)}
tbody tr:hover{background:var(--surface2)}
.icon-btn{width:38px;height:38px;border-radius:999px;border:1px solid var(--border);background:var(--surface);
  color:var(--muted);cursor:pointer;display:grid;place-items:center}
.avatar{width:36px;height:36px;border-radius:999px;display:grid;place-items:center;color:#fff;font-weight:800;
  font-size:12.5px;background:var(--primary)}
.empty{padding:44px 20px;text-align:center}
.empty .ic{width:54px;height:54px;margin:0 auto 14px;border-radius:16px;display:grid;place-items:center;
  background:var(--tint);color:var(--primary-ink);font-size:22px}

/* ---------- toast + modal ---------- */
.toast-wrap{position:fixed;top:16px;right:16px;z-index:100;display:flex;flex-direction:column;gap:10px}
.toast{background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--primary);
  border-radius:14px;padding:12px 16px;box-shadow:var(--shadow);font-size:13.5px;min-width:220px;max-width:88vw;animation:slidein .3s}
.toast.success{border-left-color:var(--success)}.toast.error{border-left-color:var(--danger)}
@keyframes slidein{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
.modal-backdrop{position:fixed;inset:0;background:rgba(6,10,8,.5);display:none;place-items:center;z-index:90;backdrop-filter:blur(3px)}
.modal-backdrop.show{display:grid}
.modal{background:var(--surface);border-radius:22px;padding:26px;max-width:380px;width:90%;box-shadow:var(--shadow);text-align:center}
.hamburger{display:none}

/* ============ LANDING — "app in your pocket" ============ */
.landing{max-width:1060px;margin:0 auto;padding:0 22px}
.lnav{position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;
  padding:16px 0;background:color-mix(in srgb,var(--bg) 80%,transparent);backdrop-filter:blur(14px)}
.lnav .word{display:flex;align-items:center;gap:9px;font-weight:800;font-size:16px;letter-spacing:-.02em}
.lnav .word .logo{width:30px;height:30px;border-radius:10px;background:var(--primary);color:#fff;
  display:grid;place-items:center;font-size:11px;font-weight:800}
.lnav .links{display:flex;align-items:center;gap:16px;font-size:13.5px;font-weight:600;color:var(--muted)}
.lnav .links a:hover{color:var(--text)}

.hero{display:grid;grid-template-columns:1.1fr .9fr;gap:44px;align-items:center;padding:64px 0 56px}
.hero .eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:var(--primary-ink);
  background:var(--tint);border-radius:999px;padding:6px 14px;margin-bottom:20px}
.hero h1{font-size:clamp(34px,4.6vw,54px);font-weight:800;letter-spacing:-.035em;line-height:1.06}
.hero h1 em{font-style:normal;color:var(--primary)}
.hero p{color:var(--muted);font-size:16.5px;max-width:30em;margin:18px 0 28px;line-height:1.65}
.hero .cta-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.btn-lg{padding:13px 24px;font-size:14.5px}
.hero .cta-note{font-size:12px;color:var(--faint);margin-top:14px}

/* phone mockup — the signature */
.phone-wrap{display:flex;justify-content:center}
.phone{width:270px;border-radius:40px;background:var(--text);padding:10px;
  box-shadow:0 30px 60px -24px rgba(14,22,19,.4)}
.phone .screen{border-radius:32px;background:var(--bg);overflow:hidden;padding:16px 14px 0;min-height:480px;position:relative}
.phone .notch{width:84px;height:22px;background:var(--text);border-radius:999px;margin:0 auto 14px}
.phone .p-greet{font-size:11px;color:var(--faint);font-weight:600}
.phone .p-balance{font-family:var(--font-mono);font-size:24px;font-weight:600;letter-spacing:-.01em;margin:2px 0 12px}
.phone .p-chiprow{display:flex;gap:7px;margin-bottom:12px}
.phone .p-chip{flex:1;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:9px 10px}
.phone .p-chip .l{font-size:8.5px;color:var(--faint);font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.phone .p-chip .v{font-family:var(--font-mono);font-size:12px;font-weight:600;margin-top:3px}
.phone .p-chip .v.up{color:var(--success)}
.phone .p-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:12px;margin-bottom:10px}
.phone .p-card .t{font-size:11px;font-weight:800;margin-bottom:9px}
.phone .p-bars{display:flex;align-items:flex-end;gap:6px;height:56px}
.phone .p-bars i{flex:1;border-radius:5px 5px 0 0;background:var(--tint)}
.phone .p-bars i.hi{background:var(--primary)}
.phone .p-row{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-top:1px solid var(--border);font-size:10.5px}
.phone .p-row:first-of-type{border-top:none}
.phone .p-row .n{font-weight:600}
.phone .p-row .d{color:var(--faint);font-size:9px}
.phone .p-row .a{font-family:var(--font-mono);font-weight:600}
.phone .p-row .a.plus{color:var(--success)}
.phone .p-tabs{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-around;align-items:flex-end;
  padding:8px 10px 12px;background:color-mix(in srgb,var(--surface) 92%,transparent);border-top:1px solid var(--border)}
.phone .p-tabs span{font-size:8.5px;font-weight:700;color:var(--faint);display:flex;flex-direction:column;align-items:center;gap:2px}
.phone .p-tabs span.on{color:var(--primary-ink)}
.phone .p-tabs .pfab{width:36px;height:36px;border-radius:999px;background:var(--primary);color:#fff;display:grid;
  place-items:center;font-size:18px;transform:translateY(-10px);box-shadow:0 8px 16px -6px color-mix(in srgb,var(--primary) 70%,transparent)}

/* install strip */
.install-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding:8px 0 40px}
.install-strip .step{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;gap:13px;align-items:flex-start}
.install-strip .n{width:30px;height:30px;flex-shrink:0;border-radius:999px;background:var(--tint);color:var(--primary-ink);
  display:grid;place-items:center;font-weight:800;font-size:13px}
.install-strip h3{font-size:14px;font-weight:800;letter-spacing:-.01em}
.install-strip p{font-size:12.5px;color:var(--muted);margin-top:4px;line-height:1.5}

/* bento features */
.section-head{padding:44px 0 24px}
.section-head h2{font-size:clamp(24px,3vw,32px);font-weight:800;letter-spacing:-.03em}
.section-head p{color:var(--muted);font-size:15px;margin-top:8px;max-width:36em}
.bento{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding-bottom:44px}
.bento .tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px;transition:transform .18s}
.bento .tile:hover{transform:translateY(-3px)}
.bento .tile.wide{grid-column:span 2}
.bento .tic{width:40px;height:40px;border-radius:13px;background:var(--tint);color:var(--primary-ink);
  display:grid;place-items:center;font-size:18px;margin-bottom:14px}
.bento h3{font-size:15.5px;font-weight:800;letter-spacing:-.01em}
.bento p{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.6}
.bento .mini-money{font-family:var(--font-mono);font-size:12px;color:var(--primary-ink);background:var(--tint);
  display:inline-block;border-radius:8px;padding:3px 8px;margin-top:12px}

.faq{max-width:680px;padding-bottom:44px}
.faq details{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px 18px;margin-bottom:10px}
.faq summary{font-weight:700;cursor:pointer;font-size:14.5px;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq p{color:var(--muted);font-size:13.5px;margin-top:10px;line-height:1.6}
.lfooter{border-top:1px solid var(--border);padding:26px 0 44px;color:var(--faint);font-size:12.5px;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
.lfooter a{margin-left:16px;font-weight:600}
.lfooter a:first-child{margin-left:0}
.lfooter a:hover{color:var(--text)}
.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:22px}
.auth-card{width:100%;max-width:410px;border-radius:24px}

@media(max-width:860px){
  .hero{grid-template-columns:1fr;gap:36px;padding:36px 0 40px;text-align:left}
  .install-strip{grid-template-columns:1fr}
  .bento{grid-template-columns:1fr}
  .bento .tile.wide{grid-column:span 1}
  .lnav .links a.hide-m{display:none}
}

/* ============ MOBILE LAYOUT FIXES ============
   Every page lays out with class="grid" + an inline grid-template-columns
   (e.g. "320px 1fr"). Inline styles win over normal stylesheet rules, so
   these use !important — the one legitimate use — to force a single,
   full-width column on small screens. No page needs editing individually. */
@media(max-width:860px){
  html,body{overflow-x:hidden;max-width:100vw}
  .grid{grid-template-columns:1fr!important}
  /* stat cards stay 2-up: denser and more app-like than a long single stack */
  .grid:has(> .stat){grid-template-columns:1fr 1fr!important}
  .stat .value{font-size:17px}
  .card{max-width:100%;overflow-x:auto}   /* tables scroll inside their card, not the page */
  .card table{min-width:560px}             /* keep table columns readable while scrolling */
  .input,select.input{max-width:100%}
  .content{gap:14px}
  .topbar h1{font-size:17px}
  .section-title{margin-bottom:12px}

  /* --- form field polish (fixes the "Date off-pixel" + cramped look) --- */
  /* iOS Safari renders date/select/file inputs at a different intrinsic
     height than text inputs, which is what made the Date field look
     misaligned. Pin every field to the same box model so they line up. */
  .input,select.input,
  input[type="date"].input,
  input[type="file"].input{
    height:48px;
    line-height:1.2;
    padding:12px 14px;
    font-size:16px;               /* 16px stops iOS auto-zoom on focus */
    -webkit-appearance:none;
    appearance:none;
    text-align:left;
  }
  /* date inputs on iOS center their text oddly — force left alignment
     and vertical centering of the native value */
  input[type="date"].input{
    display:flex;
    align-items:center;
    text-align:left;
    min-height:48px;
  }
  input[type="date"].input::-webkit-date-and-time-value{ text-align:left; }
  /* file input ("Choose File … no file selected") wraps awkwardly — let it breathe */
  input[type="file"].input{
    height:auto;
    min-height:48px;
    padding:11px 14px;
    display:flex;
    align-items:center;
  }
  label.field{margin:14px 0 6px;font-size:13px}
  /* the "Add transaction" title sat too close to the card's top edge on mobile */
  .card .section-title:first-child{margin-top:2px}
  /* full-width primary actions inside forms already set width:100% inline — keep tidy */
  .card .form .btn{font-size:14px}
  /* touch devices have no hover — the transform/transition just costs paint */
  .card,.card.hover:hover,.bento .tile:hover{transform:none;transition:none}
}
