/* ===== VECTORBOT ANALYTICS SUITE V5.0 PROFESSIONAL ===== */
/* Advanced analytics-grade CSS architecture with professional UI components */
/* Copyright 2024 Vectorbot Development Team */

/* ========================================================================
 * IMPORTANT: ARCHITECTURAL NOTICE
 * ========================================================================
 * This CSS file has reached its optimal size limit (4000+ lines).
 * DO NOT add new styles or rules to this file.
 * 
 * For any new features or component styles:
 * 1. Create a new, purpose-specific CSS file (e.g., feature-name.css)
 * 2. Follow the same design token system and naming conventions
 * 3. Import the new file in your HTML after enterprise-styles.css
 * 4. Keep each new file focused on a single feature/component set
 * 
 * This approach ensures:
 * - Better code maintainability and readability
 * - Easier debugging and version control
 * - Improved performance through selective loading
 * - Clear separation of concerns
 * 
 * Example structure for new files:
 * - token-analysis-styles.css (for token analysis page specific styles)
 * - chart-components.css (for chart/graph related styles)
 * - mobile-enhancements.css (for additional mobile optimizations)
 * ======================================================================== */

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

/* ===== DESIGN TOKENS & VARIABLES ===== */
:root {
  /* Professional Color System */
  --primary-50: #eff6ff; --primary-100: #dbeafe; --primary-200: #bfdbfe;
  --primary-300: #93c5fd; --primary-400: #60a5fa; --primary-500: #3b82f6;
  --primary-600: #2563eb; --primary-700: #1d4ed8; --primary-800: #1e40af;
  --primary-900: #1e3a8a; --primary-950: #172554;
  
  --success-50: #ecfdf5; --success-100: #d1fae5; --success-200: #a7f3d0;
  --success-300: #6ee7b7; --success-400: #34d399; --success-500: #10b981;
  --success-600: #059669; --success-700: #047857; --success-800: #065f46;
  
  --warning-50: #fffbeb; --warning-100: #fef3c7; --warning-200: #fde68a;
  --warning-300: #fcd34d; --warning-400: #fbbf24; --warning-500: #f59e0b;
  --warning-600: #d97706; --warning-700: #b45309; --warning-800: #92400e;
  
  --error-50: #fef2f2; --error-100: #fee2e2; --error-200: #fecaca;
  --error-300: #fca5a5; --error-400: #f87171; --error-500: #ef4444;
  --error-600: #dc2626; --error-700: #b91c1c; --error-800: #991b1b;
  
  --info-50: #f0f9ff; --info-100: #e0f2fe; --info-200: #bae6fd;
  --info-300: #7dd3fc; --info-400: #38bdf8; --info-500: #0ea5e9;
  --info-600: #0284c7; --info-700: #0369a1; --info-800: #075985;
  
  --neutral-50: #f8fafc; --neutral-100: #f1f5f9; --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1; --neutral-400: #94a3b8; --neutral-500: #64748b;
  --neutral-600: #475569; --neutral-700: #334155; --neutral-800: #1e293b;
  --neutral-900: #0f172a; --neutral-950: #020617;
  
  /* Professional Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  --gradient-success: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
  --gradient-warning: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
  --gradient-info: linear-gradient(135deg, var(--info-500) 0%, var(--info-600) 100%);
  --gradient-dark: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-900) 100%);
  --gradient-sidebar: linear-gradient(180deg, var(--neutral-800) 0%, var(--neutral-900) 100%);
  
  /* Professional Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
  
  /* Spacing System (8px grid) */
  --space-0: 0; --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem;
  --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem; --space-20: 5rem;
  
  /* Professional Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Border Radius */
  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; 
  --radius-xl: 1rem; --radius-2xl: 1.5rem; --radius-3xl: 2rem;
  
  /* Animation System */
  --duration-fast: 150ms; --duration-normal: 250ms; --duration-slow: 350ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1); --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-base: 0; --z-dropdown: 1000; --z-sticky: 1020; 
  --z-fixed: 1030; --z-modal: 1040; --z-tooltip: 1070;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--neutral-900);
  background: #FFFFFF !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Focus Management */
:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--neutral-100); border-radius: var(--radius-md); }
::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: var(--radius-md); }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); }

/* ===== ENTERPRISE SUITE LAYOUT ===== */
.enterprise-suite {
  min-height: 100vh;
  background: #ffffff!important;
  display: flex;
  overflow: hidden;
  position: relative;
}

.enterprise-suite::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  display: none!important;
}

/* ===== ENHANCED ENTERPRISE SIDEBAR NAVIGATION ===== */
.sidebar-nav {
  width: 280px;
  background: var(--gradient-sidebar);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: var(--z-fixed);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
  -ms-overflow-style: none;
  backdrop-filter: blur(0px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Enhanced Brand Section */
.sidebar-brand {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  transition: all var(--duration-normal) var(--ease-out);
}

.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--success-500));
  opacity: 0.6;
  border-radius: 1px;
}

.sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.brand-logo-sidebar {
  width: 52px;
  height: 52px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.brand-logo-sidebar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s;
  opacity: 0;
}

.sidebar-brand:hover .brand-logo-sidebar {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 
    0 12px 40px rgba(59, 130, 246, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-brand:hover .brand-logo-sidebar::before {
  opacity: 1;
  transform: rotate(45deg) translate(50%, 50%);
}

.brand-logo-sidebar svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.brand-name {
  font-size: 1.375rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.brand-edition {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.125rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all var(--duration-normal) var(--ease-out);
}

.sidebar-brand:hover .brand-edition {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  transform: translateX(2px);
}

/* Enhanced Navigation Menu */
.nav-menu {
  flex: 1;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.nav-section {
  margin-bottom: 2.5rem;
  position: relative;
}

.nav-section::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.nav-section:first-child::before {
  display: none;
}

.nav-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-section-title::before {
  content: '';
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

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

.nav-item {
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--primary-400), var(--success-400));
  border-radius: 0 2px 2px 0;
  transition: height var(--duration-normal) var(--ease-out);
  opacity: 0;
}

.nav-item.active::before,
.nav-item:hover::before {
  height: 60%;
  opacity: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  margin-left: 0.25rem;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  transition: left 0.6s ease-out;
}

.nav-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1), 
    rgba(255, 255, 255, 0.05)
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateX(8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link:hover::after {
  opacity: 1;
}

.nav-item.active .nav-link {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateX(6px);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-item.active .nav-link::after {
  opacity: 1;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.nav-link:hover .nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-item.active .nav-icon {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Enhanced Sidebar Status */
.sidebar-status {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.sidebar-status::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--success-500));
  opacity: 0.4;
  border-radius: 1px;
}

.status-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.status-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success-500);
  animation: pulse 2s infinite;
  box-shadow: 
    0 0 0 0 rgba(16, 185, 129, 0.7),
    0 0 8px rgba(16, 185, 129, 0.3);
}

.status-indicator.active {
  background: var(--success-500);
}

@keyframes pulse {
  0% { 
    transform: scale(0.95); 
    box-shadow: 
      0 0 0 0 rgba(16, 185, 129, 0.7),
      0 0 8px rgba(16, 185, 129, 0.3);
  }
  70% { 
    transform: scale(1); 
    box-shadow: 
      0 0 0 6px rgba(16, 185, 129, 0),
      0 0 12px rgba(16, 185, 129, 0.2);
  }
  100% { 
    transform: scale(0.95); 
    box-shadow: 
      0 0 0 0 rgba(16, 185, 129, 0),
      0 0 8px rgba(16, 185, 129, 0.3);
  }
}

.status-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  transition: all var(--duration-fast) var(--ease-out);
}

.status-metric:hover {
  transform: translateX(4px);
}

.metric-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-mono);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
}

.metric-value::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

/* Sidebar Social Links */
.sidebar-social {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.social-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  text-align: center;
}

.sidebar-social .social-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sidebar-social .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.sidebar-social .social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--duration-normal) var(--ease-out);
  opacity: 0.3;
}

.sidebar-social .social-link svg {
  width: 18px;
  height: 18px;
  z-index: 1;
  position: relative;
}

.sidebar-social .social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: transparent;
}

.sidebar-social .social-link.twitter:hover {
  background: #1DA1F2;
  color: white;
}

.sidebar-social .social-link.twitter:hover::before {
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
  height: 100%;
}

.sidebar-social .social-link.telegram:hover {
  background: #0088cc;
  color: white;
}

.sidebar-social .social-link.telegram:hover::before {
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
  height: 100%;
}

.sidebar-social .social-link.dexscreener:hover {
  background: #55ACEE;
  color: white;
}

.sidebar-social .social-link.dexscreener:hover::before {
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
  height: 100%;
}

.sidebar-social .social-link.jupiter:hover {
  background: linear-gradient(135deg, #C6F462, #33D9FF);
  color: #141726;
}

.sidebar-social .social-link.jupiter:hover::before {
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
  height: 100%;
}

.sidebar-social .social-link.vector {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(29, 78, 216, 0.2));
  border-color: rgba(59, 130, 246, 0.3);
  color: rgba(96, 165, 250, 1);
}

.sidebar-social .social-link.vector:hover {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.sidebar-social .social-link.vector:hover::before {
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
  height: 100%;
}

.status-metric:hover .metric-value::after {
  opacity: 1;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  .sidebar-nav {
    transform: translateX(-100%);
    transition: transform var(--duration-normal) var(--ease-out);
  }
  
  .sidebar-nav.mobile-open {
    transform: translateX(0);
    box-shadow: 
      8px 0 32px rgba(0, 0, 0, 0.2),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
  
  .nav-link {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
  }
  
  .nav-icon {
    width: 24px;
    height: 24px;
  }
  
  .sidebar-brand {
    padding: 1.5rem;
  }
  
  .brand-logo-sidebar {
    width: 48px;
    height: 48px;
  }
  
  .brand-name {
    font-size: 1.25rem;
  }
  
  .status-card {
    padding: 1rem;
  }
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .brand-logo-sidebar,
  .status-card,
  .status-indicator {
    animation: none !important;
    transition: none !important;
  }
  
  .nav-link:hover,
  .nav-item.active .nav-link {
    transform: none !important;
  }
}

/* Focus States for Better Accessibility */
.nav-link:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

.sidebar-brand:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .nav-link {
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .nav-item.active .nav-link {
    border-color: white;
  }
  
  .status-card {
    border-color: rgba(255, 255, 255, 0.3);
  }
}

/* ===== MAIN DASHBOARD ===== */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #FFFFFF !important;
  /* flush top edge to remove background peek-through */
  border-radius: 0 0 0 2rem;
  margin: 0 0 1rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  position: relative;
  z-index: 1;
}

/* Header Bar */
.header-bar {
  background: white;
  border: none !important;
  border-radius: var(--radius-2xl);
  padding: 2rem;
  margin: 1.5rem 2rem 0 2rem;
  box-shadow: none !important;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.header-title {
  flex: 1;
}

.header-search-section {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding-top: 0.5rem;
}

.header-search-section .search-box-enhanced {
  max-width: 600px;
  width: 100%;
}

.header-title h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
}

.header-subtitle {
  color: var(--neutral-600);
  font-size: 0.875rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-global {
  width: 320px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  background: var(--neutral-50);
  transition: all var(--duration-normal) var(--ease-out);
}

.search-input-global:focus {
  outline: none;
  border-color: var(--primary-500);
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--neutral-400);
  pointer-events: none;
}

.header-controls {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
  align-items: flex-start;
}

.control-btn {
  position: relative;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  background: white;
  color: var(--neutral-600);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.control-btn:hover {
  background: var(--neutral-100);
  border-color: var(--primary-300);
  color: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.control-btn svg {
  width: 18px;
  height: 18px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--error-500);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  background: white;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.user-profile:hover {
  background: var(--neutral-100);
  border-color: var(--primary-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.profile-avatar svg {
  width: 16px;
  height: 16px;
}

.profile-name {
  font-weight: 500;
  color: var(--neutral-700);
}

/* ===== KPI DASHBOARD ===== */
.analytics-dashboard {
  padding: 2rem;
  background: white;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.kpi-card:hover::before {
  left: 100%;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-300);
}

.kpi-card.primary {
  border-left: 4px solid var(--primary-500);
}

.kpi-card.success {
  border-left: 4px solid var(--success-500);
}

.kpi-card.warning {
  border-left: 4px solid var(--warning-500);
}

.kpi-card.info {
  border-left: 4px solid var(--info-500);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.kpi-card.primary .kpi-icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-600);
}

.kpi-card.success .kpi-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-600);
}

.kpi-card.warning .kpi-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-600);
}

.kpi-card.info .kpi-icon {
  background: rgba(14, 165, 233, 0.1);
  color: var(--info-600);
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
}

.kpi-content {
  position: relative;
  z-index: 1;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--neutral-900);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.kpi-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-600);
  margin-bottom: 0.5rem;
}

.kpi-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  display: inline-block;
}

.kpi-change.positive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-700);
}

.kpi-change.negative {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-700);
}

/* ===== CONTROLS BAR ===== */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.time-range-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.time-range-selector label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.select-control {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.select-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.view-density {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-density label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.density-controls {
  display: flex;
  background: white;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.density-btn {
  padding: 0.5rem 0.75rem;
  border: none;
  background: white;
  color: var(--neutral-600);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  border-right: 1px solid var(--neutral-300);
}

.density-btn:last-child {
  border-right: none;
}

.density-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.density-btn.active {
  background: var(--primary-500);
  color: white;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  background: white;
  color: var(--neutral-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

.action-btn.primary {
  background: var(--gradient-primary);
  border-color: var(--primary-600);
  color: white;
}

.action-btn.primary:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px) scale(1.02);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.export-menu {
  position: relative;
}

.export-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--duration-normal) var(--ease-out);
  z-index: var(--z-dropdown);
}

.export-menu:hover .export-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.export-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: var(--neutral-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--duration-normal) var(--ease-out);
}

.export-option:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
  transform: translateX(4px);
}

.export-icon {
  width: 16px;
  height: 16px;
}

/* ===== DATA SECTION ===== */
.data-section {
  flex: 1;
  padding: 0 2rem 2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Enhanced Loading State */
.loading-enterprise {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem;
  min-height: 400px;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
}

.loading-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.loading-spinner-advanced {
  width: 64px;
  height: 64px;
  border: 4px solid var(--neutral-200);
  border-top: 4px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-dots {
  display: flex;
  gap: 0.5rem;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary-500);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.loading-content-advanced {
  text-align: center;
  max-width: 400px;
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.5rem;
}

.loading-subtitle {
  color: var(--neutral-600);
  margin-bottom: 2rem;
}

.loading-progress-advanced {
  width: 100%;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--neutral-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill-advanced {
  height: 100%;
  background: var(--gradient-primary);
  width: 0;
  animation: progress 3s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0; }
  50% { width: 70%; }
  100% { width: 0; }
}

.progress-status {
  font-size: 0.875rem;
  color: var(--neutral-500);
  font-weight: 500;
}

/* ===== DATA TABLE ===== */
.data-table-container {
  flex: 1;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative; /* Added for loading bar positioning */
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

.table-title-section {
  flex: 1;
}

.table-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
}

.table-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--neutral-600);
}

.data-separator {
  color: var(--neutral-400);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.table-search-advanced {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-table {
  width: 300px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  background: white;
  transition: all var(--duration-normal) var(--ease-out);
}

.search-input-table:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  padding: 0.25rem;
  border: none;
  background: none;
  color: var(--neutral-400);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.search-clear:hover {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

.filter-controls {
  display: flex;
  gap: 0.5rem;
}

.filter-btn, .view-options-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  background: white;
  color: var(--neutral-600);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.filter-btn:hover, .view-options-btn:hover {
  background: var(--neutral-100);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.filter-icon, .view-icon {
  width: 16px;
  height: 16px;
}

.table-wrapper-advanced {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 200px); /* Veel hogere tabel container op desktop */
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.data-table-professional {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-header-advanced {
  background: var(--neutral-50);
  border-bottom: 2px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 20;
}

.table-header-advanced th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  background: var(--neutral-50);
  z-index: 20; /* Verhoogd voor betere layering */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Schaduw voor visuele scheiding */
}

.table-header-advanced th.sortable {
  cursor: pointer;
  position: relative;
}

.table-header-advanced th.sortable::after {
  content: '\2195'; /* up-down arrow */
  font-size: 0.7rem;
  margin-left: 4px;
  color: var(--neutral-400);
}

.table-header-advanced th.sortable.sorted-asc::after {
  content: '\2191'; /* up arrow */
  color: var(--primary-600);
}

.table-header-advanced th.sortable.sorted-desc::after {
  content: '\2193'; /* down arrow */
  color: var(--primary-600);
}

.table-body-advanced tr {
  transition: all var(--duration-normal) var(--ease-out);
  border-bottom: 1px solid var(--neutral-100);
}

.table-body-advanced tr:hover {
  background: var(--neutral-50);
  transform: scale(1.005);
  box-shadow: var(--shadow-sm);
}

.table-body-advanced td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--neutral-100);
}

/* Token image in table */
.token-img {
  width: 40px; /* Groter formaat zodat het grootste deel van de cel benut wordt */
  height: 40px;
  object-fit: contain; /* Behoud aspect ratio binnen vierkant */
  border-radius: 6px;  /* Subtiele afronding die past bij de site-stijl */
  margin: 0;           /* Geen extra marge */
  border: 1px solid var(--neutral-200); /* Discreet kader */
  background: var(--neutral-50); /* Lichte achtergrondkleur voor contrast */
  transition: all var(--duration-fast) var(--ease-out);
}

.token-img:hover {
  border-color: var(--primary-300);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Wallet cell */
.wallet-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.wallet-link {
  color: var(--primary-700);
  text-decoration: none;
}
.wallet-link:hover {
  text-decoration: underline;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--neutral-500);
  transition: color var(--duration-fast) var(--ease-out);
}
.copy-btn:hover {
  color: var(--neutral-700);
}
.copy-btn.copied {
  color: var(--success-600);
}

.table-btn {
  display: inline-block;
  padding: 4px 8px;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  text-decoration: none;
}
.table-btn:hover {
  background: var(--primary-100);
}

/* CA cell */
.ca-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.ca-link {
  color: var(--info-700);
  text-decoration: none;
}
.ca-link:hover { text-decoration: underline; }

/* Order type badges */
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.badge.buy {
  background: var(--success-100);
  color: var(--success-700);
}
.badge.sell {
  background: var(--error-100);
  color: var(--error-700);
}

/* ===== NOTIFICATION SYSTEM ===== */
.notification-system {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.notification {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
  position: relative;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
}

.notification-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.notification.success .notification-icon {
  color: var(--success-600);
  }
  
.notification.error .notification-icon {
  color: var(--error-600);
  }

.notification.warning .notification-icon {
  color: var(--warning-600);
  }
  
.notification.info .notification-icon {
  color: var(--info-600);
  }
  
.notification-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--neutral-700);
  line-height: 1.5;
  }
  
.notification-close {
  padding: 0.25rem;
  border: none;
  background: none;
  color: var(--neutral-400);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  }
  
.notification-close:hover {
  background: var(--neutral-100);
  color: var(--neutral-600);
  }
  
.notification-close svg {
  width: 14px;
  height: 14px;
  }

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1050;
  background: var(--neutral-800);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.mobile-menu-toggle:hover {
  background: var(--neutral-700);
  transform: scale(1.05);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1045;
  backdrop-filter: blur(4px);
}

@media (max-width: 1200px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .search-input-global {
    width: 240px;
  }
  
  .controls-bar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .controls-left {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .enterprise-suite {
    flex-direction: row; /* Keep horizontal layout but manage sidebar differently */
  }
  
  .sidebar-nav {
    position: fixed;
    top: 0;
    left: -100%; /* Completely hide by default */
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transition: left var(--duration-normal) var(--ease-out);
    overflow-y: auto;
    transform: translateX(0); /* Ensure no partial visibility */
  }

  .sidebar-nav.mobile-open {
    left: 0;
  }

  .mobile-menu-overlay.active {
    display: block;
  }
  
  .dashboard-main {
    width: 100%;
    border-radius: 0;
    margin: 0;
    padding-left: 0;
  }
  
  .kpi-row {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .search-input-global {
    width: 100%;
  }
  
  .table-toolbar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .search-input-table {
    width: 100%;
  }
  
  .notification-system {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  /* Improve navigation for mobile */
  .nav-section-title {
    font-size: 0.8rem;
    padding: 0.5rem 0;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  /* Make status card more compact on mobile */
  .sidebar-status {
    margin-top: 1rem;
  }

  .status-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .status-metric {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .analytics-dashboard {
    padding: 0.75rem 0.5rem;
  }
  
  .data-section {
    padding: 0 0.5rem 0.75rem;
  }
  
  .header-bar {
    padding: 1.25rem 0.75rem;
    margin: 0.5rem 0.25rem 0 0.25rem;
    border-radius: var(--radius-xl);
  }
  
  .kpi-dashboard-enhanced {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    padding: 1.5rem 1rem;
  }
  
  .controls-left {
    flex-direction: column;
    gap: 1rem;
  }
  
  .view-density {
    flex-direction: column;
    align-items: stretch;
  }
  
  .density-controls {
    justify-content: space-between;
  }

  /* Extra small mobile optimizations */
  .brand-name {
    font-size: 1.1rem;
  }

  .brand-edition {
    font-size: 0.8rem;
  }

  .nav-link {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .status-metrics {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .metric-label {
    font-size: 0.75rem;
  }

  .metric-value {
    font-size: 0.9rem;
  }
}

/* Additional mobile-specific improvements */
@media (max-width: 480px) {
  .mobile-menu-toggle {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.625rem;
  }

  .header-content {
    padding-left: 0;
  }
  
  .header-bar {
    margin: 0.25rem;
    padding: 1rem 0.75rem;
  }
  
  .analytics-dashboard {
    padding: 0.5rem 0.25rem;
  }
  
  .kpi-dashboard-enhanced {
    margin: 0.25rem;
    padding: 1.25rem 0.75rem;
  }

  .sidebar-nav {
    width: 260px;
    left: -100%; /* Completely hide on smaller screens too */
  }

  .brand-logo-sidebar {
    width: 40px;
    height: 40px;
  }

  .brand-logo-sidebar svg {
    width: 20px;
    height: 20px;
  }
}

/* Filter panel */
.filter-panel {
  position: absolute;
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1rem;
  width: 220px;
  z-index: var(--z-tooltip);
}
.filter-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Filter content wrapper - desktop heeft geen speciale styling nodig */
.filter-content {
  /* Desktop: normale flow, geen scroll */
}
.filter-group label {
  display: block;
  font-size: 0.8rem;
  margin: 0.25rem 0;
}
.filter-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}
.filter-apply-btn,
.filter-clear-btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 0.75rem;
  border: 1px solid var(--neutral-300);
  background: var(--neutral-50);
  border-radius: var(--radius-sm);
  cursor: pointer;
  }
.filter-apply-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
}
.filter-clear-btn:hover {
  background: var(--neutral-100);
}

.number-input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
.number-input:focus {
  outline: none;
  border-color: var(--primary-300);
}

.clear-filters-btn {
  background: none;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  color: var(--neutral-700);
}
.clear-filters-btn:hover {
  background: var(--neutral-100);
}
.clear-filters-btn svg {
  width: 16px;
  height: 16px;
  color: var(--neutral-600);
}

/* ===== GLOBAL SITE FOOTER ===== */
.site-footer {
  margin-top: auto;
  background: var(--neutral-100);
  color: var(--neutral-600);
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--neutral-200);
}

.site-footer a {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Offset main content for fixed sidebar on desktop */
@media (min-width: 769px) {
  .enterprise-suite {
    padding-left: 280px !important; /* reserve space for fixed sidebar even if inline style sets padding 0 */
  }
}

/* ===== COLLAPSIBLE SIDEBAR ===== */
.collapse-toggle {
  position: absolute;
  top: 50%;
  right: -18px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: white;
  border: 2px solid var(--neutral-300);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  z-index: var(--z-sticky);
}
.collapse-toggle:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-600);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl);
}
.collapse-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-normal) var(--ease-out);
  color: var(--neutral-600);
}
.collapse-toggle:hover svg {
  color: var(--primary-600);
}
.sidebar-nav.collapsed {
  width: 72px;
}
.sidebar-nav.collapsed .collapse-toggle svg {
  transform: rotate(180deg);
}
.sidebar-nav.collapsed .brand-text,
.sidebar-nav.collapsed .nav-section-title,
.sidebar-nav.collapsed .nav-link span,
.sidebar-nav.collapsed .sidebar-status {
  display: none;
}
@media (min-width: 769px) {
  .enterprise-suite.collapsed {
    padding-left: 72px !important;
  }
}

/* ===== ENHANCED HEADER STYLES ===== */
.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--neutral-600);
  font-size: 0.875rem;
  font-weight: 500;
}

.breadcrumb-icon, .breadcrumb-separator {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.header-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--neutral-200);
}

.header-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.header-metric .metric-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--neutral-900);
  font-family: var(--font-mono);
}

.header-metric .metric-label {
  font-size: 0.75rem;
  color: var(--neutral-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.action-group {
  display: none;
}

.search-box-enhanced {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 0 1rem;
  transition: all var(--duration-normal) var(--ease-out);
  min-width: 400px;
}

.search-box-enhanced:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input-global {
  flex: 1;
  border: none;
  padding: 0.875rem 0;
  font-size: 0.875rem;
  background: transparent;
  color: var(--neutral-900);
}

.search-filter-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--neutral-500);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.search-filter-btn:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.time-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--neutral-900);
  color: white;
  border-radius: var(--radius-lg);
  min-width: 100px;
}

.time-zone {
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: 500;
}

.live-time {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  color: var(--neutral-700);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  min-width: 80px;
}

.control-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.control-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-profile-enhanced {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.user-profile-enhanced:hover {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-lg);
}

.profile-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-text {
  font-size: 0.75rem;
  color: var(--success-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-role {
  font-size: 0.75rem;
  color: var(--primary-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-dropdown svg {
  width: 16px;
  height: 16px;
  color: var(--neutral-500);
  transition: transform var(--duration-normal) var(--ease-out);
}

/* ===== ENHANCED KPI DASHBOARD ===== */
.kpi-dashboard-enhanced {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--neutral-200);
}

.kpi-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--neutral-100);
}

.section-title h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--neutral-600);
  font-size: 1rem;
  font-weight: 500;
}

.refresh-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--success-50);
  border: 2px solid var(--success-200);
  border-radius: var(--radius-xl);
  color: var(--success-700);
  font-weight: 600;
  font-size: 0.875rem;
}

.refresh-indicator.down {
  color: var(--warning-600);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--success-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.kpi-card-enhanced {
  background: white;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.kpi-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--neutral-300);
  transition: all var(--duration-normal) var(--ease-out);
}

.kpi-card-enhanced.primary::before { background: var(--gradient-primary); }
.kpi-card-enhanced.success::before { background: var(--gradient-success); }
.kpi-card-enhanced.warning::before { background: var(--gradient-warning); }
.kpi-card-enhanced.info::before { background: var(--gradient-info); }

.kpi-card-enhanced:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-300);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.kpi-icon-enhanced {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-100);
  color: var(--neutral-600);
  transition: all var(--duration-normal) var(--ease-out);
}

.kpi-card-enhanced.primary .kpi-icon-enhanced {
  background: var(--primary-100);
  color: var(--primary-600);
}

.kpi-card-enhanced.success .kpi-icon-enhanced {
  background: var(--success-100);
  color: var(--success-600);
}

.kpi-card-enhanced.warning .kpi-icon-enhanced {
  background: var(--warning-100);
  color: var(--warning-600);
}

.kpi-card-enhanced.info .kpi-icon-enhanced {
  background: var(--info-100);
  color: var(--info-600);
}

.kpi-icon-enhanced svg {
  width: 28px;
  height: 28px;
}

.kpi-actions {
  display: flex;
  gap: 0.5rem;
}

.kpi-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--neutral-100);
  color: var(--neutral-600);
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
}

.kpi-action-btn:hover {
  background: var(--primary-100);
  color: var(--primary-600);
  transform: scale(1.05);
}

.kpi-action-btn svg {
  width: 18px;
  height: 18px;
}

.kpi-content-enhanced {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kpi-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kpi-value-enhanced {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--neutral-900);
  font-family: var(--font-mono);
  line-height: 1;
}

.kpi-label-enhanced {
  font-size: 1rem;
  color: var(--neutral-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-metadata {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 0.875rem;
}

.kpi-change.positive {
  color: var(--success-600);
}

.kpi-change.negative {
  color: var(--error-600);
}

.change-icon {
  width: 16px;
  height: 16px;
}

.kpi-period {
  font-size: 0.75rem;
  color: var(--neutral-500);
  font-weight: 500;
}

.kpi-sparkline {
  display: flex;
  align-items: end;
  gap: 2px;
  height: 32px;
  margin-top: 0.5rem;
}

.sparkline-bar {
  width: 8px;
  background: var(--neutral-300);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  opacity: 0.7;
}

.kpi-card-enhanced.primary .sparkline-bar { background: var(--primary-400); }
.kpi-card-enhanced.success .sparkline-bar { background: var(--success-400); }
.kpi-card-enhanced.warning .sparkline-bar { background: var(--warning-400); }
.kpi-card-enhanced.info .sparkline-bar { background: var(--info-400); }

.kpi-card-enhanced:hover .sparkline-bar {
  opacity: 1;
  transform: scaleY(1.1);
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  .search-box-enhanced {
    min-width: 280px;
  }
  
  .header-metrics {
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
  }
  
  .header-metric {
    min-width: 0;
    flex: 1;
  }
  
  .metric-value {
    font-size: 1rem;
  }
  
  .metric-label {
    font-size: 0.7rem;
  }
  
  .action-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .kpi-section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .user-profile-enhanced {
    padding: 0.5rem 1rem;
  }
  
  .profile-text {
    display: none;
  }
  
  .control-label {
    display: none;
  }
  
  .time-display {
    min-width: 80px;
  }
}

/* ===== ENHANCED FOOTER STYLES ===== */
.site-footer-enhanced {
  background: var(--gradient-dark);
  color: white;
  margin-top: 3rem;
  border-top: 1px solid var(--neutral-200);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 3rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-logo {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.footer-logo svg {
  width: 24px;
  height: 24px;
}

.footer-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.footer-text p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link:hover {
  color: white;
  transform: translateX(4px);
}

.footer-link::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--primary-400);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.footer-link:hover::before {
  opacity: 1;
}

.footer-metrics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-metric .metric-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.footer-metric .metric-value {
  font-size: 0.875rem;
  color: var(--success-400);
  font-weight: 700;
  font-family: var(--font-mono);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto;
  max-width: 1400px;
}

.footer-copyright {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.3);
}

.footer-badges {
  display: flex;
  gap: 1rem;
}

.security-badge,
.compliance-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--duration-fast) var(--ease-out);
}

.security-badge:hover,
.compliance-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.badge-icon {
  width: 16px;
  height: 16px;
  color: var(--success-400);
}

/* Footer Mobile Responsiveness */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1rem;
  }
  
  .footer-badges {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
  }
  
  .footer-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-badges {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-copyright {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--warning-500) !important;
  color: var(--warning-600) !important;
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: all var(--duration-normal) var(--ease-out);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(180deg);
}

/* ===== DARK THEME VARIABLES ===== */
:root {
  /* Dark theme colors */
  --dark-bg-primary: #0f172a;
  --dark-bg-secondary: #1e293b;
  --dark-bg-tertiary: #334155;
  --dark-text-primary: #f8fafc;
  --dark-text-secondary: #e2e8f0;
  --dark-text-muted: #94a3b8;
  --dark-border: #334155;
  --dark-border-light: #475569;
}

/* ===== DARK THEME STYLES ===== */
body.dark-theme {
  background: var(--dark-bg-primary);
  color: var(--dark-text-primary);
}

.dark-theme .enterprise-suite {
  background: linear-gradient(135deg, #020617 0%, #0f172a 25%, #1e293b 75%, #334155 100%);
}

.dark-theme .dashboard-main {
  background: var(--dark-bg-secondary);
  color: var(--dark-text-primary);
}

.dark-theme .header-bar {
  background: var(--dark-bg-secondary);
  border: 1px solid var(--dark-border);
}

.dark-theme .header-title h1 {
  color: var(--dark-text-primary);
}

.dark-theme .header-subtitle {
  color: var(--dark-text-muted);
}

.dark-theme .header-metric .metric-value {
  color: var(--dark-text-primary);
}

.dark-theme .header-metric .metric-label {
  color: var(--dark-text-muted);
}

.dark-theme .search-box-enhanced {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
}

.dark-theme .search-input-global {
  color: var(--dark-text-primary);
}

.dark-theme .search-input-global::placeholder {
  color: var(--dark-text-muted);
}

.dark-theme .control-btn {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-theme .control-btn:hover {
  background: var(--dark-bg-primary);
  border-color: var(--primary-500);
}

.dark-theme .control-label {
  color: var(--dark-text-muted);
}

.dark-theme .kpi-dashboard-enhanced {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border);
}

.dark-theme .section-title h2 {
  color: var(--dark-text-primary);
}

.dark-theme .section-subtitle {
  color: var(--dark-text-muted);
}

.dark-theme .kpi-card-enhanced {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
}

.dark-theme .kpi-card-enhanced:hover {
  border-color: var(--primary-400);
  background: var(--dark-bg-secondary);
}

.dark-theme .kpi-value-enhanced {
  color: var(--dark-text-primary);
}

.dark-theme .kpi-label-enhanced {
  color: var(--dark-text-muted);
}

.dark-theme .kpi-action-btn {
  background: var(--dark-bg-primary);
  color: var(--dark-text-muted);
}

.dark-theme .data-table-container {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border);
}

.dark-theme .table-title {
  color: var(--dark-text-primary);
}

.dark-theme .data-table-professional {
  background: var(--dark-bg-tertiary);
  color: var(--dark-text-primary);
}

.dark-theme .table-header-advanced {
  background: var(--dark-bg-primary);
  border-bottom: 1px solid var(--dark-border);
}

.dark-theme .table-header-advanced th {
  color: var(--dark-text-secondary);
  border-right: 1px solid var(--dark-border);
  background: var(--dark-bg-primary); /* Achtergrond voor sticky header */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); /* Donkere schaduw voor dark mode */
}

.dark-theme .table-body-advanced tr {
  border-bottom: 1px solid var(--dark-border-light);
}

.dark-theme .table-body-advanced tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.dark-theme .table-body-advanced td {
  color: var(--dark-text-secondary);
  border-right: 1px solid var(--dark-border-light);
}

.dark-theme .search-input-table {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

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

.dark-theme .filter-btn {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-theme .action-btn {
  background: var(--dark-bg-tertiary);
  border-color: var(--dark-border);
  color: var(--dark-text-secondary);
}

.dark-theme .action-btn.primary {
  background: var(--gradient-primary);
  color: white;
}

.dark-theme .loading-enterprise {
  background: var(--dark-bg-secondary);
  color: var(--dark-text-primary);
}

.dark-theme .loading-title {
  color: var(--dark-text-primary);
}

.dark-theme .loading-subtitle {
  color: var(--dark-text-muted);
}

/* Dark theme token image styling */
.dark-theme .token-img {
  border-color: var(--dark-border);
  background: var(--dark-bg-secondary);
}

.dark-theme .token-img:hover {
  border-color: var(--primary-400);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
} 

/* Mobile responsiveness for new header layout */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .header-controls {
    align-self: flex-end;
  }
  
  .header-search-section {
    margin-top: 0.5rem;
  }
  
  .header-search-section .search-box-enhanced {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .header-content {
    gap: 1rem;
  }
  
  .header-controls {
    gap: 0.5rem;
  }
}

/* Tablet responsiveness for header */
@media (max-width: 1024px) {
  .header-bar {
    margin: 1rem 1.5rem 0 1.5rem;
    padding: 1.75rem;
  }
}

/* ===== FINAL OVERRIDES ===== */
/* Force KPI grid in één rij van vier kaarten – desktop */
.kpi-grid {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
}
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible;
    gap: 0.75rem;
  }
  
  /* Smaller KPI cards on mobile */
  .kpi-card-enhanced {
    padding: 1rem;
  }
  
  /* Hide action buttons on mobile to save space */
  .kpi-actions {
    display: none;
  }
  
  /* Smaller icons on mobile */
  .kpi-icon-enhanced {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
  }
  
  .kpi-icon-enhanced svg {
    width: 24px;
    height: 24px;
  }
  
  /* Dynamische tekstgrootte voor KPI waardes op mobiel */
  .kpi-value-enhanced {
    font-size: 1.5rem; /* Default smaller size voor mobiel */
  }
  
  /* Voor zeer lange waardes (12+ karakters) */
  .kpi-value-enhanced[data-length="long"] {
    font-size: 1.25rem;
  }
  
  /* Voor extreem lange waardes (15+ karakters) */
  .kpi-value-enhanced[data-length="extra-long"] {
    font-size: 1rem;
  }
  
  /* Smaller text sizes */
  .kpi-label-enhanced {
    font-size: 0.75rem;
  }
  
  .kpi-change {
    font-size: 0.75rem;
  }
  
  .kpi-period {
    font-size: 0.625rem;
  }
  
  /* Smaller sparkline */
  .kpi-sparkline {
    height: 24px;
    gap: 1px;
  }
  
  .sparkline-bar {
    width: 6px;
  }
  
  /* Reduce gap in content */
  .kpi-content-enhanced {
    gap: 0.75rem;
  }
  
  .kpi-main {
    gap: 0.25rem;
  }
}

/* For very small screens (phones in portrait) */
@media (max-width: 640px) {
  .kpi-dashboard-enhanced {
    padding: 0.75rem;
  }
  
  .kpi-section-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .section-title h2 {
    font-size: 1.25rem;
  }
  
  .section-subtitle {
    font-size: 0.75rem;
  }
  
  .refresh-indicator {
    font-size: 0.75rem;
  }
  
  .kpi-grid {
    grid-template-columns: 1fr !important; /* Single column on very small screens */
    gap: 0.75rem;
  }
  
  /* Horizontal layout for mobile KPI cards */
  .kpi-card-enhanced {
    padding: 0.875rem;
  }
  
  .kpi-header {
    margin-bottom: 0.5rem;
  }
  
  .kpi-content-enhanced {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
  }
  
  .kpi-main {
    order: 1;
  }
  
  .kpi-metadata {
    order: 3;
    grid-column: 1 / -1;
    font-size: 0.6875rem;
  }
  
  .kpi-sparkline {
    order: 2;
    margin-top: 0;
    width: 80px;
  }
  
  /* Even smaller text on very small screens */
  .kpi-value-enhanced {
    font-size: 1.25rem;
  }
  
  .kpi-label-enhanced {
    font-size: 0.6875rem;
    text-transform: none; /* Remove uppercase to save space */
    letter-spacing: normal;
  }
  
  /* Header adjustments for very small screens */
  .header-metrics {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 0;
  }
  
  .header-metric {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.25rem 0;
  }
  
  .metric-value {
    font-size: 0.875rem;
    font-weight: 700;
  }
  
  .metric-label {
    font-size: 0.625rem;
    color: var(--neutral-500);
  }
  
  .status-indicator {
    width: 6px;
    height: 6px;
  }
}

/* ===== LEGACY TOGGLE HIDDEN ===== */
.collapse-toggle{display:none!important;pointer-events:none;}

/* ===== ENTERPRISE SIDEBAR COLLAPSE BUTTON ===== */
.sidebar-collapse-btn{
  position:absolute;
  top:1.5rem;
  right:1.5rem;
  width:40px;height:40px;
  display:flex;align-items:center;justify-content:center;
  border:none;border-radius:var(--radius-lg);
  background:linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.06));
  backdrop-filter:blur(10px);
  color:rgba(255,255,255,.85);
  cursor:pointer;
  transition:all var(--duration-normal) var(--ease-out);
  z-index:var(--z-tooltip);
  box-shadow:0 4px 12px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.25);
  border:1px solid rgba(255,255,255,.15);
}
.sidebar-collapse-btn:hover{
  background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(255,255,255,.1));
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.35);
  border-color:rgba(255,255,255,.25);
}
.sidebar-collapse-btn:active{
  transform:translateY(0);
  box-shadow:0 2px 8px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.15);
}
.sidebar-collapse-btn svg{
  width:18px;height:18px;stroke-width:2.5;
  transition:transform var(--duration-normal) var(--ease-out);
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
/* collapsed position */
.sidebar-nav.collapsed .sidebar-collapse-btn{
  top:auto;bottom:1.5rem;right:50%;transform:translateX(50%);
}
.sidebar-nav.collapsed .sidebar-collapse-btn svg{transform:rotate(180deg);}

@media(max-width:768px){.sidebar-collapse-btn{display:none;}}

/* ===== OVERRIDE DASHBOARD LAYOUT GAPS ===== */
body:not(.dark-theme) .dashboard-main{margin:0!important;background:#ffffff!important;border-radius:0 0 0 2rem!important;}

.dark-theme .enterprise-suite{background:var(--dark-bg-primary)!important;}
.dark-theme .enterprise-suite::before{display:none!important;}

/* ===== DARK THEME GLOBAL OVERRIDES ===== */
.dark-theme body{background:var(--dark-bg-primary)!important;}

/* ===== DARK THEME COMPONENT OVERRIDES ===== */
.dark-theme .user-profile,
.dark-theme .user-profile-enhanced,
.dark-theme .sidebar-collapse-btn,
.dark-theme .mobile-menu-toggle,
.dark-theme .control-btn,
.dark-theme .search-box,
.dark-theme .search-box-enhanced{
  background: var(--dark-bg-tertiary) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text-secondary) !important;
}

.dark-theme .search-input-global,
.dark-theme .search-input-global::placeholder{color: var(--dark-text-secondary)!important;}

.dark-theme .notification {
  background: var(--dark-bg-tertiary) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text-primary) !important;
}

.dark-theme .mobile-menu-overlay { background: rgba(0,0,0,0.7) !important; }

/* ===== ENHANCED MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: calc(var(--z-fixed) + 10);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-900) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  color: white;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  outline: none;
  overflow: hidden;
}

.mobile-menu-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.mobile-menu-toggle:hover {
  background: linear-gradient(135deg, var(--neutral-700) 0%, var(--neutral-800) 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}

.mobile-menu-toggle:hover::before {
  opacity: 1;
}

.mobile-menu-toggle:active {
  transform: translateY(0) scale(1.02);
}

.mobile-menu-toggle.active {
  background: var(--gradient-primary);
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
  transition: transform var(--duration-normal) var(--ease-out);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-menu-toggle.active svg {
  transform: rotate(90deg);
}

/* Enhanced Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: calc(var(--z-fixed) - 1);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Enhanced Navigation Breadcrumb */
.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--neutral-600);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  background: var(--neutral-50);
  border-radius: var(--radius-lg);
  padding-left: 1rem;
  padding-right: 1rem;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.breadcrumb-icon, .breadcrumb-separator {
  width: 16px;
  height: 16px;
  color: var(--neutral-400);
  flex-shrink: 0;
}

.breadcrumb-separator {
  opacity: 0.6;
}

.header-breadcrumb span {
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
}

.header-breadcrumb span:last-child {
  color: var(--primary-600);
  font-weight: 600;
}

.header-breadcrumb span:not(:last-child):hover {
  color: var(--primary-500);
  cursor: pointer;
}

/* Enhanced Search Box */
.search-box-enhanced {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
}

.search-box-enhanced::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.05));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.search-box-enhanced:focus-within {
  border-color: var(--primary-500);
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.1),
    var(--shadow-lg);
  transform: translateY(-1px);
}

.search-box-enhanced:focus-within::before {
  opacity: 1;
}

.search-input-global {
  flex: 1;
  padding: 1rem 1rem 1rem 3rem;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-900);
  background: transparent;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  z-index: 1;
}

.search-input-global::placeholder {
  color: var(--neutral-500);
  font-weight: 400;
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 20px;
  height: 20px;
  color: var(--neutral-400);
  pointer-events: none;
  z-index: 2;
  transition: all var(--duration-normal) var(--ease-out);
}

.search-box-enhanced:focus-within .search-icon {
  color: var(--primary-500);
  transform: scale(1.1);
}

.search-filter-btn {
  padding: 0.75rem;
  border: none;
  background: var(--neutral-100);
  color: var(--neutral-600);
  border-radius: var(--radius-lg);
  margin: 0.25rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.search-filter-btn:hover {
  background: var(--primary-500);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.search-filter-btn svg {
  width: 18px;
  height: 18px;
}

/* Enhanced Menu Item Indicators */
.nav-item[data-has-updates]::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 8px;
  height: 8px;
  background: var(--warning-500);
  border-radius: 50%;
  box-shadow: 
    0 0 0 2px rgba(255, 255, 255, 0.2),
    0 0 8px rgba(245, 158, 11, 0.6);
  animation: pulse 2s infinite;
}

.nav-item[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--error-500);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  box-shadow: 
    0 2px 8px rgba(239, 68, 68, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Enhanced Status Metrics with Animations */
.status-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  border-radius: var(--radius-md);
}

.status-metric::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--primary-400), var(--success-400));
  border-radius: 1px;
  transition: height var(--duration-normal) var(--ease-out);
}

.status-metric:hover {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.05);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.status-metric:hover::before {
  height: 70%;
}

.metric-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-mono);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.metric-value::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--success-400);
  border-radius: 50%;
  box-shadow: 0 0 4px var(--success-400);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.status-metric:hover .metric-value::before {
  opacity: 1;
}

/* Enhanced Tooltip System */
.nav-link[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 1rem);
  top: 50%;
  transform: translateY(-50%);
  background: var(--neutral-900);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-out 0.8s forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Enhanced Loading States */
.nav-item.loading .nav-icon {
  animation: spin 1s linear infinite;
}

.nav-item.loading .nav-link::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced Mobile Responsiveness Improvements */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .dashboard-main {
    margin-left: 0;
    margin-right: 0;
  }
  
  .header-bar {
    margin: 0.75rem 0.5rem 0 0.5rem;
    padding: 1.5rem 1rem;
  }
  
  .kpi-dashboard-enhanced {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  
  .header-breadcrumb {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .search-box-enhanced {
    border-radius: var(--radius-lg);
  }
  
  .search-input-global {
    padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    font-size: 1rem;
  }
  
  .search-icon {
    left: 0.875rem;
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 640px) {
  .mobile-menu-toggle {
    width: 44px;
    height: 44px;
    top: 1rem;
    left: 1rem;
  }
  
  .mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
  }
  
  .header-bar {
    padding: 1.25rem 0.75rem;
    margin: 0.5rem 0.25rem 0 0.25rem;
  }
  
  .header-breadcrumb {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }
  
  .nav-link {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
  }
}

/* ===== MOBILE HEADER COMPONENT ===== */
.mobile-header {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--neutral-800);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-fixed) + 10);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.mobile-header.hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.mobile-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 100%;
  gap: 1rem;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  margin-right: 0.5rem;
}

.mobile-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.2),
    0 0 0 1px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all var(--duration-normal) var(--ease-out);
}

.mobile-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.mobile-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.mobile-brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--neutral-800);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, var(--neutral-800) 0%, var(--primary-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-brand-subtitle {
  font-size: 0.75rem;
  color: var(--neutral-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-header .mobile-menu-toggle {
  position: relative;
  top: auto;
  right: auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--neutral-700);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xl);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0.5rem !important;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.mobile-header .mobile-menu-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.mobile-header .mobile-menu-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: inherit;
}

.mobile-header .mobile-menu-toggle:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-color: var(--primary-400);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(59, 130, 246, 0.25),
    0 4px 12px rgba(59, 130, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mobile-header .mobile-menu-toggle:hover::before {
  opacity: 1;
}

.mobile-header .mobile-menu-toggle:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

.mobile-header .mobile-menu-toggle:active {
  transform: translateY(0) scale(1.02);
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.2),
    0 2px 6px rgba(59, 130, 246, 0.1),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-header .mobile-menu-toggle:active::after {
  transform: scale(0.8);
}

.mobile-header .mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  position: relative;
  z-index: 1;
}

.mobile-header .mobile-menu-toggle:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.mobile-header .mobile-menu-toggle.active svg {
  transform: rotate(90deg) scale(1.1);
}

.mobile-header .mobile-menu-toggle.active {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-color: var(--primary-500);
  color: white;
  box-shadow: 
    0 6px 20px rgba(59, 130, 246, 0.3),
    0 3px 8px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.mobile-header .mobile-menu-toggle.active::before {
  opacity: 0.7;
}

/* Mobile Header Responsive Adjustments */
@media (max-width: 768px) {
  .mobile-header {
    display: block;
  }
  
  .dashboard-main {
    padding-top: 70px; /* Space for fixed mobile header */
  }
  
  .sidebar-nav {
    top: 70px; /* Position below mobile header when open */
    height: calc(100vh - 70px);
  }
  
  .mobile-menu-toggle:not(.mobile-header .mobile-menu-toggle) {
    display: none !important; /* Hide the old floating toggle */
  }
}

@media (max-width: 480px) {
  .mobile-header-content {
    padding: 0.625rem 1.25rem;
    gap: 0.75rem;
  }
  
  .mobile-brand {
    margin-right: 0.25rem;
  }
  
  .mobile-logo {
    width: 36px;
    height: 36px;
  }
  
  .mobile-brand-name {
    font-size: 1rem;
  }
  
  .mobile-brand-subtitle {
    font-size: 0.6875rem;
  }
  
  .mobile-header .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    box-shadow: 
      0 3px 10px rgba(0, 0, 0, 0.06),
      0 1px 3px rgba(0, 0, 0, 0.03),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  
  .mobile-header .mobile-menu-toggle svg {
    width: 18px;
    height: 18px;
  }
  
  .mobile-header .mobile-menu-toggle:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 
      0 6px 18px rgba(59, 130, 246, 0.2),
      0 3px 8px rgba(59, 130, 246, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

/* Extra small screens - additional safety margin */
@media (max-width: 360px) {
  .mobile-header-content {
    padding: 0.625rem 1.25rem;
    gap: 0.5rem;
  }
  
  .mobile-brand {
    margin-right: 0.125rem;
  }
  
  .mobile-brand-text {
    max-width: 180px;
  }
  
  .mobile-header .mobile-menu-toggle {
    width: 38px;
    height: 38px;
    box-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.05),
      0 1px 2px rgba(0, 0, 0, 0.02),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  
  .mobile-header .mobile-menu-toggle svg {
    width: 16px;
    height: 16px;
  }
  
  .mobile-header .mobile-menu-toggle:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
      0 4px 14px rgba(59, 130, 246, 0.18),
      0 2px 6px rgba(59, 130, 246, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

/* Dark Theme Support for Mobile Header */
.dark-theme .mobile-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.dark-theme .mobile-brand-name {
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark-theme .mobile-brand-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

.dark-theme .mobile-header .mobile-menu-toggle {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dark-theme .mobile-header .mobile-menu-toggle::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.dark-theme .mobile-header .mobile-menu-toggle:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-color: var(--primary-400);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(59, 130, 246, 0.3),
    0 4px 12px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark-theme .mobile-header .mobile-menu-toggle.active {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-color: var(--primary-500);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dark-theme .mobile-header .mobile-menu-toggle::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.dark-theme .mobile-header .mobile-menu-toggle:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-color: var(--primary-400);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(59, 130, 246, 0.3),
    0 4px 12px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark-theme .mobile-header .mobile-menu-toggle.active {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-color: var(--primary-500);
}

.table-body-advanced td:first-child {
  padding: 0.5rem; /* Minder marge rond de token-afbeelding */
}