/* ===============================================
   CARGA MASIVA - Estilos para Modales
   =============================================== */

/* Asegurar que el overlay cubra toda la pantalla */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    padding: 20px !important;
}

/* El modal debe estar centrado y con scroll interno si es necesario */
.modal-overlay .modal {
    position: relative !important;
    margin: auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* Prevenir scroll del body cuando el modal está abierto */
body.modal-open {
    overflow: hidden !important;
}

/* Estilos para los steps de carga masiva */
.carga-masiva-step {
    min-height: 300px;
}

/* Estadísticas de carga */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background-color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e5e7eb;
}

.stat-card.success {
    background-color: #d1fae5;
    border-color: #10b981;
}

.stat-card.error {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
}

/* Alertas dentro del modal */
.alert-info {
    padding: 16px;
    border-radius: 8px;
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.alert-success {
    padding: 16px;
    border-radius: 8px;
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
    margin-bottom: 20px;
}

.alert-warning {
    padding: 16px;
    border-radius: 8px;
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
    margin-bottom: 20px;
}

.alert-error {
    padding: 16px;
    border-radius: 8px;
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
    margin-bottom: 20px;
}

/* Tabla de preview de datos */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.preview-table th,
.preview-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.preview-table th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #374151;
}

.preview-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Lista de errores */
.error-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background-color: #fef2f2;
    border-radius: 8px;
    margin-top: 15px;
}

.error-item {
    padding: 8px;
    margin-bottom: 5px;
    background-color: white;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-overlay .modal {
        max-width: 95% !important;
        margin: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
