:root {
    --color-barra-lateral: rgb(255, 255, 255);
    --color-barra-gradient: linear-gradient(
        0deg,
        rgb(242, 183, 5) 0%,
        rgb(255, 255, 255) 25%
    );

    --color-texto: rgb(0, 0, 0);
    --color-texto-menu: rgb(134, 136, 144);

    --color-menu-hover: rgb(238, 238, 238);
    --color-menu-hover-texto: rgb(0, 0, 0);

    --color-boton: rgb(242, 183, 5);
    --color-boton-texto: rgb(255, 255, 255);
    --color-boton-hover: rgba(0, 0, 0, 0.747);

    --color-linea: rgb(180, 180, 180);

    --color-switch-base: rgb(201, 202, 206);
    --color-switch-circulo: rgb(241, 241, 241);

    --color-scroll: rgb(192, 192, 192);
    --color-scroll-hover: rgb(134, 134, 134);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*-----------------Menu*/
.menu {
    position: fixed;
    width: 50px;
    height: 50px;
    font-size: 30px;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    background-color: var(--color-boton);
    color: var(--color-boton-texto);
    right: 15px;
    top: 15px;
    z-index: 100;
}

/*----------------Barra Lateral*/
.barra-lateral {
    position: fixed;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    justify-content: space-between;
    width: 250px;
    height: 100%;
    overflow-x: hidden;
    padding: 20px 15px;
    background: var(--color-barra-gradient);
    transition: width 0.5s ease, background-color 0.3s ease, left 0.5s ease;
    z-index: 50;
    box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.20) !important; 
}

.mini-barra-lateral {
    width: 80px;
}

.barra-lateral span {
    width: 100%;
    white-space: normal;
    font-size: 18px;
    text-align: left;
    opacity: 1;
    margin-left: 1rem;
    transition: opacity 0.5s ease, width 0.5s ease;
    color: rgb(50,50,50);
}

.barra-lateral i {
    color: var(--base-secondary);
}

.barra-lateral span.oculto {
    color: var(--base-terciary);
    opacity: 0;
    width: 0;
    white-space: wrap;
}

/*------------> Nombre de la página */
.barra-lateral .nombre-pagina {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barra-lateral .nombre-pagina img {
    min-width: 50px;
    cursor: pointer;
}

/*------------> Botón*/
.barra-lateral .boton {
    width: 100%;
    height: 45px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: left;
    border: none;
    border-radius: 10px;
    background-color: transparent;
    color: var(--color-boton);
}

/* Estilo cuando el cursor está sobre el botón */
.barra-lateral .boton:hover {
    background-color: rgb(220,220,220);
    color: var(--color-boton-texto);
}

.barra-lateral .boton i {
    min-width: 50px;
    font-size: 20px;
    color: var;
}

/*--------------> Menu Navegación*/
.barra-lateral .navegacion {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.barra-lateral .navegacion::-webkit-scrollbar {
    width: 5px;
}

.barra-lateral .navegacion::-webkit-scrollbar-thumb {
    background-color: var(--color-scroll);
    border-radius: 5px;
}

.barra-lateral .navegacion::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-scroll-hover);
}

.barra-lateral .navegacion a {
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
    color: var(--color-texto-menu);
}

.barra-lateral .navegacion a:hover {
    background-color: var(--color-menu-hover);
    color: var(--color-menu-hover-texto);
}

/*-----------------> Linea*/
.barra-lateral .linea {
    width: 100%;
    height: 1px;
    margin-top: 15px;
    background-color: var(--color-linea);
}

/*---------------> Usuario*/
.barra-lateral .usuario {
    width: 100%;
    display: flex;
}

.barra-lateral .usuario .nombre-email {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-left: 5px;
}

/*-------------main*/

main {
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.5s ease;
}

main.min-main {
    margin-left: 80px;
}

/* Sidebar abierto al 100% en móviles */
.barra-lateral.full-screen {
    width: 100%;
    left: 0;
}

main.hidden {
    display: none;
}

@media (max-width: 600px) {
    .barra-lateral {
        position: fixed;
        left: -250px;
        transition: left 0.3s ease;
    }

    .max-barra-lateral {
        left: 0;
    }

    .menu {
        display: flex;
        background-color: var(--color-barra-lateral);
    }

    .menu i:nth-child(2) {
        display: none;
    }

    main {
        margin-left: 0;
    }

    main.min-main {
        margin-top: 4rem;
        margin-left: 0;
    }

    /* Cambia el ícono de cierre cuando el menú está abierto */
    .menu.open .fa-bars {
        display: none;
    }

    .menu.open .fa-xmark {
        display: block;
    }

    .menu .fa-xmark {
        display: none;
    }
}
