:root {
  /* Colors */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Gray Scale - Light Mode */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic - Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --bg-hover: var(--gray-200);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --border-color: var(--gray-200);
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* Sidebar - Light Mode */
  --sidebar-bg: var(--gray-900);
  --sidebar-text: white;
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --sidebar-active: var(--primary);
  --sidebar-border: var(--gray-800);

  /* Topbar - Light Mode */
  --topbar-bg: #0b3b4a;
  --topbar-text: white;
  --topbar-border: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  --topbar-height: 64px;
  --container-max-width: 1400px;
}

/* ============================================
   DARK MODE
   ============================================ */
.dark-mode {
  /* Semantic - Dark Mode */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16162a;
  --bg-tertiary: #252540;
  --bg-hover: #2a2a45;
  --text-primary: #e5e5e5;
  --text-secondary: #a0a0b0;
  --text-muted: #707080;
  --border-color: #333350;
  --shadow-color: rgba(0, 0, 0, 0.3);

  /* Sidebar - Dark Mode */
  --sidebar-bg: #0f0f1a;
  --sidebar-text: #b0b0c0;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: var(--primary);
  --sidebar-border: #1a1a2e;

  /* Topbar - Dark Mode */
  --topbar-bg: #0f0f1a;
  --topbar-text: #e5e5e5;
  --topbar-border: #333350;

  /* Card backgrounds em dark mode */
  --card-bg: #1e1e35;
  --card-border: #333350;

  /* Input/Select backgrounds */
  --input-bg: #252540;
  --input-border: #333350;
  --input-focus: var(--primary);
}

/* Dark mode specific overrides */
.dark-mode .card {
  background-color: var(--card-bg);
  border-color: var(--card-border);
}

.dark-mode .input-field,
.dark-mode .select,
.dark-mode textarea {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-primary);
}

.dark-mode .input-field:focus,
.dark-mode .select:focus,
.dark-mode textarea:focus {
  border-color: var(--input-focus);
}

.dark-mode .table {
  background-color: var(--card-bg);
}

.dark-mode .table thead {
  background-color: var(--bg-tertiary);
}

.dark-mode .table tbody tr {
  border-color: var(--border-color);
}

.dark-mode .table tbody tr:hover {
  background-color: var(--bg-hover);
}

.dark-mode .dropdown-menu {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.dark-mode .dropdown-item {
  color: var(--text-primary);
}

.dark-mode .dropdown-item:hover {
  background-color: var(--bg-hover);
}

.dark-mode .modal-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

.dark-mode .modal-content {
  background-color: var(--card-bg);
}
