/* =============================================================================
   FBDock — MudBlazor "Apple-clean" overlay
   Loaded AFTER MudBlazor.min.css so single-class rules win by load order.
   Pulls stock Material components toward the design system in tokens.css:
   frosted-glass chrome, soft multi-layer shadows, generous radius, hairline
   borders, non-uppercase buttons, calm tables. Colors come from the MudBlazor
   palette (Theme/FBDockTheme.cs) via --mud-palette-*; spacing/radius/shadow/motion
   come from tokens.css via --space-*/--radius-*/--shadow-*/--ease-*.
   ============================================================================= */

/* ---- Global motion & rendering ----------------------------------------- */
.mud-typography,
.mud-button-root,
.mud-nav-link,
.mud-table-row,
.mud-paper,
.mud-chip {
  -webkit-font-smoothing: antialiased;
}

/* Soften Material's harsh elevation ladder to the token shadow scale.
   (Single-class selectors — later load order beats MudBlazor's own.) */
.mud-elevation-1  { box-shadow: var(--shadow-sm); }
.mud-elevation-2  { box-shadow: var(--shadow-sm); }
.mud-elevation-3  { box-shadow: var(--shadow-md); }
.mud-elevation-4  { box-shadow: var(--shadow-md); }
.mud-elevation-5,
.mud-elevation-6  { box-shadow: var(--shadow-lg); }
.mud-elevation-8,
.mud-elevation-9,
.mud-elevation-10,
.mud-elevation-12 { box-shadow: var(--shadow-lg); }
.mud-elevation-16,
.mud-elevation-24 { box-shadow: var(--shadow-xl); }

/* =========================================================================
   APP SHELL — frosted-glass top bar + sidebar
   ========================================================================= */
.mud-appbar {
  background-color: var(--glass-bg) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none !important;
  color: var(--mud-palette-text-primary);
}
.mud-appbar .mud-toolbar { min-height: 56px; }

/* Wordmark in the app bar */
.mud-appbar .mud-typography-h6 {
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
}

.mud-drawer {
  background-color: var(--glass-bg) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
}

/* ---- Nav links: rounded "pill" rows with an accent-tinted active state ---- */
.mud-navmenu { padding: var(--space-2); }
.mud-navmenu .mud-nav-link {
  border-radius: var(--radius-md);
  margin: 2px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  font-weight: var(--fw-medium);
  color: var(--mud-palette-text-secondary);
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.mud-navmenu .mud-nav-link:hover {
  background-color: var(--bg-hover);
  color: var(--mud-palette-text-primary);
}
.mud-navmenu .mud-nav-link .mud-nav-link-icon {
  color: var(--mud-palette-text-tertiary, var(--text-tertiary));
  transition: color var(--dur-fast) var(--ease-out);
}
.mud-navmenu .mud-nav-link.active {
  background-color: var(--accent-subtle);
  color: var(--mud-palette-primary);
  font-weight: var(--fw-semibold);
}
.mud-navmenu .mud-nav-link.active::before { display: none; }  /* kill Material left-bar */
.mud-navmenu .mud-nav-link.active .mud-nav-link-icon { color: var(--mud-palette-primary); }

/* Page content canvas */
.mud-main-content { background-color: var(--mud-palette-background); }

/* =========================================================================
   SURFACES — cards, paper, panels
   ========================================================================= */
.mud-paper {
  border-radius: var(--radius-xl);
  background-image: none;
}
.mud-paper-outlined {
  border: 1px solid var(--border-subtle);
}
.mud-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.mud-card:hover { box-shadow: var(--shadow-md); }

/* Expansion panels (stacks, groups) */
.mud-expansion-panels .mud-expand-panel { border-radius: var(--radius-lg); }

/* =========================================================================
   BUTTONS — non-uppercase, 10px radius, calm hover
   ========================================================================= */
.mud-button-root {
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  border-radius: var(--radius-md);
  font-weight: var(--fw-medium);
  transition: background-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.mud-button-root:active { transform: scale(0.98); }
.mud-button-filled { box-shadow: var(--shadow-xs); }
.mud-button-filled:hover { box-shadow: var(--shadow-sm); }
.mud-button-filled.mud-button-filled-primary:hover { background-color: var(--accent-hover); }

/* Icon buttons — subtle circular hover */
.mud-icon-button { border-radius: var(--radius-full); transition: background-color var(--dur-fast) var(--ease-out); }

/* =========================================================================
   CHIPS — pill shape, status chips tuned in the component itself
   ========================================================================= */
.mud-chip { border-radius: var(--radius-full); font-weight: var(--fw-medium); }

/* =========================================================================
   TABLES — calm, roomy, Apple data-table feel
   ========================================================================= */
.mud-table.mud-table-outlined { border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); }
.mud-table { background-color: var(--mud-palette-surface); }
.mud-table-container { border-radius: inherit; }
.mud-table .mud-table-head .mud-table-cell {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--mud-palette-text-secondary);
  border-bottom: 1px solid var(--border-default);
}
.mud-table .mud-table-body .mud-table-cell {
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 10px;
  padding-bottom: 10px;
}
.mud-table-hover .mud-table-row:hover { background-color: var(--bg-hover) !important; }
.mud-table-row { transition: background-color var(--dur-fast) var(--ease-out); }
/* Align numeric columns */
.mud-table-cell .fb-tabular, .mud-table-cell.fb-num { font-variant-numeric: tabular-nums; }

/* =========================================================================
   TABS — thin accent indicator, no uppercase
   ========================================================================= */
.mud-tabs .mud-tab {
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  font-weight: var(--fw-medium);
  min-width: unset;
}
.mud-tabs .mud-tab-slider { border-radius: var(--radius-full); height: 2px; }

/* Tame MudTabs Color="Primary" filled header bar → clean underline tabs (Apple-style).
   The filled bar sets white tab text for contrast; once the bar is transparent we must
   restore readable text colors and let the 2px slider be the only active indicator. */
.mud-tabs-tabbar {
  background-color: transparent !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--border-subtle);
}
.mud-tabs-tabbar .mud-tab { color: var(--mud-palette-text-secondary); }
.mud-tabs-tabbar .mud-tab.mud-tab-active { color: var(--mud-palette-primary); }
.mud-tabs-tabbar .mud-tab:hover { color: var(--mud-palette-text-primary); }

/* =========================================================================
   INPUTS — soft radius, accent focus
   ========================================================================= */
.mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: var(--radius-sm); }
.mud-input-control { border-radius: var(--radius-sm); }

/* =========================================================================
   OVERLAYS — menus, popovers, dialogs, tooltips
   ========================================================================= */
.mud-popover {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}
.mud-list-item { border-radius: var(--radius-sm); margin: 1px var(--space-1); }
.mud-dialog {
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
}
.mud-tooltip {
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  backdrop-filter: var(--glass-blur);
}
.mud-snackbar { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* =========================================================================
   ALERTS
   ========================================================================= */
.mud-alert { border-radius: var(--radius-lg); }

/* =========================================================================
   FBDock-specific group bands (app.css uses these; refine to pill-inset look)
   ========================================================================= */
.fbdock-group-header { border-radius: var(--radius-sm); }

/* =========================================================================
   FBDock dashboard components — gauges, chart hosts, KPI helpers
   ========================================================================= */
.fb-chart { width: 100%; }

/* Radial gauge (Components/Shared/RadialGauge.razor) */
.fb-gauge { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.fb-gauge-svg { display: block; }
.fb-gauge-track { stroke: var(--bg-sunken); }
:root[data-theme="dark"] .fb-gauge-track { stroke: var(--bg-active); }
.fb-gauge-value { transition: stroke-dashoffset var(--dur-slow) var(--ease-out); }
.fb-gauge-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px; pointer-events: none;
}
.fb-gauge-num {
  font-weight: var(--fw-semibold); line-height: 1;
  font-size: 1.35rem; color: var(--mud-palette-text-primary);
}
.fb-gauge-label {
  font-size: var(--text-xs); color: var(--mud-palette-text-secondary);
  text-transform: uppercase; letter-spacing: var(--tracking-wide); margin-top: 2px;
}

/* KPI / stat-card helpers */
.fb-eyebrow {
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--mud-palette-text-secondary);
}
.fb-metric {
  font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.fb-metric-lg { font-size: var(--text-3xl); }
.fb-metric-xl { font-size: var(--text-4xl); }
.fb-metric-sub { color: var(--mud-palette-text-secondary); font-size: var(--text-sm); }

/* A soft tinted icon badge for stat tiles */
.fb-badge {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
}
.fb-badge .mud-icon-root { font-size: 1.35rem; }
.fb-badge-accent  { background: var(--accent-subtle); color: var(--mud-palette-primary); }
.fb-badge-success { background: var(--success-bg); color: var(--success); }
.fb-badge-warning { background: var(--warning-bg); color: var(--warning); }
.fb-badge-error   { background: var(--error-bg);   color: var(--error); }
.fb-badge-neutral { background: var(--bg-hover);   color: var(--mud-palette-text-secondary); }

/* Hero stat card gets a touch more presence */
.fb-card-pad { padding: var(--space-5); }
.fb-dash-section-title {
  font-size: var(--text-md); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-snug); color: var(--mud-palette-text-primary);
}

/* ---- Reusable card surface (used across the dashboard) ------------------ */
.fb-surface {
  background: var(--mud-palette-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}

/* ---- KPI tiles — clickable, lift on hover ------------------------------ */
.fb-kpi { cursor: pointer; }
.fb-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-default);
}
.fb-kpi:active { transform: translateY(0); }
.fb-chevron { color: var(--mud-palette-text-disabled); font-size: 1.1rem !important; }

/* ---- "Live" pulse dot -------------------------------------------------- */
.fb-live-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: fb-pulse 2s var(--ease-out) infinite;
}
@keyframes fb-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--success) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 0%, transparent); }
}

/* ---- Key/value rows (host info, df breakdown) -------------------------- */
.fb-kv-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.fb-kv-row:last-child { border-bottom: none; }
.fb-kv-k { color: var(--mud-palette-text-secondary); font-size: var(--text-sm); flex-shrink: 0; }
.fb-kv-v {
  color: var(--mud-palette-text-primary); font-size: var(--text-sm); font-weight: var(--fw-medium);
  text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Compact container list (dashboard quicklist) ---------------------- */
.fb-list { display: flex; flex-direction: column; }
.fb-list-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-3); margin: 0 calc(var(--space-3) * -1);
  border-radius: var(--radius-md); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.fb-list-row + .fb-list-row { border-top: 1px solid var(--border-subtle); }
.fb-list-row:hover { background: var(--bg-hover); }
.fb-list-title { font-weight: var(--fw-medium); color: var(--mud-palette-text-primary); }
.fb-list-sub { font-size: var(--text-xs); color: var(--mud-palette-text-secondary); }

/* =========================================================================
   Page scaffolding — headers, toolbars, empty states (all list/detail pages)
   ========================================================================= */
.fb-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6);
}
.fb-page-title { margin: 2px 0 0 !important; }
.fb-page-subtitle { color: var(--mud-palette-text-secondary); font-size: var(--text-sm); margin-top: 4px; }
.fb-page-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

.fb-toolbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }

/* Table wrapped in a card surface: rounded, hairline, soft shadow */
.fb-table-wrap { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm); }
.fb-table-wrap .mud-table { border-radius: 0; box-shadow: none; }

/* Centered empty / error state card */
.fb-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: var(--space-2); padding: var(--space-16) var(--space-6);
}
.fb-empty-icon {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-hover); color: var(--mud-palette-text-secondary); margin-bottom: var(--space-2);
}

/* =========================================================================
   Buttons / inputs used outside MudBlazor (e.g. the login form)
   ========================================================================= */
.fb-btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  background: var(--accent); color: var(--accent-contrast, #fff);
  border: none; border-radius: var(--radius-md); padding: 10px var(--space-4);
  font-family: inherit; font-size: var(--text-base); font-weight: var(--fw-semibold); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.fb-btn-accent:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.fb-btn-accent:active { transform: scale(0.98); }
.fb-btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }
.fb-btn-block { width: 100%; }

.fb-input {
  width: 100%; box-sizing: border-box; padding: 10px var(--space-3);
  border-radius: var(--radius-sm); border: 1px solid var(--border-default);
  background: var(--bg-elevated); color: var(--mud-palette-text-primary);
  font-family: inherit; font-size: var(--text-base);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.fb-input::placeholder { color: var(--mud-palette-text-disabled); }
.fb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* =========================================================================
   Login screen
   ========================================================================= */
.fb-login-card {
  width: 100%; max-width: 380px; margin: var(--space-4);
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); padding: var(--space-8);
}
.fb-login-brand {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6);
}
.fb-login-mark {
  width: 60px; height: 60px; border-radius: var(--radius-lg);
  background: #fff; object-fit: contain; padding: 6px;
  box-shadow: var(--shadow-md); border: 1px solid var(--border-subtle);
}
.fb-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.fb-field label { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--mud-palette-text-secondary); }

/* Leading icon treatment for plain-HTML .fb-input fields (e.g. the Login form) —
   MudTextField gets its leading icon via Adornment="Adornment.Start"; this is the
   CSS-only equivalent for inputs that are NOT MudBlazor components. */
.fb-field-input { position: relative; }
.fb-field-input > .fb-field-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--mud-palette-text-secondary); pointer-events: none;
}
.fb-field-input > .fb-input { padding-left: 38px; }

/* =========================================================================
   Filter chip-set (list pages) — selected chip reads as an accent pill
   ========================================================================= */
.fb-filterset .mud-chip { border: 1px solid var(--border-default); background: transparent; }
.fb-filterset .mud-chip.mud-chip-selected { background: var(--accent-subtle); border-color: transparent; color: var(--mud-palette-primary); }

/* Group header band in grouped tables */
.fbdock-group-header .mud-chip { background: var(--bg-hover); }

/* =========================================================================
   MOBILE / RESPONSIVE  (phones — iPhone 16 Pro Max ≈ 430 CSS px wide)
   -------------------------------------------------------------------------
   Everything below is gated behind `@media (max-width: 640px)` so DESKTOP
   appearance is untouched. The drawer itself is handled in MainLayout.razor
   (DrawerVariant.Responsive + Breakpoint.Md → overlay below 960px). These
   rules stop content from forcing the PAGE to scroll sideways: wide tables
   scroll inside their own card, padding tightens, headers/titles shrink, and
   dialogs are clamped to the viewport.
   ========================================================================= */
@media (max-width: 640px) {

  /* ---- 1. Wide data tables scroll INSIDE their card (never the page) -----
     Desktop clips overflow (`overflow: hidden`) to keep rounded corners; on
     phones the dense multi-column tables (Containers/Images/Volumes/Networks/
     Stacks/Audit) are wider than 430px, so let the card + inner table
     container scroll horizontally instead of clipping columns. */
  .fb-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .fb-table-wrap .mud-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 2. Tighter content & card padding -------------------------------- */
  .mud-main-content .mud-container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    /* belt-and-suspenders: an auto-height block, so clipping stray horizontal
       overflow here can't create a sideways page scroll (no y-scrollbar). */
    overflow-x: hidden;
  }
  .pa-5 { padding: var(--space-4) !important; }
  .fb-card-pad { padding: var(--space-4); }

  /* ---- 3. Page header: smaller title, actions already wrap via flex ------ */
  .fb-page-header { margin-bottom: var(--space-4); }
  .fb-page-title { font-size: var(--text-2xl) !important; }

  /* ---- 5. Dialogs never exceed the viewport ----------------------------- */
  .mud-dialog {
    max-width: calc(100vw - var(--space-6));
    margin: var(--space-3);
  }

  /* ---- Editors/terminals: keep Monaco & xterm width-bounded so the wide
     editor scrolls INTERNALLY and never pushes the page sideways. --------- */
  .monaco-editor-container,
  .monaco-editor,
  #term-panel,
  #stack-deploy-term {
    max-width: 100%;
  }
}

/* =========================================================================
   MOBILE — DATA TABLES AS A CARD PER ROW  (phones only)
   -------------------------------------------------------------------------
   MudBlazor 9 switches each list table to its small-device layout, but — per
   the SHIPPED CSS (MudBlazor.min.css) — that layout is gated by MudBlazor's
   own `@media (max-width: 600px)`, NOT 640px: the `.mud-xs-table` class is on
   the table at every size, but the stacking rules (hide the header row, stack
   each cell as a flex line, and render the column name from each cell's
   `DataLabel` via `::before { content: attr(data-label) }`) only activate ≤600px.
   We therefore scope this block to `@media (max-width: 600px)` so our cards
   coincide EXACTLY with MudBlazor's stacked mode — using 640px here would leave
   a 601–640px band where our rows card up but MudBlazor's labels/flex are still
   off (a broken half-card). Everything is additionally scoped under
   `.fb-table-wrap .mud-xs-table` so only these app tables are touched (never the
   nested MudSimpleTable in the Stacks child row, which is not `.mud-xs-table`).
   Group-header rows (ContainerList) and the Stacks expandable child row are
   excluded via :not(:has(…)) so they stay separators, not cards.
   ========================================================================= */
@media (max-width: 600px) {

  /* Strip the outer table frame so the per-row cards read on the page bg
     (the frame + per-row borders would otherwise double up). */
  .fb-table-wrap:has(.mud-xs-table) {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .fb-table-wrap .mud-xs-table.mud-table { background: transparent; }

  /* Header row is redundant once each cell carries its own DataLabel. */
  .fb-table-wrap .mud-xs-table .mud-table-head { display: none; }
  .fb-table-wrap .mud-xs-table .mud-table-body { border-top: none; }

  /* Each data row → a card. Exclude the grouped / expandable structural rows. */
  .fb-table-wrap .mud-xs-table .mud-table-body
    .mud-table-row:not(:has(.fbdock-group-header)):not(:has(.fbdock-child-cell)) {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-sm);
  }

  /* Each cell → a muted "label : value" line. overflow-wrap keeps long image
     names / port maps from forcing a sideways scroll (the whole point). */
  .fb-table-wrap .mud-xs-table .mud-table-body
    .mud-table-cell:not(.fbdock-group-header):not(.fbdock-child-cell) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-width: 0;
    border: none !important;
    padding: 6px 0 !important;
    text-align: right !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* The DataLabel (MudBlazor's ::before) → muted, left-aligned, never shrinks. */
  .fb-table-wrap .mud-xs-table .mud-table-body
    .mud-table-cell:not(.fbdock-group-header):not(.fbdock-child-cell)::before {
    color: var(--mud-palette-text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    text-align: left;
    flex-shrink: 0;
    padding-right: var(--space-3);
    padding-inline-end: var(--space-3);
  }

  /* First cell (the Name column) gets a bit more weight on its value. */
  .fb-table-wrap .mud-xs-table .mud-table-body
    .mud-table-row
    .mud-table-cell:first-child:not(.fbdock-group-header):not(.fbdock-child-cell) {
    font-weight: var(--fw-semibold);
    font-size: var(--text-sm);
  }

  /* Group-header rows (ContainerList) stay a full-width separator band. */
  .fb-table-wrap .mud-xs-table .mud-table-body
    .mud-table-row:has(.fbdock-group-header) {
    display: block;
    margin: var(--space-4) 0 var(--space-2);
  }
  .fb-table-wrap .mud-xs-table .fbdock-group-header {
    display: flex;
    padding: 0 !important;
    border: none !important;
  }
  .fb-table-wrap .mud-xs-table .fbdock-group-header::before { content: none; }

  /* Stacks expandable child row stays nested detail content, not a card; its
     inner MudSimpleTable scrolls internally so it can't widen the page. */
  .fb-table-wrap .mud-xs-table .mud-table-body
    .mud-table-row:has(.fbdock-child-cell) {
    display: block;
  }
  .fb-table-wrap .mud-xs-table .fbdock-child-cell {
    display: block;
    padding: 0 !important;
    border: none !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .fb-table-wrap .mud-xs-table .fbdock-child-cell::before { content: none; }
}
