/* ============================================================
   SwiftPay — app.css
   Purple primary theme matching screenshots exactly.
   Mobile-first, responsive, dark mode support.
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:        #5b21b6;
  --primary-dark:   #4c1d95;
  --primary-light:  #7c3aed;
  --primary-bg:     #f5f3ff;
  --secondary:      #f97316;
  --secondary-dark: #ea580c;
  --success:        #16a34a;
  --warning:        #d97706;
  --danger:         #dc2626;
  --info:           #2563eb;

  --bg:             #f1f0f7;
  --surface:        #ffffff;
  --surface-2:      #f8f8fc;
  --border:         #e5e4ef;
  --border-light:   #f0effe;

  --text:           #1a1a2e;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;

  --sidebar-w:      260px;
  --header-h:       60px;
  --bottom-nav-h:   64px;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 2px 12px rgba(91,33,182,0.08);
  --shadow-md:      0 4px 24px rgba(91,33,182,0.12);
  --transition:     0.18s ease;
}

[data-theme="dark"] {
  --bg:           #0f0e1a;
  --surface:      #1a1829;
  --surface-2:    #221f33;
  --border:       #2e2b45;
  --border-light: #2a2740;
  --text:         #f0effe;
  --text-muted:   #a09ab8;
  --text-light:   #6b6480;
  --primary-bg:   #1e1a3a;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 0;
  overflow-y: auto;
  z-index: 100;
}

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 1.5rem 2rem 2rem;
  max-width: 1100px;
}

/* Mobile: hide sidebar, show header */
.mobile-header { display: none; }
.bottom-nav    { display: none; }
.mobile-drawer { display: none; }
.drawer-overlay { display: none; }

@media (max-width: 768px) {
  .sidebar      { display: none; }
  .mobile-header { display: flex; }
  .bottom-nav   { display: flex; }
  .main-content {
    margin-left: 0;
    padding: 1rem 1rem calc(var(--bottom-nav-h) + 1rem);
    margin-top: var(--header-h);
  }
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0 1.25rem;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.1rem; color: #fff;
}
.logo-text {
  font-size: 1.15rem;
  color: var(--text);
}
.logo-text strong { color: var(--primary); }

.sidebar-section { padding: 0.5rem 0; }
.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0.5rem 0.4rem;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-item:hover { background: var(--primary-bg); color: var(--primary); }
.nav-item.active {
  background: var(--primary);
  color: #fff;
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-user {
  margin-top: auto;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.user-info { flex: 1; min-width: 0; }
.user-info strong { display: block; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span   { font-size: 0.8rem; color: var(--primary); }
.sign-out-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.25rem;
  border-radius: 6px;
  transition: color var(--transition);
}
.sign-out-btn:hover { color: var(--danger); }

/* ── Mobile Header ───────────────────────────────────────────── */
.mobile-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 200;
}
.mobile-logo { font-size: 1.1rem; color: #fff; }
.mobile-logo strong { color: #fff; }
.mobile-header-actions { display: flex; gap: 0.5rem; }

/* ── Mobile Drawer ───────────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.drawer-overlay.open { opacity: 1; pointer-events: all; display: block; }

.mobile-drawer {
  position: fixed;
  top: 0; left: -var(--sidebar-w);
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  z-index: 400;
  padding: 1.5rem 1rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}
.mobile-drawer.open {
  display: flex;
  transform: translateX(0);
}
.drawer-logo {
  display: flex; align-items: center; gap: 0.6rem;
  padding-bottom: 1rem; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.drawer-user {
  margin-top: auto;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem; background: var(--surface-2); border-radius: var(--radius);
}

/* ── Bottom Navigation ──────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  padding: 0 0.5rem;
}
@media (max-width: 768px) { .bottom-nav { display: flex; } }

.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 0.4rem 1rem;
  color: var(--text-muted); font-size: 0.72rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-icon { font-size: 1.2rem; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { filter: brightness(1.1); }

.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }

.btn-outline {
  background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }

.btn-outline-white {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

.btn-white { background: #fff; color: var(--primary); }
.btn-whatsapp { background: #25d366; color: #fff; }

.btn-block  { width: 100%; }
.btn-sm     { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.btn-fund-wallet { width: 100%; margin-top: 1rem; }

.icon-btn {
  background: rgba(255,255,255,0.15);
  border: none; cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem; color: #fff;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.93rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,33,182,0.1);
}
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }
.form-control-sm { padding: 0.45rem 0.7rem; font-size: 0.85rem; }

textarea.form-control { resize: vertical; min-height: 80px; }

.input-with-btn {
  display: flex; gap: 0.5rem;
}
.input-with-btn .form-control { flex: 1; }

.form-row-between {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;
}

.pin-input { letter-spacing: 0.3em; font-size: 1.2rem; text-align: center; }

/* Toggle switch */
.toggle-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background var(--transition);
}
.slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}
.toggle-switch input:checked + .slider { background: var(--primary); }
.toggle-switch input:checked + .slider::before { transform: translateX(20px); }

/* Radio & checkbox */
.radio-group, .network-selector { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.radio-option, .network-option { cursor: pointer; }
.radio-option input, .network-option input { display: none; }

.network-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: 0.85rem; font-weight: 700;
  background: var(--surface-2);
  transition: all var(--transition);
}
.network-option input:checked + .network-badge {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
}
.network-badge.network-mtn    { border-color: #ffcc00; }
.network-badge.network-airtel { border-color: #e4003a; }
.network-badge.network-glo    { border-color: #007f00; }
.network-badge.network-9mobile{ border-color: #007b5e; }

/* Amount shortcuts */
.amount-shortcuts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.25rem; }
.amount-shortcut {
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.amount-shortcut:hover, .amount-shortcut.active {
  border-color: var(--primary); background: var(--primary-bg); color: var(--primary);
}

.checkbox-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; cursor: pointer; }

/* ── Cards & Sections ───────────────────────────────────────── */
.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.section-title {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 1rem;
}
.section-header-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
}

/* ── Wallet Card ─────────────────────────────────────────────── */
.wallet-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.wallet-name { font-size: 1rem; font-weight: 800; margin-bottom: 0.25rem; cursor: pointer; }
.wallet-balance-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 0.25rem; }
.wallet-balance { font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.balance-toggle { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-muted); padding: 0; }

/* ── Referral Banner ─────────────────────────────────────────── */
.referral-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  color: #fff;
}
.referral-banner-icon { font-size: 2rem; flex-shrink: 0; }
.referral-banner-text { flex: 1; }
.referral-banner-tag  { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; opacity: 0.85; }
.referral-banner-text strong { display: block; font-size: 0.95rem; font-style: italic; }
.referral-banner-sub  { font-size: 0.8rem; opacity: 0.85; margin-top: 0.1rem; }

/* ── Quick Actions & Service Grid ───────────────────────────── */
.quick-actions-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
}
.quick-action-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.85rem 0.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.quick-action-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.quick-action-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.25rem;
  margin: 0 auto 0.35rem;
}

.service-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
}
@media (max-width: 600px) {
  .quick-actions-grid, .service-grid { grid-template-columns: repeat(4, 1fr); }
}
.service-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.85rem 0.5rem;
  font-size: 0.75rem; font-weight: 600; text-align: center;
  color: var(--text);
  transition: transform var(--transition);
}
.service-item:hover { transform: translateY(-2px); }
.service-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.25rem;
  margin-bottom: 0.1rem;
}
.icon-blue   { background: #eff6ff; color: #1a73e8; }
.icon-orange { background: #fff7ed; color: #e8710a; }
.icon-muted  { background: var(--surface-2); color: var(--text-muted); }

/* ── Transactions ────────────────────────────────────────────── */
.tx-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
}
.tx-item:last-child { border-bottom: none; }
.tx-item-link { color: inherit; transition: background var(--transition); border-radius: var(--radius-sm); padding: 0.75rem 0.5rem; }
.tx-item-link:hover { background: var(--surface-2); }

.tx-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-bg);
  display: grid; place-items: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.tx-details { flex: 1; min-width: 0; }
.tx-desc { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 0.76rem; }
.tx-right, .tx-amount { font-size: 0.9rem; font-weight: 700; text-align: right; flex-shrink: 0; }
.tx-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; margin-top: 2px; }

.tx-amount-large { font-size: 2rem; font-weight: 800; margin: 0.5rem 0; }
.tx-icon-large { width: 60px; height: 60px; border-radius: 50%; background: var(--primary-bg); display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto; }
.tx-detail-header { text-align: center; padding: 1rem 0 0.5rem; }

/* ── Status Badges ──────────────────────────────────────────── */
.status-success { color: var(--success); }
.status-pending { color: var(--warning); }
.status-failed  { color: var(--danger); }
.status-reversed { color: var(--text-muted); }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase;
}
.status-badge.status-success  { background: #dcfce7; color: var(--success); }
.status-badge.status-pending  { background: #fef9c3; color: var(--warning); }
.status-badge.status-failed   { background: #fee2e2; color: var(--danger); }
.status-badge.status-reversed { background: var(--surface-2); color: var(--text-muted); }
.status-badge.status-active   { background: #dcfce7; color: var(--success); }
.status-badge.status-suspended { background: #fee2e2; color: var(--danger); }

.tier-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.tier-badge.tier-user     { background: var(--surface-2); color: var(--text-muted); }
.tier-badge.tier-silver   { background: #f1f5f9; color: #475569; }
.tier-badge.tier-gold     { background: #fef9c3; color: #92400e; }
.tier-badge.tier-platinum { background: #eff6ff; color: #1d4ed8; }

.type-badge { font-size: 0.78rem; font-weight: 600; color: var(--primary); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.alert-success { background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: var(--danger);  border: 1px solid #fecaca; }
.alert-warning { background: #fef9c3; color: var(--warning); border: 1px solid #fde68a; }
.alert-info    { background: #eff6ff; color: var(--info);    border: 1px solid #bfdbfe; }

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-body { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.auth-wrapper { width: 100%; max-width: 420px; padding: 1rem; }
.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.auth-logo  { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.25rem; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.88rem; color: var(--text-muted); }

/* ── Page Headers ───────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-title  { font-size: 1.5rem; font-weight: 800; }
.page-subtitle { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.25rem; }
.balance-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* ── Virtual Account Box ─────────────────────────────────────── */
.virtual-account-box {
  background: var(--primary-bg);
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.va-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.va-row:last-child { border-bottom: none; }
.va-row span { color: var(--text-muted); }
.btn-copy {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 0.8rem; font-weight: 600; margin-left: 0.5rem;
}

/* ── Meter info ─────────────────────────────────────────────── */
.meter-info-box {
  background: #dcfce7; border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  display: flex; flex-direction: column; gap: 2px;
}

/* ── Detail rows ─────────────────────────────────────────────── */
.detail-rows { display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  gap: 1rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: var(--text-muted); flex-shrink: 0; }
.detail-row strong, .detail-row code { text-align: right; }
code { font-family: monospace; font-size: 0.82rem; background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* ── Tables ─────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  text-align: left;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
@media (max-width: 768px) { .data-table { display: block; overflow-x: auto; } }

/* ── User cell ──────────────────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 0.6rem; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 0.82rem; font-weight: 700; flex-shrink: 0; }

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.stat-icon  { font-size: 1.8rem; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.35rem; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); }

/* ── Admin quick links ──────────────────────────────────────── */
.admin-quick-links { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 700px) { .admin-quick-links { grid-template-columns: repeat(2,1fr); } }
.admin-link-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.1rem;
  text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.admin-link-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.admin-link-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.admin-link-card strong { display: block; font-size: 0.9rem; margin-bottom: 0.1rem; }
.admin-link-card span { font-size: 0.76rem; color: var(--text-muted); }

/* ── Admin user grid ─────────────────────────────────────────── */
.admin-user-grid { display: grid; grid-template-columns: 1fr 380px; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .admin-user-grid { grid-template-columns: 1fr; } }

/* ── Referral page ──────────────────────────────────────────── */
.referral-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; border-radius: var(--radius);
  padding: 2rem; margin-bottom: 1.25rem;
}
.referral-hero h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.75rem; }
.text-yellow { color: #fde68a; }
.referral-hero p { opacity: 0.9; margin-bottom: 1.25rem; font-size: 0.92rem; }
.referral-code-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.referral-code-box {
  flex: 1; background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
}
.ref-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; opacity: 0.8; display: block; }
.referral-code-box strong { font-size: 1rem; letter-spacing: 0.06em; }

.referral-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 600px) { .referral-steps { grid-template-columns: 1fr; } }
.ref-step { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border-light); }
.ref-step-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.ref-step h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.ref-step p { font-size: 0.82rem; color: var(--text-muted); }

.share-link-box { display: flex; gap: 0.5rem; }
.share-buttons  { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Settings ───────────────────────────────────────────────── */
.settings-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.settings-tabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
  background: var(--surface); border-radius: var(--radius);
  padding: 0.4rem;
  box-shadow: var(--shadow);
}
.settings-tab {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.settings-tab:hover { color: var(--primary); background: var(--primary-bg); }
.settings-tab.active { background: var(--primary); color: #fff; }

.pricing-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.form-section-heading { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; color: var(--text-muted); margin: 1rem 0 0.75rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 0.5rem; align-items: center;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.filter-bar .form-control { width: auto; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 1rem; }
.page-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* ── Modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 600px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--text-muted);
}
.modal-box pre { background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.75rem; font-size: 0.8rem; overflow-x: auto; }
.modal-box h4 { margin: 0.75rem 0 0.35rem; font-size: 0.82rem; color: var(--text-muted); }

/* ── Announcement Modal ─────────────────────────────────────── */
.announcement-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.announcement-box {
  max-width: 440px; width: 100%;
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}
.announcement-info    { background: #eff6ff; border: 1px solid #bfdbfe; }
.announcement-success { background: #dcfce7; border: 1px solid #bbf7d0; }
.announcement-warning { background: #fef9c3; border: 1px solid #fde68a; }
.announcement-error   { background: #fee2e2; border: 1px solid #fecaca; }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  padding: 0.75rem 1.25rem;
  background: var(--text); color: #fff;
  border-radius: 999px;
  font-size: 0.88rem; font-weight: 600;
  white-space: nowrap;
  opacity: 0; transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ── Misc helpers ───────────────────────────────────────────── */
.text-green  { color: var(--success); }
.text-red    { color: var(--danger); }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.82rem; }
.text-warning{ color: var(--warning); }
.link-primary{ color: var(--primary); font-weight: 600; }
.link-muted  { color: var(--text-muted); font-size: 0.88rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-3  { margin-bottom: 0.75rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-icon  { font-size: 2.5rem; margin-bottom: 0.75rem; }

.back-btn { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.75rem; }
.back-btn:hover { color: var(--primary); }

.badge-count {
  display: inline-block; padding: 0.2rem 0.7rem;
  background: var(--primary-bg); color: var(--primary);
  border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  margin-left: 0.5rem;
}

.form-card { max-width: 520px; }

.mb-2 { margin-bottom: 0.5rem; }
.status-large { font-size: 0.9rem; margin-top: 0.25rem; display: inline-block; }

/* ── Lucide Icon Color Palette ────────────────────────────── */
.icon-c-blue   { background: #e8f0fe !important; color: #1a73e8 !important; }
.icon-c-teal   { background: #e6f4f1 !important; color: #0f9d8a !important; }
.icon-c-green  { background: #e6f4ea !important; color: #1e8c3a !important; }
.icon-c-orange { background: #fef3e8 !important; color: #e8710a !important; }
.icon-c-purple { background: #f0ebff !important; color: #7c3aed !important; }
.icon-c-red    { background: #fde8e8 !important; color: #d93025 !important; }
.icon-c-indigo { background: #eaecff !important; color: #3949ab !important; }
.icon-c-gray   { background: #f1f3f4 !important; color: #5f6368 !important; }

[data-theme="dark"] .icon-c-blue   { background: #1a2a4a !important; color: #6ba3f5 !important; }
[data-theme="dark"] .icon-c-teal   { background: #0f2a26 !important; color: #4dcfc0 !important; }
[data-theme="dark"] .icon-c-green  { background: #0f2a18 !important; color: #5db87a !important; }
[data-theme="dark"] .icon-c-orange { background: #2a1a0a !important; color: #f5a623 !important; }
[data-theme="dark"] .icon-c-purple { background: #1e1040 !important; color: #a78bfa !important; }
[data-theme="dark"] .icon-c-red    { background: #2a0f0f !important; color: #f28b82 !important; }
[data-theme="dark"] .icon-c-indigo { background: #111530 !important; color: #8c9eff !important; }
[data-theme="dark"] .icon-c-gray   { background: #2a2a2a !important; color: #9aa0a6 !important; }

/* ── Lucide SVG inherits color from parent container ─────── */
.service-icon svg, .quick-action-icon svg,
.nav-icon svg, .bottom-nav-icon svg,
.stat-icon svg, .admin-link-icon svg,
.tx-icon svg, .ref-step-icon svg,
.empty-icon svg, .logo-icon svg,
.referral-banner-icon svg {
  width: 1.25em; height: 1.25em;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  display: block;
}
.logo-icon svg { width: 1.1em; height: 1.1em; }
.empty-icon svg { width: 2.5rem; height: 2.5rem; }
.ref-step-icon svg { width: 1.5rem; height: 1.5rem; }

/* ── Icon btn SVG sizing ─────────────────────────────────── */
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; display: block; }
