:root{
  --cyan:#00AAFF; --navy:#02285A; --navy-2:#04407f; --ink:#14232F; --slate:#56697C; --mute:#8A97A3;
  --line:#E2E7ED; --canvas:#F4F7FB; --white:#fff; --ok:#12a150; --warn:#d98200; --bad:#c0392b;
  --r:18px; --safe-b:env(safe-area-inset-bottom,0px); --safe-t:env(safe-area-inset-top,0px);
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; height:100%; }
body{ font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; color:var(--ink); background:#0b1f3a; -webkit-font-smoothing:antialiased; overscroll-behavior:none; }
button,input,select,textarea{ font:inherit; color:inherit; }
button{ cursor:pointer; }
a{ color:inherit; }
svg{ display:block; }

.app{ position:relative; width:100%; max-width:430px; height:100vh; height:100dvh; margin:0 auto; background:var(--canvas); overflow:hidden; display:flex; flex-direction:column; }
@media (min-width:520px){
  body{ background:radial-gradient(1200px 600px at 50% -10%, #0d3d78 0%, #071a33 60%); display:flex; align-items:center; justify-content:center; }
  .app{ height:min(900px,100vh); border-radius:34px; box-shadow:0 40px 100px rgba(0,0,0,.55), 0 0 0 10px #0a1730, 0 0 0 11px #24406b; }
}
.screen{ flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; padding-bottom:24px; animation:in .28s ease; }
.screen.has-tabs{ padding-bottom:96px; }
@keyframes in{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none;} }

/* top bars */
.topbar{ display:flex; align-items:center; gap:10px; padding:calc(14px + var(--safe-t)) 18px 12px; background:var(--navy); color:#fff; }
.topbar h1{ font-size:17px; font-weight:700; margin:0; flex:1; }
.iconbtn{ width:40px; height:40px; border-radius:50%; border:0; background:rgba(255,255,255,.12); color:#fff; display:flex; align-items:center; justify-content:center; }
.iconbtn.dark{ background:#fff; color:var(--navy); border:1px solid var(--line); }

/* hero header on home */
.hero{ background:linear-gradient(160deg,var(--navy) 0%,var(--navy-2) 100%); color:#fff; padding:calc(18px + var(--safe-t)) 20px 74px; border-radius:0 0 30px 30px; }
.hero .row{ display:flex; align-items:center; justify-content:space-between; }
.hero small{ color:rgba(255,255,255,.72); font-size:13px; }
.hero h2{ margin:2px 0 0; font-size:22px; letter-spacing:-.01em; }
.avatar{ width:42px; height:42px; border-radius:50%; background:var(--cyan); color:var(--navy); display:flex; align-items:center; justify-content:center; font-weight:800; }
.pull{ margin:-56px 16px 0; }

/* cards */
.card{ background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:18px; box-shadow:0 8px 24px rgba(2,40,90,.07); }
.card + .card, .stack > * + *{ margin-top:14px; }
.pad{ padding:18px 16px 0; }
.sec-title{ font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--slate); margin:22px 18px 10px; }
.h-card-title{ font-size:15px; font-weight:700; margin:0 0 4px; }
.muted{ color:var(--slate); font-size:14px; line-height:1.5; }
.tiny{ font-size:12px; color:var(--mute); line-height:1.5; }
.big{ font-size:32px; font-weight:800; letter-spacing:-.02em; color:var(--navy); }
.row{ display:flex; align-items:center; gap:12px; }
.between{ justify-content:space-between; }
.grow{ flex:1; min-width:0; }

/* buttons */
.btn{ display:flex; align-items:center; justify-content:center; gap:8px; width:100%; border:0; border-radius:999px; padding:15px 20px; font-weight:700; font-size:15px; background:var(--cyan); color:var(--navy); box-shadow:0 8px 20px rgba(0,170,255,.3); transition:transform .15s, background .2s, color .2s; text-decoration:none; }
.btn:active{ transform:scale(.98); }
.btn:hover{ background:var(--navy); color:#fff; }
.btn.navy{ background:var(--navy); color:#fff; box-shadow:0 8px 20px rgba(2,40,90,.25); }
.btn.navy:hover{ background:var(--cyan); color:var(--navy); }
.btn.ghost{ background:transparent; color:var(--navy); border:1.5px solid var(--navy); box-shadow:none; }
.btn.ghost:hover{ background:var(--navy); color:#fff; }
.btn.sm{ width:auto; padding:10px 16px; font-size:13px; }
.btn:disabled{ opacity:.45; pointer-events:none; }
.link{ background:none; border:0; color:#0a6fb8; font-weight:700; padding:0; }

/* quick actions */
.quick{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; padding:0 16px; margin-top:16px; }
.q{ background:#fff; border:1px solid var(--line); border-radius:16px; padding:12px 4px 10px; display:flex; flex-direction:column; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--ink); }
.q i{ width:42px; height:42px; border-radius:13px; background:var(--navy); color:var(--cyan); display:flex; align-items:center; justify-content:center; }

/* tab bar */
.tabs{ position:absolute; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(5,1fr); background:#fff; border-top:1px solid var(--line); padding:8px 6px calc(8px + var(--safe-b)); z-index:5; }
.tab{ background:none; border:0; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:11px; font-weight:600; color:var(--mute); padding:4px 0; }
.tab.on{ color:var(--navy); }
.tab.on svg{ color:var(--cyan); }
.tab.mid i{ width:52px; height:52px; border-radius:50%; background:var(--cyan); color:var(--navy); display:flex; align-items:center; justify-content:center; margin-top:-26px; box-shadow:0 8px 20px rgba(0,170,255,.45); border:4px solid #fff; }
.tab.mid{ color:var(--navy); }

/* progress */
.bar{ height:8px; background:var(--line); border-radius:99px; overflow:hidden; }
.bar > i{ display:block; height:100%; background:linear-gradient(90deg,var(--cyan),#4cc3ff); border-radius:99px; transition:width .5s; }
.steps{ display:flex; gap:6px; padding:14px 18px 6px; background:#fff; }
.steps i{ flex:1; height:5px; border-radius:9px; background:var(--line); }
.steps i.on{ background:var(--cyan); }

/* forms */
label.f{ display:block; font-size:13px; font-weight:600; margin:14px 0 6px; color:var(--ink); }
.in{ width:100%; padding:13px 14px; border:1.5px solid var(--line); border-radius:14px; background:#fff; font-size:15px; outline:none; }
.in:focus{ border-color:var(--cyan); box-shadow:0 0 0 3px rgba(0,170,255,.18); }
.in.err{ border-color:var(--bad); }
.hint{ font-size:12px; color:var(--mute); margin-top:5px; }
.hint.err{ color:var(--bad); }
.hint.ok{ color:var(--ok); }
.two{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.seg{ display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:8px; }
.seg button{ border:1.5px solid var(--line); background:#fff; border-radius:14px; padding:11px 6px; font-weight:600; font-size:13px; }
.seg button.on{ border-color:var(--cyan); background:rgba(0,170,255,.1); color:var(--navy); }
input[type=range]{ width:100%; height:8px; border-radius:99px; -webkit-appearance:none; appearance:none; background:var(--line); outline:none; }
input[type=range]::-webkit-slider-thumb{ -webkit-appearance:none; width:26px; height:26px; border-radius:50%; background:var(--cyan); border:5px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.3); }
input[type=range]::-moz-range-thumb{ width:16px; height:16px; border-radius:50%; background:var(--cyan); border:5px solid #fff; }
.check{ display:flex; gap:10px; align-items:flex-start; font-size:13px; line-height:1.5; margin-top:12px; color:var(--slate); }
.check input{ width:20px; height:20px; margin-top:1px; accent-color:var(--navy); flex:none; }

/* lists */
.item{ display:flex; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.item:last-child{ border-bottom:0; }
.ico{ width:42px; height:42px; border-radius:13px; background:var(--navy); color:var(--cyan); display:flex; align-items:center; justify-content:center; flex:none; }
.ico.soft{ background:rgba(0,170,255,.12); color:var(--navy); }
.pill{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:4px 9px; border-radius:99px; background:rgba(0,170,255,.14); color:#075a93; }
.pill.ok{ background:rgba(18,161,80,.14); color:#0c7a3b; }
.pill.warn{ background:rgba(217,130,0,.15); color:#9a5d00; }
.pill.bad{ background:rgba(192,57,43,.13); color:var(--bad); }
.pill.gray{ background:var(--canvas); color:var(--slate); }

/* docs */
.doc{ display:block; border:1.5px dashed #b9c6d6; border-radius:16px; padding:14px; background:#fff; margin-top:12px; }
.doc.done{ border-style:solid; border-color:rgba(18,161,80,.5); background:rgba(18,161,80,.04); }
.doc.warn{ border-style:solid; border-color:rgba(217,130,0,.6); }
.doc .thumb{ width:46px; height:46px; border-radius:10px; object-fit:cover; background:var(--canvas); flex:none; }
.checks{ margin:10px 0 0; padding:0; list-style:none; font-size:13px; }
.checks li{ display:flex; align-items:center; gap:8px; padding:3px 0; color:var(--slate); }
.checks li.pass{ color:#0c7a3b; } .checks li.warn{ color:#9a5d00; } .checks li.fail{ color:var(--bad); }
.checks em{ font-style:normal; font-size:10px; font-weight:700; background:var(--canvas); color:var(--mute); padding:1px 6px; border-radius:99px; margin-left:auto; }
.spin{ width:16px; height:16px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--cyan); animation:sp .8s linear infinite; flex:none; }
@keyframes sp{ to{ transform:rotate(360deg);} }

/* selfie */
.cam{ position:relative; aspect-ratio:3/4; background:#0b1f3a; border-radius:22px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.cam video,.cam img{ width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
.cam .ring{ position:absolute; inset:14% 14% 20%; border:3px dashed rgba(255,255,255,.75); border-radius:50%; pointer-events:none; }
.cam p{ color:#9fb4cf; text-align:center; padding:20px; font-size:14px; }

/* timeline */
.tl{ position:relative; margin:6px 0 0; padding:0; list-style:none; }
.tl li{ position:relative; display:flex; gap:14px; padding:0 0 22px; }
.tl li::before{ content:''; position:absolute; left:15px; top:32px; bottom:0; width:2px; background:var(--line); }
.tl li:last-child::before{ display:none; }
.tl .dot{ width:32px; height:32px; border-radius:50%; background:#fff; border:2px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--mute); flex:none; z-index:1; }
.tl li.done .dot{ background:var(--cyan); border-color:var(--cyan); color:var(--navy); }
.tl li.done::before{ background:var(--cyan); }
.tl li.now .dot{ border-color:var(--cyan); color:var(--navy); box-shadow:0 0 0 5px rgba(0,170,255,.18); }
.tl b{ display:block; font-size:14px; } .tl span{ font-size:12.5px; color:var(--slate); }

/* sheet / toast */
.sheet-bg{ position:fixed; inset:0; background:rgba(2,20,40,.55); z-index:30; display:flex; align-items:flex-end; justify-content:center; animation:fade .2s; }
.sheet{ width:100%; max-width:430px; background:#fff; border-radius:26px 26px 0 0; padding:10px 20px calc(24px + var(--safe-b)); max-height:88vh; overflow:auto; animation:up .28s cubic-bezier(.2,.8,.2,1); }
.sheet .grab{ width:44px; height:5px; background:var(--line); border-radius:9px; margin:0 auto 16px; }
@keyframes up{ from{ transform:translateY(100%);} to{ transform:none;} } @keyframes fade{ from{ opacity:0;} }
.toast{ position:fixed; left:50%; bottom:110px; transform:translate(-50%,20px); background:var(--navy); color:#fff; padding:11px 18px; border-radius:99px; font-size:13px; font-weight:600; opacity:0; pointer-events:none; transition:.25s; z-index:50; max-width:90vw; text-align:center; }
.toast.on{ opacity:1; transform:translate(-50%,0); }

/* welcome */
.welcome{ flex:1; background:linear-gradient(170deg,var(--navy) 0%,#0a4c93 100%); color:#fff; display:flex; flex-direction:column; padding:calc(30px + var(--safe-t)) 26px calc(26px + var(--safe-b)); text-align:center; }
.welcome .logo{ width:fit-content; margin:0 auto; } .welcome .logo img{ height:52px; width:auto; display:block; }
.slide{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; }
.slide .bubble{ width:120px; height:120px; border-radius:34px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; color:var(--cyan); }
.slide h2{ font-size:26px; margin:6px 0 0; letter-spacing:-.02em; } .slide p{ margin:0; color:rgba(255,255,255,.78); line-height:1.55; max-width:30ch; }
.dots{ display:flex; gap:7px; justify-content:center; margin-bottom:20px; } .dots i{ width:8px; height:8px; border-radius:9px; background:rgba(255,255,255,.3); transition:.3s; } .dots i.on{ width:26px; background:var(--cyan); }
.demo-ribbon{ background:#fff7e0; color:#8a5a00; font-size:12px; font-weight:600; text-align:center; padding:6px 10px; }
.otp{ letter-spacing:.5em; text-align:center; font-size:22px; font-weight:700; }
.center{ text-align:center; }
.faq{ border-bottom:1px solid var(--line); } .faq button{ width:100%; text-align:left; background:none; border:0; padding:14px 0; font-weight:600; display:flex; justify-content:space-between; gap:10px; } .faq div{ display:none; padding:0 0 14px; color:var(--slate); font-size:14px; line-height:1.55; } .faq.open div{ display:block; } .faq.open svg{ transform:rotate(90deg); }
@media (prefers-reduced-motion:reduce){ *{ animation:none!important; transition:none!important; } }

.tab.mid.on svg{ color:var(--navy); }

/* LendPay: QR + amount entry */
.qrbox{ background:#fff; border:1px solid var(--line); border-radius:20px; padding:14px; width:min(300px,100%); margin:0 auto; }
.qrbox img{ display:block; width:100%; height:auto; image-rendering:pixelated; }
.amt-in{ display:flex; align-items:center; border:2px solid var(--line); border-radius:16px; padding:0 16px; background:#fff; }
.amt-in:focus-within{ border-color:var(--cyan); box-shadow:0 0 0 4px rgba(0,170,255,.18); }
.amt-in span{ font-size:26px; font-weight:800; color:var(--navy); margin-right:8px; }
.amt-in input{ border:0; outline:0; font-size:30px; font-weight:800; width:100%; padding:12px 0; color:var(--navy); background:transparent; }
