/* ══ ROOT OVERFLOW FIX ══ */
html, body {
  max-width: 100%;
  overflow-x: hidden;   /* fallback for old browsers */
  overflow-x: clip;     /* modern: clips without killing touch-drag scrolling */
  width: 100%;
  touch-action: pan-y pinch-zoom; /* explicitly allow vertical touch panning on touchscreens */
}

/* DataHub VTU Platform — Orange & White with Dark Mode */
/* Palette: Flame Orange #FF6B00, White, Dark #0F0F0F, Mid-dark #1A1A1A */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Brand */
  --orange:      #FF6B00;
  --orange2:     #E55F00;
  --orange-light:#FFF0E6;
  --orange-glow: rgba(255,107,0,0.15);

  /* Light Mode */
  --bg:          #F7F8FA;
  --surface:     #FFFFFF;
  --surface2:    #F0F2F5;
  --text:        #111111;
  --text2:       #555555;
  --border:      #E4E7EC;
  --shadow:      0 4px 24px rgba(0,0,0,0.07);

  /* Sidebar (always dark) */
  --sidebar-bg:  #111111;
  --sidebar-text:rgba(255,255,255,0.65);
  --sidebar-active-bg: rgba(255,107,0,0.14);
  --sidebar-active-text: #FF6B00;

  /* Status */
  --green:       #16A34A;
  --red:         #DC2626;
  --blue:        #2563EB;
  --yellow:      #D97706;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg:        #0F0F0F;
  --surface:   #1A1A1A;
  --surface2:  #242424;
  --text:      #F0F0F0;
  --text2:     #999999;
  --border:    #2E2E2E;
  --shadow:    0 4px 24px rgba(0,0,0,0.35);
  --orange-light: rgba(255,107,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

h1,h2,h3,h4,h5 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  line-height: 1.25;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange2); }

/* ═══════════════════════════════════════
   LANDING PAGE — NAVBAR
═══════════════════════════════════════ */
.land-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s;
}

[data-theme="dark"] .land-nav {
  background: rgba(15,15,15,0.92);
}

.land-nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 22px; color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 38px; height: 38px;
  background: var(--orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 17px;
  font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0;
}

.land-nav-links {
  display: flex; align-items: center; gap: 8px;
}

.land-nav-links a {
  color: var(--text2);
  font-size: 14px; font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
}

.land-nav-links a:hover { color: var(--orange); background: var(--orange-light); }

.land-nav-actions {
  display: flex; align-items: center; gap: 10px;
}

/* Mobile hamburger + dropdown for .land-nav pages (index.php, contact.php,
   etc). Hidden by default — the mobile media query below reveals it and
   hides the full link/action row so they don't fight for space and wrap
   into a distorted-looking bar on narrow screens. */
.hamburger-btn {
  display: none; background: none; border: none;
  cursor: pointer; color: var(--text); padding: 6px;
  border-radius: 8px; transition: background .15s;
}
.hamburger-btn:hover { background: var(--surface2); }

.mobile-nav {
  display: none; position: fixed;
  top: 66px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
  flex-direction: column; gap: 2px;
  z-index: 199;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  color: var(--text); font-size: 15px; font-weight: 500;
  padding: 12px 4px; text-decoration: none;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.mobile-nav-link:last-of-type { border-bottom: none; }
.mobile-nav-link:hover { color: var(--orange); }
.mobile-nav-actions {
  display: flex; gap: 10px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.mobile-nav-actions a { flex: 1; text-align: center; }

@media (max-width: 768px) {
  .land-nav { padding: 0 18px; height: 60px; }
  .land-nav-links { display: none; }
  .land-nav-actions .nav-btn-signin,
  .land-nav-actions .nav-btn-signup,
  .land-nav-actions .btn-outline,
  .land-nav-actions .btn-primary { display: none; }
  .hamburger-btn { display: flex; }
  .mobile-nav { top: 60px; }
}

/* ═══════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  padding: 68px 40px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { max-width: 720px; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--orange-light);
  color: var(--orange);
  border: 1px solid rgba(255,107,0,0.25);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero h1 span { color: var(--orange); }

.hero p {
  font-size: 18px;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700;
  color: var(--orange);
}

.hero-stat-lab { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ═══════════════════════════════════════
   SERVICES GRID (Landing)
═══════════════════════════════════════ */
.land-section {
  padding: 80px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--orange);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700; color: var(--text);
  margin-bottom: 14px;
}

.section-sub { font-size: 16px; color: var(--text2); max-width: 480px; line-height: 1.7; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}

.service-card:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 32px var(--orange-glow);
  transform: translateY(-4px);
}

.service-emoji { font-size: 36px; margin-bottom: 14px; }
.service-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.service-desc { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ═══════════════════════════════════════
   HOW IT WORKS
═══════════════════════════════════════ */
.steps-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin-top: 40px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.step-num {
  width: 40px; height: 40px;
  background: var(--orange);
  color: white;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.step-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step-desc  { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ═══════════════════════════════════════
   CTA BANNER
═══════════════════════════════════════ */
.cta-banner {
  background: var(--orange);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  margin: 0 40px 80px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.cta-banner h2 { font-size: 32px; font-weight: 700; color: white; margin-bottom: 12px; }
.cta-banner p  { color: rgba(255,255,255,0.85); font-size: 16px; margin-bottom: 28px; }

/* ═══════════════════════════════════════
   CONTACT PAGE
═══════════════════════════════════════ */
.contact-hero {
  padding: 120px 40px 60px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.contact-hero h1 { font-size: 40px; font-weight: 700; margin-bottom: 12px; }
.contact-hero p  { font-size: 16px; color: var(--text2); max-width: 460px; margin: 0 auto; }

.contact-body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
}

.contact-info-item {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 28px;
}

.contact-info-icon {
  width: 44px; height: 44px;
  background: var(--orange-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-info-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.contact-info-val   { font-size: 14px; color: var(--text2); }

/* ═══════════════════════════════════════
   LANDING FOOTER
═══════════════════════════════════════ */
.land-footer {
  background: #111111;
  color: rgba(255,255,255,0.55);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

.land-footer a { color: rgba(255,255,255,0.55); text-decoration: none; }
.land-footer a:hover { color: var(--orange); }
.land-footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 32px;
}

.auth-logo .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--text);
}

.auth-card h2 { font-size: 24px; margin-bottom: 6px; color: var(--text); }
.auth-card p.subtitle { color: var(--text2); margin-bottom: 28px; font-size: 14px; }

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px; letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}

.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 14px;
  cursor: pointer; border: none;
  transition: all 0.2s; text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: white; width: 100%;
}
.btn-primary:hover {
  background: var(--orange2); color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,107,0,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn-outline:hover { background: var(--orange); color: white; }

.btn-white {
  background: white; color: var(--orange);
  font-weight: 700;
}
.btn-white:hover { background: rgba(255,255,255,0.9); color: var(--orange2); }

.btn-ghost {
  background: rgba(255,255,255,0.12); color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.22); color: white; }

.btn-danger { background: var(--red); color: white; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-auto { width: auto; }

/* ═══════════════════════════════════════
   ALERTS
═══════════════════════════════════════ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.alert-success { background: #DCFCE7; color: #15803D; border-left: 3px solid var(--green); }
.alert-error   { background: #FEE2E2; color: #B91C1C; border-left: 3px solid var(--red); }
.alert-info    { background: #DBEAFE; color: #1D4ED8; border-left: 3px solid var(--blue); }
.alert-warning { background: var(--orange-light); color: var(--orange2); border-left: 3px solid var(--orange); }

[data-theme="dark"] .alert-success { background: rgba(22,163,74,0.15); color: #4ADE80; }
[data-theme="dark"] .alert-error   { background: rgba(220,38,38,0.15); color: #F87171; }
[data-theme="dark"] .alert-info    { background: rgba(37,99,235,0.15); color: #93C5FD; }

/* ═══════════════════════════════════════
   SIDEBAR (always dark)
═══════════════════════════════════════ */
.app-layout {
  display: flex; min-height: 100vh;
  max-width: 100%; overflow-x: hidden; overflow-x: clip;
}

.sidebar {
  width: 252px;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
  padding: 26px 22px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 20px; color: white;
}

.sidebar-nav {
  padding: 14px 10px;
  flex: 1; overflow-y: auto;
}

.nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3); text-transform: uppercase;
  padding: 10px 12px 5px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: all 0.18s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.nav-icon { width: 18px; height: 18px; opacity: 0.8; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* ═══════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════ */
.main-content {
  margin-left: 252px;
  flex: 1; display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden; overflow-x: clip;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}

.topbar-title {
  font-size: 17px; font-weight: 700; color: var(--text);
}

.topbar-right {
  display: flex; align-items: center; gap: 12px;
}

/* Dark mode toggle */
.theme-toggle {
  width: 36px; height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--text);
}
.theme-toggle:hover { background: var(--orange-light); border-color: var(--orange); }

.user-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
}

.user-avatar {
  width: 30px; height: 30px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white;
  font-family: 'Space Grotesk', sans-serif;
}

.user-name { font-size: 13px; font-weight: 600; color: var(--text); }

.page-body {
  padding: 28px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Full-bleed pages (e.g. fund-wallet keypad) need to escape the mobile
   !important padding rules below — higher specificity (2 classes) wins
   regardless of source order. Top padding is the one exception: now that
   .topbar is position:fixed (not sticky) on mobile, it no longer reserves
   its own space in the page — every page needs SOME top clearance or its
   content renders hidden behind the floating topbar instead of merging
   cleanly below it. Left/right/bottom stay truly flush (0).  */
.page-body.flush {
  padding: 0 !important;
}
@media (max-width: 768px) {
  .page-body.flush { padding-top: 52px !important; }
}

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body { padding: 22px; }

/* ═══════════════════════════════════════
   WALLET BANNER
═══════════════════════════════════════ */
.wallet-banner {
  background: linear-gradient(135deg, #1A1A1A 0%, #2C1500 60%, #3D1E00 100%);
  border-radius: var(--radius);
  padding: 24px 22px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(255,107,0,0.2);
  width: 100%;
  box-sizing: border-box;
}

.wallet-banner::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,107,0,0.12);
}

.wallet-banner::after {
  content: '';
  position: absolute; bottom: -70px; right: 90px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,107,0,0.07);
}

.wallet-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  opacity: 0.6; text-transform: uppercase; margin-bottom: 8px;
}

/* ══ Reseller Banner — always-visible, animated CTA ══ */
.reseller-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, #FF6B00 0%, #FF8C1A 50%, #FF6B00 100%);
  background-size: 200% 100%;
  animation: resellerGradientShift 6s ease-in-out infinite;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(255,107,0,.3);
  width: 100%;
  box-sizing: border-box;
}
@keyframes resellerGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Diagonal shine sweep, loops every 3.5s */
.reseller-banner-shine {
  position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: resellerShine 3.5s ease-in-out infinite;
}
@keyframes resellerShine {
  0%   { left: -60%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

.reseller-banner-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  animation: resellerIconPulse 2s ease-in-out infinite;
  position: relative; z-index: 1;
}
@keyframes resellerIconPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

.reseller-banner-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.reseller-banner-title {
  font-size: 14px; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.reseller-banner-badge {
  font-size: 10px; font-weight: 800; background: rgba(255,255,255,.25);
  padding: 2px 8px; border-radius: 100px; letter-spacing: .03em;
  animation: resellerBadgeGlow 1.6s ease-in-out infinite;
}
@keyframes resellerBadgeGlow {
  0%, 100% { opacity: .85; }
  50%      { opacity: 1; box-shadow: 0 0 10px rgba(255,255,255,.5); }
}
.reseller-banner-sub {
  font-size: 11.5px; color: rgba(255,255,255,.85); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.reseller-banner-arrow {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  animation: resellerArrowNudge 1.4s ease-in-out infinite;
  position: relative; z-index: 1;
}
@keyframes resellerArrowNudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

@media(max-width: 480px) {
  .reseller-banner { padding: 12px 14px; gap: 10px; }
  .reseller-banner-icon { width: 34px; height: 34px; }
  .reseller-banner-title { font-size: 13px; }
  .reseller-banner-sub { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .reseller-banner, .reseller-banner-shine, .reseller-banner-icon,
  .reseller-banner-badge, .reseller-banner-arrow { animation: none; }
}

.wallet-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px; font-weight: 700; margin-bottom: 20px;
}

.wallet-actions { display: flex; gap: 10px; }

.wallet-btn {
  padding: 10px 22px; border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 13px;
  cursor: pointer; border: none; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
}

.wallet-btn-primary {
  background: var(--orange); color: white;
}
.wallet-btn-primary:hover { background: var(--orange2); color: white; transform: translateY(-1px); }

.wallet-btn-outline {
  background: rgba(255,255,255,0.1); color: white;
  border: 1px solid rgba(255,255,255,0.22);
}
.wallet-btn-outline:hover { background: rgba(255,255,255,0.18); color: white; }

/* ═══════════════════════════════════════
   QUICK ACTIONS
═══════════════════════════════════════ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 24px;
  width: 100%;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none; display: block;
}

.action-card:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 20px var(--orange-glow);
  transform: translateY(-2px);
}

.action-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; font-size: 22px;
  background: var(--orange-light);
}

.action-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--text);
}

/* ═══════════════════════════════════════
   TABLES
═══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}

th {
  text-align: left; padding: 11px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text2);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
}

.badge-success    { background: #DCFCE7; color: #15803D; }
.badge-pending    { background: #FEF3C7; color: #92400E; }
.badge-failed     { background: #FEE2E2; color: #B91C1C; }
.badge-processing { background: #DBEAFE; color: #1D4ED8; }
.badge-credit     { background: #DCFCE7; color: #15803D; }
.badge-debit      { background: #FEE2E2; color: #B91C1C; }

[data-theme="dark"] .badge-success    { background: rgba(22,163,74,0.2); color: #4ADE80; }
[data-theme="dark"] .badge-pending    { background: rgba(217,119,6,0.2); color: #FCD34D; }
[data-theme="dark"] .badge-failed     { background: rgba(220,38,38,0.2); color: #F87171; }
[data-theme="dark"] .badge-processing { background: rgba(37,99,235,0.2); color: #93C5FD; }
[data-theme="dark"] .badge-credit     { background: rgba(22,163,74,0.2); color: #4ADE80; }
[data-theme="dark"] .badge-debit      { background: rgba(220,38,38,0.2); color: #F87171; }

/* ═══════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 24px;
  width: 100%;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.stat-label {
  font-size: 11px; font-weight: 700; color: var(--text2);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; font-weight: 700; color: var(--orange);
}

.stat-sub { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ═══════════════════════════════════════
   MODALS
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
  backdrop-filter: blur(3px);
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; color: var(--text); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text2); font-size: 20px;
}
.modal-body { padding: 22px; }

/* ═══════════════════════════════════════
   NETWORK ICONS
═══════════════════════════════════════ */
.net-mtn     { background: #FFD700; }
.net-airtel  { background: #E40000; }
.net-glo     { background: #00A651; }
.net-9mobile { background: #006B3F; }

/* ═══════════════════════════════════════
   MISC COMPONENTS
═══════════════════════════════════════ */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; color: var(--text);
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text2); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* Amount pills */
.amount-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.pill {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  background: var(--surface); color: var(--text);
}
.pill:hover, .pill.active {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange);
}

/* Tabs */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 22px;
}

.tab {
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--text2); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s;
  text-decoration: none;
}
.tab.active, .tab:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* Data plan cards */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; max-height: 380px;
  overflow-y: auto; padding-right: 4px;
}

.plan-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px; cursor: pointer;
  transition: all 0.2s; background: var(--surface);
}
.plan-card:hover, .plan-card.selected {
  border-color: var(--orange);
  background: var(--orange-light);
}
.plan-card.selected { box-shadow: 0 0 0 3px rgba(255,107,0,0.2); }

.plan-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.plan-price { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; color: var(--orange); }
.plan-validity { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* Sidebar overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* ═══════════════════════════════════════
   RESPONSIVE

/* ═══════════════════════════════════════
   RESPONSIVE (consolidated)
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .contact-body { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
}

/* ══════════════════════════════════════
   ROOT OVERFLOW — prevents horizontal scroll
══════════════════════════════════════ */
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; width: 100%; touch-action: pan-y pinch-zoom; }

.app-layout  { display: flex; min-height: 100vh; max-width: 100%; overflow-x: hidden; overflow-x: clip; }

.main-content {
  margin-left: 252px; flex: 1; display: flex;
  flex-direction: column; min-height: 100vh;
  min-width: 0; max-width: 100%; overflow-x: hidden; overflow-x: clip;
}

.page-body {
  padding: 28px; flex: 1;
  min-width: 0; max-width: 100%;
  box-sizing: border-box; overflow-x: hidden;
}

.wallet-banner { width: 100%; box-sizing: border-box; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 24px; width: 100%;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 24px; width: 100%;
}

/* ══════════════════════════════════════
   PWA — SAFE AREAS
══════════════════════════════════════ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.page-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.sidebar   { padding-bottom: env(safe-area-inset-bottom); }

/* ══════════════════════════════════════
   BOTTOM NAV
══════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 150;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
}
.mobile-bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text2); text-decoration: none;
  font-size: 10px; font-weight: 600;
  padding: 6px 4px; transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.mobile-bottom-nav a svg { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; }
.mobile-bottom-nav a.active { color: var(--orange); }
.mobile-bottom-nav a.active svg { stroke: var(--orange); }

/* ══════════════════════════════════════
   SKELETON / ANIMATION
══════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg,var(--surface2) 25%,var(--border) 50%,var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.page-body { animation: pageIn .18s ease-out; }
@keyframes pageIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,107,0,.15);
  transform: scale(0); animation: rippleAnim .55s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* ══════════════════════════════════════
   TRANSACTION PAGE
══════════════════════════════════════ */
.tx-summary-strip {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 8px;
  margin-bottom: 20px; width: 100%; box-sizing: border-box;
}
.tx-summary-card { flex: 1; text-align: center; padding: 0 6px; min-width: 0; }
.tx-summary-val  {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 700; color: var(--orange);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-summary-lab  {
  font-size: 9px; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: .04em;
  margin-top: 3px; white-space: nowrap;
}
.tx-summary-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

.tx-tabs {
  display: flex; gap: 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
  margin-bottom: 18px; border-bottom: 2px solid var(--border); width: 100%;
}
.tx-tabs::-webkit-scrollbar { display: none; }
.tx-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--text2);
  text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .18s; flex-shrink: 0;
  border-radius: 6px 6px 0 0;
}
.tx-tab:hover  { color: var(--orange); }
.tx-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.tx-tab-count  { background: var(--orange); color: white; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 100px; }

.tx-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tx-header h3 { font-size: 15px; font-weight: 700; }
.tx-count { font-size: 12px; color: var(--text2); }
.tx-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.tx-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
  transition: box-shadow .18s, border-color .18s;
  width: 100%; box-sizing: border-box; overflow: hidden;
}
.tx-card:hover { border-color: var(--orange); box-shadow: 0 4px 16px var(--orange-glow); }

.tx-icon-wrap {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tx-body { flex: 1; min-width: 0; overflow: hidden; }
.tx-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px; overflow: hidden;
}
.tx-type-pill {
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 100px; flex-shrink: 0; white-space: nowrap;
}
.tx-meta {
  font-size: 11px; color: var(--text2);
  display: flex; align-items: center; gap: 4px;
  margin-top: 3px; overflow: hidden; white-space: nowrap;
}
.tx-dot { opacity: .35; }
.tx-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 4px;
  flex-shrink: 0; min-width: 72px;
}
.tx-amount { font-family: 'Space Grotesk',sans-serif; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tx-credit { color: var(--green); }
.tx-debit  { color: var(--text); }
.tx-bal    { font-size: 10px; color: var(--text2); }

.tx-pagination { display: flex; align-items: center; gap: 6px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.tx-page-btn {
  padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 600;
  text-decoration: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); transition: all .15s;
}
.tx-page-btn:hover  { border-color: var(--orange); color: var(--orange); }
.tx-page-btn.active { background: var(--orange); color: white; border-color: var(--orange); }
.tx-page-info { font-size: 11px; color: var(--text2); }

/* ══════════════════════════════════════
   MOBILE (max-width: 768px)
══════════════════════════════════════ */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: grid; }
  .sidebar           { display: none !important; }
  .main-content      { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
  .hamburger         { display: none; }
  .page-body {
    padding: 66px 14px calc(76px + env(safe-area-inset-bottom)) !important;
    width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: hidden;
  }
  /* position:fixed instead of sticky — sticky depends on every ancestor
     having 'visible' overflow, which is fragile (several containers here
     legitimately need overflow-x:hidden to stop horizontal scroll bleed).
     Fixed positioning has no such dependency — it always sticks to the
     viewport, full stop. page-body's top padding above is bumped from
     14px to 66px (52px topbar height + the original 14px) to make room. */
  .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    padding: 10px 14px; height: 52px; box-sizing: border-box;
  }
  .topbar-title { font-size: 15px; }
  .wallet-banner { padding: 20px 18px; border-radius: 18px; width: 100%; box-sizing: border-box; }
  .wallet-amount { font-size: 26px; }
  .wallet-actions { display: flex; flex-direction: row; gap: 8px; flex-wrap: wrap; }
  .wallet-btn { flex: 1; min-width: 110px; text-align: center; justify-content: center; font-size: 12px; padding: 9px 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; width: 100%; }
  .stat-card  { padding: 14px; border-radius: 14px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 10px; }
  .quick-actions { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; width: 100%; }
  .action-card  { padding: 14px 8px; border-radius: 14px; min-height: 0; }
  .action-icon  { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 7px; }
  .action-label { font-size: 11px; }
  .card        { border-radius: 14px; width: 100%; box-sizing: border-box; }
  .card-body   { padding: 14px; }
  .card-header { padding: 12px 14px; }
  .card-header h3 { font-size: 14px; }
  .btn      { justify-content: center; }
  .btn-auto { width: auto !important; }
  input, select, textarea { font-size: 16px !important; }
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal { border-radius: 20px 20px 0 0 !important; max-width: 100% !important; width: 100% !important; padding-bottom: env(safe-area-inset-bottom); }
  .plans-grid { grid-template-columns: repeat(2, 1fr); max-height: 260px; }
  .tabs, .tx-tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; }
  .tabs::-webkit-scrollbar, .tx-tabs::-webkit-scrollbar { display: none; }
  .tab, .tx-tab { flex-shrink: 0; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .auth-card  { padding: 28px 18px; }
  .tx-summary-val { font-size: 15px; }
  .tx-summary-lab { font-size: 9px; }
  .tx-summary-strip { padding: 14px 4px; }
  .tx-card    { padding: 12px; gap: 10px; }
  .tx-right   { min-width: 62px; }
  .tx-amount  { font-size: 13px; }
}

@media (max-width: 380px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr) !important; }
  .action-label  { font-size: 10px; }
  .wallet-amount { font-size: 22px; }
  .stat-value    { font-size: 17px; }
  .page-body     { padding: 12px 12px calc(76px + env(safe-area-inset-bottom)) !important; }
  .tx-summary-val { font-size: 13px; }
}
