/**
 * PatriotCompass Admin Console - Design System
 * 
 * This file contains all design tokens (CSS custom properties) for the admin console.
 * These variables ensure consistency across the entire interface.
 * 
 * Organization:
 * 1. Color Palette
 * 2. Typography
 * 3. Spacing System
 * 4. Shadows & Effects
 * 5. Border Radius
 * 6. Transitions
 * 7. Z-Index Scale
 * 8. Breakpoints
 */

:root {
  /* ============================================
     1. COLOR PALETTE
     ============================================ */
  
  /* Primary Brand Colors */
  --patriot-blue: #1e3a8a;        /* Deep blue for headers, primary actions */
  --patriot-blue-light: #3b82f6;  /* Lighter blue for hover states */
  --patriot-blue-dark: #1e40af;   /* Darker blue for active states */
  --patriot-red: #dc2626;          /* Accent red for CTAs, alerts */
  --patriot-red-light: #ef4444;    /* Lighter red for hover */
  --patriot-red-dark: #b91c1c;     /* Darker red for active */
  --patriot-white: #ffffff;        /* Clean backgrounds */
  
  /* Navy Shades (Sidebar) */
  --navy-dark: #0f172a;            /* Dark navy for sidebar background */
  --navy-medium: #1e293b;          /* Medium navy for hover states */
  --navy-light: #334155;           /* Light navy for borders */
  
  /* Slate Shades (Neutral Colors) */
  --slate-50: #f8fafc;             /* Lightest - page background */
  --slate-100: #f1f5f9;            /* Very light - card backgrounds */
  --slate-200: #e2e8f0;            /* Light - borders, dividers */
  --slate-300: #cbd5e1;            /* Medium light - disabled states */
  --slate-400: #94a3b8;            /* Medium - placeholder text */
  --slate-500: #64748b;            /* Medium dark - secondary text */
  --slate-600: #475569;            /* Dark - body text */
  --slate-700: #334155;            /* Darker - headings */
  --slate-800: #1e293b;            /* Very dark - emphasis */
  --slate-900: #0f172a;            /* Darkest - high contrast */
  
  /* Status Colors */
  --success-green: #10b981;        /* Approved, success states */
  --success-green-light: #34d399;  /* Light green for backgrounds */
  --success-green-dark: #059669;   /* Dark green for text */
  --warning-amber: #f59e0b;        /* Pending, warnings */
  --warning-amber-light: #fbbf24;  /* Light amber for backgrounds */
  --warning-amber-dark: #d97706;   /* Dark amber for text */
  --error-red: #ef4444;            /* Errors, rejected */
  --error-red-light: #f87171;      /* Light red for backgrounds */
  --error-red-dark: #dc2626;       /* Dark red for text */
  --info-blue: #3b82f6;            /* Info, links */
  --info-blue-light: #60a5fa;      /* Light blue for backgrounds */
  --info-blue-dark: #2563eb;       /* Dark blue for text */
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-error: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --gradient-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  
  /* Source Brand Colors (for badges) */
  --source-pexels: #05A081;
  --source-pixabay: #2ecc71;
  --source-wikimedia: #3498db;
  --source-nasa: #667eea;
  --source-nps: #56ab2f;
  --source-unsplash: #000000;
  
  
  /* ============================================
     2. TYPOGRAPHY
     ============================================ */
  
  /* Font Families */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px - labels, badges, captions */
  --text-sm: 0.875rem;     /* 14px - secondary text, small buttons */
  --text-base: 1rem;       /* 16px - body text, default */
  --text-lg: 1.125rem;     /* 18px - section headers, large buttons */
  --text-xl: 1.25rem;      /* 20px - page titles, card headers */
  --text-2xl: 1.5rem;      /* 24px - main headings */
  --text-3xl: 1.875rem;    /* 30px - hero text, page headers */
  --text-4xl: 2.25rem;     /* 36px - large display text */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  
  /* ============================================
     3. SPACING SYSTEM (4px base unit)
     ============================================ */
  
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-7: 1.75rem;   /* 28px */
  --space-8: 2rem;      /* 32px */
  --space-9: 2.25rem;   /* 36px */
  --space-10: 2.5rem;   /* 40px */
  --space-11: 2.75rem;  /* 44px */
  --space-12: 3rem;     /* 48px */
  --space-14: 3.5rem;   /* 56px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  
  /* ============================================
     4. SHADOWS & EFFECTS
     ============================================ */
  
  /* Box Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Focus Shadows */
  --shadow-focus-blue: 0 0 0 3px rgba(30, 58, 138, 0.1);
  --shadow-focus-red: 0 0 0 3px rgba(220, 38, 38, 0.1);
  --shadow-focus-green: 0 0 0 3px rgba(16, 185, 129, 0.1);
  
  
  /* ============================================
     5. BORDER RADIUS
     ============================================ */
  
  --radius-none: 0;
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;   /* Fully rounded (pills, circles) */
  
  
  /* ============================================
     6. TRANSITIONS
     ============================================ */
  
  /* Durations */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
  
  /* Timing Functions */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Common Transitions */
  --transition-all: all var(--duration-base) var(--ease-in-out);
  --transition-colors: color var(--duration-base) var(--ease-in-out),
                       background-color var(--duration-base) var(--ease-in-out),
                       border-color var(--duration-base) var(--ease-in-out);
  --transition-transform: transform var(--duration-base) var(--ease-in-out);
  --transition-opacity: opacity var(--duration-base) var(--ease-in-out);
  
  
  /* ============================================
     7. Z-INDEX SCALE
     ============================================ */
  
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  
  /* ============================================
     8. BREAKPOINTS (for reference in JS)
     ============================================ */
  
  --breakpoint-sm: 640px;   /* Small devices (phones) */
  --breakpoint-md: 768px;   /* Medium devices (tablets) */
  --breakpoint-lg: 1024px;  /* Large devices (laptops) */
  --breakpoint-xl: 1280px;  /* Extra large devices (desktops) */
  --breakpoint-2xl: 1536px; /* 2X large devices (large screens) */
  
  
  /* ============================================
     9. LAYOUT DIMENSIONS
     ============================================ */
  
  --header-height: 64px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --content-max-width: 1400px;
  --card-max-width: 1200px;
  
  
  /* ============================================
     10. COMPONENT-SPECIFIC
     ============================================ */
  
  /* Buttons */
  --button-height-sm: 32px;
  --button-height-md: 40px;
  --button-height-lg: 48px;
  
  /* Form Controls */
  --input-height-sm: 32px;
  --input-height-md: 40px;
  --input-height-lg: 48px;
  
  /* Image Cards */
  --image-card-aspect-ratio: 16 / 9;
  --image-card-min-width: 280px;
  --image-card-max-width: 400px;
}

/* ============================================
   DARK MODE SUPPORT (Future Enhancement)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Dark mode variables can be added here in the future */
  /* For now, admin console will be light mode only */
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
