/* UNUSED — mobile-first fintech theme */
:root {
  --ink: #0B0F0E;
  --ink2: #101614;
  --card: #141B19;
  --card2: #1A2320;
  --line: #232d29;
  --emerald: #10B981;
  --emerald-lt: #34D399;
  --gold: #E8B84B;
  --gold-lt: #F5C518;
  --text: #F2F5F3;
  --muted: #8A9490;
  --danger: #F87171;
  --radius: 18px;
  --nav-h: 76px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + 24px); }
#app.nonab { padding-bottom: 24px; }

/* ---------- typography ---------- */
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.hero-kicker { color: var(--emerald-lt); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.screen { padding: 20px 18px 8px; animation: fadeUp .28s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-title { font-size: 26px; font-weight: 800; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.big-number { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.big-number.gold { color: var(--gold-lt); }
.big-number.emerald { color: var(--emerald-lt); }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0;
}
.card.tight { padding: 12px 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 14px; padding: 14px 20px;
  font-size: 16px; font-weight: 700; font-family: var(--font);
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform .08s ease, opacity .15s ease;
  color: #06231a;
  background: linear-gradient(135deg, var(--emerald-lt), var(--emerald));
}
.btn:active { transform: scale(.97); }
.btn.block { display: flex; width: 100%; }
.btn.gold { background: linear-gradient(135deg, var(--gold-lt), var(--gold)); color: #3a2703; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: #2a1414; color: var(--danger); border: 1px solid #4a2020; }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .5; cursor: default; }
.linklike { background: none; border: none; color: var(--emerald-lt); font-weight: 600; font-size: 14px; cursor: pointer; padding: 6px 0; font-family: var(--font); }

/* ---------- forms ---------- */
.field { margin: 12px 0; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-size: 16px; padding: 13px 14px; font-family: var(--font);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--emerald); border-color: var(--emerald); }
.field textarea { min-height: 110px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip {
  border: 1px solid var(--line); background: var(--ink2); color: var(--text);
  border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font);
}
.chip.on { background: rgba(16,185,129,.15); border-color: var(--emerald); color: var(--emerald-lt); }
.chip.gold.on { background: rgba(232,184,75,.15); border-color: var(--gold); color: var(--gold-lt); }

/* ---------- badges ---------- */
.badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--muted);
}
.badge.demo { background: rgba(232,184,75,.15); border-color: var(--gold); color: var(--gold-lt); }
.badge.emerald { background: rgba(16,185,129,.15); border-color: var(--emerald); color: var(--emerald-lt); }
.badge.gold { background: rgba(232,184,75,.15); border-color: var(--gold); color: var(--gold-lt); }
.badge.red { background: rgba(248,113,113,.12); border-color: var(--danger); color: var(--danger); }

/* ---------- bottom nav ---------- */
#bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11,15,14,.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; align-items: stretch; justify-content: space-around;
}
#bottomnav .navbtn {
  background: none; border: none; color: var(--muted); font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; font-weight: 600; cursor: pointer; flex: 1; padding: 6px 0 8px;
}
#bottomnav .navbtn svg { width: 24px; height: 24px; }
#bottomnav .navbtn.active { color: var(--emerald-lt); }
#bottomnav .scanbtn .scanring {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  display: flex; align-items: center; justify-content: center;
  margin-top: -26px; color: #3a2703;
  box-shadow: 0 6px 22px rgba(232,184,75,.35);
  border: 4px solid var(--ink);
}
#bottomnav .scanbtn.active .scanring { outline: 2px solid var(--emerald-lt); }
#bottomnav .scanbtn.active { color: var(--gold-lt); }
#bottomnav .scanbtn svg { width: 26px; height: 26px; }

/* ---------- landing ---------- */
.landing-hero { padding: 64px 22px 30px; text-align: center; }
.landing-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 10px; }
.landing-hero h1 .gold { color: var(--gold-lt); }
.landing-hero p { color: var(--muted); font-size: 17px; max-width: 420px; margin: 0 auto; }
.landing-ctas { display: flex; flex-direction: column; gap: 12px; padding: 24px 22px; max-width: 420px; margin: 0 auto; }
.mockcard { margin: 8px 22px 0; position: relative; overflow: hidden; }
.mockcard .sweep { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(52,211,153,.10) 50%, transparent 60%);
  animation: sweep 3.2s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(-100%);} 60%,100% { transform: translateX(100%);} }
.mock-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mock-row:last-child { border: none; }
.mock-row .amt { font-weight: 800; color: var(--emerald-lt); }
.radar { position: relative; height: 130px; margin: 6px 0; display: flex; align-items: center; justify-content: center; }
.radar .pulse { position: absolute; border: 2px solid var(--emerald); border-radius: 50%; animation: radarPulse 2.4s ease-out infinite; }
@keyframes radarPulse { 0% { width: 20px; height: 20px; opacity: .9; } 100% { width: 120px; height: 120px; opacity: 0; } }
.radar .core { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-lt), var(--gold)); display:flex; align-items:center; justify-content:center; font-size:22px; }
.scan-status { text-align: center; color: var(--emerald-lt); font-weight: 700; min-height: 26px; }
.steps { padding: 10px 22px; }
.step { display: flex; gap: 14px; margin: 18px 0; align-items: flex-start; }
.step .n { width: 40px; height: 40px; border-radius: 12px; background: rgba(16,185,129,.12); border: 1px solid var(--emerald); color: var(--emerald-lt); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step h3 { font-size: 16px; margin-bottom: 4px; letter-spacing: .06em; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 22px 40px; }

/* ---------- dashboard ---------- */
.dash-hero { text-align: center; padding: 26px 18px 6px; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.statcard { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.statcard .label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.statcard .val { font-size: 24px; font-weight: 800; margin-top: 4px; }
.statcard .val.emerald { color: var(--emerald-lt); } .statcard .val.gold { color: var(--gold-lt); }
.rankitem { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rankitem:last-child { border: none; }
.rankitem img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--ink2); flex-shrink: 0; }
.rankitem .rt { font-weight: 700; font-size: 14px; }
.rankitem .rv { color: var(--gold-lt); font-weight: 800; font-size: 14px; }
.rankpos { width: 26px; height: 26px; border-radius: 50%; background: var(--ink2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.demobanner { background: rgba(232,184,75,.08); border: 1px dashed var(--gold); border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; font-size: 14px; color: var(--gold-lt); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- scan ---------- */
.scanbtns { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.bigcam { background: linear-gradient(135deg, var(--gold-lt), var(--gold)); color: #3a2703; font-size: 18px; padding: 20px; border-radius: 20px; }
.itemimg { width: 100%; border-radius: var(--radius); display: block; background: var(--ink2); }
.itemimg.small { max-height: 220px; object-fit: cover; }

/* ---------- overlay (scan animation) ---------- */
#overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(11,15,14,.94); backdrop-filter: blur(6px); }
#overlay.show { display: flex; }
.overlay-inner { text-align: center; padding: 30px; max-width: 340px; }
.overlay-inner img { width: 180px; height: 180px; object-fit: cover; border-radius: 20px; border: 2px solid var(--emerald); margin-bottom: 18px; }

/* ---------- action sheet ---------- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 101; background: var(--card2); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 14px 18px calc(20px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; animation: sheetUp .25s ease; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet button.opt { display: flex; width: 100%; text-align: left; background: var(--ink2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 14px; margin: 8px 0; font-size: 16px; font-weight: 600; font-family: var(--font); cursor: pointer; align-items: center; gap: 10px; }
.sheet button.opt:active { transform: scale(.98); }
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); }

/* ---------- toasts / alerts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 14px); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--card2); border: 1px solid var(--emerald); color: var(--text); border-radius: 12px; padding: 12px 18px; font-size: 14px; font-weight: 600; max-width: 90%; animation: fadeUp .2s ease; }
.toast.err { border-color: var(--danger); }
.notice { background: rgba(16,185,129,.08); border: 1px solid var(--line); border-left: 4px solid var(--emerald); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }
.notice.gold { border-left-color: var(--gold); background: rgba(232,184,75,.08); }
.notice.warn { border-left-color: var(--danger); background: rgba(248,113,113,.06); }

/* ---------- empty states / skeletons ---------- */
.empty { text-align: center; padding: 44px 24px; color: var(--muted); }
.empty .eicon { font-size: 44px; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 14px; margin: 0 0 16px; }
.skel { background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-radius: 12px; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- misc ---------- */
.progress { height: 10px; background: var(--ink2); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--emerald), var(--emerald-lt)); border-radius: 6px; transition: width .6s ease; }
.logitem { padding: 12px 0; border-bottom: 1px solid var(--line); }
.logitem:last-child { border: none; }
.logitem .amt { font-weight: 800; color: var(--emerald-lt); }
.sharepreview { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.center { text-align: center; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }
.kv { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; text-align: right; }
.actiongrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.actiongrid .btn { font-size: 14px; padding: 13px 8px; }
.confbar { height: 8px; background: var(--ink2); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.confbar > div { height: 100%; background: linear-gradient(90deg, var(--emerald), var(--emerald-lt)); }
.errbox { text-align: center; padding: 40px 24px; }
.errbox .eicon { font-size: 52px; }
code.devtoken { background: var(--ink2); border: 1px dashed var(--gold); border-radius: 8px; padding: 8px 12px; display: inline-block; margin: 8px 0; color: var(--gold-lt); font-size: 14px; word-break: break-all; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.backbtn { background: var(--card2); border: 1px solid var(--line); color: var(--text); width: 38px; height: 38px; border-radius: 12px; font-size: 18px; cursor: pointer; }
.brand { font-weight: 800; letter-spacing: .12em; font-size: 14px; color: var(--emerald-lt); }

/* ---------- PRO / billing ---------- */
.proupsell { border: 1px solid var(--gold); background: linear-gradient(135deg, rgba(232,184,75,.10), rgba(232,184,75,.03)); }
.pricegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
@media (max-width: 380px) { .pricegrid { grid-template-columns: 1fr; } }
.pricecard { text-align: center; position: relative; }
.pricecard.hot { border-color: var(--gold); box-shadow: 0 0 24px rgba(232,184,75,.12); }
.planbadge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.planname { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.planprice { font-size: 30px; font-weight: 800; color: var(--gold-lt); }
.planprice .per { font-size: 14px; font-weight: 600; color: var(--muted); }
.featlist { list-style: none; margin: 8px 0; padding: 0; }
.featlist li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.featlist li:last-child { border-bottom: 0; }
.form-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 10px 0; }
.form-note.center { text-align: center; }
