/* Divine Power: design system v2
   Calm like a bank app: white cards on a cool paper ground, one deep green for trust,
   kente gold only for the one main action on a screen, red only for money going out.
   One family (Manrope), tabular figures, money is always the largest thing on screen. */
:root{
  --paper:#F3F5F4;--surface:#fff;--sunk:#EEF2F0;--ink:#0F1F19;--ink2:#3A4A43;--mute:#6B7A73;--rule:#E3E8E5;
  --green:#0B6B4E;--green-d:#08513B;--green-soft:#E1F1EA;--green-x:#073D2D;
  --gold:#F2B705;--gold-d:#C99500;--gold-soft:#FFF5D1;
  --red:#C2341F;--red-soft:#FCEAE6;--indigo:#2C4C9C;--indigo-soft:#E7ECF8;--amber:#9A5A00;--amber-soft:#FFF0D9;
  --r-xl:24px;--r-lg:20px;--r:16px;--r-sm:12px;
  --lift:0 1px 2px rgba(15,31,25,.05),0 1px 1px rgba(15,31,25,.03);
  --float:0 12px 32px -14px rgba(15,31,25,.28);
  --font:"Manrope",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
body.sun{--paper:#000;--surface:#0b0b0b;--sunk:#151515;--ink:#fff;--ink2:#fff;--mute:#FFD84D;--rule:#444;--green-soft:#0d3326;--gold-soft:#3a2f00;--red-soft:#3d0f08;--indigo-soft:#0f1d40;--amber-soft:#3a2500;--lift:none;--float:none}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--paper);color:var(--ink);font:500 16px/1.5 var(--font);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px;border-radius:8px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
svg.i{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
[hidden]{display:none!important}

/* ---------- frame ---------- */
#shell{display:flex;min-height:100vh}
.col{flex:1;min-width:0;display:flex;flex-direction:column}
.bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:6px;padding:calc(10px + env(safe-area-inset-top)) 12px 8px 18px;background:color-mix(in srgb,var(--paper) 92%,transparent);backdrop-filter:blur(10px)}
.bar-t{flex:1;min-width:0;display:flex;flex-direction:column}
.bar-t strong{font-size:17px;font-weight:800;letter-spacing:-.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-t span{font-size:13px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-btn{position:relative;flex:none;width:42px;height:42px;border:0;border-radius:14px;background:var(--surface);color:var(--ink);display:grid;place-items:center;box-shadow:var(--lift);text-decoration:none}
.icon-btn.ghost{background:none;box-shadow:none}
.icon-btn .dot{position:absolute;top:9px;right:10px;width:9px;height:9px;border-radius:9px;background:var(--red);box-shadow:0 0 0 2px var(--surface)}
.net,.asbar{display:flex;align-items:center;gap:10px;margin:0 14px 8px;padding:6px 6px 6px 12px;border-radius:var(--r-sm);font-size:14px;font-weight:600}
.net{background:var(--amber-soft);color:var(--amber)}
.asbar{background:var(--indigo-soft);color:var(--indigo)}
.net span,.asbar span{flex:1;min-width:0}
.net button,.asbar button{flex:none;border:0;border-radius:10px;padding:7px 12px;font-weight:800;color:#fff;white-space:nowrap}
.net button{background:var(--amber)}.asbar button{background:var(--indigo)}
main{width:100%;max-width:720px;margin:0 auto;padding:4px 16px calc(112px + env(safe-area-inset-bottom));outline:none}
.loading{display:grid;place-items:center;height:40vh}.loading span{width:28px;height:28px;border-radius:50%;border:3px solid var(--rule);border-top-color:var(--green);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- type ---------- */
h1{font-size:25px;line-height:1.15;font-weight:800;letter-spacing:-.6px;margin:6px 0 14px}
h2{font-size:16px;font-weight:800;letter-spacing:-.2px;margin:24px 0 10px}
p{margin:0 0 10px}
.mute{color:var(--mute)}.small{font-size:14px}.tiny{font-size:12.5px}
.num{font-weight:800;letter-spacing:-.3px;white-space:nowrap}
.out{color:var(--red)}.inc{color:var(--green)}
.lede{font-size:15px;color:var(--ink2);margin-top:-6px;margin-bottom:16px}
.sec{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:22px 2px 10px}
.sec h2{margin:0}
.sec a,.sec button{border:0;background:none;padding:0;color:var(--green-d);font-weight:800;font-size:14px;text-decoration:none}

/* ---------- surfaces ---------- */
.panel{background:var(--surface);border-radius:var(--r-lg);padding:16px;margin-bottom:12px;box-shadow:var(--lift)}
.panel.tint{background:var(--sunk);box-shadow:none}
.note{display:flex;gap:10px;align-items:flex-start;border-radius:var(--r);padding:12px 14px;margin-bottom:12px;font-size:14.5px;font-weight:600}
.note svg{margin-top:1px}
.note.warn{background:var(--amber-soft);color:var(--amber)}.note.info{background:var(--indigo-soft);color:var(--indigo)}.note.ok{background:var(--green-soft);color:var(--green-d)}.note.bad{background:var(--red-soft);color:var(--red)}
.group{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--lift);margin-bottom:12px;overflow:hidden}
.row{display:flex;align-items:center;gap:12px}
.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.item{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--rule);background:none;border-left:0;border-right:0;border-bottom:0;width:100%;text-align:left;text-decoration:none;color:inherit}
.item:first-child{border-top:0}
button.item:active,a.item:active{background:var(--sunk)}
.item .name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .meta{font-size:13.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .chev{color:var(--mute);width:18px;height:18px}
.avatar{width:44px;height:44px;border-radius:14px;background:var(--green-soft);color:var(--green-d);display:grid;place-items:center;font-weight:800;flex:none;object-fit:cover;font-size:16px}
.avatar.big{width:72px;height:72px;border-radius:22px;font-size:28px}
.ico{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;flex:none;background:var(--green-soft);color:var(--green-d)}
.ico.red{background:var(--red-soft);color:var(--red)}.ico.gold{background:var(--gold-soft);color:#6b5000}.ico.indigo{background:var(--indigo-soft);color:var(--indigo)}.ico.amber{background:var(--amber-soft);color:var(--amber)}.ico.grey{background:var(--sunk);color:var(--ink2)}
.no{display:inline-block;min-width:40px;padding:1px 7px;border-radius:8px;background:var(--sunk);font-weight:800;font-size:12.5px;text-align:center;color:var(--ink2);margin-right:2px}
.tag{display:inline-flex;align-items:center;gap:4px;margin:5px 5px 0 0;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.t-out{background:var(--red-soft);color:var(--red)}.t-warn{background:var(--amber-soft);color:var(--amber)}.t-ok{background:var(--green-soft);color:var(--green-d)}
.t-loan{background:var(--indigo-soft);color:var(--indigo)}.t-mute{background:var(--sunk);color:var(--ink2)}.t-gold{background:var(--gold-soft);color:#6b5000}
body.sun .t-gold{color:var(--gold)}
.count{min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:var(--red);color:#fff;font-size:12px;font-weight:800;display:inline-grid;place-items:center}

/* ---------- hero card (balance) ---------- */
.hero{position:relative;border-radius:var(--r-xl);padding:20px;margin-bottom:14px;background:linear-gradient(150deg,var(--green) 0%,var(--green-x) 100%);color:#fff;overflow:hidden}
.hero::after{content:"";position:absolute;right:-22px;top:-22px;width:150px;height:150px;opacity:.5;
  background-image:radial-gradient(circle,rgba(242,183,5,.55) 2.5px,transparent 3px);background-size:18px 18px;transform:rotate(12deg)}
.hero>*{position:relative;z-index:1}
.hero .label{font-size:14px;opacity:.85;font-weight:600;display:flex;align-items:center;gap:6px}
.hero .big{font-size:38px;font-weight:800;letter-spacing:-1.2px;line-height:1.1;margin:6px 0 4px}
.hero .sub{font-size:13.5px;opacity:.8}
.hero .trio{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px}
.hero .trio div{background:rgba(255,255,255,.1);border-radius:14px;padding:9px 11px;min-width:0}
.hero .trio b{display:block;font-size:15.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hero .trio span{font-size:12px;opacity:.8}
.hero .info{border:0;background:rgba(255,255,255,.16);color:#fff;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:700}
.meter{height:8px;border-radius:8px;background:rgba(255,255,255,.2);overflow:hidden;margin-top:12px}
.meter i{display:block;height:100%;background:var(--gold);border-radius:8px}
.bar-meter{height:8px;border-radius:8px;background:var(--sunk);overflow:hidden}.bar-meter i{display:block;height:100%;background:var(--green);border-radius:8px}
.spark{display:flex;align-items:flex-end;gap:4px;height:46px;margin-top:14px}
.spark i{flex:1;border-radius:4px 4px 1px 1px;background:rgba(255,255,255,.28);min-height:3px}.spark i.now{background:var(--gold)}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.stat{background:var(--surface);border-radius:var(--r);padding:12px 14px;box-shadow:var(--lift);min-width:0}
.stat span{display:block;font-size:12.5px;color:var(--mute);font-weight:700}.stat b{display:block;font-size:18px;font-weight:800;letter-spacing:-.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- quick actions (bank-app row) ---------- */
.actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:2px 0 6px}
.act{display:flex;flex-direction:column;align-items:center;gap:7px;padding:6px 2px;border:0;background:none;font-size:12.5px;font-weight:700;color:var(--ink2);text-align:center;line-height:1.2;position:relative}
.act .ico{width:54px;height:54px;border-radius:18px;background:var(--surface);color:var(--green-d);box-shadow:var(--lift)}
.act.main .ico{background:var(--gold);color:#1d1600;box-shadow:0 10px 20px -10px rgba(201,149,0,.9)}
.act .count{position:absolute;top:0;right:calc(50% - 34px)}

/* ---------- buttons ---------- */
.record{display:flex;align-items:center;gap:14px;width:100%;border:0;border-radius:var(--r-lg);padding:16px;margin-bottom:12px;background:var(--gold);color:#1d1600;text-align:left;box-shadow:0 10px 22px -12px rgba(201,149,0,.8)}
.record .plus{width:46px;height:46px;border-radius:15px;background:rgba(255,255,255,.45);display:grid;place-items:center;flex:none}
.record b{display:block;font-size:17px;font-weight:800}.record small{font-size:13.5px;opacity:.8}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;margin-top:12px;padding:13px 18px;border:0;border-radius:var(--r);background:var(--green);color:#fff;font-size:16px;font-weight:800;text-decoration:none}
.btn.gold{background:var(--gold);color:#1d1600}.btn.soft{background:var(--green-soft);color:var(--green-d)}.btn.danger{background:var(--red)}.btn.plain{background:var(--surface);color:var(--ink);box-shadow:var(--lift)}
.btn.ghost{background:none;color:var(--green-d);min-height:44px}
.btn.sm{display:inline-flex;width:auto;min-height:38px;margin:8px 8px 0 0;padding:7px 13px;font-size:14px;border-radius:12px}
.btn:disabled{opacity:.45}
.back{display:inline-flex;align-items:center;gap:2px;margin:0 0 2px -8px;padding:6px 8px;border:0;background:none;color:var(--green-d);font-weight:800;font-size:15px}
.links{display:flex;flex-wrap:wrap}

/* ---------- forms ---------- */
label.f{display:block;margin:14px 0 6px;font-size:13.5px;font-weight:700;color:var(--ink2)}
input,select,textarea{width:100%;max-width:100%;padding:13px 14px;border:1.5px solid var(--rule);border-radius:14px;background:var(--surface);font-size:16px}
textarea{min-height:88px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 4px var(--green-soft)}
input:disabled{background:var(--sunk);color:var(--mute)}
.hint{font-size:13px;color:var(--mute);margin-top:6px}
.search{position:relative}.search svg{position:absolute;left:15px;top:50%;transform:translateY(-50%);color:var(--mute)}
.search input{padding-left:46px;font-size:17px;min-height:54px;border-radius:18px;border-color:transparent;box-shadow:var(--lift)}
.amount-box{margin:6px 0 4px;padding:16px 14px 12px;border-radius:var(--r-xl);background:var(--surface);box-shadow:var(--lift);text-align:center}
.amount-box .cur{font-size:14px;color:var(--mute);font-weight:800}
.amount-box input{border:0;box-shadow:none!important;text-align:center;font-size:44px;font-weight:800;letter-spacing:-1.4px;padding:2px 0;background:none}
.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}
.quick button{min-height:46px;border:1.5px solid var(--rule);border-radius:14px;background:var(--surface);font-weight:800;font-size:15.5px}
.quick button:active{background:var(--gold-soft);border-color:var(--gold)}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;padding:4px;border-radius:15px;background:var(--sunk)}
.seg button{min-height:42px;border:0;border-radius:11px;background:none;font-weight:800;font-size:14.5px;color:var(--mute);padding:0 6px}
.seg button.on{background:var(--surface);color:var(--ink);box-shadow:var(--lift)}
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:none;margin-bottom:6px}.chips::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:38px;padding:7px 14px;border:1.5px solid var(--rule);border-radius:999px;background:var(--surface);font-weight:700;font-size:14px}
.chip.on{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid var(--rule)}
.toggle:first-child{border-top:0}.toggle input{width:auto;transform:scale(1.3);accent-color:var(--green);flex:none}
.toggle small{display:block;font-size:12.5px;color:var(--mute);font-weight:500}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.two>*,.three>*{min-width:0}
.three .btn{font-size:13.5px;padding-left:6px;padding-right:6px;min-height:48px;margin:0}
.sticky-save{position:sticky;bottom:calc(84px + env(safe-area-inset-bottom));z-index:5;padding-top:4px}

/* ---------- susu card (signature element) ---------- */
.susu{background:var(--gold-soft);border-radius:var(--r-lg);padding:14px;margin-bottom:12px;border:1.5px dashed rgba(201,149,0,.5)}
body.sun .susu{border-color:var(--gold)}
.susu .head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px;gap:8px}
.susu .head b{font-size:15.5px;font-weight:800}.susu .head span{font-size:13px;color:#6b5000;font-weight:700}
body.sun .susu .head span{color:var(--gold)}
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.days .wd{font-size:11px;text-align:center;color:#8a6d10;font-weight:700}
body.sun .days .wd{color:var(--gold)}
.day{aspect-ratio:1;border-radius:9px;border:1.5px solid rgba(201,149,0,.4);display:grid;place-items:center;font-size:12.5px;font-weight:800;color:#8a6d10;background:rgba(255,255,255,.65)}
.day.paid{background:var(--gold);border-color:var(--gold-d);color:#1d1600}
.day.today{box-shadow:0 0 0 2.5px var(--green)}
.day.off{opacity:.38}.day.blank{visibility:hidden}
body.sun .day{background:#000;color:var(--gold)}body.sun .day.paid{background:var(--gold);color:#000}

/* ---------- passbook / statement ---------- */
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;font-size:12px;color:var(--mute);font-weight:800;padding:9px 6px;border-bottom:1.5px solid var(--rule);white-space:nowrap}
td{padding:10px 6px;border-bottom:1px solid var(--rule);vertical-align:top}
tr:last-child td{border-bottom:0}
.r{text-align:right}.struck{text-decoration:line-through;opacity:.5}
.panel:has(> table),.panel:has(.perm),.scroll-x{overflow-x:auto;-webkit-overflow-scrolling:touch}
.pb{font-size:13px}.pb th,.pb td{padding-left:4px;padding-right:4px}
.pb td.sig{font-size:12px;color:var(--ink2);max-width:110px;word-break:break-word}
.pb td.sig small{display:block;color:var(--mute)}
.month{padding:9px 16px 6px;font-size:12.5px;font-weight:800;color:var(--mute);background:var(--sunk)}
.entry{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:12px;align-items:center;padding:11px 16px;border-top:1px solid var(--rule);width:100%;border-left:0;border-right:0;border-bottom:0;background:none;text-align:left}
.entry:first-child{border-top:0}
.entry .name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.entry .meta{font-size:12.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.entry .amt{text-align:right}.entry .amt small{display:block;font-size:12px;color:var(--mute);font-weight:600}
.entry .ico{width:38px;height:38px;border-radius:12px}

/* ---------- cash ---------- */
.denoms{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.denoms label{display:flex;align-items:center;gap:8px;padding:5px 6px 5px 14px;border-radius:14px;background:var(--surface);box-shadow:var(--lift);font-weight:800}
.denoms label span{width:64px}.denoms input{padding:9px;text-align:right;font-size:17px;font-weight:800;border-radius:11px}
.ledger td{padding:9px 4px}.ledger tr.total td{border-top:1.5px solid var(--ink);font-weight:800;font-size:17px}

/* ---------- roles ---------- */
.perm-group{margin-top:6px}
.perm-group h3{font-size:13px;font-weight:800;color:var(--mute);margin:18px 0 2px}
.perm{display:grid;grid-template-columns:minmax(0,1fr) repeat(5,42px);align-items:center;gap:2px;padding:8px 0;border-top:1px solid var(--rule);font-size:14px;min-width:470px}
.perm input{width:auto;justify-self:center;transform:scale(1.25);accent-color:var(--green)}
.perm.head{font-size:11.5px;font-weight:800;color:var(--mute);text-align:center;border-top:0}

/* ---------- tab bar & side nav ---------- */
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;align-items:flex-end;justify-content:space-around;padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(10px);box-shadow:0 -1px 0 var(--rule)}
.tabs button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 0;border:0;background:none;color:var(--mute);font-size:11.5px;font-weight:700;position:relative}
.tabs button.on{color:var(--green-d)}
.tabs .fab{flex:none;width:58px;height:58px;margin:-26px 6px 2px;border-radius:20px;background:var(--gold);color:#1d1600;display:grid;place-items:center;box-shadow:0 10px 22px -8px rgba(201,149,0,.9)}
.tabs .fab svg{width:28px;height:28px;stroke-width:2.4}
.tabs .badge{position:absolute;top:1px;right:calc(50% - 18px);width:9px;height:9px;border-radius:9px;background:var(--red)}
.side{display:none;width:250px;flex:none;position:sticky;top:0;height:100vh;padding:20px 12px;background:var(--surface);box-shadow:1px 0 0 var(--rule);overflow-y:auto}
.side .brand{display:flex;align-items:center;gap:10px;padding:0 8px 16px;font-weight:800;font-size:16.5px}
.side .brand img{width:36px;height:36px;border-radius:11px}
.side .lbl{font-size:11.5px;font-weight:800;color:var(--mute);padding:14px 12px 4px}
.side button{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;margin-bottom:1px;border:0;border-radius:12px;background:none;font-weight:700;font-size:14.5px;color:var(--ink2);text-align:left}
.side button.on{background:var(--green-soft);color:var(--green-d)}
.side .rec{background:var(--gold);color:#1d1600;margin-bottom:10px}
.side .badge{margin-left:auto;width:8px;height:8px;border-radius:8px;background:var(--red)}
@media (min-width:960px){
  .side:not([hidden]){display:block}.tabs{display:none!important}
  main{max-width:900px;padding:8px 32px 60px}
  .stats{grid-template-columns:repeat(4,1fr)}.sticky-save{bottom:16px}
  .wide{display:grid;grid-template-columns:1.15fr 1fr;gap:16px;align-items:start}
}

/* ---------- sheet & toast ---------- */
.sheet-bg{position:fixed;inset:0;z-index:50;display:none;align-items:flex-end;justify-content:center;background:rgba(10,20,16,.45)}
.sheet-bg.show{display:flex}
.sheet{width:100%;max-width:600px;max-height:92vh;overflow-y:auto;padding:8px 18px calc(20px + env(safe-area-inset-bottom));border-radius:26px 26px 0 0;background:var(--paper);animation:rise .2s ease-out}
.sheet .grab{width:42px;height:5px;margin:2px auto 10px;border-radius:5px;background:var(--rule)}
.sheet h3{margin:0 0 6px;font-size:19px;font-weight:800;letter-spacing:-.3px}
@media (min-width:960px){.sheet-bg{align-items:center}.sheet{border-radius:26px;max-height:86vh}}
@keyframes rise{from{transform:translateY(26px);opacity:.5}to{transform:none;opacity:1}}
.toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));z-index:60;transform:translateX(-50%);width:max-content;max-width:92%;padding:12px 18px;border-radius:16px;background:var(--ink);color:var(--paper);font-weight:700;font-size:14.5px;display:none;box-shadow:var(--float)}
.toast.show{display:block;animation:rise .18s ease-out}
.empty{padding:28px 16px;text-align:center;color:var(--mute);font-size:14.5px}
.empty b{display:block;color:var(--ink);font-size:15.5px;margin-bottom:4px}

/* ---------- receipt ---------- */
.receipt{text-align:center;padding:26px 18px 20px;border-radius:var(--r-xl);background:var(--surface);box-shadow:var(--lift);position:relative;overflow:hidden}
.receipt::before{content:"";position:absolute;inset:0 0 auto 0;height:6px;background:repeating-linear-gradient(90deg,var(--gold) 0 14px,var(--green) 14px 28px)}
.receipt .tick{width:58px;height:58px;margin:6px auto 10px;border-radius:20px;background:var(--green-soft);color:var(--green);display:grid;place-items:center}
.receipt .tick svg{width:30px;height:30px;stroke-width:2.6}
.receipt .amt{font-size:42px;font-weight:800;letter-spacing:-1.4px;color:var(--green)}
.receipt .lines{margin-top:16px;text-align:left;border-top:1px dashed var(--rule)}
.receipt .lines div{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px dashed var(--rule);font-size:14.5px}
.receipt .lines span{color:var(--mute)}.receipt .lines b{text-align:right}

/* ---------- customer app ---------- */
.pass{border-radius:28px;padding:22px 20px 18px;margin-bottom:12px;color:#fff;background:linear-gradient(155deg,#0E7A59 0%,var(--green-x) 100%);position:relative;overflow:hidden}
.pass::after{content:"";position:absolute;right:-30px;bottom:-40px;width:200px;height:170px;opacity:.55;background-image:radial-gradient(circle,rgba(242,183,5,.6) 2.5px,transparent 3px);background-size:17px 17px;transform:rotate(-10deg)}
.pass>*{position:relative;z-index:1}
.pass .bal{font-size:42px;font-weight:800;letter-spacing:-1.4px;line-height:1.05;margin:6px 0 4px}
.pass .round{width:40px;height:40px;border:0;border-radius:13px;background:rgba(255,255,255,.16);color:#fff;display:grid;place-items:center}
.pass .chipline{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.pass .pill{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;background:rgba(255,255,255,.14);font-size:13px;font-weight:700}
.pass .pill svg{width:16px;height:16px}
.goal{display:flex;gap:14px;align-items:center}
.ring{--p:0;width:64px;height:64px;flex:none;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--gold) calc(var(--p)*1%),var(--sunk) 0);font-weight:800;font-size:14px}
.ring span{width:50px;height:50px;border-radius:50%;background:var(--surface);display:grid;place-items:center}
.badges{display:flex;gap:10px;overflow-x:auto;padding:2px 0 4px;scrollbar-width:none}.badges::-webkit-scrollbar{display:none}
.badge-c{flex:none;width:96px;padding:12px 8px;border-radius:18px;background:var(--surface);box-shadow:var(--lift);text-align:center;font-size:12px;font-weight:700;color:var(--ink2)}
.badge-c .ico{margin:0 auto 6px;width:42px;height:42px;border-radius:50%}
.badge-c.locked{opacity:.45}.badge-c.locked .ico{background:var(--sunk);color:var(--mute)}

/* ---------- login ---------- */
.login{max-width:420px;margin:7vh auto 0;padding:0 4px}
.login .mark{width:68px;height:68px;border-radius:21px;margin:0 auto 14px;display:block}
.login h1{text-align:center;margin-bottom:4px}
.login .lede{text-align:center;margin:0 0 20px}

/* ---------- batch entry ---------- */
.bentry{border:2px solid var(--gold)}
.bgrid{display:grid;grid-template-columns:1.4fr 1fr;gap:10px}
.bgrid input{font-size:21px;font-weight:800;letter-spacing:-.3px;min-height:56px}
.kb{border:0;border-radius:8px;padding:2px 8px;background:var(--sunk);font-size:12px;font-weight:800;color:var(--ink2);margin-top:8px}
.bhits{display:grid;gap:6px;margin-top:10px}
.bhit{display:flex;align-items:center;gap:10px;padding:8px 10px;border:2px solid transparent;border-radius:14px;background:var(--sunk);text-align:left;width:100%}
.bhit.on{border-color:var(--green);background:var(--green-soft)}
.bhit .avatar{width:34px;height:34px;border-radius:11px;font-size:14px}
.bhit .name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bhit .meta{font-size:12.5px;color:var(--mute)}
.bamt{border:0;background:none;font-size:15.5px;padding:6px 4px}
.crow .camt{width:92px;flex:none;text-align:right;font-size:17px;font-weight:800;min-height:44px}

/* ---------- transactions ---------- */
.dayhead{padding:9px 16px 6px;font-size:12.5px;font-weight:800;color:var(--mute);background:var(--sunk)}
.txtime{width:44px;flex:none;font-size:12.5px;font-weight:700;color:var(--mute)}
.print-only{display:none}

/* ---------- assistant ---------- */
.chat{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.msg{max-width:88%;padding:12px 14px;border-radius:18px;font-size:15px;line-height:1.5}
.msg.me{align-self:flex-end;background:var(--green);color:#fff;border-bottom-right-radius:6px}
.msg.bot{align-self:flex-start;background:var(--surface);box-shadow:var(--lift);border-bottom-left-radius:6px}
.msg.err{background:var(--amber-soft);color:var(--amber);box-shadow:none}
.msg ul{margin:6px 0;padding-left:20px}
.msg .looked{margin-top:8px;font-size:12px;color:var(--mute)}
.msgacts{display:flex;gap:6px;margin-top:8px}
.msgacts button{display:flex;align-items:center;gap:4px;border:0;border-radius:10px;padding:5px 9px;background:var(--sunk);font-size:12.5px;font-weight:700;color:var(--ink2)}
.msgacts svg{width:16px;height:16px}
.msg.wait{display:flex;gap:5px;padding:16px}
.msg.wait span{width:8px;height:8px;border-radius:8px;background:var(--mute);animation:blink 1s infinite}
.msg.wait span:nth-child(2){animation-delay:.2s}.msg.wait span:nth-child(3){animation-delay:.4s}
@keyframes blink{50%{opacity:.25}}
.chatbox{display:flex;gap:8px;align-items:flex-end;background:var(--paper);padding:8px 0}
.chatbox textarea{flex:1;min-height:50px;max-height:140px;resize:none}

/* ---------- small phones ---------- */
@media (max-width:380px){
  .two{grid-template-columns:1fr}.three{grid-template-columns:1fr}h1{font-size:22px}
  .receipt .amt,.pass .bal{font-size:36px}.hero .big{font-size:33px}
  .act .ico{width:48px;height:48px;border-radius:16px}.act{font-size:11.5px}
}

@media print{
  .bar,.tabs,.side,.net,.asbar,.noprint{display:none!important}body{background:#fff}main{padding:0;max-width:none}.panel,.group{box-shadow:none}
  body.printing #shell,body.printing .tabs,body.printing .toast{display:none!important}
  body.printing .print-only{display:block;padding:10mm;font-size:11px;color:#000}
  .print-only h1{font-size:18px;margin:0 0 4px}.print-only table{margin:10px 0;font-size:10.5px}
  .print-only th,.print-only td{padding:3px 5px;border-bottom:1px solid #ccc;text-align:left}.print-only .r{text-align:right}
}

/* ---------- saving days strip ---------- */
.segbar{display:flex;gap:3px;height:10px;margin-top:12px}
.segbar i{flex:1;border-radius:3px;background:var(--sunk)}
.segbar i.ok{background:var(--green)}.segbar i.miss{background:#EFA697}.segbar i.now{background:var(--gold)}
