/* ========== OVERLAY ========== */
.overlay-barrera {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1040;
    pointer-events: auto;
    display: none;
}

.overlay-barrera.visible {
    display: block;
}

/* ========== AVATAR CON INICIALES ========== */
.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: linear-gradient(180deg, #9B2247 0%, #611232 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.user-avatar-circle span {
    color: #FFF;
    text-align: center;
    font-family: "Noto Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

/* ========== BOTÓN DEL USUARIO EN NAVBAR ========== */
.user-dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    cursor: pointer;
    background: none !important;
    border: none !important;
    white-space: nowrap; 
}

.user-dropdown-toggle:hover,
.user-dropdown-toggle:focus,
.user-dropdown-toggle:active {
    color: #fff !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

.user-dropdown-toggle .dropdown-arrow {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.user-dropdown-toggle .dropdown-arrow.rotado {
    transform: rotate(180deg);
}

/* ========== PANEL DE PERFIL ========== */
.perfil-panel {
    display: none;
    position: fixed;
    top: 150px;
    right: 70px;
    width: 380px;
    max-width: calc(100vw - 40px);
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-radius: 16px;
    background: #FFF;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.25);
    z-index: 1050;
    animation: slideDown 0.2s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

.perfil-panel.visible {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== CONTENEDOR INTERNO ========== */
.perfil-panel .perfil-paneles {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    align-self: stretch;
}

/* ========== DATOS DEL PERFIL (HEADER) ========== */
.perfil-panel .perfil-paneles .perfil-datos {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 16px;
    width: 100%;
    gap: 12px;
    background: #F0ECED;
    border-radius: 16px 16px 0 0;
}

.perfil-panel .perfil-paneles .perfil-datos .perfil {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, #9B2247 0%, #611232 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.perfil-panel .perfil-paneles .perfil-datos .perfil span {
    color: #FFF;
    text-align: center;
    font-family: "Noto Sans", sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.perfil-panel .perfil-paneles .perfil-datos .datos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 1;
}

.perfil-panel .perfil-paneles .perfil-datos .datos .nombre {
    color: #161A1D;
    font-family: "Noto Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.perfil-panel .perfil-paneles .perfil-datos .datos .tipo-perfil {
    color: #161A1D;
    font-family: "Noto Sans", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

/* ========== SECCIÓN DE OPCIONES ========== */
.perfil-panel .perfil-paneles .seccion-opciones {
    display: flex;
    padding: 0 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
}

.perfil-panel .perfil-paneles .seccion-opciones .opcion-perfil {
    display: flex;
    padding: 8px 0;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    border-bottom: none !important;
    text-decoration: none !important;
    color: #161A1D !important;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.perfil-panel .perfil-paneles .seccion-opciones .opcion-perfil:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.perfil-panel .perfil-paneles .seccion-opciones .opcion-perfil.sin-borde {
    border-bottom: none;
}

.perfil-panel .perfil-paneles .seccion-opciones .opcion-perfil span {
    color: #611232;
    font-family: "Noto Sans", sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    line-height: 135.714%;
    flex: 1 0 0;
}

.perfil-panel .perfil-paneles .seccion-opciones .opcion-perfil i {
    color: #611232;
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* ========== SEPARADOR ========== */
.perfil-panel .perfil-paneles .separador-menu {
    width: calc(100% - 32px);
    height: 1px;
    background-color: #DDD;
    margin: 4px 16px;
}

/* ========== CERRAR SESIÓN ========== */
.perfil-panel .perfil-paneles .cerrar-sesion-panel {
    display: flex;
    padding: 8px 16px 16px 16px;
    flex-direction: row;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0 0 16px 16px;
}

.perfil-panel .perfil-paneles .cerrar-sesion-panel:hover {
    background-color: rgba(97, 18, 50, 0.05);
}

.perfil-panel .perfil-paneles .cerrar-sesion-panel i {
    color: #611232;
    font-size: 18px;
}

.perfil-panel .perfil-paneles .cerrar-sesion-panel span {
    color: #611232;
    font-family: "Noto Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 137.5%;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .perfil-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        top: 80px;
    }
}

/* ========== OCULTAR DROPDOWN DEFAULT DE BOOTSTRAP ========== */
.menu-desktop .dropdown-menu {
    display: none !important;
}