/* ============================================================
   TokensCloud — CSS Variables (Design System Tokens)
   Per frontendguidelines.md — authoritative reference
   ============================================================ */

:root {
    /* ----- Primary Colors ----- */
    --primary: #0066cc;
    --primary-dark: #004c99;
    --primary-light: #cce5ff;

    /* ----- Semantic Colors ----- */
    --success: #28a745;
    --success-light: #d4edda;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --info: #17a2b8;
    --info-light: #d1ecf1;
    --secondary: #6c757d;

    /* ----- Alert Text Colors (light mode, on light backgrounds) ----- */
    --success-text: #0f5132;
    --danger-text: #842029;
    --warning-text: #856404;
    --info-text: #055160;

    /* ----- Gray Scale ----- */
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-400: #adb5bd;
    --gray-500: #868e96;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* ----- Backgrounds ----- */
    --bg-body: #f0f2f5;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-secondary: #e9ecef;
    --bg-hover: #f8f9fa;
    --bg-input: #ffffff;

    /* ----- Text Colors ----- */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --text-muted: var(--gray-400);

    /* ----- Borders ----- */
    --border-color: var(--gray-300);
    --border-color-light: var(--gray-200);
    --border-radius: 4px;
    --border-radius-lg: 6px;

    /* ----- Shadows ----- */
    --box-shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
    --box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --box-shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
    --box-shadow-xl: 0 4px 12px rgba(0,0,0,0.15);

    /* ----- Typography ----- */
    --font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-md: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 24px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;

    /* ----- Spacing ----- */
    --space-1: 4px;
    --space-2: 6px;
    --space-3: 8px;
    --space-4: 10px;
    --space-5: 12px;
    --space-6: 14px;
    --space-7: 16px;
    --space-8: 20px;

    /* ----- Transitions ----- */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* ----- Z-Index ----- */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================================
   Dark Mode
   ============================================================ */
[data-theme="dark"] {
    --primary: #4da3ff;
    --primary-dark: #2196f3;
    --primary-light: #1a3a5c;

    --success: #4caf50;
    --success-light: #1b3d1e;
    --danger: #f44336;
    --danger-light: #3d1b1b;
    --warning: #ffb300;
    --warning-light: #3d3319;
    --info: #29b6f6;
    --info-light: #1a3340;

    --gray-50: #1a1a1a;
    --gray-100: #242424;
    --gray-200: #2d2d2d;
    --gray-300: #3d3d3d;
    --gray-400: #5c5c5c;
    --gray-500: #7a7a7a;
    --gray-600: #999999;
    --gray-700: #b3b3b3;
    --gray-800: #cccccc;
    --gray-900: #e6e6e6;

    --bg-body: #121212;
    --bg-white: #1e1e1e;
    --bg-card: #1e1e1e;
    --bg-secondary: #242424;
    --bg-hover: #2a2a2a;
    --bg-input: #2d2d2d;

    --text-primary: #e6e6e6;
    --text-secondary: #b3b3b3;
    --text-tertiary: #999999;
    --text-muted: #666666;

    --border-color: var(--gray-300);
    --border-color-light: var(--gray-200);
}
