/* Accounts table (/panel/users) — page-scoped EDS bridge additions.
   Owner: u04. Loads after eds-panel.css and eds-filament-theme.css; scoped
   under .fi-resource-users (Filament's own ListRecords::getPageClasses()
   wrapper class) so nothing here leaks onto another resource's table.

   The table is wider than its card at ordinary desktop widths (~1857px of
   content vs a ~1456px card at 1600px viewport, still short at 1920px) and
   the shared bridge already gives `.fi-ta-content-ctn` a visible scrollbar
   for that — but the trailing actions cell (Impersonate + the ⋮ group) sits
   past the fold with nothing pinning it in view, so a normal-width visit
   never discovers those controls exist. Pin that one cell; leave every
   other column's native scroll behavior untouched. Desktop table layout
   only (min-width guards the mobile stacked-card renderer, which has no
   .fi-ta-cell to pin). */
@media (min-width: 640px) {
    .fi-resource-users .fi-ta-cell:has(.fi-ta-actions) {
        position: sticky;
        right: 0;
        z-index: 1;
        background: var(--paper);
        box-shadow: -1px 0 0 var(--line);
    }
    .fi-resource-users .fi-ta-actions-header-cell {
        position: sticky;
        right: 0;
        z-index: 1;
        box-shadow: -1px 0 0 var(--line);
    }

    /* Match the row's own fill so the pinned cell doesn't desync from the
       row it belongs to — same states the shared bridge already paints on
       tr.fi-ta-row (eds-filament-theme.css § Tables), pre-mixed onto a
       solid base since a sticky cell must occlude the content scrolling
       underneath it rather than let it show through. */
    .fi-resource-users tr.fi-ta-row.fi-striped .fi-ta-cell:has(.fi-ta-actions) {
        background: var(--cream);
    }
    .fi-resource-users tr.fi-ta-row.fi-clickable:hover .fi-ta-cell:has(.fi-ta-actions) {
        background: color-mix(in srgb, var(--psoft) 55%, var(--paper));
    }
    .fi-resource-users tr.fi-ta-row.fi-striped.fi-clickable:hover .fi-ta-cell:has(.fi-ta-actions) {
        background: color-mix(in srgb, var(--psoft) 55%, var(--cream));
    }
    .fi-resource-users tr.fi-ta-row.fi-selected .fi-ta-cell:has(.fi-ta-actions) {
        background: var(--psoft);
    }
}

/* The Source column renders one short word ("—" / "Google Ads") but table-
   layout:auto was handing it ~343px once the table outgrew its card and
   started distributing the surplus across every grow(false) column instead
   of respecting the intent. Capping it reclaims that dead space for the
   columns that actually need it. Desktop table layout only — below 640px
   this same `<td>` becomes a full-width block row in the vendor's stacked-
   card mobile layout (table.css § .fi-ta-table-stacked-on-mobile), where a
   max-width would just shrink the row for no reason. */
@media (min-width: 640px) {
    .fi-resource-users .fi-ta-cell-source,
    .fi-resource-users .fi-ta-header-cell-source {
        max-width: 160px;
    }
}
