/* AdminConsole custom stylesheet — branded MudDataGrid/MudTable headers.
   Uses theme tokens so headers follow the tenant primary colour in light & dark mode. */
.mud-table-root .mud-table-head .mud-table-cell {
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600 !important;
    line-height: 1.5rem !important;
    background-color: var(--mud-palette-primary) !important;
}

/* Header backgrounds (data grid + table) */
.mud-data-grid table thead,
.mud-data-grid table thead tr,
.mud-data-grid table thead th,
.mud-table thead, .mud-table thead tr, .mud-table thead th,
.mud-data-grid .mud-table-head, .mud-data-grid .mud-table-head tr, .mud-data-grid .mud-table-head th {
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
}

/* Header text, sort/filter icons, buttons — brand contrast text */
.mud-data-grid thead .mud-table-cell,
.mud-table thead .mud-table-cell,
.mud-data-grid thead .mud-table-cell *,
.mud-table thead .mud-table-cell *,
.mud-data-grid thead .mud-icon-root, .mud-table thead .mud-icon-root,
.mud-data-grid thead .mud-icon-button, .mud-table thead .mud-icon-button,
.mud-data-grid thead .mud-button-root, .mud-table thead .mud-button-root {
    color: var(--mud-palette-primary-text) !important;
    /*fill: var(--mud-palette-primary-text) !important;*/
}

/* Always-visible column filter / options funnel in branded headers.
   MudBlazor hides the column-options funnel button (.mud-icon-button-label) at opacity:0 and
   only reveals it on :hover; the branded header overrides colour/fill but never opacity, so the
   white funnel is invisible at rest. Force it visible, colour on the primary-text token (works in
   light, dark and per-tenant primary). The sort-direction arrow is left at the MudBlazor default
   so unsorted columns don't show a phantom ascending arrow. Keep in sync with site.css. */
.mud-data-grid thead .column-header .column-options .mud-menu .mud-icon-button-label,
.mud-data-grid thead .column-header .column-options .column-options-icon,
.mud-data-grid thead .column-header .column-options .filter-button {
    opacity: 1 !important;
    color: var(--mud-palette-primary-text) !important;
    fill: var(--mud-palette-primary-text) !important;
}

/* Filter row + column-filter header cells */
.mud-data-grid thead .mud-table-filter-row,
.mud-table thead .mud-table-filter-row,
.mud-data-grid .mud-table-head .mud-table-row-group th {
    background-color: var(--mud-palette-primary-darken) !important;
    color: var(--mud-palette-primary-text) !important;
}
.mud-data-grid thead .mud-table-filter-row .mud-table-cell,
.mud-data-grid thead .mud-table-filter-row input,
.mud-data-grid thead .mud-table-filter-row .mud-input,
.mud-data-grid thead .mud-table-filter-row .mud-icon-root,
.mud-data-grid thead .mud-table-filter-row .mud-icon-button,
.mud-data-grid thead .filter-header-cell,
.mud-data-grid thead .filter-header-cell .mud-input,
.mud-data-grid thead .filter-header-cell input,
.mud-data-grid thead .filter-header-cell .mud-icon-root,
.mud-data-grid thead .filter-header-cell .mud-icon-button {
    color: var(--mud-palette-primary-text) !important;
    fill: var(--mud-palette-primary-text) !important;
    -webkit-text-fill-color: var(--mud-palette-primary-text) !important;
}
.mud-data-grid thead input::placeholder { color: var(--mud-palette-primary-text) !important; opacity: 0.6 !important; }

/* Renamed brand header utility */
.worklist-header, .bpt-grid-header { background-color: var(--mud-palette-primary) !important; color: var(--mud-palette-primary-text) !important; }

/* Full-width grid layout utility */
.bpt-grid { width: 100%; }
/* Sparse/few-column grids: MudBlazor ColumnResizeMode="ResizeMode.Container" inlines
   `width: max-content` on .mud-table-container, shrinking the grid to its content.
   The inline value can only be beaten by an !important author rule; forcing the
   container to 100% restores edge-to-edge width while wide grids still scroll inside
   (MudBlazor keeps overflow-x:auto inline). Kept in sync with bpt-utilities.css. */
.bpt-grid .mud-table-container { width: 100% !important; }
.bpt-grid .mud-table-root { width: 100%; min-width: 100%; table-layout: auto; }
