/* ==========================================================================
   CryptoSika — Institutional Luxury & Sapphire Theme
   Refined Fintech UX/UI — Midnight Sapphire • Electric Indigo • Champagne Gold
   ========================================================================== */

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

/* ============================================================
   INSTITUTIONAL PALETTE TOKENS
   ============================================================ */
:root {
  /* Typography */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* ---- Deep Midnight Sapphire Backgrounds ---- */
  --bg-void:      #020617;
  --bg-deep:      #070d1e;
  --bg-surface:   #0f172a;
  --bg-elevated:  #1e293b;
  --bg-overlay:   #334155;

  /* Glass Layers */
  --glass-1: rgba(15, 23, 42, 0.75);
  --glass-2: rgba(30, 41, 59, 0.85);
  --glass-hover: rgba(51, 65, 85, 0.9);
  --glass-input: rgba(2, 6, 23, 0.8);

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong:  rgba(255, 255, 255, 0.2);

  /* Primary Accent: Sapphire & Indigo */
  --sapphire-300: #7dd3fc;
  --sapphire-400: #38bdf8;
  --sapphire-500: #0ea5e9;
  --sapphire-600: #0284c7;
  --sapphire-glow: rgba(14, 165, 233, 0.22);
  --sapphire-glow-strong: rgba(14, 165, 233, 0.45);

  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-glow: rgba(99, 102, 241, 0.22);

  /* Premium Warm Gold Accent */
  --gold-300: #fde047;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --gold-glow-strong: rgba(245, 158, 11, 0.45);

  /* Text Colors */
  --text-white:     #ffffff;
  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  /* Status Colors */
  --status-success: #10b981;
  --status-pending: #f59e0b;
  --status-danger:  #f43f5e;
  --status-info:    #38bdf8;

  /* Radius System */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 9999px;

  /* Shadow & Depth System */
  --shadow-xs:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-sm:   0 4px 14px rgba(0,0,0,0.45);
  --shadow-md:   0 10px 32px rgba(0,0,0,0.55);
  --shadow-lg:   0 25px 65px rgba(0,0,0,0.7);
  --shadow-glow-sapphire: 0 0 35px rgba(14, 165, 233, 0.25), 0 0 10px rgba(14, 165, 233, 0.15);
  --shadow-glow-gold:     0 0 35px rgba(245, 158, 11, 0.28), 0 0 10px rgba(245, 158, 11, 0.18);

  /* Micro-Transitions */
  --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --blur-md: blur(24px);
  --blur-lg: blur(40px);
}

/* ============================================================
   ADMIN THEME OVERRIDE — Royal Obsidian & Velvet Amethyst
   ============================================================ */
body.role-admin {
  --bg-void:    #05030a;
  --bg-deep:    #0c0718;
  --bg-surface: #170d2b;
  --bg-elevated: #241442;

  --glass-1: rgba(23, 13, 43, 0.8);
  --glass-2: rgba(36, 20, 66, 0.9);

  --border-color-glow: rgba(168, 85, 247, 0.45);
  --sapphire-500: #c084fc;
  --sapphire-glow: rgba(192, 132, 252, 0.25);
  --sapphire-glow-strong: rgba(192, 132, 252, 0.5);
}

/* ============================================================
   GLOBAL RESET & TYPOGRAPHY
   ============================================================ */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

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

body.dark-theme {
  font-family: var(--font-body);
  background-color: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--sapphire-500); }

/* ============================================================
   BACKGROUND ORBS — Sophisticated Ambient Atmosphere
   ============================================================ */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0;
  animation: orbAtmosphere 26s infinite alternate ease-in-out;
}

body.role-client .blob-1 {
  width: 750px; height: 750px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, transparent 70%);
  top: -280px; left: -220px;
  opacity: 1;
}

body.role-client .blob-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
  bottom: -250px; right: -200px;
  opacity: 1;
  animation-delay: -8s;
}

body.role-client .blob-3 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  top: 40%; left: 40%;
  opacity: 1;
  animation-delay: -16s;
}

body.role-admin .blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
  top: -250px; right: -200px;
  opacity: 1;
}

body.role-admin .blob-2 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  bottom: -200px; left: -150px;
  opacity: 1;
  animation-delay: -10s;
}

@keyframes orbAtmosphere {
  0%   { transform: translate(0px, 0px) scale(1); }
  50%  { transform: translate(50px, 40px) scale(1.06); }
  100% { transform: translate(-30px, 60px) scale(0.95); }
}

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.main-content {
  padding-top: 40px;
  padding-bottom: 80px;
}

.tab-pane { display: none; }
.tab-pane.active {
  display: block;
  animation: smoothReveal 0.4s var(--t-base) both;
}

@keyframes smoothReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   GLASSMORPHISM CARDS — Luxury Finish
   ============================================================ */
.glass-card {
  background: var(--glass-1);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15) 30%, rgba(255, 255, 255, 0.1) 70%, transparent);
  pointer-events: none;
}

.glass-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.glass-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 20px;
}

/* ============================================================
   NAVIGATION BAR — Clean Institutional Glass
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 14px 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sapphire-glow-strong), var(--gold-glow), transparent);
  pointer-events: none;
}

body.role-admin .navbar::after {
  background: linear-gradient(90deg, transparent, var(--sapphire-glow-strong), transparent);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--sapphire-500), var(--indigo-500));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-white);
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow-sapphire);
  transition: transform var(--t-spring);
}

.logo:hover .logo-icon {
  transform: scale(1.05) rotate(-2deg);
}

.logo-text .highlight {
  color: var(--sapphire-400);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all var(--t-base);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--sapphire-500) 0%, var(--indigo-600) 100%);
  color: var(--text-white);
  font-weight: 700;
  box-shadow: var(--shadow-glow-sapphire);
}

body.role-admin .nav-link.active {
  background: linear-gradient(135deg, #c084fc 0%, #7e22ce 100%);
  color: #fff;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* User Profile Badge */
.nav-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  padding: 6px 14px 6px 6px;
  border-radius: var(--r-pill);
  transition: all var(--t-base);
}

.user-profile-card:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
}

.avatar-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sapphire-500), var(--indigo-500));
  color: var(--text-white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.profile-info { display: flex; flex-direction: column; line-height: 1.1; }
.profile-name { font-size: 0.85rem; font-weight: 700; color: var(--text-white); }
.profile-kyc { font-size: 0.7rem; color: var(--sapphire-400); font-weight: 600; font-family: var(--font-mono); }

.btn-icon-logout {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--status-danger);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--t-base);
}
.btn-icon-logout:hover {
  background: var(--status-danger);
  color: #fff;
}

/* ============================================================
   BUTTON SYSTEM — Refined & Tactile
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--t-base);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-sm { padding: 8px 16px; font-size: 0.84rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

/* Primary: Sapphire Blue with Gold CTA Options */
.btn-primary {
  background: linear-gradient(135deg, var(--sapphire-500) 0%, var(--indigo-600) 100%);
  color: var(--text-white);
  box-shadow: var(--shadow-glow-sapphire);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--sapphire-400) 0%, var(--indigo-500) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
}

/* Secondary CTA / Highlight: Amber Gold */
.btn-secondary {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
  color: var(--bg-void);
  font-weight: 800;
  box-shadow: var(--shadow-glow-gold);
}
.btn-secondary:hover {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

/* Pulsing CTA */
.btn-glow {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
  color: var(--bg-void);
  font-weight: 800;
  box-shadow: var(--shadow-glow-gold);
  animation: ctaGoldPulse 2.8s ease-in-out infinite;
}

@keyframes ctaGoldPulse {
  0%, 100% { box-shadow: 0 4px 20px var(--gold-glow); }
  50%       { box-shadow: 0 8px 32px var(--gold-glow-strong), 0 0 20px rgba(245, 158, 11, 0.3); }
}

.btn-back {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
}
.btn-back:hover { color: var(--text-white); background: rgba(255,255,255,0.08); }

.btn-copy {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--sapphire-400);
  padding: 5px 12px;
  border-radius: var(--r-xs);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
}
.btn-copy:hover {
  background: rgba(14, 165, 233, 0.25);
}

.btn-remove {
  background: rgba(244, 63, 94, 0.15);
  border: none;
  color: var(--status-danger);
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
}

/* ============================================================
   TEXT UTILITIES & BADGES
   ============================================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--sapphire-400) 0%, var(--indigo-400) 50%, var(--gold-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-highlight-wave {
  background: linear-gradient(135deg, #00aeef 0%, #ff6600 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-primary  { color: var(--sapphire-400) !important; }
.text-success  { color: var(--status-success) !important; }
.text-warning  { color: var(--status-pending) !important; }
.text-danger   { color: var(--status-danger) !important; }
.text-muted    { color: var(--text-secondary) !important; }
.text-center   { text-align: center; }

.margin-top-xs  { margin-top: 8px; }
.margin-top-sm  { margin-top: 14px; }
.margin-top-md  { margin-top: 20px; }
.margin-top-lg  { margin-top: 36px; }
.margin-bottom-xs { margin-bottom: 8px; }
.margin-bottom-sm { margin-bottom: 16px; }

.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.badge-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--gold-400); }
.badge-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--status-success); }
.badge-danger  { background: rgba(244, 63, 94, 0.15);  border: 1px solid rgba(244, 63, 94, 0.3);  color: var(--status-danger); }

/* ============================================================
   LANDING HERO — Institutional Distinction
   ============================================================ */
.landing-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 72px 0;
}

@media (max-width: 1024px) {
  .landing-hero { grid-template-columns: 1fr; text-align: center; }
  .landing-cta-group, .landing-trust-badges, .badges-row { justify-content: center; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: var(--sapphire-400);
  padding: 7px 18px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.landing-title {
  font-size: clamp(2.4rem, 4.5vw, 3.5rem);
  line-height: 1.12;
  margin-bottom: 22px;
}

.landing-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 540px;
}

.landing-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.landing-trust-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.badges-row { display: flex; gap: 8px; flex-wrap: wrap; }

.pay-tag {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid var(--border-subtle);
}
.pay-tag.wave   { background: rgba(0, 174, 239, 0.1);  color: #00aeef; border-color: rgba(0, 174, 239, 0.25); }
.pay-tag.orange { background: rgba(255, 102, 0, 0.1);  color: #ff6600; border-color: rgba(255, 102, 0, 0.25); }
.pay-tag.mtn    { background: rgba(255, 204, 0, 0.1);  color: #ffcc00; border-color: rgba(255, 204, 0, 0.25); }
.pay-tag.moov   { background: rgba(51, 153, 255, 0.1); color: #3399ff; border-color: rgba(51, 153, 255, 0.25); }

/* Hero Preview Card */
.hero-widget-preview {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 50px rgba(14, 165, 233, 0.12), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.preview-header span { width: 10px; height: 10px; border-radius: 50%; }
.dot-red    { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green  { background: #10b981; }

.mini-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-input);
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-default);
}
.mini-input strong { font-family: var(--font-mono); font-size: 1.05rem; }

.mini-swap-icon { text-align: center; color: var(--sapphire-400); font-size: 1.1rem; }

.badge-mini { padding: 4px 10px; border-radius: var(--r-pill); font-size: 0.75rem; font-weight: 800; font-family: var(--font-mono); }
.wave-badge { background: #00aeef; color: #fff; }
.usdt-badge { background: #26a17b; color: #fff; }

/* ============================================================
   STATS BANNER & STEPS
   ============================================================ */
.stats-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin: 20px 0 80px 0;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--sapphire-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step-card {
  position: relative;
  padding: 36px 28px;
  text-align: center;
}

.step-number {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
}

.step-icon {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sapphire-500), var(--indigo-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px auto;
  box-shadow: var(--shadow-glow-sapphire);
}

/* ============================================================
   EXCHANGE WIDGET
   ============================================================ */
.hero-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px auto;
}

.exchange-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1024px) { .exchange-grid { grid-template-columns: 1fr; } }

.tab-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: var(--r-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-subtle);
}

.switch-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all var(--t-base);
}

.switch-btn.active {
  background: var(--bg-surface);
  color: var(--sapphire-400);
}

.input-group-box {
  background: var(--glass-input);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 18px;
}

.box-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.rate-info strong, .fee-info strong {
  color: var(--sapphire-400);
  font-family: var(--font-mono);
}

.box-body input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 1.9rem;
  font-weight: 800;
  width: 100%;
  font-family: var(--font-display);
}

.dropdown-select {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border: 1px solid var(--border-default);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.86rem;
  outline: none;
  cursor: pointer;
  transition: all var(--t-base);
}

.dropdown-select:hover, .dropdown-select:focus {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--sapphire-400);
}

/* Explicit high-contrast styling for dropdown options */
.dropdown-select option,
select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  padding: 10px;
  font-weight: 600;
}

body.light-theme-mode .dropdown-select option,
body.light-theme-mode select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

.swap-divider {
  display: flex; justify-content: center;
  margin: -10px 0;
  position: relative; z-index: 2;
}

.swap-icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--sapphire-500);
  color: var(--sapphire-400);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--t-spring);
}
.swap-icon-btn:hover {
  transform: rotate(180deg) scale(1.08);
  background: var(--sapphire-500);
  color: var(--text-white);
}

.form-field-group { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  background: var(--glass-input);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: var(--text-white);
  font-size: 0.94rem;
  outline: none;
  font-family: var(--font-body);
  transition: all var(--t-base);
}
.form-input:focus {
  border-color: var(--sapphire-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

body.role-admin .form-input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.15);
}

.summary-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-default);
  border-radius: var(--r-md);
  padding: 18px;
  margin: 22px 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 0.88rem;
}
.summary-row { display: flex; align-items: center; justify-content: space-between; }
.summary-row strong { font-family: var(--font-mono); color: var(--text-white); }

/* Amount highlight */
.amount-highlight {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}
.amount-highlight h2 {
  color: var(--sapphire-400);
  font-size: 2.1rem;
  font-family: var(--font-mono);
}

/* File Upload Zone */
.file-upload-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--r-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  transition: all var(--t-base);
}
.file-upload-zone:hover {
  border-color: var(--sapphire-400);
  background: rgba(14, 165, 233, 0.05);
}
.upload-icon { font-size: 2rem; color: var(--text-secondary); margin-bottom: 8px; }

.file-preview {
  margin-top: 14px;
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: var(--r-md);
}
.file-preview img { width: 50px; height: 50px; object-fit: cover; border-radius: var(--r-sm); }

/* Success Step */
.checkmark-circle {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px auto;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

/* Side Column Rates */
.side-info-column .glass-card { padding: 22px; }
.rate-table { display: flex; flex-direction: column; gap: 12px; }
.rate-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 0.86rem;
}
.price-buy { color: var(--status-success); font-weight: 700; font-family: var(--font-mono); }
.price-sell { color: var(--status-danger); font-weight: 700; font-family: var(--font-mono); }

/* ============================================================
   USER DASHBOARD & PORTAL BANNERS
   ============================================================ */
.portal-banner {
  padding: 28px 32px;
  border-radius: var(--r-xl);
  margin-bottom: 28px;
}

.user-portal-banner {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.admin-portal-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.portal-badge-user {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(14, 165, 233, 0.15);
  color: var(--sapphire-400);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.portal-badge-admin {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.user-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card-widget { display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 0.82rem; color: var(--text-secondary); font-family: var(--font-mono); text-transform: uppercase; }
.stat-card-widget h2 { font-size: 1.8rem; font-family: var(--font-mono); }

.user-theme-border { border-color: rgba(14, 165, 233, 0.2) !important; }
.admin-theme-border { border-color: rgba(168, 85, 247, 0.25) !important; }

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-responsive { width: 100%; overflow-x: auto; border-radius: var(--r-lg); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  padding: 13px 16px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   ADMIN SUBNAV & CMS
   ============================================================ */
.admin-subnav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.025);
  padding: 6px;
  border-radius: var(--r-md);
  border: 1px solid rgba(168, 85, 247, 0.25);
  margin-bottom: 24px;
}

.admin-subnav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--t-base);
}

.admin-subnav-btn:hover { color: var(--text-white); background: rgba(255, 255, 255, 0.05); }

.admin-subnav-btn.active {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.4);
}

.admin-subpane { display: none; }
.admin-subpane.active { display: block; animation: smoothReveal 0.3s ease both; }

.cms-grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 1024px) { .cms-grid-layout { grid-template-columns: 1fr; } }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.modal-content {
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--status-danger); }

.modal-auth-style { border-color: rgba(14, 165, 233, 0.3); }

.auth-tab-switch {
  display: flex; gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab-btn.active {
  background: var(--sapphire-500);
  color: var(--text-white);
}

.auth-pane { display: none; }
.auth-pane.active { display: block; animation: smoothReveal 0.3s ease both; }

.modal-admin-style { border-color: rgba(168, 85, 247, 0.35); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0;
  margin-top: 60px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--sapphire-400); }

.admin-secret-link { opacity: 0.4; font-size: 0.8rem; }
.admin-secret-link:hover { opacity: 1; color: #c084fc !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .container { padding: 0 18px; }
  .landing-title { font-size: 2.1rem; }
  .glass-card { padding: 22px; }
}

/* ============================================================
   FLOATING WHATSAPP SUPPORT WIDGET
   ============================================================ */
.whatsapp-floating-box {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
}

.whatsapp-btn-float {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0,0,0,0.3);
  text-decoration: none;
  transition: all var(--t-spring);
  position: relative;
}

.whatsapp-btn-float:hover {
  transform: scale(1.1) rotate(6deg);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.65), 0 4px 12px rgba(0,0,0,0.4);
  color: #ffffff;
}

.whatsapp-badge-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  background: #22c55e;
  border: 2px solid var(--bg-void);
  border-radius: 50%;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================================
   TOAST NOTIFICATIONS MANAGER
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: 90%;
}

.toast-item {
  pointer-events: auto;
  background: var(--glass-2);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.35s var(--t-spring) both;
  transition: all var(--t-base);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(50px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-item.toast-hiding {
  opacity: 0;
  transform: translateX(60px);
}

.toast-icon {
  font-size: 1.25rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.toast-content { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.88rem; margin-bottom: 2px; color: var(--text-white); }
.toast-message { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px;
}
.toast-close:hover { color: var(--text-white); }

.toast-item.success { border-color: rgba(16, 185, 129, 0.4); }
.toast-item.success .toast-icon { color: #10b981; }

.toast-item.info { border-color: rgba(14, 165, 233, 0.4); }
.toast-item.info .toast-icon { color: var(--sapphire-400); }

.toast-item.warning { border-color: rgba(245, 158, 11, 0.4); }
.toast-item.warning .toast-icon { color: var(--gold-400); }

.toast-item.danger { border-color: rgba(244, 63, 94, 0.4); }
.toast-item.danger .toast-icon { color: var(--status-danger); }

/* ============================================================
   LIVE CRYPTO TICKER BAR & THEME TOGGLE
   ============================================================ */
.ticker-bar {
  background: rgba(7, 13, 30, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0;
  font-size: 0.8rem;
  overflow: hidden;
}

.ticker-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticker-label {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--sapphire-400);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ticker-track::-webkit-scrollbar { display: none; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.ticker-item span { color: var(--text-secondary); }
.ticker-item strong { color: var(--text-white); }

.badge-pct {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  font-size: 0.7rem;
  font-weight: 700;
}
.badge-pct.positive { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-default);
  color: var(--gold-400);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--t-spring);
}
.theme-toggle-btn:hover {
  transform: rotate(30deg) scale(1.08);
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-400);
}

/* ============================================================
   LIGHT THEME MODE OVERRIDE (☀️ Mode Clair Épuré)
   ============================================================ */
body.light-theme-mode {
  --bg-void:      #f8fafc;
  --bg-deep:      #f1f5f9;
  --bg-surface:   #ffffff;
  --bg-elevated:  #e2e8f0;

  --glass-1: rgba(255, 255, 255, 0.9);
  --glass-2: rgba(248, 250, 252, 0.95);
  --glass-input: #f1f5f9;

  --border-subtle:  rgba(0, 0, 0, 0.08);
  --border-default: rgba(0, 0, 0, 0.15);
  --border-strong:  rgba(0, 0, 0, 0.25);

  --text-white:     #0f172a;
  --text-primary:   #1e293b;
  --text-secondary: #475569;
  --text-muted:     #64748b;

  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 15px 45px rgba(0,0,0,0.12);
}

body.light-theme-mode .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme-mode .ticker-bar {
  background: #f1f5f9;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme-mode .form-input,
body.light-theme-mode .dropdown-select {
  color: #0f172a;
}


