:where(.bi-page, .bi-page--purchases, .cc-page) {
    --bi-font-display: var(--vt-font-sans);
    --bi-bg: var(--vt-bg);
    --bi-surface: var(--vt-surface);
    --bi-border: var(--vt-border);
    --bi-text: var(--vt-text-main);
    --bi-text-soft: var(--vt-text-muted);
    --bi-shadow: var(--vt-shadow-lg);
    color: var(--bi-text);
    font-family: var(--bi-font-display);
}

:where(.bi-shell-header, .cc-shell-header, .bi-toolbar, .cc-toolbar, .bi-filter-band, .cc-filter-band, .bi-card, .cc-card, .bi-error, .cc-error) {
    border: 1px solid var(--bi-border);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%), var(--bi-surface);
    box-shadow: var(--bi-shadow);
}

:where(.bi-card, .cc-card) {
    border-radius: 1rem;
}

:where(.bi-shell-header, .cc-shell-header) {
    padding: 1.35rem 1.4rem;
}

:where(.bi-back, .cc-back) {
    width: 2.85rem;
    height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    border: 1px solid var(--bi-border);
    text-decoration: none;
    color: var(--bi-text);
    background: var(--vt-surface-soft);
}

:where(.bi-button, .cc-button) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.7rem;
    padding: 0.65rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
}

:where(.bi-button--primary, .cc-button--primary) {
    color: #fff;
    background: linear-gradient(135deg, var(--bi-accent-strong, var(--bi-accent)), var(--bi-accent-secondary, var(--bi-accent)));
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.22);
}

:where(.bi-button--ghost, .cc-button--ghost) {
    color: var(--vt-text-secondary);
    background: transparent;
    border-color: var(--bi-border);
}

:where(.bi-button--sm, .cc-button--sm) {
    min-height: 2.25rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}

:where(.bi-chip, .cc-chip, .bi-inline-chip, .bi-active-filter-chip, .bi-toolbar__chip, .cc-toolbar__chip, .bi-table-badge) {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

:where(.bi-chip, .cc-chip, .bi-toolbar__chip, .cc-toolbar__chip) {
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(234, 88, 12, 0.2);
    color: var(--vt-text-secondary);
    background: rgba(234, 88, 12, 0.1);
}

:where(.bi-chip--soft, .cc-chip--soft, .bi-table-badge) {
    border-color: var(--bi-border);
    background: var(--vt-surface-soft);
    color: var(--bi-text-soft);
}

:where(.bi-empty, .cc-empty, .bi-error, .cc-error) {
    border-radius: 1rem;
}

:where(.bi-empty, .cc-empty) {
    padding: 1rem;
    background: var(--vt-surface-soft);
    border: 1px dashed var(--bi-border);
    color: var(--bi-text-soft);
}

:where(.bi-error, .cc-error) {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    color: #ff8b92;
}

:where(.bi-skeleton, .cc-skeleton) {
    border-radius: 1rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)), var(--vt-surface-soft);
    background-size: 200% 100%;
    animation: bi-skeleton-shift 1.3s linear infinite;
}

@keyframes bi-skeleton-shift {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ═════════════════════════════════════════════════════════
   Tabla de Compras (.bi-table-host) — overrides globales.
   Van acá (y no en ComprasDashboard.razor.css con ::deep)
   porque pintan markup interno de TableBase, otro componente,
   y este archivo carga después del bundle scoped de Blazor. */

.bi-page--purchases .bi-table-host table {
    width: 100%;
    border-collapse: collapse;
}

.bi-page--purchases .bi-table-host thead th {
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.07), rgba(234, 88, 12, 0.03));
    color: var(--bi-text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(234, 88, 12, 0.18);
    white-space: nowrap;
    text-align: left;
}

.bi-page--purchases .bi-table-host thead th:first-child {
    border-top-left-radius: 1rem;
}

.bi-page--purchases .bi-table-host thead th:last-child {
    border-top-right-radius: 1rem;
}

.bi-page--purchases .bi-table-host tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(234, 88, 12, 0.08);
    text-align: left;
    vertical-align: middle;
    color: var(--bi-text);
    font-size: 0.88rem;
}

.bi-page--purchases .bi-table-host tbody tr:nth-child(even) {
    background: rgba(234, 88, 12, 0.025);
}

.bi-page--purchases .bi-table-host tbody tr {
    cursor: pointer;
    transition: background var(--vt-duration-fast) var(--vt-ease);
}

.bi-page--purchases .bi-table-host tbody tr:hover {
    background: rgba(234, 88, 12, 0.07);
}

.bi-page--purchases .bi-table-host tbody tr:last-child td {
    border-bottom: 0;
}

.bi-page--purchases .bi-table-host .data-table-container {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* Celda: entidad (nombre + código) */
.bi-page--purchases .bi-table-host .bi-cell-entity {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.bi-page--purchases .bi-table-host .bi-cell-entity strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bi-text);
    line-height: 1.3;
}

.bi-page--purchases .bi-table-host .bi-cell-code {
    display: inline-block;
    width: fit-content;
    font-family: var(--vt-font-mono, monospace);
    font-size: 0.72rem;
    color: var(--bi-text-soft);
    letter-spacing: 0.04em;
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    background: rgba(234, 88, 12, 0.06);
}

/* Celda: números alineados */
.bi-page--purchases .bi-table-host .bi-cell-mono {
    font-family: var(--vt-font-mono, monospace);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Badge de GAP */
.bi-page--purchases .bi-table-host .bi-gap-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.6rem;
    font-family: var(--vt-font-mono, monospace);
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    transition: all var(--vt-duration-fast) var(--vt-ease);
}

.bi-page--purchases .bi-table-host .bi-gap-badge--alert {
    color: #fff;
    background: linear-gradient(135deg, var(--bi-purchases-primary-hover), var(--bi-purchases-secondary));
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

.bi-page--purchases .bi-table-host .bi-gap-badge--ok {
    color: var(--bi-text-soft);
    background: var(--vt-surface-soft);
    border: 1px solid var(--bi-border);
}

/* Botón de acción de fila */
.bi-page--purchases .bi-table-host .bi-cell-action {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.bi-page--purchases .bi-table-host .bi-table-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    min-height: 2rem;
    border: 1px solid rgba(234, 88, 12, 0.2);
    border-radius: 0.7rem;
    background: rgba(234, 88, 12, 0.06);
    color: var(--bi-purchases-primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--vt-duration-fast) var(--vt-ease);
    white-space: nowrap;
}

.bi-page--purchases .bi-table-host .bi-table-action-btn:hover,
.bi-page--purchases .bi-table-host .bi-table-action-btn:focus-visible {
    background: rgba(234, 88, 12, 0.14);
    border-color: rgba(234, 88, 12, 0.4);
    color: var(--bi-purchases-primary-hover);
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
    outline: none;
}

.bi-page--purchases .bi-table-host .bi-table-action-btn i {
    font-size: 0.72rem;
    transition: transform var(--vt-duration-fast) var(--vt-ease);
}

.bi-page--purchases .bi-table-host .bi-table-action-btn:hover i {
    transform: translate(1px, -1px);
}

/* Search input de la tabla */
.bi-page--purchases .bi-table-host .table-filters {
    padding: 0.85rem 1.25rem 0;
}

.bi-page--purchases .bi-table-host .table-filter-input {
    max-width: 280px;
    min-height: 2.5rem;
    border-radius: 0.8rem;
    border: 1px solid var(--bi-border);
    background: var(--vt-surface-soft);
    color: var(--bi-text);
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    transition: border-color var(--vt-duration-fast) var(--vt-ease), box-shadow var(--vt-duration-fast) var(--vt-ease);
}

.bi-page--purchases .bi-table-host .table-filter-input::placeholder {
    color: var(--bi-text-soft);
}

.bi-page--purchases .bi-table-host .table-filter-input:focus {
    border-color: rgba(234, 88, 12, 0.55);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.16);
    outline: none;
}

/* Paginación */
.bi-page--purchases .bi-table-host .table-pagination {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(234, 88, 12, 0.1);
}

.bi-page--purchases .bi-table-host .table-pagination__meta {
    font-size: 0.78rem;
    color: var(--bi-text-soft);
}

.bi-page--purchases .bi-table-host .page-link {
    min-width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    color: var(--bi-text-soft);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--vt-duration-fast) var(--vt-ease);
    background: transparent;
}

.bi-page--purchases .bi-table-host .page-link:hover {
    background: rgba(234, 88, 12, 0.1);
    color: var(--bi-purchases-primary);
    border-color: rgba(234, 88, 12, 0.2);
}

.bi-page--purchases .bi-table-host .page-item.active .page-link {
    background: linear-gradient(135deg, var(--bi-purchases-primary-hover), var(--bi-purchases-secondary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}

.bi-page--purchases .bi-table-host .page-item.disabled .page-link {
    opacity: 0.3;
    pointer-events: none;
}

/* Fila expandida (proveedores por articulo) */
.bi-page--purchases .bi-table-host .bi-subrow > td {
    padding: 0;
    background: rgba(234, 88, 12, 0.03);
    border-bottom: 1px solid rgba(234, 88, 12, 0.12);
    cursor: default;
}

.bi-page--purchases .bi-table-host .bi-subtable {
    padding: 0.75rem 1rem 1rem 2.5rem;
}

.bi-page--purchases .bi-table-host .bi-subtable__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--vt-surface-soft, rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(234, 88, 12, 0.14);
    border-radius: 0.85rem;
    overflow: hidden;
}

.bi-page--purchases .bi-table-host .bi-subtable__table thead th {
    background: rgba(234, 88, 12, 0.06);
    color: var(--bi-text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(234, 88, 12, 0.14);
    text-align: left;
}

.bi-page--purchases .bi-table-host .bi-subtable__table tbody td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(234, 88, 12, 0.08);
    font-size: 0.84rem;
    vertical-align: middle;
}

.bi-page--purchases .bi-table-host .bi-subtable__table tbody tr:last-child td {
    border-bottom: 0;
}

.bi-page--purchases .bi-table-host .bi-subtable__table tbody tr:hover {
    background: rgba(234, 88, 12, 0.05);
}

.bi-page--purchases .bi-table-host .bi-subtable__pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.6rem;
    font-size: 0.76rem;
    color: var(--bi-text-soft);
}

.bi-page--purchases .bi-table-host .bi-subtable__pagination-controls {
    display: flex;
    gap: 0.4rem;
}

.bi-page--purchases .bi-table-host .bi-subtable__pagination-controls .bi-table-action-btn:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.bi-page--purchases .bi-table-host .bi-subtable__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* Badge de nivel de dependencia (cantidad de proveedores) */
.bi-page--purchases .bi-table-host .bi-concentration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.bi-page--purchases .bi-table-host .bi-concentration-badge--alert {
    color: #fff;
    background: linear-gradient(135deg, var(--bi-purchases-primary-hover), var(--bi-purchases-secondary));
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

.bi-page--purchases .bi-table-host .bi-concentration-badge--warn {
    color: #b45309;
    background: rgba(217, 119, 6, 0.14);
    border: 1px solid rgba(217, 119, 6, 0.28);
}

.bi-page--purchases .bi-table-host .bi-concentration-badge--ok {
    color: var(--bi-text-soft);
    background: var(--vt-surface-soft);
    border: 1px solid var(--bi-border);
}

/* Celda de proveedor lider con barra de participacion */
.bi-page--purchases .bi-table-host .bi-leader-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 180px;
}

.bi-page--purchases .bi-table-host .bi-leader-cell__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.1);
    overflow: hidden;
}

.bi-page--purchases .bi-table-host .bi-leader-cell__bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bi-purchases-primary-hover), var(--bi-purchases-secondary));
}

.bi-page--purchases .bi-table-host .bi-leader-cell__share {
    font-size: 0.72rem;
    color: var(--bi-text-soft);
}

/* ────────────────────────────────────────────────────────────────
   Tarjetas de tabla modularizadas (ArticleCostAuditTable,
   ArticleConcentrationTable) — van acá y no en ComprasDashboard.razor.css
   porque el CSS scoping de Blazor no atraviesa el limite del componente
   hijo; estas clases se reutilizan tal cual las usa ComprasDashboard.razor. */

.bi-page--purchases .bi-card {
    border-radius: 1rem;
    box-shadow: var(--vt-shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.06));
    background: linear-gradient(180deg, rgba(234, 88, 12, 0.04), transparent 24%), var(--bi-surface);
    padding: 1.1rem 1.1rem 1.15rem;
}

.bi-page--purchases .bi-card--full {
    grid-column: 1 / -1;
}

.bi-page--purchases .bi-card__header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.9rem;
}

.bi-page--purchases .bi-card__header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-family: var(--bi-font-display, var(--vt-font-sans));
    letter-spacing: -0.025em;
}

.bi-page--purchases .bi-card__header p {
    margin: 0.25rem 0 0;
    color: var(--bi-text-soft);
    font-size: 0.82rem;
}

.bi-page--purchases .bi-table-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.bi-page--purchases .bi-table-toolbar__summary {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.bi-page--purchases .bi-segmented-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--vt-surface-soft);
    border: 1px solid var(--bi-border);
}

.bi-page--purchases .bi-segmented-control__option {
    min-height: 2.2rem;
    padding: 0.45rem 0.8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bi-text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--vt-duration-fast) var(--vt-ease);
}

.bi-page--purchases .bi-segmented-control__option:hover,
.bi-page--purchases .bi-segmented-control__option:focus-visible,
.bi-page--purchases .bi-segmented-control__option.is-active {
    background: linear-gradient(135deg, var(--bi-purchases-primary-hover), var(--bi-purchases-secondary));
    color: #fff;
    outline: none;
}

.bi-page--purchases .bi-inline-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(234, 88, 12, 0.2);
    background: rgba(234, 88, 12, 0.08);
    color: var(--bi-text);
    cursor: pointer;
}

.bi-page--purchases .bi-inline-chip--static {
    cursor: default;
}

.bi-page--purchases .bi-search-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    min-height: 2.75rem;
    border-radius: 0.9rem;
    border: 1px solid var(--bi-border);
    background: var(--vt-surface-soft);
    color: var(--bi-text);
}

.bi-page--purchases .bi-search-box--table {
    min-width: 240px;
}

.bi-page--purchases .bi-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    padding: 0;
}

.bi-page--purchases .bi-search-box:focus-within {
    border-color: rgba(234, 88, 12, 0.55);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.16);
}

.bi-page--purchases .bi-search-box__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--bi-text-soft);
    cursor: pointer;
    padding: 0.15rem;
}

.bi-page--purchases .bi-search-box__clear:hover {
    color: var(--bi-purchases-primary-hover);
}

.bi-page--purchases .bi-skeleton {
    border-radius: 1rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)), var(--vt-surface-soft);
    background-size: 200% 100%;
    animation: bi-skeleton-shift 1.3s linear infinite;
}

.bi-page--purchases .bi-skeleton--row {
    min-height: 2.75rem;
}

/* ═════════════════════════════════════════════════════════
   Tabla de Cuentas Corrientes (.cc-table-host) — mismo patrón
   que .bi-table-host: global, no scoped/::deep, tema teal. */

.cc-page .cc-table-host table {
    width: 100%;
    border-collapse: collapse;
}

.cc-page .cc-table-host thead th {
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.08), rgba(20, 184, 166, 0.03));
    color: var(--bi-text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(20, 184, 166, 0.2);
    white-space: nowrap;
    text-align: left;
}

.cc-page .cc-table-host thead th:first-child {
    border-top-left-radius: 1rem;
}

.cc-page .cc-table-host thead th:last-child {
    border-top-right-radius: 1rem;
}

.cc-page .cc-table-host tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(20, 184, 166, 0.08);
    text-align: left;
    vertical-align: middle;
    color: var(--bi-text);
    font-size: 0.88rem;
}

.cc-page .cc-table-host tbody tr:nth-child(even) {
    background: rgba(20, 184, 166, 0.025);
}

.cc-page .cc-table-host tbody tr:hover {
    background: rgba(20, 184, 166, 0.07);
}

.cc-page .cc-table-host tbody tr:last-child td {
    border-bottom: 0;
}

.cc-page .cc-table-host .data-table-container {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.cc-page .cc-table-host .cc-cell-code {
    display: inline-block;
    width: fit-content;
    font-family: var(--vt-font-mono, monospace);
    font-size: 0.72rem;
    color: var(--bi-text-soft);
    letter-spacing: 0.04em;
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    background: rgba(20, 184, 166, 0.08);
}

.cc-page .cc-table-host .cc-cell-mono {
    font-family: var(--vt-font-mono, monospace);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.cc-page .cc-table-host .cc-cell-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    color: var(--bi-text-soft);
    background: var(--vt-surface-soft);
    border: 1px solid var(--bi-border);
}

.cc-page .cc-table-host .cc-balance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.6rem;
    font-family: var(--vt-font-mono, monospace);
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.cc-page .cc-table-host .cc-balance-badge--positive {
    color: #fff;
    background: linear-gradient(135deg, var(--bi-cc-primary-strong), var(--bi-cc-secondary));
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
}

.cc-page .cc-table-host .cc-balance-badge--negative {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.cc-page .cc-table-host .table-filters {
    padding: 0.85rem 1.25rem 0;
}

.cc-page .cc-table-host .cc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.cc-page .cc-table-host .cc-status-badge--deudor {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}

.cc-page .cc-table-host .cc-status-badge--aldia {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.14);
}

.cc-page .cc-table-host .cc-status-badge--favor {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
}

.cc-page .cc-table-host .cc-status-badge--neutro {
    color: var(--bi-text-soft);
    background: var(--vt-surface-soft);
}

/* Proveedor con saldo negativo = nosotros le debemos: pago urgente. */
.cc-page .cc-table-host .cc-status-badge.is-urgent {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.5);
    animation: cc-urgent-pulse 1.6s ease-in-out infinite;
}

@keyframes cc-urgent-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .cc-page .cc-table-host .cc-status-badge.is-urgent {
        animation: none;
    }
}

.cc-page .cc-table-host .table-filter-input {
    max-width: 280px;
    min-height: 2.5rem;
    border-radius: 0.8rem;
    border: 1px solid var(--bi-border);
    background: var(--vt-surface-soft);
    color: var(--bi-text);
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    transition: border-color var(--vt-duration-fast) var(--vt-ease), box-shadow var(--vt-duration-fast) var(--vt-ease);
}

.cc-page .cc-table-host .table-filter-input:focus {
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
    outline: none;
}

/* ═════════════════════════════════════════════════════════
   Tabla de Gastronomia (.ga-table-host) — sigue los tokens
   globales del tema y se monta dentro de cards BI neutrales. */

.ga-page .ga-table-host table {
    width: 100%;
    border-collapse: collapse;
}

.ga-page .ga-table-host thead th {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.03));
    color: var(--vt-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(249, 115, 22, 0.22);
    white-space: nowrap;
    text-align: left;
    position: sticky;
    top: 0;
}

.ga-page .ga-table-host thead th:first-child {
    border-top-left-radius: 18px;
}

.ga-page .ga-table-host thead th:last-child {
    border-top-right-radius: 18px;
}

.ga-page .ga-table-host tbody td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid rgba(249, 115, 22, 0.08);
    text-align: left;
    vertical-align: middle;
    color: var(--vt-text-main);
    font-size: 0.88rem;
}

.ga-page .ga-table-host tbody tr:nth-child(even) {
    background: rgba(249, 115, 22, 0.03);
}

.ga-page .ga-table-host tbody tr:hover {
    background: rgba(249, 115, 22, 0.08);
}

.ga-page .ga-table-host tbody tr:last-child td {
    border-bottom: 0;
}

.ga-page .ga-table-host .data-table-container {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.ga-page .ga-table-host .ga-cell-entity {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ga-page .ga-table-host .ga-cell-entity strong {
    color: var(--vt-text-main);
    line-height: 1.3;
}

.ga-page .ga-table-host .ga-cell-entity span {
    color: var(--vt-text-muted);
    font-size: 0.78rem;
}

.ga-page .ga-table-host .ga-cell-mono {
    font-family: var(--vt-font-mono, monospace);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--vt-text-main);
}
