/* ==================== THEME SYSTEM ==================== */

/* Theme 1: Purple Gradient (Default) */
[data-theme="purple-gradient"] {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #e0e7ff;
    --primary-100: #e0e7ff;
    --primary-600: #667eea;
    --primary-700: #5568d3;
    
    --sidebar-bg: #ffffff;
    --sidebar-text: #374151;
    --sidebar-hover: #f3f4f6;
    --sidebar-active: #e0e7ff;
    
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
}

/* Theme 2: Dark Ocean */
[data-theme="dark-ocean"] {
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #dbeafe;
    --primary-100: #1e3a8a;
    --primary-600: #3b82f6;
    --primary-700: #2563eb;
    
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: #1e293b;
    --sidebar-active: #1e3a8a;
    
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    
    --card-bg: #0f172a;
    --card-border: #1e293b;
    
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-900: #f1f5f9;
}

/* Theme 3: Forest Green */
[data-theme="forest-green"] {
    --primary-gradient: linear-gradient(135deg, #047857 0%, #10b981 100%);
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --primary-100: #d1fae5;
    --primary-600: #10b981;
    --primary-700: #059669;
    
    --sidebar-bg: #ffffff;
    --sidebar-text: #374151;
    --sidebar-hover: #f3f4f6;
    --sidebar-active: #d1fae5;
    
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
}

/* Theme 4: Sunset Orange */
[data-theme="sunset-orange"] {
    --primary-gradient: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fed7aa;
    --primary-100: #fed7aa;
    --primary-600: #f97316;
    --primary-700: #ea580c;
    
    --sidebar-bg: #ffffff;
    --sidebar-text: #374151;
    --sidebar-hover: #f3f4f6;
    --sidebar-active: #fed7aa;
    
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
}

/* Theme 5: Midnight Purple */
[data-theme="midnight-purple"] {
    --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #ddd6fe;
    --primary-100: #2d1b4e;
    --primary-600: #8b5cf6;
    --primary-700: #7c3aed;
    
    --sidebar-bg: #1a0f2e;
    --sidebar-text: #ddd6fe;
    --sidebar-hover: #2d1b4e;
    --sidebar-active: #3730a3;
    
    --bg-primary: #0f0520;
    --bg-secondary: #1a0f2e;
    --text-primary: #f5f3ff;
    --text-secondary: #c4b5fd;
    
    --card-bg: #1a0f2e;
    --card-border: #2d1b4e;
    
    --gray-50: #2d1b4e;
    --gray-100: #3730a3;
    --gray-200: #4c1d95;
    --gray-600: #ddd6fe;
    --gray-700: #ede9fe;
    --gray-900: #f5f3ff;
}

/* Theme 6: Clean Slate */
[data-theme="clean-slate"] {
    --primary-gradient: linear-gradient(135deg, #475569 0%, #64748b 100%);
    --primary-color: #64748b;
    --primary-dark: #475569;
    --primary-light: #e2e8f0;
    --primary-100: #e2e8f0;
    --primary-600: #64748b;
    --primary-700: #475569;
    
    --sidebar-bg: #ffffff;
    --sidebar-text: #334155;
    --sidebar-hover: #f8fafc;
    --sidebar-active: #e2e8f0;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
}

/* Theme 7: Cyberpunk */
[data-theme="cyberpunk"] {
    --primary-gradient: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    --primary-color: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fef3c7;
    --primary-100: #991b1b;
    --primary-600: #f59e0b;
    --primary-700: #d97706;
    
    --sidebar-bg: #18181b;
    --sidebar-text: #fef3c7;
    --sidebar-hover: #27272a;
    --sidebar-active: #3f3f46;
    
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --text-primary: #fafaf9;
    --text-secondary: #a8a29e;
    
    --card-bg: #18181b;
    --card-border: #27272a;
    
    --gray-50: #27272a;
    --gray-100: #3f3f46;
    --gray-200: #52525b;
    --gray-600: #d4d4d8;
    --gray-700: #e4e4e7;
    --gray-900: #fafaf9;
}

/* Theme 8: Rose Gold */
[data-theme="rose-gold"] {
    --primary-gradient: linear-gradient(135deg, #be185d 0%, #ec4899 100%);
    --primary-color: #ec4899;
    --primary-dark: #db2777;
    --primary-light: #fce7f3;
    --primary-100: #fce7f3;
    --primary-600: #ec4899;
    --primary-700: #db2777;
    
    --sidebar-bg: #ffffff;
    --sidebar-text: #374151;
    --sidebar-hover: #fef2f2;
    --sidebar-active: #fce7f3;
    
    --bg-primary: #fef2f2;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    
    --card-bg: #ffffff;
    --card-border: #fecdd3;
}

/* Apply theme to body */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.sidebar {
    background: var(--sidebar-bg);
}

.sidebar-header {
    background: var(--primary-gradient);
}

.nav-item {
    color: var(--sidebar-text);
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--primary-color);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.main-content {
    background: var(--bg-primary);
}

.btn-primary {
    background: var(--primary-gradient);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

/* Dark theme adjustments */
[data-theme="dark-ocean"],
[data-theme="midnight-purple"],
[data-theme="cyberpunk"] {
    .table {
        color: var(--text-primary);
    }
    
    .table th {
        background: var(--gray-50);
        color: var(--text-primary);
    }
    
    .table tbody tr:hover {
        background: var(--gray-50);
    }
    
    .form-control,
    .form-select {
        background: var(--bg-secondary);
        border-color: var(--card-border);
        color: var(--text-primary);
    }
    
    .form-control:focus,
    .form-select:focus {
        background: var(--bg-secondary);
        border-color: var(--primary-color);
        color: var(--text-primary);
    }
    
    .alert {
        background: var(--card-bg);
        border-color: var(--card-border);
    }
}

/* Login page theming */
.login-container {
    background: var(--bg-primary);
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.login-header {
    background: var(--primary-gradient);
}

/* Smooth theme transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
