/* ==========================================================================
   HDAPAY — Système de Design Premium (v19)
   Inspiré Revolut & Stripe — Palette: Obsidian Dark, Emerald Neon, Indigo Cyber, Bitcoin Gold
   Plateforme FinTech UEMOA — hdapay.com
   ========================================================================== */

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 0.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1rem;
}

/* Environment Toggle Switch */
.environment-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.toggle-label { flex: 1; }
.toggle-title { font-size: 0.82rem; font-weight: 700; color: var(--text-main); }
.toggle-subtitle { font-size: 0.7rem; color: var(--text-muted); display: block; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #1e293b; border-radius: 24px; transition: 0.3s ease;
  border: 1px solid var(--border-color);
}
.slider::before {
  position: absolute; content: "";
  height: 18px; width: 18px; left: 3px; bottom: 2px;
  background: #64748b; border-radius: 50%; transition: 0.3s ease;
}
input:checked + .slider { background: rgba(16,185,129,0.25); border-color: var(--accent-emerald); }
input:checked + .slider::before { transform: translateX(20px); background: var(--accent-emerald); }

/* Crypto Card Hero */
.crypto-card-hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid rgba(247,147,26,0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px rgba(247,147,26,0.08);
}

/* Checkout elements */
.checkout-demo-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 480px; }
.checkout-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.checkout-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.checkout-merchant-info { display: flex; align-items: center; gap: 0.75rem; }
.merchant-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-indigo));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.2rem; color: white;
}
.checkout-body { padding: 1.5rem; }
.payment-method-selector { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.method-btn {
  flex: 1; padding: 0.65rem; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  text-align: center; cursor: pointer; font-weight: 700; font-size: 0.9rem;
  transition: var(--transition-fast); color: var(--text-muted);
}
.method-btn.active, .method-btn:hover {
  background: rgba(16,185,129,0.12);
  border-color: var(--accent-emerald);
  color: var(--text-main);
}
.payment-form { display: flex; flex-direction: column; gap: 1rem; }

/* Stat Change badge */
.stat-change { font-size: 0.78rem; font-weight: 700; margin-top: 0.35rem; }
.stat-change.positive { color: var(--accent-emerald-light); }
.stat-change.negative { color: var(--accent-rose); }


@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Tokens */
  --bg-primary: #070a12;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(16, 185, 129, 0.5);

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  
  --accent-indigo: #6366f1;
  --accent-indigo-light: #818cf8;
  --accent-indigo-glow: rgba(99, 102, 241, 0.35);

  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;
  --accent-bitcoin: #f7931a;

  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-glow-emerald: 0 0 35px rgba(16, 185, 129, 0.3);
  --shadow-glow-indigo: 0 0 35px rgba(99, 102, 241, 0.3);
  --shadow-glow-btc: 0 0 35px rgba(247, 147, 26, 0.3);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.5px;
}

/* Revolut-Style Landing Header */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 4rem;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.landing-nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.landing-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.landing-nav-link:hover, .landing-nav-link.active {
  color: var(--text-main);
}

/* Revolut Hero Section */
.landing-hero {
  padding: 6rem 2rem 5rem 2rem;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-glow);
  color: var(--accent-emerald-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 3rem auto;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Subdomain Cards Grid (Revolut/Stripe Style) */
.subdomain-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  max-width: 1200px;
  margin: 0 auto 5rem auto;
  padding: 0 1.5rem;
}

.subdomain-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  text-align: left;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.subdomain-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.subdomain-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 1.25rem;
}

/* Country Selector Panel UEMOA */
.country-selector-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 5rem auto;
  box-shadow: var(--shadow-card);
}

.country-tabs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
}

.country-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
}

.country-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.country-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(99, 102, 241, 0.2));
  border-color: var(--accent-emerald);
  color: var(--text-main);
}

.operator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
}

/* App Shell (Dashboard / Admin / Client) */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  height: 100vh;
  z-index: 50;
  overflow-y: auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-indigo));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-emerald);
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
}

.brand-text {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-sandbox {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-subtle);
  margin: 0.9rem 0.5rem 0.3rem 0.5rem;
  font-weight: 800;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition-fast);
}

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

.nav-item.active {
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(99, 102, 241, 0.18));
  border: 1px solid var(--border-glow);
}

.nav-item svg { width: 19px; height: 19px; stroke-width: 2; flex-shrink: 0; }

.main-wrapper {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-header {
  height: 75px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-title { font-size: 1.3rem; font-weight: 800; color: var(--text-main); }
.header-actions { display: flex; align-items: center; gap: 0.85rem; }

.btn-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-header:hover { background: var(--bg-card-hover); border-color: rgba(255, 255, 255, 0.25); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-glow-emerald);
}

.btn-primary:hover { background: linear-gradient(135deg, #34d399, var(--accent-emerald)); transform: translateY(-1px); }

.btn-btc {
  background: linear-gradient(135deg, var(--accent-bitcoin), #d97706);
  color: #fff; border: none; box-shadow: var(--shadow-glow-btc); font-weight: 700;
}

.btn-admin-test {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-indigo));
  color: #fff; border: none; box-shadow: 0 0 20px rgba(168, 85, 247, 0.35); font-weight: 700;
}

.btn-pay {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-emerald), #047857);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-glow-emerald);
  transition: var(--transition-fast);
}

.btn-pay:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Components & Grid */
.view-section { display: none; padding: 2.5rem; animation: fadeIn 0.3s ease-in-out; }
.view-section.active { display: block; }

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

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }

.stat-card {
  background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 1.5rem; position: relative; overflow: hidden; transition: var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.stat-card:hover { border-color: rgba(255, 255, 255, 0.2); transform: translateY(-3px); }
.stat-title { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.stat-value { font-size: 1.85rem; font-weight: 900; letter-spacing: -0.5px; color: var(--text-main); margin-top: 0.4rem; }

.card-table { background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-card); }
.table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.table-title { font-size: 1.15rem; font-weight: 800; }

table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
th { color: var(--text-muted); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); }
td { padding: 1.1rem 1rem; border-bottom: 1px solid var(--border-color); color: var(--text-main); }

.badge-status { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }
.badge-status.succeeded { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald-light); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-status.failed { background: rgba(244, 63, 94, 0.18); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

.risk-score-badge { display: inline-flex; align-items: center; padding: 0.25rem 0.65rem; border-radius: var(--radius-sm); font-weight: 800; font-size: 0.75rem; font-family: var(--font-mono); }
.risk-low { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald-light); }
.risk-high { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.kyc-badge { padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.72rem; font-weight: 800; }
.kyc-l1 { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); }
.kyc-l2 { background: rgba(99, 102, 241, 0.2); color: var(--accent-indigo-light); }
.kyc-l3 { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald-light); }

.form-group { margin-bottom: 1.35rem; }
.form-label { display: block; font-size: 0.825rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.45rem; }
.form-control { width: 100%; background: #131c2e; border: 1px solid var(--border-color); color: var(--text-main); padding: 0.85rem 1.1rem; border-radius: var(--radius-md); font-size: 0.95rem; outline: none; transition: var(--transition-fast); }
.form-control:focus { border-color: var(--accent-emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background: #131c2e; border: 1px solid var(--border-color); border-radius: var(--radius-lg); width: 100%; max-width: 500px; padding: 2.25rem; box-shadow: var(--shadow-card); position: relative; }

.toast-container { position: fixed; bottom: 2rem; right: 2rem; display: flex; flex-direction: column; gap: 0.75rem; z-index: 200; }
.toast { background: #131c2e; border: 1px solid var(--accent-emerald); padding: 1.1rem 1.35rem; border-radius: var(--radius-md); color: var(--text-main); display: flex; align-items: center; gap: 0.85rem; min-width: 320px; box-shadow: var(--shadow-card); }

/* Interactive Guided Tutorial Overlay */
.tutorial-spotlight {
  position: relative;
  z-index: 150 !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 30px var(--accent-emerald) !important;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.tutorial-tooltip {
  position: absolute;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 300px;
  z-index: 160;
  box-shadow: var(--shadow-glow-emerald);
  animation: fadeIn 0.3s ease;
}

@media (max-width: 1024px) {
  .landing-nav { padding: 1rem 1.5rem; }
  .landing-nav-links { display: none; }
  .hero-title { font-size: 2.5rem; }
  .sidebar { width: 80px; padding: 1rem 0.5rem; }
  .brand-text, .nav-item span, .nav-section-label { display: none; }
  .main-wrapper { margin-left: 80px; }
}
