/* SelectForge global styles
   Colors use var(--mud-palette-*) tokens generated at runtime by MudThemeProvider.
   Those tokens reflect the Primary/Secondary colors stored in AppSettings (DB).
   Do not hardcode color hex values in this file. */

/* ── MudBlazor runtime tokens (declared here so IDEs can resolve them) ───── */
:root {
    --mud-palette-primary: initial;
    --mud-palette-secondary: initial;
    --mud-palette-background: initial;
    --mud-palette-background-grey: initial;
    --mud-palette-surface: initial;
    --mud-palette-text-primary: initial;
    --mud-palette-text-secondary: initial;
    --mud-palette-text-disabled: initial;
    --mud-palette-warning: initial;
    --mud-palette-warning-text: initial;
    --mud-palette-error: initial;
    --mud-palette-error-text: initial;
    --mud-palette-success: initial;
    --mud-palette-success-text: initial;
    --mud-palette-info: initial;
    --mud-palette-info-text: initial;
    --mud-palette-divider: initial;
    --mud-palette-lines-default: initial;
    --mud-palette-table-hover: initial;
    --mud-palette-action-disabled: initial;
    --mud-palette-action-disabled-background: initial;
    --mud-elevation-1: initial;
    --mud-elevation-2: initial;
    --mud-elevation-4: initial;
    --mud-elevation-8: initial;
}

/* ── Calculator page centering ───────────────────────────────────────────
   Only applies to pages that add the .calculator-page class. */
.calculator-page {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Drawer / main content layout ────────────────────────────────────────
   Ensure main content area respects the MudDrawer width on desktop. */
@media (min-width: 1280px) {
    .mud-drawer--open ~ .mud-main-content {
        margin-left: 256px !important;
    }

    .mud-drawer--closed ~ .mud-main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 1279px) {
    .mud-drawer--open ~ .mud-main-content,
    .mud-drawer--closed ~ .mud-main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ── Active navigation links ─────────────────────────────────────────────
   MudBlazor automatically switches --mud-palette-primary between light and
   dark palette values when IsDarkMode changes on MudThemeProvider, so a
   single token covers both modes. */
.app-light-mode .mud-nav-item .mud-nav-link.active[aria-current="page"] .mud-nav-link-text,
.app-dark-mode  .mud-nav-item .mud-nav-link.active[aria-current="page"] .mud-nav-link-text {
    color: var(--mud-palette-secondary) !important;
}

/* Outlined green chips (e.g. "Verified"): the theme's success green is a fill color, so as text it's too pale
   on the light surface and too dark on the dark one. Darker green in light mode, lighter green in dark mode. */
.app-light-mode .mud-chip-outlined.mud-chip-color-success {
    color: color-mix(in srgb, var(--mud-palette-success) 70%, black);
    border-color: color-mix(in srgb, var(--mud-palette-success) 70%, black);
}
.app-dark-mode .mud-chip-outlined.mud-chip-color-success {
    color: color-mix(in srgb, var(--mud-palette-success) 55%, white);
    border-color: color-mix(in srgb, var(--mud-palette-success) 55%, white);
}

/* Reset non-active links to the drawer's own text color */
.mud-nav-item .mud-nav-link:not(.active) .mud-nav-link-text {
    color: var(--mud-palette-drawer-text) !important;
}

/* ── Admin sidebar sub-group labels (UX audit M8) ────────────────────────
   Sub-headers inside a MudNavGroup. Visually subordinate to the parent
   group label, non-interactive, and indented to match nav-link gutter. */
.sf-nav-subheader {
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.6;
    color: var(--mud-palette-drawer-text);
    padding: 12px 16px 4px 24px;
    user-select: none;
    pointer-events: none;
}
.sf-nav-subheader:first-child {
    padding-top: 4px;
}

/* Non-selectable group header inside a grouped table-picker dropdown (a disabled
   MudSelectItem). Reads as a caption/subheader rather than a dimmed option. */
.mud-list-item.sf-group-header {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}
.mud-list-item.sf-group-header:not(:first-child) {
    margin-top: 4px;
    border-top: 1px solid var(--mud-palette-lines-default);
}


/* ── Stepper header hiding (Request Access / Registration pages) ──────────
   MudStepper renders a header row we suppress via CSS on specific steppers. */
.request-access-stepper .mud-stepper-header,
.request-access-stepper .mud-stepper-nav,
.request-access-stepper > .mud-stepper-header,
.request-access-stepper .mud-paper > div:first-child,
.mud-stepper.request-access-stepper > div:first-of-type,
.register-stepper .mud-stepper-header,
.register-stepper .mud-stepper-nav,
.register-stepper > .mud-stepper-header,
.register-stepper .mud-paper > div:first-child,
.mud-stepper-header,
[class*="mud-stepper-header"] {
    display: none !important;
    max-height: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
}

.request-access-stepper > :first-child:not(.mud-stepper-content),
.register-stepper > :first-child:not(.mud-stepper-content) {
    display: none !important;
}

.request-access-stepper,
.register-stepper {
    padding-top: 0 !important;
    margin-top: 16px !important;
}

/* ── Branded paper accent ────────────────────────────────────────────────
   Add a left accent bar in the current primary color. */
.mud-paper.sf-branded {
    border-left: 4px solid var(--mud-palette-primary);
}

/* ── Shared page header metadata grid (L4) ──────────────────────────────
   Renders the SfPageHeader's MetadataContent as a key/value definition list
   that scans at a glance. Labels are subordinate (caption-sized, secondary
   color); values are primary text. Falls back to single-column stacking at
   narrow widths. Use via `<dl class="sf-meta-grid">` inside MetadataContent. */
.sf-meta-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 16px;
    row-gap: 4px;
    margin: 0;
}

/* Small uppercase label above a value, used in the project Details card's responsive field grid. */
.sf-field-label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1px;
}

.sf-meta-grid dt {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    align-self: center;
}

.sf-meta-grid dd {
    margin: 0;
    color: var(--mud-palette-text-primary);
    font-size: 0.875rem;
}

@media (max-width: 599px) {
    .sf-meta-grid {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }
    .sf-meta-grid dt {
        margin-bottom: 0;
    }
}

/* ── Revision editor frame (Selections) ─────────────────────────────────
   The save/context bar sticks to the viewport (offset by the app bar) — the
   page is the single scroll owner, so the bar stays reachable through a long
   calculator form. H6 reference: SelectForge/docs/temp/ux_audit/H6-*.md. */
.sf-revision-editor {
    /* Clip children to the card's rounded corners so the sticky bars show the card's
       rounded corners when at rest and go square/flush when pinned. overflow: clip (not
       hidden) does NOT create a scroll container, so it won't trap the sticky bars. */
    overflow: clip;
}

/* Derived (auto-computed) numeric inputs render ReadOnly rather than Disabled so out-of-range values still
   flag red; mute the value so the field still reads as "locked". The error styling sits above this. */
.sf-derived-input .mud-input-slot { opacity: 0.6; }

/* Out-of-range numeric input: red outline + label + helper message, applied from the model (MudBlazor's own
   Error param is unreliable here — it gets cleared by the field's internal validation on the edited field). The
   validation message rides in the HelperText slot, so colour that red too. */
.sf-field-error .mud-input-outlined-border { border-color: var(--mud-palette-error) !important; }
.sf-field-error .mud-input-label { color: var(--mud-palette-error) !important; }
.sf-field-error .mud-input-helper-text { color: var(--mud-palette-error) !important; }
/* Colour the value text red too — e.g. an out-of-range number reads red, not just the outline. */
.sf-field-error input.mud-input-slot,
.sf-field-error .mud-input-slot { color: var(--mud-palette-error) !important; }
.sf-revision-editor__bar {
    position: sticky;
    top: 64px; /* app bar height (desktop) */
    background: var(--mud-palette-surface);
    z-index: 2;
}
/* The app bar is 56px on mobile (Material), so pin the bar flush under it — no gap. */
@media (max-width: 599.98px) {
    .sf-revision-editor__bar {
        top: 56px;
    }
}

/* Action group in the Selection bar (and the project page's Selections bar, .sf-actions-bar): a wrapping row of
   buttons at >=600px. */
.sf-actions {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
/* Phones (xs): the product-line row and the action batch each span the bar's full width (so the chevron sits
   at the right edge), and the revealed actions stack edge-to-edge, one full-width item per row. */
@media (max-width: 599.98px) {
    .sf-revision-editor__bar > *, .sf-actions-bar > * { width: 100%; }
    .sf-actions {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }
    .sf-actions > * { width: 100%; }
    /* Multi-format document buttons (e.g. the Submittal's PDF/Word menu) render as a MudMenu whose
       inner activator button doesn't inherit the wrapper's full width — stretch it so it spans the row. */
    .sf-actions .mud-menu > .mud-button-root { width: 100%; }
    /* The Documents / View options popover anchors stretch the same way. */
    .sf-actions .sf-popover-anchor { display: flex; }
    .sf-actions .sf-popover-anchor > .mud-button-root { width: 100%; }
    /* Unsaved-changes cue + Revert split their (full-width) row 50/50 once stacked on phones. */
    .sf-unsaved-row > * { flex: 1 1 0; min-width: 0; }
    .sf-unsaved-row .mud-button-root { width: 100%; }
}

/* ── Selector sticky stacking section headers ───────────────────────────
   Each section header pins below the action bar and STACKS beneath the headers
   above it as you scroll, so all section headers end up visible at the top; the
   section's rows scroll up under its own header. Click a header to scroll to it.
     --sf-stack-top : where the first header pins = app bar + action bar height.
                      The host measures its action bar and sets this on the card;
                      the default is a sane "app bar + one bar row" fallback.
     --i            : the header's 0-based index in the section order (set inline).
     --sf-hdr-h     : uniform header height (so the stack offsets line up). */
/* Non-sticky scroll anchor at each section's true start. scrollIntoView targets this — a pinned sticky
   header reports the pinned position, so scrolling UP to it wouldn't move. scroll-margin-top lands the
   section just below the headers stacked above it. */
/* --sf-hdr-h is the FULL header height; --sf-hdr-pitch-top is the condensed pitch BOTH stacks use, so every
   non-current header (condensed via JS, see selectforge.js) tiles tightly — passed ones at the top, upcoming
   ones at the bottom. Only the current section's header (its content on screen) is full height. */
:root { --sf-hdr-pitch-top: 30px; }
/* Optional selector tab strip — put sf-selector-tabs on the strip ITSELF (e.g. MudTabs TabHeaderClass), not the
   whole tabs component. It pins under the action bar / app bar (--sf-tabs-top, published by measureStack), and
   measureStack adds its height to --sf-stack-top so the section headers pin and stack below it. */
.sf-selector-tabs {
    position: sticky;
    top: var(--sf-tabs-top, 64px);
    z-index: 2;                              /* with the action bar: above the section headers (1) */
    background-color: var(--mud-palette-surface);
}
/* The active tab and its slider take the accent (Secondary) rather than MudBlazor's Primary: the theme tunes Primary
   for fills (buttons, the app bar), and in dark mode it reads too dark as text. */
.sf-selector-tabs .mud-tab-active { color: var(--mud-palette-secondary); }
.sf-selector-tabs .mud-tab-active:hover { background-color: var(--mud-palette-secondary-hover); }
.sf-selector-tabs .mud-tab-slider { background: var(--mud-palette-secondary); }
.sf-section-anchor {
    scroll-margin-top: calc(var(--sf-stack-top, 120px) + var(--i, 0) * var(--sf-hdr-pitch-top, 30px));
}
/* The flush-top (first) header is pulled up by --sf-host-pad, so its anchor sits that much BELOW the header.
   Add it back to the scroll-margin so clicking the first section lands it flush under the bar instead of
   over-scrolling and tucking the top of its content under the header. */
.sf-section-anchor.sf-section-anchor--flush-top {
    scroll-margin-top: calc(var(--sf-stack-top, 120px) + var(--i, 0) * var(--sf-hdr-pitch-top, 30px) + var(--sf-host-pad, 16px));
}
.sf-section-header {
    position: sticky;
    /* Passed sections pin to the TOP, stacking by index on the condensed pitch (passed headers condense). */
    top: calc(var(--sf-stack-top, 120px) + var(--i, 0) * var(--sf-hdr-pitch-top, 30px));
    /* Upcoming sections pin to the BOTTOM (above the Grand Total), stacking in reverse so they read in
       order; each moves to the top stack as you scroll past it. --n = section count, --sf-stack-bottom =
       the Grand Total bar height. A sticky box with both insets sticks to whichever edge its section is off.
       The -1px makes the bottom-most header overlap the Grand Total by 1px so its border-bottom and the
       Grand Total's border-top coincide into a single line instead of a double-weight divider (the equal
       shift keeps header-to-header boundaries single too). */
    bottom: calc(var(--sf-stack-bottom, 64px) - 1px + (var(--n, 4) - 1 - var(--i, 0)) * var(--sf-hdr-pitch-top, 30px));
    z-index: 1;                              /* above section content, below the action bar (2) */
    box-sizing: border-box;
    height: var(--sf-hdr-h, 44px);
    transition: height 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    /* Brand-primary bar (matches the app bar) so the headers stand out from the surface-coloured content;
       primary-darken separates stacked bars. */
    /* A quarter of the navbar's contrast against the card: lightness 25% of the way from the card (surface)
       toward the navbar (primary) — color-mix in oklch shifts L by 25%. Text auto-adapts to the theme
       (near-black on a light theme, near-white on dark). */
    background-color: var(--mud-palette-surface);   /* fallback if color-mix is unsupported */
    background-color: color-mix(in oklch, var(--mud-palette-surface), var(--mud-palette-primary) 25%);
    color: var(--mud-palette-text-primary);
    /* Divider matches the card background so stacked bars read as separated by a thin card-coloured gap. */
    border-bottom: 1px solid var(--mud-palette-surface);
    cursor: pointer;
    user-select: none;
    /* Break out to the host card edges (like the action/total bars), then re-pad inside. */
    margin-left: calc(-1 * var(--sf-host-pad, 16px));
    margin-right: calc(-1 * var(--sf-host-pad, 16px));
    padding-left: var(--sf-host-pad, 16px);
    padding-right: var(--sf-host-pad, 16px);
}
.sf-section-header:hover { background-color: color-mix(in oklch, var(--mud-palette-surface), var(--mud-palette-primary) 40%); }
.sf-section-header:focus-visible { outline: 2px solid var(--mud-palette-text-primary); outline-offset: -2px; }
.sf-section-header__title { font-weight: 500; }
/* A pinned header condenses (JS toggles this) once its section's content has scrolled past the stack — it
   shrinks to the top-stack pitch so the accumulated headers stay compact. Height transitions for a smooth feel. */
.sf-section-header.sf-section-header--condensed { height: var(--sf-hdr-pitch-top, 30px); }
/* First section header butts against the host card's top edge: pull up by the card's padding so there's no
   gap above the selector (the action bar sits directly on the first header). --sf-host-pad is set per host. */
.sf-section-header.sf-section-header--flush-top { margin-top: calc(-1 * var(--sf-host-pad, 16px)); }

/* The selector's sticky Grand Total bar butts against the host card's BOTTOM edge — pull down by the card's
   padding (mirrors the full-bleed horizontal margins set inline on the bar). Over-pull a couple extra px so
   sub-pixel rounding of the sticky bar can't leave a thin sliver of the card's surface background showing
   below it; the host's overflow: clip trims the overshoot at the rounded corner, so nothing spills. */
.sf-config-total { margin-bottom: calc(-1 * var(--sf-host-pad, 16px) - 3px); }

/* Grand Total breakdown row on phones: when the $price · ×qty · total detail wraps below its full-width label,
   add breathing room BELOW the detail (between breakdown rows). The top gutter is left as-is. Only applied to
   rows that actually wrap — see OptionsAccessoriesSection. */
@media (max-width: 599.98px) {
    .sf-breakdown-row > .mud-grid-item:not(:first-child) { padding-bottom: 16px; }
}

/* Scrollable breathing room at the end of a section (between its content and the next header). It scrolls
   with the content, so it never opens a gap in the pinned header stack. */
.sf-section-gap { height: 1.25rem; }

/* Clearance below a section header for the first row of fields. MudBlazor's outlined label floats onto the
   top border, so its top half overhangs ABOVE the input box; without this the top row's labels clip under
   the pinned header. Sections that open with a column-header row already have this buffer — this gives the
   field-first sections (Design Conditions) the same. padding (not margin) so the grid's negative gutter
   margin can't swallow it. */
.sf-section-header + .mud-grid { padding-top: 1rem; }

/* MudBlazor's outlined label floats up and overhangs above the input box; text & numeric fields don't
   reserve room for it, so the label clips/crowds the field above. (Selects encapsulate it fine via their
   .mud-select wrapper.) Add just the overhang's worth of top padding to every outlined labelled input EXCEPT
   selects — applies app-wide to MudTextField, MudNumericField, etc. */
.mud-input-control.mud-input-outlined-with-label:not(.mud-select) { padding-top: 0.375rem; }
/* MudAutocomplete shares the .mud-select class on its control (so the rule above skips it) but has the same
   label overhang as a text field. Re-include it via its .mud-autocomplete wrapper — a real select's wrapper
   is just .mud-select (no .mud-autocomplete), so real selects stay excluded. */
.mud-autocomplete .mud-input-control.mud-input-outlined-with-label { padding-top: 0.375rem; }
/* Inline filter row (a text field alongside selects): the text field's overhang padding would drop it below
   the selects (which don't get that padding), so zero it here to keep the row aligned. `sf-filter-row` is the
   flex toolbar variant; `sf-filter-grid` is the same fix for filters laid out in a MudGrid (e.g. Users page). */
.sf-filter-row .mud-input-control.mud-input-outlined-with-label,
.sf-filter-grid .mud-input-control.mud-input-outlined-with-label { padding-top: 0; }

/* A field with its action beside it (text field + button / icon button, e.g. "Token name [Create token]").
   Strips the field's overhang padding and Margin.Dense margins so the input box and the button share one
   centre line, lets the field take the remaining width, and puts the label overhang back on the row instead.
   Use this rather than nudging the button with mt-*. */
.sf-inline-action { display: flex; align-items: center; gap: 8px; }
.sf-inline-action:has(.mud-input-outlined-with-label) { padding-top: 0.375rem; }
.sf-inline-action > .mud-input-control,
.sf-inline-action > .mud-input-control.mud-input-outlined-with-label {
    flex: 1 1 auto; min-width: 0; margin-top: 0; margin-bottom: 0; padding-top: 0;
}
.sf-inline-action > .mud-button-root { flex-shrink: 0; white-space: nowrap; }


/* ── Selections list: project block divider ─────────────────────────────
   The divider sits ABOVE each project row instead of below, so an expanded
   project's main row stays visually attached to its nested selections and the
   line separates one project block from the next. Overrides MudBlazor's
   default per-cell bottom border. */
.sf-project-row > td {
    border-top: 1px solid var(--mud-palette-table-lines);
    border-bottom: none;
}

/* First project sits right under the header's own bottom border — skip its
   top border so the two don't stack into a doubled line. */
.mud-table-body > .sf-project-row:first-child > td {
    border-top: none;
}

/* ── Selections list — responsive ───────────────────────────────────────
   Desktop (> 600px): the projects table and its nested selections table render
   as dense multi-column grids with content-proportional widths computed in
   ColumnSizing.cs and applied to the header cells.
     - Both grids are table-layout:fixed so the computed header widths are honored
       exactly and neither table is influenced by the other's content (the parent
       being fixed-layout is what keeps the nested table from shifting its columns).
     - .sf-projects-grid min-width makes the parent table wider than its container,
       so MudTable's own .mud-table-container is the single horizontal scroller.
     - .sf-selections-grid fits its host cell (width:100%, no min-width) so it never
       overflows — no nested scrollbar.
   Mobile (<= 600px): both tables use MudTable Breakpoint.Xs to stack each row
   into a label:value card. The header widths don't apply (headers are hidden) and
   body cells are forced full width, so cards fit the phone with no horizontal scroll. */
@media (min-width: 601px) {
    .sf-projects-grid .mud-table-root {
        /* width:100% is REQUIRED, not cosmetic: every column width is a plain % (ColumnSizing normalizes the
           columns to ~100%), and in table-layout:fixed a percentage only resolves against a table that has a
           definite width. Without it the columns collapse to equal widths. min-width keeps a scroll floor on
           narrow viewports (the table is max(100% of container, 1200px)). */
        width: 100%;
        min-width: 1200px;
        table-layout: fixed;
    }
    .sf-selections-grid .mud-table-root {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }
    /* Columns are sized to their content (Building Location intentionally to its longest single segment), so
       cells must wrap rather than overflow their fixed width — including a long unbroken token. */
    .sf-projects-grid .mud-table-cell,
    .sf-selections-grid .mud-table-cell {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* Project action icons: a right-aligned flex cluster of non-breaking groups of three. The whole set shows on
   one line when the column is wide enough; when it isn't, the groups wrap as units so it breaks cleanly to
   3 + 3 (never an uneven 5 + 1 / 4 + 2). Selection actions don't use this — their column is sized to always
   fit them on one line. */
.sf-actions-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}
.sf-actions-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

@media (max-width: 600px) {
    /* Stacked cards: ignore the desktop column widths so every cell is full width. */
    .sf-projects-grid .mud-table-body .mud-table-cell,
    .sf-selections-grid .mud-table-body .mud-table-cell {
        width: auto !important;
        max-width: none !important;
    }
}

/* ── Narrow-phone gutter collapse (app-wide) ─────────────────────────────
   On phones the stacked horizontal padding compounds: the shell main-content
   (pa-4, 16px), the MudContainer gutter (~16px), and a top-level card (pa-4,
   16px) total ~48px per side before any content renders — ~96px gone on a
   360px screen. Below the MudBlazor xs breakpoint, taper each layer to a
   single 8px gutter so content reclaims the width, without going flush to the
   screen edge.

   Trialed on the projects page, then promoted app-wide. Card rule targets any
   pa-4 MudPaper, so deeply nested pa-4 cards also shrink — desirable on a phone
   (less compounded padding). Nested pa-2 papers (8px) are already minimal and
   untouched. */
@media (max-width: 599px) {
    .mud-main-content.pa-4 {
        padding-left: 8px !important;
        padding-right: 8px !important;
        /* Match top/bottom to the 8px sides: the shell padding is both the top gap
           (below the app bar) and the bottom gap (below a full-height card). */
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
    .mud-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    /* Drop the per-page extra top margin so the top gap equals the 8px sides. */
    .mud-container.mt-4 {
        margin-top: 0 !important;
    }
    .mud-paper.pa-4 {
        padding: 8px !important;
    }
    /* Grid value cells: uniform 8px all around on phones (matches the header's 8px
       left inset), instead of the desktop aligning insets (lookup 18 / pivot 9). */
    .pd-grid .pd-cell {
        padding: 8px !important;
    }
}

/* ── Revision comparison table (H1) ─────────────────────────────────────
   Side-by-side comparison of 2–4 revisions. The row-label column sticks to
   the left so wide payloads scroll horizontally without losing context, and
   cells that differ between columns get a warning-tinted background. */
.sf-compare__scroll {
    overflow-x: auto;
    max-width: 100%;
}

.sf-compare__table {
    border-collapse: collapse;
    width: 100%;
    min-width: max-content;
    font-size: 0.875rem;
}

.sf-compare__table th,
.sf-compare__table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
    text-align: left;
    vertical-align: top;
}

.sf-compare__rowhead {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 240px;
    border-right: 1px solid var(--mud-palette-divider);
}

.sf-compare__colhead {
    background: var(--mud-palette-surface);
    min-width: 200px;
    border-bottom: 2px solid var(--mud-palette-divider);
}

.sf-compare__group > .sf-compare__grouphead {
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-primary);
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    position: sticky;
    left: 0;
}

.sf-compare__cell {
    color: var(--mud-palette-text-primary);
}

.sf-compare__cell--diff {
    background-color: rgba(var(--mud-palette-warning-rgb), 0.12);
    font-weight: 600;
}

.sf-compare__cell--missing {
    color: var(--mud-palette-text-disabled);
    font-style: italic;
}

/* ── Grid spacing ────────────────────────────────────────────────────────
   Override MudGrid item top-padding for all spacing variants. */
[class*="mud-grid-spacing-xs-"] > .mud-grid-item {
    padding-top: 12px !important;
}

/* ── Output tab labels, indicator bar, and spacing ───────────────────────
   .sf-output-tabs — apply to any calculator output MudTabs wrapper.
   Both active and inactive tabs use the secondary palette color.
   The inline background-color set by MudBlazor on the slider needs !important. */
.sf-output-tabs .mud-tab,
.sf-output-tabs .mud-tab-active {
    color: var(--mud-palette-secondary) !important;
}

.sf-output-tabs .mud-tab-slider {
    background-color: var(--mud-palette-secondary) !important;
}

.sf-output-tabs .mud-tabs-tabbar-content {
    padding-bottom: 1rem;
}

/* The Summary grid's default negative top margin cancels the panel's top padding (PanelClass pt-*),
   so the content sits right under the tab bar. Zero the grid's top margin so that padding shows. */
.sf-output-tabs .mud-tab-panel .mud-grid {
    margin-top: 0;
}

/* SfTabPage: give non-selected tabs a hover affordance. The tabbar is the
   primary (Color.Primary) variant — solid primary background, light text — so
   keep the label/icon color unchanged and lighten the background to
   --mud-palette-primary-lighten, exactly the value MudBlazor uses for the
   selected (active) tab's own hover state. */
.sf-tabs .mud-tab:not(.mud-tab-active):not(.mud-tab-disabled):hover {
    background-color: var(--mud-palette-primary-lighten) !important;
}

/* ── SPL table (sound pressure level) ───────────────────────────────────
   Opacity-based borders so they adapt to light/dark without hardcoding. */
.spl-table th {
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] .spl-table th {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.spl-table {
    border: none !important;
}

.spl-table thead tr:first-child th,
.spl-table tbody tr:first-child td {
    border-top: none !important;
}

.spl-table tbody tr:last-child td {
    border-bottom: none !important;
}

.spl-table thead tr:first-child th:first-child,
.spl-table tbody tr td:first-child {
    border-left: none !important;
}

.spl-table tr th:last-child,
.spl-table tr td:last-child {
    border-right: none !important;
}

.spl-table th,
.spl-table td {
    vertical-align: top !important;
    text-align: center !important;
}

.spl-table thead tr:first-child th:first-child,
.spl-table tbody tr td:first-child {
    text-align: left !important;
}

/* ── Dialog content padding ──────────────────────────────────────────────
   A default <MudGrid> (Spacing=6) carries margin-top: -24px to offset its items'
   gutter padding. At the top edge of a dialog there's nothing to offset, so that
   negative margin spills ABOVE the scroll container — a constant ~4px overflow that
   shows a permanent scrollbar regardless of field count. Match the content's top
   padding to the grid's negative top margin (24px) so the grid is fully contained
   (also keeps the first field's floating outlined label clear of the top edge). */
.mud-dialog-content {
    padding-top: 24px !important;
}

/* ── Admin tab toolbar (e.g. Regions / Territories tabs) ─────────────────
   Button stays left, filter dropdown anchors right via margin-left: auto.
   Below 600px both items stack full-width. */
.sf-tab-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sf-tab-filter {
    margin-left: auto;
    min-width: 220px;
    max-width: 280px;
    width: 280px;
}

.sf-tab-filter .mud-input-control {
    width: 100%;
}

/* ── Dropdown list items (single + multi select) ─────────────────────────
   Unselected items use the default text color. Hovered and selected items
   switch to the secondary palette. Applies globally to any MudSelect,
   MudAutocomplete, or MudMenu popover. */
.mud-popover .mud-list-item .mud-list-item-text span,
.mud-popover .mud-list-item .mud-typography {
    color: var(--mud-palette-text-primary);
}

.mud-popover .mud-list-item:hover .mud-list-item-text span,
.mud-popover .mud-list-item:hover .mud-typography,
.mud-popover .mud-list-item.mud-selected-item .mud-list-item-text span,
.mud-popover .mud-list-item.mud-selected-item .mud-typography,
.mud-popover .mud-list-item[aria-selected="true"] .mud-list-item-text span,
.mud-popover .mud-list-item[aria-selected="true"] .mud-typography {
    color: var(--mud-palette-secondary) !important;
}

/* MudBlazor's selected-item background tint uses primary by default; swap
   it to secondary so the color story stays consistent. */
.mud-popover .mud-list-item.mud-selected-item,
.mud-popover .mud-list-item[aria-selected="true"] {
    background-color: rgba(var(--mud-palette-secondary-rgb), 0.12) !important;
}

/* Multi-select checkbox inside the list item picks up secondary when checked. */
.mud-popover .mud-list-item .mud-checkbox .mud-checked {
    color: var(--mud-palette-secondary) !important;
}

.sf-filter-row {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.sf-filter-row .mud-input-control {
    min-width: 180px;
    width: 200px;
}

@media (max-width: 599px) {
    .sf-tab-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sf-tab-filter {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .sf-filter-row {
        margin-left: 0;
        flex-direction: column;
        width: 100%;
    }

    .sf-filter-row .mud-input-control {
        width: 100%;
    }

    .sf-tab-toolbar .mud-button-root {
        width: 100%;
    }
}

/* ── Outlined input borders (app-wide) ──────────────────────────────────
   Resting state keeps MudBlazor's default border. Hover and focus switch
   to the secondary palette so form accents harmonize across all dialogs,
   popovers, and pages. */
.mud-input-outlined:hover .mud-input-outlined-border,
.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--mud-palette-secondary) !important;
}

/* ── Auth layout base body ───────────────────────────────────────────────
   Applied globally; MudBlazor overrides most of these at runtime. */
body {
    background-color: var(--mud-palette-background);
    margin: 0;
    padding: 0;
    font-family: Roboto, sans-serif;
}

/* ── Lookup Tables grid (pd-*) ───────────────────────────────────────────
   All styles for the /admin/lookup-tables spreadsheet UI. The pd- prefix
   keeps these isolated from MudBlazor and other page styles. */
.pd-grid {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    user-select: none;
}
.pd-grid thead {
    position: sticky;
    top: 0;
    z-index: 3;
}
.pd-col-header {
    position: relative;
    background-color: var(--mud-palette-surface);
    padding: 0;
    border-bottom: 1px solid var(--mud-palette-secondary);
    white-space: nowrap;
}
/* Thin gutter column between data columns; hosts the insert-column "+".
   The vertical grid line is a centered ::before pseudo, so it threads through
   the middle of the gutter — and therefore through the middle of the + icon. */
.pd-gutter-header,
.pd-gutter-cell {
    position: relative;
    width: 16px;
    min-width: 16px;
    padding: 0;
}
.pd-gutter-header {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-secondary);
    text-align: center;
    cursor: pointer;
}
.pd-gutter-cell {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.pd-gutter-header::before,
.pd-gutter-cell::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--mud-palette-lines-default);
    transform: translateX(-50%);
    transition: width 0.1s, background-color 0.1s;
    pointer-events: none;
}
.pd-gutter-active::before {
    width: 2px;
    background-color: var(--mud-palette-secondary);
}
/* Add-column / drag guide overlay — the BODY portion of the gutter line. The body
   gutter cells were merged into the value cells, so when a header gutter is active
   (hover/focus/popover via GutterClass, or a column drag) this single overlay
   carries the full-height guide through the rows. Positioned by
   sfLt.positionColGuide; spans the body only (the sticky thead draws its own
   portion via .pd-gutter-active). z-index 0 keeps it above the static cell grid
   lines but below the sticky right cells, which occlude it on horizontal scroll. */
.pd-col-guide {
    position: absolute;
    width: 2px;
    margin-left: -1px;
    background-color: var(--mud-palette-secondary);
    z-index: 0;
    pointer-events: none;
    display: none;
}
.pd-gutter-add {
    opacity: 0;
    transition: opacity 0.1s;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0; /* kill inline-flex baseline whitespace */
    isolation: isolate;
}
/* Small surface-colored mask sits behind the icon to break the line
   behind the +'s cutout — but kept smaller than the icon's filled disc
   so it never peeks out as a halo. */
.pd-gutter-add::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-color: var(--mud-palette-surface);
    border-radius: 50%;
    z-index: -1;
}
.pd-gutter-add .mud-icon-root { display: block; }
.pd-gutter-header:hover .pd-gutter-add,
.pd-gutter-header:focus-within .pd-gutter-add,
.pd-gutter-add.active { opacity: 1; }
.pd-col-header-inner {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 4px;
    min-height: 32px;
}
.pd-col-header-text {
    font-weight: 600;
    font-size: 0.82rem;
    flex: 1;
    text-align: left;
}
/* Float the column's Edit/Delete actions over the right edge of the header
   so they don't widen the column on hover and shove the gutter away. */
.pd-col-header-actions {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    background-color: var(--mud-palette-surface);
    opacity: 0;
    transition: opacity 0.1s;
    z-index: 4;
    padding-left: 4px;
}
.pd-col-header:hover .pd-col-header-actions,
.pd-col-header:focus-within .pd-col-header-actions {
    opacity: 1;
}
.pd-header-add {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-secondary);
    padding: 2px 6px;
    vertical-align: middle;
    width: 36px;
}
.pd-header-action-col {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-secondary);
    width: 54px;
    position: sticky;
    right: 0;
    z-index: 3;
}
.pd-col-header,
.pd-cell {
    min-width: 150px;
    /* Keep in step with MAX_W in sfLt.sizeColumns / sfGrid.sizeColumns — that's the
       measured ceiling, this is the auto-layout one. A lower cap here wouldn't win
       (a larger min-width beats max-width per spec) but the two disagreeing is a trap. */
    max-width: 400px;
}
.pd-cell {
    padding: 1px 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    vertical-align: middle;
    width: 150px;
}
/* Value-cell horizontal inset — the single knob for where the value text starts,
   tuned so it lines up with the column header text. Each side gets the full "stack"
   (the input's own padding is zeroed below). Pivot cells are 1:1 with headers → 9px;
   lookup value cells are colspan-3 and start a half-gutter + add-column-icon to the
   left of the header → 18px. box-sizing is border-box, so this doesn't widen columns. */
.pd-grid:not(.pt-grid) .pd-cell {
    padding-left: 18px;
    padding-right: 18px;
}
.pt-grid .pd-cell {
    padding-left: 9px;
    padding-right: 9px;
}
/* Top-justify the whole pivot grid (headers + cells). Grouping tiers read top-down,
   so a value sits at the top of its merged/rowspanned group rather than centered.
   Scoped to .pt-grid so the lookup grid keeps its own alignment. */
.pt-grid .pd-cell,
.pt-grid .pd-col-header {
    vertical-align: top;
}
/* Vertical grid lines — LOOKUP grid only (the pivot grid is `.pd-grid.pt-grid`
   and manages its own borders, so scope with :not(.pt-grid)). Value cells span
   the gutters, so the column-boundary lines are drawn here (overlay pseudo-
   elements, no layout shift) instead of by the body gutter cells. They sit on
   each cell's left/right edge, centered like the header gutter line
   (translateX), so body and header lines coincide. ::after = right boundary of
   every cell; ::before = left boundary of the first cell only (interior
   boundaries are covered by the left neighbour's ::after). */
.pd-grid:not(.pt-grid) .pd-cell {
    position: relative;
}
.pd-grid:not(.pt-grid) .pd-cell::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    background-color: var(--mud-palette-lines-default);
    transform: translateX(50%);
    pointer-events: none;
}
/* The last value cell sits immediately before the end gutter, which draws the
   closing line itself (sticky) — so suppress this cell's right line to avoid a
   doubled/off-color boundary. */
.pd-grid:not(.pt-grid) .pd-cell:has(+ .pd-row-gutter-fill-end)::after {
    content: none;
}
.pd-grid:not(.pt-grid) .pd-cell[data-col="0"]::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background-color: var(--mud-palette-lines-default);
    transform: translateX(-50%);
    pointer-events: none;
}
/* Row gutter spacer cells (colspan-1, before the first / after the last value
   cell) carry only the horizontal row line, so it stays continuous across the
   full row. No vertical line — these aren't column boundaries. (Lookup grid
   only; the class is never emitted by the pivot grid.) */
/* No padding: in the filter row these fill cells would otherwise inherit
   `.pd-filter-row th { padding: 2px 4px }`, making them 8px wider than the data
   row's <td> fills and shifting every column out of alignment. Scoped selector so
   it beats `.pd-filter-row th`. */
.pd-grid:not(.pt-grid) .pd-row-gutter-fill {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 0;
}
/* The end (trailing) gutter draws the closing line for the data columns. It must
   be STICKY (right:90px, matching the header's trailing gutter) so the line stays
   pinned and visible when the grid is scrolled right — a non-sticky line there is
   covered by the sticky checkbox/action columns. The line itself is an overlay
   pseudo-element (no box width, no column shift), centered on the gutter's left
   edge. The last value cell's own ::after is suppressed (below) so this boundary
   is drawn exactly once — no doubled/off-color line. */
.pd-row-gutter-fill-end {
    position: sticky;
    right: 90px;
    z-index: 1;
    background-color: var(--mud-palette-surface);
}
.pd-row-gutter-fill-end::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background-color: var(--mud-palette-lines-default);
    transform: translateX(-50%);
    pointer-events: none;
}
/* ── Filter row vertical grid lines ───────────────────────────────────
   Filter cells (colspan 3) align with the value cells, so draw the same
   boundary lines: ::after on each cell (last suppressed — the trailing fill's
   ::before draws that boundary), ::before on the first cell. The lines turn
   secondary when their gutter is the active add-column target (pd-filt-* set
   from GutterClass), so the add-column guide is continuous through the filter
   row (the body overlay can't show over the sticky thead). */
.pd-grid:not(.pt-grid) .pd-filter-row th.pd-filter-cell {
    position: relative;
}
.pd-grid:not(.pt-grid) .pd-filter-row th.pd-filter-cell::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 2px;
    background-color: var(--mud-palette-lines-default);
    transform: translateX(50%);
    pointer-events: none;
}
.pd-grid:not(.pt-grid) .pd-filter-row th.pd-filter-cell:has(+ .pd-row-gutter-fill-end)::after {
    content: none;
}
.pd-grid:not(.pt-grid) .pd-filter-row th.pd-filter-cell[data-filter-col="0"]::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 2px;
    background-color: var(--mud-palette-lines-default);
    transform: translateX(-50%);
    pointer-events: none;
}
.pd-grid:not(.pt-grid) .pd-filter-row th.pd-filt-r-active::after {
    width: 2px;
    background-color: var(--mud-palette-secondary);
}
.pd-grid:not(.pt-grid) .pd-filter-row th.pd-filt-l-active::before {
    width: 2px;
    background-color: var(--mud-palette-secondary);
}
/* Trailing add-column gutter active: turn the close line secondary. It's drawn by
   the sticky .pd-row-gutter-fill-end::before (in the filter row AND every data
   row); the body overlay can't show here because the sticky trailing cell
   occludes it, so this wrapper-level class drives both rows' close lines.
   `-active` is set server-side (hover/focus/popover via GutterClass); `-drag`
   is set by sfLt.highlightGutter during a column drag. */
.pd-trailing-gutter-active .pd-row-gutter-fill-end::before,
.pd-trailing-gutter-drag .pd-row-gutter-fill-end::before {
    width: 2px;
    background-color: var(--mud-palette-secondary);
}
.pd-cell-action {
    padding: 1px 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    vertical-align: middle;
    white-space: nowrap;
    width: 54px;
    position: sticky;
    right: 0;
    z-index: 1;
    background-color: var(--mud-palette-surface);
}
.pd-gutter-header.pd-trailing-gutter-header {
    position: sticky;
    top: 0;
    right: 90px;
    z-index: 3;
}
.pd-gutter-cell.pd-trailing-gutter-cell {
    position: sticky;
    right: 90px;
    z-index: 1;
    background-color: var(--mud-palette-surface);
}
.pd-filter-action-spacer {
    position: sticky;
    right: 0;
    z-index: 3;
    background-color: var(--mud-palette-surface);
}
.pd-row:hover .pd-cell {
    background-color: var(--mud-palette-background-grey);
    position: relative;
    z-index: 0;
}
.pd-row-saving .pd-cell { opacity: 0.6; }
.pd-row-error .pd-cell,
.pd-row-error .pd-cell-action { background-color: rgba(211, 47, 47, 0.05); }
.pd-table-select {
    min-width: 220px;
    max-width: 560px;
    width: fit-content;
}
.pd-table-select .mud-input-control {
    margin: 0 !important;
    width: fit-content;
    min-width: 220px;
}
.pd-table-select input {
    /* Width tracks the LONGEST option name (measured in JS → --pd-tsel-w) so the
       box doesn't resize with the selection. Explicit width (not field-sizing +
       min-width, whose clamping is unreliable across browsers). !important beats
       MudBlazor's width:100% on the slot input. 200px is the brief pre-JS
       fallback before --pd-tsel-w is set. */
    width: var(--pd-tsel-w, 200px) !important;
    min-width: 0 !important;
    box-sizing: border-box;
}
.pd-grid-wrapper:focus { outline: none; }
.pd-no-cols-cell {
    padding: 32px;
    text-align: center;
    opacity: 0.6;
}
.pd-header-check {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-secondary);
    width: 36px;
    padding: 0 2px;
    position: sticky;
    right: 54px;
    z-index: 3;
}
.pd-cell-check {
    padding: 0 2px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    vertical-align: middle;
    width: 36px;
    position: sticky;
    right: 54px;
    z-index: 1;
    background-color: var(--mud-palette-surface);
}
.pd-filter-check-spacer {
    position: sticky;
    right: 54px;
    z-index: 3;
    background-color: var(--mud-palette-surface);
}
.pd-h-scrolled .pd-row-gutter-header,
.pd-h-scrolled .pd-row-gutter-spacer {
    border-right: 1px solid var(--mud-palette-lines-default);
}
.pd-row-selected .pd-cell {
    background-color: var(--mud-palette-background-grey);
}
.pd-row-selected .pd-row-gutter-spacer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--mud-palette-secondary);
}
.pd-add-col-panel {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background-color: var(--mud-palette-background-grey);
    flex-shrink: 0;
}
.pd-grid-wrapper { position: relative; }
.pd-popover {
    position: fixed;
    z-index: 1200;
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    padding: 12px;
    min-width: 320px;
    max-width: 520px;
    opacity: 0;
}
/* Neutralize input/dropdown text colors throughout the lookup-tables page
   so labels, selected values, and dropdown items don't pick up primary or
   secondary palette colors from MudBlazor's focus theming. */
.pd-popover input,
.pd-popover label,
.pd-popover .mud-input-label,
.pd-popover .mud-input-label-text,
.pd-popover .mud-input-slot,
.pd-popover .mud-select-input,
.pd-popover .mud-input-control-input-container,
.pd-grid input,
.pd-grid .mud-input-slot,
.pd-grid .mud-select-input {
    color: var(--mud-palette-text-primary) !important;
}
.pd-cell .mud-input-control,
.pd-cell .mud-input,
.pd-cell .mud-input-slot,
.pd-cell .mud-input-outlined,
.pd-cell .mud-select,
.pd-cell .mud-select-input,
.pd-cell .mud-input-control-input-container {
    min-width: 0 !important;
    width: 100% !important;
    /* The value-text inset lives entirely in the cell's padding (set per-grid on
       .pd-cell, above); zero the input's own horizontal padding/margin so the text
       sits exactly at the cell content edge and the inset is one predictable knob. */
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Boolean cells: align the checkbox box to the same inset as the text values. The
   cell padding insets the cell; zero the checkbox button's left padding so the box
   starts at the content edge too (answer: align checkboxes to the target inset). */
.pd-cell .mud-checkbox .mud-button-root {
    padding-left: 0 !important;
}
/* Reference-lookup cells are derived + read-only: render the resolved value as muted,
   non-editable text sitting at the same content inset as ordinary cell values. */
.pd-cell .pd-reflookup-cell {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.65;
    font-style: italic;
    cursor: default;
}

/* ── Pending-change affordances (staged save/discard) ───────────────────
   Tombstoned and new items stay in the grid so the user can see exactly
   what Save will commit and Discard will roll back. */
.pd-col-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--mud-palette-secondary);
    margin-right: 6px;
    vertical-align: middle;
}
.pd-col-deleted .pd-col-header-text {
    text-decoration: line-through;
    opacity: 0.5;
}
.pd-cell-col-deleted {
    opacity: 0.5;
    text-decoration: line-through;
}
.pd-cell-col-deleted input,
.pd-cell-col-deleted .mud-select-input {
    pointer-events: none;
}
.pd-row-deleted .pd-cell,
.pd-row-deleted .pd-cell-check,
.pd-row-deleted .pd-cell-action {
    opacity: 0.5;
    text-decoration: line-through;
}
.pd-row-deleted .pd-row-gutter-spacer {
    opacity: 0.5;
}
.pd-row-deleted .pd-cell input,
.pd-row-deleted .pd-cell .mud-select-input {
    pointer-events: none;
}
.pd-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}
.pd-row-drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.pd-row-drag-handle:active { cursor: grabbing; }
/* During mouse-based row drag, suppress pointer-events on cell content
   so mousemove/elementFromPoint always hits the table rows. */
.pd-row-dragging .pd-cell > *,
.pd-row-dragging .pd-cell-check > *,
.pd-row-dragging .pd-cell-action > * {
    pointer-events: none;
}
.pd-row-dragging,
.pd-col-dragging { user-select: none; }
.pd-row-dragging,
.pd-row-dragging *,
.pd-col-dragging,
.pd-col-dragging * { cursor: grabbing !important; }
.pd-col-dragging .pd-col-header-inner,
.pd-col-dragging .pd-col-header-inner * {
    pointer-events: none;
}
/* During any drag, suppress all hover-revealed icons except drop indicators */
.pd-row-dragging .pd-col-header-actions,
.pd-row-dragging .pd-gutter-add,
.pd-row-dragging .pd-row-insert-btn,
.pd-col-dragging .pd-col-header-actions,
.pd-col-dragging .pd-gutter-add,
.pd-col-dragging .pd-row-insert-btn {
    opacity: 0 !important;
    pointer-events: none !important;
}
/* Row drag: suppress column gutter highlights */
.pd-row-dragging .pd-gutter-active::before {
    width: 1px;
    background-color: var(--mud-palette-lines-default);
}
.pd-row-dragging .pd-gutter-drag-active::before {
    width: 1px;
    background-color: var(--mud-palette-lines-default);
}
/* Column drag: suppress row gutter highlights */
.pd-col-dragging .pd-row-gutter-row:hover td {
    border-top: none;
}
/* Suppress all cell content interaction during any drag */
.pd-row-dragging .pd-cell,
.pd-col-dragging .pd-cell {
    pointer-events: none;
}
.pd-row-drop-before td { border-top: 2px solid var(--mud-palette-secondary); }
.pd-row-drop-after  td { border-bottom: 2px solid var(--mud-palette-secondary); }
.pd-row-gutter-header {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-secondary);
    width: 26px;
    min-width: 26px;
    padding: 0;
    position: sticky;
    left: 0;
    z-index: 3;
}
.pd-row-gutter-spacer {
    width: 26px;
    min-width: 26px;
    padding: 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--mud-palette-surface);
}
/* ── Row gutter rows (thin rows between data rows, hosts insert-row +) ─
   Mirrors the column gutter pattern: a dedicated element that IS the
   grid line, so the + icon and highlight only trigger when hovering
   near the line itself, not the full data row. */
.pd-row-gutter-row td {
    position: relative;
    padding: 0;
    height: 0;
    font-size: 0;
    line-height: 0;
    border: none;
    pointer-events: none;
}
.pd-row-gutter-row .pd-gutter-row-anchor {
    position: sticky;
    left: 0;
    z-index: 2;
}
/* Invisible hover zone limited to the gutter column area so only
   hovering near the + icon triggers the highlight, not the full row. */
.pd-row-gutter-row .pd-gutter-row-anchor::after {
    content: "";
    position: absolute;
    left: 0;
    width: 26px;
    top: -8px;
    bottom: -8px;
    z-index: 5;
    pointer-events: auto;
}
.pd-row-insert-btn {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 6;
    line-height: normal;
    isolation: isolate;
    pointer-events: auto;
    cursor: pointer;
}
.pd-row-insert-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-color: var(--mud-palette-surface);
    border-radius: 50%;
    z-index: -1;
}
.pd-row-gutter-row:hover .pd-row-insert-btn,
.pd-row-gutter-row:has(:focus-visible) .pd-row-insert-btn { opacity: 1; }
/* Highlight: on hover or focus-visible, set border-top on the gutter row's cell.
   border-collapse merges this 2px with the data row's 1px border-bottom
   above — wider wins, giving a single clean 2px secondary line. */
.pd-row-gutter-row:hover td,
.pd-row-gutter-row:has(:focus-visible) td {
    border-top: 2px solid var(--mud-palette-secondary);
}
/* Elevate anchor (+ icon) and filler td (horizontal insert line) above the
   sticky header when the next row is within 2px of being fully visible. */
.pd-gutter-row-over-header .pd-gutter-row-anchor {
    z-index: 4;
}
.pd-gutter-row-over-header td:not(.pd-gutter-row-anchor) {
    z-index: 3;
}
.pd-gutter-row-near-header .pd-row-gutter-header {
    z-index: 1;
}
/* Hide insert-row icons during drag operations */
.pd-row-dragging .pd-row-gutter-row { display: none; }

/* ── Sort & filter ──────────────────────────────────────────────────── */
.pd-col-sort-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border-radius: 3px;
    outline: none;
}
.pd-col-sort-btn:focus-visible {
    outline: 2px solid var(--mud-palette-secondary);
    outline-offset: 1px;
}
/* When a sort-btn is focused inside its col-header, reveal the action buttons */
.pd-col-header:focus-within .pd-col-header-actions {
    opacity: 1;
}
/* Gutter header: suppress browser outline (the vertical line highlight is the visual cue) */
.pd-gutter-header:focus {
    outline: none;
}
.pd-sort-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
    vertical-align: middle;
}
.pd-filter-indicator {
    color: var(--mud-palette-secondary);
    font-size: 0.85rem;
    vertical-align: middle;
    margin-left: 2px;
}
/* Background on the ROW, not the cells: the filter cells must stay transparent so
   the vertical grid lines (drawn as ::after with translateX, straddling the cell
   boundary) aren't painted over by the next cell's opaque background — that's what
   clipped them to 1px. The row background still gives the (sticky) filter row its
   opaque backing over scrolled body content. */
.pd-filter-row {
    background-color: var(--mud-palette-surface);
}
.pd-filter-row th {
    padding: 2px 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    /* Prevent filter cells from widening columns */
    max-width: 0;
    overflow: visible;
}
.pd-filter-row .mud-input-control {
    margin: 4px 0 !important;
    min-width: 0 !important;
    width: 100% !important;
}
.pd-filter-row .mud-input,
.pd-filter-row .mud-input-outlined,
.pd-filter-row .mud-input-slot {
    min-width: 0 !important;
}
/* When sort/filter active, hide drag handles and row insert icons */
.pd-grid-filtered .pd-row-drag-handle { display: none; }
.pd-grid-filtered .pd-row-gutter-row { display: none; }
/* When schema is locked, hide column add gutters and column header actions */
.pd-schema-locked .pd-gutter-header { pointer-events: none; }
.pd-schema-locked .pd-gutter-add { display: none; }
/* visibility:hidden (not display:none) so the edit/delete icons keep their
   footprint when locked — otherwise the header reflows narrower, the column
   boundaries shift onto different sub-pixels, and the 1px grid lines render at
   an inconsistent weight (heavier on the narrowed, non-required columns). */
.pd-schema-locked .pd-col-schema-actions { visibility: hidden; }
.pd-schema-locked .pd-col-header-inner { cursor: default !important; }
/* ── Uniqueness conflict indicators ───────────────────────────────── */
.pd-cell-conflict {
    background-color: rgba(211, 47, 47, 0.08) !important;
}
.pd-cell-conflict .mud-input-underline::after {
    border-bottom-color: var(--mud-palette-error) !important;
    transform: scaleX(1) !important;
}
.pd-cell-conflict .mud-input-underline::before {
    border-bottom-color: var(--mud-palette-error) !important;
}
/* ── Cell validation error indicators (type + required) ────────────── */
.pd-cell-invalid {
    background-color: rgba(211, 47, 47, 0.12) !important;
}
.pd-cell-invalid .mud-input-underline::after {
    border-bottom-color: var(--mud-palette-error) !important;
    transform: scaleX(1) !important;
}
.pd-cell-invalid .mud-input-underline::before {
    border-bottom-color: var(--mud-palette-error) !important;
}
/* ── Cell range selection highlight ───────────────────────────────
   Contiguous tint only, no border — matching the pivot grid. The cells are
   adjacent (gutters were merged in), so the fill reads as one block. */
.pd-cell.pd-cell-selected {
    background-color: rgba(33, 150, 243, 0.15) !important;
}
/* ── Row-select checkbox range selection highlight ───────────────── */
.pd-cell-check.pd-cb-selected {
    background-color: rgba(33, 150, 243, 0.15) !important;
    box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.5);
}
.pd-unique-indicator {
    font-size: 0.75rem;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0.5;
}
.pd-conflict-toggle {
    text-transform: none;
    padding: 0 8px;
    min-width: auto;
}

/* ── Pivot Tables list panel (pt-*) ─────────────────────────────────────── */
.pt-list-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    transition: background-color 0.1s;
}
.pt-list-item:hover {
    background-color: var(--mud-palette-background-grey);
}
.pt-list-item--selected {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.10);
    border-left: 3px solid var(--mud-palette-primary);
    padding-left: 11px;
}
.pt-list-item--selected:hover {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.15);
}

/* ── Pivot Tables grid (pt-grid) ─────────────────────────────────────────
   Adds vertical grid lines on top of the shared pd-grid base styles, plus a
   secondary-color right border on the rightmost row-header cell — mirroring
   the secondary-color bottom border under the column headers in pd-grid. */
.pt-grid .pd-col-header,
.pt-grid .pd-cell {
    border-right: 1px solid var(--mud-palette-lines-default);
}
/* Content-based column sizing: the pivot is table-layout:fixed and sfGrid.sizeColumns
   writes each column's measured width (header label + cell content) onto its <col>.
   Fixed layout is REQUIRED — under auto layout a value input's intrinsic width (≈175px
   for a number input) inflates its own 1:1 column and overrides the measured width,
   leaving short columns far too wide. The <col> width is authoritative; inputs fill it
   (width:100%) and scroll any overflow. The default keeps the first paint sane until the
   JS runs (it then overwrites every column). */
.pt-grid {
    table-layout: fixed;
    /* Override .pd-grid's width:max-content — for a fixed-layout table that recomputes the
       width from CELL CONTENT (re-inflating columns by the input's intrinsic width, undoing
       fixed layout). min-content makes the table exactly the sum of the <col> widths; the
       wrapper scrolls when that exceeds the viewport. */
    width: min-content;
}
.pt-grid col {
    width: 110px;
}
.pt-grid .pd-col-header,
.pt-grid .pd-cell {
    min-width: 0;
}
/* Grid left edge: drawn only on the outermost (level-0) row-header column. Keying
   this off :first-child doubled the line — when an outer level is rowspanned, the
   next inner row-header becomes :first-child on every continuation row and added a
   second border-left on top of the spanned cell's border-right (1px + 1px = 2px).
   The rowspanned outer cell's own borders already span the full group height, so
   continuation rows need nothing. */
.pt-grid .pt-row-header-start {
    border-left: 1px solid var(--mud-palette-lines-default);
}

.pt-grid .pt-row-header {
    background-color: var(--mud-palette-background-grey);
    font-weight: 500;
    vertical-align: top;
}
.pt-grid .pt-row-header-end {
    border-right: 1px solid var(--mud-palette-secondary);
}
/* Pinned row headers: the left row-header columns (corner header cells + body row headers)
   stay in view on horizontal scroll, the way the sticky thead keeps the column headers in view
   on vertical scroll. Each column's left offset is --pt-left-<level>, written onto the table by
   sfGrid.sizeColumns as the running sum of the row-header column widths before it. The extra
   .pd-row in the body selector outranks `.pd-row:hover .pd-cell`, whose position:relative would
   otherwise unpin a hovered row's header. Corner cells sit above the column headers (z 2, inside
   the sticky thead's own stacking context). Body row headers take z 2 so they cover the value
   cells scrolling under them — MudBlazor's checkbox input carries z-index:1 and, coming later in
   the row, would paint over a z-1 header. The pivot's thead goes to z 4 to stay above both. */
.pt-grid thead {
    z-index: 4;
}
.pt-grid th.pt-sticky-left,
.pt-grid .pd-row .pd-cell.pt-sticky-left {
    position: sticky;
}
.pt-grid th.pt-sticky-left {
    z-index: 2;
}
.pt-grid .pd-row .pd-cell.pt-sticky-left {
    z-index: 2;
    /* The row-header grey (--mud-palette-background-grey) is translucent in the dark palette, so on
       its own it lets the value cells scrolling underneath show through. Paint it as a layer over
       the opaque surface colour instead: same look, but solid. Outranks the hover rule's grey too. */
    background-color: var(--mud-palette-surface);
    background-image: linear-gradient(var(--mud-palette-background-grey), var(--mud-palette-background-grey));
}

/* Reference cells (MudAutocomplete) need no special padding now: the autocomplete
   fills the cell, its input slot's horizontal padding is zeroed with the other
   inputs, and the cell's own padding provides the inset — same as every value. */

/* ── Help tooltip ────────────────────────────────────────────────────────────
   A polished surface "card" for informational tooltips, in place of MudBlazor's
   default cramped, centered dark box. A MudTooltip opts in by putting an element
   with the .sf-help-tooltip class in its TooltipContent; :has() then lands this
   rule on the popover itself regardless of where MudTooltip applies its Class.
   Left-aligned, comfortably spaced, wraps long text, with a brand accent edge. */
.mud-tooltip:has(.sf-help-tooltip) {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    border-left: 3px solid var(--mud-palette-primary);
    border-radius: 6px;
    box-shadow: var(--mud-elevation-8);
    padding: 10px 14px;
    text-align: left;
    font-weight: 400;
    font-size: 0.8125rem;
    line-height: 1.55;
    letter-spacing: normal;
    /* Selectable, so a pinned tooltip's text (FeatureTooltip: click the icon) can be copied. */
    user-select: text;
    cursor: text;
}

/* The width cap lives on the content element: MudBlazor sizes the popover box to
   its natural content width, so capping the box directly doesn't bite — capping
   the inner block is what constrains a long paragraph and makes it wrap.
   width: max-content keeps that natural width even when the popover sits near an
   edge (otherwise it shrinks to the sliver of room beside the icon and the text
   squeezes into a tall column); selectforge.js then slides it back inside its
   card and narrows the cap to the card when the card is narrower than 320px. */
.sf-help-tooltip {
    display: block;
    width: max-content;
    max-width: min(320px, var(--sf-help-max, 320px));
    white-space: normal;
}

/* InputHelpRow: a field with its fixed help slot to the right. Top-aligned, with the slot sized to a dense
   outlined field's box (8px label margin + 40px), so the icon centres on the box whether or not the field
   has a range / validation line under it. */
.sf-input-help-row {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.sf-input-help-field {
    flex: 1 1 auto;
    min-width: 0;
}

.sf-input-help-slot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 40px;
    margin-top: 8px;
}

/* Text / numeric fields (and autocompletes) carry the extra label-overhang padding above their box (the
   .mud-input-outlined-with-label:not(.mud-select) rule earlier in this file); selects don't. Drop the slot by the
   same amount beside them so the icon stays centred on the box either way. */
.sf-input-help-row:has(.mud-input-control.mud-input-outlined-with-label:not(.mud-select)) > .sf-input-help-slot,
.sf-input-help-row:has(.mud-autocomplete .mud-input-control.mud-input-outlined-with-label) > .sf-input-help-slot {
    margin-top: calc(8px + 0.375rem);
}

/* …except in a filter row / grid, which zeroes that padding (above) so a select and a numeric field line up: the slot
   then sits beside the box as it does beside a select. */
.sf-filter-row .sf-input-help-row:has(.mud-input-control.mud-input-outlined-with-label:not(.mud-select)) > .sf-input-help-slot,
.sf-filter-grid .sf-input-help-row:has(.mud-input-control.mud-input-outlined-with-label:not(.mud-select)) > .sf-input-help-slot,
.sf-filter-row .sf-input-help-row:has(.mud-autocomplete .mud-input-control.mud-input-outlined-with-label) > .sf-input-help-slot,
.sf-filter-grid .sf-input-help-row:has(.mud-autocomplete .mud-input-control.mud-input-outlined-with-label) > .sf-input-help-slot {
    margin-top: 8px;
}

/* sf-input-grid: a form whose columns should read as a grid — every field the same height, so rows line up across
   the columns. A select lacks the text field's label-overhang padding, so its row gets it (field and help slot move
   down together); give the select a blank HelperText (" ") too, so it keeps the line a numeric field's range
   text takes under its box. */
.sf-input-grid .sf-input-help-row:has(.mud-select) {
    padding-top: 0.375rem;
}

/* On phones the trigger icon sits at the right edge of its row, so a top-anchored
   popover gets squeezed into the sliver of space on the right and collapses into a
   skinny, tall column. Pin the popover across the viewport (with small side insets)
   so it breaks out of that anchor and expands leftward to a comfortable width. The
   vertical position MudBlazor computes (top, above/below the icon) is preserved. */
@media (max-width: 599.98px) {
    .mud-popover:has(.sf-help-tooltip) {
        left: 12px !important;
        right: 12px !important;
        max-width: none !important;
    }

    .sf-help-tooltip {
        width: auto;
        max-width: none;
    }
}

/* Busy overlay over the lookup grid (sfLt._mountBusy) — shown only when an operation
   outlasts half a second, so a normal paste never flashes it. Fixed-positioned onto the
   wrapper's rect; also swallows clicks, which is the point while a paste is landing. */
.pd-busy-overlay {
    position: fixed;
    z-index: 1210;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--mud-palette-overlay-light);
    backdrop-filter: blur(1px);
    cursor: progress;
}
.pd-busy-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--mud-palette-lines-default);
    border-top-color: var(--mud-palette-primary);
    border-radius: 50%;
    animation: pd-busy-spin 900ms linear infinite;
}
.pd-busy-text {
    font-size: 0.95rem;
    color: var(--mud-palette-text-primary);
    background-color: var(--mud-palette-surface);
    border-radius: 4px;
    padding: 4px 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.pd-busy-error .pd-busy-spinner {
    animation: none;
    border-color: var(--mud-palette-error);
}
.pd-busy-error .pd-busy-text { color: var(--mud-palette-error); }
@keyframes pd-busy-spin {
    to { transform: rotate(360deg); }
}

/* Selector action-bar popovers (view options, documents): a positioned anchor the Fixed MudPopover hangs from. */
.sf-popover-anchor { position: relative; display: inline-flex; align-items: center; }
.sf-popover-panel { min-width: 15rem; max-width: min(24rem, 92vw); }
/* MudBlazor pads a filled icon button 6px (36px box) vs a text one 12px (48px), and fades only the background color between
   them. The View options icon turns filled while an override is active, so pin one shape for both states (the filled one's
   36px, with margin making up the 48px footprint) so the icon and the popover hung from it stay still. The fill also
   switches instantly: MudBlazor fades the background but snaps the icon color, so the amber lingered behind the plain icon
   as a flash. */
.sf-viewoptions-btn.mud-icon-button { padding: 6px; margin: 6px; transition: none; }
.sf-documents-list { max-height: 55vh; overflow-y: auto; }
/* The project Documents menu: the panel is as wide as its widest selection row (tag + creator), set by an invisible copy of
   the rows (__sizer, padded for the dropdown item's checkbox and the field's arrow); the rest fills that width and wraps. */
.sf-project-documents-panel { width: max-content; max-width: min(36rem, 92vw); }
.sf-project-documents__sizer { height: 0; overflow: hidden; visibility: hidden; padding: 0 1rem 0 3.75rem; }
.sf-project-documents__sizer--button { padding: 0; white-space: nowrap; }
.sf-project-documents__sizer--button .mud-button-root { width: max-content; }
.sf-project-documents__fill { width: 0; min-width: 100%; }
.sf-documents-selection { display: flex; justify-content: space-between; gap: 1.5rem; width: 100%; white-space: nowrap; }
.sf-documents-item + .sf-documents-item { margin-top: 0.5rem; }
.sf-documents-item__label { font-weight: 500; }

/* Generating a document: the Selector dims and can't be used; the page is frozen under it. */
.sf-generating-host { position: relative; }
.sf-generating-content { transition: opacity 0.15s; }
.sf-generating-content--on { opacity: 0.35; pointer-events: none; user-select: none; }
.sf-generating-overlay { position: absolute; inset: 0; z-index: 10; cursor: progress; }
/* The page scrolls on the root; freeze it while generating (the gutter keeps the layout from shifting). */
html:has(.sf-generating-overlay) { overflow: hidden; scrollbar-gutter: stable; }

/* Sign-in code entry (VerifyCode): the code sits centred in its box. */
.sf-code-input input.mud-input-slot { text-align: center; }

/* ── Select value ellipsis (opt-in) ──────────────────────────────────────
   A select whose value is too long for its box ends in an ellipsis instead of running past it. Needed when the items
   carry their own content (e.g. a name beside a price delta): MudSelect then shows the picked item's content as the
   value, in a div slot it styles display:inline (which can't clip), in place of its text input, so MudBlazor's own
   input ellipsis never applies. Three classes:
   - sf-select-row on the element whose flex child is the select (MudSelect puts Class on its inner input control,
     not its root, so the root is reached from here) — it may shrink below its content;
   - sf-select-fit as the MudSelect's Class — the value slot becomes a block that clips;
   - sf-option-text on the item content's text — it ends in the ellipsis (in the value only; the open list keeps
     full names).
   Put the full value in a title on the sf-select-row element for hover: MudSelect hands extra attributes to its
   hidden input, where a title never shows. */
.sf-select-row > .mud-select { min-width: 0; flex: 1 1 auto; }
.sf-select-fit .mud-input { width: 100%; min-width: 0; }
.sf-select-fit div.mud-input-slot { display: block !important; min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.sf-select-fit div.mud-input-slot > * { min-width: 0; max-width: 100%; }
.sf-select-fit div.mud-input-slot .sf-option-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* SfTabPanel: the link around each tab header takes no box of its own, so MudTabs lays out and styles
   the tab exactly as it would without it. */
.sf-tab-link {
    display: contents;
    color: inherit;
    text-decoration: none;
}
