/* assets/css/tema.css */
:root {
    --bs-primary: #495057; /* Gris Oscuro Plata */
    --sidebar-width: 240px;
    --mobile-nav-height: 55px;
    --header-height: 55px; /* Altura reducida para un look más fino */
    --bg-light: #f6f6f7; /* Gris más suave */
    --border-color: #e1e3e5;
    --text-main: #202223;
    --text-muted: #6d7175;
    --gold-primary: #A88137;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem; /* Fuente pequeña y elegante */
    color: var(--text-main);
    letter-spacing: -0.01rem;
    margin: 0;
}

/* --- ESCRITORIO --- */
#main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height); /* Espacio para el header fijo */
    padding: 2rem;
}

/* Nuevo Header Superior */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(90deg, #d4af37 0%, #A88137 100%); /* Dorado: Claro (Izq) -> Oscuro (Der) */
    border-bottom: none;
    box-shadow: 0 4px 12px rgba(168, 129, 55, 0.2);
    z-index: 1040; /* Por encima del sidebar */
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.sidebar-desktop {
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height)); /* Restar altura del header */
    position: fixed;
    top: var(--header-height); /* Empieza debajo del header */
    left: 0;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    padding-top: 0; /* Quitamos padding para que el header de la clínica pegue arriba */
}

.nav-link {
    color: var(--text-main) !important;
    padding: 0.5rem 1rem;
    font-size: 0.82rem; /* Más pequeña */
    font-weight: 400;
    display: flex;
    align-items: center;
    text-decoration: none;
    margin: 2px 12px;
    border-radius: 6px;
}

.nav-link i {
    font-size: 0.9rem;
    opacity: 0.7;
    width: 20px;
}

.nav-link.active {
    background: #f1f1f1;
    font-weight: 500;
    color: var(--bs-primary) !important;
}

.nav-link.active i {
    opacity: 1;
    color: var(--bs-primary);
}

/* --- TÍTULOS Y ETIQUETAS --- */
.admin-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.5rem 1.5rem 0.5rem;
}

/* --- MÓVIL --- */
@media (max-width: 768px) {
    .sidebar-desktop { display: none !important; }

    #main-content {
        margin-left: 0;
        padding-top: 0;
    }

    .mobile-nav-top {
        height: var(--mobile-nav-height);
        width: 100%;
        position: sticky;
        top: 0; left: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1100;
    }

    .mobile-nav-top a {
        color: var(--text-muted);
        font-size: 1.1rem;
        padding: 10px;
        transition: 0.2s;
    }

    .mobile-nav-top a.active { color: var(--bs-primary); }
}

/* --- ESTILOS PERSONALIZADOS PARA EL TOUR (Driver.js) --- */
.driver-popover {
    background-color: #ffffff;
    color: var(--text-main);
    border-radius: 1.25rem; /* Bordes redondeados consistentes */
    padding: 1.5rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175); /* Sombra suave y profunda */
    border: none;
    font-family: 'Inter', sans-serif;
    max-width: 320px;
}

.driver-popover-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #A88137; /* Dorado corporativo */
    margin-bottom: 0.5rem;
}

.driver-popover-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.driver-popover-footer button {
    background: linear-gradient(45deg, #A88137, #d4af37); /* Dorado degradado */
    color: #fff;
    border: none;
    border-radius: 50rem; /* Botones tipo píldora */
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: none;
    transition: all 0.2s;
}

.driver-popover-footer button:hover {
    background: linear-gradient(45deg, #8c6b2d, #b5902b); /* Dorado más oscuro */
    transform: translateY(-1px);
}

.driver-popover-footer button.driver-popover-prev-btn {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.driver-popover-footer button.driver-popover-prev-btn:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Botón blanco genérico */
.btn-white { background: white; border: 1px solid #eee; color: var(--text-main); }
.btn-white:hover { background: #f8f9fa; color: var(--bs-primary); }

/* Indicador de Novedad (Punto Rojo) */
.btn-help-indicator { position: relative; }
.btn-help-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Utilidad Dorado */
.text-gold { color: var(--gold-primary) !important; }