/**
 * Ganpati Cargo - Design System & Semantic Tokens
 * Version: 2.0 (Modern Logistics UI System)
 * WCAG 2.1 AA Compliant | Light / Dark / Night Shift Modes
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* =======================================================
     1. COLOR PALETTE & SEMANTIC TOKENS (LIGHT THEME)
     ======================================================= */
  /* Brand Primary (Deep Cargo Navy & Electric Indigo) */
  --cargo-primary: #3b5bfd;
  --cargo-primary-hover: #2944d4;
  --cargo-primary-active: #1d32a8;
  --cargo-primary-subtle: rgba(59, 91, 253, 0.10);
  --cargo-primary-border: rgba(59, 91, 253, 0.25);

  /* Semantic Status Colors */
  --cargo-success: #10b981;
  --cargo-success-hover: #059669;
  --cargo-success-subtle: rgba(16, 185, 129, 0.12);
  --cargo-success-border: rgba(16, 185, 129, 0.28);

  --cargo-warning: #f59e0b;
  --cargo-warning-hover: #d97706;
  --cargo-warning-subtle: rgba(245, 158, 11, 0.14);
  --cargo-warning-border: rgba(245, 158, 11, 0.30);

  --cargo-info: #0ea5e9;
  --cargo-info-hover: #0284c7;
  --cargo-info-subtle: rgba(14, 165, 233, 0.12);
  --cargo-info-border: rgba(14, 165, 233, 0.28);

  --cargo-danger: #ef4444;
  --cargo-danger-hover: #dc2626;
  --cargo-danger-subtle: rgba(239, 68, 68, 0.12);
  --cargo-danger-border: rgba(239, 68, 68, 0.28);

  /* Neutral Backgrounds & Surfaces (Light) */
  --cargo-bg-app: #f4f6f9;
  --cargo-bg-surface: #ffffff;
  --cargo-bg-surface-subtle: #f8fafc;
  --cargo-bg-surface-elevated: #ffffff;
  --cargo-bg-input: #ffffff;

  /* Text & Content (Light) */
  --cargo-text-primary: #0f172a;
  --cargo-text-secondary: #475569;
  --cargo-text-muted: #64748b;
  --cargo-text-inverted: #ffffff;

  /* Borders & Dividers (Light) */
  --cargo-border-subtle: #e2e8f0;
  --cargo-border-medium: #cbd5e1;
  --cargo-border-strong: #94a3b8;

  /* Elevation Shadows (Light) */
  --cargo-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --cargo-shadow-sm: 0 2px 5px rgba(15, 23, 42, 0.06);
  --cargo-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --cargo-shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.12);
  --cargo-shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.16);

  /* =======================================================
     2. TYPOGRAPHY SCALE
     ======================================================= */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.84375rem;  /* 13.5px */
  --text-base: 0.9375rem; /* 15px */
  --text-md: 1.0625rem;   /* 17px */
  --text-lg: 1.1875rem;   /* 19px */
  --text-xl: 1.375rem;    /* 22px */
  --text-2xl: 1.625rem;   /* 26px */
  --text-3xl: 2rem;       /* 32px */

  /* =======================================================
     3. 8-POINT SPATIAL SCALE & RADII
     ======================================================= */
  --space-05: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =======================================================
   4. LOGISTICS NIGHT / DARK MODE TOKENS
   ======================================================= */
[data-theme="dark"] {
  --cargo-primary: #5373ff;
  --cargo-primary-hover: #3b5bfd;
  --cargo-primary-active: #7690ff;
  --cargo-primary-subtle: rgba(83, 115, 255, 0.18);
  --cargo-primary-border: rgba(83, 115, 255, 0.35);

  --cargo-success: #10b981;
  --cargo-success-hover: #34d399;
  --cargo-success-subtle: rgba(16, 185, 129, 0.18);
  --cargo-success-border: rgba(16, 185, 129, 0.38);

  --cargo-warning: #f59e0b;
  --cargo-warning-hover: #fbbf24;
  --cargo-warning-subtle: rgba(245, 158, 11, 0.20);
  --cargo-warning-border: rgba(245, 158, 11, 0.40);

  --cargo-info: #38bdf8;
  --cargo-info-hover: #7dd3fc;
  --cargo-info-subtle: rgba(56, 189, 248, 0.18);
  --cargo-info-border: rgba(56, 189, 248, 0.38);

  --cargo-danger: #f87171;
  --cargo-danger-hover: #ef4444;
  --cargo-danger-subtle: rgba(248, 113, 113, 0.18);
  --cargo-danger-border: rgba(248, 113, 113, 0.38);

  /* Deep Night Warehouse Surfaces */
  --cargo-bg-app: #090d16;
  --cargo-bg-surface: #111726;
  --cargo-bg-surface-subtle: #172033;
  --cargo-bg-surface-elevated: #1d273e;
  --cargo-bg-input: #0f1524;

  /* High Contrast Text for Docks */
  --cargo-text-primary: #f8fafc;
  --cargo-text-secondary: #cbd5e1;
  --cargo-text-muted: #8896ab;
  --cargo-text-inverted: #0f172a;

  /* Dark Borders */
  --cargo-border-subtle: #1e293b;
  --cargo-border-medium: #2b3952;
  --cargo-border-strong: #3d4f70;

  /* Deep Elevation Shadows */
  --cargo-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --cargo-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.5);
  --cargo-shadow-md: 0 6px 16px rgba(0, 0, 0, 0.6);
  --cargo-shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.7);
  --cargo-shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.8);
}

/* Base Body Application */
body {
  font-family: var(--font-sans);
  background-color: var(--cargo-bg-app);
  color: var(--cargo-text-primary);
  letter-spacing: -0.011em;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Number & Docket Specific Typography */
.font-mono-numbers,
.docket-no,
.tracking-no {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' on, 'zero' on;
  letter-spacing: -0.02em;
}

/* Headings Enhancement */
h1, h2, h3, h4, h5, h6, .page-title {
  font-family: var(--font-sans);
  color: var(--cargo-text-primary);
  font-weight: 700;
  letter-spacing: -0.025em;
}
