/* ╔══════════════════════════════════════════════════════════════════╗
   ║  TRACEFLOW — Design System v4.0 "Carbon Precision"              ║
   ║  ─────────────────────────────────────────────────────────────  ║
   ║  Stack   : CSS custom properties, dark-first, depth layers      ║
   ║  Fonts   : Syne (display) · Inter (body) · DM Mono (mono)       ║
   ║  Accent  : #3de8a0 (emerald) · #7c6aff (violet) · #f25c5c (red)║
   ║  Concept : Data Command Center — precision, depth, dynamism     ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* — Backgrounds — */
  --bg-base:       #080a0e;
  --bg-surface:    #0d1017;
  --bg-elevated:   #131720;
  --bg-raised:     #171d2a;
  --bg-hover:      #1c2332;
  --bg-active:     #1e2840;

  /* — Borders — */
  --border:        #1e2535;
  --border-strong: #2a334a;
  --border-accent: rgba(61, 232, 160, 0.18);

  /* — Text — */
  --text-primary:   #edf2ff;
  --text-secondary: #7d8fac;
  --text-muted:     #3d4f6a;
  --text-accent:    #3de8a0;

  /* — Accent Emerald — */
  --accent:       #3de8a0;
  --accent-2:     #28c97e;
  --accent-dim:   rgba(61, 232, 160, 0.10);
  --accent-dim-2: rgba(61, 232, 160, 0.05);
  --accent-glow:  0 0 24px rgba(61, 232, 160, 0.25), 0 0 48px rgba(61, 232, 160, 0.08);

  /* — Accent Violet — */
  --violet:       #7c6aff;
  --violet-dim:   rgba(124, 106, 255, 0.10);

  /* — Accent Cyan — */
  --cyan:         #38bdf8;
  --cyan-dim:     rgba(56, 189, 248, 0.10);

  /* — Semantic — */
  --danger:       #f25c5c;
  --danger-dim:   rgba(242, 92, 92, 0.10);
  --warning:      #f59e0b;
  --warning-dim:  rgba(245, 158, 11, 0.10);
  --info:         #3b82f6;
  --info-dim:     rgba(59, 130, 246, 0.10);
  --success:      #3de8a0;
  --success-dim:  rgba(61, 232, 160, 0.10);
  --purple:       #a855f7;
  --purple-dim:   rgba(168, 85, 247, 0.10);

  /* — Layout — */
  --sidebar-width: 248px;
  --topbar-height: 58px;

  /* — Radius — */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;

  /* — Typography — */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* — Shadows — */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-sm: 0 2px 8px  rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-xl: 0 32px 96px rgba(0,0,0,0.9);
  --shadow-glow: 0 0 30px rgba(61,232,160,0.15), 0 0 60px rgba(124,106,255,0.08);

  /* — Transitions — */
  --transition:        150ms ease;
  --transition-smooth: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-spring: 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-elastic: 450ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ─── LIGHT THEME ─── */
[data-theme="light"] {
  --bg-base:       #f0f4fb;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f5f7fc;
  --bg-raised:     #f8f9fe;
  --bg-hover:      #eceef7;
  --bg-active:     #e4e8f5;

  --border:        #dde2ef;
  --border-strong: #c9d0e4;
  --border-accent: rgba(0, 163, 108, 0.15);

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-accent:    #009960;

  --accent:       #00a36c;
  --accent-2:     #007a50;
  --accent-dim:   rgba(0, 163, 108, 0.08);
  --accent-dim-2: rgba(0, 163, 108, 0.04);
  --accent-glow:  0 0 20px rgba(0, 163, 108, 0.15);

  --violet:       #6d4aff;
  --violet-dim:   rgba(109, 74, 255, 0.08);

  --danger:       #dc2626;
  --danger-dim:   rgba(220, 38, 38, 0.07);
  --warning:      #d97706;
  --warning-dim:  rgba(217, 119, 6, 0.07);
  --info:         #2563eb;
  --info-dim:     rgba(37, 99, 235, 0.07);
  --purple:       #9333ea;
  --purple-dim:   rgba(147, 51, 234, 0.07);

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 8px  rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.03);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-xl: 0 32px 96px rgba(0,0,0,0.12);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

::selection {
  background: rgba(61, 232, 160, 0.2);
  color: var(--text-primary);
}
[data-theme="light"] ::selection {
  background: rgba(0, 163, 108, 0.15);
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
  /* Atmospheric background texture */
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(61,232,160,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 100%, rgba(124,106,255,0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0,163,108,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 100%, rgba(109,74,255,0.04) 0%, transparent 60%);
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--violet));
  border-radius: 99px;
  opacity: 0.5;
}
::-webkit-scrollbar-thumb:hover { opacity: 1; }

/* ============================================================
   GLOBAL KEYFRAMES
   ============================================================ */
@keyframes fade-in         { from{opacity:0}                        to{opacity:1} }
@keyframes fade-in-up      { from{opacity:0;transform:translateY(16px) scale(0.97)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes fade-in-down    { from{opacity:0;transform:translateY(-10px) scale(0.98)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes slide-up        { from{opacity:0;transform:translateY(12px) scale(0.96)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes slide-in-right  { from{opacity:0;transform:translateX(20px) scale(0.97)} to{opacity:1;transform:translateX(0) scale(1)} }
@keyframes slide-in-left   { from{opacity:0;transform:translateX(-20px) scale(0.97)} to{opacity:1;transform:translateX(0) scale(1)} }
@keyframes scale-in        { from{opacity:0;transform:scale(0.94) rotate(-2deg)} to{opacity:1;transform:scale(1) rotate(0deg)} }
@keyframes scale-in-bounce { from{opacity:0;transform:scale(0.75) rotate(-5deg)} to{opacity:1;transform:scale(1) rotate(0deg)} }
@keyframes shimmer {
  0%   { background-position: 200% center; opacity: 0.5; }
  50%  { opacity: 1; }
  100% { background-position: -200% center; opacity: 0.5; }
}
@keyframes float   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes float-slow { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes breathe {
  0%,100% { box-shadow: 0 0 0 0 var(--accent-dim); transform: scale(1); }
  50%     { box-shadow: 0 0 24px 6px var(--accent-dim); transform: scale(1.02); }
}
@keyframes glow-pulse {
  0%,100%   { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.05); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  70%  { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes spin-reverse { from{transform:rotate(360deg)} to{transform:rotate(0deg)} }
@keyframes toast-progress { from{width:100%} to{width:0%} }
@keyframes number-pop { 0%{transform:scale(1) rotate(-5deg)} 50%{transform:scale(1.15) rotate(0deg)} 100%{transform:scale(1) rotate(0deg)} }
@keyframes glow-scan {
  0%   { transform: translateX(-100%); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
@keyframes border-rotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes slide-down { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
@keyframes glow-in { from{opacity:0;box-shadow:0 0 0 0 rgba(61,232,160,0.4)} to{opacity:1;box-shadow:0 0 24px 8px rgba(61,232,160,0.2)} }
@keyframes float-drift { 0%{transform:translateY(0) translateX(0)} 25%{transform:translateY(-8px) translateX(4px)} 50%{transform:translateY(-4px) translateX(0)} 75%{transform:translateY(-8px) translateX(-4px)} 100%{transform:translateY(0) translateX(0)} }

/* Utility animation classes */
.anim-fade-in        { animation: fade-in 350ms ease both; }
.anim-fade-in-up     { animation: fade-in-up 400ms cubic-bezier(0.4,0,0.2,1) both; }
.anim-slide-up       { animation: slide-up  350ms cubic-bezier(0.4,0,0.2,1) both; }
.anim-slide-right    { animation: slide-in-right 350ms ease both; }
.anim-scale-in       { animation: scale-in 300ms ease both; }

/* Staggered delays */
.anim-d1  { animation-delay: 0.05s; }
.anim-d2  { animation-delay: 0.10s; }
.anim-d3  { animation-delay: 0.15s; }
.anim-d4  { animation-delay: 0.20s; }
.anim-d5  { animation-delay: 0.25s; }
.anim-d6  { animation-delay: 0.30s; }

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg,
    rgba(13, 16, 23, 0.85) 0%,
    rgba(8, 10, 14, 0.92) 100%);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, background 0.45s ease;
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.08),
    6px 0 60px rgba(0,0,0,0.5),
    0 0 80px rgba(61,232,160,0.03);
}

/* Atmospheric top glow — plus subtil */
.sidebar::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -80px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(61,232,160,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 7s ease-in-out infinite;
}

/* Edge accent glow — right border */
.sidebar::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -1px;
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(61,232,160,0.12) 30%,
    rgba(61,232,160,0.08) 70%,
    transparent 100%);
  pointer-events: none;
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: inset -1px 0 0 var(--border), 4px 0 20px rgba(0,0,0,0.06);
}
[data-theme="light"] .sidebar::before {
  background: radial-gradient(circle, rgba(0,163,108,0.04) 0%, transparent 70%);
}
[data-theme="light"] .sidebar::after {
  background: linear-gradient(180deg, transparent, rgba(0,163,108,0.10), transparent);
}

/* — Logo zone — */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

/* Animated shimmer line at bottom of logo */
.sidebar-logo::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: shimmer 3.5s ease-in-out infinite;
  background-size: 200% 100%;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(61,232,160,0.2) 0%, rgba(61,232,160,0.05) 100%);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(61,232,160,0.2);
  border-radius: var(--radius);
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
  animation: breathe 4s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(61,232,160,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
}

.logo-icon:hover {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 
    var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.15);
  background: linear-gradient(135deg, rgba(61,232,160,0.25) 0%, rgba(61,232,160,0.08) 100%);
}

.logo-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61,232,160,0.12) 0%, transparent 70%);
  transform: translate(-50%,-50%);
  pointer-events: none;
  animation: float 3.5s ease-in-out infinite;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-version {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 1px;
  opacity: 0.8;
}

/* — Navigation — */
.sidebar-nav {
  flex: 1;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 99px;
}

/* ===== SECTION LABELS ===== */
.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  user-select: none;
  opacity: 0.8;
  position: relative;
}

.nav-section-label::before {
  content: '';
  display: inline-flex;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
  flex-shrink: 0;
}

.nav-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  opacity: 0.5;
}

/* ===== NAV ITEMS ===== */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.4;
  min-height: 38px;
}

/* Subtle glow layer on hover */
.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim-2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: inherit;
  pointer-events: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  transform: translateX(3px);
  border-color: var(--border);
}

.nav-item:hover::before {
  opacity: 1;
}

/* Active state — modern glass accent */
.nav-item.active {
  background: linear-gradient(135deg, rgba(61,232,160,0.15) 0%, rgba(61,232,160,0.05) 80%);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  color: var(--accent);
  border-color: rgba(61,232,160,0.2);
  transform: translateX(0);
  box-shadow:
    inset 2px 0 0 var(--accent),
    0 0 24px rgba(61, 232, 160, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
  font-weight: 500;
}

/* Active icon glow */
.nav-item.active .nav-icon {
  color: var(--accent);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(61, 232, 160, 0.4));
}

/* Active accent bar — full height left */
.nav-item.active::after {
  content: '';
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--accent) 20%,
    var(--accent) 80%,
    transparent 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(61, 232, 160, 0.3);
}

/* ===== NAV ICONS ===== */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover .nav-icon {
  opacity: 0.85;
  transform: scale(1.12);
}

/* ===== BADGES (alertes, etc.) ===== */
.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--danger), #ff6b6b);
  color: white;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 0 12px rgba(242, 92, 92, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  animation: pulse-ring 2.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
  transition: all 0.2s ease;
}

.nav-item:hover .nav-badge {
  transform: scale(1.05);
}

.nav-badge.critical {
  background: linear-gradient(135deg, var(--danger), #ff4444);
  box-shadow: 0 0 16px rgba(242, 92, 92, 0.5);
}

/* Badge for tracabilité (!) icon */
.nav-badge.critical {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  min-width: 16px;
  line-height: 1.4;
}

/* — Footer — */
.sidebar-footer {
  padding: 10px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all var(--transition-smooth);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.theme-toggle:hover {
  border-color: rgba(61,232,160,0.2);
  color: var(--accent);
  background: rgba(61,232,160,0.1);
  transform: rotate(45deg) scale(1.12);
  box-shadow: 
    0 8px 24px rgba(61,232,160,0.15),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.lang-switcher {
  display: flex;
  gap: 4px;
  padding: 2px 0;
}

.lang-btn {
  flex: 1;
  padding: 5px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all var(--transition-smooth);
  letter-spacing: 1px;
}

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

.lang-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--border-accent);
}

/* Mobile toggle */
.sidebar-mobile-toggle {
  display: none;
  position: fixed;
  top: 13px; left: 13px;
  z-index: 200;
  width: 38px; height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 17px;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.sidebar-mobile-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: fade-in 0.4s ease;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-height);
  background: rgba(8, 10, 14, 0.65);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  animation: slide-down 0.4s ease;
  box-shadow: 
    0 1px 0 rgba(255,255,255,0.05),
    0 8px 40px rgba(0,0,0,0.4);
}

/* Gradient scan line at bottom */
.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--violet) 70%, transparent 100%);
  opacity: 0.25;
}

[data-theme="light"] .topbar {
  background: rgba(255,255,255,0.94);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.06);
}

.breadcrumb {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 8px var(--accent);
  animation: breathe 2.5s ease-in-out infinite;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 5px 5px 5px 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 300px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.search-bar:focus-within {
  border-color: rgba(61,232,160,0.3);
  box-shadow: 
    0 0 0 3px rgba(61,232,160,0.15),
    var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.08);
  width: 380px;
  background: rgba(13, 16, 23, 0.8);
}

.search-icon { color: var(--text-muted); font-size: 15px; flex-shrink: 0; }

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.search-bar input::placeholder { color: var(--text-muted); }

#search-btn {
  background: var(--accent) !important;
  color: #080a0e !important;
  border: none;
  border-radius: 7px;
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
  font-weight: 700;
}

#search-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(61,232,160,0.5);
}

/* Notification bell */
.notification-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.notification-btn:hover {
  border-color: rgba(61,232,160,0.2);
  color: var(--accent);
  background: rgba(61,232,160,0.1);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(61,232,160,0.15),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.notification-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-elevated);
  animation: pulse-ring 1.8s ease-in-out infinite;
}

/* User chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.user-chip:hover {
  border-color: rgba(61,232,160,0.2);
  background: rgba(61,232,160,0.1);
  box-shadow: 
    0 0 0 3px rgba(61,232,160,0.1),
    inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.user-avatar {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--accent-dim), var(--violet-dim));
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  transition: all var(--transition-smooth);
}

.user-chip:hover .user-avatar {
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(61,232,160,0.3);
}

/* ============================================================
   MODULE CONTAINER
   ============================================================ */
.module-container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  position: relative;
}

.module-content {
  animation: fade-in-up 380ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

/* Accent underline */
.module-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--violet), transparent);
  opacity: 0.15;
}

.module-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.module-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

.module-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Content grids */
.content-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.content-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.content-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

@media (max-width: 900px) {
  .content-grid-2,
  .content-grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-height) - 48px);
  gap: 24px;
}

.loading-bar {
  width: 240px;
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  border-radius: 99px;
  animation: loading-anim 2.2s ease-in-out forwards;
}

@keyframes loading-anim {
  0%   { width: 0%; }
  30%  { width: 45%; }
  65%  { width: 72%; }
  100% { width: 100%; }
}

.loading-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-smooth);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.1px;
}

/* Click ripple */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--click-x,50%) var(--click-y,50%),
    rgba(255,255,255,0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.btn:active::before { opacity: 1; }
.btn:active { transform: scale(0.97) !important; }

/* Shimmer sweep on hover */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  transition: left 0s;
  pointer-events: none;
}
.btn:hover::after {
  left: 150%;
  transition: left 0.5s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #28c97e 50%, var(--accent) 100%);
  background-size: 200% 100%;
  color: #080a0e;
  font-weight: 700;
  box-shadow: 
    0 6px 20px rgba(61,232,160,0.35),
    0 0 1px rgba(255,255,255,0.2) inset,
    inset 0 1px 0 rgba(255,255,255,0.12);
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 
    0 12px 32px rgba(61,232,160,0.45),
    0 0 24px rgba(61,232,160,0.2);
}

[data-theme="light"] .btn-primary { color: #030507; }

.btn-secondary {
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.btn-secondary:hover {
  border-color: rgba(61,232,160,0.2);
  color: var(--text-primary);
  background: rgba(19, 23, 32, 0.7);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(61,232,160,0.1),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(61,232,160,0.15);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(242,92,92,0.18);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(242,92,92,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

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

.btn-violet {
  background: linear-gradient(135deg, var(--violet), #6050df);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(124,106,255,0.30);
}

.btn-violet:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124,106,255,0.40);
}

/* Sizes */
.btn-sm  { padding: 5px 11px; font-size: 12px; }
.btn-lg  { padding: 10px 22px; font-size: 14px; font-weight: 600; }
.btn-xl  { padding: 12px 28px; font-size: 15px; font-weight: 700; }
.btn-icon{ padding: 8px; }
.btn-icon.btn-sm { padding: 5px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: linear-gradient(135deg, rgba(13, 16, 23, 0.7) 0%, rgba(19, 23, 32, 0.5) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 
    0 4px 20px rgba(0,0,0,0.3),
    0 0 1px rgba(61,232,160,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fade-in-up 0.45s ease both;
}

/* Subtle top gradient */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

.card:nth-child(1) { animation-delay: 0.00s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.10s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.20s; }
.card:nth-child(6) { animation-delay: 0.25s; }

.card:hover {
  border-color: rgba(61,232,160,0.2);
  transform: translateY(-8px) scale(1.01);
  box-shadow: 
    0 16px 48px rgba(61,232,160,0.15),
    0 0 30px rgba(61,232,160,0.1),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,163,108,0.06);
}

/* Glow variant */
.card-glow {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(61,232,160,0.08), 0 0 24px rgba(61,232,160,0.05);
}
.card-glow:hover {
  border-color: rgba(61,232,160,0.3);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(61,232,160,0.14), 0 0 40px rgba(61,232,160,0.08);
}

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

.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.1px;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(13, 16, 23, 0.6) 0%, rgba(19, 23, 32, 0.4) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fade-in-up 0.45s ease both;
  cursor: default;
}

.stat-card:nth-child(1) { animation-delay: 0.00s; }
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }
.stat-card:nth-child(5) { animation-delay: 0.24s; }

/* Top colored bar */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--stat-color, var(--accent)), transparent 80%);
  transition: width 0.4s;
}

/* Radial glow background */
.stat-card::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.stat-card:hover::after { opacity: 1; }

.stat-card:hover {
  border-color: rgba(61,232,160,0.25);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(61,232,160,0.15),
    0 0 30px rgba(61,232,160,0.1),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.stat-icon {
  position: absolute;
  top: 16px; right: 16px;
  width: 30px; height: 30px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 14px;
  transition: all var(--transition-smooth);
}

.stat-card:hover .stat-icon {
  transform: scale(1.12) rotate(-5deg);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  line-height: 1;
  transition: all 0.3s;
}

.stat-card:hover .stat-value {
  animation: number-pop 0.3s ease;
  color: var(--accent);
}

.stat-delta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
}

.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }

.stat-sparkline {
  margin-top: 14px;
  height: 26px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.stat-sparkline .bar {
  flex: 1;
  background: var(--accent-dim);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}

.stat-card:hover .stat-sparkline .bar {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
}

.stat-sparkline .bar:nth-child(1) { height: 35%; }
.stat-sparkline .bar:nth-child(2) { height: 65%; }
.stat-sparkline .bar:nth-child(3) { height: 30%; }
.stat-sparkline .bar:nth-child(4) { height: 85%; }
.stat-sparkline .bar:nth-child(5) { height: 55%; }
.stat-sparkline .bar:nth-child(6) { height: 75%; }
.stat-sparkline .bar:nth-child(7) { height: 40%; }
.stat-sparkline .bar:nth-child(8) { height: 100%; }

/* ============================================================
   DATA TABLE
   ============================================================ */
.table-container {
  background: linear-gradient(135deg, rgba(13, 16, 23, 0.6) 0%, rgba(19, 23, 32, 0.4) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fade-in-up 0.4s ease;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-elevated);
}

.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  flex: 1;
  max-width: 280px;
  transition: all var(--transition-smooth);
}

.table-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-surface);
}

.table-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  width: 100%;
  font-size: 13px;
}

.table-search input::placeholder { color: var(--text-muted); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  transition: color var(--transition);
}

thead th:hover { color: var(--text-secondary); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 150ms ease, transform 150ms ease;
  animation: fade-in 0.3s ease both;
  cursor: default;
}

tbody tr:nth-child(1) { animation-delay: 0.00s; }
tbody tr:nth-child(2) { animation-delay: 0.04s; }
tbody tr:nth-child(3) { animation-delay: 0.08s; }
tbody tr:nth-child(4) { animation-delay: 0.12s; }
tbody tr:nth-child(5) { animation-delay: 0.16s; }
tbody tr:nth-child(6) { animation-delay: 0.20s; }

tbody tr:last-child { border-bottom: none; }

tbody tr:hover {
  background: linear-gradient(90deg, rgba(61,232,160,0.05) 0%, transparent 100%);
  box-shadow: 
    inset 3px 0 0 var(--accent),
    inset 0 1px 0 rgba(61,232,160,0.1);
  transform: scale(1.002);
}

tbody td {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

tbody td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.td-primary { color: var(--text-primary); font-weight: 500; }

.table-empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
}

.table-empty-icon {
  font-size: 28px;
  margin-bottom: 10px;
  opacity: 0.25;
  display: block;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

/* Striped rows */
.table-striped tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.018);
}
[data-theme="light"] .table-striped tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.015);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  cursor: pointer;
  padding: 0 8px;
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #080a0e;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(61,232,160,0.3);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: all var(--transition-smooth);
  letter-spacing: 0.2px;
}

.badge-success, .tag-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(61,232,160,0.18); }
.badge-danger,  .tag-danger  { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(242,92,92,0.18); }
.badge-warning, .tag-warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,0.18); }
.badge-info,    .tag-info    { background: var(--info-dim);    color: var(--info);    border: 1px solid rgba(59,130,246,0.18); }
.badge-purple,  .tag-purple  { background: var(--purple-dim);  color: var(--purple);  border: 1px solid rgba(168,85,247,0.18); }
.badge-neutral, .tag-neutral { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-violet,  .tag-violet  { background: var(--violet-dim);  color: var(--violet);  border: 1px solid rgba(124,106,255,0.18); }

.badge:hover, .tag:hover { transform: scale(1.06); filter: brightness(1.1); }

/* Outline variants */
.tag-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); }
.tag-outline.tag-success { border-color: var(--success); color: var(--success); }
.tag-outline.tag-danger  { border-color: var(--danger);  color: var(--danger); }
.tag-outline.tag-warning { border-color: var(--warning); color: var(--warning); }
.tag-outline.tag-info    { border-color: var(--info);    color: var(--info); }

/* Status dot prefix */
.tag-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required { color: var(--danger); }

.form-input, .form-select, .form-textarea {
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text-primary);
  outline: none;
  transition: all 200ms ease;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: rgba(61,232,160,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(61,232,160,0.3);
  box-shadow: 
    0 0 0 3px rgba(61,232,160,0.15),
    inset 0 1px 0 rgba(255,255,255,0.08);
  background: rgba(19, 23, 32, 0.8);
}

.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%233d4f6a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-helper { font-size: 11px; color: var(--text-muted); }
.form-error  { font-size: 11px; color: var(--danger); }

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px; height: 14px;
  cursor: pointer;
}

.input-with-icon { position: relative; }
.input-with-icon .form-input { padding-left: 36px; }
.input-with-icon .input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
  animation: fade-in 0.18s ease;
}

.modal {
  background: linear-gradient(135deg, rgba(19, 23, 32, 0.9) 0%, rgba(13, 16, 23, 0.95) 100%);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 20px 80px rgba(61,232,160,0.08),
    0 0 60px rgba(61,232,160,0.04),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: modal-in 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Gradient top border */
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--violet), var(--cyan));
  opacity: 0.5;
  z-index: 1;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  font-size: 13px;
}

.modal-close:hover {
  background: var(--danger-dim);
  color: var(--danger);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 10px rgba(242,92,92,0.2);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-elevated);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(13, 16, 23, 0.92);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.5),
    0 0 1px rgba(61,232,160,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.toast.success { border-color: rgba(61,232,160,0.3);  box-shadow: var(--shadow-md), 0 0 20px rgba(61,232,160,0.06); }
.toast.error   { border-color: rgba(242,92,92,0.3);   box-shadow: var(--shadow-md), 0 0 20px rgba(242,92,92,0.06); }
.toast.warning { border-color: rgba(245,158,11,0.3);  box-shadow: var(--shadow-md), 0 0 20px rgba(245,158,11,0.06); }
.toast.info    { border-color: rgba(59,130,246,0.3);  box-shadow: var(--shadow-md), 0 0 20px rgba(59,130,246,0.06); }

/* Progress bar at bottom */
.toast::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 0 2px 0 var(--radius-lg);
  animation: toast-progress 3.5s linear forwards;
}

.toast.success::after { background: var(--success); }
.toast.error::after   { background: var(--danger); }
.toast.warning::after { background: var(--warning); }
.toast.info::after    { background: var(--info); }

.toast-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.toast.success .toast-icon { background: var(--success-dim); color: var(--success); }
.toast.error .toast-icon   { background: var(--danger-dim);  color: var(--danger); }
.toast.warning .toast-icon { background: var(--warning-dim); color: var(--warning); }
.toast.info .toast-icon    { background: var(--info-dim);    color: var(--info); }

.toast-message {
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(110%) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 120px; }
  to   { opacity: 0; transform: translateX(110%); max-height: 0; }
}

/* ============================================================
   AUTH SCREENS
   ============================================================ */
.auth-card {
  background: linear-gradient(135deg, rgba(19, 23, 32, 0.88) 0%, rgba(13, 16, 23, 0.95) 100%);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-2xl);
  padding: 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 
    0 20px 80px rgba(61,232,160,0.08),
    0 0 60px rgba(61,232,160,0.04),
    inset 0 1px 0 rgba(255,255,255,0.1);
  animation: scale-in-bounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Animated gradient border top */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet), var(--cyan), var(--accent));
  background-size: 300% 100%;
  animation: border-rotate 4s linear infinite;
}

/* Corner glow */
.auth-card::after {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(61,232,160,0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 20px 0;
}

/* ============================================================
   ALERTS PANEL
   ============================================================ */
.alert-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all var(--transition-smooth);
  background: var(--bg-surface);
  animation: slide-in-left 0.35s ease both;
}

.alert-item:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

.alert-item.critical {
  border-color: rgba(242,92,92,0.25);
  background: var(--danger-dim);
}

.alert-item.warning {
  border-color: rgba(245,158,11,0.25);
  background: var(--warning-dim);
}

/* Alert banner for dashboard */
.alert-banner {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  align-items: center;
  margin-bottom: 20px;
  border: 1px solid;
  font-weight: 500;
  animation: glow-in 0.5s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.alert-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: currentColor;
}

.alert-banner.danger {
  background: rgba(242, 92, 92, 0.12);
  border-color: rgba(242, 92, 92, 0.3);
  color: #ff6b6b;
}

.alert-banner.danger strong {
  color: var(--danger);
}

.alert-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.alert-banner.warning strong {
  color: var(--warning);
}

.alert-banner.info {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.alert-banner.info strong {
  color: var(--info);
}

.alert-banner.success {
  background: rgba(61, 232, 160, 0.12);
  border-color: rgba(61, 232, 160, 0.3);
  color: var(--accent);
}

.alert-banner.success strong {
  color: var(--accent);
}

.alert-banner button {
  flex-shrink: 0;
}

/* ============================================================
   DROPDOWN & MENUS
   ============================================================ */
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  animation: fade-in-down 0.2s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all var(--transition);
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item.danger:hover {
  background: var(--danger-dim);
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
  border-bottom: none;
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition-smooth);
  border-radius: 2px 2px 0 0;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.tab-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border);
}

.tab-btn.active::after { transform: scaleX(1); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  border-radius: 99px;
  transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   TOOLTIP
   ============================================================ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
  z-index: 999;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-elevated) 25%,
    var(--bg-raised) 37%,
    var(--bg-elevated) 63%);
  background-size: 400% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.8s ease infinite;
}

.skeleton-text    { height: 13px; margin-bottom: 8px; }
.skeleton-title   { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar  { width: 36px; height: 36px; border-radius: 50%; }
.skeleton-card    { height: 120px; border-radius: var(--radius-lg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.6);
  }

  .sidebar-mobile-toggle { display: flex; }
  .main-content { margin-left: 0; }

  .search-bar { width: 160px; }
  .search-bar:focus-within { width: 200px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .module-container { padding: 16px; }
  .content-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-right .search-bar { display: none; }
  .module-title { font-size: 17px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-muted); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-info     { color: var(--info); }
.text-violet   { color: var(--violet); }
.text-mono     { font-family: var(--font-mono); }
.text-display  { font-family: var(--font-display); }
.font-bold     { font-weight: 700; }
.font-medium   { font-weight: 500; }

/* Gradient text utilities */
.gradient-accent { background: linear-gradient(135deg, var(--accent), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-violet { background: linear-gradient(135deg, var(--violet), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-warm   { background: linear-gradient(135deg, var(--warning), var(--danger)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Glow utilities */
.glow           { animation: glow-in 0.6s ease-in-out; }
.glow-accent    { box-shadow: 0 0 30px rgba(61,232,160,0.2); }
.glow-violet    { box-shadow: 0 0 30px rgba(124,106,255,0.2); }
.glow-danger    { box-shadow: 0 0 30px rgba(242,92,92,0.2); }

/* Float utilities */
.float-animation    { animation: float 3.5s ease-in-out infinite; }
.float-slow         { animation: float-slow 4.5s ease-in-out infinite; }
.float-drift        { animation: float-drift 5s ease-in-out infinite; }

/* Blur & backdrop effects */
.blur-sm            { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.blur-md            { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.blur-lg            { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2         { gap: 8px; }
.gap-3         { gap: 12px; }
.gap-4         { gap: 16px; }
.mt-1          { margin-top: 4px; }
.mt-2          { margin-top: 8px; }
.mt-4          { margin-top: 16px; }
.mt-6          { margin-top: 24px; }
.mb-2          { margin-bottom: 8px; }
.mb-4          { margin-bottom: 16px; }

.w-full        { width: 100%; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opacity-50    { opacity: 0.5; }
.opacity-70    { opacity: 0.7; }

.rounded-full  { border-radius: 99px; }
.rounded-lg    { border-radius: var(--radius-lg); }

/* Smooth shadow utilities */
.shadow-smooth { box-shadow: 0 4px 24px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1); }
.shadow-glow   { box-shadow: var(--shadow-glow); }

/* ============================================================
   SPLASH ANIMATIONS (partagées avec index.html inline)
   ============================================================ */
@keyframes splash-logo-in   { from{opacity:0;transform:scale(0.5) rotate(-10deg)} to{opacity:1;transform:scale(1) rotate(0)} }
@keyframes splash-text-in   { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes splash-bar-in    { from{opacity:0;transform:scaleX(0)} to{opacity:1;transform:scaleX(1)} }
@keyframes pulse-glow       { 0%,100%{transform:translate(-50%,-50%) scale(1);opacity:1} 50%{transform:translate(-50%,-50%) scale(1.15);opacity:0.5} }
@keyframes splash-dot-pulse { from{opacity:0.7} to{opacity:1} }

/* ============================================================
   AI ASSISTANT PANEL (Traxi)
   ============================================================ */
.ai-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 400;
}

.ai-fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #28c97e 50%, var(--accent) 100%);
  background-size: 200% 100%;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 12px 40px rgba(61,232,160,0.4),
    0 0 24px rgba(61,232,160,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all var(--transition-smooth);
  animation: glow-pulse 3s ease-in-out infinite;
  font-size: 22px;
  position: relative;
  overflow: hidden;
}

.ai-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-fab:hover {
  transform: scale(1.15) translateY(-3px);
  box-shadow: 
    0 16px 56px rgba(61,232,160,0.5),
    0 0 32px rgba(61,232,160,0.25),
    inset 0 1px 0 rgba(255,255,255,0.25);
  background-position: right center;
}

/* ============================================================
   SUBSCRIPTION WIDGET
   ============================================================ */
.sub-widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 8px 10px;
  flex-shrink: 0;
  transition: all var(--transition-smooth);
}

.sub-widget:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(61,232,160,0.08);
}

