/* =====================================================
   SISTEMA DE RENDICIONES DE GASTOS - CSS v4.1 UNIFICADO
   Mobile-first + Modal + Distribución + Saldo + Adjuntos
   Actualizado: Diciembre 2024
   ===================================================== */

:root {
    --primary-color: #2c3e50;
    --primary-light: #34495e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.2s ease;
}

/* =====================================================
   RESET Y BASE
   ===================================================== */

.rendiciones-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--gray-100);
    min-height: 100vh;
    padding-bottom: 80px;
}

.rendiciones-app * {
    box-sizing: border-box;
}

/* =====================================================
   HEADER
   ===================================================== */

.rendiciones-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.rendiciones-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rendiciones-header .subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 4px;
}

/* =====================================================
   TARJETAS DE RESUMEN
   ===================================================== */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    margin-top: -20px;
}

@media (min-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
        max-width: 900px;
        margin: -20px auto 0;
    }
}

.summary-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-card.active {
    border-color: var(--primary-color);
}

.summary-card .icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--gray-600);
}

.summary-card .icon i {
    font-size: 1.5rem;
}

.summary-card .count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.summary-card .label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .amount {
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-top: 4px;
}

.summary-card.draft .count { color: var(--gray-600); }
.summary-card.draft .icon { color: var(--gray-500); }
.summary-card.pending .count { color: var(--warning-color); }
.summary-card.pending .icon { color: var(--warning-color); }
.summary-card.approved .count { color: var(--success-color); }
.summary-card.approved .icon { color: var(--success-color); }
.summary-card.paid .count { color: var(--info-color); }
.summary-card.paid .icon { color: var(--info-color); }

/* =====================================================
   CONTENEDOR PRINCIPAL
   ===================================================== */

.rendiciones-container {
    padding: 16px;
    max-width: 900px;
    margin: 0 auto;
}

/* =====================================================
   FILTROS Y BÚSQUEDA
   ===================================================== */

.filters-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-row select {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

/* =====================================================
   LISTA DE RENDICIONES
   ===================================================== */

.rendiciones-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rendicion-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border-left: 4px solid var(--gray-400);
}

.rendicion-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.rendicion-card.draft { border-left-color: var(--gray-500); }
.rendicion-card.submitted { border-left-color: var(--warning-color); }
.rendicion-card.approved { border-left-color: var(--success-color); }
.rendicion-card.done { border-left-color: var(--info-color); }
.rendicion-card.refused { border-left-color: var(--danger-color); }

.rendicion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.rendicion-tipo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--gray-700);
}

.rendicion-tipo.factura {
    background: #e8f4fd;
    color: #1a5276;
}

.rendicion-tipo.boleta {
    background: #fef9e7;
    color: #7d6608;
}

.rendicion-estado {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.rendicion-estado.draft {
    background: var(--gray-200);
    color: var(--gray-700);
}

.rendicion-estado.submitted {
    background: #fff3cd;
    color: #856404;
}

.rendicion-estado.approved {
    background: #d4edda;
    color: #155724;
}

.rendicion-estado.done {
    background: #cce5ff;
    color: #004085;
}

.rendicion-estado.refused {
    background: #f8d7da;
    color: #721c24;
}

.rendicion-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.rendicion-proveedor {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.rendicion-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.rendicion-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rendicion-monto {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

.rendicion-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.rendicion-imputacion {
    font-size: 0.8rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rendicion-imputacion .badge {
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.rendicion-acciones {
    display: flex;
    gap: 8px;
}

.rendicion-acciones .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* =====================================================
   BOTÓN FLOTANTE (FAB)
   ===================================================== */

.fab-button,
#fabNuevo {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: var(--transition);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fab-button:hover,
#fabNuevo:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

.fab-button:active,
#fabNuevo:active {
    transform: scale(0.95);
}

/* =====================================================
   MODAL
   ===================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

@media (min-width: 768px) {
    .modal-overlay.active {
        align-items: center;
    }
}

.modal-content,
.modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    max-height: 95vh;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .modal-content,
    .modal-container {
        border-radius: var(--border-radius);
        max-height: 90vh;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(95vh - 140px);
    background: #ffffff;
}

@media (min-width: 768px) {
    .modal-body {
        max-height: calc(90vh - 140px);
    }
}

.modal-footer {
    padding: 16px 20px;
    background: var(--gray-100);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--gray-300);
}

/* =====================================================
   FORMULARIO - SECCIONES Y CAMPOS
   ===================================================== */

.form-section {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.section-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group.half {
    margin-bottom: 0;
}

/* =====================================================
   TOGGLE GROUPS - TIPO DOCUMENTO E IMPUTACIÓN
   ===================================================== */

.toggle-group {
    display: flex;
    gap: 10px;
}

.tipo-option,
.imputacion-option {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-700);
}

.tipo-option:hover,
.imputacion-option:hover {
    border-color: var(--primary-color);
}

.tipo-option.active,
.imputacion-option.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* =====================================================
   CHECKBOX LABEL
   ===================================================== */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-size: 0.9rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =====================================================
   RADIO OPTIONS - FORMA DE PAGO
   ===================================================== */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.radio-option:hover {
    border-color: var(--primary-color);
}

.radio-option.active {
    border-color: var(--primary-color);
    background: rgba(44, 62, 80, 0.05);
}

.radio-option i {
    font-size: 1.2rem;
    color: var(--gray-500);
}

.radio-option.active i {
    color: var(--primary-color);
}

.radio-option span {
    font-weight: 500;
    color: var(--gray-700);
}

/* =====================================================
   UPLOAD ZONE
   ===================================================== */

.upload-zone {
    border: 2px dashed var(--gray-400);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(44, 62, 80, 0.02);
}

.upload-zone.has-file {
    border-color: var(--success-color);
    border-style: solid;
    background: rgba(39, 174, 96, 0.05);
}

.upload-zone .icon {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 10px;
}

.upload-zone.has-file .icon {
    color: var(--success-color);
}

.upload-zone .text {
    font-weight: 500;
    color: var(--gray-700);
    display: block;
}

.upload-zone .subtext {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
    display: block;
}

/* =====================================================
   UPLOAD PREVIEW - MEJORADO v4.1
   ===================================================== */

.upload-preview {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 8px;
    border: 1px solid var(--gray-300);
}

.upload-preview.show {
    display: block;
}

.upload-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.upload-preview img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-info span {
    flex: 1;
    font-size: 0.85rem;
    color: var(--gray-600);
    word-break: break-all;
}

/* Botón Ver archivo */
.btn-view-file {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-weight: 500;
}

.btn-view-file:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-view-file i {
    font-size: 0.9rem;
}

.btn-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-remove:hover {
    background: #c0392b;
}

/* =====================================================
   SALDO INFO - MODO SIMPLE (MEJORADO v4.1)
   ===================================================== */

.saldo-info {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 12px;
    border-left: 4px solid var(--info-color);
}

.saldo-info .saldo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.saldo-info .saldo-row:not(:last-child) {
    border-bottom: 1px dashed var(--gray-300);
    padding-bottom: 10px;
    margin-bottom: 6px;
}

.saldo-info .label {
    font-size: 0.85rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.saldo-info .label i {
    color: var(--info-color);
}

.saldo-info .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color);
}

.saldo-info .value.success {
    color: var(--success-color);
}

.saldo-info .value.warning {
    color: var(--warning-color);
}

.saldo-info .value.low {
    color: var(--warning-color);
}

.saldo-info .value.danger {
    color: var(--danger-color);
}

/* Alerta de saldo */
.saldo-alerta {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.saldo-alerta i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.saldo-alerta.danger {
    background: linear-gradient(135deg, #fdeaea, #f8d7da);
    color: #721c24;
    border: 1px solid var(--danger-color);
}

.saldo-alerta.warning {
    background: linear-gradient(135deg, #fff8e6, #fff3cd);
    color: #856404;
    border: 1px solid var(--warning-color);
}

.saldo-alerta strong {
    font-weight: 700;
}

/* =====================================================
   IVA SUMMARY
   ===================================================== */

.iva-summary {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.iva-summary .row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.iva-summary .row.total {
    border-top: 2px solid var(--gray-300);
    margin-top: 8px;
    padding-top: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.iva-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.iva-badge.recuperable {
    background: #d4edda;
    color: #155724;
}

.iva-badge.no-recuperable {
    background: #f8d7da;
    color: #721c24;
}

/* =====================================================
   BOTONES
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =====================================================
   LOADING
   ===================================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   EMPTY STATE
   ===================================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state .icon {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* =====================================================
   INFO BOX
   ===================================================== */

.info-box {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
}

.info-box.success {
    background: #d4edda;
    border-color: #c3e6cb;
}

.info-box.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.info-box .content {
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .toggle-group {
        flex-direction: column;
    }
}

/* =====================================================
   DISTRIBUCIÓN DE GASTOS - MODO AVANZADO
   ===================================================== */

#seccionModoAvanzado {
    width: 100%;
}

/* Header de distribución */
.distribucion-header {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-300);
}

.distribucion-header > span {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

#btnAgregarLinea {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#btnAgregarLinea:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-style: solid;
}

/* Contenedor de filas */
.distribucion-tabla {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

/* Cada fila/tarjeta */
.distribucion-row {
    width: 100%;
    background: #ffffff;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    margin-top: 8px;
}

.distribucion-row:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Badge "Línea X" */
.distribucion-row::before {
    content: attr(data-linea);
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 10px;
}

/* Grid de 3 campos */
.distribucion-row-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

/* Cada campo */
.dist-field {
    width: 100%;
}

.dist-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.dist-field-label i {
    margin-right: 5px;
}

.dist-field select {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 12px;
    font-size: 14px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background-color: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
}

.dist-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
}

/* Footer de la fila */
.distribucion-row-footer {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 15px;
    border-top: 2px dashed var(--gray-200);
}

/* Grupo Porcentaje */
.dist-porcentaje-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.dist-porcentaje-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

.dist-porcentaje-group input {
    width: 65px;
    height: 38px;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: #ffffff;
    color: var(--primary-color);
}

.dist-porcentaje-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.dist-porcentaje-group > span {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-700);
}

/* Grupo Monto */
.dist-monto-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #b8dfc8;
    flex-grow: 1;
    min-width: 130px;
}

.dist-monto-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--success-color);
    white-space: nowrap;
}

.dist-monto-valor {
    font-size: 18px;
    font-weight: 700;
    color: #155724;
}

/* Botón Eliminar */
.btn-remove-dist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 8px;
    color: var(--danger-color);
    cursor: pointer;
    flex-shrink: 0;
}

.btn-remove-dist:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

.btn-remove-dist i {
    font-size: 16px;
}

/* Resumen de distribución */
.distribucion-resumen {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 10px;
}

.distribucion-resumen-total {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.distribucion-resumen-total label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

#distribucionTotal {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    background: #ffffff;
    padding: 6px 16px;
    border-radius: 8px;
    border: 2px solid var(--gray-300);
}

/* Estado válido */
.distribucion-resumen.valid {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: var(--success-color);
}

.distribucion-resumen.valid #distribucionTotal {
    color: var(--success-color);
    border-color: var(--success-color);
}

/* Estado inválido */
.distribucion-resumen.invalid {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: var(--danger-color);
}

.distribucion-resumen.invalid #distribucionTotal {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

#distribucionError {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    color: var(--danger-color);
    font-size: 13px;
    font-weight: 600;
}

/* Responsive para distribución */
@media screen and (min-width: 576px) {
    .distribucion-row-grid {
        flex-direction: row;
        gap: 12px;
    }
    
    .dist-field {
        flex: 1;
        min-width: 0;
    }
    
    /* El campo tipo es más pequeño */
    .dist-field:nth-child(2) {
        flex: 0 0 130px;
    }
}

/* =====================================================
   SALDO INFO EN DISTRIBUCIÓN - v4.1
   ===================================================== */

.dist-saldo-info {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-left: 3px solid var(--info-color);
}

.dist-saldo-content {
    font-size: 0.85rem;
}

.dist-saldo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.dist-saldo-row:not(:last-child) {
    border-bottom: 1px dashed var(--gray-300);
    padding-bottom: 8px;
    margin-bottom: 6px;
}

.dist-saldo-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dist-saldo-label i {
    color: var(--info-color);
}

.dist-saldo-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success-color);
}

.dist-saldo-value.danger {
    color: var(--danger-color);
}

.dist-saldo-value.warning {
    color: var(--warning-color);
}

/* Alerta de saldo en distribución */
.dist-saldo-alerta {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dist-saldo-alerta i {
    font-size: 1rem;
    flex-shrink: 0;
}

.dist-saldo-alerta.danger {
    background: linear-gradient(135deg, #fdeaea, #f8d7da);
    color: #721c24;
    border: 1px solid var(--danger-color);
}

.dist-saldo-alerta.warning {
    background: linear-gradient(135deg, #fff8e6, #fff3cd);
    color: #856404;
    border: 1px solid var(--warning-color);
}

/* =====================================================
   SUB-OPCIONES (TIPO INFORMATIVO)
   ===================================================== */

.sub-options {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 12px 16px;
    margin-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.sub-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.radio-group-sm {
    gap: 8px;
}

.radio-option-sm {
    padding: 10px 14px;
    font-size: 0.85rem;
}

.radio-option-sm i {
    font-size: 1rem;
}

/* =====================================================
   MODAL DE LECTURA (DETALLE)
   ===================================================== */

#modalLectura .modal-body {
    padding: 0;
}

.lectura-estado {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lectura-estado.draft {
    background: var(--gray-200);
    color: var(--gray-700);
}

.lectura-estado.submitted {
    background: #fff3cd;
    color: #856404;
}

.lectura-estado.approved {
    background: #d4edda;
    color: #155724;
}

.lectura-estado.done {
    background: #cce5ff;
    color: #004085;
}

.lectura-estado.refused {
    background: #f8d7da;
    color: #721c24;
}

.lectura-seccion {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.lectura-seccion:last-child {
    border-bottom: none;
}

.lectura-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.lectura-monto {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.lectura-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.lectura-valor {
    font-size: 0.95rem;
    color: var(--gray-800);
}

.lectura-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--gray-200);
}

.lectura-grid .lectura-seccion {
    border-bottom: none;
}

.lectura-grid .lectura-seccion:first-child {
    border-right: 1px solid var(--gray-200);
}

.lectura-iva {
    background: var(--gray-100);
}

.lectura-iva .lectura-grid {
    border-bottom: none;
    gap: 20px;
}

.lectura-iva .lectura-grid > div {
    font-size: 0.9rem;
}

.badge-tipo {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

/* Distribución en lectura */
.lectura-distribucion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.lectura-dist-linea {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--gray-100);
    border-radius: 6px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.dist-badge {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.dist-tipo {
    background: var(--gray-300);
    color: var(--gray-700);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--gray-400);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--info-color);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i { color: var(--success-color); }
.toast.error i { color: var(--danger-color); }
.toast.warning i { color: var(--warning-color); }
.toast.info i { color: var(--info-color); }

.toast span {
    flex: 1;
    font-size: 0.9rem;
    color: var(--gray-700);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =====================================================
   INFO DE APROBACIÓN/RECHAZO EN CARDS
   ===================================================== */

.rendicion-info-adicional {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--gray-300);
}

.rendicion-aprobacion {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--success-color);
    background: rgba(39, 174, 96, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
}

.rendicion-aprobacion i {
    font-size: 1rem;
}

.rendicion-aprobacion strong {
    font-weight: 600;
}

.rendicion-rechazo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
}

.rendicion-rechazo i {
    font-size: 1rem;
}

.rendicion-rechazo strong {
    font-weight: 600;
}

.rendicion-rechazo-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.06);
    padding: 8px 12px;
    border-radius: 8px;
}

.rendicion-rechazo-info i {
    font-size: 1rem;
}

.rendicion-rechazo-info strong {
    font-weight: 600;
}

.rendicion-motivo-rechazo {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-style: italic;
}

.rendicion-motivo-rechazo i {
    color: var(--gray-500);
    margin-top: 2px;
}

/* =====================================================
   INFO DE APROBACIÓN/RECHAZO EN MODAL LECTURA
   ===================================================== */

.lectura-aprobacion {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid var(--success-color);
}

.lectura-aprobacion i {
    font-size: 1.1rem;
}

.lectura-rechazo-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.08);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.lectura-rechazo-info i {
    font-size: 1.1rem;
}

.lectura-rechazo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.1);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--danger-color);
}

.lectura-rechazo i {
    font-size: 1.1rem;
}

.lectura-motivo-rechazo {
    font-size: 0.85rem;
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid var(--gray-400);
}

.lectura-motivo-rechazo i {
    color: var(--gray-500);
    margin-right: 4px;
}

/* Estado rechazado en card */
.rendicion-card.refused {
    border-left: 4px solid var(--danger-color);
    background: linear-gradient(to right, rgba(231, 76, 60, 0.03), white);
}

.rendicion-estado.refused {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.lectura-estado.refused {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

/* =====================================================
   ESTILOS ADICIONALES - FONDO POR RENDIR
   Agregar al final de rendiciones.css
   ===================================================== */

/* Sección Fondo por Rendir */
.fondo-rendir-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    border: 1px solid #e9ecef;
}

.fondo-rendir-section .sub-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.fondo-rendir-section .sub-label i {
    margin-right: 6px;
    color: #6c757d;
}

/* Select de Fondo */
.select-fondo {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-fondo:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
    outline: none;
}

.select-fondo:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

/* Contenedor de info de saldo */
.fondo-saldo-container {
    margin-top: 12px;
}

/* Card de Saldo */
.fondo-saldo-card {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 4px solid #28a745;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.fondo-saldo-card.saldo-insuficiente {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.fondo-saldo-card.saldo-ok {
    border-left-color: #28a745;
    background: #f0fff4;
}

/* Filas de saldo */
.fondo-saldo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.fondo-saldo-row.fondo-saldo-resultado {
    border-top: 1px dashed #dee2e6;
    margin-top: 8px;
    padding-top: 10px;
    font-weight: 600;
}

.fondo-saldo-label {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.fondo-saldo-label i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #adb5bd;
}

.fondo-saldo-valor {
    font-weight: 600;
    font-size: 1rem;
    color: #343a40;
}

.fondo-saldo-valor.text-danger {
    color: #dc3545 !important;
}

.fondo-saldo-valor.text-success {
    color: #28a745 !important;
}

/* Alerta de saldo insuficiente */
.fondo-saldo-alerta {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fondo-saldo-alerta i {
    margin-top: 2px;
    flex-shrink: 0;
}

.fondo-saldo-alerta strong {
    display: block;
}

/* Animación al mostrar */
.fondo-saldo-container {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .fondo-saldo-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .fondo-saldo-valor {
        font-size: 1.1rem;
    }
}
/* Badges de Forma de Pago */
.badge-forma-pago {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-reembolso {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-informativo {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-fondo {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Fondo vinculado */
.lectura-fondo {
    margin-top: 12px;
}

.lectura-fondo-card {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 4px solid #43a047;
}

.lectura-fondo-card .fondo-nombre {
    font-weight: 600;
    color: #2e7d32;
}

/* =====================================================
   DETALLE DE FONDO VINCULADO - Modal Lectura
   ===================================================== */

.lectura-fondo-card .fondo-proyecto {
    font-size: 0.85rem;
    color: #558b2f;
    margin-bottom: 10px;
}

.lectura-fondo-card .fondo-proyecto i {
    margin-right: 4px;
}

.lectura-fondo-card .fondo-cargando {
    font-size: 0.85rem;
    color: #689f38;
    margin-top: 8px;
}

/* Montos del fondo */
.fondo-montos {
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 10px;
}

.fondo-monto-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.fondo-monto-row.fondo-saldo {
    border-top: 1px dashed #a5d6a7;
    margin-top: 6px;
    padding-top: 8px;
    font-weight: 600;
}

.fondo-monto-label {
    color: #555;
    font-size: 0.85rem;
}

.fondo-monto-valor {
    font-weight: 600;
    font-size: 0.95rem;
}

.fondo-monto-valor.text-success {
    color: #2e7d32;
}

.fondo-monto-valor.text-danger {
    color: #c62828;
}

/* Barra de progreso del fondo */
.fondo-progreso {
    margin-top: 12px;
}

.fondo-progreso-bar {
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 4px;
    overflow: hidden;
}

.fondo-progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #43a047);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.fondo-progreso-label {
    font-size: 0.75rem;
    color: #558b2f;
    text-align: right;
    margin-top: 4px;
}

.fondo-error {
    color: #c62828;
    font-size: 0.85rem;
}

/* =====================================================
   WARNING DE GASTOS PENDIENTES EN FONDO
   ===================================================== */

.fondo-pendientes-warning {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 1px solid #ffca28;
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
}

.fondo-pendientes-header {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 10px 14px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fondo-pendientes-header i {
    font-size: 1.1rem;
}

.fondo-pendientes-body {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #5d4037;
}

.fondo-pendientes-body p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.fondo-pendientes-body strong {
    color: #e65100;
}

/* Lista de gastos pendientes */
.fondo-pendientes-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255,255,255,0.6);
    border-radius: 6px;
    overflow: hidden;
}

.fondo-pendientes-lista li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,152,0,0.2);
    font-size: 0.8rem;
}

.fondo-pendientes-lista li:last-child {
    border-bottom: none;
}

.fondo-pendientes-lista li.pendiente-mas {
    justify-content: center;
    color: #bf360c;
    font-style: italic;
    font-size: 0.75rem;
}

.pendiente-doc {
    color: #6d4c41;
    font-family: monospace;
    font-weight: 500;
}

.pendiente-monto {
    color: #e65100;
    font-weight: 600;
}

/* Saldo real disponible */
.fondo-saldo-row.fondo-saldo-real {
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    padding: 10px 12px !important;
    margin-top: 8px;
    border: 1px dashed #ff9800;
}

.fondo-saldo-row.fondo-saldo-real .fondo-saldo-label {
    font-weight: 600;
    color: #e65100;
}

/* Estado de carga */
.fondo-cargando {
    text-align: center;
    padding: 16px;
    color: #666;
    font-size: 0.9rem;
}

.fondo-cargando i {
    margin-right: 8px;
    color: #2c3e50;
}

/* Ajustes al card de saldo cuando hay pendientes */
.fondo-saldo-card.saldo-insuficiente {
    border-color: #e74c3c;
}

.fondo-saldo-card.saldo-insuficiente .fondo-pendientes-warning {
    border-color: #ef5350;
}

.fondo-saldo-card.saldo-insuficiente .fondo-pendientes-header {
    background: linear-gradient(135deg, #e53935, #c62828);
}

/* Resultado final - destacar más */
.fondo-saldo-row.fondo-saldo-resultado {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    border-radius: 6px;
    padding: 10px 12px !important;
    margin-top: 8px;
    border-top: 2px solid #bdbdbd;
}

.fondo-saldo-row.fondo-saldo-resultado .fondo-saldo-label {
    font-weight: 600;
}

.fondo-saldo-row.fondo-saldo-resultado .fondo-saldo-valor {
    font-size: 1.1rem;
    font-weight: 700;
}






















































