/* assets/css/style.css */
@font-face {
    font-family: 'Mondapick';
    src: url('../../font/mondapick/Mondapick.ttf') format('truetype');
}

:root {
    --primary-color: #6366f1; /* Indigo moderno */
    --accent-color: #a855f7;  /* Púrpura dinámico */
    --sidebar-bg: #0f172a;    /* Fondo oscuro para el sidebar */
    --content-bg: #f8fafc;    /* Gris muy claro para el contenido */
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--content-bg);
    margin: 0;
    overflow-x: hidden;
}

.brand-font {
    font-family: 'Mondapick', sans-serif !important;
}

/* --- WRAPPER ESTRUCTURA --- */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* --- SIDEBAR --- */
#sidebar-wrapper {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    transition: all 0.3s ease;
    min-height: 100vh;
    z-index: 1000;
}

/* Efecto para ocultar sidebar */
#wrapper.toggled #sidebar-wrapper {
    margin-left: calc(-1 * var(--sidebar-width));
}

#sidebar-wrapper .sidebar-heading {
    padding: 2rem 1.5rem;
    font-size: 1.8rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    text-decoration: none;
}

#sidebar-wrapper .list-group-item i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
    opacity: 0.7;
}

#sidebar-wrapper .list-group-item:hover, 
#sidebar-wrapper .list-group-item.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left: 4px solid var(--primary-color);
}

#sidebar-wrapper .list-group-item.active i {
    color: var(--primary-color);
    opacity: 1;
}

/* --- CONTENIDO PRINCIPAL --- */
#page-content-wrapper {
    width: 100%;
    min-width: 0; /* Importante para que no rompa el flex */
}

.navbar {
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

/* Botón Hamburguesa */
#menu-toggle {
    border: none;
    background: transparent;
    color: var(--sidebar-bg);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

#menu-toggle:hover {
    background: #f1f5f9;
}

/* --- CARDS Y UI --- */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: var(--sidebar-bg);
}

.stat-card {
    border-left: 5px solid var(--primary-color);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        /* Asegurar que cubra toda la altura y esté arriba de todo */
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 2000;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }
    
    #page-content-wrapper {
        width: 100vw;
        min-width: 100vw;
    }

    /* Oscurecer el contenido cuando el menú está abierto */
    #wrapper.toggled #page-content-wrapper {
        filter: blur(2px) grayscale(0.5);
        opacity: 0.4;
        pointer-events: none; /* No deja tocar el fondo mientras el menú está abierto */
    }
}
