/* ============ Rechx design tokens ============ */
:root {
  --p-900: #1C0750;
  --p-800: #2E0A78;
  --p-700: #3A0D97;
  --p-600: #5B1BD6;
  --p-500: #7B2FF7;
  --p-400: #9A5BFF;
  --p-100: #F1EAFF;
  --p-50: #F7F3FF;
  --ink: #12101A;
  --ink-2: #3D3A48;
  --muted: #8E8B99;
  --line: #EEEDF2;
  --bg: #F8F8FB;
  --card: #FFFFFF;
  --green: #14B87A;
  --red: #F04E5E;
  --amber: #F5A524;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(28, 7, 80, .06);
  --shadow: 0 10px 30px rgba(28, 7, 80, .10);
  --shadow-p: 0 12px 28px rgba(123, 47, 247, .38);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(1200px 600px at 20% 0%, #ECE6FA 0%, transparent 60%),
              radial-gradient(900px 600px at 100% 100%, #E5E0F5 0%, transparent 60%),
              #DCD9E8;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.ic { flex-shrink: 0; display: block; }

/* ============ Mobile app shell ============ */
html, body { overscroll-behavior: none; background: var(--p-900); }
body { position: fixed; inset: 0; overflow: hidden; }
button, .tab, .chip, .keypad button { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.device {
  position: fixed; inset: 0;
  width: 100%; height: 100%; height: 100dvh;
  margin: 0 auto; max-width: 480px;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
/* On tablets / desktop browsers the app stays phone-width, centred */
@media (min-width: 481px) { .device { box-shadow: 0 0 60px rgba(0, 0, 0, .35); } }

.app { position: absolute; inset: 0; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
  animation: enter .38s cubic-bezier(.2, .8, .2, 1) both;
}
.screen::-webkit-scrollbar { display: none; }
.screen.back { animation-name: enterBack; }
.screen.fade { animation-name: fadeIn; }
.screen.has-tabs { padding-bottom: 110px; }
@keyframes enter { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }

.pad { padding: 0 24px; }
.safe-top { padding-top: calc(env(safe-area-inset-top, 0px) + 16px); }

/* ============ Liquid glass ============ */
.lg {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.08));
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.75),
    inset 0 -1px 1px rgba(255,255,255,.15),
    inset 0 0 18px rgba(255,255,255,.12),
    0 8px 24px rgba(16, 4, 50, .25);
}
.lg::before { /* specular highlight */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background:
    radial-gradient(120% 70% at 20% 0%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(80% 50% at 85% 100%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 55%);
  mix-blend-mode: screen;
}
.lg::after { /* refractive rim */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: 3;
  padding: 1.5px;
  background: linear-gradient(140deg, rgba(255,255,255,.95), rgba(255,255,255,.1) 35%, rgba(255,255,255,0) 60%, rgba(255,255,255,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.lg-dark {
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
  border-color: rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.95),
    inset 0 -1px 2px rgba(91, 27, 214, .12),
    0 10px 28px rgba(28, 7, 80, .14);
}

/* Liquid-glass avatar: glass lens ring + refracted rim + specular sheen */
.avatar-lg {
  --s: 46px;
  position: relative; width: var(--s); height: var(--s); border-radius: 50%;
  padding: calc(var(--s) * .075);
  flex-shrink: 0;
}
.avatar-lg .lens {
  position: absolute; inset: 0; border-radius: 50%;
}
.avatar-lg .lens::before { filter: url(#liquid-glass); }
.avatar-lg img {
  position: relative; z-index: 1; display: block;
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 35%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 2px 6px rgba(0,0,0,.25);
}
.avatar-lg .sheen {
  position: absolute; z-index: 4; inset: calc(var(--s) * .075); border-radius: 50%; pointer-events: none;
  background:
    linear-gradient(160deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.08) 28%, rgba(255,255,255,0) 45%),
    radial-gradient(60% 35% at 50% 100%, rgba(255,255,255,.18), transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), inset 0 -6px 14px rgba(40, 10, 110, .25);
}
.avatar-lg.big { --s: 116px; }
.avatar-lg.xl { --s: 132px; }
.avatar-lg .badge {
  position: absolute; z-index: 6; right: 2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--p-500);
  border: 3px solid #fff;
}

/* ============ Common UI ============ */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; border-radius: 16px;
  font-weight: 600; font-size: 16px; letter-spacing: -.01em;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(180deg, var(--p-500), var(--p-600)); box-shadow: var(--shadow-p); }
.btn-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn-ghost { color: var(--p-600); background: var(--p-100); }
.btn-outline { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn-white { color: var(--p-700); background: #fff; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--ink); flex-shrink: 0;
  transition: transform .15s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.glass {
  color: #fff; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.35);
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; }
.topbar h1 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.02em; flex: 1; text-align: center; }
.topbar .spacer { width: 44px; }

.section-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.section-head h2 { font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.link { color: var(--p-500); font-weight: 600; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.input {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px;
  border-radius: 16px; background: #fff; border: 1.5px solid var(--line); color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus-within { border-color: var(--p-400); box-shadow: 0 0 0 4px rgba(123, 47, 247, .12); color: var(--p-500); }
.input input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; min-width: 0; }
.input input::placeholder { color: #B5B3BF; }
.input.soft { background: #F2F1F6; border-color: transparent; height: 50px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.list-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .s { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.initials {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: 15px; color: #fff;
}

.chip {
  height: 36px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 13px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.chip.on { background: var(--p-800); color: #fff; border-color: var(--p-800); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.pos { color: var(--green); }
.neg { color: var(--ink); }

/* ============ Splash ============ */
.splash {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(80% 50% at 85% 10%, rgba(154, 91, 255, .55), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(123, 47, 247, .5), transparent 60%),
    linear-gradient(180deg, var(--p-800), var(--p-900));
  color: #fff; text-align: center;
}
.splash .orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.splash .orb.a { width: 220px; height: 220px; top: -60px; left: -70px; }
.splash .orb.b { width: 160px; height: 160px; bottom: 90px; right: -50px; }
.splash .logo-wrap {
  width: 112px; height: 112px; border-radius: 34px; display: grid; place-items: center;
  animation: pop .9s cubic-bezier(.2, 1.4, .3, 1) both;
}
.splash .logo-wrap img { width: 64px; height: 64px; position: relative; z-index: 4; border-radius: 18px; }
.splash .word { font-size: 40px; font-weight: 800; letter-spacing: -.045em; margin-top: 22px; animation: rise .7s .25s both; }
.splash .tag { opacity: .75; font-size: 15px; margin-top: 6px; animation: rise .7s .4s both; }
.splash .loader { position: absolute; bottom: 70px; display: flex; gap: 8px; }
.splash .loader i { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .3; animation: dot 1s infinite; }
.splash .loader i:nth-child(2) { animation-delay: .15s; }
.splash .loader i:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }

/* ============ Login ============ */
.login-hero {
  position: relative; height: 300px; color: #fff; text-align: center;
  background:
    radial-gradient(70% 60% at 90% 0%, rgba(154, 91, 255, .6), transparent 60%),
    linear-gradient(180deg, var(--p-800), var(--p-700));
  border-radius: 0 0 36px 36px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 30px;
}
.login-hero h1 { font-size: 24px; margin: 16px 0 4px; letter-spacing: -.03em; }
.login-hero p { margin: 0; opacity: .75; font-size: 14px; }
.login-body { padding: 28px 24px 40px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--p-500); width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bio-row { display: flex; gap: 12px; }
.bio-row .btn { height: 52px; font-size: 14px; }
.foot-note { text-align: center; margin-top: 24px; font-size: 14px; color: var(--muted); }

/* ============ Home ============ */
.home-hero {
  position: relative; color: #fff; padding-bottom: 70px;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(123, 47, 247, .55), transparent 60%),
    linear-gradient(180deg, var(--p-800) 0%, var(--p-900) 100%);
}
.home-hero .top { display: flex; justify-content: space-between; align-items: center; }
.home-hero .greet { flex: 1; margin-left: 12px; }
.home-hero .greet .hi { font-size: 12.5px; opacity: .7; }
.home-hero .greet .nm { font-weight: 700; font-size: 15px; margin-top: 2px; }
.balance { text-align: center; margin-top: 22px; }
.balance .lbl { font-size: 13.5px; opacity: .72; display: inline-flex; align-items: center; gap: 6px; }
.balance .amt { font-size: 38px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; }
.balance .amt .c { font-size: 26px; opacity: .85; }
.dot-badge { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: #FF5C7A; border: 1.5px solid var(--p-800); z-index: 5; }

.quick {
  position: relative; z-index: 2; margin: -48px 24px 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 16px 6px; border-radius: 20px; background: #fff; box-shadow: var(--shadow);
}
.quick button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.quick .qi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--p-500); background: var(--p-50); transition: transform .15s; }
.quick button:active .qi { transform: scale(.9); }

.pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
.pay-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink-2); text-align: center; line-height: 1.25; }
.pay-grid .pi { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: #F4F2F8; transition: transform .15s; }
.pay-grid button:active .pi { transform: scale(.92); }
.pi .sq { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; }

.promos { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 24px 6px; margin: 0 -24px; scrollbar-width: none; }
.promos::-webkit-scrollbar { display: none; }
.promo {
  position: relative; flex: 0 0 84%; scroll-snap-align: start; height: 150px; border-radius: 20px; padding: 20px;
  color: #fff; overflow: hidden; text-align: left;
}
.promo h3 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; max-width: 70%; }
.promo p { margin: 8px 0 0; font-size: 12.5px; opacity: .75; max-width: 65%; }
.promo .shape { position: absolute; border-radius: 16px; }

/* ============ Tab bar ============ */
.tabbar {
  position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; height: 92px;
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: start; padding: 14px 10px 0;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 -8px 30px rgba(28, 7, 80, .06), inset 0 1px 0 rgba(255,255,255,.9);
}
.tabbar[hidden] { display: none; }
.tabbar .tab { height: 44px; display: grid; place-items: center; color: #9A98A5; position: relative; transition: color .2s; }
.tabbar .tab.on { color: var(--p-500); }
.tabbar .tab.on::after { content: ""; position: absolute; bottom: -4px; width: 5px; height: 5px; border-radius: 50%; background: var(--p-500); }
.tabbar .fab-wrap { position: relative; display: grid; place-items: center; }
.tabbar .fab {
  position: absolute; top: -34px; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 120% at 30% 20%, var(--p-400), var(--p-600));
  box-shadow: var(--shadow-p), 0 0 0 6px rgba(255,255,255,.9);
  transition: transform .15s;
}
.tabbar .fab::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(60% 40% at 35% 18%, rgba(255,255,255,.65), transparent 70%);
}
.tabbar .fab:active { transform: scale(.93); }
.tabbar { height: calc(84px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.screen.has-tabs { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }

/* ============ Statistic ============ */
.stat-total .lbl { color: var(--muted); font-size: 13.5px; }
.stat-total .amt { font-size: 32px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; }
.dropdown { position: relative; }
.dropdown > button { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.dropdown .menu {
  position: absolute; right: 0; top: 44px; z-index: 10; min-width: 130px; padding: 6px; border-radius: 14px;
  background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); display: none;
}
.dropdown.open .menu { display: block; animation: rise .2s both; }
.dropdown .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.dropdown .menu button:hover, .dropdown .menu button.on { background: var(--p-50); color: var(--p-600); }

.chart { position: relative; height: 230px; margin-top: 8px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .bar { transition: opacity .2s; cursor: pointer; }
.chart .bar rect { transform-origin: bottom; transform-box: fill-box; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-tip {
  position: absolute; z-index: 5; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #fff;
  font-size: 11.5px; line-height: 1.5; pointer-events: none; transform: translate(-50%, -100%); white-space: nowrap;
  opacity: 0; transition: opacity .15s;
}
.legend { display: flex; gap: 20px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

.io-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.io { position: relative; height: 140px; border-radius: 20px; padding: 16px; color: #fff; overflow: hidden; text-align: left; }
.io .bubble { position: absolute; right: -30px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.1); }
.io .big-ic { position: absolute; right: 16px; bottom: 18px; opacity: .55; }
.io .ii { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--p-800); display: grid; place-items: center; position: relative; }
.io .l { font-size: 12.5px; opacity: .75; margin-top: 30px; position: relative; }
.io .v { font-size: 18px; font-weight: 700; margin-top: 4px; position: relative; letter-spacing: -.02em; }
.io.inc { background: var(--p-900); }
.io.exp { background: linear-gradient(160deg, var(--p-500), var(--p-600)); }

/* ============ Contacts ============ */
.recent-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-row button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; width: 60px; flex-shrink: 0; }
.recent-row .initials { width: 56px; height: 56px; font-size: 17px; }
.recent-row .add { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--p-400); color: var(--p-500); background: var(--p-50); }

/* ============ Amount / keypad ============ */
.recipient { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.amount-display { text-align: center; padding: 26px 0 8px; }
.amount-display .lbl { color: var(--muted); font-size: 13.5px; }
.amount-display .val { font-size: 44px; font-weight: 700; letter-spacing: -.035em; margin-top: 8px; min-height: 54px; }
.amount-display .val.empty { color: #C9C7D2; }
.amount-display .bal { margin-top: 6px; font-size: 13px; color: var(--muted); }
.amount-display .err { color: var(--red); }
.presets { display: flex; gap: 8px; justify-content: center; margin: 12px 0 6px; flex-wrap: wrap; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 10px 0 16px; }
.keypad button { height: 54px; font-size: 22px; font-weight: 600; border-radius: 14px; display: grid; place-items: center; transition: background .1s; }
.keypad button:active { background: var(--p-50); }
.note-input { margin-top: 14px; }

/* ============ Bottom sheet ============ */
.sheet-backdrop { position: absolute; inset: 0; z-index: 70; background: rgba(18, 10, 40, .45); animation: fadeIn .2s both; }
.sheet {
  position: absolute; z-index: 71; left: 0; right: 0; bottom: 0; padding: 12px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-radius: 28px 28px 0 0; animation: sheetUp .35s cubic-bezier(.2, .9, .2, 1) both;
  max-height: 88%; overflow-y: auto;
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #DDDBE5; margin: 0 auto 18px; }
.sheet h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; text-align: center; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.kv { display: flex; justify-content: space-between; padding: 12px 0; font-size: 14px; border-bottom: 1px dashed var(--line); gap: 12px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }

.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 22px 0 8px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--p-400); transition: background .15s, transform .15s; }
.pin-dots i.on { background: var(--p-500); border-color: var(--p-500); transform: scale(1.1); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ============ Receipt ============ */
.receipt-screen { background: var(--bg); }
.receipt-top { height: 300px; background: radial-gradient(70% 60% at 100% 0%, rgba(123, 47, 247, .55), transparent 60%), linear-gradient(180deg, var(--p-800), var(--p-900)); color: #fff; }
.receipt-card { position: relative; margin: -190px 24px 0; background: #fff; border-radius: 24px; padding: 30px 22px 22px; box-shadow: var(--shadow); text-align: center; }
.receipt-card .ok { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #E6F8F0; color: var(--green); }
.receipt-card .ok > div { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; animation: pop .6s cubic-bezier(.2, 1.4, .3, 1) both; }
.receipt-card h2 { font-size: 18px; margin: 18px 0 4px; letter-spacing: -.02em; }
.receipt-card .amt { font-size: 32px; font-weight: 700; letter-spacing: -.03em; margin: 10px 0 18px; }
.receipt-card .tear { position: relative; margin: 6px -22px 8px; border-top: 2px dashed var(--line); }
.receipt-card .tear::before, .receipt-card .tear::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); }
.receipt-card .tear::before { left: -11px; } .receipt-card .tear::after { right: -11px; }
.receipt-card .kv { text-align: left; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: #E6F8F0; color: var(--green); font-size: 12px; font-weight: 700; }

/* ============ Scan ============ */
.scan-screen { background: #0B0618; color: #fff; }
.scan-cam {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 30% 30%, rgba(123,47,247,.35), transparent 70%),
    radial-gradient(50% 40% at 80% 75%, rgba(91,27,214,.35), transparent 70%),
    linear-gradient(180deg, #1a1030, #0B0618);
}
.scan-frame { position: absolute; left: 50%; top: 46%; width: 250px; height: 250px; transform: translate(-50%, -50%); }
.scan-frame .c { position: absolute; width: 46px; height: 46px; border: 4px solid #fff; }
.scan-frame .c.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 18px 0 0 0; }
.scan-frame .c.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 18px 0 0; }
.scan-frame .c.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 18px; }
.scan-frame .c.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 18px 0; }
.scan-frame .qr { position: absolute; inset: 40px; opacity: .25; }
.scan-frame .line { position: absolute; left: 14px; right: 14px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--p-400), transparent); box-shadow: 0 0 18px 4px rgba(154, 91, 255, .7); animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 14px; } 50% { top: calc(100% - 17px); } }
.scan-ui { position: absolute; inset: 0; display: flex; flex-direction: column; }
.scan-ui .hint { position: absolute; top: calc(46% + 150px); left: 0; right: 0; text-align: center; font-size: 14px; opacity: .8; }
.scan-ui .tools { position: absolute; bottom: calc(30px + env(safe-area-inset-bottom, 0px)); left: 24px; right: 24px; display: flex; gap: 12px; justify-content: center; }
.scan-ui .tools .lg { height: 56px; padding: 0 20px; border-radius: 18px; display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 14px; }
.scan-ui .tools .lg span, .scan-ui .tools .lg svg { position: relative; z-index: 5; }

/* ============ Transactions ============ */
.tx-group { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 4px; }
.tx-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.tx-amt { font-weight: 700; font-size: 15px; text-align: right; }
.tx-amt small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 3px; }
.empty-state { text-align: center; color: var(--muted); padding: 50px 0; font-size: 14px; }

/* ============ Profile ============ */
.profile-hero {
  position: relative; color: #fff; text-align: center; padding-bottom: 34px; overflow: hidden;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(154, 91, 255, .6), transparent 60%),
    radial-gradient(60% 60% at 100% 90%, rgba(123, 47, 247, .5), transparent 60%),
    linear-gradient(180deg, var(--p-800), var(--p-900));
  border-radius: 0 0 34px 34px;
}
.profile-hero .blob { position: absolute; border-radius: 50%; }
.profile-hero h2 { margin: 14px 0 4px; font-size: 21px; letter-spacing: -.02em; }
.profile-hero p { margin: 0; opacity: .7; font-size: 13.5px; }
.profile-hero .tier { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.profile-hero .tier > * { position: relative; z-index: 5; }
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: -26px 24px 0; padding: 16px 0; position: relative; z-index: 2; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.stats-strip div + div { border-left: 1px solid var(--line); }
.stats-strip b { display: block; font-size: 16px; letter-spacing: -.02em; }
.stats-strip span { font-size: 12px; color: var(--muted); }
.menu-card { background: #fff; border-radius: 20px; padding: 4px 16px; box-shadow: var(--shadow-sm); }
.menu-card .list-row { padding: 15px 0; }
.menu-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--p-50); color: var(--p-500); }
.switch { width: 46px; height: 28px; border-radius: 99px; background: #DAD8E2; position: relative; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--p-500); }
.switch.on::after { transform: translateX(18px); }

/* ============ Notifications ============ */
.notif { display: flex; gap: 14px; padding: 16px; border-radius: 18px; background: #fff; margin-bottom: 12px; box-shadow: var(--shadow-sm); position: relative; }
.notif.unread::after { content: ""; position: absolute; top: 18px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--p-500); }
.notif .t { font-weight: 600; font-size: 14.5px; padding-right: 16px; }
.notif .s { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.notif .d { color: #B0AEBA; font-size: 11.5px; margin-top: 8px; }

/* ============ Options (top up / bill) ============ */
.opt-list { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; text-align: left; width: 100%; transition: border-color .2s, background .2s; }
.opt.on { border-color: var(--p-500); background: var(--p-50); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #CFCDD8; flex-shrink: 0; position: relative; }
.opt.on .radio { border-color: var(--p-500); }
.opt.on .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--p-500); }
.amt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amt-grid button { height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; }
.amt-grid button.on { border-color: var(--p-500); background: var(--p-50); color: var(--p-600); }
.biller-head { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; color: #fff; background: linear-gradient(140deg, var(--p-700), var(--p-500)); margin-top: 8px; }
.biller-head .pi { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.18); }

.sticky-cta { position: sticky; bottom: 0; padding: 16px 24px calc(20px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(248,248,251,0), var(--bg) 30%); margin-top: 10px; }

/* ============ Toast ============ */
.toast {
  position: absolute; z-index: 90; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translate(-50%, -20px);
  padding: 12px 18px; border-radius: 14px; background: rgba(18, 16, 26, .92); color: #fff; font-size: 13.5px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; max-width: 90%;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Account lockout ============ */
.lock-card { text-align: center; padding: 26px 20px; border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); border: 1px solid #FBD5DA; }
.lock-card .lock-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: #FDECEE; color: var(--red); }
.lock-card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; }
.lock-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lock-timer { margin-top: 18px; padding: 12px; border-radius: 14px; background: var(--p-50); color: var(--ink-2); font-size: 14px; }
.lock-timer b { color: var(--p-600); font-size: 18px; font-variant-numeric: tabular-nums; margin-left: 4px; }
