/**
 * ==========================================================================
 * Bharat Photon Enterprise Design System (Photon DS)
 * File: photon-tokens.css
 * Version: 2.1.0 (Enterprise Industrial Specification)
 * Architecture: 3-Tier Design Tokens (Primitive -> Semantic -> Component)
 * ==========================================================================
 */

:root {
  /* ==========================================================================
     TIER 1: PRIMITIVE TOKENS (Raw Core Values)
     ========================================================================== */

  /* Neutral Dark Scale (Anti-Glare Obsidian & Deep Slate Surfaces) */
  --photon-neutral-950: #02050b; /* Ultra-deep canvas black */
  --photon-neutral-900: #060911; /* Default viewport background */
  --photon-neutral-850: #0b1322; /* Card / Surface base */
  --photon-neutral-800: #101b2e; /* Elevated surface / Input field */
  --photon-neutral-750: #16243d; /* Hovered surface / Active tab */
  --photon-neutral-700: #1e2e4a; /* Panel border / Divider */
  --photon-neutral-600: #2d4165; /* Subtle border / Disabled outline */
  --photon-neutral-500: #475569; /* Muted icon / Placeholder */
  --photon-neutral-400: #64748b; /* Secondary helper text */
  --photon-neutral-300: #94a3b8; /* Normal reading text / Subtitles */
  --photon-neutral-200: #cbd5e1; /* Emphasized text / Headings */
  --photon-neutral-100: #f1f5f9; /* High-contrast white-slate */
  --photon-neutral-50:  #ffffff; /* Pure crisp white */

  /* Brand Primary: Electric Photon Cyan & Industrial Blue */
  --photon-cyan-50:   #ecfeff;
  --photon-cyan-100:  #cffafe;
  --photon-cyan-200:  #a5f3fc;
  --photon-cyan-300:  #67e8f9;
  --photon-cyan-400:  #38bdf8; /* Primary Brand Cyan */
  --photon-cyan-500:  #0ea5e9;
  --photon-cyan-600:  #0284c7; /* Primary Brand Action Blue */
  --photon-cyan-700:  #0369a1;
  --photon-cyan-800:  #075985;
  --photon-cyan-900:  #0c4a6e;
  --photon-cyan-950:  #082f49;

  /* Accent: Automation & Serialization Purple */
  --photon-purple-300: #d8b4fe;
  --photon-purple-400: #c084fc;
  --photon-purple-500: #a855f7;
  --photon-purple-600: #9333ea;
  --photon-purple-900: #3b0764;
  --photon-purple-950: #1e0538;

  /* Semantic State: Emerald Success */
  --photon-emerald-300: #6ee7b7;
  --photon-emerald-400: #34d399;
  --photon-emerald-500: #10b981;
  --photon-emerald-600: #059669;
  --photon-emerald-900: #064e3b;
  --photon-emerald-950: #022c22;

  /* Semantic State: Amber Warning */
  --photon-amber-300: #fde68a;
  --photon-amber-400: #fbbf24;
  --photon-amber-500: #f59e0b;
  --photon-amber-600: #d97706;
  --photon-amber-900: #78350f;
  --photon-amber-950: #451a03;

  /* Semantic State: Crimson Danger / Error */
  --photon-rose-300: #fda4af;
  --photon-rose-400: #fb7185;
  --photon-rose-500: #f43f5e;
  --photon-rose-600: #e11d48;
  --photon-rose-900: #881337;
  --photon-rose-950: #4c0519;

  /* ==========================================================================
     TIER 2: SEMANTIC ALIAS TOKENS (Purpose-Driven)
     ========================================================================== */

  /* Surface / Background Roles */
  --ds-surface-bg:        var(--photon-neutral-900);
  --ds-surface-card:      var(--photon-neutral-850);
  --ds-surface-elevated:  var(--photon-neutral-800);
  --ds-surface-hover:     var(--photon-neutral-750);
  --ds-surface-input:     #080e1a;
  --ds-surface-modal:     #0c1424;
  --ds-surface-sidebar:   #080d17;
  --ds-surface-header:    rgba(11, 19, 34, 0.90);

  /* Text Roles */
  --ds-text-primary:      var(--photon-neutral-50);
  --ds-text-secondary:    var(--photon-neutral-300);
  --ds-text-muted:        var(--photon-neutral-400);
  --ds-text-dim:          var(--photon-neutral-500);
  --ds-text-inverse:      var(--photon-neutral-950);
  --ds-text-accent:       var(--photon-cyan-400);
  --ds-text-success:      var(--photon-emerald-400);
  --ds-text-warning:      var(--photon-amber-400);
  --ds-text-danger:       var(--photon-rose-400);

  /* Border & Stroke Roles */
  --ds-border-subtle:     rgba(255, 255, 255, 0.07);
  --ds-border-card:       rgba(255, 255, 255, 0.10);
  --ds-border-hover:      rgba(56, 189, 248, 0.40);
  --ds-border-focus:      var(--photon-cyan-400);
  --ds-border-active:     var(--photon-cyan-500);
  --ds-border-danger:     rgba(244, 63, 94, 0.50);
  --ds-border-success:    rgba(16, 185, 129, 0.50);
  --ds-border-warning:    rgba(245, 158, 11, 0.50);

  /* Interactive Brand Gradients */
  --ds-brand-primary:     linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  --ds-brand-cyan-glow:   linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  --ds-brand-purple-glow: linear-gradient(135deg, #c084fc 0%, #7c3aed 100%);
  --ds-brand-emerald-glow:linear-gradient(135deg, #34d399 0%, #059669 100%);
  --ds-brand-amber-glow:  linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --ds-brand-danger-glow: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);

  /* ==========================================================================
     TIER 3: TYPOGRAPHY, SPACING, RADIUS & SHADOW TOKENS
     ========================================================================== */

  /* Typography Families */
  --ds-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ds-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ds-font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Font Sizes */
  --ds-text-3xs:  9.5px;
  --ds-text-2xs:  11px;
  --ds-text-xs:   12px;
  --ds-text-sm:   13.5px;
  --ds-text-base: 15px;
  --ds-text-md:   16.5px;
  --ds-text-lg:   19px;
  --ds-text-xl:   23px;
  --ds-text-2xl:  28px;
  --ds-text-3xl:  34px;
  --ds-text-4xl:  44px;

  /* Font Weights */
  --ds-weight-light:    300;
  --ds-weight-normal:   400;
  --ds-weight-medium:   500;
  --ds-weight-semibold: 600;
  --ds-weight-bold:     700;
  --ds-weight-extrabold:800;
  --ds-weight-black:    900;

  /* Line Heights */
  --ds-leading-tight:  1.2;
  --ds-leading-snug:   1.35;
  --ds-leading-normal: 1.55;
  --ds-leading-loose:  1.8;

  /* Spacing Scale (4px / 8px Base Modular Unit) */
  --ds-space-4xs: 1px;
  --ds-space-3xs: 2px;
  --ds-space-2xs: 4px;
  --ds-space-xs:  8px;
  --ds-space-sm:  12px;
  --ds-space-md:  16px;
  --ds-space-lg:  20px;
  --ds-space-xl:  24px;
  --ds-space-2xl: 32px;
  --ds-space-3xl: 40px;
  --ds-space-4xl: 48px;
  --ds-space-5xl: 64px;
  --ds-space-6xl: 80px;

  /* Border Radius Scale */
  --ds-radius-2xs: 3px;
  --ds-radius-xs:  5px;
  --ds-radius-sm:  8px;
  --ds-radius-md:  12px;
  --ds-radius-lg:  16px;
  --ds-radius-xl:  22px;
  --ds-radius-2xl: 30px;
  --ds-radius-pill: 9999px;
  --ds-radius-circle: 50%;

  /* Elevation & Shadows */
  --ds-shadow-sm:   0 2px 6px rgba(0, 0, 0, 0.40);
  --ds-shadow-md:   0 8px 22px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--ds-border-subtle);
  --ds-shadow-lg:   0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--ds-border-card);
  --ds-shadow-xl:   0 24px 64px rgba(0, 0, 0, 0.90), 0 0 0 1px rgba(255, 255, 255, 0.14);
  --ds-shadow-glow: 0 0 28px rgba(56, 189, 248, 0.30);
  --ds-shadow-glow-purple: 0 0 28px rgba(168, 85, 247, 0.30);
  --ds-shadow-glow-emerald: 0 0 28px rgba(16, 185, 129, 0.30);
  --ds-shadow-glow-danger: 0 0 28px rgba(244, 63, 94, 0.30);

  /* Z-Index Architecture */
  --ds-z-base:      1;
  --ds-z-card:      10;
  --ds-z-dropdown:  100;
  --ds-z-sticky:    500;
  --ds-z-header:    1000;
  --ds-z-drawer:    2000;
  --ds-z-modal:     5000;
  --ds-z-popover:   8000;
  --ds-z-toast:     10000;
  --ds-z-tooltip:   20000;

  /* Transitions & Animation Easing */
  --ds-transition-instant: 75ms linear;
  --ds-transition-fast:    150ms cubic-bezier(0.4, 0, 0.2, 1);
  --ds-transition-base:    220ms cubic-bezier(0.4, 0, 0.2, 1);
  --ds-transition-smooth:  320ms cubic-bezier(0.16, 1, 0.3, 1);
  --ds-transition-bounce:  450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base High-Performance Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--ds-surface-bg);
  color: var(--ds-text-primary);
  font-family: var(--ds-font-primary);
  font-size: var(--ds-text-base);
  line-height: var(--ds-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--ds-surface-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--photon-neutral-700);
  border-radius: var(--ds-radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--photon-neutral-500);
}
