/* Theme CSS Variables */
/* Light theme (default) */
:root {
    /* Page backgrounds */
    --bg-page: #f1f5f9;
    --bg-surface: white;
    --bg-surface-secondary: #f8fafc;
    --bg-surface-hover: #f8fafc;

    /* Text colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Headings */
    --heading-color: #1e40af;

    /* Borders */
    --border-color: #e2e8f0;
    --border-color-light: #cbd5e1;

    /* Primary (blue) */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --primary-text: #1e40af;

    /* Success (green) */
    --success: #22c55e;
    --success-hover: #16a34a;
    --success-light: #f0fdf4;
    --success-light-hover: #dcfce7;
    --success-border: #22c55e;
    --success-text: #16a34a;

    /* Error (red) */
    --error: #ef4444;
    --error-hover: #dc2626;
    --error-light: #fef2f2;
    --error-border: #fecaca;
    --error-text: #dc2626;

    /* Warning (yellow/amber) */
    --warning-light: #fef3c7;
    --warning-text: #92400e;

    /* Info (cyan/blue) */
    --info-light: #f0f9ff;
    --info-border: #bae6fd;
    --info-text: #0369a1;
    --info-text-dark: #0c4a6e;

    /* Sidebar */
    --sidebar-bg: #1e293b;
    --sidebar-border: #334155;
    --sidebar-text: #e2e8f0;
    --sidebar-text-muted: #cbd5e1;
    --sidebar-text-light: #94a3b8;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;

    /* Overlay */
    --overlay-bg: rgba(0, 0, 0, 0.5);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 4px 12px rgba(59, 130, 246, 0.1);

    /* Form focus */
    --focus-ring: rgba(59, 130, 246, 0.1);
    --focus-ring-error: rgba(239, 68, 68, 0.1);
    --focus-ring-success: rgba(34, 197, 94, 0.1);

    /* Resource badges */
    --badge-aws-bg: #fef3c7;
    --badge-aws-text: #92400e;
    --badge-k8s-bg: #dbeafe;
    --badge-k8s-text: #1e40af;
    --badge-gcp-bg: #dcfce7;
    --badge-gcp-text: #166534;
}

/* Dark theme */
[data-theme="dark"] {
    /* Page backgrounds */
    --bg-page: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-secondary: #334155;
    --bg-surface-hover: #334155;

    /* Text colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    /* Headings */
    --heading-color: #60a5fa;

    /* Borders */
    --border-color: #334155;
    --border-color-light: #475569;

    /* Primary (blue - slightly brighter for dark mode) */
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #1e3a5f;
    --primary-text: #93c5fd;

    /* Success (green) */
    --success: #4ade80;
    --success-hover: #22c55e;
    --success-light: #14532d;
    --success-light-hover: #166534;
    --success-border: #22c55e;
    --success-text: #4ade80;

    /* Error (red) */
    --error: #f87171;
    --error-hover: #ef4444;
    --error-light: #450a0a;
    --error-border: #7f1d1d;
    --error-text: #fca5a5;

    /* Warning (yellow/amber) */
    --warning-light: #451a03;
    --warning-text: #fcd34d;

    /* Info (cyan/blue) */
    --info-light: #0c4a6e;
    --info-border: #075985;
    --info-text: #7dd3fc;
    --info-text-dark: #bae6fd;

    /* Sidebar */
    --sidebar-bg: #0f172a;
    --sidebar-border: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-text-muted: #cbd5e1;
    --sidebar-text-light: #94a3b8;
    --sidebar-hover: #1e293b;
    --sidebar-active: #3b82f6;

    /* Overlay */
    --overlay-bg: rgba(0, 0, 0, 0.7);

    /* Shadows (more subtle in dark mode) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 4px 12px rgba(59, 130, 246, 0.2);

    /* Form focus */
    --focus-ring: rgba(96, 165, 250, 0.2);
    --focus-ring-error: rgba(248, 113, 113, 0.2);
    --focus-ring-success: rgba(74, 222, 128, 0.2);

    /* Resource badges */
    --badge-aws-bg: #451a03;
    --badge-aws-text: #fcd34d;
    --badge-k8s-bg: #1e3a5f;
    --badge-k8s-text: #93c5fd;
    --badge-gcp-bg: #14532d;
    --badge-gcp-text: #86efac;
}

/* Smooth transition for theme changes */
html {
    color-scheme: light dark;
}

html, body,
.navbar, .sidebar, .container, .page-content,
input, select, textarea, button,
.project-card, .admin-card, .project-type-card,
.data-table th, .data-table td,
.login-box, .admin-info {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
