/* Contenedor General Proveedores */
.wcfm-supplier-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
}

.wcfm-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wcfm_submit_button, .wcfm_mini_button {
    background-color: #003366; /* Azul Marino Profesional */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.wcfm_submit_button:hover { background-color: #5a6268; }

.wcfm_icon_button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin: 0 5px;
    color: #555;
}

/* Tabla del Dashboard */
.wcfm_table_simple_responsive {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wcfm_table_simple_responsive th { background-color: #f8f9fa; text-align: left; padding: 12px; }
.wcfm_table_simple_responsive td { padding: 12px; border-bottom: 1px solid #eee; }

/* Etiquetas de estado */
.supplier-deuda-tag {
    display: inline-block;
    background-color: #dc3545; color: white;
    font-size: 0.85em; padding: 2px 6px;
    border-radius: 4px; margin-left: 8px; font-weight: bold;
}
.supplier-pagado-tag {
    display: inline-block;
    background-color: #28a745; color: white;
    font-size: 0.8em; padding: 2px 5px;
    border-radius: 4px; margin-left: 5px;
}

/* --- POPUP Y FORMULARIO --- */
.wcfm-supplier-popup-container {
    display: none; position: fixed; z-index: 999999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center; align-items: center; 
    padding: 20px; box-sizing: border-box; overflow-y: auto; 
}

.wcfm-supplier-popup-content {
    background-color: #fff; margin: 0 auto; padding: 25px;
    width: 100%; 
    max-width: 600px; 
    position: relative;
    border-radius: 8px; max-height: 90vh; overflow-y: auto; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.wcfm-supplier-popup-close {
    position: absolute; right: 20px; top: 10px; font-size: 28px; cursor: pointer;
}
.wcfm_input {
    width: 100%; padding: 8px; margin-bottom: 10px;
    border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;
}

/* --- ESTILOS DE FILAS --- */
.producto-row {
    display: flex; gap: 10px; align-items: center;
    margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #ddd;
}
.producto-nombre { flex: 3; margin-bottom: 0 !important; }
.producto-cantidad { flex: 1; margin-bottom: 0 !important; }
.producto-precio { flex: 2; margin-bottom: 0 !important; }

/* --- ESTILOS DE PAGOS --- */
.pago-row {
    display: flex;
    flex-direction: column; 
    gap: 8px;
    background-color: #fffdf5; /* Amarillo suave para diferenciar */
    border: 1px solid #f1e6c3;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.pago-bloque-fecha {
    display: flex; width: 100%; gap: 10px; padding-right: 25px; 
}
.pago-bloque-montos {
    display: flex; width: 100%; gap: 10px; align-items: center;
}
.pago-bloque-fecha .wcfm_input,
.pago-bloque-montos .wcfm_input {
    margin-bottom: 0; flex: 1; 
}

.input-wrapper { position: relative; flex: 1; }
.input-symbol { position: absolute; left: 8px; top: 8px; color: #555; font-size: 14px; }
.input-wrapper input { padding-left: 20px; color: #d9534f; font-weight: bold; } /* Rojo para salida de dinero */

.remove-row-btn {
    position: absolute; top: 10px; right: 10px; border: none; background: transparent;
    color: #d9534f; font-size: 18px; cursor: pointer; padding: 0;
}
.remove-row-btn:hover { color: #c9302c; }

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 768px) {
    .wcfm-supplier-popup-container { align-items: flex-start; padding-top: 40px; }
    
    .wcfm_table_simple_responsive thead { display: none; }
    .wcfm_table_simple_responsive tr { display: block; margin-bottom: 15px; border: 1px solid #ddd; }
    .wcfm_table_simple_responsive td { display: block; text-align: right; border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; }
    .wcfm_table_simple_responsive td::before { content: attr(data-label); position: absolute; left: 10px; font-weight: bold; }

    .producto-row { flex-direction: column; align-items: stretch; gap: 5px; background: #fdfdfd; padding: 10px; border: 1px solid #eee; border-radius: 5px; }
    .producto-nombre, .producto-cantidad, .producto-precio { width: 100%; }
    .pago-bloque-fecha { flex-direction: row; }
    .pago-bloque-montos { flex-wrap: wrap; }
    .input-wrapper { flex: 1 1 100%; margin-bottom: 5px; }
}