:root {
    --bg-sidebar: #f2f2f2;
    /* gris claro */
    --accent: #1e88e5;
    /* azul */
    --green: #2e7d32;
    /* verde */
    --overlay: rgba(0, 0, 0, 0.35);
}

/* Botón flotante */
.fixed-action-btn {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 1001;
}

.fixed-action-btn .btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Barra lateral */
.custom-sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: min(88vw, 320px);
    height: 100vh;
    background: var(--bg-sidebar);
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 2px 0 18px rgba(0, 0, 0, 0.12);
    z-index: 1002;
    overflow-y: auto;
}

.custom-sidenav.is-open {
    transform: translateX(0);
}

/* Overlay */
.sidenav-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 1000;
}

.sidenav-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Encabezado con fondo y perfil */
.user-view {
    position: relative;
}

.user-view .background {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.user-view .background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-line {
    position: absolute;
    left: 16px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border-radius: 8px;
}

.profile-line .circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.profile-line .name {
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* Menú */
.menu {
    padding: 16px;
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* separación justa */
}

.menu a {
    display: block;
    padding: 8px 12px;
    color: #000;
    /* texto negro */
    text-decoration: none;
    /* sin subrayado */
    border-radius: 6px;
    transition: all 0.2s ease;
    /* Aquí forzamos el uso de la fuente que usa el resto de tu ficha */
        /* Usamos 'Arial, sans-serif' como ejemplo, si usas otra fuente, cámbiala. */
        font-family: Arial, sans-serif;
        /* Si tienes una fuente personalizada en tus variables CSS: */
        /* font-family: var(--fuente-label); */
}

/* Títulos de sección: solo texto en color, nunca subrayado ni hover */
.menu a.section.green {
    font-weight: 800;
    color: var(--green);
    pointer-events: none;
    /* no se comporta como link */
}

.menu a.section.blue {
    font-weight: 800;
    color: var(--accent);
    pointer-events: none;
    /* no se comporta como link */
}

/* Hover en ítems normales (no secciones) */
.menu a:not(.section):hover {
    background: #d6eaf8;
    /* celestito suave */
    color: #0d47a1;
    /* azul fuerte */
    text-decoration: underline;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.05);
    /* rectángulo gris suave */
}

/* Divisor */
.divider.short {
    width: 60%;
    height: 1px;
    background: #ccc;
    margin: 12px auto;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    background-color: #004080;
    /* azul institucional */
    color: #ffffff;
}

.container.section .footer {
    width: 100%;
    /* ocupa todo el ancho del container */
}

.footer-title {
    color: #ffffff;
    /* blanco institucional */
    font-weight: 600;
    /* negrita suave */
    margin: 0 0 8px 0;
    /* separación inferior */
    line-height: 1.5;
    /* mismo interlineado que los <li> de la derecha */
}

/* ================================================= */
/* Estilos para los Botones de Scroll (Arriba/Abajo) */
/* ================================================= */

.scroll-actions-btn {
    position: fixed;
    right: 16px;
    /* Misma posición horizontal que el botón flotante (☰) */
    bottom: 90px;
    /* Colocado más arriba para no chocar con el botón de la barra lateral */
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Pequeña separación entre los dos botones */
}

.btn-scroll {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    /* Esquinas ligeramente redondeadas como en la captura */
    background-color: #5c629c;
    /* Azul/Púrpura similar al de tu captura */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, opacity 0.3s;
    text-decoration: none;
    /* Quitamos el subrayado del link */
    font-size: 1.2em;
}

.btn-scroll:hover {
    background-color: #4a5080;
    /* Un poco más oscuro al pasar el mouse */
}

/* Clases para manejar la visibilidad con JavaScript */
.scroll-actions-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* CORRECCIÓN DE SCROLL PARA EVITAR QUE EL TEXTO SE CORTE */
.scroll-pad-top {
    /* Esto agrega un espacio virtual de 20px (aprox 2cm) por encima de la ancla */
    scroll-margin-top: 20px;
}

/* Ajuste para móviles: si es necesario, puedes moverlos o reducir el tamaño */
@media (max-width: 768px) {
    .scroll-actions-btn {
        right: 10px;
        bottom: 80px;
    }

    .btn-scroll {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}