/* ======================================================= 
   CSS RESPONSIVO FINAL - LABORATORIOS CBI
   ======================================================= */

@media (max-width: 992px) {
    
    /* --- 1. RECUPERACIÓN DEL MENÚ LATERAL (CRÍTICO) --- */
    #sidebarAdmin.admin-sidebar {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: translateX(-102%) !important; 
        width: 280px !important;
        height: 100vh !important;
        background-color: #ffffff !important;
        z-index: 999999 !important; 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 10px 0 25px rgba(0,0,0,0.3) !important;
        visibility: visible !important;
    }

    /* Regla para que el menú entre a la pantalla */
    #sidebarAdmin.admin-sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        position: relative !important;
        z-index: 10 !important;
    }

    /* --- 2. SELECTOR DE SEMANAS (IGUAL A LABORATORIOS) --- */
    .d-flex.align-items-center.mb-4.bg-white.p-3 {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 15px !important;
        border-radius: 12px !important;
        gap: 12px !important;
    }

    .text-uam.small.text-uppercase.me-3 {
        margin-bottom: 5px !important;
        font-size: 0.85rem !important;
        border-bottom: 2px solid #43a047;
        padding-bottom: 2px;
        width: 100%;
    }

    .week-selector {
        justify-content: flex-start !important;
        width: 100% !important;
        padding: 5px 0 !important;
        gap: 6px !important;
    }

    .week-selector .nav-link {
        min-width: 42px !important;
        height: 42px !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        background: #f8fafc !important;
        color: #64748b !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* SEMANA ACTIVA: Igual que los laboratorios */
    .week-selector .nav-link.active {
        background-color: #43a047 !important;
        color: #ffffff !important;
        border-color: #43a047 !important;
        box-shadow: 0 4px 12px rgba(67, 160, 71, 0.2) !important;
    }

    /* --- 3. TU TABLA (SIN CAMBIOS) --- */
    .schedule-container {
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
        margin-top: 15px !important;
        overflow-x: auto !important;
    }

    .table-schedule {
        min-width: 1000px !important;
        table-layout: fixed !important;
    }

    .table-schedule thead th {
        background-color: #43a047 !important;
        color: white !important;
        padding: 15px 10px !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        text-align: center !important;
        border: none !important;
    }

    .table-schedule thead th:first-child,
    .table-schedule tbody td:first-child {
        position: sticky !important;
        left: 0 !important;
        z-index: 100 !important;
        background-color: #f1f5f9 !important;
        width: 85px !important;
        min-width: 85px !important;
        border-right: 2px solid #cbd5e1 !important;
        font-weight: bold !important;
        font-size: 0.75rem !important;
    }

    /* --- 4. TUS LABORATORIOS (SIN CAMBIOS) --- */
    .nav-tabs-uam {
        border: none !important;
        gap: 10px !important;
        padding: 5px !important;
    }

    .nav-tabs-uam .nav-link {
        border-radius: 10px !important;
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        color: #64748b !important;
        padding: 10px 20px !important;
        font-weight: 600 !important;
    }

    .nav-tabs-uam .nav-link.active {
        background: #43a047 !important;
        color: #fff !important;
        border-color: #43a047 !important;
        box-shadow: 0 4px 12px rgba(67, 160, 71, 0.2) !important;
    }





    

    /* Aseguramos que el botón siempre esté por encima de todo */
    #btnToggleSidebar {
        z-index: 1000000 !important;
    }

    /* Ajustamos el margen superior del Panel de Control para que el botón no tape el título */
    .container-limited.pt-3 {
        padding-top: 60px !important; 
    }

    /* Si tienes un título principal (como "Panel de Control"), le damos un poco de espacio */
    h4.fw-bold.m-0 {
        padding-right: 50px !important; /* Espacio para que el botón no se encime al texto */
    }
}