/**
 * CSS Variables - Universal Design System
 * All color, spacing, and design tokens
 */

:root {
  /* ==================== COLOR PALETTE ==================== */

  /* Primary Colors */
  --primary-color: #58c2f3;
  --primary-hover: #0ea8e6;
  --primary-light: #e6f7ff;
  --primary-dark: #0284c7;

  /* Secondary Colors */
  --secondary-color: #6c757d;
  --secondary-hover: #545b62;
  --secondary-light: #f8f9fa;

  /* State Colors */
  --success-color: #10b981;
  --success-hover: #059669;
  --success-light: #d1fae5;
  --success-dark: #065f46;

  --error-color: #ef4444;
  --error-hover: #dc2626;
  --error-light: #fee2e2;
  --error-dark: #991b1b;

  --warning-color: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: #fef3c7;
  --warning-dark: #92400e;

  --info-color: #3bf6f6;
  --info-hover: #06b6d4;
  --info-light: #cffafe;
  --info-dark: #155e75;

  /* Neutral Colors - Light Mode */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9ff;
  --bg-hover: #f9fafb;

  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-tertiary: #4b5563;
  --text-muted: #6b7280;
  --text-disabled: #9ca3af;

  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --border-dark: #d1d5db;

  /* Sidebar Colors */
  --sidebar-bg: #ffffff;
  --sidebar-text: #374151;
  --sidebar-text-muted: #6b7280;
  --sidebar-hover: #f3f4f6;
  --sidebar-border: #000000;
  --sidebar-shadow: rgba(0, 0, 0, 0.1);

  /* Special UI Colors */
  --overlay-bg: rgba(0, 0, 0, 0.5);
  --overlay-light: rgba(0, 0, 0, 0.3);
  --overlay-heavy: rgba(0, 0, 0, 0.7);

  /* Activity & Status */
  --activity-bg: #f0f1ff;
  --card-hover-bg: #f9fafb;

  /* Footer */
  --footer-bg: #f8f9ff;
  --footer-text: #374151;
  --footer-border: #e2e8f0;

  /* Zoom/Video Colors */
  --zoom-blue: #0e71eb;
  --zoom-hover: #084ce8;
  --zoom-bg: #f4f4f5;
  --zoom-sidebar: #ffffff;
  --zoom-border: #e5e7eb;
  --video-bg: #232323;
  --control-bg: rgba(0, 0, 0, 0.7);

  /* ==================== SHADOWS ==================== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);

  /* ==================== SPACING ==================== */
  --space-xs: 0.25rem; /* 4px */
  --space-sm: 0.5rem; /* 8px */
  --space-md: 0.75rem; /* 12px */
  --space-base: 1rem; /* 16px */
  --space-lg: 1.5rem; /* 24px */
  --space-xl: 2rem; /* 32px */
  --space-2xl: 2.5rem; /* 40px */
  --space-3xl: 3rem; /* 48px */

  /* ==================== BORDER RADIUS ==================== */
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.375rem; /* 6px */
  --radius-base: 0.5rem; /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --radius-xl: 1rem; /* 16px */
  --radius-2xl: 1.5rem; /* 24px */
  --radius-full: 9999px;

  /* ==================== TYPOGRAPHY ==================== */
  --font-family-base: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-family-mono: "Courier New", monospace;

  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem; /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* ==================== TRANSITIONS ==================== */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-cubic: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* ==================== Z-INDEX ==================== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-max: 9999;

  /* ==================== BREAKPOINTS ==================== */
  --breakpoint-xs: 320px;
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* ==================== TABLE HIGHLIGHTS ==================== */
  --highlight-new-bg: rgba(56, 161, 105, 0.1);
  --highlight-new-border: var(--success-color);
  --highlight-updated-bg: rgba(245, 158, 11, 0.1);
  --highlight-updated-border: var(--warning-color);
}

/* ==================== DARK MODE ==================== */
[data-bs-theme="dark"] {
  /* Backgrounds */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-hover: #475569;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #94a3b8;
  --text-disabled: #64748b;

  /* Borders */
  --border-color: #334155;
  --border-light: #475569;
  --border-dark: #1e293b;

  /* Sidebar */
  --sidebar-bg: #1e293b;
  --sidebar-text: #f1f5f9;
  --sidebar-text-muted: #cbd5e1;
  --sidebar-hover: #334155;
  --sidebar-shadow: rgba(0, 0, 0, 0.3);

  /* Special */
  --activity-bg: #475569;
  --card-hover-bg: #475569;
  --overlay-bg: rgba(0, 0, 0, 0.7);

  /* Footer */
  --footer-bg: #1e293b;
  --footer-text: #cbd5e1;
  --footer-border: #334155;

  /* Zoom/Video */
  --zoom-bg: #1f1f1f;
  --zoom-sidebar: #2d2d30;
  --zoom-border: #404040;
  --video-bg: #0f0f0f;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);

  /* Alert adjustments for dark mode */
  --success-light: #0f2419;
  --success-dark: #75dd99;
  --error-light: #2c0b0e;
  --error-dark: #ea868f;
  --warning-light: #332701;
  --warning-dark: #ffda6a;
  --info-light: #032830;
  --info-dark: #6edff6;

  /* Table Highlights */
  --highlight-new-bg: rgba(56, 161, 105, 0.2);
  --highlight-new-border: var(--success-color);
  --highlight-updated-bg: rgba(245, 158, 11, 0.2);
  --highlight-updated-border: var(--warning-color);
}

/* ==================== GRADIENTS ==================== */
:root {
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-info: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --gradient-secondary: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}
