:root {
  --bg: #05070d;
  --bg2: #0b101c;
  --card: rgba(18, 24, 40, 0.72);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #f4f7ff;
  --muted: #8b95ad;
  --primary: #3d8bff;
  --gold: #f0c14b;
  --green: #00e676;
  --orange: #ff8a3d;
  --purple: #a78bfa;
  --danger: #ff4d6d;
  --radius: 18px;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
}
body { position: relative; }

#bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61,139,255,0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(167,139,250,0.1), transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 70%, rgba(0,230,118,0.06), transparent 50%);
}

.screen {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  animation: fadeIn .45s cubic-bezier(.22,1,.36,1);
}
.screen.hidden, .hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,139,255,.35); }
  50% { box-shadow: 0 0 28px 4px rgba(61,139,255,.2); }
}
@keyframes spin-coin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
@keyframes orbit {
  to { transform: rotate(360deg); }
}
@keyframes bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(220%); }
}
@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes ring-pop {
  0% { transform: scale(.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes number-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ========== SPLASH ========== */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0d1528 0%, #05070d 70%);
  transition: opacity .6s ease, visibility .6s;
}
.splash.done { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-core { text-align: center; position: relative; }
.orbit, .orbit.o2 {
  position: absolute; left: 50%; top: 38%;
  width: 140px; height: 140px; margin: -70px 0 0 -70px;
  border: 1px solid rgba(61,139,255,.25);
  border-radius: 50%;
  animation: orbit 8s linear infinite;
}
.orbit.o2 {
  width: 180px; height: 180px; margin: -90px 0 0 -90px;
  border-color: rgba(240,193,75,.2);
  animation-duration: 12s; animation-direction: reverse;
}
.coin-3d {
  width: 88px; height: 88px; margin: 0 auto 28px;
  perspective: 600px; position: relative;
  transform-style: preserve-3d;
  animation: spin-coin 2.8s linear infinite;
}
.coin-face {
  position: absolute; inset: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 28px; letter-spacing: 1px;
  background: linear-gradient(145deg, #f5d76e, #c9a227 45%, #8a6d1a);
  color: #2a2108;
  backface-visibility: hidden;
  box-shadow: inset 0 2px 8px rgba(255,255,255,.4), 0 8px 24px rgba(240,193,75,.35);
}
.coin-face.back { transform: rotateY(180deg); }
.coin-edge {
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: linear-gradient(90deg, #a88920, #f0c14b, #a88920);
  transform: translateZ(-2px);
  opacity: .7;
}
.brand {
  font-size: 32px; font-weight: 800; letter-spacing: 3px;
  background: linear-gradient(90deg, #fff, #a8c8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand span { color: var(--gold); -webkit-text-fill-color: var(--gold); }
.tagline { color: var(--muted); margin-top: 8px; font-size: 14px; letter-spacing: .5px; }
.splash-bar {
  width: 120px; height: 3px; margin: 28px auto 0;
  background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden;
}
.splash-bar i {
  display: block; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), var(--gold), transparent);
  animation: bar 1.2s ease-in-out infinite;
}

/* ========== LOGIN ========== */
.login-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; gap: 28px;
}
.login-logo {
  font-size: 26px; font-weight: 800; letter-spacing: 2px;
}
.login-logo span { color: var(--gold); }
.glass-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 28px 22px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  animation: rise .55s cubic-bezier(.22,1,.36,1);
}
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 6px; letter-spacing: .3px;
}
.field input {
  width: 100%; padding: 14px 16px;
  border-radius: 14px; border: 1px solid var(--glass-border);
  background: rgba(0,0,0,.35); color: var(--text);
  font-size: 16px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus {
  border-color: rgba(61,139,255,.55);
  box-shadow: 0 0 0 3px rgba(61,139,255,.15);
}
.msg { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 18px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--green); }
.code-block { margin-top: 8px; animation: rise .4s ease; }

/* ========== BUTTONS ========== */
.btn {
  position: relative; overflow: hidden;
  width: 100%; padding: 15px;
  border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; color: #fff;
  transition: transform .15s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, #3d8bff, #1a5fd4);
  box-shadow: 0 8px 24px rgba(61,139,255,.35);
  margin-top: 6px;
}
.btn-gold {
  background: linear-gradient(135deg, #f0c14b, #c9a227);
  color: #1a1505;
  box-shadow: 0 8px 24px rgba(240,193,75,.3);
  margin-top: 8px;
}
.btn .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: scale(0); pointer-events: none;
}

/* ========== HEADER ========== */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 8px;
  padding-top: max(14px, env(safe-area-inset-top));
  flex-shrink: 0;
}
.app-header.compact { padding-bottom: 12px; }
.user-chip { display: flex; align-items: center; gap: 3px; }
.avatar {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #3d8bff, #7c5cff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 16px rgba(61,139,255,.35);
}
.uname { font-weight: 700; font-size: 15px; }
.ustatus {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--muted); margin-top: 2px;
}
.ustatus .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-glow 2s infinite;
}
.header-actions { display: flex; gap: 8px; }
.icon-circle {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  transition: background .2s, transform .15s;
}
.icon-circle:active { transform: scale(.92); background: rgba(255,255,255,.1); }
.badge {
  position: absolute; top: -4px; left: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--danger);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.page-title { font-weight: 700; font-size: 16px; }

/* ========== HOME ========== */
.home-main {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 8px 18px calc(var(--nav-h) + var(--safe-b) + 16px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-main::-webkit-scrollbar { display: none; }

.wallet-card {
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: 22px 20px 18px;
  background: linear-gradient(145deg, #1a2a4a 0%, #0f1729 40%, #1a1040 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 48px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  animation: rise .5s cubic-bezier(.22,1,.36,1) .05s both;
}
.wc-shine {
  position: absolute; top: -40%; left: -30%;
  width: 80%; height: 120%;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.07) 48%, transparent 62%);
  transform: rotate(12deg);
  pointer-events: none;
  animation: shimmer 4s ease-in-out infinite;
  background-size: 200% 100%;
}
.wc-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; position: relative;
}
.wc-brand {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(255,255,255,.7);
}
.wc-chip {
  font-size: 11px; padding: 4px 10px; border-radius: 99px;
  background: rgba(240,193,75,.15); color: var(--gold);
  border: 1px solid rgba(240,193,75,.3);
}
.wc-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; position: relative; }
.wc-balance {
  display: flex; align-items: baseline; gap: 8px;
  position: relative; margin-bottom: 16px;
}
.wc-num {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, #a8c4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wc-num.pop { animation: number-pop .4s ease; }
.wc-unit { font-size: 14px; color: var(--muted); font-weight: 600; }
.wc-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted); position: relative;
}
.wc-refresh {
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--glass);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .3s;
}
.wc-refresh.spin svg { animation: orbit .7s linear; }

/* Quick actions */
.quick-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 18px 0 8px;
  animation: rise .5s cubic-bezier(.22,1,.36,1) .12s both;
}
.qbtn {
  background: transparent; border: none; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; font-size: 12px; font-weight: 600;
}
.qicon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--glass-border);
  transition: transform .2s, box-shadow .2s;
}
.qbtn:active .qicon { transform: scale(.9); }
.qi-green { background: rgba(0,230,118,.12); color: var(--green); box-shadow: 0 4px 16px rgba(0,230,118,.15); }
.qi-orange { background: rgba(255,138,61,.12); color: var(--orange); box-shadow: 0 4px 16px rgba(255,138,61,.15); }
.qi-blue { background: rgba(61,139,255,.12); color: var(--primary); box-shadow: 0 4px 16px rgba(61,139,255,.15); }
.qi-purple { background: rgba(167,139,250,.12); color: var(--purple); box-shadow: 0 4px 16px rgba(167,139,250,.15); }

.promo {
  margin: 12px 0;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(61,139,255,.15), rgba(167,139,250,.12));
  border: 1px solid rgba(61,139,255,.25);
  font-size: 13px; line-height: 1.5;
  animation: rise .45s ease both;
}

.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 18px 0 10px;
}
.section-head h3 { font-size: 15px; font-weight: 700; }
.link-btn {
  background: none; border: none; color: var(--primary);
  font-size: 13px; font-weight: 600; cursor: pointer;
}

.services-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  animation: rise .5s cubic-bezier(.22,1,.36,1) .18s both;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: transform .15s, background .2s;
  backdrop-filter: blur(12px);
}
.service-card:active { transform: scale(.97); background: rgba(255,255,255,.08); }
.service-card .sic {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.service-card .stx { font-size: 13px; font-weight: 600; line-height: 1.3; }

.activity-list {
  display: flex; flex-direction: column; gap: 8px;
  animation: rise .5s cubic-bezier(.22,1,.36,1) .22s both;
}
.activity-empty {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 28px 12px; border-radius: 14px;
  border: 1px dashed var(--glass-border);
}
.act-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--glass-border);
}
.act-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.act-icon.in { background: rgba(0,230,118,.12); color: var(--green); }
.act-icon.out { background: rgba(255,138,61,.12); color: var(--orange); }
.act-meta { flex: 1; min-width: 0; }
.act-title { font-size: 13px; font-weight: 600; }
.act-date { font-size: 11px; color: var(--muted); margin-top: 2px; }
.act-amt { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.act-amt.pos { color: var(--green); }
.act-amt.neg { color: var(--orange); }

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(8, 11, 20, 0.92);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.nav-item {
  flex: 1; background: none; border: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; cursor: pointer;
  padding: 8px 4px; transition: color .2s;
}
.nav-item.active { color: var(--primary); }
.nav-item svg { transition: transform .2s; }
.nav-item.active svg { transform: translateY(-2px); }

/* ========== ACTION SCREEN ========== */
.action-body {
  flex: 1; overflow-y: auto; padding: 12px 18px 24px;
}

/* ========== TOAST ========== */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: 90%; padding: 12px 20px;
  background: rgba(20, 28, 48, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 14px; font-size: 13px; font-weight: 600;
  z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(0,230,118,.4); }
.toast.err { border-color: rgba(255,77,109,.4); }

/* ========== SUCCESS OVERLAY ========== */
.success-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.success-overlay.hidden { display: none; }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.success-card {
  position: relative; z-index: 2;
  background: var(--card); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 36px 28px; text-align: center;
  width: min(300px, 88vw);
  animation: ring-pop .5s cubic-bezier(.22,1,.36,1);
  backdrop-filter: blur(20px);
}
.success-ring {
  width: 72px; height: 72px; margin: 0 auto 16px;
}
.success-ring svg {
  width: 72px; height: 72px;
}
.success-ring circle {
  fill: none; stroke: rgba(0,230,118,.25); stroke-width: 2;
}
.success-ring path {
  fill: none; stroke: var(--green); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: check-draw .5s ease .2s forwards;
}
.success-card h3 { font-size: 18px; margin-bottom: 6px; }
.success-card p { color: var(--muted); font-size: 13px; }


/* ========== AUTH GATE v6 — neat stacked methods ========== */
.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 28px;
  gap: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-brand { text-align: center; }
.auth-logo-mark {
  width: 58px; height: 58px; margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffd54f, #f0c14b 40%, #c9a227);
  color: #1a1505; font-weight: 900; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 10px 28px rgba(240,193,75,.4),
    inset 0 2px 0 rgba(255,255,255,.55),
    inset 0 -2px 4px rgba(0,0,0,.12);
}
.auth-brand h1 {
  font-size: 28px; font-weight: 800; letter-spacing: 2px;
  color: #fff;
}
.auth-brand h1 span { color: #f0c14b; }
.auth-brand p { color: rgba(255,255,255,.55); font-size: 13px; margin-top: 6px; }

/* White 3D neumorphic card */
.auth-card-3d {
  width: 100%; max-width: 400px;
  border-radius: 28px;
  background: #eef1f7;
  padding: 3px;
  box-shadow:
    0 25px 50px rgba(0,0,0,.45),
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -1px 0 rgba(0,0,0,.06) inset;
  animation: rise .5s cubic-bezier(.22,1,.36,1);
}
.auth-card-inner {
  border-radius: 25px;
  background: linear-gradient(165deg, #ffffff 0%, #f5f7fb 60%, #e9edf5 100%);
  padding: 26px 16px 18px;
  color: #1a1f2e;
  box-shadow: inset 0 1px 0 #fff;
}
.auth-card-inner h2 {
  text-align: center; font-size: 22px; font-weight: 800;
  color: #121826; margin-bottom: 4px;
}
.auth-sub {
  text-align: center; font-size: 13px; color: #7a8299;
  margin-bottom: 16px;
}

.auth-methods {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Compact method button — 3D raised pill */
.method-btn {
  width: 100%;
  border: none;
  background: #ffffff;
  border-radius: 18px;
  padding: 0;
  cursor: pointer;
  text-align: right;
  color: #1a1f2e;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 6px 16px rgba(30,40,70,.08),
    0 1px 0 #fff inset,
    0 -2px 4px rgba(0,0,0,.04) inset,
    0 0 0 1px rgba(20,30,50,.06);
  transition:
    transform .22s cubic-bezier(.22,1,.36,1),
    box-shadow .22s,
    background .3s,
    border-radius .25s;
  -webkit-tap-highlight-color: transparent;
}
.method-btn:active:not(.expanded) {
  transform: scale(.97) translateY(2px);
  box-shadow:
    0 2px 6px rgba(30,40,70,.12) inset,
    0 0 0 1px rgba(20,30,50,.08);
}

.method-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  min-height: 54px;
  pointer-events: auto;
}
.method-label {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
  pointer-events: none;
}
.method-icon {
  width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f7;
  position: relative;
  flex-shrink: 0;
  pointer-events: none;
  transition: background .3s, transform .3s, box-shadow .3s;
}
.method-icon .ico-plane,
.method-icon .ico-g,
.method-icon .ico-ph {
  opacity: 0;
  transform: scale(.4);
  transition: opacity .28s, transform .32s cubic-bezier(.22,1,.36,1);
  position: absolute;
}
.method-icon .ico-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #c5cad8;
  transition: opacity .2s;
}

/* Panel hidden by default — CRITICAL */
.method-panel {
  display: none;
  padding: 0 16px 16px;
  text-align: right;
}
.method-panel .field { margin-bottom: 10px; }
.method-panel .field label {
  display: block; font-size: 12px; color: #6b7389; margin-bottom: 6px;
}
.method-panel .field input {
  width: 100%; padding: 13px 14px;
  border-radius: 14px; border: 1px solid #dce1ec;
  background: #f4f6fb; color: #121826; font-size: 15px; outline: none;
}
.method-panel .field input:focus {
  border-color: #3d8bff;
  box-shadow: 0 0 0 3px rgba(61,139,255,.15);
}
.method-panel .msg {
  margin-top: 8px; font-size: 12px; color: #6b7389; min-height: 16px;
}
.method-panel .msg.err { color: #d32f2f; }
.method-panel .msg.ok { color: #2e7d32; }
.method-panel .code-block { margin-top: 8px; }
.method-panel .code-block.hidden { display: none !important; }
.method-panel .btn { margin-top: 6px; }

/* ===== EXPANDED ===== */
.method-btn.expanded {
  transform: scale(1.01);
  border-radius: 20px;
}
.method-btn.expanded .method-panel {
  display: block;
  animation: panelIn .35s cubic-bezier(.22,1,.36,1);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.method-btn.expanded .method-icon .ico-dot { opacity: 0; }
.method-btn.expanded .method-icon .ico-plane,
.method-btn.expanded .method-icon .ico-g,
.method-btn.expanded .method-icon .ico-ph {
  opacity: 1; transform: scale(1);
}

/* Telegram — blue sunk */
.method-btn.expanded[data-method="telegram"] {
  background: linear-gradient(160deg, #3bb4f5 0%, #1e96d8 100%);
  color: #fff;
  box-shadow:
    0 10px 28px rgba(30,150,220,.35),
    inset 0 2px 6px rgba(0,0,0,.18),
    inset 0 -1px 0 rgba(255,255,255,.15);
}
.method-btn.expanded[data-method="telegram"] .method-label { color: #fff; }
.method-btn.expanded[data-method="telegram"] .method-icon {
  background: rgba(255,255,255,.22);
  color: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
.method-btn.expanded[data-method="telegram"] .method-panel .field label { color: rgba(255,255,255,.88); }
.method-btn.expanded[data-method="telegram"] .method-panel .field input {
  background: rgba(255,255,255,.96); color: #121826; border-color: transparent;
}
.method-btn.expanded[data-method="telegram"] .msg { color: rgba(255,255,255,.92); }
.method-btn.expanded[data-method="telegram"] .msg.err { color: #ffe0e0; }

/* Google — white sunk with G */
.method-btn.expanded[data-method="google"] {
  background: #fff;
  box-shadow:
    0 10px 28px rgba(66,133,244,.15),
    inset 0 2px 5px rgba(0,0,0,.06),
    0 0 0 1px #e0e3ea;
}
.method-btn.expanded[data-method="google"] .method-icon {
  background: #fff;
  border: 1px solid #e0e3ea;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* Phone — green sunk */
.method-btn.expanded[data-method="phone"] {
  background: linear-gradient(160deg, #1de9b6 0%, #00a86b 100%);
  color: #fff;
  box-shadow:
    0 10px 28px rgba(0,168,107,.35),
    inset 0 2px 6px rgba(0,0,0,.18),
    inset 0 -1px 0 rgba(255,255,255,.15);
}
.method-btn.expanded[data-method="phone"] .method-label { color: #fff; }
.method-btn.expanded[data-method="phone"] .method-icon {
  background: rgba(255,255,255,.22); color: #fff;
}

.btn-google {
  width: 100%; padding: 14px; border: 1px solid #dadce0;
  border-radius: 14px; background: #fff; color: #3c4043;
  font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  margin-top: 4px;
}
.btn-google:active { transform: scale(.98); background: #f7f8fa; }

.maint-box {
  text-align: center; padding: 14px 8px 6px;
  color: rgba(255,255,255,.96);
}
.maint-box .maint-ico { font-size: 26px; margin-bottom: 6px; }
.maint-box strong { display: block; font-size: 14px; margin-bottom: 4px; }
.maint-box p { font-size: 12px; opacity: .9; }


/* ===== Pull to refresh ===== */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: height .15s ease-out;
}
.ptr-indicator.active {
  transition: none;
}
.ptr-indicator .ptr-loader {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 22px;
  margin-bottom: 8px;
  opacity: 0;
  transform: scale(.75);
  transition: opacity .15s ease;
}
.ptr-indicator .ptr-loader span {
  display: block;
  width: 5px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffe9a0 0%, #f0c14b 55%, #c9a227 100%);
  box-shadow: 0 0 10px rgba(240,193,75,.45);
  transform-origin: center bottom;
}
.ptr-indicator.pulling .ptr-loader,
.ptr-indicator.refreshing .ptr-loader {
  opacity: 1;
}
.ptr-indicator.refreshing .ptr-loader span {
  animation: ptr-bar .55s ease-in-out infinite;
}
.ptr-indicator.refreshing .ptr-loader span:nth-child(2) { animation-delay: .12s; }
.ptr-indicator.refreshing .ptr-loader span:nth-child(3) { animation-delay: .24s; }
.ptr-indicator .ptr-text {
  font-size: 12px;
  color: rgba(244,247,255,.8);
  margin-bottom: 10px;
  opacity: 0;
  letter-spacing: .3px;
}
.ptr-indicator.pulling .ptr-text,
.ptr-indicator.refreshing .ptr-text { opacity: 1; }
@keyframes ptr-bar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}
body.ptr-dragging .screen {
  transition: none !important;
}

/* ===== Magic trust marquee banner ===== */
.promo {
  margin: 14px 0 !important;
  padding: 0 !important;
  border-radius: 16px !important;
  position: relative;
  overflow: hidden;
  border: none !important;
  background: transparent !important;
  animation: rise .45s ease both;
}
.promo-shell {
  position: relative;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(120deg, #f0c14b, #3d8bff, #a78bfa, #1de9b6, #f0c14b);
  background-size: 300% 300%;
  animation: promo-border-flow 6s linear infinite;
  box-shadow:
    0 0 24px rgba(240,193,75,.25),
    0 8px 28px rgba(0,0,0,.35);
}
.promo-inner {
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18,22,34,.96), rgba(10,12,20,.98));
  padding: 12px 0;
  position: relative;
  overflow: hidden;
}
.promo-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255,255,255,.08) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: promo-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
.promo-track {
  display: flex;
  width: max-content;
  animation: promo-scroll 22s linear infinite;
  direction: ltr;
}
.promo-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(90deg, #f5d76e, #fff6d0, #f0c14b, #ffe9a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.promo-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #f0c14b;
  box-shadow: 0 0 8px #f0c14b;
  flex-shrink: 0;
  animation: promo-dot 1.6s ease-in-out infinite;
  /* dots need color - override text transparent */
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #f0c14b;
}
.promo-item .spark {
  font-size: 12px;
  color: #f0c14b;
  -webkit-text-fill-color: #f0c14b;
  filter: drop-shadow(0 0 6px rgba(240,193,75,.6));
  animation: promo-spark 2s ease-in-out infinite;
}
@keyframes promo-border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes promo-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes promo-scroll {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
@keyframes promo-dot {
  0%, 100% { opacity: .5; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes promo-spark {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: .85; }
  50% { transform: scale(1.2) rotate(12deg); opacity: 1; }
}


/* ===== Banner marquee fix v14 ===== */
.promo {
  margin: 14px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: hidden;
}
.promo-shell {
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(120deg, #f0c14b, #3d8bff, #a78bfa, #1de9b6, #f0c14b);
  background-size: 300% 300%;
  animation: promo-border-flow 6s linear infinite;
  box-shadow: 0 0 24px rgba(240,193,75,.22), 0 8px 28px rgba(0,0,0,.35);
}
.promo-inner {
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18,22,34,.97), rgba(10,12,20,.98));
  padding: 12px 0;
  overflow: hidden;
  position: relative;
}
.promo-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%, transparent 100%);
  background-size: 200% 100%;
  animation: promo-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
.promo-track {
  display: flex;
  width: max-content;
  will-change: transform;
  transform: translate3d(0,0,0);
  direction: ltr;
}
.promo-track.promo-animating {
  animation: promo-scroll-right 18s linear infinite;
}
.promo-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(90deg, #f5d76e, #fff6d0, #f0c14b, #ffe9a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}
.promo-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0c14b;
  box-shadow: 0 0 8px #f0c14b;
  flex-shrink: 0;
  -webkit-text-fill-color: #f0c14b;
  color: #f0c14b;
}
.promo-item .spark {
  font-size: 12px;
  color: #f0c14b;
  -webkit-text-fill-color: #f0c14b;
  filter: drop-shadow(0 0 6px rgba(240,193,75,.55));
}
@keyframes promo-scroll-right {
  from { transform: translate3d(calc(var(--shift, 50%) * -1), 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}


/* ===== Pull to refresh (visible premium bars) ===== */
.ptr-indicator {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: height .18s ease-out;
  background: linear-gradient(180deg, rgba(8,10,18,.92) 0%, rgba(8,10,18,.55) 70%, transparent 100%);
}
.ptr-indicator.active {
  transition: none;
}
.ptr-indicator .ptr-loader {
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  height: 28px;
  margin-bottom: 6px;
  padding: 8px 18px 6px;
  border-radius: 20px;
  background: rgba(20, 24, 36, 0.85);
  border: 1px solid rgba(240, 193, 75, 0.35);
  box-shadow: 0 0 20px rgba(240, 193, 75, 0.25), 0 4px 16px rgba(0,0,0,.4);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .12s ease, transform .12s ease;
}
.ptr-indicator .ptr-loader span {
  display: block !important;
  width: 6px !important;
  min-height: 8px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff6d0 0%, #f0c14b 40%, #c9a227 100%) !important;
  box-shadow: 0 0 12px rgba(240, 193, 75, 0.7);
  transform-origin: center bottom;
}
.ptr-indicator.pulling .ptr-loader,
.ptr-indicator.refreshing .ptr-loader {
  opacity: 1 !important;
  transform: scale(1) !important;
}
.ptr-indicator.refreshing .ptr-loader span {
  animation: ptr-bar .55s ease-in-out infinite !important;
}
.ptr-indicator.refreshing .ptr-loader span:nth-child(2) { animation-delay: .12s !important; }
.ptr-indicator.refreshing .ptr-loader span:nth-child(3) { animation-delay: .24s !important; }
.ptr-indicator .ptr-text {
  font-size: 12px;
  font-weight: 600;
  color: #f0c14b !important;
  margin-bottom: 12px;
  opacity: 0;
  letter-spacing: .4px;
  text-shadow: 0 0 10px rgba(240,193,75,.4);
}
.ptr-indicator.pulling .ptr-text,
.ptr-indicator.refreshing .ptr-text {
  opacity: 1 !important;
}
@keyframes ptr-bar {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}
body.ptr-dragging .screen {
  transition: none !important;
}



/* ===== Static promo banner + shine (v16) ===== */
.promo {
  margin: 14px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}
.promo.hidden { display: none !important; }
.promo-shell {
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(120deg, #f0c14b, #3d8bff, #a78bfa, #1de9b6, #f0c14b);
  background-size: 300% 300%;
  animation: promo-border-flow 6s linear infinite;
  box-shadow: 0 0 20px rgba(240,193,75,.22), 0 6px 20px rgba(0,0,0,.35);
}
.promo-inner {
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18,22,34,.98), rgba(10,12,20,.99));
  position: relative;
  overflow: hidden;
}
.promo-static {
  position: relative;
  padding: 13px 16px;
  text-align: center;
  overflow: hidden;
}
.promo-text {
  position: relative;
  z-index: 1;
  display: inline-block;
  max-width: 100%;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .2px;
  background: linear-gradient(90deg, #c9a227, #fff6d0, #f0c14b, #ffe9a0, #c9a227);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: promo-text-flow 4.5s linear infinite;
}
.promo-shine {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.22) 50%,
    rgba(255,255,255,0) 70%,
    transparent 100%
  );
  animation: promo-shine-sweep 2.8s ease-in-out infinite;
}
@keyframes promo-text-flow {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}
@keyframes promo-shine-sweep {
  0% { left: -45%; }
  100% { left: 110%; }
}
@keyframes promo-border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ===== Single-line marquee banner (v17) ===== */
.promo {
  margin: 12px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: hidden !important;
}
.promo.hidden { display: none !important; }
.promo-shell {
  border-radius: 14px;
  padding: 1.5px;
  background: linear-gradient(120deg, #f0c14b, #5b8def, #a78bfa, #f0c14b);
  background-size: 280% 280%;
  animation: promo-border-flow 7s linear infinite;
  box-shadow: 0 0 18px rgba(240,193,75,.2), 0 6px 18px rgba(0,0,0,.3);
}
.promo-inner {
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(16,20,32,.98), rgba(8,10,16,.99));
  overflow: hidden;
  position: relative;
}
.promo-mask {
  overflow: hidden;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
}
.promo-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
  transform: translate3d(0,0,0);
  direction: ltr;
}
.promo-track.promo-run {
  animation: promo-go-right 20s linear infinite;
}
.promo-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding: 0 28px;
  height: 40px;
  gap: 10px;
}
.promo-sep {
  font-style: normal;
  font-size: 11px;
  color: #f0c14b;
  opacity: .85;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(240,193,75,.5);
}
.promo-label {
  display: inline-block;
  white-space: nowrap !important;
  word-break: keep-all;
  overflow: visible;
  font-family: "Segoe UI", "Tahoma", "Arial", sans-serif;
  font-size: 12px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.6px;
  line-height: 40px;
  height: 40px;
  color: #f5e6b8;
  text-shadow: 0 0 12px rgba(240,193,75,.25);
  background: linear-gradient(90deg, #a8892a 0%, #fff3c4 35%, #f0c14b 55%, #d4a84b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes promo-go-right {
  from { transform: translate3d(calc(var(--shift, 50%) * -1), 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}
@keyframes promo-border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ===== Seamless marquee v18 — two groups, % based, no CSS vars ===== */
.promo {
  margin: 12px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: hidden !important;
}
.promo.hidden { display: none !important; }
.promo-shell {
  border-radius: 14px;
  padding: 1.5px;
  background: linear-gradient(120deg, #f0c14b, #5b8def, #a78bfa, #f0c14b);
  background-size: 280% 280%;
  animation: promo-border-flow 7s linear infinite;
  box-shadow: 0 0 18px rgba(240,193,75,.2), 0 6px 18px rgba(0,0,0,.3);
}
.promo-inner {
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(16,20,32,.98), rgba(8,10,16,.99));
  overflow: hidden;
  position: relative;
}
.promo-mask {
  overflow: hidden !important;
  width: 100% !important;
  height: 42px !important;
  display: block !important;
  position: relative;
}
.promo-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  height: 42px;
  align-items: center;
  will-change: transform;
  transform: translate3d(0,0,0);
  direction: ltr !important;
}
/* CRITICAL: -50% is half of track = exactly one .promo-group */
.promo-track.promo-run {
  animation: promo-seamless-right 14s linear infinite !important;
}
.promo-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
  align-items: center;
  height: 42px;
}
.promo-item {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  padding: 0 22px;
  height: 42px;
  gap: 8px;
}
.promo-sep {
  font-style: normal;
  font-size: 11px;
  color: #f0c14b;
  flex-shrink: 0;
  line-height: 42px;
  text-shadow: 0 0 8px rgba(240,193,75,.5);
}
.promo-label {
  display: inline-block !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.55px;
  line-height: 42px;
  height: 42px;
  background: linear-gradient(90deg, #a8892a 0%, #fff3c4 40%, #f0c14b 70%, #d4a84b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f5e6b8; /* fallback if clip unsupported */
}
/* from -50% to 0 = content moves to the RIGHT, loop is seamless */
@keyframes promo-seamless-right {
  0%   { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes promo-border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
