/* ============================================================
   ATLAS TRADING — Global Stylesheet
   File: assets/css/atlas.css
   Primary: Navy Blue | Auto Light/Dark Theme
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  /* Brand (overridden by branding table via inline style on <html>) */
  --primary:        #1a3a6b;
  --primary-light:  #1e4d9b;
  --primary-glow:   #4da3ff;
  --accent:         #FF6D00;
  --accent-soft:    rgba(255,109,0,0.12);
  --success:        #22c55e;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #38bdf8;

  /* Typography */
  --font-display: 'JetBrains Mono', monospace;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --radius-sm:  3px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --radius-xl:  14px;

  /* Transitions */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --dur:        0.25s;
}

/* ── Light Theme ── */
:root, [data-theme="light"] {
  --bg:           #f0f4ff;
  --bg-card:      #ffffff;
  --bg-card2:     #f7f9ff;
  --bg-input:     #f0f4ff;
  --bg-nav:       #ffffff;
  --bg-sidebar:   #ffffff;
  --border:       rgba(26,58,107,0.12);
  --border-focus: rgba(26,58,107,0.4);
  --text:         #0d1526;
  --text-muted:   #5a6a85;
  --text-soft:    #8a9ab8;
  --shadow:       0 4px 24px rgba(26,58,107,0.08);
  --shadow-lg:    0 16px 48px rgba(26,58,107,0.14);
  --overlay:      rgba(255,255,255,0.85);
  --scrollbar-bg: #e8edf5;
  --scrollbar-thumb: #b0bfd4;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg:           #080e1a;
  --bg-card:      #0f1929;
  --bg-card2:     #111e30;
  --bg-input:     #0a1220;
  --bg-nav:       #0d1829;
  --bg-sidebar:   #0d1829;
  --border:       rgba(77,163,255,0.1);
  --border-focus: rgba(77,163,255,0.4);
  --text:         #e2eaf8;
  --text-muted:   #7a93b8;
  --text-soft:    #4a6080;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.6);
  --overlay:      rgba(8,14,26,0.9);
  --scrollbar-bg: #0f1929;
  --scrollbar-thumb: #1e3a5f;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-font-smoothing: antialiased;
  zoom: 0.95;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
p { color: var(--text-muted); }
a { color: var(--primary-glow); text-decoration: none; transition: color var(--dur); }
a:hover { color: var(--accent); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-body { padding: 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--dur) var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--dur);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(26,58,107,0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(26,58,107,0.45);
  color: #fff;
}
.btn-accent {
  background: linear-gradient(135deg, #ff8c42, var(--accent));
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,109,0,0.3);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-focus);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--bg-card2);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
}
.btn-ghost:hover { background: var(--bg-card2); color: var(--text); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--dur), box-shadow var(--dur);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(77,163,255,0.1);
}
.form-control::placeholder { color: var(--text-soft); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid   { border-color: var(--success); }
.invalid-feedback { font-size: 12px; color: var(--danger); margin-top: 5px; }
.valid-feedback   { font-size: 12px; color: var(--success); margin-top: 5px; }

.input-group { position: relative; }
.input-group .form-control { padding-left: 42px; }
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  font-size: 16px;
  pointer-events: none;
}
.input-group .input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 16px;
  transition: color var(--dur);
}
.input-group .input-toggle:hover { color: var(--text); }

select.form-control { appearance: none; cursor: pointer; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger);  }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info    { background: rgba(56,189,248,0.15); color: var(--info);    }
.badge-primary { background: rgba(77,163,255,0.15); color: var(--primary-glow); }

/* ── Ticker bar ── */
.ticker-bar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 100;
}
.ticker-track {
  display: flex;
  gap: 40px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
}
.ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse-dot 2s infinite; }
.ticker-symbol { color: var(--text); font-weight: 700; }
.ticker-price  { color: var(--text-muted); }
.ticker-change.up   { color: var(--success); }
.ticker-change.down { color: var(--danger);  }

@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(1.3)} }

/* ── Navbar ── */
.navbar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
}
.nav-brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-brand-text span { color: var(--primary-glow); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--dur);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  background: var(--bg-card2);
  color: var(--text);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ── Theme toggle ── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--dur);
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-focus); }

/* ── Hero section ── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 40px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(26,58,107,0.15) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 20% 80%, rgba(77,163,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(77,163,255,0.1);
  border: 1px solid rgba(77,163,255,0.2);
  border-radius: 100px;
  font-size: 13px;
  color: var(--primary-glow);
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s var(--ease) both;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s 0.1s var(--ease) both;
}
.hero h1 span { color: var(--primary-glow); }
.hero p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 36px;
  animation: fadeInUp 0.7s 0.2s var(--ease) both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s 0.3s var(--ease) both;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 56px;
  animation: fadeInUp 0.7s 0.4s var(--ease) both;
}
.hero-stat-label { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.8px; }
.hero-stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--text); }

/* ── Section ── */
.section { padding: 80px 40px; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-glow);
  margin-bottom: 12px;
}
.section-title { font-size: clamp(28px, 3vw, 42px); margin-bottom: 16px; }
.section-subtitle { font-size: 16px; color: var(--text-muted); max-width: 520px; }

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-glow));
  opacity: 0;
  transition: opacity var(--dur);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(77,163,255,0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary-glow);
  margin-bottom: 16px;
}
.feature-card h4 { font-size: 17px; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; }

/* ── Stats bar ── */
.stats-bar {
  background: var(--primary);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-item-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}
.stat-item-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ── Footer ── */
.footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 60px 40px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 14px; margin: 16px 0 24px; max-width: 280px; }
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: var(--text-muted); transition: color var(--dur); }
.footer-col ul li a:hover { color: var(--primary-glow); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-soft);
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideInToast 0.35s var(--ease) both;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.toast.success::before { background: var(--success); }
.toast.error::before   { background: var(--danger);  }
.toast.warning::before { background: var(--warning); }
.toast.info::before    { background: var(--info);    }
.toast-icon { font-size: 18px; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger);  }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--info);    }
.toast-title { font-weight: 700; font-size: 14px; color: var(--text); }
.toast-msg   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.toast-close {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1;
  padding: 2px;
  transition: color var(--dur);
}
.toast-close:hover { color: var(--text); }
.toast.hiding { animation: slideOutToast 0.3s var(--ease) both; }

/* ── Page loader ── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.4s, visibility 0.4s;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  animation: pulse-loader 1.5s ease-in-out infinite;
}
.loader-bar {
  width: 180px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-glow));
  border-radius: 2px;
  animation: loader-progress 1.6s var(--ease) forwards;
}

/* ── Bottom progress bar (page load) ── */
#nprogress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-glow));
  z-index: 9998;
  transition: width 0.3s var(--ease);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(77,163,255,0.5);
}

/* ── Auth Layout ── */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-panel {
  padding: 60px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel.left {
  background: linear-gradient(145deg, var(--primary) 0%, #0d1f3c 100%);
  position: relative;
  overflow: hidden;
}
.auth-panel.right {
  background: var(--bg);
  overflow-y: auto;
  max-height: 100vh;
}
.auth-panel.left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.auth-left-content { position: relative; z-index: 1; }
.auth-left-content h2 {
  font-size: 38px;
  color: #fff;
  margin: 24px 0 16px;
}
.auth-left-content p { color: rgba(255,255,255,0.65); font-size: 16px; }
.auth-left-features { margin-top: 48px; display: flex; flex-direction: column; gap: 18px; }
.auth-left-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.8);
  font-size: 15px;
}
.auth-left-feature i {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.auth-form-wrap { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-title { font-size: 28px; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: 15px; margin-bottom: 36px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.auth-tabs { display: flex; margin-bottom: 32px; border-bottom: 2px solid var(--border); }
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--dur);
}
.auth-tab.active { color: var(--primary-glow); border-bottom-color: var(--primary-glow); }
.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; animation: fadeInUp 0.35s var(--ease) both; }

/* Phone input combo */
.phone-group { display: flex; gap: 8px; }
.phone-code {
  width: 90px;
  flex-shrink: 0;
}

/* Country flag option */
.country-opt { display: flex; align-items: center; gap: 8px; }

/* ── Dashboard Layout ── */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width var(--dur) var(--ease);
  z-index: 150;
}
.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-nav { padding: 16px 10px; flex: 1; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 12px 12px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur);
  position: relative;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--bg-card2); color: var(--text); }
.sidebar-link.active {
  background: rgba(77,163,255,0.1);
  color: var(--primary-glow);
  font-weight: 600;
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--primary-glow);
  border-radius: 0 3px 3px 0;
}
.sidebar-link i { font-size: 17px; width: 20px; text-align: center; }
.sidebar-badge {
  margin-left: auto;
  background: var(--primary-glow);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}
.sidebar-badge.green { background: var(--success); }
.sidebar-footer {
  padding: 16px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur);
}
.sidebar-user:hover { background: var(--bg-card2); }
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-light), var(--primary-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.user-info-name { font-size: 14px; font-weight: 600; color: var(--text); }
.user-info-role { font-size: 12px; color: var(--text-soft); }

/* Dashboard main */
.dash-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dash-topbar {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-greeting { font-size: 15px; font-weight: 600; color: var(--text); }
.topbar-greeting span { color: var(--text-muted); font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: all var(--dur);
  position: relative;
  text-decoration: none;
}
.topbar-btn:hover { color: var(--text); border-color: var(--border-focus); }
.topbar-notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-nav);
}
.dash-content { padding: 28px; flex: 1; }

/* Balance Cards */
.balance-strip {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, #0a1530 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0;
}
.balance-strip::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.balance-strip::after {
  content: '';
  position: absolute;
  right: 60px; bottom: -80px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.balance-main { flex: 1; position: relative; z-index: 1; }
.balance-label { font-size: 12px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.balance-amount {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.balance-currency { font-size: 18px; margin-right: 4px; opacity: 0.7; }
.balance-divider {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.15);
  margin: 0 32px;
  flex-shrink: 0;
}
.balance-secondary { position: relative; z-index: 1; }
.balance-secondary .balance-amount { font-size: clamp(20px, 2vw, 28px); }
.balance-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}
.balance-change.up   { color: #4ade80; }
.balance-change.down { color: #f87171; }
.balance-actions { display: flex; gap: 10px; margin-left: 32px; position: relative; z-index: 1; }
.balance-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--dur);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.balance-btn.deposit { background: rgba(255,255,255,0.2); color: #fff; }
.balance-btn.deposit:hover { background: rgba(255,255,255,0.28); color: #fff; }
.balance-btn.withdraw { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.balance-btn.withdraw:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* Dashboard stats row */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: all var(--dur) var(--ease);
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dash-stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.dash-stat-icon.blue   { background: rgba(77,163,255,0.12);  color: var(--primary-glow); }
.dash-stat-icon.green  { background: rgba(34,197,94,0.12);   color: var(--success);      }
.dash-stat-icon.orange { background: rgba(255,109,0,0.12);   color: var(--accent);        }
.dash-stat-icon.purple { background: rgba(168,85,247,0.12);  color: #a855f7;              }
.dash-stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text); }
.dash-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dash-stat-trend { font-size: 12px; font-weight: 600; }
.dash-stat-trend.up   { color: var(--success); }
.dash-stat-trend.down { color: var(--danger);  }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0);    }
}
@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}
@keyframes slideInToast {
  from { opacity:0; transform:translateX(100%); }
  to   { opacity:1; transform:translateX(0);    }
}
@keyframes slideOutToast {
  from { opacity:1; transform:translateX(0);    }
  to   { opacity:0; transform:translateX(100%); }
}
@keyframes loader-progress {
  0%   { width:0;    }
  60%  { width:75%;  }
  100% { width:100%; }
}
@keyframes pulse-loader {
  0%,100% { opacity:1;   }
  50%      { opacity:0.4; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-card2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Stagger children ── */
.stagger > * { opacity: 0; transform: translateY(20px); }
.stagger.visible > *:nth-child(1) { animation: fadeInUp 0.5s 0.0s var(--ease) forwards; }
.stagger.visible > *:nth-child(2) { animation: fadeInUp 0.5s 0.1s var(--ease) forwards; }
.stagger.visible > *:nth-child(3) { animation: fadeInUp 0.5s 0.2s var(--ease) forwards; }
.stagger.visible > *:nth-child(4) { animation: fadeInUp 0.5s 0.3s var(--ease) forwards; }
.stagger.visible > *:nth-child(5) { animation: fadeInUp 0.5s 0.4s var(--ease) forwards; }
.stagger.visible > *:nth-child(6) { animation: fadeInUp 0.5s 0.5s var(--ease) forwards; }

/* ── Mobile ── */
.hamburger { display: none; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-panel.left { display: none; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 60px 20px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .section { padding: 60px 20px; }
  .stats-bar { padding: 32px 20px; }
  .footer { padding: 48px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    width: 260px;
    z-index: 200;
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  #sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 190;
    cursor: pointer;
  }
  #sidebar-overlay.open { display: block; }
  .dash-content { padding: 16px; }
  .balance-strip { flex-wrap: wrap; gap: 16px; }
  .balance-divider { display: none; }
  .balance-actions { margin-left: 0; width: 100%; }
  .dash-stats-row { grid-template-columns: 1fr 1fr; }
  .auth-panel { padding: 40px 24px; }
}