/* Design tokens — CSS custom properties for the Agent Gateway dashboard */
/* FORCED PREMIUM DARK THEME (Approved Pivot 2026-02-22) */

:root {
  /* --- Palette (raw values) --- */
  --palette-slate-50: #f8fafc;
  --palette-slate-100: #f1f5f9;
  --palette-slate-200: #e2e8f0;
  --palette-slate-250: #ccd6e0;
  --palette-slate-300: #cbd5e1;
  --palette-slate-400: #94a3b8;
  --palette-slate-500: #64748b;
  --palette-slate-600: #475569;
  --palette-slate-700: #334155;
  --palette-slate-800: #1e293b;
  --palette-slate-900: #0f172a;
  --palette-slate-950: #020617;

  --palette-emerald-400: #34d399;
  --palette-emerald-500: #10b981;
  --palette-red-400: #f87171;
  --palette-red-500: #ef4444;
  --palette-amber-400: #fbbf24;
  --palette-amber-500: #f59e0b;
  --palette-blue-400: #60a5fa;
  --palette-blue-500: #3b82f6;

  /* --- Semantic colour tokens (Forced Premium Dark Mode) --- */
  --color-bg: #101922;
  --color-surface: #161b26;
  --color-surface-2: #1c212e;
  --color-surface-3: #2d333b;
  --color-surface-hover: #1c212e;
  --color-border: #2d333b;
  --color-border-subtle: #1c212e;

  /* Text: Forced to high contrast slate */
  --color-text: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-tertiary: #64748b;
  --color-text-inverse: #020617;

  /* Accent (default to the Stitch blue) */
  --color-accent: #0d7ff2;
  --color-accent-dark: #3b82f6;
  --color-accent-hover: #0b6be0;
  --color-accent-muted: rgba(13, 127, 242, 0.2);
  --color-accent-text: #0d7ff2;

  /* Status colours */
  --color-success: var(--palette-emerald-500);
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-success-text: var(--palette-emerald-400);
  --color-danger: var(--palette-red-500);
  --color-danger-bg: rgba(239, 68, 68, 0.1);
  --color-danger-text: var(--palette-red-400);
  --color-warning: var(--palette-amber-500);
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-warning-text: var(--palette-amber-400);
  --color-info: var(--palette-blue-500);
  --color-info-bg: rgba(59, 130, 246, 0.1);
  --color-info-text: var(--palette-blue-400);

  /* --- Sidebar (Premium Dark High-Contrast) --- */
  --sidebar-width: 260px;
  --sidebar-bg: rgba(11, 15, 26, 0.5);
  --sidebar-text: #f1f5f9;  /* Forced high contrast */
  --sidebar-text-secondary: #94a3b8;
  --sidebar-border: rgba(45, 51, 59, 0.3);
  --sidebar-active-bg: rgba(13, 127, 242, 0.1);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
  --sidebar-active-text: #0d7ff2;

  /* --- Spacing scale --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* --- Typography --- */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --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;
  --leading-tight: 1.25;
  --leading-normal: 1.5;

  /* --- Radius — specifically ROUND_EIGHT requested by the theme --- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;   /* Round Eight */
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* --- Shadows (Premium Dark) --- */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);

  /* --- Transitions --- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Z-index scale --- */
  --z-sidebar: 40;
  --z-modal: 50;
  --z-toast: 60;
}

/* --- Light mode overrides --- */
html.light {
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-surface-2: #f8fafc;
  --color-surface-3: #e2e8f0;
  --color-surface-hover: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;

  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-text-tertiary: #475569;
  --color-text-inverse: #f8fafc;

  --sidebar-bg: rgba(255, 255, 255, 0.8);
  --sidebar-text: #0f172a;
  --sidebar-text-secondary: #475569;
  --sidebar-border: rgba(226, 232, 240, 0.8);
  --sidebar-active-bg: rgba(13, 127, 242, 0.08);
  --sidebar-hover-bg: rgba(0, 0, 0, 0.04);
  --sidebar-active-text: #0d7ff2;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
