/* ==========================================================================
   DESIGN TOKENS - ProxWide Design System
   ========================================================================== */

:root {
    /* ========================================
       SPACING
       ======================================== */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* ========================================
       RADIUS
       ======================================== */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* ========================================
       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-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);

    /* ========================================
       TYPOGRAPHY
       ======================================== */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;

    /* ========================================
       TRANSITIONS
       ======================================== */
    --trans-fast: 150ms ease;
    --trans-base: 200ms ease;
    --trans-slow: 300ms ease;

    /* ========================================
       Z-INDEX LAYERS
       ======================================== */
    --z-dropdown: 50;
    --z-sticky: 80;
    --z-header: 100;
    --z-modal: 1000;
    --z-toast: 2000;

    /* ========================================
       SHIFT PALETTE (Planning)
       ======================================== */
    --sh-blue: #A2D2FF;
    --sh-green: #B9FBC0;
    --sh-red: #FFADAD;
    --sh-orange: #FFD6A5;
    --sh-yellow: #FDFFB6;
    --sh-violet: #BDB2FF;
    --sh-rose: #FFC6FF;
    --sh-cyan: #9BF6FF;
    --sh-text: #1f2937;
}

/* ==========================================================================
   THEME: LIGHT (Default)
   ========================================================================== */
:root,
[data-theme="light"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --primary-rgb: 59, 130, 246;

    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;

    --bg-body: #f3f4f6;
    --bg-body-secondary: #e5e7eb;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f9fafb;
    
    /* Semantic Tokens */
    --bg-header: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-panel: #ffffff;
    --bg-modal: #ffffff;
    --border-panel: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --bg-alternate: rgba(0, 0, 0, 0.03);
    --bg-surface-elevated: #ffffff;
    --logo-filter: none;

    /* Role Specific Tokens (Light) */
    --role-coord-bg: #eff6ff;
    --role-coord-text: #1d4ed8;
    --role-admin-bg: #fef2f2;
    --role-admin-text: #991b1b;
    --role-user-bg: #f3f4f6;
    --role-user-text: #374151;

    /* Badge & Status Tokens */
    --bg-badge-success: #ecfdf5; --text-badge-success: #059669;
    --bg-badge-warning: #fffbeb; --text-badge-warning: #d97706;
    --bg-badge-danger: #fef2f2; --text-badge-danger: #dc2626;
    --bg-badge-info: #eff6ff; --text-badge-info: #2563eb;
    --bg-badge-neutral: #f8fafc; --text-badge-neutral: #64748b;

    /* Ticket Category Tokens */
    --bg-cat-bug: #fef2f2; --text-cat-bug: #dc2626;
    --bg-cat-suggestion: #eff6ff; --text-cat-suggestion: #2563eb;
    --bg-cat-jeux: #faf5ff; --text-cat-jeux: #9333ea;
    --bg-cat-ui: #ecfdf5; --text-cat-ui: #059669;

    --free-red: #d40000;

    /* Categorical Contrast */
    --sh-text-contrast: #1f2937;
    --text-inverse: #ffffff;

    /* FreeField Harvest Notification */
    --ff-notif-from: #3b82f6;
    --ff-notif-to: #1d4ed8;
    --ff-notif-border: rgba(147, 197, 253, 0.6);
    --ff-notif-shadow: rgba(59, 130, 246, 0.35);
    --ff-notif-text: #ffffff;
}

/* ==========================================================================
   THEME: DARK
   ========================================================================== */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: rgba(96, 165, 250, 0.15);
    --primary-rgb: 96, 165, 250;

    --secondary: #94a3b8;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --info: #38bdf8;
    --free-red: #f87171;

    --bg-body: #111827;
    --bg-body-secondary: #283548;
    --bg-card: #1f2937;
    --bg-input: #374151;
    --bg-hover: #374151;

    /* Semantic Tokens */
    --bg-header: #111827;
    --bg-sidebar: #1f2937;
    --bg-panel: #1f2937;
    --bg-modal: #1f2937;
    --border-panel: #374151;
    --text-main: #f9fafb;
    --text-muted: #d1d5db;
    --border-color: #374151;
    --bg-alternate: rgba(255, 255, 255, 0.03);
    --bg-surface-elevated: #2d3748;
    --logo-filter: none;

    /* Role Specific Tokens (Dark) */
    --role-coord-bg: rgba(96, 165, 250, 0.2);
    --role-coord-text: #60a5fa;
    --role-admin-bg: rgba(248, 113, 113, 0.2);
    --role-admin-text: #f87171;
    --role-user-bg: rgba(156, 163, 175, 0.2);
    --role-user-text: #d1d5db;

    /* Badge & Status Tokens */
    --bg-badge-success: rgba(16, 185, 129, 0.15); --text-badge-success: #34d399;
    --bg-badge-warning: rgba(245, 158, 11, 0.15); --text-badge-warning: #fbbf24;
    --bg-badge-danger: rgba(239, 68, 68, 0.15); --text-badge-danger: #f87171;
    --bg-badge-info: rgba(59, 130, 246, 0.15); --text-badge-info: #60a5fa;
    --bg-badge-neutral: rgba(100, 116, 139, 0.15); --text-badge-neutral: #94a3b8;

    /* Ticket Category Tokens */
    --bg-cat-bug: rgba(239, 68, 68, 0.15); --text-cat-bug: #f87171;
    --bg-cat-suggestion: rgba(59, 130, 246, 0.15); --text-cat-suggestion: #60a5fa;
    --bg-cat-jeux: rgba(168, 85, 247, 0.15); --text-cat-jeux: #c084fc;
    --bg-cat-ui: rgba(16, 185, 129, 0.15); --text-cat-ui: #34d399;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);

    /* Shift Palette Dark Mode */
    --sh-blue: #1B3A5B;
    --sh-green: #1E4620;
    --sh-red: #5E1A1A;
    --sh-orange: #6B3E14;
    --sh-yellow: #524B10;
    --sh-violet: #3A2D5B;
    --sh-rose: #5B2A5B;
    --sh-cyan: #134E5E;
    --sh-text: #f9fafb;

    /* Categorical Contrast */
    --sh-text-contrast: #ffffff;
    --text-inverse: #111827;

    /* FreeField Harvest Notification */
    --ff-notif-from: #3b82f6;
    --ff-notif-to: #1d4ed8;
    --ff-notif-border: rgba(147, 197, 253, 0.5);
    --ff-notif-shadow: rgba(59, 130, 246, 0.3);
    --ff-notif-text: #ffffff;
}

/* ==========================================================================
   THEME: NEON (Experimental)
   ========================================================================== */
[data-theme="neon"] {
    --primary: #fcee09; /* Cyberpunk Yellow */
    --primary-hover: #fff300;
    --primary-light: rgba(252, 238, 9, 0.15);
    --primary-rgb: 252, 238, 9;

    --secondary: #b537ff; /* Electric Light Violet */
    --success: #00ff9f;
    --danger: #ff0055;
    --warning: #fcee09;
    --info: #00f3ff; /* Cyber Cyan */

    --bg-body: #010103; /* Pure OLED Black */
    --bg-body-secondary: #0a0a14;
    --bg-card: #0f0f1d;
    --bg-input: #050508;
    --bg-hover: #16162a;

    /* Semantic Tokens */
    --bg-header: #000000;
    --bg-sidebar: #010103;
    --bg-panel: #0a0a1a;
    --bg-modal: #050510;
    --border-panel: rgba(0, 243, 255, 0.2); /* Cyan-tinted borders */
    --text-main: #e0e0ff;
    --text-muted: #8e8eb2;
    --border-color: rgba(252, 238, 9, 0.2); /* Yellow-tinted default borders */
    --bg-alternate: rgba(181, 55, 255, 0.05);
    --bg-surface-elevated: #1a1a2e;
    --logo-filter: drop-shadow(0 0 4px var(--primary)) brightness(1.2);

    /* Role Specific Tokens (Cyberpunk) */
    --role-coord-bg: rgba(0, 243, 255, 0.15);
    --role-coord-text: #00f3ff;
    --role-admin-bg: rgba(255, 0, 85, 0.15);
    --role-admin-text: #ff0055;
    --role-user-bg: rgba(181, 55, 255, 0.15);
    --role-user-text: #b537ff;

    /* Glow Effects - Intense Retro-Futurism */
    --glow-primary: 0 0 15px rgba(252, 238, 9, 0.5), 0 0 30px rgba(252, 238, 9, 0.2);
    --glow-secondary: 0 0 15px rgba(181, 55, 255, 0.5);
    --neon-glow: 0 0 12px rgba(252, 238, 9, 0.4);
    --neon-border-glow: 0 0 20px rgba(0, 243, 255, 0.3);

    /* Badge & Status Tokens (Neon) */
    --bg-badge-success: rgba(0, 255, 159, 0.1); --text-badge-success: #00ff9f;
    --bg-badge-warning: rgba(252, 238, 9, 0.1); --text-badge-warning: #fcee09;
    --bg-badge-danger: rgba(255, 0, 85, 0.1); --text-badge-danger: #ff0055;
    --bg-badge-info: rgba(0, 243, 255, 0.1); --text-badge-info: #00f3ff;
    --bg-badge-neutral: rgba(142, 142, 178, 0.1); --text-badge-neutral: #8e8eb2;

    /* Ticket Category Tokens */
    --bg-cat-bug: rgba(255, 0, 85, 0.15); --text-cat-bug: #ff0055;
    --bg-cat-suggestion: rgba(0, 243, 255, 0.15); --text-cat-suggestion: #00f3ff;
    --bg-cat-jeux: rgba(181, 55, 255, 0.15); --text-cat-jeux: #b537ff;
    --bg-cat-ui: rgba(252, 238, 9, 0.15); --text-cat-ui: #fcee09;

    --free-red: #ff0033;

    /* Shadows Overrides */
    --shadow-sm: 0 0 15px rgba(0, 0, 0, 0.9), 0 0 5px rgba(0, 243, 255, 0.1);
    --shadow-md: 0 0 25px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 243, 255, 0.2);

    /* Shift Palette Cyberpunk (High Contrast) */
    --sh-blue: #020817;
    --sh-green: #041a0e;
    --sh-red: #1a0404;
    --sh-orange: #1a1104;
    --sh-yellow: #1a1a04;
    --sh-violet: #0f041a;
    --sh-rose: #1a0410;
    --sh-cyan: #04171a;
    --sh-text: #f0f0ff;

    /* Categorical Contrast */
    --sh-text-contrast: #ffffff;
    --text-inverse: #010103;

    /* HUD Elements specific */
    --hud-corner: #00f3ff;
    --hud-line: rgba(181, 55, 255, 0.3);

    /* FreeField Harvest Notification */
    --ff-notif-from: #b537ff;
    --ff-notif-to: #7b00d4;
    --ff-notif-border: rgba(0, 243, 255, 0.5);
    --ff-notif-shadow: rgba(181, 55, 255, 0.45);
    --ff-notif-text: #ffffff;
}

/* ==========================================================================
   THEME: SAKURA (Cherry Blossom — Light variant)
   ========================================================================== */
[data-theme="sakura"] {
    --primary: #e91e8c;
    --primary-hover: #d4167d;
    --primary-light: rgba(233, 30, 140, 0.1);
    --primary-rgb: 233, 30, 140;

    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #ec4899;

    --bg-body: #fff5f9;
    --bg-body-secondary: #fce7f0;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #fff0f5;

    /* Semantic Tokens */
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-sidebar: rgba(255, 255, 255, 0.9);
    --bg-panel: #ffffff;
    --bg-modal: #ffffff;
    --border-panel: #f9d1e0;
    --text-main: #4a1942;
    --text-muted: #9b6b8a;
    --border-color: #f3c4d5;
    --bg-alternate: rgba(233, 30, 140, 0.03);
    --bg-surface-elevated: #ffffff;
    --logo-filter: hue-rotate(320deg) saturate(1.3);

    /* Role Specific Tokens */
    --role-coord-bg: #fce7f3;
    --role-coord-text: #be185d;
    --role-admin-bg: #fef2f2;
    --role-admin-text: #991b1b;
    --role-user-bg: #fdf2f8;
    --role-user-text: #831843;

    /* Badge & Status Tokens */
    --bg-badge-success: #ecfdf5; --text-badge-success: #059669;
    --bg-badge-warning: #fffbeb; --text-badge-warning: #d97706;
    --bg-badge-danger: #fef2f2; --text-badge-danger: #dc2626;
    --bg-badge-info: #fdf2f8; --text-badge-info: #be185d;
    --bg-badge-neutral: #fdf2f8; --text-badge-neutral: #9b6b8a;

    /* Ticket Category Tokens */
    --bg-cat-bug: #fef2f2; --text-cat-bug: #dc2626;
    --bg-cat-suggestion: #fdf2f8; --text-cat-suggestion: #be185d;
    --bg-cat-jeux: #faf5ff; --text-cat-jeux: #9333ea;
    --bg-cat-ui: #ecfdf5; --text-cat-ui: #059669;

    --free-red: #d40000;

    --shadow-sm: 0 1px 3px 0 rgba(233, 30, 140, 0.08), 0 1px 2px -1px rgba(233, 30, 140, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(233, 30, 140, 0.1), 0 2px 4px -2px rgba(233, 30, 140, 0.06);

    /* Shift Palette */
    --sh-blue: #dbeafe;
    --sh-green: #d1fae5;
    --sh-red: #ffe4e6;
    --sh-orange: #ffedd5;
    --sh-yellow: #fef9c3;
    --sh-violet: #ede9fe;
    --sh-rose: #fce7f3;
    --sh-cyan: #cffafe;
    --sh-text: #4a1942;

    /* Categorical Contrast */
    --sh-text-contrast: #4a1942;
    --text-inverse: #ffffff;

    /* Sakura-specific tokens */
    --sakura-petal-1: #ffb7d5;
    --sakura-petal-2: #ff8fbf;
    --sakura-petal-3: #ffc8e0;
    --sakura-petal-4: #ffa3cc;
    --sakura-branch: #8b6555;
    --sakura-accent: rgba(233, 30, 140, 0.08);

    /* FreeField Harvest Notification */
    --ff-notif-from: #e91e8c;
    --ff-notif-to: #c2185b;
    --ff-notif-border: rgba(255, 183, 213, 0.7);
    --ff-notif-shadow: rgba(233, 30, 140, 0.35);
    --ff-notif-text: #ffffff;
}

/* ══════════════════════════════════════════════════
   FOREST THEME — Cosy, Immersive & Natural
   ══════════════════════════════════════════════════ */
[data-theme="forest"] {
    --primary: #1b5e3b;
    --primary-hover: #14472c;
    --primary-light: rgba(27, 94, 59, 0.12);
    --primary-rgb: 27, 94, 59;

    --secondary: #74c69d;
    --success: #2d8659;
    --danger: #b5342a;
    --warning: #c77b2e;
    --info: #3a9d7c;

    --bg-body: #eeece6;
    --bg-body-secondary: #e4e1d9;
    --bg-card: #faf8f4;
    --bg-input: #f3f1eb;
    --bg-hover: #e8e5dc;

    --bg-header: rgba(250, 248, 244, 0.94);
    --bg-sidebar: rgba(250, 248, 244, 0.96);
    --bg-panel: #faf8f4;
    --bg-modal: #faf8f4;
    --border-panel: #c8c1b3;
    --text-main: #1a2b17;
    --text-muted: #5e7058;
    --border-color: #c8c1b3;
    --bg-alternate: rgba(27, 94, 59, 0.03);
    --bg-surface-elevated: #fdfcf8;
    --logo-filter: hue-rotate(125deg) saturate(0.7) brightness(0.82);

    /* Role Specific */
    --role-coord-bg: #d2f0d6;
    --role-coord-text: #14472c;
    --role-admin-bg: #a8ddb5;
    --role-admin-text: #14472c;
    --role-user-bg: #d2f0d6;
    --role-user-text: #1b5e3b;

    /* Badge & Status */
    --bg-badge-success: #d2f0d6; --text-badge-success: #14472c;
    --bg-badge-warning: #fdf0d0; --text-badge-warning: #7a4f12;
    --bg-badge-danger: #fce0de;  --text-badge-danger: #8b1a14;
    --bg-badge-info: #d2f0d6;   --text-badge-info: #1b5e3b;
    --bg-badge-neutral: #eeece6; --text-badge-neutral: #5e7058;

    /* Ticket Categories */
    --bg-cat-bug: #fce0de; --text-cat-bug: #b5342a;
    --bg-cat-suggestion: #d2f0d6; --text-cat-suggestion: #14472c;
    --bg-cat-jeux: #dbeef8; --text-cat-jeux: #0a5f8a;
    --bg-cat-ui: #d2f0d6; --text-cat-ui: #2d8659;

    --free-red: #d40000;

    --shadow-sm: 0 1px 4px 0 rgba(27, 70, 44, 0.10), 0 1px 2px -1px rgba(27, 70, 44, 0.08);
    --shadow-md: 0 4px 8px -1px rgba(27, 70, 44, 0.12), 0 2px 4px -2px rgba(27, 70, 44, 0.08);

    /* Shift Palette */
    --sh-blue: #d6eaf8;
    --sh-green: #d2f0d6;
    --sh-red: #fce0de;
    --sh-orange: #fde4c0;
    --sh-yellow: #fdf0d0;
    --sh-violet: #e8e2f8;
    --sh-rose: #fae0ef;
    --sh-cyan: #ccf5f2;
    --sh-text: #1a2b17;
    --sh-text-contrast: #1a2b17;
    --text-inverse: #ffffff;

    /* ── Forest-specific tokens ── */

    /* Core palette */
    --forest-deep: #14472c;
    --forest-mid: #1b5e3b;
    --forest-light: #74c69d;
    --forest-moss: #52b788;
    --forest-canopy: #2d8659;

    /* Warm earth tones */
    --forest-bark: #5c3d24;
    --forest-earth: #7a5a3a;
    --forest-copper: #b87333;
    --forest-gold: #c9a84c;
    --forest-bronze: #a67c52;
    --forest-amber: #d4a24e;

    /* Mist & atmosphere */
    --forest-mist: rgba(27, 94, 59, 0.06);
    --forest-mist-warm: rgba(185, 155, 100, 0.08);
    --forest-glow: rgba(201, 168, 76, 0.25);

    /* Leaf colours (falling particles) */
    --forest-leaf-green-1: #b7e4c7;
    --forest-leaf-green-2: #7bc8a4;
    --forest-leaf-green-3: #52b788;
    --forest-leaf-autumn-1: #d4b83d;
    --forest-leaf-autumn-2: #c77b2e;
    --forest-leaf-autumn-3: #b5342a;

    /* Light motes (fireflies / golden dust) */
    --forest-firefly: #e8d880;
    --forest-dust: rgba(210, 180, 80, 0.6);

    --forest-accent: rgba(27, 94, 59, 0.08);

    /* FreeField Harvest Notification */
    --ff-notif-from: #2d8659;
    --ff-notif-to: #1b5e3b;
    --ff-notif-border: rgba(116, 198, 157, 0.6);
    --ff-notif-shadow: rgba(45, 134, 89, 0.4);
    --ff-notif-text: #e8f5ee;
}