/* SuperWallet Red-Black Theme */
:root{
  --red:#B00020;
  --red2:#A1111A;
  --bg:#0A0A0A;
  --text:#ffffff;
  --muted:#d7d7d7;
  --card:rgba(255,255,255,0.06);
  --border:rgba(255,255,255,0.12);
  --pill:#ffffff;
  --pillText:#111;
  --danger:#FF4B4B;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background: linear-gradient(180deg, var(--red) 0%, #7a0b14 40%, #2b0a0d 70%, #000 100%);
  background-attachment: fixed;
}

.appbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  backdrop-filter:saturate(120%) blur(10px);
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border-bottom:1px solid var(--border);
}
.brand{display:flex;align-items:center;gap:10px}
.logo{width:28px;height:28px;border-radius:8px}
.logo-hero{width:60px;height:60px;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.title{font-weight:800; font-size:20px; letter-spacing:.2px}

.icon-btn{background:transparent;border:0;color:var(--text);padding:10px;border-radius:10px}
.icon-btn:active{transform:scale(.96)}
.badge{background:#ff3b30;color:#fff;border-radius:10px;padding:1px 6px;font-size:11px;margin-left:4px}

.pill{border:1px solid var(--border); background:rgba(255,255,255,.08); color:var(--text); padding:10px 14px;border-radius:999px}
.pill.ghost{background:transparent}
.pill.danger{background:rgba(255,75,75,.12); border-color:rgba(255,75,75,.35); color:#ffd7d7}

.btn{background:#fff;color:#111;border:0;border-radius:16px;padding:12px 18px;font-weight:700}
.btn.white{background:#fff;color:#111}
.btn.ghost{background:transparent;border:1px solid var(--border);color:#fff}
.btn:active{transform:scale(.98)}

.tabs{display:flex;gap:10px;overflow:auto;padding:10px 14px;border-bottom:1px solid var(--border)}
.tab{background:rgba(255,255,255,.08); border:1px solid var(--border); color:var(--text); padding:10px 16px;border-radius:999px}
.tab.active{background:#fff;color:#111}

main{padding:16px; max-width:900px; margin:0 auto}
.screen{display:none}
.screen.active{display:block}
.screen-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}

.card{background:var(--card); border:1px solid var(--border); border-radius:18px; padding:16px; box-shadow:0 10px 30px rgba(0,0,0,.25)}
.grid.kpis{display:grid;grid-template-columns:1fr;gap:14px}
@media(min-width:700px){.grid.kpis{grid-template-columns:repeat(3,1fr)}}

.kpi label{opacity:.8;font-weight:600}
.kpi .value{font-size:24px;font-weight:800;margin:4px 0}
.kpi .value.danger{color:var(--danger)}
.kpi.clickable{cursor:pointer}

.list .list-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.items{list-style:none;margin:0;padding:0}
.item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border-bottom:1px dashed var(--border)}
.item:last-child{border-bottom:0}
.item .meta{display:flex;flex-direction:column;gap:4px}
.item .title{font-weight:700}
.item .sub{opacity:.8;font-size:13px}
.amount.negative{color:var(--danger);font-weight:800}

.search input{width:100%;padding:12px 14px;border-radius:14px;border:1px solid var(--border);background:rgba(0,0,0,.35);color:#fff}

.footer{padding:30px 16px; text-align:center; opacity:.85}

/* Drawer */
.drawer{position:fixed;left:-320px;top:0;height:100vh;width:300px;background:rgba(25,25,25,.95);border-right:1px solid var(--border);z-index:40;transition:left .25s ease}
.drawer.open{left:0}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:14px;border-bottom:1px solid var(--border)}
.drawer-body{display:flex;flex-direction:column;padding:6px 10px;gap:6px}
.drawer-link{color:#fff;text-decoration:none;padding:12px;border-radius:10px;border:1px solid var(--border);background:rgba(255,255,255,.04)}
.scrim{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(1px);opacity:0;visibility:hidden;transition:opacity .2s;z-index:30}
.scrim.on{opacity:1;visibility:visible}

/* Modal */
.modal{position:fixed; inset:0; display:none; align-items:flex-end; justify-content:center; z-index:50}
.modal.show{display:flex}
.modal-card{width:100%; max-width:800px; background:#111; color:#fff; border-top-left-radius:18px; border-top-right-radius:18px; border:1px solid var(--border); box-shadow:0 -10px 40px rgba(0,0,0,.5)}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.03)}
.title-stack{display:flex;align-items:center;gap:12px}
.modal-body{padding:14px}
.detail-row{display:flex;align-items:center;justify-content:space-between;border:1px dashed var(--border);border-radius:12px;padding:12px;margin:8px 0;background:rgba(255,255,255,.03)}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}

/* Intro */
.intro{position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:100; color:#fff}
.intro.on{display:flex}
.intro:before{
  content:''; position:absolute; inset:0;
  background: linear-gradient(180deg, #b00020 0%, #7a0b14 40%, #2b0a0d 70%, #000 100%);
}
.intro-card{position:relative;background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.18); border-radius:24px; padding:28px 24px; text-align:center; width:86%; max-width:420px; box-shadow:0 30px 80px rgba(0,0,0,.45)}
.intro-card h1{margin:10px 0 6px 0}
.intro-card p{margin:0 0 6px 0; opacity:.9}
.powered{opacity:.8}
.loader{height:4px;background:rgba(255,255,255,.15);border-radius:999px;margin:10px 0 8px 0;overflow:hidden}
.loader span{display:block;height:100%;width:40%;background:#fff;border-radius:999px;animation:load 1.4s infinite}
@keyframes load{0%{transform:translateX(-100%)}50%{transform:translateX(120%)}100%{transform:translateX(240%)}}
#introParticles{position:absolute; inset:0; pointer-events:none}
#skipIntro{position:absolute; bottom:24px; right:24px}

/* Icons (simple) */
.i{display:inline-block;width:20px;height:20px}
.i-menu{border-top:2px solid #fff;border-bottom:2px solid #fff;height:12px}
.i-bell{border:2px solid #fff;border-radius:50%}
.i-close{position:relative}
.i-close:before,.i-close:after{content:'';position:absolute;left:9px;top:0;width:2px;height:20px;background:#fff}
.i-close:before{transform:rotate(45deg)} .i-close:after{transform:rotate(-45deg)}
.i-receipt{border:2px solid #fff;border-radius:4px}

/* utility */
.hstack{display:flex;gap:10px}
.clickable{cursor:pointer}
a{color:#fff}
