.active-card {
    border: 3px solid #FF5722; /* Highlight color */
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.7);
    transform: scale(1.02); /* Slightly enlarge the card */
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s; /* Smooth animation */
    background-color: rgba(255, 87, 34, 0.1); /* Light background color */
}

/* ComprobanteEditor: la grilla debe ocupar todo el ancho del contenedor */
.comprobante-detalles-tabla {
    width: 100%;
}

.comprobante-cabecera-resumen {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comprobante-detalles-tabla .mud-table-container,
.comprobante-detalles-tabla .mud-table-root {
    width: 100%;
}

.comprobante-detalles-tabla .mud-table-container {
    overflow: auto;
}

.comprobante-detalles-tabla-grid {
    width: 100%;
    table-layout: fixed;
}

.comprobante-detalles-tabla-grid .mud-table-cell {
    overflow: hidden;
    text-overflow: ellipsis;
}

.comprobante-detalles-tabla-grid .mud-table-cell:nth-child(1) {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    text-align: center;
}

.comprobante-detalles-tabla-grid .comprobante-celda-texto {
    white-space: normal;
    word-break: break-word;
}

.comprobante-detalles-tabla .mud-table-head .mud-table-row .mud-table-cell {
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: var(--mud-palette-appbar-background) !important;
    color: var(--mud-palette-appbar-text) !important;
    font-weight: 600;
    border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-appbar-text) 22%, transparent);
}

.comprobante-detalles-tabla .mud-table-head .mud-table-row .mud-table-cell .mud-typography,
.comprobante-detalles-tabla .mud-table-head .mud-table-row .mud-table-cell .mud-text-primary,
.comprobante-detalles-tabla .mud-table-head .mud-table-row .mud-table-cell .mud-text-secondary,
.comprobante-detalles-tabla .mud-table-head .mud-table-row .mud-table-cell span {
    color: var(--mud-palette-appbar-text) !important;
}

.comprobante-detalles-tabla .mud-table-foot .mud-table-row .mud-table-cell {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background-color: var(--mud-palette-appbar-background) !important;
    color: var(--mud-palette-appbar-text) !important;
    font-weight: 600;
    border-top: 1px solid color-mix(in srgb, var(--mud-palette-appbar-text) 22%, transparent);
}

.comprobante-detalles-tabla .mud-table-foot .mud-table-row .mud-table-cell strong,
.comprobante-detalles-tabla .mud-table-foot .mud-table-row .mud-table-cell .mud-typography {
    color: var(--mud-palette-appbar-text) !important;
}

/* ComprobantesLista: tabla al 100% sin desbordar horizontalmente */
.comprobantes-lista-grid {
    width: 100%;
}

.comprobantes-lista-grid .mud-table-container {
    overflow-x: auto;
}

.comprobantes-lista-grid .mud-table-root {
    width: 100% !important;
    table-layout: fixed;
}

.comprobantes-lista-grid .mud-table-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Columnas cortas: no absorber espacio sobrante */
.comprobantes-lista-col-ejercicio {
    width: 5rem !important;
    max-width: 5rem !important;
    white-space: nowrap;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.comprobantes-lista-col-tipo {
    width: 5.25rem !important;
    max-width: 5.25rem !important;
    white-space: nowrap;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.comprobantes-lista-col-fecha {
    width: 6rem !important;
    max-width: 6rem !important;
    white-space: nowrap;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.comprobantes-lista-col-documento {
    width: 16% !important;
    white-space: nowrap;
}

.comprobantes-lista-col-descripcion {
    width: auto !important;
    min-width: 0;
}

.comprobantes-lista-col-monto {
    width: 7.5rem !important;
    max-width: 7.5rem !important;
    white-space: nowrap;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.comprobantes-lista-col-chip {
    width: 7rem !important;
    max-width: 7rem !important;
    white-space: nowrap;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.comprobantes-lista-col-estatus {
    width: 8rem !important;
    max-width: 8rem !important;
    white-space: nowrap;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Acciones fija a la derecha (StickyRight de MudBlazor) */
.comprobantes-lista-col-acciones {
    width: 7rem !important;
    max-width: 7rem !important;
    white-space: nowrap;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

th.comprobantes-lista-col-acciones,
.mud-table-head .comprobantes-lista-col-acciones {
    background-color: var(--mud-palette-appbar-background) !important;
    color: var(--mud-palette-appbar-text) !important;
}

.comprobantes-lista-acciones {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    width: fit-content;
    gap: 0;
    padding-left: 0.125rem;
    padding-right: 0.125rem;
}

.comprobantes-lista-acciones .mud-icon-button,
.comprobantes-lista-acciones-menu .mud-icon-button {
    margin: 0;
    padding: 4px;
}
