/* ============ OUTER STAGE ============ */
:root {
  --stage-bg: #0B1020;
  --panel-bg: rgba(255, 255, 255, .04);
  --panel-line: rgba(255, 255, 255, .09);
  --panel-text: #E6E9F2;
  --panel-muted: #8B93A7;
  --panel-accent: #6EA8FF;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Google Sans Flex', system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 700px at 70% 20%, #1A2450 0%, var(--stage-bg) 60%);
  color: var(--panel-text);
  overflow: hidden;
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; }

.stage { display: flex; height: 100vh; height: 100dvh; }

.panel {
  width: 320px; flex-shrink: 0; padding: 24px 20px; overflow-y: auto;
  background: var(--panel-bg); border-right: 1px solid var(--panel-line);
  display: flex; flex-direction: column; gap: 10px;
  transition: margin-left .3s ease;
}
body.present .panel { margin-left: -320px; }
.panel-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.panel-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6EA8FF, #A78BFA); font-weight: 800; color: #0B1020;
}
.panel-title { font-weight: 700; font-size: 15px; }
.panel-sub { font-size: 12px; color: var(--panel-muted); }
.p-label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--panel-muted); margin-top: 12px; display: flex; justify-content: space-between; align-items: center;
}
.p-link { font-size: 11px; color: var(--panel-accent); text-transform: none; letter-spacing: 0; }
.p-select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--panel-line);
  background: #141B33; color: var(--panel-text); font-weight: 600; font-size: 14px;
}
.p-meta { font-size: 12px; color: var(--panel-muted); line-height: 1.6; }
.p-meta b { color: var(--panel-text); font-weight: 600; }
.p-toggles { display: flex; flex-direction: column; gap: 6px; }
.p-toggle {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; background: #141B33; border: 1px solid var(--panel-line); font-size: 13px;
}
.p-toggle small { display: block; color: var(--panel-muted); font-size: 11px; }
.p-toggle input { width: 34px; height: 20px; accent-color: var(--panel-accent); }
.p-steps { list-style: none; display: flex; flex-direction: column; gap: 2px; counter-reset: s; }
.p-steps li {
  counter-increment: s; font-size: 13px; padding: 7px 10px; border-radius: 8px; color: var(--panel-muted);
  display: flex; gap: 10px; align-items: center;
}
.p-steps li::before {
  content: counter(s); width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #1C2442;
}
.p-steps li.done { color: var(--panel-text); }
.p-steps li.done::before { background: #2E7D5B; content: '✓'; }
.p-steps li.active { background: rgba(110, 168, 255, .12); color: #fff; font-weight: 600; }
.p-steps li.active::before { background: var(--panel-accent); color: #0B1020; }
.p-steps li.ins { }
.p-steps li.jump { cursor: pointer; }
.p-steps li.jump:hover { color: var(--panel-text); }
.p-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 10px; background: #141B33; border: 1px solid var(--panel-line); margin-bottom: 6px; }
.p-seg button { border: 0; background: none; color: var(--panel-muted); font: inherit; font-size: 13px; font-weight: 600; padding: 8px; border-radius: 8px; cursor: pointer; }
.p-seg button.on { background: var(--panel-accent); color: #0B1020; }
.p-chips { display: flex; flex-direction: column; gap: 4px; }
.p-label[hidden], .p-chips[hidden] { display: none; }
.p-chip { display: flex; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--panel-line); background: #141B33; color: var(--panel-text); font: inherit; font-size: 12.5px; padding: 7px 10px; border-radius: 9px; cursor: pointer; }
.p-chip i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.p-chip.on { border-color: var(--panel-accent); background: rgba(110, 168, 255, .12); }
.p-steps li .tag { margin-left: auto; font-size: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(167, 139, 250, .18); color: #C4B5FD; }
.p-log {
  min-height: 90px; max-height: 200px; overflow-y: auto; font-size: 12px; line-height: 1.5;
  background: #0E1429; border: 1px solid var(--panel-line); border-radius: 10px; padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.p-log .empty { color: var(--panel-muted); font-family: 'Google Sans Flex', sans-serif; }
.p-log div { padding: 2px 0; }
.p-log .t { color: var(--panel-muted); margin-right: 6px; }
.p-log .ev { color: #C4B5FD; }
.p-log .ev.buy { color: #6EE7B7; }
.p-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; }
.p-btn {
  padding: 11px; border-radius: 10px; background: var(--panel-accent); color: #0B1020; font-weight: 700; font-size: 13px;
}
.p-btn.ghost { background: transparent; border: 1px solid var(--panel-line); color: var(--panel-text); font-weight: 500; }

.device-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; position: relative; }
.demo-note { font-size: 12px; font-weight: 600; color: #FCD34D; background: rgba(252, 211, 77, .1); border: 1px solid rgba(252, 211, 77, .3); padding: 6px 14px; border-radius: 20px; text-align: center; }
.device-wrap { position: relative; }

/* ============ PHONE FRAME ============ */
.phone {
  position: absolute; top: 0; left: 0; transform-origin: top left;
  width: 418px; height: 872px; border-radius: 68px; padding: 14px;
  background: linear-gradient(145deg, #2B2F3A, #0D0F14 40%, #1D2029);
  box-shadow: 0 0 0 2px #3A3F4C, 0 0 0 5px #111319, 0 50px 120px rgba(0, 0, 0, .55), inset 0 0 6px rgba(255, 255, 255, .15);
}
.phone-btn { position: absolute; background: #23262F; border-radius: 3px; width: 4px; }
.phone-btn.b1 { left: -6px; top: 150px; height: 34px; }
.phone-btn.b2 { left: -6px; top: 210px; height: 64px; }
.phone-btn.b3 { left: -6px; top: 290px; height: 64px; }
.phone-btn.b4 { right: -6px; top: 240px; height: 100px; }

.screen {
  --p: #1B3C8C; --pd: #0F2766; --ac: #2EA3F2; --soft: #EAF1FB; --hero: var(--p);
  --bg: #F3F5F9; --card: #fff; --text: #111827; --muted: #6B7280; --line: #E5E7EB;
  --ok: #10B981; --warn: #F59E0B; --err: #EF4444;
  position: relative; width: 390px; height: 844px; border-radius: 54px; overflow: hidden;
  background: var(--bg); color: var(--text); font-size: 14px;
  isolation: isolate;
}
.island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 124px; height: 36px; border-radius: 20px; background: #000; z-index: 50;
}
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 40;
  display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 44px;
  font-weight: 600; font-size: 16px; color: var(--sbc, #fff); pointer-events: none;
  background: var(--sbg, var(--pd)); transition: background .2s;
}
.statusbar svg { fill: currentColor; }
.sb-icons { display: flex; gap: 6px; align-items: center; }
.batt { width: 26px; height: 12px; border: 1.5px solid currentColor; border-radius: 4px; padding: 1.5px; opacity: .95; position: relative; }
.batt span { display: block; height: 100%; width: 78%; background: currentColor; border-radius: 1.5px; }
.batt::after { content: ''; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: currentColor; border-radius: 1px; }
.home-ind {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 136px; height: 5px;
  border-radius: 3px; background: #111; z-index: 60; pointer-events: none; opacity: .85;
}
.screen.dark-ind .home-ind { background: #fff; }

/* ============ APP ============ */
.app { position: absolute; inset: 0; }
/* WebView iBaohiem phủ màn hình app, chừa thanh trạng thái */
.hub-view { position: absolute; left: 0; top: 54px; width: 100%; height: calc(100% - 54px); border: 0; z-index: 30; background: #f3f4f9; }
.hub-view[hidden] { display: none; }
body.native .hub-view { top: 0; height: 100%; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); animation: slideIn .28s ease; }
.scr.fade { animation: fadeIn .25s ease; }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.body { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.body::-webkit-scrollbar { display: none; }
.pad { padding: 16px; }
.footer { padding: 12px 16px 30px; background: var(--card); border-top: 1px solid var(--line); }

/* nav */
.nav {
  background: var(--hero); color: #fff; padding: 56px 8px 14px; display: flex; align-items: center; flex-shrink: 0;
}
.nav-title { flex: 1; text-align: center; font-weight: 700; font-size: 17px; }
.nav-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.nav-btn:active { background: rgba(255, 255, 255, .15); }

/* buttons */
.btn {
  width: 100%; height: 50px; border-radius: 14px; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--p); color: #fff; }
.btn.primary:disabled { background: #C7CCD8; color: #fff; cursor: not-allowed; transform: none; }
.btn.outline { border: 1.5px solid var(--p); color: var(--p); background: #fff; }
.btn.soft { background: var(--soft); color: var(--p); }
.btn-row { display: flex; gap: 10px; }

/* home */
.home-hero { background: var(--hero); color: #fff; padding: 58px 16px 70px; position: relative; overflow: hidden; }
.home-hero::after {
  content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; right: -90px; top: -60px;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
}
.home-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center;
  font-weight: 700; border: 2px solid rgba(255, 255, 255, .4);
}
.hello { font-size: 12px; opacity: .8; }
.uname { font-weight: 700; font-size: 15px; }
.spacer { flex: 1; }
.logo-chip {
  font-weight: 800; letter-spacing: .02em; font-size: 15px; padding: 5px 10px; border-radius: 8px;
  background: #fff; color: var(--p);
}
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; position: relative; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #FF4D4F; border: 1.5px solid var(--p); }

.acct-card {
  margin: -54px 16px 0; background: var(--card); border-radius: 20px; padding: 16px; position: relative; z-index: 2;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .1);
}
.acct-row { display: flex; justify-content: space-between; align-items: center; }
.acct-label { font-size: 12px; color: var(--muted); }
.acct-no { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.acct-bal { font-size: 24px; font-weight: 800; color: var(--text); margin-top: 6px; display: flex; align-items: baseline; gap: 6px; }
.acct-bal small { font-size: 13px; font-weight: 600; color: var(--muted); }
.acct-eye { color: var(--muted); padding: 6px; }
.acct-links { display: flex; border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.acct-links button { flex: 1; font-size: 12px; color: var(--p); font-weight: 600; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; padding: 20px 16px 8px; }
.q-item { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; text-align: center; line-height: 1.25; color: var(--text); }
.q-ic {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--soft); color: var(--p);
  position: relative; transition: transform .1s;
}
.q-item:active .q-ic { transform: scale(.94); }
.q-ic .new { position: absolute; top: -5px; right: -8px; font-size: 9px; font-weight: 700; background: #FF4D4F; color: #fff; padding: 1px 5px; border-radius: 6px; }

.sec-title { font-weight: 700; font-size: 15px; padding: 16px 16px 10px; display: flex; justify-content: space-between; }
.sec-title a { font-size: 12px; color: var(--p); font-weight: 600; }

.promo {
  margin: 8px 16px 0; border-radius: 18px; padding: 16px; color: #fff; position: relative; overflow: hidden; text-align: left; width: calc(100% - 32px);
  display: flex; gap: 12px; align-items: center;
}
.promo::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -40px; bottom: -70px; background: rgba(255, 255, 255, .15); }
.promo .pi { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex-shrink: 0; }
.promo .pt { font-weight: 700; font-size: 15px; }
.promo .ps { font-size: 12px; opacity: .9; margin-top: 2px; }
.promo .pbadge { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: #fff; color: var(--text); position: relative; z-index: 1; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 16px; }
.tile { background: var(--card); border-radius: 14px; padding: 12px; font-size: 12px; color: var(--muted); }
.tile b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }

.tabbar {
  display: flex; background: var(--card); border-top: 1px solid var(--line); padding: 8px 6px 26px; flex-shrink: 0;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); }
.tab.on { color: var(--p); font-weight: 600; }
.tab.center .tc { width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; border: 4px solid var(--bg); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }

/* transfer form */
.card { background: var(--card); border-radius: 16px; padding: 14px; }
.card + .card { margin-top: 12px; }
.src { display: flex; align-items: center; gap: 12px; }
.src .si { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--p); display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.src .sn { font-weight: 600; }
.src .sb { font-size: 12px; color: var(--muted); }
.seg { display: flex; background: #E9ECF2; border-radius: 12px; padding: 3px; margin: 14px 0; }
.seg button { flex: 1; padding: 8px 4px; font-size: 12.5px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.seg button.on { background: #fff; color: var(--p); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.lbl { font-size: 12px; color: var(--muted); font-weight: 500; margin: 0 2px 8px; }
.contacts { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-bottom: 14px; }
.contacts::-webkit-scrollbar { display: none; }
.ct { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; flex-shrink: 0; font-size: 10.5px; text-align: center; line-height: 1.2; }
.ct .ca { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--p); font-size: 13px; }
.ct.sel .ca { border-color: var(--p); background: var(--soft); }
.ct .cb { color: var(--muted); font-size: 9.5px; }
.field { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 14px; margin-bottom: 10px; transition: border-color .15s; display: block; width: 100%; text-align: left; }
.field:focus-within { border-color: var(--p); }
.field label, .field .fl { font-size: 11.5px; color: var(--muted); display: block; }
.field input, .field textarea { width: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 600; color: var(--text); padding: 3px 0 1px; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: #B6BCC8; font-weight: 500; }
.field .fv { font-size: 15px; font-weight: 600; padding: 3px 0 1px; display: flex; justify-content: space-between; align-items: center; color: var(--text); }
.field .fv.ph { color: #B6BCC8; font-weight: 500; }
.field-amt { display: flex; align-items: center; }
.field-amt input { font-size: 22px; font-weight: 800; }
.field-amt .cur { font-weight: 700; color: var(--muted); }
.namerow { margin: -4px 4px 12px; font-size: 13px; min-height: 18px; display: flex; align-items: center; gap: 6px; }
.namerow.ok { color: var(--ok); font-weight: 700; }
.namerow.load { color: var(--muted); }
.words { font-size: 12px; color: var(--muted); font-style: italic; margin: -4px 4px 10px; min-height: 16px; }
.words.err { color: var(--err); font-style: normal; }
.chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { padding: 7px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text); }
.chip:active { background: var(--soft); border-color: var(--p); }

.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* confirm */
.amt-hero { text-align: center; padding: 18px 12px 16px; }
.amt-hero .al { font-size: 12px; color: var(--muted); }
.amt-hero .av { font-size: 30px; font-weight: 800; color: var(--p); margin: 4px 0; }
.amt-hero .aw { font-size: 12px; color: var(--muted); font-style: italic; }
.rows .r { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid #F1F2F5; font-size: 13.5px; }
.rows .r:last-child { border-bottom: 0; }
.rows .r span:first-child { color: var(--muted); flex-shrink: 0; }
.rows .r span:last-child { text-align: right; font-weight: 600; }
.rows .r .sub { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.r.total span:last-child { color: var(--p); font-size: 16px; font-weight: 800; }

/* embedded offer */
.offer {
  margin-top: 12px; border-radius: 16px; padding: 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #F0F9FF, #FFFFFF 60%); border: 1.5px solid #BAE6FD; transition: all .2s;
}
.offer.on { border-color: var(--ok); background: linear-gradient(135deg, #ECFDF5, #fff 60%); box-shadow: 0 0 0 3px rgba(16, 185, 129, .12); }
.offer .ob { position: absolute; top: 0; right: 0; font-size: 10px; font-weight: 700; padding: 4px 10px; border-bottom-left-radius: 12px; background: #0EA5E9; color: #fff; }
.offer.on .ob { background: var(--ok); }
.offer .oh { display: flex; gap: 12px; align-items: flex-start; }
.offer .oi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.offer .ot { font-weight: 700; font-size: 14px; padding-right: 58px; }
.offer .od { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.offer .of { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #D5DAE3; }
.offer .op { font-size: 13px; }
.offer .op b { font-size: 16px; color: var(--text); }
.offer .more { font-size: 12px; color: var(--p); font-weight: 600; text-decoration: underline; margin-top: 8px; display: inline-block; }
.offer .prov { font-size: 10.5px; color: var(--muted); margin-top: 8px; }
.sw { width: 50px; height: 30px; border-radius: 20px; background: #D1D5DB; position: relative; transition: background .2s; flex-shrink: 0; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.sw.on { background: var(--ok); }
.sw.on::after { transform: translateX(20px); }

/* otp */
.otp-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 30px 24px 0; text-align: center; }
.otp-ic { width: 72px; height: 72px; border-radius: 22px; background: var(--soft); color: var(--p); display: grid; place-items: center; margin-bottom: 18px; }
.otp-t { font-weight: 700; font-size: 18px; }
.otp-s { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.dots { display: flex; gap: 16px; margin: 28px 0 10px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #C5CAD5; transition: all .12s; }
.dots i.f { background: var(--p); border-color: var(--p); transform: scale(1.08); }
.dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.otp-hint { font-size: 11.5px; color: var(--muted); background: #FFF7E6; color: #9A6700; padding: 5px 10px; border-radius: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 24px 34px; background: #fff; }
.key { height: 54px; border-radius: 14px; font-size: 24px; font-weight: 600; color: var(--text); }
.key:active { background: var(--soft); }
.key.fn { font-size: 14px; color: var(--muted); display: grid; place-items: center; }

/* processing */
.proc { position: absolute; inset: 0; background: rgba(255, 255, 255, .96); z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; animation: fadeIn .2s; }
.proc .ring { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--soft); border-top-color: var(--p); animation: rot .8s linear infinite; }
.proc p { font-weight: 600; color: var(--muted); }

/* success */
.succ-hero { background: var(--hero); color: #fff; padding: 64px 20px 76px; text-align: center; position: relative; }
.succ-check { width: 68px; height: 68px; border-radius: 50%; background: #fff; color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.succ-t { font-weight: 700; font-size: 17px; opacity: .95; }
.succ-a { font-size: 30px; font-weight: 800; margin-top: 4px; }
.succ-d { font-size: 12px; opacity: .8; margin-top: 4px; }
.receipt { margin: -56px 16px 0; position: relative; z-index: 2; box-shadow: 0 10px 30px rgba(16, 24, 40, .08); }
.policy-ok {
  display: flex; gap: 12px; align-items: center; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 14px; padding: 12px; margin-top: 12px;
}
.policy-ok .pk { width: 36px; height: 36px; border-radius: 10px; background: var(--ok); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.policy-ok b { font-size: 13px; display: block; }
.policy-ok span { font-size: 11.5px; color: #047857; }

.xsell { margin-top: 18px; }
.xs-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.xs-h .spark { color: #F59E0B; }
.xs-card {
  display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 14px; width: 100%; text-align: left;
  border: 1px solid var(--line); margin-bottom: 10px; position: relative; overflow: hidden;
}
.xs-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.xs-card .xi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; }
.xs-card .xt { font-weight: 700; font-size: 14px; }
.xs-card .xd { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.xs-card .xb { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); padding: 2px 8px; border-radius: 8px; }
.xs-card .xgo { color: var(--muted); flex-shrink: 0; }

/* product */
.prod-hero { color: #fff; padding: 56px 16px 60px; position: relative; overflow: hidden; }
.prod-hero::after { content: ''; position: absolute; width: 240px; height: 240px; border-radius: 50%; right: -70px; top: 10px; background: rgba(255, 255, 255, .14); }
.prod-hero .nav-btn { margin-left: -8px; }
.prod-hero .pic { width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; margin: 10px 0 12px; }
.prod-hero h2 { font-size: 21px; font-weight: 800; line-height: 1.25; position: relative; z-index: 1; }
.prod-hero p { font-size: 13px; opacity: .92; margin-top: 6px; line-height: 1.45; position: relative; z-index: 1; }
.prod-hero .prov { font-size: 11px; opacity: .85; margin-top: 10px; display: inline-flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .15); padding: 4px 10px; border-radius: 20px; position: relative; z-index: 1; }
.prod-body { margin-top: -36px; position: relative; z-index: 2; padding: 0 16px 16px; }
.plans { display: flex; flex-direction: column; gap: 8px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; width: 100%; text-align: left; }
.plan.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, white); }
.plan .rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #C5CAD5; flex-shrink: 0; position: relative; }
.plan.on .rd { border-color: var(--c); }
.plan.on .rd::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--c); }
.plan .pn { font-weight: 700; font-size: 14px; }
.plan .pc { font-size: 12px; color: var(--muted); }
.plan .pp { margin-left: auto; text-align: right; font-weight: 800; font-size: 14px; }
.plan .pp small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.benefits { list-style: none; }
.benefits li { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; padding: 7px 0; }
.benefits li svg { color: var(--ok); flex-shrink: 0; margin-top: 1px; }
.autofill { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--p); background: var(--soft); padding: 7px 10px; border-radius: 10px; margin-bottom: 8px; font-weight: 600; }
.consent { display: flex; gap: 10px; font-size: 12px; color: var(--muted); line-height: 1.5; align-items: flex-start; margin-top: 14px; text-align: left; }
.consent .cb { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #C5CAD5; flex-shrink: 0; display: grid; place-items: center; color: #fff; }
.consent.on .cb { background: var(--p); border-color: var(--p); }
.consent a { color: var(--p); font-weight: 600; }
.buybar { display: flex; align-items: center; gap: 14px; }
.buybar .bp { flex-shrink: 0; }
.buybar .bp small { display: block; font-size: 11px; color: var(--muted); }
.buybar .bp b { font-size: 18px; font-weight: 800; }

/* certificate */
.cert { border-radius: 20px; padding: 18px; color: #fff; position: relative; overflow: hidden; margin-top: 4px; }
.cert::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -60px; top: -60px; background: rgba(255, 255, 255, .15); }
.cert .ch { display: flex; justify-content: space-between; align-items: center; font-size: 11px; opacity: .9; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.cert .cn { font-size: 19px; font-weight: 800; margin: 10px 0 2px; position: relative; z-index: 1; }
.cert .cno { font-size: 12px; opacity: .9; font-family: ui-monospace, Menlo, monospace; }
.cert .cg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.cert .cg div { font-size: 11px; opacity: .85; }
.cert .cg b { display: block; font-size: 13px; opacity: 1; margin-top: 1px; }

/* insurance hub */
.pol { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #F1F2F5; }
.pol:last-child { border-bottom: 0; }
.pol .pi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.pol .pt { font-weight: 600; font-size: 13.5px; }
.pol .ps { font-size: 11.5px; color: var(--muted); }
.pol .st { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ok); background: #ECFDF5; padding: 3px 8px; border-radius: 8px; }
.empty-s { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 0; }

/* bảo hiểm của tôi */
.chip.sel { background: var(--soft); border-color: var(--p); color: var(--p); }
.mp-sum { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--hero); color: #fff; margin-bottom: 12px; }
.mp-sum .ms-i { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex-shrink: 0; }
.mp-sum small { display: block; font-size: 11.5px; opacity: .85; }
.mp-sum b { display: block; font-size: 14px; margin-top: 1px; }
.mp-sum .ms-r { margin-left: auto; text-align: right; }
.mp { background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.mp::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.mp-h { display: flex; align-items: center; gap: 12px; }
.mp-i { width: 42px; height: 42px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.mp-t { flex: 1; min-width: 0; }
.mp-t b { display: block; font-size: 14.5px; line-height: 1.3; }
.mp-t small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.mp-st { font-size: 11px; font-weight: 700; color: var(--ok); background: #ECFDF5; padding: 4px 8px; border-radius: 8px; white-space: nowrap; align-self: flex-start; }
.mp-g { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.mp-g small { display: block; font-size: 11.5px; color: var(--muted); }
.mp-g b { display: block; font-size: 13px; margin-top: 1px; }
.mp-bar { height: 6px; border-radius: 3px; background: #EEF0F4; margin-top: 14px; overflow: hidden; }
.mp-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.mp-left { font-size: 12px; color: var(--muted); margin-top: 6px; }
.mp-claim { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: #9A6700; background: #FFF7E6; border-radius: 10px; padding: 9px 10px; margin-top: 12px; width: 100%; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.mp-claim svg { flex-shrink: 0; margin-top: 1px; }
.mp-act { display: flex; gap: 8px; margin-top: 12px; }
.mp-act button { flex: 1; height: 40px; border-radius: 12px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--soft); color: var(--p); }
.mp-act button:disabled { opacity: .45; cursor: not-allowed; }
.mp-more { width: 100%; height: 44px; border-radius: 12px; border: 1.5px dashed #C9CFDA; color: var(--p); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mp-empty { text-align: center; background: var(--card); border-radius: 16px; padding: 28px 22px 22px; }
.mp-empty > span { width: 76px; height: 76px; border-radius: 50%; background: var(--soft); color: var(--p); display: grid; place-items: center; margin: 0 auto 14px; }
.mp-empty b { font-size: 15.5px; }
.mp-empty p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 6px 0 18px; }
.mp-help { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border-radius: 14px; padding: 12px 14px; margin-top: 12px; color: var(--p); }
.mp-help span { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); }
.mp-help small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* sheet */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 70; }
.sheet-backdrop.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 78%; background: #fff; border-radius: 24px 24px 0 0; z-index: 71;
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column;
}
.sheet.on { transform: none; }
.sh-grab { width: 40px; height: 5px; border-radius: 3px; background: #D9DDE5; margin: 8px auto 4px; flex-shrink: 0; }
.sh-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 10px; font-weight: 700; font-size: 16px; }
.sh-b { overflow-y: auto; padding: 0 16px 34px; }
.search { display: flex; align-items: center; gap: 8px; background: #F3F4F7; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 16px; }
.bank-it { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #F1F2F5; width: 100%; text-align: left; }
.bank-it .bl { width: 40px; height: 40px; border-radius: 10px; background: var(--soft); color: var(--p); display: grid; place-items: center; font-weight: 800; font-size: 10px; flex-shrink: 0; }
.bank-it .bn { font-size: 13.5px; font-weight: 500; }

/* toast */
.toast {
  position: absolute; left: 50%; bottom: 110px; transform: translate(-50%, 20px); background: rgba(17, 24, 39, .92); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 13px; opacity: 0; transition: all .25s; z-index: 90; pointer-events: none; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ============ RESPONSIVE ============ */
.panel-close, .note-btn, .panel-scrim { display: none; }

/* Màn hình hẹp (tablet, laptop nhỏ): bảng điều khiển thành ngăn kéo */
body.drawer .panel {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000; width: min(320px, 86vw);
  background: #10162B; margin-left: 0; transform: translateX(-100%); transition: transform .28s ease;
  box-shadow: 20px 0 60px rgba(0, 0, 0, .4); padding-top: max(24px, env(safe-area-inset-top));
}
body.drawer.panel-open .panel { transform: none; }
body:not(.ready) .panel { transition: none; }
body.drawer .panel-close { display: block; margin-left: auto; font-size: 18px; color: var(--panel-muted); padding: 6px 8px; }
body.drawer .panel-scrim { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .28s; }
body.drawer.panel-open .panel-scrim { opacity: 1; pointer-events: auto; }
body.drawer .demo-note { display: flex; align-items: center; gap: 10px; }
body.drawer .note-btn { display: inline-block; font-size: 12px; font-weight: 700; color: #0B1020; background: #FCD34D; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }

/* Điện thoại thật: bỏ khung, app chiếm toàn màn hình */
body.native { background: var(--stage-bg); }
body.native .device-area { justify-content: flex-start; gap: 0; }
body.native .demo-note {
  order: -1; width: 100%; border-radius: 0; border-width: 0 0 1px; font-size: 11px; padding: 5px 12px;
  padding-top: max(5px, env(safe-area-inset-top)); justify-content: space-between; background: #1A1608;
}
body.native .device-wrap { flex: 1; min-height: 0; width: 100% !important; height: auto !important; }
body.native .phone {
  position: relative; width: 100%; height: 100%; transform: none !important; padding: 0; border-radius: 0;
  background: none; box-shadow: none;
}
body.native .phone-btn, body.native .island, body.native .statusbar, body.native .home-ind { display: none; }
body.native .screen { width: 100%; height: 100%; border-radius: 0; }
body.native .nav { padding-top: 10px; }
body.native .home-hero { padding-top: 16px; }
body.native .succ-hero { padding-top: 28px; }
body.native .prod-hero { padding-top: 12px; }
body.native .footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
body.native .tabbar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
body.native .keypad { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
body.native .sh-b { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
body.native .otp-wrap { padding-top: 16px; }

/* Nhúng trong landing page (?embed=1): bỏ panel, banner, khung máy; màn hình app 390×844 ở góc trái trên */
body.embed { background: transparent; overflow: hidden; }
body.embed .panel, body.embed .panel-scrim, body.embed .demo-note { display: none !important; }
body.embed .stage, body.embed .device-area { display: block; height: auto; }
body.embed .device-wrap { width: 390px !important; height: 844px !important; }
body.embed .phone { transform: none !important; width: 390px; height: 844px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
body.embed .phone-btn { display: none; }
body.embed .screen { border-radius: 0; }

/* Ưu đãi tặng kỳ đầu + ô tích đồng ý ở gợi ý bảo hiểm màn xác nhận */
.promo-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #FFF1E6; color: #C2410C; font-size: 11.5px; font-weight: 700; }
.offer .op s { color: var(--muted); font-weight: 500; }
.promo-note { margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.addon-consent { width: 100%; margin-top: 10px; padding: 10px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-size: 12.5px; color: var(--text); }
.addon-consent.on { border-color: var(--p); }

/* Cỡ chữ lớn: phóng nội dung màn hình, khách cuộn để xem hết */
body.big .app .body > *, body.big .sh-b > * { zoom: 1.28; }
body.big .sc-sheet { max-height: 94%; }
/* Luồng mua thông thường: ô nhập thông tin */
.info-f { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.info-f small { font-size: 11.5px; color: var(--muted); }
.info-f b { font-size: 15px; font-weight: 600; color: var(--text); }
.info-f.ph b { color: #B6BCC8; font-weight: 500; }
.info-f.next { border-color: var(--p); box-shadow: 0 0 0 3px var(--soft); cursor: pointer; }
.info-f.done { border-color: var(--line); }
.data-h { font-size: 14px; font-weight: 700; margin: 14px 0 4px; }
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc-list button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.svc-list button > span:nth-child(2) { flex: 1; }
.svc-list .si { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--p); display: grid; place-items: center; flex-shrink: 0; }
.svc-list button > svg { color: var(--muted); }
.terms-box { font-size: 12.5px; line-height: 1.5; color: var(--muted); max-height: 360px; overflow-y: auto; }
.terms-box b { display: block; color: var(--text); font-size: 13px; margin-top: 8px; }
.terms-box b:first-child { margin-top: 0; }
