/* VOICE: a personal money app in Malay, plain and direct
   IDEA: FinWise — a household cash book in a midnight-purple wallet with gold trim
   PICTURE: the gold "baki bajet" figure on the violet hero card, then the 9-tile menu
   COLOUR and TYPE: deep indigo ground, violet cards, gold accent; amber/red for warnings only; Plus Jakarta Sans
   LAYOUT: phone column up to 480px, sticky header, floating bottom nav with a gold + */
:root{color-scheme:dark;--bg:#0B1B3A;--card:#13284F;--card2:#102347;--line:#2A4A85;--gold:#E8B10E;--gold2:#F6D36B;--mut:#B8C7E6;--soft:#D3DEF2;--ok:#5BE49B;--amb:#FF8A5C;--red:#FF6B6B;--ink:#0B1B3A}
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--bg);color:#fff;font:15px/1.5 "Plus Jakarta Sans",system-ui,sans-serif;overflow-x:clip}
.app{max-width:480px;margin:0 auto;padding:0 16px 120px}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;min-height:44px;border-radius:14px;border:1px solid var(--line);background:var(--card);padding:0 14px}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
input,select{background:var(--card);border:1px solid var(--line);border-radius:12px;min-height:46px;padding:0 12px;font-size:16px;width:100%}
input[type=date],input[type=month]{color-scheme:dark}
.top{position:sticky;top:0;z-index:5;background:var(--bg);display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 0 10px}
.brand{display:flex;align-items:center;gap:10px}.brand b{font-size:21px;font-weight:800;font-style:italic;letter-spacing:-.3px}.brand b span{color:var(--gold)}
.brand small{display:block;font-size:11px;color:var(--mut);letter-spacing:.3px}
.ib{width:44px;padding:0;display:flex;align-items:center;justify-content:center;position:relative;flex:none}
.badge{position:absolute;top:-5px;right:-5px;min-width:19px;height:19px;border-radius:10px;background:#E5484D;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px}
h1{font-size:20px;margin:0;font-weight:800}h2{font-size:14px;margin:18px 0 10px;color:var(--soft);font-weight:700}
.hero{border-radius:22px;padding:18px;background:linear-gradient(140deg,#1E3F78,#13284F);border:1px solid #2A4A85;box-shadow:0 10px 30px rgba(4,10,30,.5)}
.hero .lbl{display:flex;justify-content:space-between;font-size:13px;color:var(--soft);font-weight:600}
.big{font-size:clamp(34px,10vw,42px);font-weight:800;color:var(--gold2);margin:4px 0 10px;letter-spacing:-.5px;white-space:nowrap}
.pbar{height:10px;border-radius:5px;background:rgba(255,255,255,.18);overflow:hidden}.pbar i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,var(--gold),var(--gold2));transition:width .4s}
.sub{font-size:13px;color:#E6EDF8;margin-top:8px}
.pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.mini{background:rgba(11,27,58,.5);border-radius:12px;padding:8px 10px}.mini small{display:block;font-size:11px;color:var(--mut)}.mini b{font-size:14px}
.okt{color:var(--ok)}.ambt{color:var(--amb)}.redt{color:var(--red)}.mutt{color:var(--mut)}
.warn{display:flex;gap:10px;align-items:center;background:#3A1E1A;border:1px solid #8A3E2C;border-radius:14px;padding:10px 12px;font-size:13px;color:#FFD4C2;margin-top:12px}
.menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tile{height:84px;border-radius:18px;background:var(--card);border:1px solid #E8B10E55;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:600;padding:0}
.tile svg{width:28px;height:28px;stroke:var(--gold);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.card{background:var(--card);border-radius:16px;padding:14px;margin-bottom:10px}
.row{display:flex;justify-content:space-between;align-items:baseline;gap:10px}.row b{font-weight:700}
.num{white-space:nowrap;text-align:right}
.mb{height:7px;border-radius:4px;background:#1A3466;overflow:hidden;margin:8px 0 5px}.mb i{display:block;height:100%;border-radius:4px;background:var(--gold)}
.mb.amb i{background:var(--amb)}.mb.red i{background:var(--red)}.mb.ok i{background:var(--ok)}
.sm{font-size:13px;color:var(--mut)}
.acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;align-items:center}.acts input{width:120px;flex:none;min-height:40px}
.x{min-height:38px;font-size:13px;padding:0 12px;border-radius:12px}
.gold{background:linear-gradient(160deg,var(--gold2),#C98F05);color:var(--ink);border:0;font-weight:800}
.ghost{background:transparent;border-color:#E8B10E88;color:var(--gold2);font-weight:700}
.full{width:100%;min-height:54px;font-size:17px}
.mnav{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:4px 0 12px}.mnav span{font-weight:700}
.mnav button{width:44px;padding:0;font-size:20px;color:var(--gold)}
.seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;background:var(--card);border-radius:14px;padding:4px;margin-bottom:12px}
.snap{display:flex;align-items:center;gap:14px;width:100%;padding:12px;border:1.5px dashed var(--gold);background:var(--card2);border-radius:18px;text-align:left;min-height:72px}
.snap>span:first-child{width:48px;height:48px;border-radius:14px;background:#16305E;display:flex;align-items:center;justify-content:center;flex:none}
.amt{display:flex;align-items:baseline;gap:8px;border-bottom:2px solid var(--gold);margin:6px 0 14px}
.amt span{font-size:22px;color:var(--mut);font-weight:700}
.amt input{border:0;background:transparent;color:var(--gold2);font-size:38px;font-weight:800;padding:2px 0;min-height:0}
.amt input:focus-visible{outline:none}
.lb{font-size:13px;color:var(--mut);font-weight:600;display:block;margin-bottom:6px}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.chip{min-height:40px;border-radius:20px;padding:0 14px;font-size:13px;font-weight:600}
.chip[aria-checked=true]{background:var(--gold);color:var(--ink);border-color:var(--gold);font-weight:800}
.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}
.al{list-style:none;margin:0;padding:0}.al li{padding:10px 12px;border-radius:12px;margin-bottom:8px;background:var(--card);border-left:4px solid var(--mut);font-size:14px}
.al li.red{border-color:var(--red)}.al li.amb{border-color:var(--amb)}.al li.ok{border-color:var(--ok)}
.sg{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;gap:6px;align-items:center;padding:8px 0;border-bottom:1px solid #1E3A6E}
.sg .w{grid-column:1/-1}
.bars{display:flex;align-items:flex-end;gap:14px;height:120px;margin-top:10px}
.bars div{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;font-size:12px;font-weight:700}
.bars i{display:block;width:100%;border-radius:10px 10px 4px 4px}
.blab{display:flex;gap:14px;font-size:12px;color:var(--soft);margin-top:6px}.blab span{flex:1;text-align:center}
.cmp{display:grid;grid-template-columns:100px minmax(0,1fr) 46px;gap:8px;align-items:center;margin-bottom:10px;font-size:13px}
.cmp i{display:block;height:6px;border-radius:3px;margin:2px 0}
nav.bn{position:fixed;left:50%;transform:translateX(-50%);bottom:12px;width:min(456px,calc(100% - 24px));height:68px;border-radius:24px;background:var(--card2);border:1px solid #E8B10E66;display:flex;align-items:center;justify-content:space-around;box-shadow:0 -6px 24px rgba(4,10,30,.6);z-index:6}
nav.bn button{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;font-weight:600;color:var(--mut);min-width:56px;padding:0}
nav.bn button svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
nav.bn button[aria-current=page]{color:var(--gold);font-weight:800}
nav.bn .plus{width:58px;height:58px;min-width:58px;margin-top:-28px;border-radius:29px;background:linear-gradient(160deg,var(--gold2),#C98F05);border:3px solid var(--bg);box-shadow:0 6px 18px rgba(232,177,14,.45);justify-content:center}
nav.bn .plus svg{stroke:var(--ink);stroke-width:3;width:26px;height:26px}
#toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:var(--gold2);color:var(--ink);font-weight:700;padding:10px 16px;border-radius:12px;opacity:0;pointer-events:none;transition:opacity .2s;max-width:90vw;z-index:9}
#toast.on{opacity:1}
.foot{color:var(--mut);font-size:12px;text-align:center;margin-top:24px}
[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.pbar i{transition:none}}
.gate{max-width:420px;margin:0 auto;padding:56px 20px 40px;display:flex;flex-direction:column;align-items:center;gap:6px}
.gate form{width:100%;margin-top:14px}
.gname{font-size:40px;font-weight:800;font-style:italic;letter-spacing:-.5px;margin-top:10px}.gname span{color:var(--gold)}
.gtag{color:var(--mut);font-size:14px;margin-bottom:8px}
.modal{position:fixed;inset:0;background:rgba(4,10,30,.75);display:flex;align-items:center;justify-content:center;padding:20px;z-index:20}
.modal .card{max-width:400px;width:100%}
button:disabled{opacity:.6;cursor:wait}
