body { font-size: 0.85rem; }

/* Contenedor con scroll para manejar la matriz completa sin paginar */
.table-container { 
    max-height: 82vh; 
    overflow: auto; 
    border: 1px solid #dee2e6; 
    background: white; 
}

.table { 
    font-size: 0.75rem; 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
}

/* Encabezados Fijos (Sticky) para los dos niveles */
.table thead th { 
    position: sticky; 
    z-index: 20; 
    background: #212529; 
    color: white; 
    border: 1px solid #444; 
    text-align: center;
    vertical-align: middle;
}

.table thead tr:first-child th { top: 0; height: 35px; }
.table thead tr:nth-child(2) th { top: 35px; height: 35px; }

.text-zero { color: #ccc; opacity: 0.5; }

/* Estilo resaltado para la fila de TOTAL GENERAL */
.table tbody tr:last-child {
    font-weight: bold;
    background-color: #f8f9fa !important;
    border-top: 2px solid #dee2e6;
}

.table td { border: 1px solid #dee2e6; }