/* =========================================
   1. ESTILOS TABLA ENTREGAS
   ========================================= */
.card-entregas { border: none; border-top: 4px solid #71639e; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.table-entregas thead th { background-color: #f8f9fa; color: #000; font-weight: 700; border-bottom: 2px solid #e9ecef; text-transform: uppercase; font-size: 0.8rem; padding: 12px; }
.table-entregas tbody td { vertical-align: middle; font-size: 0.9rem; padding: 12px; }
.table-entregas tbody tr:hover { background-color: #f6f4fa !important; cursor: pointer; transition: background-color 0.2s ease; }

/* Badges */
/* Estado: Para Entregar (Verde) */
.badge-success-entregas { 
    background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724 !important; 
    font-weight: 800; padding: 5px 10px; border-radius: 15px; 
}

/* Estado: Stock Parcial (Amarillo) */
.badge-warning-entregas { 
    background-color: #fff3cd; border: 1px solid #ffeeba; color: #856404 !important; 
    font-weight: 800; padding: 5px 10px; border-radius: 15px; 
}

/* Estado: Sin Stock (Rojo) */
.badge-danger-entregas { 
    background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24 !important; 
    font-weight: 800; padding: 5px 10px; border-radius: 15px; 
}

/* =========================================
   2. MODAL - ESTRUCTURA BASE
   ========================================= */
.modal-overlay-entregas {
    display: none; 
    position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}

/* CAJA FLOTANTE (Estado Normal) */
.modal-box-entregas {
    background-color: #f4f7f6; 
    border-radius: 12px; 
    width: 90%; 
    max-width: 1000px; 
    height: 85vh; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
    overflow: hidden; 
    position: relative;
    display: flex; flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 🔥🔥🔥 ESTADO MAXIMIZADO (REFORZADO) 🔥🔥🔥 
   Usamos el ID #modalPreview para tener máxima prioridad.
*/
#modalPreviewEntrega.is-fullscreen .modal-box-entregas {
    width: 100% !important;   /* Ocupa todo el ancho del overlay */
    height: 100% !important;  /* Ocupa toda el alto del overlay */
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Scroll interno */
.body-scroll-entregas {
    flex-grow: 1; overflow-y: auto; 
    border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 20px;
    background: #fff;
}
/* Quitar bordes en pantalla completa */
#modalPreviewEntrega.is-fullscreen .body-scroll-entregas {
    border: none; border-radius: 0;
}

/* =========================================
   3. CABECERA
   ========================================= */
.header-entregas {
    background-color: #71639e; color: #fff; 
    height: 70px; 
    display: flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0;
}
.header-entregas-content { text-align: center; }
.header-entregas-title { font-weight: 800; font-size: 18px; text-transform: uppercase; margin: 0; }

.header-entregas-actions {
    position: absolute; right: 20px; top: 0; height: 100%;
    display: flex; align-items: center; gap: 15px;
}
.icon-action-entregas {
    color: rgba(255,255,255,0.85); font-size: 20px; cursor: pointer; padding: 5px; transition: 0.2s;
}
.icon-action-entregas:hover { color: #fff; transform: scale(1.15); }

.footer-entregas { margin-top: 10px; display: flex; gap: 10px; padding-top: 15px; flex-shrink: 0; }

@media (max-width: 768px) {
    .col-hide-mobile { display: none; }
    .modal-box-entregas { width: 100% !important; height: 100% !important; border-radius: 0; }
}

/* =========================================
   ESTILOS PARA CAPTURA DE PANTALLA
   ========================================= */

/* Asegurar que el contenedor principal tenga ancho completo */
#contenedorTableroEntregas {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    background-color: #f9f9f9 !important;
    min-height: 200px;
}

/* Título de sección para reportes */
.titulo-seccion-entregas {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    color: #71639e !important;
    font-weight: 700 !important;
}

/* Asegurar que la tabla sea completamente visible en capturas */
.table-entregas {
    width: 100% !important;
    table-layout: auto !important;
}

.table-entregas td,
.table-entregas th {
    overflow: visible;
}

/* Controles de botones (unificado con el estilo de inventario) */
.controles-wrapper-odoo { 
    max-width: 1200px; 
    margin: 10px auto; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    padding: 0 20px; 
    align-items: center; 
    justify-content: flex-end;
}

.botones-acciones-odoo { 
    display: flex; 
    gap: 10px; 
}

.btn-odoo-base { 
    background-color: #71639e !important; 
    color: white !important; 
    border: none !important; 
    width: 48px; 
    height: 48px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: all 0.2s; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
}

.btn-odoo-base:hover { 
    background-color: #5a4d7e !important; 
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.btn-odoo-base:active {
    transform: translateY(0);
}

/* Ocultar elementos no deseados en capturas */
@media print {
    .btn-odoo-base,
    .icon-action-entregas,
    button,
    .controles-wrapper-odoo {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .controles-wrapper-odoo {
        justify-content: center;
    }
    
    .btn-odoo-base {
        width: 44px;
        height: 44px;
    }
}

