/* Tier B (design D5): contain MudBlazor's global CSS in a cascade layer so its unlayered
   `*{margin:0;padding:0;border-width:0}` reset and `body{}` rules stop overriding Tailwind's
   (layered) utilities on un-migrated LumexUI pages. Order places `mudblazor` above Tailwind's
   `base` (so MudBlazor `.mud-*` component styles still beat preflight on migrated pages) but
   below `components`/`utilities` (so LumexUI/Tailwind layout utilities win the global rules).
   Loaded BEFORE app.css so this layer order is established first. */
@layer theme, base, mudblazor, components, utilities;
@import url("_content/MudBlazor/MudBlazor.min.css") layer(mudblazor);

/* Theme bridge (D4) gap: the app's Tailwind base sets `body { color }` to the light-mode
   text color and never flips it for dark mode, so bare MudBlazor typography (which relies on
   inherited color) renders dark-on-dark and disappears in dark mode. Re-anchor MudBlazor
   content to the palette text color, which MudThemeProvider flips with IsDarkMode (bridged
   from the LumexUI ThemeService). Unlayered so it beats Tailwind's layered `body{}`; scoped
   to MudBlazor containers so un-migrated LumexUI pages are unaffected. `.mud-dialog` covers
   dialogs, which render in a portal outside `.mud-main-content`. */
.mud-main-content,
.mud-dialog {
  color: var(--mud-palette-text-primary);
}

/* Left-align page content. MudContainer centers itself (`margin-inline: auto`), which in the
   sidebar layout floats the (centered) Large page container and the narrower per-page containers
   toward the middle of the viewport — so on wide screens the heading indents and the cards drift
   right of it. Anchor every MudContainer in the main content to the inline start so headings and
   cards align hard left; the max-width still caps line length and margin-inline-end stays auto.
   Unlayered so it beats MudBlazor's layered `.mud-container` rule; scoped to main content so
   dialog-hosted containers keep centering. */
.mud-main-content .mud-container {
  margin-inline-start: 0;
}
