/* ================================================================
   SwiftCash — Main Stylesheet
   Poppins font | Green fintech | CSS variables | Dark mode
   ================================================================ */

/* ── VARIABLES ─────────────────────────────────────────────────── */
:root {
  /* Primary palette */
  --green-50:  #ECFDF5;
  --green-100: #D1FAE5;
  --green-200: #A7F3D0;
  --green-300: #6EE7B7;
  --green-400: #34D399;
  --green-500: #10B981;
  --green-600: #059669;
  --green-700: #047857;
  --green-800: #065F46;
  --green-900: #064E3B;

  /* Neutral */
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic */
  --red-500:    #EF4444;
  --red-100:    #FEE2E2;
  --amber-500:  #F59E0B;
  --amber-100:  #FEF3C7;
  --blue-500:   #3B82F6;
  --blue-100:   #DBEAFE;

  /* Theme tokens (light) */
  --bg-body:       #F9FAFB;
  --bg-surface:    #FFFFFF;
  --bg-surface-2:  #F3F4F6;
  --bg-sidebar:    #FFFFFF;
  --border:        #E5E7EB;
  --text-primary:  #111827;
  --text-secondary:#4B5563;
  --text-muted:    #9CA3AF;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.12);

  /* Brand */
  --primary:       var(--green-500);
  --primary-dark:  var(--green-600);
  --primary-light: var(--green-50);

  /* Layout */
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
}

[data-theme="dark"] {
  --bg-body:       #0F172A;
  --bg-surface:    #1E293B;
  --bg-surface-2:  #253348;
  --bg-sidebar:    #1E293B;
  --border:        #334155;
  --text-primary:  #F1F5F9;
  --text-secondary:#94A3B8;
  --text-muted:    #475569;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.3);
  --shadow-md:     0 4px 16px rgba(0,0,0,.3);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.4);
  --primary-light: #0C2D24;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-body);
  transition: background .25s ease, color .25s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img, svg { display: block; max-width: 100%; }

input, select, textarea, button { font-family: inherit; }

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin .25s ease;
}

.content-area {
  padding: 24px 28px;
  flex: 1;
}

/* ── SIDEBAR ────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s ease, box-shadow .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; font-weight: 700;
  flex-shrink: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

.sidebar-close { display: none; background: none; border: none; cursor: pointer; color: var(--text-muted); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all .18s ease;
  cursor: pointer;
  position: relative;
}

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-card { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name  { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logout-btn { color: var(--text-muted); padding: 6px; border-radius: 8px; transition: all .18s; }
.logout-btn:hover { color: var(--red-500); background: var(--red-100); }
.logout-btn svg { width: 17px; height: 17px; }

/* ── TOPBAR ─────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}

.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 6px; border-radius: 8px; }
.menu-toggle:hover { background: var(--bg-surface-2); }
.menu-toggle svg { width: 20px; height: 20px; }

.topbar-title {
  font-size: 16px; font-weight: 600;
  color: var(--text-primary); flex: 1;
}

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

.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; transition: all .18s; }
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle svg { width: 16px; height: 16px; }

.kyc-badge { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.kyc-badge svg { width: 13px; height: 13px; }

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-sm { padding: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Stat cards */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 var(--radius-lg) 0 80px;
  opacity: .06;
}

.stat-card.green::after  { background: var(--green-500); }
.stat-card.blue::after   { background: var(--blue-500); }
.stat-card.amber::after  { background: var(--amber-500); }
.stat-card.red::after    { background: var(--red-500); }

.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.green { background: var(--green-50); color: var(--green-600); }
.stat-icon.blue  { background: var(--blue-100); color: var(--blue-500); }
.stat-icon.amber { background: var(--amber-100); color: var(--amber-500); }
.stat-icon.red   { background: var(--red-100); color: var(--red-500); }

[data-theme="dark"] .stat-icon.green { background: #0c2d24; }
[data-theme="dark"] .stat-icon.blue  { background: #1e3a5f; }
[data-theme="dark"] .stat-icon.amber { background: #2d2500; }
[data-theme="dark"] .stat-icon.red   { background: #2d1515; }

.stat-value { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }
.stat-change { font-size: 11px; font-weight: 600; margin-top: 8px; }
.stat-change.up   { color: var(--green-600); }
.stat-change.down { color: var(--red-500); }

/* ── GRID LAYOUTS ───────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────── */
.page-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 28px; }

h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .18s ease; white-space: nowrap; text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--green-600), var(--green-700)); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16,185,129,.4); color:#fff; }

.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.btn-ghost { background: var(--bg-surface-2); color: var(--text-secondary); }
.btn-ghost:hover { background: var(--border); }

.btn-danger { background: var(--red-500); color: #fff; }
.btn-danger:hover { background: #DC2626; }

.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── FORMS ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.form-label .req { color: var(--red-500); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit; font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.form-control::placeholder { color: var(--text-muted); }

.form-control-icon { position: relative; }
.form-control-icon .form-control { padding-left: 42px; }
.form-control-icon .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 17px; height: 17px; pointer-events: none; }

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

.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red-500); margin-top: 5px; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.input-group .input-group-text { padding: 10px 14px; background: var(--bg-surface-2); border: 1.5px solid var(--border); border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); font-size: 13px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--gray-300); border-radius: 12px; cursor: pointer; transition: .25s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
input:checked + .toggle-slider { background: var(--green-500); }
input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── TABLES ─────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); padding: 10px 16px; background: var(--bg-surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-primary); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-surface-2); }

/* ── BADGES ─────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge-green  { background: var(--green-50);  color: var(--green-700); }
.badge-yellow { background: var(--amber-100); color: #92400E; }
.badge-red    { background: var(--red-100);   color: #991B1B; }
.badge-blue   { background: var(--blue-100);  color: #1D4ED8; }
.badge-gray   { background: var(--gray-100);  color: var(--gray-600); }
.badge-orange { background: #FEF3C7;          color: #B45309; }

[data-theme="dark"] .badge-green  { background: #0c2d24; color: var(--green-400); }
[data-theme="dark"] .badge-yellow { background: #2d2500; color: #FCD34D; }
[data-theme="dark"] .badge-red    { background: #2d1515; color: #FCA5A5; }
[data-theme="dark"] .badge-blue   { background: #1e3a5f; color: #93C5FD; }
[data-theme="dark"] .badge-gray   { background: var(--bg-surface-2); color: var(--text-muted); }

/* ── FLASH MESSAGES ─────────────────────────────────────────────── */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; margin: 0;
  font-size: 13.5px; font-weight: 500;
  border-bottom: 1px solid transparent;
}
.flash svg { width: 17px; height: 17px; flex-shrink: 0; }
.flash span { flex: 1; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; color: inherit; opacity: .6; }
.flash-success { background: var(--green-50); color: var(--green-800); border-color: var(--green-200); }
.flash-error   { background: var(--red-100);  color: #7F1D1D; border-color: #FECACA; }
.flash-info    { background: var(--blue-100); color: #1e3a5f; border-color: #BFDBFE; }
.flash-warning { background: var(--amber-100);color: #78350F; border-color: #FCD34D; }

/* ── RATE COMPARISON ────────────────────────────────────────────── */
.rate-compare-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.rate-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rate-row:last-child { border-bottom: none; }
.rate-source { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rate-source-dot { width: 8px; height: 8px; border-radius: 50%; }
.rate-value { font-size: 14px; font-weight: 600; }
.rate-best { color: var(--green-600); }
.rate-badge-best { background: var(--green-50); color: var(--green-700); padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* Fee breakdown */
.fee-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.fee-row.total { font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }
.fee-row .label { color: var(--text-muted); }
.fee-row .value { color: var(--text-primary); }
.fee-row.total .value { color: var(--green-600); }

/* ── WALLET CARDS ───────────────────────────────────────────────── */
.wallet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all .2s ease;
  cursor: pointer;
}
.wallet-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(16,185,129,.12); transform: translateY(-2px); }

.wallet-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.wallet-balance { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.wallet-asset { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.wallet-usd { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.wallet-btc  { background: #FEF3C7; }
.wallet-eth  { background: #DBEAFE; }
.wallet-usdt { background: var(--green-50); }
.wallet-usd  { background: var(--green-50); }
.wallet-ngn  { background: #FEF3C7; }
.wallet-ghs  { background: var(--red-100); }

[data-theme="dark"] .wallet-btc  { background: #2d2500; }
[data-theme="dark"] .wallet-eth  { background: #1e3a5f; }
[data-theme="dark"] .wallet-usdt { background: #0c2d24; }

/* ── TABS ───────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--bg-surface-2); padding: 5px; border-radius: var(--radius-md); margin-bottom: 24px; }
.tab { padding: 8px 20px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; cursor: pointer; border: none; background: none; color: var(--text-muted); transition: all .18s; }
.tab.active { background: var(--bg-surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ── PROGRESS ───────────────────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--bg-surface-2); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green-400), var(--green-600)); border-radius: 3px; transition: width .5s ease; }

/* ── MODALS ─────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--bg-surface); border-radius: var(--radius-xl); padding: 28px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; }

/* ── KYC STATUS BANNER ──────────────────────────────────────────── */
.kyc-banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius-lg); margin-bottom: 24px; border: 1.5px solid; }
.kyc-banner.none { background: var(--amber-100); border-color: #FCD34D; color: #78350F; }
.kyc-banner.pending { background: var(--blue-100); border-color: #93C5FD; color: #1D4ED8; }
.kyc-banner.approved { background: var(--green-50); border-color: var(--green-300); color: var(--green-800); }
.kyc-banner.rejected { background: var(--red-100); border-color: #FECACA; color: #7F1D1D; }
.kyc-banner svg { width: 22px; height: 22px; flex-shrink: 0; }
.kyc-banner-title { font-weight: 600; font-size: 14px; }
.kyc-banner-text { font-size: 12.5px; margin-top: 1px; }

/* ── LOADING ────────────────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.8); z-index: 999; display: flex; align-items: center; justify-content: center; }
[data-theme="dark"] .loading-overlay { background: rgba(15,23,42,.8); }
.loading-box { text-align: center; }
.loading-box .spinner { width: 40px; height: 40px; border-width: 4px; margin: 0 auto 12px; }

/* ── ADDRESS DISPLAY ────────────────────────────────────────────── */
.address-box { background: var(--bg-surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-family: 'Courier New', monospace; font-size: 12px; color: var(--text-secondary); word-break: break-all; }
.address-box .copy-btn { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 4px; transition: color .18s; }
.address-box .copy-btn:hover { color: var(--primary); }
.copy-btn svg { width: 15px; height: 15px; }

/* ── NETWORK TABS ───────────────────────────────────────────────── */
.network-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.network-pill { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); color: var(--text-muted); background: var(--bg-surface); transition: all .18s; }
.network-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.network-pill:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ── TRANSACTION LIST ───────────────────────────────────────────── */
.tx-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.tx-item:last-child { border-bottom: none; }
.tx-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tx-icon svg { width: 18px; height: 18px; }
.tx-icon.sell { background: var(--red-100); color: var(--red-500); }
.tx-icon.buy  { background: var(--green-50); color: var(--green-600); }
.tx-icon.bill { background: var(--amber-100); color: var(--amber-500); }
.tx-icon.inv  { background: var(--blue-100); color: var(--blue-500); }
.tx-info { flex: 1; min-width: 0; }
.tx-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.tx-meta  { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.tx-amount { text-align: right; }
.tx-amount .value { font-size: 14px; font-weight: 700; }
.tx-amount .value.credit { color: var(--green-600); }
.tx-amount .value.debit  { color: var(--red-500); }
.tx-amount .date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── TICKET ─────────────────────────────────────────────────────── */
.chat-bubble { padding: 12px 16px; border-radius: 12px; max-width: 80%; font-size: 13.5px; margin-bottom: 12px; }
.chat-bubble.user  { background: var(--primary-light); color: var(--text-primary); margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.admin { background: var(--bg-surface-2); color: var(--text-primary); margin-right: auto; border-bottom-left-radius: 4px; }
.chat-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── QR CODE ────────────────────────────────────────────────────── */
.qr-wrap { text-align: center; padding: 16px; }
.qr-wrap img { border-radius: 8px; border: 4px solid #fff; box-shadow: var(--shadow-md); margin: 0 auto; }
.qr-label { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ── LANDING PAGE ───────────────────────────────────────────────── */
.landing-body { margin: 0; background: #FFFFFF; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 60px; border-bottom: 1px solid var(--gray-100); position: sticky; top: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); z-index: 100; }
.landing-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: #111827; }
.landing-nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.landing-nav-links a { font-size: 14px; font-weight: 500; color: var(--gray-600); }
.landing-nav-links a:hover { color: var(--green-600); }

.hero { padding: 90px 60px 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; max-width: 1200px; margin: 0 auto; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; background: var(--green-50); color: var(--green-700); font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 20px; margin-bottom: 20px; }
.hero h1 { font-size: 48px; line-height: 1.15; color: #111827; margin-bottom: 20px; font-weight: 800; }
.hero h1 span { color: var(--green-500); }
.hero-sub { font-size: 16px; color: var(--gray-600); line-height: 1.7; margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 14px; }

.hero-card { background: #FFFFFF; border: 1px solid var(--gray-200); border-radius: 20px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.1); }
.hero-rate-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.hero-rate-row:last-child { border-bottom: none; }

.features { background: var(--gray-50); padding: 80px 60px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; }
.feature-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 16px; padding: 28px; }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--green-50); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-icon svg { width: 26px; height: 26px; color: var(--green-600); }
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: #111827; }
.feature-desc { font-size: 13.5px; color: var(--gray-600); line-height: 1.6; }

.trust-strip { background: var(--green-600); padding: 32px 60px; }
.trust-items { display: flex; justify-content: center; gap: 60px; }
.trust-item { text-align: center; color: #fff; }
.trust-number { font-size: 30px; font-weight: 800; }
.trust-label  { font-size: 13px; opacity: .8; }

.how-section { padding: 80px 60px; max-width: 1000px; margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.step { text-align: center; }
.step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--green-500); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.step-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--gray-500); }

.cta-section { padding: 80px 60px; background: linear-gradient(135deg, var(--green-700), var(--green-900)); text-align: center; }
.cta-section h2 { font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.cta-section p { font-size: 15px; color: rgba(255,255,255,.75); margin-bottom: 32px; }
.btn-white { background: #fff; color: var(--green-700); font-weight: 700; }
.btn-white:hover { background: var(--green-50); color: var(--green-800); }

.landing-footer { background: #111827; color: var(--gray-400); padding: 40px 60px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; }

/* ── AUTH PAGES ─────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; background: var(--gray-50); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 20px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.08); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .brand-icon { margin: 0 auto 10px; }
.auth-logo h1 { font-size: 22px; font-weight: 800; }
.auth-logo p { font-size: 13.5px; color: var(--gray-500); margin-top: 4px; }
.auth-divider { text-align: center; color: var(--gray-400); font-size: 12px; margin: 20px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--gray-200); }
.auth-divider span { background: #fff; padding: 0 12px; position: relative; }

/* ── OVERLAY for sidebar mobile ─────────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-1-2, .grid-2-1 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay.active { display: block; }
  .sidebar-close { display: flex; margin-left: auto; }
  .main-wrapper { margin-left: 0; }
  .menu-toggle { display: flex; }
  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 60px 24px; }
  .hero h1 { font-size: 32px; }
  .hero-ctas { flex-direction: column; }
  .landing-nav { padding: 14px 24px; }
  .features { padding: 60px 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .trust-items { gap: 30px; flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cta-section { padding: 60px 24px; }
  .landing-footer { flex-direction: column; gap: 16px; text-align: center; }
  .how-section { padding: 60px 24px; }
  .trust-strip { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .auth-card { padding: 24px; }
  .modal { padding: 20px; }
}

/* ── ANIMATIONS ─────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .4s ease both; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.pulse { animation: pulse 1.5s ease infinite; }

/* ── SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── MISC UTILS ─────────────────────────────────────────────────── */
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--green-600); }
.text-danger { color: var(--red-500); }
.font-mono { font-family: 'Courier New', monospace; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-0 { padding: 0; }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 14px; opacity: .4; }
.empty-state p { font-size: 14px; }

/* ─── Additional UI Components ─────────────────────────────────────── */

/* Balance strip */
.balance-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.balance-chip { display: flex; flex-direction: column; }
.balance-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.balance-val { font-size: 1rem; font-weight: 600; color: var(--primary); }

/* Quick amount buttons */
.quick-amounts { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.quick-amt-btn { padding: .25rem .65rem; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: .8rem; transition: all .2s; font-family: inherit; }
.quick-amt-btn:hover, .quick-amt-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Input prefix group */
.input-prefix-group { display: flex; }
.input-prefix { display: flex; align-items: center; padding: 0 .75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-right: none; border-radius: 8px 0 0 8px; font-weight: 600; color: var(--text-muted); }
.input-prefix-group .form-input { border-radius: 0 8px 8px 0; }

/* KYC doc rows */
.kyc-doc-row { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; }
.kyc-doc-icon { font-size: 1.4rem; width: 2rem; text-align: center; flex-shrink: 0; margin-top: .1rem; }
.kyc-doc-info { flex: 1; }
.kyc-doc-label { font-weight: 600; font-size: .9rem; }
.kyc-doc-desc { font-size: .8rem; color: var(--text-muted); }
.kyc-doc-status { flex-shrink: 0; }
.kyc-comment { margin-top: .35rem; font-size: .8rem; color: #EF4444; background: #EF444410; padding: .3rem .6rem; border-radius: 6px; }

/* Info list */
/* .info-list {} */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.info-row:last-child { border: none; }
.info-row span { color: var(--text-muted); }

/* Ticket list */
.ticket-list { display: flex; flex-direction: column; gap: .5rem; }
.ticket-list-item { display: flex; align-items: center; gap: 1rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; text-decoration: none; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.ticket-list-item:hover { border-color: var(--primary); box-shadow: 0 2px 12px var(--primary-glow); }
.ticket-item-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.ticket-icon-open    { background: #10B98120; }
.ticket-icon-pending { background: #F59E0B20; }
.ticket-icon-closed  { background: var(--bg-secondary); }
.ticket-item-body { flex: 1; }
.ticket-item-subject { font-weight: 500; }
.ticket-item-meta { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }

/* Ticket view */
.ticket-view-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ticket-view-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
.ticket-chat { padding: 1.5rem; max-height: 500px; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; background: var(--bg-secondary); }
.chat-bubble { max-width: 75%; }
.bubble-user  { align-self: flex-end; }
.bubble-admin { align-self: flex-start; }
.bubble-meta { display: flex; gap: .75rem; align-items: center; margin-bottom: .35rem; font-size: .75rem; color: var(--text-muted); }
.bubble-user .bubble-meta  { flex-direction: row-reverse; }
.bubble-text { padding: .75rem 1rem; border-radius: 12px; font-size: .9rem; line-height: 1.6; }
.bubble-user  .bubble-text { background: var(--primary); color: #fff; border-radius: 12px 12px 0 12px; }
.bubble-admin .bubble-text { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px 12px 12px 0; }
.reply-form { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
.reply-input-row { display: flex; gap: .75rem; align-items: flex-end; }
.reply-input-row .form-input { flex: 1; }
.ticket-closed-notice { padding: 1.25rem 1.5rem; text-align: center; font-size: .85rem; color: var(--text-muted); background: var(--bg-secondary); }

/* Share link card */
.share-link-card { background: #10B98115; border: 1px solid #10B98150; border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.share-link-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-weight: 500; }
.share-icon { font-size: 1.2rem; }

/* KYC queue row */
.kyc-queue-row { display: flex; align-items: center; justify-content: space-between; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.kyc-queue-row:last-child { border: none; }

/* Settings toggles */
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; gap: 1rem; }
.toggle-label { font-weight: 500; font-size: .9rem; }
.toggle-desc  { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }
.toggle-btn { position: relative; width: 44px; height: 24px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border); cursor: pointer; transition: background .2s; flex-shrink: 0; }
.toggle-btn.active { background: var(--primary); border-color: var(--primary); }
.toggle-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.toggle-btn.active .toggle-knob { transform: translateX(20px); }

/* Checkbox row */
.checkbox-row { display: flex; align-items: center; gap: .65rem; padding: .4rem 0; cursor: pointer; font-size: .9rem; }
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }

/* API key rows */
.api-key-row { display: flex; align-items: center; justify-content: space-between; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.api-key-row:last-child { border: none; }

/* Rate ref */
.rate-ref-item { font-size: .9rem; color: var(--text-muted); }
.rate-preview { font-size: .85rem; color: var(--text-muted); }

/* Pagination */
.pagination { display: flex; gap: .4rem; padding: 1rem; flex-wrap: wrap; }
.page-link { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 6px; font-size: .82rem; text-decoration: none; color: var(--text-muted); transition: all .2s; }
.page-link:hover, .page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Filters bar */
.filters-bar { margin-bottom: 1rem; }

/* Stat alert */
.stat-card.stat-alert { border-color: #F59E0B80; }
.stat-action { font-size: .8rem; color: var(--primary); text-decoration: none; margin-top: .25rem; display: inline-block; }

/* Fiat wallet info */
.fiat-wallet-info { padding: .75rem; background: var(--bg-secondary); border-radius: 8px; font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }

/* Text colors */
.text-warning { color: #F59E0B; }
.text-success  { color: #10B981; }
.text-danger   { color: #EF4444; }

/* Btn variants */
.btn-success { background: #10B981; color: #fff; border-color: #10B981; }
.btn-success:hover { background: #059669; }
.btn-danger  { background: #EF4444; color: #fff; border-color: #EF4444; }
.btn-danger:hover  { background: #DC2626; }
.btn-warning { background: #F59E0B; color: #fff; border-color: #F59E0B; }
.btn-xs { padding: .2rem .5rem; font-size: .75rem; border-radius: 5px; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }

/* Alert variants */
.alert-warning { background: #F59E0B15; border-color: #F59E0B50; color: #FCD34D; }

/* Address code display */
.address-code { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: .78rem; word-break: break-all; color: var(--text-muted); flex: 1; }
.address-copy-row { display: flex; align-items: center; gap: .75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .9rem; }

/* Address warning */
.address-warning { font-size: .78rem; color: #F59E0B; margin-top: .5rem; }

/* QR placeholder */
.qr-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; border: 2px dashed var(--border); border-radius: 10px; padding: 1.25rem; cursor: pointer; transition: border-color .2s; margin-top: .75rem; }
.qr-placeholder:hover { border-color: var(--primary); }
.qr-icon { font-size: 2rem; }
.qr-placeholder span { font-size: .8rem; color: var(--text-muted); }

/* Network panel */
.network-panel { display: none; padding-top: 1rem; }
.network-panel.active { display: block; }
.wallet-balance-row { font-size: .85rem; color: var(--text-muted); margin-top: .75rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p  { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }

/* mt-1 utility */
.mt-1 { margin-top: .5rem; }
