/* ─────────────────────────────────────────────────────────────
   Telecel Guiné-Bissau Portal — design tokens + global styles
   ───────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --red: #F20318;
  --red-700: #C40212;
  --red-900: #8B020E;
  --red-soft: #FEE5E7;
  --red-tint: #FFF4F5;

  /* Neutrals */
  --black: #010101;
  --ink: #111213;
  --gray-900: #363636;
  --gray-700: #5A5A5A;
  --gray-500: #7B7B7B;
  --gray-300: #C9C9C9;
  --gray-200: #E6E6E6;
  --gray-100: #F1F1F1;
  --gray-50:  #F7F7F7;
  --white: #FFFFFF;

  /* Semantic */
  --bg: #F7F7F7;
  --surface: #FFFFFF;
  --surface-2: #F1F1F1;
  --text: #111213;
  --text-muted: #7B7B7B;
  --text-strong: #010101;
  --border: #ECECEC;
  --border-strong: #DADADA;

  /* Accents (overridden by Tweaks) */
  --accent: #F20318;
  --accent-700: #C40212;
  --accent-soft: #FEE5E7;
  --accent-ink: #FFFFFF;
  --accent-grad: linear-gradient(135deg, #F20318 0%, #8B020E 100%);

  /* Status */
  --green: #19A86B;
  --green-soft: #E6F7EF;
  --amber: #E89B0C;
  --amber-soft: #FCF1DD;
  --blue: #1E66F5;
  --blue-soft: #E6EEFE;

  /* Spacing (8pt) */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Type */
  --font-ui: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Baloo 2', 'DM Sans', system-ui, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16,18,20,.04), 0 1px 1px rgba(16,18,20,.03);
  --shadow-md: 0 8px 24px rgba(16,18,20,.06), 0 2px 6px rgba(16,18,20,.04);
  --shadow-lg: 0 20px 48px rgba(16,18,20,.10), 0 4px 12px rgba(16,18,20,.06);
  --shadow-red: 0 12px 28px rgba(242,3,24,.28);
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0B0B0C;
  --surface: #161618;
  --surface-2: #1F1F22;
  --text: #F2F2F3;
  --text-muted: #9A9A9F;
  --text-strong: #FFFFFF;
  --border: #26262A;
  --border-strong: #36363B;
  --gray-50: #161618;
  --gray-100: #1F1F22;
  --gray-200: #26262A;
  --gray-300: #36363B;
  --white: #1F1F22;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.5);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: #0A0A0B;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── Desktop stage (dark backdrop around the phone column) ── */
.stage {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: start center;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(242,3,24,.08), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(255,255,255,.04), transparent 60%),
    #08080A;
}
@media (min-width: 720px) {
  .stage { padding: 28px 16px; }
}

/* The phone-shaped column */
.viewport {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 720px) {
  .viewport {
    min-height: 880px;
    max-height: 880px;
    height: 880px;
    border-radius: 36px;
    box-shadow: 0 40px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
    overflow: hidden;
  }
}

/* iOS-ish status bar */
.statusbar {
  height: 44px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  background: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.statusbar.on-red { color: #fff; }
.statusbar .right { display: flex; align-items: center; gap: 5px; }

/* ── Screen container ─────────────────────────────────────── */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
  position: relative;
}
/* Prevent flex-shrink collapse on overflow:hidden direct children */
.screen > .hero-card,
.screen > .tier-card,
.screen > .promo,
.screen > .card { flex-shrink: 0; }
/* Header / topbar areas should not shrink either */
.screen > .topbar,
.screen > .statusbar { flex-shrink: 0; }
.screen::-webkit-scrollbar { width: 4px; }
.screen::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.screen-body { padding: 0 20px 120px; }
.screen-body.flush { padding: 0 0 120px; }

/* Page transitions */
.screen-enter { animation: slideInR .28s cubic-bezier(.22,.61,.36,1) both; }
.screen-enter-back { animation: slideInL .28s cubic-bezier(.22,.61,.36,1) both; }
@keyframes slideInR {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInL {
  from { transform: translateX(-28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 16px;
  flex-shrink: 0;
}
.topbar .title {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-strong);
  letter-spacing: -.01em;
}
.iconbtn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-strong);
  transition: transform .15s ease, background .15s ease;
}
.iconbtn:hover { background: var(--gray-50); }
.iconbtn:active { transform: scale(.94); }
.iconbtn.ghost { background: transparent; border-color: transparent; }
.iconbtn.solid { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.iconbtn.lg { width: 44px; height: 44px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.005em;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-red);
}
.btn-primary:hover { background: var(--accent-700); }
.btn-secondary {
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 58px; font-size: 16px; }

/* ── Chips ────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
  transition: all .15s ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); }
.chip.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.chip.outline-accent { border-color: var(--accent); color: var(--accent); }
.chip.tag {
  height: 22px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.card.flat { border: 0; box-shadow: var(--shadow-sm); }
.card.hoist { box-shadow: var(--shadow-md); }
.card.tight { padding: 12px; }
.card.spacious { padding: 20px; }

/* ── Form inputs ──────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .01em;
}
.input {
  height: 54px;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-strong);
  width: 100%;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.input::placeholder { color: var(--gray-500); }
.input:focus { border-color: var(--accent); }
.input-lg { height: 60px; font-size: 18px; font-weight: 600; }
.input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  height: 54px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}
.input-row input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 16px; font-weight: 500;
}

/* ── Section header ───────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 24px 0 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--text-strong);
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
}

/* ── Typography utilities ─────────────────────────────────── */
.t-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.t-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--text-strong);
}
.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.01em;
  color: var(--text-strong);
}
.t-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.t-muted { color: var(--text-muted); }
.t-mono-num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ── Avatar ───────────────────────────────────────────────── */
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FCD9DC, #F20318);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-display);
  position: relative;
  flex-shrink: 0;
}
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar .dot {
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
}

/* ── Brand wordmark ───────────────────────────────────────── */
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
}
.wordmark::before {
  content: "";
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent);
  background-image:
    radial-gradient(circle at 50% 50%, #fff 18%, transparent 22%),
    radial-gradient(circle at 50% 50%, transparent 30%, #fff 31%, #fff 36%, transparent 37%);
}
.wordmark.on-dark { color: #fff; }
.wordmark.lg { font-size: 34px; }
.wordmark.lg::before { width: 34px; height: 34px; border-radius: 9px; }
.wordmark.xl { font-size: 48px; }
.wordmark.xl::before { width: 48px; height: 48px; border-radius: 12px; }
.wordmark span.tld {
  font-size: .6em;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
  letter-spacing: 0;
}

/* ── Bottom nav ───────────────────────────────────────────── */
.bottomnav-shell {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding: 8px 16px 16px;
  pointer-events: none;
  z-index: 50;
}
.bottomnav {
  pointer-events: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 68px;
  padding: 0 12px;
  border-radius: 24px 24px 0 0;
}
.bottomnav.floating {
  border-radius: var(--r-full);
  width: auto;
  padding: 8px;
  gap: 4px;
  height: auto;
}
.navitem {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  color: var(--gray-500);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  position: relative;
  transition: color .15s ease;
}
.navitem.active { color: var(--accent); }
.navitem.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 22px; height: 3px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}
.bottomnav.icons-only .navitem { font-size: 0; }
.bottomnav.icons-only .navitem .navlabel { display: none; }
.bottomnav.floating .navitem {
  padding: 10px 14px;
  border-radius: var(--r-full);
  flex-direction: row;
  gap: 6px;
  font-size: 12px;
}
.bottomnav.floating .navitem::before { display: none; }
.bottomnav.floating .navitem.active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ── Onboarding pager ─────────────────────────────────────── */
.dot-pager { display: inline-flex; gap: 6px; align-items: center; }
.dot-pager span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--gray-300);
  transition: all .25s ease;
}
.dot-pager span.active {
  background: var(--accent);
  width: 22px;
}

/* ── OTP boxes ────────────────────────────────────────────── */
.otp-boxes { display: flex; gap: 10px; justify-content: space-between; }
.otp-box {
  flex: 1;
  height: 60px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--text-strong);
  transition: all .15s ease;
}
.otp-box.filled { border-color: var(--accent); }
.otp-box.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ── Balance hero card ────────────────────────────────────── */
.hero-card {
  position: relative;
  border-radius: 28px;
  padding: 22px;
  color: #fff;
  background: var(--accent-grad);
  overflow: hidden;
  box-shadow: var(--shadow-red);
  flex-shrink: 0;
}
.hero-card::before, .hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.hero-card::before { width: 220px; height: 220px; right: -80px; top: -80px; }
.hero-card::after { width: 140px; height: 140px; right: 40px; bottom: -60px; background: rgba(255,255,255,.06); }
.hero-card .balance-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -.02em;
  line-height: 1;
}
.hero-card .balance-label { opacity: .8; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

/* ── Bundle cards ─────────────────────────────────────────── */
.bundle-card-feature {
  position: relative;
  border-radius: var(--r-lg);
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
  transition: all .15s ease;
}
.bundle-card-feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.bundle-card-feature .pill {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
  letter-spacing: .04em;
}
.bundle-card-feature .vol {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.01em;
  color: var(--text-strong);
  display: flex; align-items: baseline; gap: 4px;
}
.bundle-card-feature .vol .unit { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.bundle-card-feature .meta { color: var(--text-muted); font-size: 13px; }
.bundle-card-feature .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  margin-top: auto;
}

.bundle-card-list {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .15s ease;
}
.bundle-card-list:hover { border-color: var(--accent); }
.bundle-card-list .ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.bundle-card-list .body { flex: 1; min-width: 0; }
.bundle-card-list .body .h {
  font-weight: 700; font-size: 15px; color: var(--text-strong);
  display: flex; align-items: center; gap: 6px;
}
.bundle-card-list .body .sub { font-size: 12px; color: var(--text-muted); }
.bundle-card-list .price {
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px; color: var(--text-strong);
}

.bundle-card-grid {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 16px 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  min-height: 168px;
}
.bundle-card-grid.featured {
  background: linear-gradient(180deg, #1A1A1B 0%, #0A0A0B 100%);
  color: #fff;
  border-color: transparent;
}
.bundle-card-grid .vol {
  font-family: var(--font-display);
  font-weight: 800; font-size: 26px;
  letter-spacing: -.01em;
}
.bundle-card-grid.featured .vol { color: #fff; }
.bundle-card-grid .vol .unit { font-size: 13px; font-weight: 600; opacity: .7; margin-left: 2px; }
.bundle-card-grid .stat { font-size: 11px; opacity: .7; margin-top: 4px; }
.bundle-card-grid .price {
  font-family: var(--font-display);
  font-weight: 700; font-size: 18px;
  color: var(--accent);
}
.bundle-card-grid.featured .price { color: #fff; }

/* ── Promo banner ─────────────────────────────────────────── */
.promo {
  position: relative;
  border-radius: 24px;
  padding: 20px;
  color: #fff;
  overflow: hidden;
  min-height: 156px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--accent-grad);
  flex-shrink: 0;
}
.promo .promo-img {
  position: absolute;
  right: -8px; bottom: -8px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), rgba(0,0,0,.2));
}
.promo .promo-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.promo h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.01em;
  margin: 6px 0 4px;
  max-width: 70%;
  line-height: 1.1;
}
.promo p { margin: 0; font-size: 13px; opacity: .9; max-width: 65%; }
.promo .promo-cta {
  background: #fff;
  color: var(--accent);
  height: 38px;
  padding: 0 18px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 13px;
  align-self: flex-start;
}

/* ── Toggle row ───────────────────────────────────────────── */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.row .ico {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.row .body { flex: 1; min-width: 0; }
.row .body .h { font-weight: 600; font-size: 14px; color: var(--text-strong); }
.row .body .sub { font-size: 12px; color: var(--text-muted); }

/* ── Toast / modal ────────────────────────────────────────── */
.modal-scrim {
  position: absolute; inset: 0;
  background: rgba(10,10,11,.55);
  display: grid; place-items: flex-end center;
  z-index: 80;
  animation: fade .25s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  width: 100%;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 18px 20px 28px;
  animation: sheetUp .35s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle {
  width: 38px; height: 4px;
  background: var(--gray-300);
  border-radius: 4px;
  margin: 0 auto 16px;
}

/* ── Tier progress (loyalty) ──────────────────────────────── */
.tier-card {
  position: relative;
  border-radius: 28px;
  padding: 22px;
  background: linear-gradient(140deg, #1A1A1B 0%, #0A0A0B 60%, #2A0A0E 100%);
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.tier-card::after {
  content: "";
  position: absolute;
  right: -60px; top: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(242,3,24,.6), transparent 65%);
  filter: blur(20px);
}
.tier-track {
  position: relative;
  height: 8px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.tier-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #F20318, #FF6B7A);
  border-radius: var(--r-full);
}

/* ── Misc ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.skel {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-50) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Pretty wrap */
h1, h2, h3, h4, p { text-wrap: pretty; }

/* Hide tweak panel scroll bug fix on small */
.twk-panel { font-family: var(--font-ui) !important; }


/* ═══════════════════════════════════════════════════════════
   DESKTOP RESPONSIVE (≥ 1024px)
   App-shell: left sidebar + wide content area
   ═══════════════════════════════════════════════════════════ */

.sidenav { display: none; }

@media (min-width: 1024px) {
  body { background: var(--bg); }
  .stage {
    padding: 0;
    background: var(--bg);
    display: block;
    min-height: 100vh;
  }
  .viewport {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    max-height: none;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    grid-template-areas: "side main";
    overflow: visible;
  }
  /* Hide mobile-only chrome on desktop */
  .viewport > .statusbar,
  .screen > .statusbar,
  .screen-enter > .statusbar,
  body .statusbar { display: none; }
  .bottomnav-shell { display: none; }
  .mobile-only { display: none !important; }
  /* Hide back arrows in topbars when sidebar covers nav */
  .desktop-hide-back .topbar > .iconbtn:first-child { display: none; }

  /* Sidebar */
  .sidenav {
    grid-area: side;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 16px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    gap: 4px;
    overflow-y: auto;
  }
  .sidenav .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px 24px;
  }
  .sidenav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 12px 6px;
  }
  .sidenav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    width: 100%;
    transition: background .15s ease, color .15s ease;
    position: relative;
  }
  .sidenav-item:hover { background: var(--surface-2); }
  .sidenav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
  }
  .sidenav-item.active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 12px; bottom: 12px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
  }
  .sidenav-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
  }
  .sidenav-user {
    margin-top: auto;
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: var(--surface-2);
  }
  .sidenav-user .body { flex: 1; min-width: 0; }
  .sidenav-user .h {
    font-size: 13px; font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sidenav-user .sub { font-size: 11px; color: var(--text-muted); }

  /* Main content */
  .screen {
    grid-area: main;
    background: var(--bg);
    overflow-y: visible;
    min-height: 100vh;
  }
  .screen-body {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 8px 40px 60px;
  }
  .screen-body.flush { padding: 0; max-width: 1080px; margin: 0 auto; width: 100%; }
  .topbar {
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    padding: 16px 40px;
  }
  .topbar .title { font-size: 26px; }

  /* Drop the mobile-only sticky bottom CTAs into normal flow */
  .screen [style*="sticky"][style*="bottom"] {
    position: static !important;
    background: transparent !important;
    padding: 24px 0 0 !important;
  }

  /* Wider quick action grids look better with more columns */
  .desktop-cols-6 { grid-template-columns: repeat(6, 1fr) !important; }
  .desktop-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
  .desktop-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }

  /* Auth screens: keep narrow + centered */
  .auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
  }
  .auth-shell .auth-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg);
  }
  .auth-shell .auth-pane > * {
    max-width: 460px;
    width: 100%;
  }
  .auth-shell .auth-visual {
    background: linear-gradient(160deg, #F20318 0%, #8B020E 100%);
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 48px;
    position: relative;
    overflow: hidden;
  }
  .auth-shell .auth-visual::before,
  .auth-shell .auth-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
  }
  .auth-shell .auth-visual::before { width: 480px; height: 480px; top: -160px; right: -160px; }
  .auth-shell .auth-visual::after { width: 320px; height: 320px; bottom: -100px; left: -80px; background: rgba(255,255,255,.05); }

  /* Compact density on inputs */
  .input { height: 52px; }
  .input-row { height: 52px; }
}

@media (min-width: 1280px) {
  .viewport { grid-template-columns: 300px minmax(0, 1fr); }
  .screen-body { max-width: 1180px; padding: 8px 48px 60px; width: 100%; }
  .topbar { max-width: 1180px; padding: 18px 48px; }
}

/* Tablet (640–1023): roomier mobile column */
@media (min-width: 640px) and (max-width: 1023px) {
  .viewport {
    max-width: 520px;
    border-radius: 28px;
    min-height: calc(100vh - 32px);
  }
}


/* ── Telecel brand pattern on red/dark cards ── */
.hero-card::before, .pattern-card::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: auto;
  width: auto; height: 64px; border-radius: 0;
  background: url("assets/pattern-strip-white.png") repeat-x left bottom / auto 64px;
  opacity: .22; pointer-events: none;
}
.hero-card::after, .pattern-card::after {
  content: ""; position: absolute; right: 8px; top: -30px; bottom: auto; left: auto;
  width: 90px; height: 240px; border-radius: 0;
  background: url("assets/pattern-vertical-white.png") no-repeat right top / contain;
  opacity: .16; pointer-events: none;
}
.hero-card, .pattern-card { position: relative; overflow: hidden; }
.hero-card > *, .pattern-card > * { position: relative; z-index: 1; }
.promo .promo-img {
  right: 6px; bottom: auto; top: -20px; width: 110px; height: 260px; border-radius: 0;
  background: url("assets/pattern-vertical-white.png") no-repeat right top / contain;
  opacity: .22;
}
.promo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: url("assets/pattern-strip-white.png") repeat-x left bottom / auto 48px;
  opacity: .16; pointer-events: none;
}
.promo > *:not(.promo-img) { position: relative; z-index: 1; }

/* ── Promo image carousel ── */
.promo-carousel { position: relative; border-radius: 24px; overflow: hidden; background: var(--surface-2); flex-shrink: 0; }
.promo-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-carousel-track::-webkit-scrollbar { display: none; }
.promo-carousel-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 595 / 286; }
.promo-carousel-slide img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.promo-carousel-cta {
  position: absolute; left: 14px; bottom: 30px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: #fff; color: var(--accent); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.promo-carousel-cta:active { transform: scale(.97); }
.promo-carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.promo-carousel-dots button { width: 7px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.6); transition: all .25s ease; }
.promo-carousel-dots button.active { width: 22px; background: #fff; }
.promo-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--text-strong); display: none; place-items: center; box-shadow: var(--shadow-md);
}
.promo-carousel-arrow.left { left: 10px; } .promo-carousel-arrow.right { right: 10px; }
@media (hover: hover) { .promo-carousel:hover .promo-carousel-arrow { display: grid; } }
