/* ═══════════════════════════════════════════════════════════════════════
   VSHRED AI PLATFORM — DESIGN TOKENS
   Creative Director: Phase 0 Design Foundation
   
   All CSS custom properties for the VShred dark-theme dashboard.
   These tokens are the single source of truth for all visual decisions.
   Engineers: DO NOT hardcode values. Use these tokens everywhere.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ─────────────────────────────────────────────────────────────────────
     COLOR SYSTEM
     Layered dark theme with purposeful color hierarchy.
     Background layers create depth without relying on drop shadows alone.
     ───────────────────────────────────────────────────────────────────── */

  /* Brand Primary — VShred Red */
  --color-primary: #E31837;
  --color-primary-dark: #B8132C;
  --color-primary-light: #FF2D4D;
  --color-primary-glow: rgba(227, 24, 55, 0.4);
  --color-primary-subtle: rgba(227, 24, 55, 0.08);
  --color-primary-muted: rgba(227, 24, 55, 0.15);

  /* Background Layers — Darkest to lightest surface */
  --color-bg-deepest: #080808;
  --color-bg-base: #0D0D0D;
  --color-bg-raised: #141414;
  --color-bg-surface: #1A1A1A;
  --color-bg-elevated: #222222;
  --color-bg-overlay: #2A2A2A;

  /* Border System */
  --color-border-subtle: #1E1E1E;
  --color-border-default: #2D2D2D;
  --color-border-strong: #3A3A3A;
  --color-border-focus: var(--color-primary);
  --color-border-error: #E74C3C;
  --color-border-success: #2ECC71;

  /* Text Hierarchy */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-tertiary: #888888;
  --color-text-muted: #555555;
  --color-text-disabled: #3A3A3A;
  --color-text-inverse: #0D0D0D;
  --color-text-on-primary: #FFFFFF;

  /* Semantic Colors */
  --color-success: #2ECC71;
  --color-success-subtle: rgba(46, 204, 113, 0.1);
  --color-success-muted: rgba(46, 204, 113, 0.2);
  --color-warning: #FFD23F;
  --color-warning-subtle: rgba(255, 210, 63, 0.1);
  --color-warning-muted: rgba(255, 210, 63, 0.2);
  --color-danger: #E74C3C;
  --color-danger-subtle: rgba(231, 76, 60, 0.1);
  --color-danger-muted: rgba(231, 76, 60, 0.2);
  --color-info: #3498DB;
  --color-info-subtle: rgba(52, 152, 219, 0.1);
  --color-info-muted: rgba(52, 152, 219, 0.2);

  /* Accent Colors — Energy palette */
  --color-accent-orange: #FF6B35;
  --color-accent-yellow: #FFD23F;
  --color-accent-blue: #3498DB;
  --color-accent-purple: #9B59B6;

  /* Gradients */
  --gradient-fire: linear-gradient(135deg, #E31837 0%, #FF6B35 100%);
  --gradient-energy: linear-gradient(135deg, #E31837 0%, #FFD23F 100%);
  --gradient-dark-surface: linear-gradient(180deg, #1A1A1A 0%, #141414 100%);
  --gradient-dark-bg: linear-gradient(180deg, #141414 0%, #0D0D0D 100%);
  --gradient-glow: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  --gradient-shimmer: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);

  /* ─────────────────────────────────────────────────────────────────────
     TYPOGRAPHY
     Oswald: Headlines (commanding, athletic)
     Montserrat: UI Labels & Subheadings (structured, clean)
     Inter: Body text (readable, professional)
     ───────────────────────────────────────────────────────────────────── */

  /* Font Families */
  --font-display: 'Oswald', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Font Sizes — modular scale (1.25 ratio) */
  --text-xs: 0.6875rem;    /* 11px — micro labels */
  --text-sm: 0.8125rem;    /* 13px — secondary text */
  --text-base: 0.9375rem;  /* 15px — body text */
  --text-md: 1rem;         /* 16px — emphasized body */
  --text-lg: 1.125rem;     /* 18px — large body */
  --text-xl: 1.25rem;      /* 20px — small headings */
  --text-2xl: 1.5rem;      /* 24px — section headings */
  --text-3xl: 2rem;        /* 32px — page headings */
  --text-4xl: 2.5rem;      /* 40px — hero/metric values */
  --text-5xl: 3rem;        /* 48px — display */

  /* Font Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --leading-loose: 1.8;

  /* Letter Spacing */
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.08em;
  --tracking-widest: 0.12em;
  --tracking-display: 0.15em;

  /* ─────────────────────────────────────────────────────────────────────
     SPACING SCALE
     8px base unit. Consistent rhythm across all layouts.
     ───────────────────────────────────────────────────────────────────── */

  --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-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* ─────────────────────────────────────────────────────────────────────
     BORDER RADII
     Rounded but not bubbly. Purposeful softness.
     ───────────────────────────────────────────────────────────────────── */

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* ─────────────────────────────────────────────────────────────────────
     SHADOWS
     Layered shadows for depth on dark backgrounds.
     Uses color-tinted shadows for more natural feel.
     ───────────────────────────────────────────────────────────────────── */

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-glow-red: 0 0 20px var(--color-primary-glow), 0 0 60px rgba(227, 24, 55, 0.15);
  --shadow-glow-success: 0 0 20px rgba(46, 204, 113, 0.3);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  --shadow-card: 0 0 0 1px var(--color-border-subtle), var(--shadow-md);
  --shadow-card-hover: 0 0 0 1px var(--color-primary), var(--shadow-lg), var(--shadow-glow-red);

  /* ─────────────────────────────────────────────────────────────────────
     TRANSITIONS & ANIMATIONS
     Consistent motion language. Fast feedback, smooth movement.
     ───────────────────────────────────────────────────────────────────── */

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Standard transition properties */
  --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);

  /* ─────────────────────────────────────────────────────────────────────
     Z-INDEX SCALE
     Predictable layering system.
     ───────────────────────────────────────────────────────────────────── */

  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-sidebar: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;
  --z-max: 9999;

  /* ─────────────────────────────────────────────────────────────────────
     LAYOUT
     Fixed dimensions for predictable dashboard layout.
     ───────────────────────────────────────────────────────────────────── */

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 60px;
  --content-max-width: 1400px;
  --content-padding: var(--space-8);
  --content-padding-mobile: var(--space-4);

  /* ─────────────────────────────────────────────────────────────────────
     BREAKPOINTS
     Mobile-first. Values for reference — use in media queries directly.
     375px (mobile) → 768px (tablet) → 1024px (desktop) → 1440px (wide)
     ───────────────────────────────────────────────────────────────────── */
  /* These can't be used in media queries directly but serve as documentation:
     --bp-mobile: 375px;
     --bp-tablet: 768px;
     --bp-desktop: 1024px;
     --bp-wide: 1440px;
  */

  /* ─────────────────────────────────────────────────────────────────────
     COMPONENT-SPECIFIC TOKENS
     Scoped values for key UI components.
     ───────────────────────────────────────────────────────────────────── */

  /* Buttons */
  --btn-height-sm: 32px;
  --btn-height-md: 40px;
  --btn-height-lg: 48px;
  --btn-padding-sm: var(--space-2) var(--space-4);
  --btn-padding-md: var(--space-3) var(--space-5);
  --btn-padding-lg: var(--space-4) var(--space-8);
  --btn-radius: var(--radius-md);
  --btn-font-size: var(--text-sm);
  --btn-font-weight: var(--weight-semibold);
  --btn-letter-spacing: var(--tracking-wide);

  /* Inputs */
  --input-height: 44px;
  --input-padding: var(--space-3) var(--space-4);
  --input-radius: var(--radius-md);
  --input-border-width: 1.5px;
  --input-bg: var(--color-bg-base);
  --input-border: var(--color-border-default);
  --input-border-focus: var(--color-primary);
  --input-text: var(--color-text-primary);
  --input-placeholder: var(--color-text-muted);

  /* Cards */
  --card-bg: var(--color-bg-surface);
  --card-border: var(--color-border-subtle);
  --card-radius: var(--radius-xl);
  --card-padding: var(--space-6);
  --card-padding-compact: var(--space-4);

  /* Table */
  --table-header-bg: var(--color-bg-elevated);
  --table-row-hover: var(--color-primary-subtle);
  --table-border: var(--color-border-subtle);

  /* Sidebar */
  --sidebar-bg: var(--color-bg-surface);
  --sidebar-border: var(--color-border-subtle);
  --sidebar-item-hover: var(--color-primary-subtle);
  --sidebar-item-active: var(--color-primary-muted);

  /* Toast */
  --toast-bg: var(--color-bg-elevated);
  --toast-border: var(--color-border-default);
  --toast-radius: var(--radius-lg);
  --toast-shadow: var(--shadow-xl);
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMATION KEYFRAMES
   Reusable animations referenced across components.
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

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

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-primary-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
