/* ==========================================================
   INSTITUTE — BARRA GLOBAL ÚNICA
   Web normal + panel de usuario
   ========================================================== */

#navbar {
    min-height: 54px;
    padding-top: 0;
    padding-bottom: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(20, 25, 32, .08);
    box-shadow: 0 2px 10px rgba(20, 25, 32, .035);
}

#navbar.sticky {
    border-bottom: 1px solid rgba(20, 25, 32, .10);
    box-shadow: 0 4px 16px rgba(20, 25, 32, .055);
}

#navbar > .container,
#navbar > .container-fluid {
    min-height: 54px;
}

/* Acciones persistentes */
#navbar .institute-navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

#navbar .institute-navbar-quick-actions {
    display: flex !important;
    align-items: center;
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto;
}

#navbar .institute-navbar-quick-actions > .border-left {
    height: 24px;
    margin-left: 10px !important;
    margin-right: 10px !important;
    border-color: rgba(20,25,32,.12) !important;
}

#navbar .institute-navbar-quick-actions svg {
    width: 19px !important;
    height: 19px !important;
    color: #303640;
    stroke: currentColor;
}

/* Usuario */
#navbar .institute-navbar-account {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

#navbar .institute-navbar-user-menu {
    margin-left: 14px !important;
}

#navbar .institute-navbar-user-menu .navbar-user {
    display: flex;
    align-items: center;
}

#navbar .institute-navbar-user-menu .navbar-user img {
    width: 30px;
    min-width: 30px;
    height: 30px;
    object-fit: cover;
}

#navbar .institute-navbar-user-menu .navbar-user .user-name {
    max-width: 160px;
    overflow: hidden;
    color: #303640 !important;
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login/registro cuando no existe sesión */
#navbar .institute-navbar-account > .d-flex > a {
    color: #d9dde3 !important;
}

/* Botón del menú del panel: solo móvil */
#navbar .institute-panel-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin-left: 8px;
    padding: 0 !important;
    border: 0;
    border-radius: 8px;
    color: #303640;
    background: transparent;
}

#navbar .institute-panel-menu-toggle:hover {
    background: rgba(20,25,32,.05);
}

/* El antiguo encabezado móvil del panel deja de ocupar altura */
#panel_app .xs-panel-nav {
    display: none !important;
}


/* ==========================================================
   MÓVIL / TABLET
   ========================================================== */

@media (max-width: 991px) {

    #navbar,
    #navbar > .container,
    #navbar > .container-fluid {
        min-height: 52px;
    }

    #navbar {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Logo siempre primero */
    #navbar .navbar-brand.navbar-order {
        order: 1 !important;
        flex: 0 0 auto;
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    /* Acciones después del logo */
    #navbar .institute-navbar-actions.navbar-order {
        order: 2 !important;
        margin-left: auto !important;
    }

    /* Menú general de la web al extremo derecho */
    #navbar #navbarToggle.navbar-order {
        order: 3 !important;
        width: 34px;
        height: 34px;
        margin-left: 7px;
        padding: 5px;
        border: 0;
    }

    #navbar .institute-navbar-quick-actions > .border-left {
        margin-left: 7px !important;
        margin-right: 7px !important;
    }

    #navbar .institute-navbar-quick-actions svg {
        width: 18px !important;
        height: 18px !important;
    }

    #navbar .institute-navbar-user-menu {
        margin-left: 8px !important;
    }

    #navbar .institute-navbar-user-menu .navbar-user img {
        width: 27px;
        min-width: 27px;
        height: 27px;
    }

    /* Solo nombre de pila y con límite estricto */
    #navbar .institute-navbar-user-menu .navbar-user .user-name {
        max-width: 68px;
        font-size: 12px !important;
    }

    /* En panel, el único hamburguesa es el que abre el sidebar */
    #panel_app #navbarToggle {
        display: none !important;
    }

    #panel_app #navbar .institute-panel-menu-toggle {
        display: flex;
    }
}


/* Teléfonos angostos */
@media (max-width: 575px) {

    #navbar {
        padding-left: 10px;
        padding-right: 10px;
    }

    #navbar .institute-navbar-user-menu .navbar-user img {
        width: 26px;
        min-width: 26px;
        height: 26px;
    }

    #navbar .institute-navbar-user-menu .navbar-user .user-name {
        max-width: 58px;
        margin-left: 5px !important;
    }

    #navbar .institute-navbar-quick-actions > .border-left {
        margin-left: 5px !important;
        margin-right: 5px !important;
    }

    #navbar .institute-panel-menu-toggle {
        margin-left: 5px;
    }
}

/* ==========================================================
   PANEL MÓVIL — RECUPERAR ESPACIO DE LA ANTIGUA XS-PANEL-NAV
   ========================================================== */

@media (max-width: 991px) {
    #panel_app .panel-content {
        padding-top: 18px !important;
    }
}


/* ==========================================================
   INSTITUTE NAVBAR — AJUSTE FINO MÓVIL TIPO APP
   ========================================================== */

@media (max-width: 991px) {

    #navbar,
    #navbar > .container,
    #navbar > .container-fluid {
        min-height: 48px !important;
        height: 48px;
    }

    #navbar {
        padding-left: 10px !important;
        padding-right: 10px !important;
        background: #111318 !important;
        border-bottom: 1px solid rgba(255,255,255,.07) !important;
        box-shadow: none !important;
    }

    /* Logo compacto, sin caja sobredimensionada */
    #navbar .navbar-brand {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        width: auto !important;
        max-width: none !important;
        height: 48px !important;
        margin: 0 auto 0 0 !important;
        padding: 0 !important;
    }

    #navbar .navbar-brand img {
        width: 78px !important;
        max-width: 78px !important;
        height: auto !important;
        max-height: 26px !important;
        object-fit: contain !important;
    }

    /* Acciones compactas */
    #navbar .institute-navbar-actions {
        height: 48px;
        gap: 0;
    }

    #navbar .institute-navbar-quick-actions svg {
        width: 17px !important;
        height: 17px !important;
        color: #eef1f4 !important;
    }

    #navbar .institute-navbar-quick-actions > .border-left {
        height: 20px !important;
        margin-left: 6px !important;
        margin-right: 6px !important;
        border-color: rgba(255,255,255,.18) !important;
    }

    /* Usuario: solo nombre de pila, legible */
    #navbar .institute-navbar-user-menu {
        margin-left: 7px !important;
    }

    #navbar .institute-navbar-user-menu .navbar-user img {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
    }

    #navbar .institute-navbar-user-menu .navbar-user .user-name {
        max-width: 62px !important;
        margin-left: 5px !important;
        color: #e4e8ed !important;
        font-size: 11px !important;
        font-weight: 500 !important;
    }

    /* Hamburguesa del panel */
    #navbar .institute-panel-menu-toggle {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        margin-left: 5px !important;
        color: #eef1f4 !important;
        border-radius: 6px !important;
    }

    #navbar .institute-panel-menu-toggle svg {
        width: 18px !important;
        height: 18px !important;
    }
}


/* ==========================================================
   INSTITUTE NAVBAR — GLASS MÓVIL MÁS SUTIL Y TRANSPARENTE
   ========================================================== */
@media (max-width: 991px) {
    #navbar,
    #panel_app #navbar {
        background:
            linear-gradient(
                90deg,
                rgba(120, 0, 20, 0.12) 0%,
                rgba(12, 15, 20, 0.44) 38%,
                rgba(12, 15, 20, 0.40) 62%,
                rgba(120, 0, 20, 0.10) 100%
            ) !important;
        -webkit-backdrop-filter: blur(14px) saturate(135%);
        backdrop-filter: blur(14px) saturate(135%);
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,.14) !important;
    }

    #navbar.sticky,
    #panel_app #navbar.sticky {
        background:
            linear-gradient(
                90deg,
                rgba(120, 0, 20, 0.10) 0%,
                rgba(10, 12, 16, 0.36) 38%,
                rgba(10, 12, 16, 0.32) 62%,
                rgba(120, 0, 20, 0.08) 100%
            ) !important;
        -webkit-backdrop-filter: blur(15px) saturate(140%);
        backdrop-filter: blur(15px) saturate(140%);
    }
}

/* ==========================================================
   INSTITUTE NAVBAR — ESCRITORIO GLASS / APP BAR
   ========================================================== */

@media (min-width: 992px) {

    #navbar,
    #panel_app #navbar {
        min-height: 52px !important;
        height: 52px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;

        background:
            linear-gradient(
                90deg,
                rgba(105, 0, 18, 0.10) 0%,
                rgba(12, 14, 18, 0.42) 30%,
                rgba(12, 14, 18, 0.38) 70%,
                rgba(105, 0, 18, 0.09) 100%
            ) !important;

        -webkit-backdrop-filter: blur(15px) saturate(135%);
        backdrop-filter: blur(15px) saturate(135%);

        border-bottom: 1px solid rgba(255,255,255,.075) !important;
        box-shadow: 0 7px 24px rgba(0,0,0,.10) !important;
    }

    #navbar.sticky,
    #panel_app #navbar.sticky {
        background:
            linear-gradient(
                90deg,
                rgba(105, 0, 18, 0.09) 0%,
                rgba(9, 11, 15, 0.36) 30%,
                rgba(9, 11, 15, 0.33) 70%,
                rgba(105, 0, 18, 0.08) 100%
            ) !important;

        -webkit-backdrop-filter: blur(16px) saturate(140%);
        backdrop-filter: blur(16px) saturate(140%);
    }

    #navbar > .container,
    #navbar > .container-fluid {
        min-height: 52px !important;
        height: 52px !important;
        align-items: center;
    }

    /* Logo */
    #navbar .navbar-brand {
        display: flex !important;
        align-items: center;
        width: 140px !important;
        height: 52px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #navbar .navbar-brand img {
        width: auto !important;
        max-width: 138px !important;
        max-height: 30px !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* Navegación central, si existen enlaces */
    #navbar .navbar-toggle-content {
        min-height: 52px;
        align-items: center;
    }

    #navbar .navbar-nav .nav-link {
        color: rgba(245,247,250,.78) !important;
        font-size: 13px !important;
        font-weight: 500;
    }

    #navbar .navbar-nav .nav-link:hover {
        color: #ffffff !important;
    }

    /* Zona derecha */
    #navbar .institute-navbar-actions {
        height: 52px;
        display: flex;
        align-items: center;
    }

    #navbar .institute-navbar-quick-actions svg {
        width: 18px !important;
        height: 18px !important;
        color: #eef1f4 !important;
    }

    #navbar .institute-navbar-quick-actions > .border-left {
        height: 22px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
        border-color: rgba(255,255,255,.17) !important;
    }

    /* Usuario */
    #navbar .institute-navbar-user-menu {
        margin-left: 12px !important;
    }

    #navbar .institute-navbar-user-menu .navbar-user img {
        width: 27px !important;
        min-width: 27px !important;
        height: 27px !important;
    }

    #navbar .institute-navbar-user-menu .navbar-user .user-name {
        max-width: 190px !important;
        margin-left: 7px !important;
        color: rgba(244,246,249,.92) !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        line-height: 1.2;
    }
}

/* ==========================================================
   INSTITUTE — DRAWERS DE NAVEGACIÓN
   Superficie/overlay/header heredados DIRECTAMENTE del
   Centro de Notificaciones.
   Aquí solo vive el contenido propio de Carrito y Cuenta.
   ========================================================== */

body.institute-nav-drawer-open {
    overflow: hidden;
}


/* Área desplazable de contenido */

.institute-nav-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}


/* ==========================================================
   TRIGGER CARRITO
   ========================================================== */

.institute-cart-trigger-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.institute-cart-trigger {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 6px !important;
    color: inherit;
}

.institute-cart-trigger__badge {
    position: absolute;
    top: -2px;
    right: -3px;
    min-width: 16px !important;
    width: auto !important;
    height: 16px !important;
    padding: 0 4px;
    font-size: 9px !important;
    line-height: 1;
}


/* ==========================================================
   CARRITO
   ========================================================== */

.institute-cart-drawer__body {
    display: flex;
    flex-direction: column;
    background: transparent;
}

.institute-cart-drawer__items {
    flex: 1 1 auto;
    padding: 8px 0;
}

.institute-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.09);
    transition: background-color .18s ease;
}

.institute-cart-item:hover {
    background: rgba(255,255,255,.055);
}

.institute-cart-item__image {
    flex: 0 0 82px;
    width: 82px;
    height: 58px;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(255,255,255,.08);
}

.institute-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.institute-cart-item__content {
    min-width: 0;
    flex: 1 1 auto;
}

.institute-cart-item__title {
    display: block;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.institute-cart-item__price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
    color: rgba(255,255,255,.72);
    font-size: 11px;
}

.institute-cart-item__price strong {
    color: #f0b5ba;
    font-size: 12px;
    font-weight: 700;
}

.institute-cart-item__old-price {
    color: rgba(255,255,255,.42);
    text-decoration: line-through;
}

.institute-cart-item__quantity {
    color: rgba(255,255,255,.56);
}

.institute-cart-drawer__footer {
    flex: 0 0 auto;
    padding: 18px 20px max(18px, env(safe-area-inset-bottom));
    background: rgba(15,15,17,.18);
    border-top: 1px solid rgba(255,255,255,.10);
}

.institute-cart-drawer__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
    color: rgba(255,255,255,.70);
    font-size: 12px;
}

.institute-cart-drawer__total strong {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.institute-cart-drawer__cta {
    min-height: 42px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid rgba(219,82,94,.34);
    border-radius: 9px;
    background: rgba(169,15,24,.80);
    color: #fff !important;
    font-size: 12px;
    font-weight: 650;
    transition: background-color .18s ease, border-color .18s ease;
}

.institute-cart-drawer__cta:hover {
    background: rgba(183,22,32,.94);
    border-color: rgba(225,104,114,.48);
}


/* ==========================================================
   CUENTA
   ========================================================== */

.institute-account-trigger {
    padding: 4px 0 !important;
    border: 0;
    background: transparent;
}

.institute-account-drawer__body {
    padding: 18px 0;
    background: transparent;
}

.institute-account-profile {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 18px 16px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: rgba(255,255,255,.055);
}

.institute-account-profile__avatar {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.15);
}

.institute-account-profile__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.institute-account-profile__info strong {
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.institute-account-profile__info span {
    margin-top: 3px;
    color: rgba(255,255,255,.52);
    font-size: 11px;
}

.institute-account-menu {
    display: flex;
    flex-direction: column;
}

.institute-account-menu__item {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px;
    color: rgba(255,255,255,.80) !important;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-size: 13px;
    font-weight: 500;
    transition: background-color .18s ease, color .18s ease;
}

.institute-account-menu__item:hover {
    background: rgba(255,255,255,.06);
    color: #fff !important;
}

.institute-account-menu__item > span {
    flex: 1 1 auto;
    min-width: 0;
}

.institute-account-menu__item > svg {
    flex: 0 0 auto;
    color: rgba(255,255,255,.34);
}

.institute-account-menu__icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    opacity: .78;
    filter: brightness(0) invert(1);
}

.institute-account-menu__item--logout {
    margin-top: 10px;
    color: #ef8b93 !important;
    border-top: 1px solid rgba(255,255,255,.09);
}

.institute-account-menu__item--logout:hover {
    color: #ffacb2 !important;
    background: rgba(169,15,24,.10);
}



/* Navegación ampliada del panel de alumno */

.institute-account-menu__feather {
    width: 20px;
    min-width: 20px;
    height: 20px;
    color: rgba(255,255,255,.76);
}

.institute-account-menu__item--active,
.institute-account-menu__group.is-active > .institute-account-menu__item {
    background: linear-gradient(
        90deg,
        rgba(130,0,18,.28) 0%,
        rgba(130,0,18,.10) 70%,
        rgba(130,0,18,.03) 100%
    );
    color: #fff !important;
}

.institute-account-menu__item--active {
    box-shadow: inset 2px 0 0 rgba(214,53,67,.78);
}

.institute-account-menu__group {
    margin: 0;
    padding: 0;
}

.institute-account-menu__group > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.institute-account-menu__group > summary::-webkit-details-marker {
    display: none;
}

.institute-account-menu__chevron {
    width: 17px;
    min-width: 17px;
    height: 17px;
    color: rgba(255,255,255,.34);
    transition: transform .18s ease;
}

.institute-account-menu__group[open] > summary .institute-account-menu__chevron {
    transform: rotate(90deg);
}

.institute-account-menu__submenu {
    padding: 4px 0 7px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(0,0,0,.10);
}

.institute-account-menu__subitem {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 7px 20px 7px 51px;
    color: rgba(255,255,255,.58) !important;
    font-size: 12px;
    font-weight: 450;
    transition: background-color .18s ease, color .18s ease;
}

.institute-account-menu__subitem:hover {
    background: rgba(255,255,255,.045);
    color: #fff !important;
}

.institute-account-menu__subitem.is-active {
    color: #fff !important;
    background: rgba(130,0,18,.16);
}

.institute-account-menu__separator {
    height: 10px;
    border-bottom: 1px solid rgba(255,255,255,.09);
    background: rgba(0,0,0,.08);
}

/* Estado vacío */

.institute-nav-drawer__empty {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.institute-nav-drawer__empty-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.70);
}

.institute-nav-drawer__empty h3 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 650;
}

.institute-nav-drawer__empty p {
    max-width: 260px;
    margin: 7px 0 0;
    color: rgba(255,255,255,.48);
    font-size: 12px;
    line-height: 1.55;
}


/* Ajustes exclusivos del contenido en móvil.
   El drawer, backdrop, header y X vienen de Notificaciones. */

@media (max-width: 767.98px) {

    .institute-cart-item {
        padding: 15px 16px;
    }

    .institute-cart-item__image {
        flex-basis: 74px;
        width: 74px;
        height: 54px;
    }

    .institute-account-drawer__body {
        padding-top: 14px;
    }

    .institute-account-profile {
        margin-left: 16px;
        margin-right: 16px;
    }

    .institute-account-menu__item {
        min-height: 54px;
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .institute-cart-item,
    .institute-account-menu__item {
        transition: none !important;
    }
}


/* ==========================================================
   PANEL ALUMNO — DRAWER COMO NAVEGACIÓN ÚNICA
   ========================================================== */

#panel_app.institute-panel-student .panel-content {
    width: 100% !important;
}




/* ==========================================================
   PANEL ALUMNO — HAMBURGUESA DEL DRAWER
   ========================================================== */

#panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;

    margin-left: 8px !important;
    padding: 0 !important;

    color: rgba(255,255,255,.92) !important;
    background: rgba(255,255,255,.035) !important;

    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 8px !important;

    transition:
        background-color .18s ease,
        border-color .18s ease;
}

#panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle:hover {
    background: rgba(255,255,255,.075) !important;
    border-color: rgba(255,255,255,.22) !important;
}

#panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle:focus-visible {
    outline: 2px solid rgba(210,55,65,.72) !important;
    outline-offset: 2px;
}

#panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle svg {
    width: 19px !important;
    height: 19px !important;
}

@media (max-width: 991px) {
    #panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        margin-left: 5px !important;
        border-radius: 7px !important;
    }

    #panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle svg {
        width: 18px !important;
        height: 18px !important;
    }
}



/* ==========================================================
   NAVBAR GLOBAL — ESPACIADO Y MENÚ UNIFICADO
   ========================================================== */

#navbar .institute-navbar-actions {
    display: flex;
    align-items: center;
}

#navbar .institute-navbar-quick-actions {
    display: flex;
    align-items: center;
}

#navbar .institute-navbar-separator {
    width: 1px;
    min-width: 1px;
    height: 22px;

    margin-left: 12px !important;
    margin-right: 12px !important;

    border: 0 !important;
    background: rgba(255,255,255,.16) !important;
}

#navbar .institute-navbar-quick-actions > .institute-navbar-separator {
    margin-left: 12px !important;
    margin-right: 12px !important;
}

#navbar .institute-navbar-user-menu {
    margin-left: 0 !important;
}

#navbar .institute-global-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 28px;
    min-width: 28px;
    height: 32px;

    margin: 0 !important;
    padding: 0 !important;

    color: rgba(255,255,255,.88) !important;

    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;

    box-shadow: none !important;

    transition:
        background-color .18s ease,
        color .18s ease;
}

#navbar .institute-global-menu-toggle:hover {
    color: #fff !important;
    background: rgba(255,255,255,.055) !important;
}

#navbar .institute-global-menu-toggle:focus-visible {
    outline: 2px solid rgba(210,55,65,.70) !important;
    outline-offset: 2px;
}

#navbar .institute-global-menu-toggle svg {
    width: 19px !important;
    height: 19px !important;
}

/* El antiguo botón específico del alumno ya no se usa */
#panel_app.institute-panel-student #navbar .institute-panel-drawer-toggle {
    display: none !important;
}

@media (max-width: 991px) {

    #navbar .institute-navbar-separator {
        height: 20px;

        margin-left: 7px !important;
        margin-right: 7px !important;

        background: rgba(255,255,255,.15) !important;
    }

    #navbar .institute-navbar-quick-actions > .institute-navbar-separator {
        margin-left: 7px !important;
        margin-right: 7px !important;
    }

    #navbar .institute-global-menu-toggle {
        width: 25px;
        min-width: 25px;
        height: 30px;
        border-radius: 6px !important;
    }

    #navbar .institute-global-menu-toggle svg {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 575px) {

    #navbar .institute-navbar-separator {
        margin-left: 6px !important;
        margin-right: 6px !important;
    }

    #navbar .institute-navbar-quick-actions > .institute-navbar-separator {
        margin-left: 6px !important;
        margin-right: 6px !important;
    }
}



/* ==========================================================
   PANEL ALUMNO — ANCHO TIPO CONTAINER ROCKET LMS
   Mismos breakpoints y max-width que .container de app.css
   ========================================================== */

#panel_app.institute-panel-student .panel-content {
    width: 100% !important;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 768px) {
    #panel_app.institute-panel-student .panel-content {
        max-width: 769px;
    }
}

@media (min-width: 992px) {
    #panel_app.institute-panel-student .panel-content {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    #panel_app.institute-panel-student .panel-content {
        max-width: 1140px;
    }
}


/* ==========================================================
   PANEL DRAWER — CONTROL FIJAR
   ========================================================== */

.institute-nav-drawer__header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.institute-panel-drawer-pin {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: rgba(255,255,255,.68);

    box-shadow: none;
    cursor: pointer;

    transition:
        color .18s ease,
        background-color .18s ease;
}

.institute-panel-drawer-pin:hover {
    color: #fff;
    background: rgba(255,255,255,.065);
}

.institute-panel-drawer-pin:focus-visible {
    outline: 2px solid rgba(210,55,65,.70);
    outline-offset: 2px;
}

.institute-panel-drawer-pin svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

@media (max-width: 991px) {
    .institute-panel-drawer-pin {
        display: none !important;
    }
}



/* ==========================================================
   PANEL DRAWER — ESTADO FIJADO
   El drawer pasa a formar parte real del layout en escritorio.
   ========================================================== */

@media (min-width: 1200px) {

    #panel_app.institute-panel-student {
        width: 100%;
        max-width: 100%;
        transition:
            width .28s ease,
            max-width .28s ease;
    }

    body.institute-panel-drawer-pinned {
        overflow: auto !important;
    }

    body.institute-panel-drawer-pinned
    #panel_app.institute-panel-student {
        width: calc(100% - 430px);
        max-width: calc(100% - 430px);
    }

    body.institute-panel-drawer-pinned
    #panel_app.institute-panel-student
    .panel-content {
        max-width: 1140px !important;
        transform: none !important;
    }

    /*
     * La navbar normal ya queda dentro del ancho reducido de #panel_app.
     * Cuando Rocket la convierte en fixed mediante .sticky,
     * debemos reservar explícitamente los 430px del drawer.
     */
    body.institute-panel-drawer-pinned
    #panel_app.institute-panel-student
    #navbar.sticky {
        left: 0 !important;
        right: 430px !important;
        width: auto !important;
        max-width: none !important;
    }

    #instituteAccountDrawer.is-pinned {
        pointer-events: none;
    }

    #instituteAccountDrawer.is-pinned
    .institute-nav-drawer__backdrop {
        display: none !important;
    }

    #instituteAccountDrawer.is-pinned
    .institute-nav-drawer__panel {
        pointer-events: auto;
    }

    #instituteAccountDrawer.is-pinned
    .institute-panel-drawer-pin {
        color: #fff;
        background: rgba(155, 0, 20, .32);
    }
}

@media (max-width: 1199.98px) {
    .institute-panel-drawer-pin {
        display: none !important;
    }
}



/* ==========================================================
   PANEL FIJADO — DRAWER TEMPORAL
   Carrito/Notificaciones sustituyen al Panel sin mover layout.
   ========================================================== */

@media (min-width: 1200px) {

    /*
     * Mientras el Panel está fijado, Carrito y Notificaciones
     * usan los 430px ya reservados. El backdrop se desactiva
     * desde el primer frame en que la superficie deja de estar
     * hidden, sin esperar a que reciba .is-open.
     */
    body.institute-panel-drawer-pinned
    .institute-nav-drawer:not(#instituteAccountDrawer):not([hidden]),
    body.institute-panel-drawer-pinned
    #instituteNotificationCenter:not([hidden]) {
        pointer-events: none;
    }

    body.institute-panel-drawer-pinned
    .institute-nav-drawer:not(#instituteAccountDrawer):not([hidden])
    .institute-nav-drawer__panel,
    body.institute-panel-drawer-pinned
    #instituteNotificationCenter:not([hidden])
    .institute-notification-center__drawer {
        pointer-events: auto;
    }

    body.institute-panel-drawer-pinned
    .institute-nav-drawer:not(#instituteAccountDrawer):not([hidden])
    .institute-nav-drawer__backdrop,
    body.institute-panel-drawer-pinned
    #instituteNotificationCenter:not([hidden])
    .institute-notification-center__backdrop {
        display: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

