﻿
/* ==========================================================
   SIDEBAR INSTITUCIONAL ISTTA — versión escalada ~90%
   (equivalente visual a "zoom: 90%" pero sin usar zoom)
   ========================================================== */

.custom-sidebar {
    width: 203px; /* antes 225px */
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background: linear-gradient( 180deg, #720817 0%, #8d1021 48%, #5d0612 100% );
    box-shadow: 5px 0 20px rgba(0,0,0,.18);
    z-index: 1030;
    transition: transform .25s ease;
}

    .custom-sidebar,
    .custom-sidebar * {
        box-sizing: border-box;
    }

        /* ==========================================================
   PERFIL
   ========================================================== */

        .custom-sidebar .user-profile {
            position: relative;
            z-index: 2;
            padding: 58px 20px 18px; /* antes 60px 22px 20px */
            text-align: center;
            border: none !important;
            background: transparent !important;
        }

        /* AVATAR */

        .custom-sidebar .user-avatar-container {
            display: flex;
            justify-content: center;
            margin-bottom: 9px; /* antes 10px */
        }

        .custom-sidebar .user-avatar {
            width: 74px; /* antes 82px */
            height: 74px; /* antes 82px */
            object-fit: cover;
            border-radius: 50%;
            border: 3px solid #ffc83d;
            background: #ffc83d;
            box-shadow: 0 5px 15px rgba(0,0,0,.25);
        }

        /* ROL */

        .custom-sidebar .user-role {
            display: inline-block;
            padding: 5px 29px; /* antes 6px 32px */
            border-radius: 20px;
            background: linear-gradient( 145deg, #ffd45a, #e8a41d );
            color: #5e0711;
            font-size: 13px; /* antes 15px */
            font-weight: 700;
        }

        /* CÓDIGO */

        .custom-sidebar .user-code {
            margin-top: 4px; /* antes 5px */
            color: #fff;
            font-size: 16px; /* antes 18px */
            font-weight: 600;
        }

        /* NOMBRE */

        .custom-sidebar .user-name {
            margin-top: 4px; /* antes 5px */
            color: #fff;
            font-size: 13px; /* antes 14px */
            font-weight: 600;
        }

        /* CARRERA */

        .custom-sidebar .user-career {
            margin-top: 2px;
            color: rgba(255,255,255,.75);
            font-size: 11px; /* antes 12px */
        }

        /* BOTÓN CAMBIAR PERFIL */

        .custom-sidebar .profile-switch-button {
            width: 100%;
            min-height: 40px; /* antes 45px */
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px; /* antes 9px */
            margin-top: 14px; /* antes 16px */
            padding: 7px 11px; /* antes 8px 12px */
            background: transparent;
            border: 1px solid rgba(255,255,255,.9);
            border-radius: 9px; /* antes 10px */
            color: #fff;
            font-size: 13px; /* antes 14px */
            cursor: pointer;
            transition: .25s ease;
        }

            .custom-sidebar .profile-switch-button:hover {
                background: rgba(255,255,255,.12);
                color: #fff;
                transform: translateY(-1px);
            }

        /* ==========================================================
   CONTENEDOR DEL MENÚ
   ========================================================== */

        .custom-sidebar .sidebar-menu {
            position: relative;
            z-index: 2;
            flex: 1;
            overflow-y: auto;
            padding: 0 14px; /* antes 0 16px */
            scrollbar-width: thin;
            scrollbar-color: rgba(255,255,255,.25) transparent;
        }

        /* ==========================================================
   TÍTULOS
   ========================================================== */

        .custom-sidebar .sidebar-section-title {
            display: flex;
            align-items: center;
            gap: 11px; /* antes 12px */
            margin: 13px 13px 9px; /* antes 14px 14px 10px */
            color: #ffd04a;
            font-size: 13px; /* antes 14px */
            font-weight: 700;
            letter-spacing: .6px;
        }

            .custom-sidebar .sidebar-section-title > div {
                flex: 1;
                height: 1px;
                background: rgba(255,208,74,.55);
            }

        /* ==========================================================
   LINKS
   ========================================================== */

        .custom-sidebar .nav-link {
            position: relative;
            width: 100%;
            min-height: 46px; /* antes 51px */
            display: flex;
            align-items: center;
            gap: 13px; /* antes 15px */
            margin: 3px 0; /* antes 4px 0 */
            padding: 9px 14px; /* antes 10px 16px */
            border: none !important;
            border-radius: 11px; /* antes 12px */
            background: transparent !important;
            color: #fff !important;
            text-decoration: none;
            font-size: 15px; /* antes 17px */
            font-weight: 500;
            transition: background .25s ease, transform .2s ease;
        }

            /* HOVER */

            .custom-sidebar .nav-link:hover {
                background: rgba(255,255,255,.10) !important;
                color: #fff !important;
            }

            /* ACTIVO */

            .custom-sidebar .nav-link.active {
                background: linear-gradient( 90deg, #a71932, #941126 ) !important;
                color: #fff !important;
                font-weight: 700;
                box-shadow: 0 5px 12px rgba(0,0,0,.12);
            }

                /* LÍNEA DORADA */

                .custom-sidebar .nav-link.active::before {
                    content: "";
                    position: absolute;
                    left: 0;
                    top: 0;
                    bottom: 0;
                    width: 5px; /* antes 6px */
                    background: #ffc83d;
                    border-radius: 10px 0 0 10px;
                }

        /* ==========================================================
   ICONOS
   ========================================================== */

        .custom-sidebar .sb-nav-link-icon {
            width: 25px; /* antes 28px */
            min-width: 25px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 17px; /* antes 19px */
            color: #fff;
        }

        /* ==========================================================
   SEPARADOR
   ========================================================== */

        .custom-sidebar .sidebar-separator {
            height: 1px;
            margin: 16px 6px; /* antes 18px 7px */
            background: rgba(255,255,255,.10);
        }

        /* ==========================================================
   LOGOUT
   ========================================================== */

        .custom-sidebar .sidebar-logout-form {
            margin: 0;
            padding: 0;
        }

        .custom-sidebar .sidebar-logout {
            cursor: pointer;
            font-family: inherit;
            text-align: left;
        }

        /* ==========================================================
   FOOTER
   ========================================================== */

        .custom-sidebar .sidebar-footer {
            position: relative;
            z-index: 2;
            min-height: 90px; /* antes 100px */
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding-bottom: 18px; /* antes 20px */
        }

        .custom-sidebar .footer-book {
            margin-bottom: 7px; /* antes 8px */
            color: #ffc83d;
            font-size: 43px; /* antes 48px */
            filter: drop-shadow( 0 3px 4px rgba(0,0,0,.25) );
        }

        .custom-sidebar .footer-text {
            color: rgba(255,255,255,.95);
            text-align: center;
            font-size: 13px; /* antes 15px */
            line-height: 1.35;
        }

/* ==========================================================
   ÁREA DE CONTENIDO
   ========================================================== */

#layoutSidenav {
    min-height: 100vh;
}

#layoutSidenav_nav {
    width: 279px; /* antes 310px */
}

#layoutSidenav_content {
    min-height: 100vh;
    margin-left: 279px; /* antes 310px */
    transition: margin-left .25s ease;
}

/* ==========================================================
   ÁREA DECORATIVA
   ========================================================== */

.sidebar-decoration {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

    .sidebar-decoration::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 110px; /* antes 122px */
        height: 63px; /* antes 70px */
        background: url("/images/sidebar-deco-top.png") no-repeat top right;
        background-size: contain;
    }

    .sidebar-decoration::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 245px; /* antes 272px */
        height: 116px; /* antes 129px */
        background: url("/images/sidebar-deco-bottom.png") no-repeat bottom left;
        background-size: contain;
    }

.sidebar-content {
    position: relative;
    z-index: 2;
}
 