/* ===============================================
   MÓDULO DE CONTABILIDAD
   Estilos compartidos para Cuentas Contables y Pólizas
   =============================================== */

/* ===============================================
   FILTROS
   =============================================== */

.filters-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters-row .filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    min-width: 180px;
    flex: 1;
}

.filters-row .filter-group:last-child {
    flex: 1.5; /* Búsqueda más ancha */
}

.filters-row .filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
}

.filters-row .filter-group select,
.filters-row .filter-group input[type="text"],
.filters-row .filter-group input[type="date"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Flecha personalizada solo para selects */
.filters-row .filter-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23407C94' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Sin flecha para inputs de texto y fecha */
.filters-row .filter-group input[type="text"],
.filters-row .filter-group input[type="date"] {
    padding-right: 0.875rem;
}

.filters-row .filter-group select:hover,
.filters-row .filter-group input[type="text"]:hover,
.filters-row .filter-group input[type="date"]:hover {
    border-color: var(--primary-medium);
}

.filters-row .filter-group select:focus,
.filters-row .filter-group input[type="text"]:focus,
.filters-row .filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(64, 124, 148, 0.1);
}

/* Select options styling */
.filters-row .filter-group select option {
    padding: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
}

/* Estilos específicos para inputs date */
.filters-row .filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.filters-row .filter-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Fix para que el icono del calendario se vea en temas oscuros */
.filters-row .filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
}

/* Asegurar que los campos date tengan el mismo height que los selects */
.filters-row .filter-group input[type="date"] {
    min-height: 42px; /* Mismo height que los selects */
}

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

#formCuentaContable .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

#formCuentaContable .form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
}

#formCuentaContable .form-group label.required::after {
    content: " *";
    color: var(--danger);
}

#formCuentaContable .form-group input,
#formCuentaContable .form-group select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
}

#formCuentaContable .form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23407C94' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

#formCuentaContable .form-group input:focus,
#formCuentaContable .form-group select:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(64, 124, 148, 0.1);
}

#formCuentaContable .form-group input:hover,
#formCuentaContable .form-group select:hover {
    border-color: var(--primary-light);
}

#formCuentaContable .form-group input[type="number"] {
    max-width: 120px;
}

#formCuentaContable .form-group .form-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    line-height: 1.4;
}

#formCuentaContable .form-group small.text-muted {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Select options in modal */
#formCuentaContable select option {
    padding: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ===============================================
   TABLA
   =============================================== */

#tablaCuentasContables {
    width: 100%;
}

#tablaCuentasContables th {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#tablaCuentasContables td {
    vertical-align: middle;
}

#tablaCuentasContables td strong {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Badges en tabla */
#tablaCuentasContables .badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

#tablaCuentasContables .badge-primary {
    background: #007bff;
    color: white;
}

#tablaCuentasContables .badge-danger {
    background: #dc3545;
    color: white;
}

#tablaCuentasContables .badge-warning {
    background: #ffc107;
    color: #333;
}

#tablaCuentasContables .badge-success {
    background: #28a745;
    color: white;
}

#tablaCuentasContables .badge-info {
    background: #17a2b8;
    color: white;
}

#tablaCuentasContables .badge-secondary {
    background: #6c757d;
    color: white;
}

/* ===============================================
   MODAL DE IMPORTACIÓN
   =============================================== */

#archivoImportacionCuentas {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: 6px;
    background: var(--background);
    cursor: pointer;
    transition: var(--transition);
}

#archivoImportacionCuentas:hover {
    border-color: var(--primary-medium);
    background: rgba(64, 124, 148, 0.05);
}

#archivoImportacionCuentas:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(64, 124, 148, 0.1);
}

#previewImportacion {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--background);
    border-radius: 6px;
}

#previewImportacion h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

#previewImportacion .data-table {
    font-size: 0.85rem;
    background: var(--surface);
}

#previewImportacion #previewCount {
    display: block;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-light);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

/* ===============================================
   MODAL DE ADVERTENCIA (Cuenta en Uso)
   =============================================== */

.modal ul {
    list-style: none;
    padding-left: 0;
}

.modal ul li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
}

.modal ul li:last-child {
    border-bottom: none;
}

.modal ul li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
    }
    
    .filters-row .filter-group {
        min-width: 100%;
    }
    
    #formCuentaContable .form-grid {
        grid-template-columns: 1fr;
    }
    
    #formCuentaContable .form-group input[type="number"] {
        max-width: 100%;
    }
}

/* ===============================================
   UTILIDADES ESPECÍFICAS
   =============================================== */

.form-text.text-muted {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Asegurar que los selects se vean bien en todos los navegadores */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Fix para Firefox */
@-moz-document url-prefix() {
    select {
        text-indent: 0.01px;
        text-overflow: '';
    }
}

/* Fix para IE11 */
select::-ms-expand {
    display: none;
}

/* ===============================================
   ESTILOS PARA MODAL DE PÓLIZAS
   =============================================== */

/* Form-grid para layout de dos columnas */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* Form group general */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
}

.form-group label.required::after {
    content: " *";
    color: var(--danger);
}

/* Inputs, selects y textareas generales */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23407C94' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary-light);
}

.form-group input[readonly] {
    background-color: var(--background);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Estilos específicos para inputs date en formularios */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    filter: invert(0.5);
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-group input[type="date"] {
    min-height: 42px;
}

.form-group small.form-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* ===============================================
   SISTEMA DE GRID RESPONSIVE (Bootstrap-like)
   Para módulos DIOT, Reportes y Formularios
   =============================================== */

.row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-left: calc(-1 * var(--spacing-md) / 2);
    margin-right: calc(-1 * var(--spacing-md) / 2);
}

.row.align-items-end {
    align-items: flex-end;
}

.row.align-items-center {
    align-items: center;
}

/* Columnas base */
[class*="col-"] {
    flex: 0 0 auto;
    padding-left: calc(var(--spacing-md) / 2);
    padding-right: calc(var(--spacing-md) / 2);
}

.col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* Responsive: móviles - columnas a ancho completo */
@media (max-width: 768px) {
    [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .row {
        gap: var(--spacing-sm);
    }
}

/* ===============================================
   CONTROLES DE FORMULARIO (Form Controls)
   =============================================== */

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-select,
.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.5;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23407C94' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(64, 124, 148, 0.1);
}

.form-select:hover,
.form-control:hover {
    border-color: var(--primary-light);
}

.form-select:disabled,
.form-control:disabled,
.form-select[readonly],
.form-control[readonly] {
    background-color: var(--background);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===============================================
   ALERTAS (Alerts)
   =============================================== */

.alert {
    padding: var(--spacing-md);
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.alert i {
    font-size: 1.1rem;
    margin-top: 2px;
}

.alert-info {
    background: rgba(64, 124, 148, 0.08);
    border-color: rgba(64, 124, 148, 0.2);
    color: var(--primary-dark);
}

.alert-info i {
    color: var(--primary-medium);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

.alert-warning i {
    color: #ffc107;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

.alert-danger i {
    color: var(--danger);
}

.alert-success {
    background: rgba(40, 167, 69, 0.08);
    border-color: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

.alert-success i {
    color: var(--success);
}

/* ===============================================
   CLASES UTILITARIAS (Utilities)
   =============================================== */

/* Margins */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mb-5 { margin-bottom: var(--spacing-xl) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }
.mt-5 { margin-top: var(--spacing-xl) !important; }

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Width */
.w-100 { width: 100% !important; }
.w-75 { width: 75% !important; }
.w-50 { width: 50% !important; }
.w-25 { width: 25% !important; }
.w-auto { width: auto !important; }

/* Text alignment */
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

/* Flex utilities */
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: var(--spacing-md) !important; }

/* ===============================================
   TARJETAS DE RESUMEN (Summary Cards)
   Para módulo DIOT
   =============================================== */

.summary-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(48, 88, 107, 0.12);
    border-color: var(--primary-light);
}

.summary-card i {
    font-size: 2rem;
    color: var(--primary-medium);
    margin-bottom: var(--spacing-sm);
}

.summary-card .summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: var(--spacing-xs) 0;
    line-height: 1.2;
}

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

.summary-card.summary-card-warning .summary-value {
    color: #f39c12;
}

.summary-card.summary-card-warning i {
    color: #f39c12;
}

/* ===============================================
   ENCABEZADOS DE REPORTES (Report Headers)
   Para módulos de reportes contables
   =============================================== */

.report-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.report-header h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.report-header p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

.report-title {
    font-size: 1.4rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border);
}

/* ===============================================
   MEJORAS TIPOGRÁFICAS
   =============================================== */

.report-container h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.report-container .section-title {
    font-size: 1rem;
    color: var(--primary-medium);
    font-weight: 600;
    margin: var(--spacing-md) 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary-medium) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* ===============================================
   MEJORAS PARA ÍCONOS Y BADGES
   =============================================== */

.badge i {
    font-size: 0.85em;
    margin-right: 0.25rem;
}

.report-container i.fas,
.report-container i.far {
    margin-right: 0.5rem;
    color: var(--primary-medium);
}

/* Mejora de títulos con íconos */
h2 i, h3 i {
    color: var(--primary-medium);
    margin-right: var(--spacing-sm);
}

/* ===============================================
   CONTENEDOR DIOT
   =============================================== */

.diot-container {
    padding: 0;
}

.diot-container .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.diot-container .card-body {
    padding: var(--spacing-md);
}

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

@media (max-width: 768px) {
    .summary-card .summary-value {
        font-size: 1.5rem;
    }
    
    .report-header h2 {
        font-size: 1.3rem;
    }
    
    .report-title {
        font-size: 1.2rem;
    }
}

.form-group small.text-muted {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Select options styling */
.form-group select option {
    padding: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Clases específicas para movimientos */
.mov-cuenta,
.mov-tipo,
.mov-importe,
.mov-descripcion {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
}

.mov-cuenta,
.mov-tipo {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23407C94' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.mov-cuenta:focus,
.mov-tipo:focus,
.mov-importe:focus,
.mov-descripcion:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(64, 124, 148, 0.1);
}

.mov-cuenta:hover,
.mov-tipo:hover,
.mov-importe:hover,
.mov-descripcion:hover {
    border-color: var(--primary-light);
}

/* Options dentro de movimientos */
.mov-cuenta option,
.mov-tipo option {
    padding: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Responsive para form-grid */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   ESTILOS PARA ESTADO DE RESULTADOS
   =============================================== */

/* Filas de sección (INGRESOS, GASTOS) */
.data-table .section-header td {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filas de subsección (Ingresos Operacionales, Gastos de Operación, etc.) */
.data-table .subsection-header td {
    background: var(--primary-light);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

/* Filas de detalle (cuentas individuales) */
.data-table .detail-row td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.data-table .detail-row:hover {
    background-color: var(--hover-bg);
}

/* Filas de totales (TOTAL INGRESOS, TOTAL GASTOS) */
.data-table .total-row td {
    background-color: var(--background);
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.data-table .total-row.success td {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-dark);
}

.data-table .total-row.danger td {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-dark);
}

/* Fila final (UTILIDAD NETA) */
.data-table .final-row td {
    font-weight: 800;
    font-size: 1.1rem;
    padding: 1.25rem 1rem;
    border-top: 3px solid var(--primary-dark);
    border-bottom: 3px solid var(--primary-dark);
}

.data-table .final-row.success td {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
    color: var(--success-dark);
}

.data-table .final-row.danger td {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.05) 100%);
    color: var(--danger-dark);
}

/* Variables de colores adicionales (si no existen) */
:root {
    --success-dark: #2e7d32;
    --danger-dark: #c62828;
    --border-light: #e8eef2;
    --hover-bg: #f8fafb;
}
