/**
 * GPCC Design System Tokens - Single Source of Truth
 * CSS Custom Properties for consistent theming (Dark Theme)
 */

:root {
  /* === BASE COLORS (Primary Source) === */
  --bg: #0B1220;
  --surface-1: #111A33;
  --surface-2: #1A2642;
  --surface-3: #233451;
  --border: #334155;
  --text: #E5EAF3;
  --text-muted: #94A3B8;
  --text-soft: #64748B;
  
  /* === BRAND COLORS === */
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-soft: rgba(59, 130, 246, 0.1);
  --secondary: #8B5CF6;
  --secondary-hover: #7C3AED;
  --secondary-soft: rgba(139, 92, 246, 0.1);
  
  /* === STATE COLORS === */
  --success: #10B981;
  --success-hover: #059669;
  --success-soft: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-hover: #D97706;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --danger: #EF4444;
  --danger-hover: #DC2626;
  --info: #06B6D4;
  --info-hover: #0891B2;
  
  /* === SEMANTIC COLORS === */
  --header-bg: var(--surface-1);
  --footer-bg: var(--surface-1);
  --card-bg: var(--surface-2);
  --card-hover-bg: var(--surface-3);
  --overlay: rgba(11, 18, 32, 0.8);
  --focus-ring: #60A5FA;
  --action-download: var(--success);
  --action-download-hover: var(--success-hover);
  
  /* === TYPOGRAPHY === */
  --font-family: system-ui, -apple-system, "Segoe UI", "Roboto", "Ubuntu", "Cantarell", "Noto Sans", sans-serif;
  --font-mono: "SFMono-Regular", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  
  /* Font weights */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Type scale */
  --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;
  
  /* Line heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* === LAYOUT === */
  --container: 1280px;
  --sidebar-width: 320px;
  --gap: 24px;
  --gap-xs: 6px;
  --gap-sm: 12px;
  --gap-lg: 32px;
  --gap-xl: 48px;
  
  /* === RADIUS === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  
  /* === TRANSITIONS === */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  
  /* === COMPATIBILITY ALIASES (temporary) === */
  --color-bg: var(--bg);
  --color-text: var(--text);
  --color-brand: var(--primary);
  --color-accent: var(--secondary);
  --color-muted: var(--text-muted);
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
  }
  
  *, 
  *::before, 
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border: #64748B;
    --text-muted: #CBD5E1;
    --focus-ring: #93C5FD;
  }
}

/* === PRINT STYLES === */
@media print {
  :root {
    --bg: white;
    --surface-1: white;
    --surface-2: #F8FAFC;
    --surface-3: #F1F5F9;
    --text: #1E293B;
    --text-muted: #475569;
    --border: #CBD5E1;
    --primary: #1E40AF;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
}