/* --- 1. IMPORTACIÓN DE FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Outfit:wght@400;700&display=swap');

/* --- 2. VARIABLES --- */
:root {
    --denk-purpura: #a5368a;
    --denk-amarillo: #f4e600;
    --denk-negro: #010101;
    --gris-sidebar: #c7c7c7;
    --sidebar-width: 250px;
}

/* --- 3. CONFIGURACIÓN GENERAL (DASHBOARD) --- */
/* Este es el estilo que aplica al Dashboard (Home, Calendario, etc.) */
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    
    /* CAMBIO APLICADO: Usamos tu imagen local 'fondo-futbol.jpg' */
    /* Mantenemos el filtro blanco (rgba) para que el texto negro se lea bien */
    background: linear-gradient(rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.258)), 
                url('../img/fondo-futbol.jpg');
                
    background-size: cover;
    background-attachment: scroll;
    background-position: center;
}

/* --- 4. CONFIGURACIÓN ESPECÍFICA PARA LOGIN Y REGISTRO --- */
/* DESPUÉS - permite scroll cuando el formulario es largo */
body.tema-purpura, body.tema-amarillo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Tema Aficionado (Login/Registro) */
.tema-purpura {
    --color-marca: var(--denk-purpura);
    --color-texto-titulo: var(--denk-purpura);
    background: linear-gradient(rgba(165, 54, 138, 0.85), rgba(50, 0, 50, 0.9)), 
                url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
}

/* Tema Doctor (Registro) */
.tema-amarillo {
    --color-marca: var(--denk-amarillo);
    --color-texto-titulo: var(--denk-negro);
    background: linear-gradient(rgba(244, 230, 0, 0.8), rgba(0,0,0,0.9)), 
                url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
}

/* --- TIPOGRAFÍA --- */
h1, h2, h3, h4, h5, .titulo-dinamico, .fw-bold {
    font-family: 'Montserrat', sans-serif !important;
}

/* --- TARJETAS --- */
.register-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border-top: 10px solid var(--color-marca);
}

.titulo-dinamico {
    color: var(--color-texto-titulo);
    font-weight: 700;
    margin-bottom: 20px;
}

.btn-denk {
    background-color: var(--color-marca);
    color: white;
    border: none;
    font-weight: bold;
    border-radius: 50px;
    padding: 12px;
    width: 100%;
    transition: transform 0.2s;
}
.btn-denk:hover { transform: scale(1.02); opacity: 0.95; }
.tema-amarillo .btn-denk { color: var(--denk-negro); }

/* --- SIDEBAR DEL DASHBOARD --- */
#wrapper { display: flex; width: 100%; }

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--gris-sidebar);
    color: var(--denk-negro);
    min-height: 100vh;
    transition: all 0.3s;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05);
}

#sidebar.active { margin-left: calc(-1 * var(--sidebar-width)); }

.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(0,0,0,0.1); }
.sidebar-header h4 { color: var(--denk-negro); }

.user-profile-section {
    background-color: rgba(255, 255, 255, 0.5);
    margin: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--denk-purpura);
}

.user-text-label {
    color: var(--denk-negro);
    font-size: 0.7rem; 
    font-weight: bold; 
    text-transform: uppercase;
}

.avatar-circle {
    width: 35px; height: 35px;
    background-color: var(--denk-purpura);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

#sidebar .nav-link {
    color: #333;
    padding: 15px 20px;
    border-left: 4px solid transparent;
}

#sidebar .nav-link:hover, #sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--denk-purpura);
    border-left: 4px solid var(--denk-purpura);
    font-weight: bold;
}

/* --- TABLA MORADA (ENCABEZADO) --- */
.card-header-morado {
    background-color: var(--denk-purpura) !important;
    color: white !important;
}
.card-header-morado h5 {
    color: white !important;
}

/* --- OTROS --- */
.checkbox-container {
    display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 10px;
    background: #f8f9fa; border-radius: 8px; border: 1px solid #eee;
}
.form-check-input { width: 20px; height: 20px; margin-top: 0; }

#content { width: 100%; }
.bg-purpura-gradiente { background: linear-gradient(135deg, #a5368a 0%, #d2a4cb 100%); }
.bg-amarillo-gradiente { background: linear-gradient(135deg, #f4e600 0%, #f39c12 100%); color: #333 !important; }

/* --- NAVBAR SUPERIOR DEL DASHBOARD --- */
.navbar-main {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* --- LOGOUT LINK --- */
.logout-link {
    color: #dc3545 !important;
    border-left: 4px solid transparent !important;
}
.logout-link:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-left: 4px solid #dc3545 !important;
    color: #dc3545 !important;
}

/* --- RESPONSIVE SIDEBAR --- */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        z-index: 999;
        height: 100vh;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
    }
}

/* --- DASHBOARD: el body no debe centrar contenido como login --- */
body:not(.tema-purpura):not(.tema-amarillo) {
    display: block;
    height: auto;
    background: linear-gradient(rgba(255,255,255,0.17), rgba(255,255,255,0.258)),
                url('../img/fondo-futbol.jpg');
    background-size: cover;
    background-attachment: fixed;
}