/* ===============================
   BASE
=============================== */

body {
    background: #f5f7fb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

/* ===============================
   LAYOUT GENERAL
=============================== */

.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===============================
   SIDEBAR
=============================== */

.sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    min-height: 100vh;

    background-color: #212529;
    color: #ffffff;

    flex-shrink: 0; /* NO se encoge nunca */
}

/* ===============================
   CONTENIDO
=============================== */

.main-content {
    flex: 1;
    overflow-x: hidden;
}

/* ===============================
   MENÚ
=============================== */

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li a {
    display: block;
    padding: 12px 18px;
    color: #cfd3da;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.menu li a.active {
    background: #0d6efd;
    color: #ffffff;
    font-weight: 500;
    border-radius: 6px;
}

/* ===============================
   TARJETAS
=============================== */

.card {
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    border: none;
}

/* ===============================
   BOOTSTRAP FIX
=============================== */

.container,
.container-fluid {
    max-width: 100%;
}

/* ===============================
   RESPONSIVE SIDEBAR
=============================== */

@media (max-width: 768px) {

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }
}


/* ===============================
   RESPONSIVE GLOBAL
=============================== */

@media (max-width: 768px) {

    /* Sidebar off-canvas */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    /* Contenido ocupa todo */
    .main-content {
        width: 100%;
    }

    /* Quita padding excesivo */
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Tablas scrolleables */
    .table-responsive {
        overflow-x: auto;
    }
}


@media (max-width: 768px) {

    /* Sidebar off-canvas */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.25s ease;
    }

    .sidebar.show {
        left: 0;
    }

    /* Contenido a ancho completo */
    .main-content {
        width: 100%;
    }

    /* Mejor padding en móvil */
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
}


