/* ============================================================
   EarnSpark — Professional Design System
   Primary: #C0000C (deep red)  Accent: #E8000D
   Font: Inter (sharp, professional)
   Style: Clean, structured, NO glassmorphism
============================================================ */

:root {
  --red:        #fff;
  --red-dark:   #950009;
  --red-light:  #E8000D;
  --red-pale:   #1d1382;
  --red-border: #FFCDD2;
  --white:      #1D1382;
  --off-white:  #F8F9FA;
  --grey-50:    #F9FAFB;
  --grey-100:   #F3F4F6;
  --grey-200:   #E5E7EB;
  --grey-300:   #D1D5DB;
  --grey-400:   #9CA3AF;
  --grey-500:   #6B7280;
  --grey-600:   #4B5563;
  --grey-700:   #374151;
  --grey-800:   #1F2937;
  --grey-900:   #D4AF37;
  --black:      #0A0A0A;
  --success:    #16A34A;
  --success-bg: #F0FDF4;
  --danger:     #DC2626;
  --danger-bg:  #FEF2F2;
  --warning:    #D97706;
  --warning-bg: #FFFBEB;
  --info:       #2563EB;
  --info-bg:    #EFF6FF;
  --gold:       #D97706; 

  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.08);
  --shadow-red: 0 4px 16px rgba(192,0,12,.25);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--grey-50);
  color: var(--grey-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--grey-100); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--grey-900);
  letter-spacing: -0.02em;
}
.text-red     { color: var(--red) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-muted   { color: var(--grey-500) !important; }
.text-grey    { color: var(--grey-500) !important; }
.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }

/* ── NAVIGATION ─────────────────────────────────────────── */
.navbar {
  position: fixed; top:0; left:0; right:0; z-index:1000;
  background: var(--white);
  border-bottom: 2px solid var(--red);
  height: 64px;
}
.navbar-inner {
  max-width: 1280px; margin:0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; gap: 24px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.25rem;
  color: var(--grey-900); letter-spacing: -0.03em;
  flex-shrink: 0;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--red);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 900; font-size: 1rem;
}
.brand-name span { color: var(--red); }

.navbar-links {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-link {
  padding: 6px 14px;
  font-size: .875rem; font-weight: 500;
  color: var(--grey-600);
  border-radius: var(--radius-sm);
  transition: all .15s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background: var(--red-pale); color: var(--red);
}

.navbar-right {
  display: flex; align-items: center;
  gap: 10px; margin-left: auto; flex-shrink: 0;
}
.nav-notif {
  position: relative;
  width: 36px; height: 36px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-600); font-size: .95rem;
  transition: all .15s; cursor: pointer;
  background: var(--white);
}
.nav-notif:hover { border-color: var(--red); color: var(--red); }
.notif-dot {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px;
  background: var(--red); color: var(--white);
  font-size: 10px; font-weight: 700;
  border-radius: 100px; display: flex;
  align-items: center; justify-content: center;
  border: 2px solid var(--white); padding: 0 3px;
}

.nav-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s;
  position: relative; background: var(--white);
}
.nav-user:hover { border-color: var(--red); }
.nav-avatar {
  width: 28px; height: 28px;
  background: var(--red); color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-user-name { font-size: .82rem; font-weight: 600; color: var(--grey-700); }
.nav-user-badge {
  font-size: .68rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.badge-free { background: var(--grey-100); color: var(--grey-500); }
.badge-pro  { background: var(--red); color: var(--white); }

.nav-dropdown {
  display: none; position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 200px; background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
  z-index: 999;
}
.nav-user.open .nav-dropdown { display: block; }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; font-size: .875rem;
  color: var(--grey-700); transition: background .12s;
}
.nav-dropdown-item:hover { background: var(--grey-50); color: var(--red); }
.nav-dropdown-item.danger { color: var(--danger); }
.nav-dropdown-item.danger:hover { background: var(--danger-bg); }
.nav-dropdown-sep { height: 1px; background: var(--grey-100); margin: 4px 0; }

.nav-mobile-btn {
  display: none; width: 36px; height: 36px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--grey-600);
}
.mobile-menu {
  display: none; flex-direction: column;
  background: var(--white); border-bottom: 1px solid var(--grey-200);
  padding: 8px 16px 16px;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  padding: 11px 0; font-size: .9rem; font-weight: 500;
  color: var(--grey-700); border-bottom: 1px solid var(--grey-100);
  transition: color .15s;
}
.mobile-link:hover { color: var(--red); }
.mobile-link.red { color: var(--red); font-weight: 700; }
.mobile-link.danger { color: var(--danger); }

/* ── LAYOUT ─────────────────────────────────────────────── */
.page-wrap { padding-top: 64px; min-height: 100vh; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page-body { padding: 32px 0 60px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 7px;
  padding: 10px 22px; font-size: .875rem;
  font-weight: 600; border: none;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all .18s;
  white-space: nowrap; font-family: var(--font);
  letter-spacing: 0;
}
.btn-red {
  background: var(--red); color: var(--white);
  box-shadow: var(--shadow-red);
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-red-outline {
  background: var(--white); color: var(--red);
  border: 1.5px solid var(--red);
}
.btn-red-outline:hover { background: var(--red-pale); }
.btn-grey {
  background: var(--grey-100); color: var(--grey-700);
  border: 1.5px solid var(--grey-200);
}
.btn-grey:hover { background: var(--grey-200); }
.btn-success {
  background: var(--success); color: var(--white);
}
.btn-success:hover { background: #15803d; }
.btn-danger {
  background: var(--danger); color: var(--white);
}
.btn-danger:hover { background: #b91c1c; }
.btn-sm  { padding: 7px 14px; font-size: .8rem; }
.btn-lg  { padding: 13px 28px; font-size: .95rem; }
.btn-xl  { padding: 15px 36px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--grey-100);
  font-weight: 700; font-size: .95rem;
  color: var(--grey-800);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 20px 24px; }

/* Wallet Cards */
.wallet-card {
  border-radius: var(--radius-lg); padding: 22px 24px;
  border-left: 4px solid transparent;
  background: var(--white); box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-200);
}
.wallet-card.task     { border-left-color: var(--red); }
.wallet-card.referral { border-left-color: var(--info); }
.wallet-card.cashback { border-left-color: var(--success); }
.wallet-card.total    { border-left-color: var(--gold); background: var(--grey-900); }
.wallet-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--grey-500); margin-bottom: 8px; }
.wallet-amount { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.wallet-card.task .wallet-amount     { color: var(--red); }
.wallet-card.referral .wallet-amount { color: var(--info); }
.wallet-card.cashback .wallet-amount { color: var(--success); }
.wallet-card.total .wallet-amount    { color: #F59E0B; }
.wallet-card.total .wallet-label     { color: var(--grey-400); }
.wallet-sub { font-size: .78rem; color: var(--grey-400); margin-top: 4px; }
.wallet-card.total .wallet-sub { color: var(--grey-500); }

/* ── FORMS ──────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: .83rem;
  font-weight: 600; color: var(--grey-700);
  margin-bottom: 7px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--grey-800);
  transition: border-color .15s, box-shadow .15s;
  outline: none; font-family: var(--font);
}
.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,0,12,.1);
}
.form-control::placeholder { color: var(--grey-400); }
.form-control.error { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--grey-400);
  pointer-events: none; font-size: .9rem;
}
.input-wrap .form-control { padding-left: 38px; }
.form-hint { font-size: .75rem; color: var(--grey-400); margin-top: 5px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 5px; font-weight: 500; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 13px 16px; border-radius: var(--radius);
  font-size: .875rem; display: flex;
  align-items: flex-start; gap: 10px;
  margin-bottom: 20px; font-weight: 500;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); border: 1px solid #BBF7D0; color: #166534; }
.alert-danger   { background: var(--danger-bg);  border: 1px solid #FECACA; color: #991B1B; }
.alert-warning  { background: var(--warning-bg); border: 1px solid #FDE68A; color: #92400E; }
.alert-info     { background: var(--info-bg);    border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-red      { background: var(--red-pale);   border: 1px solid var(--red-border); color: var(--red-dark); }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 4px;
  font-size: .72rem; font-weight: 700; letter-spacing: .3px;
}
.badge-red     { background: var(--red-pale); color: var(--red); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg); color: var(--info); }
.badge-grey    { background: var(--grey-100); color: var(--grey-600); }
.badge-pro     { background: var(--red); color: var(--white); }

/* ── TABLES ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--grey-500);
  padding: 11px 16px; text-align: left;
  background: var(--grey-50);
  border-bottom: 1px solid var(--grey-200);
}
.data-table td {
  padding: 13px 16px; font-size: .875rem;
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle; color: var(--grey-700);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--grey-50); }
.credit { color: var(--success); font-weight: 700; }
.debit  { color: var(--danger);  font-weight: 700; }

/* ── PROGRESS ───────────────────────────────────────────── */
.progress-bar { background: var(--grey-200); border-radius: 100px; overflow: hidden; height: 7px; }
.progress-fill { height: 100%; border-radius: 100px; background: var(--red); transition: width .5s; }
.progress-fill.success { background: var(--success); }
.progress-fill.info    { background: var(--info); }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 2000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-bg.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius-xl);
  padding: 32px; max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalPop .2s ease;
}
@keyframes modalPop {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-close {
  float: right; background: none; border: none;
  font-size: 1.1rem; color: var(--grey-400);
  cursor: pointer; padding: 4px; margin-top: -4px;
  transition: color .15s;
}
.modal-close:hover { color: var(--danger); }
.modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.modal-subtitle { font-size: .85rem; color: var(--grey-500); margin-bottom: 24px; }

/* ── HERO (landing) ─────────────────────────────────────── */
.hero-section {
  background: var(--white); border-bottom: 1px solid var(--grey-200);
  padding: 80px 0 60px;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red-pale); color: var(--red);
  border: 1px solid var(--red-border);
  padding: 5px 14px; border-radius: 4px;
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero-tag-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800; color: var(--grey-900);
  letter-spacing: -0.03em; line-height: 1.15;
  margin-bottom: 18px;
}
.hero-title .red { color: var(--red); }
.hero-sub {
  font-size: 1rem; color: var(--grey-600);
  line-height: 1.7; max-width: 480px; margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 32px; padding-top: 28px; border-top: 1px solid var(--grey-200); }
.hero-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--red); letter-spacing: -0.03em; }
.hero-stat-lbl { font-size: .75rem; color: var(--grey-500); margin-top: 2px; }

.hero-img-col { position: relative; }
.hero-img-card {
  border-radius: var(--radius-xl);
  overflow: hidden; border: 2px solid var(--grey-200);
  box-shadow: var(--shadow-lg);
}
.hero-img-card img { width: 100%; height: 360px; object-fit: cover; }
.hero-float-card {
  position: absolute; bottom: -16px; left: -16px;
  background: var(--white); border: 1.5px solid var(--grey-200);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px;
}
.hero-float-icon {
  width: 40px; height: 40px; background: var(--red-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--red); font-size: 1.1rem;
}
.hero-float-val  { font-weight: 800; color: var(--red); font-size: 1rem; letter-spacing: -0.02em; }
.hero-float-lbl  { font-size: .72rem; color: var(--grey-400); }

/* ── FEATURES GRID ──────────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 20px; }
.feat-card {
  background: #fff; border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); padding: 24px 22px;
  transition: all .2s; cursor: default;
}
.feat-card:hover { border-color: var(--red-border); box-shadow: var(--shadow); transform: translateY(-2px); }
.feat-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--red-pale); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 16px;
  transition: all .2s;
}
.feat-card:hover .feat-icon { background: var(--red); color: var(--white); }
.feat-card h5 { font-size: .95rem; margin-bottom: 8px; }
.feat-card p  { font-size: .83rem; color: var(--grey-500); line-height: 1.6; }
.feat-pro-badge { font-size: .68rem; font-weight: 700; background: var(--red); color: var(--white); padding: 2px 7px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }

/* ── EARNING STRUCTURE ──────────────────────────────────── */
.earn-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; background: var(--white);
  border: 1px solid var(--grey-200); border-radius: var(--radius);
  margin-bottom: 10px; transition: border-color .15s;
}
.earn-row:hover { border-color: var(--red-border); }
.earn-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--red-pale); color: var(--red);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.earn-label { flex: 1; font-size: .875rem; font-weight: 500; color: var(--grey-700); }
.earn-amount { font-weight: 800; color: var(--red); font-size: .95rem; }

/* ── UPGRADE BANNER ─────────────────────────────────────── */
.upgrade-banner {
  background: var(--red); color: var(--white);
  border-radius: var(--radius-lg); padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.upgrade-banner h4 { color: var(--white); font-size: 1rem; margin-bottom: 4px; }
.upgrade-banner p  { font-size: .83rem; opacity: .85; }
.btn-white { background: var(--white); color: var(--red); font-weight: 700; }
.btn-white:hover { background: var(--grey-100); }

/* ── TASK CARDS ─────────────────────────────────────────── */
.task-card {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all .2s; box-shadow: var(--shadow-sm);
}
.task-card:hover { border-color: var(--red-border); box-shadow: var(--shadow); }
.task-card-body { padding: 18px 20px; }
.task-card-footer {
  padding: 13px 20px; background: var(--grey-50);
  border-top: 1px solid var(--grey-100);
  display: flex; align-items: center; justify-content: space-between;
}
.task-reward { font-weight: 800; color: var(--red); font-size: .95rem; letter-spacing: -0.02em; }

/* Click task row */
.click-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius); padding: 16px 18px;
  transition: all .2s; box-shadow: var(--shadow-sm);
}
.click-row:hover { border-color: var(--red-border); }
.click-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--red-pale); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}

/* Flip card */
.flip-scene { width: 150px; height: 150px; perspective: 800px; cursor: pointer; }
.flip-inner {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform .6s;
}
.flip-scene.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .9rem;
}
.flip-front {
  background: var(--red); color: var(--white);
  border: 3px solid var(--red-dark);
}
.flip-back  {
  background: var(--white); color: var(--grey-800);
  border: 3px solid var(--grey-200);
  transform: rotateY(180deg);
}
.flip-back.win   { border-color: var(--success); color: var(--success); }
.flip-back.jackpot { border-color: #D97706; color: #D97706; }

/* ── WITHDRAWAL PORTAL ──────────────────────────────────── */
.portal-card {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.portal-header {
  padding: 14px 20px; background: var(--grey-50);
  border-bottom: 1px solid var(--grey-200);
  display: flex; align-items: center; justify-content: space-between;
}
.portal-title { font-weight: 700; font-size: .95rem; color: var(--grey-800); display: flex; align-items: center; gap: 8px; }
.portal-body { padding: 20px; }
.portal-closed {
  background: var(--grey-50); border: 1px dashed var(--grey-300);
  border-radius: var(--radius); padding: 20px;
  text-align: center; color: var(--grey-400); font-size: .85rem;
}

/* ── FLASH TOAST ────────────────────────────────────────── */
.flash-toast {
  position: fixed; top: 76px; right: 20px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600;
  max-width: 360px; box-shadow: var(--shadow-lg);
  animation: slideToast .3s ease;
  transition: opacity .4s;
}
@keyframes slideToast { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.flash-success { background: var(--success-bg); border: 1.5px solid #BBF7D0; color: #166534; }
.flash-error   { background: var(--danger-bg);  border: 1.5px solid #FECACA; color: #991B1B; }
.flash-warning { background: var(--warning-bg); border: 1.5px solid #FDE68A; color: #92400E; }
.flash-info    { background: var(--info-bg);    border: 1.5px solid #BFDBFE; color: #1E40AF; }
.flash-close { background:none;border:none;cursor:pointer;margin-left:auto;opacity:.6;font-size:1rem; }

/* ── ADMIN ──────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-aside {
  width: 230px; flex-shrink: 0;
  background: var(--grey-900); position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 100;
  overflow-y: auto; display: flex; flex-direction: column;
}
.admin-brand {
  padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-brand-logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; color: var(--white); font-size: 1.05rem;
}
.admin-brand-logo .icon {
  width: 30px; height: 30px; background: var(--red);
  border-radius: 5px; display: flex; align-items: center;
  justify-content: center; color: var(--white); font-weight: 900; font-size: .85rem;
}
.admin-brand-logo span { color: var(--red); }
.admin-sub { font-size: .7rem; color: rgba(255,255,255,.3); margin-top: 4px; padding-left: 39px; }

.sidebar-section { padding: 16px 0 4px; }
.sidebar-section-label {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,.3);
  padding: 0 18px; margin-bottom: 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 18px; font-size: .845rem;
  color: rgba(255,255,255,.55); transition: all .15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.sidebar-link i { width: 16px; text-align: center; }
.sidebar-link:hover { color: var(--white); background: rgba(255,255,255,.05); }
.sidebar-link.active { color: var(--white); background: rgba(192,0,12,.25); border-left-color: var(--red); }
.sidebar-link .badge-count {
  margin-left: auto; background: var(--red); color: var(--white);
  font-size: .68rem; font-weight: 700; padding: 1px 6px;
  border-radius: 100px; min-width: 18px; text-align: center;
}
.sidebar-logout { margin-top: auto; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.08); }

.admin-main { flex: 1; margin-left: 230px; min-width: 0; }
.admin-topbar {
  background: var(--white); border-bottom: 1px solid var(--grey-200);
  padding: 0 28px; height: 58px; position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-page-title { font-weight: 700; font-size: 1rem; color: var(--grey-800); }
.admin-content { padding: 28px; }

.stat-card {
  background: var(--white); border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg); padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card-val { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-card-lbl { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--grey-500); margin-bottom: 8px; }
.stat-card-sub { font-size: .78rem; color: var(--grey-400); margin-top: 6px; }

/* ── SECTION HEADING ────────────────────────────────────── */
.section { padding: 64px 0; }
.section-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--red); margin-bottom: 10px; }
.section-title { font-size: clamp(1.6rem,3vw,2.4rem); margin-bottom: 12px; }
.section-sub { font-size: .95rem; color: #1d1382; max-width: 540px; line-height: 1.7; }

/* ── STEPS ──────────────────────────────────────────────── */
.steps-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 20px; }
.step-card { text-align: center; padding: 24px 16px; }
.step-num {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  background: var(--red); color: var(--white);
  font-size: 1.3rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step-card h5 { font-size: .95rem; margin-bottom: 8px; }
.step-card p  { font-size: .82rem; color: var(--grey-500); line-height: 1.6; }

/* ── CTA SECTION ────────────────────────────────────────── */
.cta-section {
  background: var(--red); padding: 60px 0;
}
.cta-section h2 { color: var(--white); }
.cta-section p  { color: rgba(255,255,255,.8); }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer { background: var(--grey-900); color: #fff; padding: 48px 0 24px; }
.footer-brand { font-size: .875rem; line-height: 1.7; margin-bottom: 24px; max-width: 260px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3,1fr); gap: 40px; margin-bottom: 40px; }
.footer-col h6 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.3); margin-bottom: 14px; }
.footer-col a { display: block; font-size: .83rem; margin-bottom: 9px; color: rgba(255,255,255,.45); transition: color .15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .78rem; }

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--grey-200); background: var(--white);
  color: var(--grey-600); font-size: .82rem; font-weight: 600;
  text-decoration: none; transition: all .15s;
}
.page-btn:hover, .page-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }

/* ── TOGGLE SWITCH ──────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative; width: 44px; height: 24px;
  display: inline-block; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--grey-300); border-radius: 100px;
  transition: background .25s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); left: 3px; top: 3px;
  transition: transform .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--red); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: .83rem; font-weight: 600; color: var(--grey-600); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.four-col  { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }

/* ── ADMIN DASHBOARD GRIDS ──────────────────────────────── */
.admin-charts-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.admin-tables-row  { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

/* ── USER DASHBOARD GRIDS ───────────────────────────────── */
.dash-wallets-3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.dash-wallets-4 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.dash-stats     { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.dash-actions   { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

@media (max-width: 1024px) {
  .four-col { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .two-col   { grid-template-columns: 1fr !important; gap: 32px !important; }
  /* wallet cards: 2 columns on mobile so they fit side by side */
  .three-col { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
  .four-col  { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .navbar-links { display: none; }
  .nav-mobile-btn { display: flex; }
  .navbar-right .btn { display: none; }
  .admin-aside { width: 0; overflow: hidden; }
  .admin-main  { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-img-card img { height: 240px; }
  .card { padding: 16px 14px; }
  .hero-section { padding: 48px 0 40px; }
  .section { padding: 44px 0; }
  /* upgrade page: stack benefits + payment vertically */
  .upgrade-grid { grid-template-columns: 1fr !important; }
  /* wallet card text sizing on mobile */
  .wallet-amount { font-size: 1.1rem !important; }
  .wallet-label  { font-size: .72rem !important; }
  .wallet-sub    { font-size: .68rem !important; }
  /* stat cards on mobile */
  .stat-card-val { font-size: 1.1rem !important; }
  /* page body padding */
  .page-body { padding-top: 20px !important; padding-bottom: 20px !important; }
  /* container padding tighter on small screens */
  .container { padding: 0 14px; }
  /* admin dashboard grids */
  .admin-charts-row { grid-template-columns: 1fr; gap: 16px; }
  .admin-tables-row { grid-template-columns: 1fr; gap: 16px; }
  /* user dashboard grids */
  .dash-wallets-3 { grid-template-columns: 1fr; gap: 10px; }
  .dash-wallets-4 { grid-template-columns: 1fr; gap: 10px; }
  .dash-stats     { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .dash-actions   { grid-template-columns: repeat(2,1fr); gap: 10px; }
}
@media (max-width: 480px) {
  /* on very small phones, wallet cards still 2-col but tighter */
  .three-col { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .four-col  { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .feat-grid { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: repeat(2,1fr); }
  .hero-cta  { flex-direction: column; }
  .wallet-amount { font-size: 1rem !important; }
  .card { padding: 14px 12px; }
  .container { padding: 0 10px; }
  /* user dashboard grids - tighter gap */
  .dash-wallets-3 { grid-template-columns: 1fr; gap: 10px; }
  .dash-wallets-4 { grid-template-columns: 1fr; gap: 10px; }
  .dash-stats     { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .dash-actions   { grid-template-columns: repeat(2,1fr); gap: 8px; }
}

/* ── UTILS ──────────────────────────────────────────────── */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }


/* ── UPGRADE PAGE RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
  .upgrade-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ── ADMIN MOBILE SIDEBAR ────────────────────────────────── */
.admin-hamburger {
  display: none;
  background: none;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  color: var(--grey-700); font-size: 1.1rem;
  cursor: pointer; transition: all .15s;
  flex-shrink: 0;
}
.admin-hamburger:hover { border-color: var(--red); color: var(--red); }

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

@media (max-width: 768px) {
  .admin-hamburger { display: flex; }
  .admin-aside {
    width: 230px !important;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto !important;
    z-index: 100;
  }
  .admin-aside.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .admin-main { margin-left: 0 !important; }
}
