@import url("variables.css");
@import url("components.css");

/* ==========================================================
   RESET
========================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:var(--font-family);

    background:var(--background);

    color:var(--text-primary);

    min-height:100vh;

    overflow:hidden;

    -webkit-font-smoothing:antialiased;

}

/* ==========================================================
   SCROLLBAR
========================================================== */

::-webkit-scrollbar{
    width:10px;
    height:10px;
}

::-webkit-scrollbar-track{
    background:var(--gray-100);
}

::-webkit-scrollbar-thumb{
    background:var(--gray-400);
    border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
    background:var(--primary);
}

/* ==========================================================
   LAYOUT
========================================================== */

.layout{

    display:flex;

    height:100vh;

    overflow:hidden;

}

/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar{

    width:270px;

    background:linear-gradient(
        180deg,
        var(--primary-dark),
        var(--primary)
    );

    color:white;

    display:flex;

    flex-direction:column;

    box-shadow:var(--shadow-lg);

    z-index:100;

}

.logo{

    height:80px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:24px;

    font-weight:700;

    letter-spacing:1px;

    border-bottom:1px solid rgba(255,255,255,.08);

}

.logo .logo-mayran-oficial {
    width:94px;
    height:58px;
    object-fit:contain;
    margin-right:10px;
    border-radius:8px;
}

.menu{

    flex:1;

    padding:18px 12px;

    overflow-y:auto;

}

.menu a{

    display:flex;

    align-items:center;

    gap:14px;

    padding:14px 16px;

    margin-bottom:6px;

    color:white;

    text-decoration:none;

    border-radius:12px;

    transition:all .25s ease;

    font-size:14px;

    font-weight:500;

}

.menu a i{

    width:22px;

    text-align:center;

    font-size:16px;

}

.menu a:hover{

    background:rgba(255,255,255,.12);

    transform:translateX(5px);

}

.menu a.active{

    background:white;

    color:var(--primary);

    font-weight:700;

    box-shadow:var(--shadow-sm);

}

/* ==========================================================
   CONTENT
========================================================== */

.content{

    flex:1;

    display:flex;

    flex-direction:column;

    overflow:hidden;

}

/* ==========================================================
   TOPBAR
========================================================== */

.topbar{

    height:72px;

    background:var(--surface);

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 30px;

    border-bottom:1px solid var(--border-color);

    box-shadow:var(--shadow-xs);

}

.topbar h1{

    font-size:22px;

    font-weight:700;

}

/* ==========================================================
   USUARIO
========================================================== */

.usuario-menu{

    display:flex;

    align-items:center;

    gap:18px;

}

#nombreUsuario{

    font-size:15px;

    font-weight:600;

    color:var(--text-primary);

}

/* ==========================================================
   BOTÓN CERRAR SESIÓN
========================================================== */

#btnCerrarSesion{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    min-width:150px;

    height:44px;

    padding:0 20px;

    border:none;

    border-radius:14px;

    background:#dc2626;

    color:#fff;

    font-size:14px;

    font-weight:600;

    letter-spacing:.3px;

    cursor:pointer;

    transition:all .25s ease;

    box-shadow:0 6px 18px rgba(220,38,38,.25);

}

#btnCerrarSesion:hover{

    background:#b91c1c;

    transform:translateY(-2px);

    box-shadow:0 12px 24px rgba(220,38,38,.35);

}

#btnCerrarSesion:active{

    transform:translateY(1px);

    box-shadow:0 4px 10px rgba(220,38,38,.30);

}

#btnCerrarSesion:focus{

    outline:none;

}

/* ==========================================================
   MAIN
========================================================== */

.main{

    flex:1;

    overflow:auto;

    padding:30px;

}
/* ==========================================================
   TARJETAS
========================================================== */

.grid-cards{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));

    gap:20px;

}

.card{

    background:white;

    border-radius:18px;

    padding:24px;

    border:1px solid var(--border-color);

    box-shadow:var(--shadow-sm);

    transition:.25s;

}

.card:hover{

    transform:translateY(-4px);

    box-shadow:var(--shadow-md);

}

.card h3{

    margin-bottom:8px;

    font-size:18px;

}

.card p{

    color:var(--text-secondary);

    line-height:1.6;

}

/* ==========================================================
   ANIMACIONES
========================================================== */

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(10px);

    }

    to{

        opacity:1;

        transform:none;

    }

}

.fade{

    animation:fadeIn .3s ease;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:992px){

    .sidebar{

        width:220px;

    }

}

@media(max-width:768px){

    body{

        overflow:auto;

    }

    .layout{

        flex-direction:column;

        height:auto;

    }

    .sidebar{

        width:100%;

        height:auto;

    }

    .content{

        width:100%;

    }

    .topbar{

        padding:16px;

        height:auto;

        flex-direction:column;

        align-items:flex-start;

        gap:15px;

    }

    .main{

        padding:18px;

    }

    .usuario-menu{

        width:100%;

        justify-content:space-between;

    }

}
