/**
 * Shared Design Tokens (Global CSS Variables)
 * Single source of truth for palette, spacing, typography and stacking.
 *
 * IMPORTANT:
 * - Keep this file loaded BEFORE any other app styles.
 * - Do not redefine these variables in `main.css` / `dashboard-base.css`.
 * - Dashboard-specific files may override tokens (rare, intentional).
 */

:root {
  /* ======================================================================
     Primary palette (canonical)
     ====================================================================== */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-lighter: #a5b4fc;
  --primary-lightest: #e0e7ff;

  /* Secondary / accent */
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #8b5cf6;
  --accent-light: #f3e8ff;

  /* Status colors */
  --success: #10b981;
  --success-dark: #059669;
  --success-light: #34d399;
  --success-lighter: #6ee7b7;
  --success-lightest: #d1fae5;

  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fbbf24;
  --warning-lighter: #fcd34d;
  --warning-lightest: #fef3c7;

  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #f87171;
  --danger-lighter: #fca5a5;
  --danger-lightest: #fee2e2;

  --info: #3b82f6;
  --info-dark: #2563eb;
  --info-light: #60a5fa;
  --info-lighter: #93c5fd;
  --info-lightest: #dbeafe;

  /* ======================================================================
     Grays
     ====================================================================== */
  --dark: #0f172a;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  /* ======================================================================
     Art type colors (used by cultural map)
     ====================================================================== */
  --art-street: #e74c3c;
  --art-music: #3498db;
  --art-visual: #9b59b6;
  --art-design: #2ecc71;
  --art-event: #f39c12;
  --art-other: #95a5a6;

  /* ======================================================================
     Backgrounds
     ====================================================================== */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-hover: #f3f4f6;
  --bg-muted: #f3f4f6;
  --bg-base: #ffffff;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* Text colors */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --text-light: #d1d5db;

  /* Borders */
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --border-dark: #d1d5db;

  /* ======================================================================
     Shadows
     ====================================================================== */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* ======================================================================
     Layout sizes
     ====================================================================== */
  --header-height: 64px;
  --footer-height: 50px;
  --sidebar-width: 320px;
  --sidebar-left-width: var(--sidebar-width);
  --sidebar-right-width: var(--sidebar-width);
  --sidebar-collapsed: 64px;

  /* Border radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Spacing scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Inconsolata", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-base: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* ======================================================================
     Z-index scale (canonical)
     NOTE: values are intentionally spaced to avoid collisions across dashboards.
     Target ranges:
       - Base:            1-999
       - Widgets:         1000-1499
       - Stream panel:    1500-1599
       - Floating windows:1600-1699
       - Modals:          2000-2999
       - Tooltips/dropdowns: 3000-3999
     ====================================================================== */
  --z-sticky: 1100;
  --z-fixed: 1150;
  --z-widget: 1200;
  /* Sidebars (Citizen mobile overlay panels, etc.) */
  --z-sidebar-overlay: 1440;
  --z-sidebar: 1450;
  --z-stream-panel: 1550;
  --z-floating-window: 1650;

  --z-modal-backdrop: 2500;
  --z-modal: 2600;

  --z-dropdown: 3200;
  --z-popover: 3300;
  --z-tooltip: 3400;

  --z-toast: 3900;
  --z-loading: 3950;
  --z-debug-panel: 2800;

  /* Breakpoints (for consistency; JS may read these if needed) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* ======================================================================
     Buttons (canonical sizing tokens)
     ====================================================================== */
  --btn-height-xs: 28px;
  --btn-height-sm: 36px;
  --btn-height-md: 44px;
  --btn-height-lg: 52px;

  --btn-padding-xs: 0.375rem 0.75rem;
  --btn-padding-sm: 0.5rem 1rem;
  --btn-padding-md: 0.75rem 1.25rem;
  --btn-padding-lg: 1rem 1.5rem;

  --btn-font-xs: 0.75rem;
  --btn-font-sm: 0.8125rem;
  --btn-font-md: 0.875rem;
  --btn-font-lg: 1rem;
}


