/* ═══════════════════════════════════════════════════════════
   BitBeam — Fast, cheap data for Ghana
   Mobile-First CSS · Dark Theme · Orange/Navy Brand
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ── BitBeam Brand ─────────────────── */
  --navy:       #1B2C6B;
  --navy-light: #2D4499;
  --navy-dark:  #111D47;
  --navy-deep:  #080E2A;
  --orange:     #F05A22;
  --orange-lt:  #FF7A47;
  --orange-dim: rgba(240,90,34,.14);
  --orange-glow:rgba(240,90,34,.28);

  /* ── UI Surfaces ───────────────────── */
  --bg:         #080E2A;
  --surface:    #0F1528;
  --panel:      rgba(15,21,40,.97);
  --card:       #121830;
  --elevated:   #1A2040;

  /* ── Lines ─────────────────────────── */
  --line:       rgba(255,255,255,.07);
  --line-navy:  rgba(45,68,153,.4);
  --line-orange:rgba(240,90,34,.22);

  /* ── Semantic ──────────────────────── */
  --green:  #22c55e; --red: #ef4444;
  --amber:  #f59e0b; --cyan: #22d3ee;

  /* ── Text ──────────────────────────── */
  --text:   #EEF1FA;
  --text2:  #8896C0;
  --text3:  #505E8A;
  --white:  #fff;

  /* ── Radius ────────────────────────── */
  --r-sm:   12px;
  --r:      16px;
  --r-lg:   22px;
  --r-xl:   28px;

  /* ── Transitions ───────────────────── */
  --t:        .2s cubic-bezier(.4,0,.2,1);
  --t-spring: .4s cubic-bezier(.34,1.56,.64,1);
  --t-fast:   .15s ease;

  /* ── Layout ────────────────────────── */
  --pad: 14px;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  /* FIX BB-SPLASH-01: REMOVED overflow-x:hidden from body.
   * Chrome Android creates a new scroll/clip context when overflow-x:hidden
   * is set on <body>, which causes ALL position:fixed children to be clipped
   * and positioned relative to the body box instead of the viewport.
   * This made the #bb-splash overlay render incorrectly on mobile (partial
   * white strip instead of full-screen overlay).
   * Fix: overflow-x is now on .app-shell only (below), which contains the
   * scrollable page content but does NOT affect fixed-position elements. */
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  /* Subtle navy-to-deep gradient */
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -5%, rgba(45,68,153,.18), transparent),
    radial-gradient(ellipse 60% 30% at 80% 90%, rgba(240,90,34,.06), transparent);
}

img, video, iframe { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(240,90,34,.3); border-radius: 3px; }

/* ── App Shell ─────────────────────────────────── */
.app-shell {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: var(--pad);
  padding-top:    calc(var(--pad) + var(--safe-top));
  padding-bottom: calc(90px + var(--safe-bottom));
  padding-left:   calc(var(--pad) + var(--safe-left));
  padding-right:  calc(var(--pad) + var(--safe-right));
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* ── Login Shell ───────────────────────────────── */
.login-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-top)) var(--pad) calc(40px + var(--safe-bottom));
  padding-left:  calc(var(--pad) + var(--safe-left));
  padding-right: calc(var(--pad) + var(--safe-right));
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* ── Beam Speed Lines ──────────────────────────── */
.beam-rays {
  position: fixed;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, 100vw);
  height: 280px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.beam-ray {
  position: absolute; top: 0; width: 2px;
  transform-origin: top center;
  border-radius: 1px;
  animation: rayBeam 2.8s ease-in-out infinite;
}
.beam-ray:nth-child(1){left:42%;height:160px;transform:rotate(-18deg);animation-delay:0s;background:linear-gradient(to bottom,rgba(240,90,34,.5),transparent)}
.beam-ray:nth-child(2){left:46%;height:210px;transform:rotate(-8deg);animation-delay:.3s;background:linear-gradient(to bottom,rgba(240,90,34,.7),transparent)}
.beam-ray:nth-child(3){left:50%;height:240px;transform:rotate(0deg);animation-delay:.1s;background:linear-gradient(to bottom,rgba(255,122,71,.8),transparent)}
.beam-ray:nth-child(4){left:54%;height:200px;transform:rotate(9deg);animation-delay:.5s;background:linear-gradient(to bottom,rgba(240,90,34,.6),transparent)}
.beam-ray:nth-child(5){left:58%;height:155px;transform:rotate(19deg);animation-delay:.2s;background:linear-gradient(to bottom,rgba(240,90,34,.4),transparent)}
@keyframes rayBeam{0%,100%{opacity:.25;transform-origin:top center}50%{opacity:.85}}

/* ── Logo ──────────────────────────────────────── */
.bs-logo {
  width: 88px; height: 88px;
  border-radius: 28px;
  border: 2px solid rgba(240,90,34,.35);
  object-fit: cover;
  box-shadow:
    0 0 0 6px rgba(240,90,34,.08),
    0 0 40px rgba(240,90,34,.22),
    0 0 80px rgba(27,44,107,.5);
  animation: logoPop .65s var(--t-spring) .1s both;
  flex-shrink: 0;
}
@keyframes logoPop{from{opacity:0;transform:scale(.75) translateY(-24px)}to{opacity:1;transform:none}}

/* ── Brand Block ───────────────────────────────── */
.bs-brand {
  text-align: center;
  margin: 14px 0 24px;
  animation: fadeUp .5s ease .25s both;
  width: 100%;
}
.bs-brand h1 {
  font-size: 1.65rem; font-weight: 900; letter-spacing: -.04em; line-height: 1;
  /* Bit = navy, Beam = orange */
  background: linear-gradient(135deg, #fff 30%, var(--orange-lt) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bs-brand .tagline {
  display: block; font-size: .63rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(240,90,34,.7); margin-top: 5px;
}
@keyframes fadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ── Cards ─────────────────────────────────────── */
.bs-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  width: 100%;
  animation: slideUp .45s var(--t-spring) .3s both;
}
.bs-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg,transparent,rgba(240,90,34,.2),rgba(255,255,255,.08),transparent);
}
.bs-card.orange-border { border-color: var(--line-orange); }
@keyframes slideUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}

/* ── Form Fields ───────────────────────────────── */
.bs-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.bs-label {
  font-size: .67rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text3);
}

.bs-input {
  width: 100%; height: 52px; padding: 0 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r);
  color: var(--text); font-family: inherit;
  font-size: 16px; font-weight: 600;
  outline: none; -webkit-appearance: none;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  box-sizing: border-box; max-width: 100%;
}
.bs-input:focus {
  border-color: rgba(240,90,34,.55);
  background: rgba(240,90,34,.04);
  box-shadow: 0 0 0 3px rgba(240,90,34,.12);
}
.bs-input::placeholder { color: var(--text3); font-weight: 500; }
.bs-input[type="tel"] { -webkit-appearance: none; }

/* Eye toggle */
.field-wrap { position: relative; }
.field-wrap .bs-input { padding-right: 48px; }
.eye-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text3); font-size: 17px;
  cursor: pointer; padding: 6px; min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--t);
}
.eye-btn:hover { color: var(--orange); }

/* Select */
.bs-select {
  width: 100%; height: 52px; padding: 0 40px 0 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r);
  color: var(--text); font-family: inherit;
  font-size: 16px; font-weight: 700;
  outline: none; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F05A22' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  cursor: pointer; transition: border-color var(--t);
  box-sizing: border-box; max-width: 100%;
}
.bs-select:focus { border-color: rgba(240,90,34,.5); }
.bs-select option { background: #0F1528; color: #EEF1FA; }

/* 2-col grid */
.form-2col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 12px; width: 100%;
}
.form-2col > * { min-width: 0; overflow: hidden; margin-bottom: 0; }
@media (max-width: 340px) { .form-2col { grid-template-columns: 1fr; } }

/* Network badge */
.net-badge {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 52px; border-radius: var(--r);
  font-size: .8rem; font-weight: 900;
  border: 1.5px solid; transition: all .2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.net-badge.mtn     { border-color:#ffd51f; background:rgba(255,213,31,.1); color:#ffd51f; }
.net-badge.telecel { border-color:#3b82f6; background:rgba(59,130,246,.1); color:#93c5fd; }
.net-badge.at      { border-color:#22c55e; background:rgba(34,197,94,.1);  color:#86efac; }
.net-badge.empty   { border-color:rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text3); }

/* Price display */
.price-display {
  height: 52px; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 950; color: var(--orange);
  background: var(--orange-dim);
  border: 1px solid var(--line-orange);
  border-radius: var(--r); transition: all .2s; max-width: 100%;
}
.price-display.empty { color: var(--text3); font-size: .82rem; font-weight: 600; }

/* ── Buttons ───────────────────────────────────── */
.bs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; min-height: 44px; padding: 0 20px;
  border-radius: var(--r);
  font-family: inherit; font-weight: 800; font-size: .9rem;
  cursor: pointer; border: none;
  transition: transform var(--t), filter var(--t), box-shadow var(--t);
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
  white-space: nowrap; max-width: 100%; box-sizing: border-box; text-decoration: none;
}
.bs-btn:active { transform: scale(.96); }
/* Orange ripple on tap */
.bs-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(255,255,255,.12);
  opacity: 0; transform: scale(0);
  transition: opacity .3s, transform .3s;
}
.bs-btn:active::after { opacity: 1; transform: scale(1); transition: none; }

.bs-btn-primary {
  background: linear-gradient(135deg, var(--orange), #C94010);
  color: #fff;
  box-shadow: 0 6px 20px rgba(240,90,34,.35);
}
.bs-btn-primary:hover { filter: brightness(1.1); box-shadow: 0 8px 28px rgba(240,90,34,.45); }
.bs-btn-secondary {
  background: rgba(255,255,255,.05); color: var(--text);
  border: 1px solid rgba(255,255,255,.1);
}
.bs-btn-secondary:hover { background: rgba(255,255,255,.09); }
.bs-btn-navy {
  background: var(--navy); color: #fff;
  border: 1px solid rgba(45,68,153,.6);
  box-shadow: 0 4px 16px rgba(27,44,107,.4);
}
.bs-btn-navy:hover { background: var(--navy-light); }
.bs-btn-ghost { background: transparent; color: var(--text2); font-size: .82rem; }
.bs-btn-full  { width: 100%; }
.bs-btn-sm    { height: 38px; padding: 0 14px; font-size: .8rem; border-radius: var(--r-sm); }
.bs-btn:disabled { opacity: .4; pointer-events: none; }
.bs-btn.loading .btn-text { opacity: 0; }
.bs-btn.loading::before {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Errors / Notices ──────────────────────────── */
.bs-error {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.28);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: .8rem; font-weight: 700; color: #fca5a5;
  margin-bottom: 12px; display: none;
}
.bs-error.show { display: block; animation: shakeX .35s ease; }
@keyframes shakeX{0%,100%{transform:none}20%{transform:translateX(-6px)}60%{transform:translateX(6px)}}
.bs-notice { padding: 10px 14px; border-radius: var(--r-sm); font-size: .8rem; font-weight: 700; margin-bottom: 10px; }
.bs-notice.info  { background:rgba(59,130,246,.09);  border:1px solid rgba(59,130,246,.22); color:#93c5fd; }
.bs-notice.ok    { background:rgba(34,197,94,.09);   border:1px solid rgba(34,197,94,.22);  color:#86efac; }
.bs-notice.warn  { background:rgba(245,158,11,.09);  border:1px solid rgba(245,158,11,.22); color:#fcd34d; }
.bs-notice.error { background:rgba(239,68,68,.09);   border:1px solid rgba(239,68,68,.22);  color:#fca5a5; }

/* ── Header ────────────────────────────────────── */
.bs-header {
  background: linear-gradient(160deg, rgba(27,44,107,.9) 0%, rgba(8,14,42,.97) 100%);
  border: 1px solid var(--line-navy);
  border-radius: var(--r-lg); padding: 14px; margin-bottom: 10px;
  position: relative; overflow: hidden;
  animation: slideUp .4s ease .02s both; width: 100%;
}
.bs-header::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,90,34,.4), rgba(255,255,255,.1), transparent);
}
/* Speed line accent on header */
.bs-header::after {
  content: ''; position: absolute; right: -20px; top: 50%;
  transform: translateY(-50%);
  width: 80px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(240,90,34,.3));
  border-radius: 1px;
}
.bs-header-top { display: flex; align-items: center; gap: 10px; }
.bs-header-logo {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(240,90,34,.3); object-fit: cover; flex-shrink: 0;
}
.bs-eyebrow { font-size:.57rem; font-weight:800; text-transform:uppercase; letter-spacing:.2em; color:rgba(240,90,34,.65); margin-bottom:2px; }
.bs-title   { font-size:1.05rem; font-weight:900; color:#fff; line-height:1.1; }

/* ── Stats ─────────────────────────────────────── */
.bs-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 7px; margin-bottom: 10px;
}
.bs-stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 8px; text-align: center;
  animation: cardReveal .35s ease both; min-width: 0;
  transition: border-color var(--t);
}
.bs-stat:hover { border-color: var(--line-orange); }
.bs-stat-val {
  font-size: 1.05rem; font-weight: 950; color: var(--orange);
  display: block; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bs-stat-lbl {
  font-size: .55rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text3);
}
@keyframes cardReveal{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}

/* ── Action Cards ──────────────────────────────── */
.bs-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.bs-action-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text); min-height: 72px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  animation: cardReveal .35s ease both; width: 100%; overflow: hidden;
  position: relative;
}
/* Speed line on hover */
.bs-action-card::after {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 0; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, var(--orange), transparent);
  transition: width .25s ease;
}
.bs-action-card:hover::after { width: 40px; }
.bs-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-orange);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  text-decoration: none;
}
.bs-action-card:active { transform: scale(.97); }
.bs-action-icon {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0;
  transition: transform var(--t-spring);
}
.bs-action-card:hover .bs-action-icon { transform: scale(1.1) rotate(-5deg); }
.bs-action-body { flex: 1; min-width: 0; overflow: hidden; }
.bs-action-title { font-size: .9rem; font-weight: 900; color: #fff; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-action-sub   { font-size: .72rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-action-arrow { color: var(--orange); font-size: 1.1rem; flex-shrink: 0; opacity: .7; transition: transform var(--t); }
.bs-action-card:hover .bs-action-arrow { transform: translateX(3px); opacity: 1; }

/* ── Section Title ─────────────────────────────── */
.bs-section {
  font-size: .59rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .18em; color: rgba(240,90,34,.6);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.bs-section::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Order Cards ───────────────────────────────── */
.order-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
  margin-bottom: 10px; animation: cardReveal .3s ease both; width: 100%;
}
.order-card-head {
  padding: 11px 14px;
  background: linear-gradient(135deg, rgba(27,44,107,.3), transparent);
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.order-card-body { display: grid; grid-template-columns: 1fr 1fr; }
.order-cell {
  padding: 10px 12px;
  border-right: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
  min-width: 0; overflow: hidden;
}
.order-cell:nth-child(2n) { border-right: none; }
.order-cell:nth-child(3),
.order-cell:nth-child(4)  { border-bottom: none; }
.order-cell-lbl { font-size: .55rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); margin-bottom: 4px; }
.order-cell-val { font-size: .84rem; font-weight: 900; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Delivery Progress ─────────────────────────── */
.delivery-wrap { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.05); }
.delivery-label {
  font-size: .61rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text3); margin-bottom: 7px;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
}
.delivery-status { font-weight: 700; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delivery-track { height: 7px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.delivery-fill {
  height: 100%; border-radius: 999px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
  background: linear-gradient(90deg, var(--orange), var(--green));
  min-width: 4px;
}
.delivery-fill.fail { background: var(--red); }

/* ── Status Badges ─────────────────────────────── */
.bs-badge {
  display: inline-flex; padding: 2px 10px; border-radius: 999px;
  font-size: .61rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; white-space: nowrap; flex-shrink: 0;
}
.bs-badge.pending        { background:rgba(245,158,11,.1); border:1px solid rgba(245,158,11,.25); color:#fcd34d; }
.bs-badge.paid,
.bs-badge.sending        { background:rgba(27,44,107,.4);  border:1px solid rgba(45,68,153,.5);  color:#93b4fd; }
.bs-badge.delivered,
.bs-badge.completed      { background:rgba(34,197,94,.1);  border:1px solid rgba(34,197,94,.25); color:#86efac; }
.bs-badge.failed,
.bs-badge.cancelled,
.bs-badge.api_failed     { background:rgba(239,68,68,.1);  border:1px solid rgba(239,68,68,.25); color:#fca5a5; }
.bs-badge.wallet         { background:var(--orange-dim);   border:1px solid var(--line-orange);  color:var(--orange-lt); }

/* ── Terms ─────────────────────────────────────── */
.terms-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; margin-bottom: 12px;
}
.terms-row input[type=checkbox] {
  width: 22px; height: 22px; min-width: 22px;
  accent-color: var(--orange); flex-shrink: 0; margin-top: 1px; cursor: pointer;
}
.terms-row label { font-size: .76rem; color: var(--text2); line-height: 1.55; cursor: pointer; }
.terms-row a { color: var(--orange); text-decoration: underline; }

/* ── Payment Options ───────────────────────────── */
.payment-display {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 14px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r); width: 100%; overflow: hidden;
}
.payment-display span { font-weight: 800; font-size: .88rem; }
.payment-display small { margin-left: auto; font-size: .7rem; color: var(--text3); white-space: nowrap; }

/* ── WhatsApp Button ───────────────────────────── */
.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; min-height: 44px; border-radius: var(--r);
  background: rgba(37,211,102,.08); border: 1px solid rgba(37,211,102,.22);
  color: #86efac; font-weight: 800; font-size: .88rem;
  text-decoration: none; width: 100%; transition: background var(--t);
}
.wa-btn:hover { background: rgba(37,211,102,.15); text-decoration: none; }
.wa-btn:active { transform: scale(.97); }

/* ── Misc ──────────────────────────────────────── */
.bs-divider  { height: 1px; background: var(--line); margin: 14px 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; color: var(--text2);
  text-decoration: none; margin-bottom: 10px;
  padding: 8px 0; min-height: 44px;
}
.back-link:hover { color: var(--orange); }

.terms-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.88); z-index: 100;
  align-items: center; justify-content: center; padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.terms-modal.open { display: flex; }
.terms-modal-box {
  background: var(--card); border: 1px solid var(--line-orange);
  border-radius: var(--r-lg); padding: 20px;
  width: 100%; max-width: 400px; max-height: 80svh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}

/* == LAYER 2: Recipient confirmation modal == */
/* ═══════════════════════════════════════════════════════
   CONFIRMATION BOTTOM SHEET
   Fixed for Android PWA / WebView:
   - explicit top/left/right/bottom instead of inset
   - GPU layer via translateZ(0) forces correct fixed pos
   - safe-area-inset-bottom for nav bar / notch
   - max-height + overflow so tall sheets don't clip
   - touch-action: none stops scroll bleed-through
═══════════════════════════════════════════════════════ */
.conf-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;   /* explicit — no inset shorthand */
  width: 100%; height: 100%;               /* belt + suspenders for old WebView */
  background: rgba(0,0,0,.82);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  z-index: 9999;                           /* was 200 — raised to beat all layers */
  -webkit-transform: translateZ(0);        /* force GPU compositing layer (Android) */
          transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
  touch-action: none;                      /* prevent scroll bleed-through */
  overscroll-behavior: contain;
}
.conf-overlay.open {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
          align-items: flex-end;
  -webkit-justify-content: center;
          justify-content: center;
  -webkit-animation: _conf_in .2s ease both;
          animation: _conf_in .2s ease both;
}
@-webkit-keyframes _conf_in { from{opacity:0} to{opacity:1} }
@keyframes         _conf_in { from{opacity:0} to{opacity:1} }

.conf-sheet {
  background: var(--card);
  border: 1px solid var(--line-orange);
  border-radius: 22px 22px 0 0;
  /* Safe area padding: accounts for Android nav bar + iPhone home indicator */
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 16px));
  width: 100%;
  max-width: 480px;
  /* Limit height on small screens — allow internal scroll */
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Keep GPU layer so animation stays crisp */
  -webkit-transform: translateZ(0);
          transform: translateZ(0);
  -webkit-animation: _conf_up .28s cubic-bezier(.34,1.2,.64,1) both;
          animation: _conf_up .28s cubic-bezier(.34,1.2,.64,1) both;
  /* Prevent the sheet from being dragged off-screen accidentally */
  touch-action: pan-y;
}
@-webkit-keyframes _conf_up { from{-webkit-transform:translateY(100%)} to{-webkit-transform:translateY(0)} }
@keyframes         _conf_up { from{transform:translateY(100%)}          to{transform:translateY(0)} }

.conf-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,.18);
  border-radius: 2px;
  margin: 0 auto 18px;
  flex-shrink: 0;
}
.conf-title {
  font-size: 1.08rem; font-weight: 900;
  color: var(--text); margin-bottom: 5px;
  text-align: center; flex-shrink: 0;
}
.conf-sub {
  font-size: .8rem; color: var(--text2);
  margin-bottom: 16px; line-height: 1.55;
  text-align: center; flex-shrink: 0;
}
.conf-phone-box {
  background: rgba(255,255,255,.05);
  border: 1.5px solid var(--line-orange);
  border-radius: 14px; padding: 16px 14px;
  margin-bottom: 14px; text-align: center;
  flex-shrink: 0;
}
.conf-phone-num {
  font-size: 1.7rem; font-weight: 900;
  color: #fff; letter-spacing: .1em;
  font-family: 'Courier New', monospace;
  margin-bottom: 6px;
}
.conf-phone-meta { font-size: .84rem; color: var(--text2); font-weight: 700; }
.conf-phone-meta b { color: var(--orange); }

.conf-rows {
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; overflow: hidden;
  flex-shrink: 0;
}
.conf-row {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
          justify-content: space-between;
  -webkit-align-items: center;
          align-items: center;
  padding: 11px 14px;
  font-size: .88rem;
}
.conf-row + .conf-row { border-top: 1px solid rgba(255,255,255,.06); }
.conf-row span:first-child { color: var(--text2); }
.conf-row span:last-child  { color: var(--text); font-weight: 800; }
.conf-row.total {
  background: rgba(240,90,34,.06);
  border-top: 1px solid var(--line-orange) !important;
}
.conf-row.total span:first-child { color: var(--text); font-weight: 700; }
.conf-row.total span:last-child  { color: var(--orange); font-size: 1.1rem; font-weight: 900; }

.conf-actions {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
          flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.conf-btn-confirm {
  width: 100%; height: 56px; border-radius: 15px; border: none;
  background: linear-gradient(135deg, var(--orange), #e55d00);
  color: #fff; font-size: 1rem; font-weight: 900;
  cursor: pointer; font-family: inherit;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.conf-btn-confirm:active { transform: scale(.97); opacity: .9; }
.conf-btn-edit {
  width: 100%; height: 50px; border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  color: var(--text2); font-size: .9rem; font-weight: 800;
  cursor: pointer; font-family: inherit;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.conf-btn-edit:active { transform: scale(.97); }

/* ── Wallet Card ───────────────────────────────── */
.wallet-card {
  background: linear-gradient(135deg, var(--navy) 0%, #0F1A50 100%);
  border: 1px solid var(--line-orange);
  border-radius: var(--r-lg); padding: 18px;
  position: relative; overflow: hidden;
  animation: cardReveal .4s ease .1s both;
}
.wallet-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,90,34,.6), transparent);
}
/* Diagonal speed lines */
.wallet-card::after {
  content: ''; position: absolute;
  right: -30px; bottom: -20px;
  width: 120px; height: 120px;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent, transparent 8px,
      rgba(240,90,34,.06) 8px, rgba(240,90,34,.06) 10px
    );
  border-radius: 50%;
}
.wallet-bal-label {
  font-size: .58rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .2em; color: rgba(240,90,34,.7); margin-bottom: 6px;
}
.wallet-bal-value {
  font-size: 2rem; font-weight: 950; color: #fff;
  letter-spacing: -.04em; line-height: 1;
  transition: all .4s ease;
}
.wallet-bal-value.updating { transform: scale(1.06); color: var(--orange-lt); }

/* ── Animate In ────────────────────────────────── */
.animate-in { animation: cardReveal .35s ease both; }

/* ── Reduced motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Small screens ─────────────────────────────── */
@media (max-width: 360px) {
  :root { --pad: 10px; --r: 14px; --r-lg: 18px; }
  body { font-size: 13px; }
  .bs-brand h1 { font-size: 1.4rem; }
  .bs-logo { width: 76px; height: 76px; }
  .bs-stat-val { font-size: .9rem; }
}

/* ── Safe area support ─────────────────────────── */
@supports (padding: max(0px)) {
  .app-shell {
    padding-left:  max(var(--pad), var(--safe-left));
    padding-right: max(var(--pad), var(--safe-right));
  }
}

/* ═══════════════════════════════════════════════════════════
   BitBeam Splash Screen
   Shows on first load and hard refresh. sessionStorage flag
   suppresses it on internal navigation. Fades out after page
   load OR 3.5s hard cap. Uses opacity (not display:none) so
   layout is computed before JS runs — zero flicker.
   ═══════════════════════════════════════════════════════════ */

/* Full-screen overlay */
#bb-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #080E2A;
  background-image:
    radial-gradient(ellipse 65% 45% at 50% -5%,  rgba(240,90,34,.14), transparent),
    radial-gradient(ellipse 40% 35% at 100% 100%, rgba(27,44,107,.6),  transparent);
  opacity: 1;
  transition: opacity .55s cubic-bezier(.4,0,.2,1);
  pointer-events: all;
  user-select: none;
}
#bb-splash.bb-splash-out {
  opacity: 0;
  pointer-events: none;
}

/* Logo ring + glow */
.bb-splash-logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* White card behind logo -- handles PNG logos with white background. */
.bb-splash-logo-card {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px rgba(240,90,34,.35), 0 12px 40px rgba(0,0,0,.65), 0 0 60px rgba(240,90,34,.18);
  animation: bb-logo-pop .65s cubic-bezier(.34,1.5,.64,1) both;
  overflow: hidden;
}
/* Outer counter-rotating ring */
.bb-splash-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color:   #F05A22;
  border-right-color: rgba(240,90,34,.25);
  animation: bb-spin 1.1s linear infinite;
  will-change: transform;
}
/* Inner ring */
.bb-splash-ring-2 {
  position: absolute;
  inset: -17px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(27,44,107,.8);
  border-left-color:   rgba(240,90,34,.12);
  animation: bb-spin 1.7s linear infinite reverse;
  will-change: transform;
}
@keyframes bb-spin { to { transform: rotate(360deg); } }

/* Ambient glow behind logo */
.bb-splash-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,90,34,.18) 0%, transparent 70%);
  animation: bb-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes bb-glow-pulse {
  0%,100% { opacity: .7; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.1); }
}

/* Logo image */
.bb-splash-logo {
  width: 80px;
  height: 80px;
  border-radius: 0;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  /* box-shadow on .bb-splash-logo-card, not here */
}
@keyframes bb-logo-pop {
  from { opacity: 0; transform: scale(.6) rotate(-5deg); }
  to   { opacity: 1; transform: scale(1)  rotate(0deg);  }
}

/* Brand text */
.bb-splash-brand {
  text-align: center;
  animation: bb-text-in .6s ease both .2s;
}
@keyframes bb-text-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.bb-splash-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}
.bb-splash-name .bit  { color: #fff; }
.bb-splash-name .beam { color: #F05A22; }
.bb-splash-tagline {
  font-size: .68rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-top: 7px;
}

/* Progress bar */
.bb-splash-bar-wrap {
  width: 100px;
  height: 2px;
  background: rgba(255,255,255,.07);
  border-radius: 2px;
  margin-top: 32px;
  overflow: hidden;
  animation: bb-text-in .5s ease both .3s;
}
.bb-splash-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(240,90,34,.5), #F05A22);
  border-radius: 2px;
  transition: width .1s linear;
}

/* Version tag at bottom */
.bb-splash-ver {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  font-size: .58rem;
  font-weight: 600;
  color: rgba(255,255,255,.14);
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: bb-text-in .5s ease both .5s;
}

/* Hide page shell during splash — opacity only so layout is computed */
body.bb-splashing .app-shell,
body.bb-splashing .topbar,
body.bb-splashing header,
body.bb-splashing .bs-header,
body.bb-splashing .pg-header,
body.bb-splashing .profile-pill,
body.bb-splashing .settings-wrap,
body.bb-splashing .back-link,
body.bb-splashing .bn-bar {
  opacity: 0 !important;
  pointer-events: none !important;
}
/* CRITICAL: Never hide payment overlays, modals, or any fixed-position UI.
 * .pay-overlay (z-index:9999) must always be visible above the splash.
 * The splash (z-index:99999) already renders on top — we just ensure
 * the payment overlay is not hidden by the bb-splashing class rule. */
body.bb-splashing .pay-overlay,
body.bb-splashing .sheet-overlay,
body.bb-splashing .conf-overlay,
body.bb-splashing .terms-modal,
body.bb-splashing [class*="modal"],
body.bb-splashing [class*="overlay"] {
  opacity: 1 !important;
  pointer-events: all !important;
}
body:not(.bb-splashing) .app-shell,
body:not(.bb-splashing) .topbar,
body:not(.bb-splashing) header,
body:not(.bb-splashing) .bs-header,
body:not(.bb-splashing) .pg-header,
body:not(.bb-splashing) .profile-pill,
body:not(.bb-splashing) .settings-wrap,
body:not(.bb-splashing) .back-link,
body:not(.bb-splashing) .bn-bar {
  opacity: 1;
  transition: opacity .35s ease .05s;
}

/* ================================================================
   Network Maintenance Modal  (#net-block-modal)
   Bottom-sheet overlay triggered when a network is admin-blocked.
   Matches .conf-overlay design system. Orange/amber warning palette.
================================================================ */
#net-block-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.78);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  z-index: 10000;
  -webkit-transform: translateZ(0);
          transform: translateZ(0);
  touch-action: none;
  overscroll-behavior: contain;
}
#net-block-modal.open {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
          align-items: flex-end;
  -webkit-justify-content: center;
          justify-content: center;
  -webkit-animation: _nbm_in .25s ease both;
          animation: _nbm_in .25s ease both;
}
@-webkit-keyframes _nbm_in { from{opacity:0} to{opacity:1} }
@keyframes         _nbm_in { from{opacity:0} to{opacity:1} }

.net-block-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--card, #141B3A);
  border: 1px solid rgba(240,90,34,.22);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding-bottom: calc(env(safe-area-inset-bottom,0px) + 24px);
  overflow: hidden;
  -webkit-animation: _nbm_sheet_in .3s cubic-bezier(.34,1.1,.64,1) both;
          animation: _nbm_sheet_in .3s cubic-bezier(.34,1.1,.64,1) both;
}
@-webkit-keyframes _nbm_sheet_in {
  from { -webkit-transform: translateY(100%); opacity: 0; }
  to   { -webkit-transform: translateY(0);    opacity: 1; }
}
@keyframes _nbm_sheet_in {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.net-block-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,.12);
  border-radius: 2px;
  margin: 12px auto 0;
}
.net-block-banner {
  background: linear-gradient(135deg, rgba(240,90,34,.16), rgba(245,168,0,.10));
  border-bottom: 1px solid rgba(240,90,34,.15);
  padding: 22px 22px 20px;
  text-align: center;
}
.net-block-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(240,90,34,.22), rgba(245,168,0,.14));
  border: 1.5px solid rgba(240,90,34,.4);
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 14px;
  position: relative;
}
.net-block-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  border: 1.5px solid rgba(240,90,34,.22);
  animation: _nbm_pulse 2.2s ease-in-out infinite;
}
@keyframes _nbm_pulse {
  0%,100%{ opacity:.5; transform:scale(1); }
  50%    { opacity:1;  transform:scale(1.06); }
}
.net-block-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 10px;
  background: rgba(255,213,31,.12);
  border: 1px solid rgba(255,213,31,.3);
  color: #ffd51f;
}
.net-block-pill.telecel { background:rgba(59,130,246,.12); border-color:rgba(59,130,246,.3); color:#93c5fd; }
.net-block-pill.at      { background:rgba(34,197,94,.12);  border-color:rgba(34,197,94,.3);  color:#86efac; }
.net-block-title {
  font-size: 1.08rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.01em;
}
.net-block-body {
  padding: 20px 22px 0;
}
.net-block-msg {
  font-size: .87rem;
  color: rgba(255,255,255,.62);
  line-height: 1.65;
  text-align: center;
  margin-bottom: 16px;
}
.net-block-tip {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 20px;
}
.net-block-tip-icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 1px; }
.net-block-tip-text { font-size: .79rem; color: rgba(255,255,255,.48); line-height: 1.55; }
.net-block-tip-text strong { color: rgba(255,255,255,.78); font-weight: 700; }
.net-block-actions { padding: 0 22px; display: flex; flex-direction: column; gap: 10px; }
.net-block-btn-try {
  width: 100%; height: 52px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #F05A22, #C94010);
  color: #fff; font-size: .92rem; font-weight: 900; letter-spacing: .02em;
  cursor: pointer; font-family: inherit;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.net-block-btn-try:active { opacity: .85; transform: scale(.98); }
.net-block-btn-dismiss {
  width: 100%; height: 46px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  background: transparent; color: rgba(255,255,255,.45);
  font-size: .82rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.net-block-btn-dismiss:active { background: rgba(255,255,255,.06); }
