html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #020617; /* slate-950 (Padrão Escuro) */
    color: #f8fafc;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a, .btn-link {
    color: #38bdf8;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #0f172a, 0 0 0 0.25rem #3b82f6;
}

/* ==========================================================================
   SISTEMA DE DESIGN CYBER-GLASS (NÍVEL 2 - CLASSES REUTILIZÁVEIS)
   ========================================================================== */

/* 1. Cards e Contêineres */
.card-cyber {
    background-color: #0f172a; /* slate-900 */
    border: 1px solid #1e293b; /* slate-800 */
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-cyber:hover {
    border-color: #334155; /* slate-700 */
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.20), 0 4px 15px rgba(255, 255, 255, 0.10);
}

.card-cyber-highlight {
    background-color: #0f172a;
    border: 1px solid rgba(249, 115, 22, 0.4); /* orange-500 */
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
    transition: all 0.3s ease;
}

/* 2. Modais e Overlays */
.modal-overlay-cyber {
    position: fixed;
    inset: 0;
    background-color: rgba(2, 6, 23, 0.80);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content-cyber {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* 3. Inputs e Formulários */
.input-cyber {
    width: 100%;
    background-color: #020617; /* slate-950 */
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: #f1f5f9;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-cyber:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.input-cyber::placeholder {
    color: #64748b; /* slate-500 */
}

/* 4. Badges de Status Semânticos */
.badge-cyber {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-quente {
    background-color: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-em-atendimento {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-matriculado {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-novo {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 5. Efeitos Legados */
.shadow-white-glow {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.15), 0 2px 8px rgba(255, 255, 255, 0.08);
}

.shadow-white-glow:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.25), 0 4px 15px rgba(255, 255, 255, 0.12);
}

.shadow-white-glow-sm {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.10);
}

.shadow-white-glow-sm:hover {
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
}

/* Ocultar barra de erro global do Blazor */
#blazor-error-ui {
    display: none !important;
}

/* ==========================================================================
   SUPORTE COMPLETO AO TEMA CLARO (LIGHT MODE) EM TODAS AS PÁGINAS
   ========================================================================== */

html.theme-light,
body.theme-light,
html.theme-light body {
    background-color: #f8fafc !important; /* slate-50 */
    color: #0f172a !important; /* slate-900 */
}

/* 1. Estrutura de Páginas, Seções e Layouts */
html.theme-light body,
body.theme-light .page,
body.theme-light main,
body.theme-light .min-h-screen,
body.theme-light .bg-slate-950 {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Fundo radial/gradientes na Landing Page e Alterar Senha */
body.theme-light .bg-\[radial-gradient\(\#1e293b_1px\,transparent_1px\)\] {
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px) !important;
}

body.theme-light section.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, #f1f5f9, #ffffff, #f8fafc) !important;
}

body.theme-light header {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

/* 2. Sidebars, Topbars e Navegação */
body.theme-light .sidebar,
body.theme-light .top-row,
body.theme-light nav {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

body.theme-light nav a {
    color: #475569 !important;
}

body.theme-light nav a:hover,
body.theme-light nav a.active {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
}

/* 3. Cards, Painéis e Contêineres Cyber */
body.theme-light .card-cyber,
body.theme-light .card-cyber-highlight,
body.theme-light .bg-slate-900,
body.theme-light .bg-slate-900\/95,
body.theme-light .bg-slate-900\/90,
body.theme-light .bg-slate-900\/80,
body.theme-light .bg-slate-900\/60,
body.theme-light .bg-slate-900\/50,
body.theme-light .bg-slate-900\/40 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .bg-slate-950\/80,
body.theme-light .bg-slate-950\/60,
body.theme-light .bg-slate-950\/50 {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light .border-slate-800,
body.theme-light .border-slate-800\/90,
body.theme-light .border-slate-800\/80,
body.theme-light .border-slate-800\/50,
body.theme-light .border-slate-700,
body.theme-light .border-slate-700\/80,
body.theme-light .border-slate-700\/60,
body.theme-light .border-slate-700\/40 {
    border-color: #e2e8f0 !important;
}

/* 4. Tipografia e Cores de Texto (Sem quebrar botões e badges) */
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5,
body.theme-light h6 {
    color: #0f172a !important;
}

body.theme-light p,
body.theme-light label {
    color: inherit;
}

body.theme-light .text-slate-100,
body.theme-light .text-slate-200,
body.theme-light .text-slate-300 {
    color: #1e293b !important;
}

body.theme-light .text-slate-400 {
    color: #475569 !important;
}

body.theme-light .text-slate-500 {
    color: #64748b !important;
}

/* Ajustes de Contraste para Textos Coloridos no Modo Claro */
body.theme-light .text-amber-400,
body.theme-light .text-amber-300 {
    color: #d97706 !important; /* amber-600 */
}

body.theme-light .text-emerald-400 {
    color: #059669 !important; /* emerald-600 */
}

body.theme-light .text-cyan-400 {
    color: #0284c7 !important; /* sky-600 */
}

body.theme-light .text-blue-400 {
    color: #2563eb !important; /* blue-600 */
}

body.theme-light .text-purple-400 {
    color: #7c3aed !important; /* purple-600 */
}

body.theme-light .text-rose-400 {
    color: #e11d48 !important; /* rose-600 */
}

/* Preservar Gradientes de Texto (Landing Page Hero) */
body.theme-light .text-transparent.bg-clip-text {
    color: transparent !important;
}

body.theme-light .from-amber-200.via-amber-400.to-amber-300 {
    --tw-gradient-from: #b45309 var(--tw-gradient-from-position);
    --tw-gradient-via: #d97706 var(--tw-gradient-via-position);
    --tw-gradient-to: #f59e0b var(--tw-gradient-to-position);
}

/* Preservar Cores Originais em Botões Preenchidos */
body.theme-light .bg-amber-500,
body.theme-light .bg-amber-600,
body.theme-light .from-amber-500,
body.theme-light .to-amber-600 {
    color: #020617 !important;
}

body.theme-light .bg-blue-600,
body.theme-light .bg-emerald-600,
body.theme-light .bg-rose-500,
body.theme-light .bg-purple-600 {
    color: #ffffff !important;
}

/* 5. Inputs, Formulários e Selects */
body.theme-light .input-cyber,
body.theme-light input[type="text"],
body.theme-light input[type="password"],
body.theme-light input[type="email"],
body.theme-light select,
body.theme-light textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
    color: #94a3b8 !important;
}

body.theme-light select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus,
body.theme-light .input-cyber:focus {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15) !important;
}

/* 6. Tabelas */
body.theme-light table {
    border-color: #e2e8f0 !important;
}

body.theme-light table thead,
body.theme-light table thead.bg-slate-950\/50 {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

body.theme-light table tbody tr {
    background-color: #ffffff !important;
    border-color: #f1f5f9 !important;
}

body.theme-light table tbody tr:hover {
    background-color: #f8fafc !important;
}

body.theme-light table td,
body.theme-light table th {
    color: #1e293b !important;
}

/* 7. Modais e Popups Overlay */
body.theme-light .modal-overlay-cyber,
body.theme-light .fixed.inset-0.bg-slate-950\/80,
body.theme-light .fixed.inset-0.bg-slate-950\/85,
body.theme-light .fixed.inset-0.bg-black\/75 {
    background-color: rgba(15, 23, 42, 0.45) !important;
}

body.theme-light .modal-content-cyber {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

/* 8. Badges e Pills com Fundos Suaves */
body.theme-light .bg-amber-500\/10 {
    background-color: rgba(217, 119, 6, 0.1) !important;
    border-color: rgba(217, 119, 6, 0.25) !important;
}

body.theme-light .bg-emerald-500\/10 {
    background-color: rgba(5, 150, 105, 0.1) !important;
    border-color: rgba(5, 150, 105, 0.25) !important;
}

body.theme-light .bg-blue-500\/10 {
    background-color: rgba(37, 99, 235, 0.1) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
}

body.theme-light .bg-purple-500\/10 {
    background-color: rgba(124, 58, 237, 0.1) !important;
    border-color: rgba(124, 58, 237, 0.25) !important;
}

body.theme-light .bg-rose-500\/10 {
    background-color: rgba(225, 29, 72, 0.1) !important;
    border-color: rgba(225, 29, 72, 0.25) !important;
}

body.theme-light .bg-slate-800 {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

body.theme-light .bg-slate-800:hover {
    background-color: #e2e8f0 !important;
}

/* 9. Rodapé */
body.theme-light footer {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}