/* ─── Nutrichum brand tokens ─────────────────────────────────────────────
   Source: wwwroot/marketing/design_handoff_nutrichum_brand/README.md */
:root {
    /* Generated from the Penpot token catalog — palette "Grove", brief 001.
       Names are historical and no longer describe their values (--color-accent-carrot
       now holds terracotta); renaming them is a separate refactor.

       Aliased onto --mud-palette-* (emitted at runtime by NutrichumTheme.cs) wherever
       MudBlazor exposes a matching slot, per DECISIONS.md §7 — one source. No literal
       fallback: MudThemeProvider is mounted by MainLayout/AuthLayout/PublicLayout, and
       Routes.razor defaults every route with no explicit @layout to MainLayout, so
       there is no page in this app where these vars aren't defined — verified by
       curling a static-SSR page (Account/Register) and finding --mud-palette-* already
       in the rendered HTML. Two roles have no Mud palette equivalent (containers) and
       stay literal; see notes below. */
    --color-brand-primary: var(--mud-palette-primary);      /* scheme.light.primary */
    --color-brand-leaf:    #DDE6CC; /* scheme.light.primaryContainer   — no Mud slot; container roles aren't in MudBlazor's palette */
    --color-brand-sprout:  #D8CBB9; /* scheme.light.secondaryContainer — same */
    --color-accent-carrot: var(--mud-palette-secondary);    /* scheme.light.secondary */
    --color-accent-coral:  var(--mud-palette-tertiary);     /* scheme.light.tertiary */
    --color-data-berry:    var(--mud-palette-info);         /* extended.light.info */
    --color-ink:           var(--mud-palette-text-primary); /* scheme.light.onSurface */
    --color-paper:         var(--mud-palette-background);   /* scheme.light.background */
    /* rgba(ink) tints, not the outlineVariant/outline tokens platform-targets.md maps them
       to — the two disagree in value (translucent ink vs. solid grey). Not aliased until
       that's reconciled in Penpot; see design-tokens skill drift-check notes. */
    --color-line:          rgba(34, 39, 33, 0.10);
    --color-line-strong:   rgba(34, 39, 33, 0.18);

    /* Fixed brand stops for surfaces that stay dark in both modes (the sign-in hero). Not
       overridden under [data-theme="dark"] on purpose. */
    --color-brand-olive-deep: #293326;
    --color-brand-olive:      #3F463D;
    --color-brand-olive-soft: #56604F;

    --radius-card: 14px;
    --radius-pill: 999px;

    --shadow-card-hover: 0 1px 0 rgba(28,28,21,0.04), 0 24px 48px -32px rgba(28,28,21,0.18);

    --space-one:   2px;
    --space-two:   4px;
    --space-three: 8px;
    --space-four:  12px;
    --space-five:  16px;
    --space-six:   24px;
    --space-seven: 32px;
    --space-eight: 48px;
}

/* ─── Light-paper chrome (design/explorations/web-palette-sage-v2) ───────
   M3 roles MudBlazor's palette has no slot for (containers, surface steps, outline).
   Named after the client's ColorScheme roles so they map 1:1 onto the Penpot
   scheme.light.* tokens once the palette is approved. Nothing below this block
   uses a literal colour — only these and --mud-palette-*. */
:root {
    --color-primary-container:      #DDE0D2;
    --color-on-primary-container:   #3F463D;
    --color-secondary-container:    #CDD2BE; /* M3's nav indicator role */
    --color-tertiary-container:     #EBDCCD;
    --color-on-tertiary-container:  #7A5E45;
    --color-surface-variant:        #E3DDD5;
    --color-on-surface-variant:     #5C5348;
    --color-surface-dim:            #EEEBE1;
    --color-surface-container-high: #EFE7DB;
    --color-surface-container-highest: #E9DFD0;
    --color-outline:                #908576; /* darkened Taupe: brand Taupe is 2.5:1 on a card, below the 3:1 UI floor */
    --color-error-container:        #FFDAD5;
    --color-on-error-container:     #550002;
    --color-success-container:      #D3E9CA;
    --color-on-success-container:   #0D2C00;
}

/* ─── Dark ───────────────────────────────────────────────────────────────
   The --mud-palette-* variables switch by themselves (NutrichumThemeProviders mounts a
   dark-scoped MudThemeProvider); these are the roles MudBlazor has no slot for. Each
   on-* / container pair is ≥ 7:1, the outline ≥ 3:1 on the surface. */
:root[data-theme="dark"] {
    color-scheme: dark;

    --color-brand-leaf:   #3A4233;
    --color-brand-sprout: #4A3F33;
    --color-line:         rgba(232, 228, 218, 0.12);
    --color-line-strong:  rgba(232, 228, 218, 0.20);
    --shadow-card-hover:  0 1px 0 rgba(0,0,0,0.3), 0 24px 48px -32px rgba(0,0,0,0.6);

    --color-primary-container:      #3A4233;
    --color-on-primary-container:   #DCE5C8;
    --color-secondary-container:    #414A37;
    --color-tertiary-container:     #4A3B2C;
    --color-on-tertiary-container:  #F0DCC6;
    --color-surface-variant:        #3A3830;
    --color-on-surface-variant:     #CFC6B8;
    --color-surface-dim:            #151814;
    --color-surface-container-high: #2A2E28;
    --color-surface-container-highest: #33372F;
    --color-outline:                #958E80;
    --color-error-container:        #73201A;
    --color-on-error-container:     #FFDAD5;
    --color-success-container:      #2B4320;
    --color-on-success-container:   #D3E9CA;
}

.mud-appbar { border-bottom: 1px solid var(--mud-palette-divider); }
.mud-drawer { border-right: 1px solid var(--mud-palette-divider); }

/* Pill nav links: the app drawer and the account (Manage) side menu share one look. */
.mud-drawer .mud-navmenu .mud-nav-link,
.mud-navmenu.account-nav .mud-nav-link {
    border-radius: var(--radius-pill);
    margin: 2px 10px;
    width: calc(100% - 20px);
}
.mud-navmenu.account-nav .mud-nav-link { margin-inline: 0; width: 100%; }
.mud-drawer .mud-navmenu .mud-nav-link:hover:not(.mud-nav-link-disabled),
.mud-navmenu.account-nav .mud-nav-link:hover:not(.mud-nav-link-disabled) {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.12);
}
.mud-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled),
.mud-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled):hover,
.mud-drawer .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled):focus-visible,
.mud-navmenu.account-nav .mud-nav-link.active:not(.mud-nav-link-disabled),
.mud-navmenu.account-nav .mud-nav-link.active:not(.mud-nav-link-disabled):hover,
.mud-navmenu.account-nav .mud-nav-link.active:not(.mud-nav-link-disabled):focus-visible {
    color: var(--color-on-primary-container);
    background-color: var(--color-secondary-container);
    font-weight: 700;
}

.mud-main-content .mud-paper.mud-elevation-1,
.mud-main-content .mud-paper.mud-elevation-2,
.mud-main-content .mud-table.mud-elevation-1,
.mud-main-content .mud-tabs {
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 2px rgba(var(--mud-palette-primary-rgb), 0.05);
}

.mud-alert.mud-alert-outlined-warning {
    background-color: var(--color-surface-container-high);
    border: 1px solid var(--mud-palette-secondary);
    border-radius: 12px;
    color: var(--color-on-primary-container);
}
.mud-alert.mud-alert-outlined-warning .mud-alert-icon { color: var(--mud-palette-secondary); }
/* Let the 2FA nudge's message fill the row so its action sits at the right edge. */
.mfa-nudge .mud-alert-message { flex: 1 1 auto; min-width: 0; }

.mud-button-filled-primary,
.mud-button-outlined { border-radius: 10px; }
/* Tabs follow the sentence-case buttons (MudTabs uppercases on its own). */
.mud-tab { text-transform: none; letter-spacing: 0.01em; font-weight: 600; }
.mud-button-filled-size-medium,
.mud-button-outlined-size-medium { min-height: 44px; padding-inline: 18px; }
.mud-button-outlined.mud-button-outlined-default,
.mud-button-group-outlined .mud-button-root {
    border-color: var(--color-outline);
}

.mud-table-head .mud-table-row { background: transparent; }
.mud-table-head .mud-table-cell {
    color: var(--mud-palette-text-secondary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.mud-table-body .mud-table-row:hover { background-color: var(--color-surface-container-high); }

.mud-chip-filled.mud-chip-color-success,
.mud-chip-filled.mud-chip-color-primary {
    background-color: var(--color-primary-container);
    color: var(--color-on-primary-container);
    font-weight: 600;
}
.mud-chip-outlined.mud-chip-color-info {
    border-color: var(--mud-palette-primary-lighten);
    color: var(--color-on-primary-container);
}

/* Legend markers carry a shape as well as a colour, so series survive colour-blindness. */
.mud-chart-legend-item:nth-child(2) .mud-chart-legend-marker { border-radius: 2px; }
.mud-chart-legend-item:nth-child(3) .mud-chart-legend-marker { border-radius: 0; transform: rotate(45deg) scale(0.85); }
.mud-chart-legend-item:nth-child(4) .mud-chart-legend-marker { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.stat-card__icon { box-sizing: content-box; padding: 11px; border-radius: 12px; }
.stat-card__icon--sage  { background: var(--color-primary-container); color: var(--color-on-primary-container); }
.stat-card__icon--sand  { background: var(--color-surface-container-highest); color: var(--mud-palette-secondary-darken); }
.stat-card__icon--taupe { background: var(--color-surface-variant); color: var(--color-on-surface-variant); }
.stat-card__icon--wood  { background: var(--color-tertiary-container); color: var(--color-on-tertiary-container); }
.stat-card .mud-typography-h5 { font-size: 32px; font-weight: 300; line-height: 1.1; color: var(--color-on-primary-container); }
.stat-card__label { color: var(--mud-palette-text-secondary); font-size: 13px; }
.mud-main-content .mud-typography-h4 { color: var(--color-on-primary-container); }

/* Brand typography utilities (opt-in — MudBlazor's Typo system stays default for app surfaces). */
.brand-display-xl { font-size: 54px; font-weight: 700; letter-spacing: -0.02em; }
.brand-display-l  { font-size: 44px; font-weight: 700; letter-spacing: -0.035em; }
.brand-display-m  { font-size: 32px; font-weight: 600; letter-spacing: -0.015em; }
.brand-heading-l  { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.brand-heading-m  { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.brand-body       { font-size: 16px; font-weight: 400; line-height: 1.55; }
.brand-body-s     { font-size: 14px; font-weight: 400; line-height: 1.6; }
.brand-eyebrow    { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.brand-mono-label { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }

.brand-logo { display: inline-block; vertical-align: middle; }

html, body {
    font-family: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-feature-settings: "ss01", "cv11";
    margin: 0;
    padding: 0;
    background-color: var(--color-paper);
    color: var(--color-ink);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
}

.invalid {
    outline: none;
}

/* Kept a literal fallback here, unlike everywhere else in this file: this boundary is
   Blazor's own catastrophic-failure UI, the one case where rendering may not have
   reached MudThemeProvider at all. */
.blazor-error-boundary {
    background: var(--mud-palette-error, #AC322F);
    padding: var(--space-five);
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

#blazor-error-ui {
    background: var(--color-tertiary-container);
    color: var(--color-on-tertiary-container);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: var(--space-three) var(--space-six) var(--space-four) var(--space-six);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Generic validation-error text (used by Blazor's <ValidationMessage>). */
.validation-message {
    font-size: 0.8rem;
    color: var(--mud-palette-error);
    margin-top: var(--space-one);
}

/* Native <select> wrapper used on Register / CompleteBusinessRegistration where
   MudSelect's popover-based control isn't compatible with static SSR form-post.
   Styled to match MudTextField Variant.Outlined so the form looks cohesive. */
.form-select-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-two);
}

.form-select-group label {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 400;
    padding-left: var(--space-two);
}

.form-select-group select {
    width: 100%;
    padding: var(--space-five) var(--space-four);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
    background: var(--mud-palette-surface);
    font-size: 1rem;
    font-family: inherit;
    color: var(--mud-palette-text-primary);
    transition: border-color 150ms;
}

.form-select-group select:hover {
    border-color: var(--mud-palette-text-primary);
}

.form-select-group select:focus {
    outline: none;
    border-color: var(--mud-palette-primary);
    border-width: 2px;
    padding: calc(var(--space-five) - 1px) calc(var(--space-four) - 1px);
}

/* Static-SSR password show/hide toggle (custom element from
   PasswordInputStatic.razor.js). The element is empty in DOM order — the JS
   appends a button inside the adjacent MudTextField's `.mud-input` wrapper,
   so the rules below target that injected button by class. */
.password-input-static {
    position: relative;
}

.mud-input .pwd-toggle-btn {
    /* MudBlazor's input wrapper is positioned; align the button to the right
       edge so it overlaps the spot a real Adornment.End would occupy. */
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}

.mud-input .pwd-toggle-btn:hover,
.mud-input .pwd-toggle-btn:focus-visible {
    background-color: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
    outline: none;
}

.mud-input .pwd-toggle-btn:active {
    background-color: var(--color-surface-container-high);
}

/* Reserve room inside the input so typed text never slips under the eye icon. */
.mud-input input[type="password"],
.mud-input input[type="text"] {
    padding-right: 40px;
}

/* Static-SSR password strength meter (custom element from PasswordSetupStatic.razor.js).
   Used on pre-auth pages (Register, RegisterInvite, ResetPassword) that can't take a
   Blazor circuit. Shared across pages so it lives here, not in a .razor.css. */
password-strength {
    display: block;
}

password-strength .ps-meter {
    width: 100%;
    height: 6px;
    background-color: var(--color-surface-container-highest);
    border-radius: 3px;
    overflow: hidden;
    margin: var(--space-two) 0;
}

password-strength .ps-meter-fill {
    height: 100%;
    transition: width 150ms ease, background-color 150ms ease;
}

password-strength .ps-label {
    font-size: 0.8125rem;
    font-weight: 500;
    min-height: 1.2em;
}

password-strength .ps-requirements {
    list-style: none;
    margin: var(--space-three) 0 0;
    padding: 0;
    font-size: 0.8125rem;
}

password-strength .ps-requirements li {
    display: flex;
    align-items: center;
    gap: var(--space-three);
    padding: var(--space-one) 0;
    color: var(--mud-palette-text-secondary);
}

password-strength .ps-requirements li.ok {
    color: var(--color-brand-primary);
}

password-strength .ps-bullet {
    display: inline-block;
    width: 1em;
    text-align: center;
    font-weight: 600;
}

/* Password strength meter (PasswordStrengthMeter.razor) */
.password-strength .password-requirements {
    list-style: none;
    margin: var(--space-three) 0 0;
    padding: 0;
    font-size: 0.8125rem;
}

.password-strength .password-requirements li {
    display: flex;
    align-items: center;
    gap: var(--space-two);
    padding: var(--space-one) 0;
    color: var(--mud-palette-text-secondary);
}

.password-strength .password-requirements li.ok {
    color: var(--color-brand-primary);
}

/* Status message styles */
.status-message {
    display: flex;
    align-items: center;
    gap: var(--space-four);
    padding: var(--space-four) var(--space-five);
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: var(--space-six);
}

/* Error/success container roles (scheme.*.errorContainer, extended.*.successContainer) are
   defined with the other container tokens at the top of this file, light and dark. The
   border reuses the base Mud var so it repaints with the palette. */
.status-error {
    background: var(--color-error-container);
    color: var(--color-on-error-container);
    border: 1px solid var(--mud-palette-error);
}

.status-success {
    background: var(--color-success-container);
    color: var(--color-on-success-container);
    border: 1px solid var(--mud-palette-success);
}

.status-icon {
    flex-shrink: 0;
}

/* External login picker override */
.form-horizontal {
    margin-top: var(--space-five);
}

.form-horizontal .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-four) var(--space-six);
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border: 1.5px solid var(--mud-palette-divider-light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    margin-right: var(--space-three);
}

.form-horizontal .btn-primary:hover {
    border-color: var(--color-brand-primary);
    background: rgba(var(--mud-palette-primary-rgb), 0.06);
    color: var(--color-ink);
}

/* Passkey button (inherits from btn-link class) */
.passkey-button,
.btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-three);
    width: 100%;
    padding: var(--space-four);
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border: 1.5px solid var(--mud-palette-divider-light);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.passkey-button:hover,
.btn-link:hover {
    border-color: var(--color-brand-primary);
    background: rgba(var(--mud-palette-primary-rgb), 0.06);
    color: var(--color-ink);
    text-decoration: none;
}

/* Plan selection cards (Register, CompleteBusinessRegistration). Selection follows the
   checked radio as well as the server-rendered .selected class, so a click highlights the
   card immediately on these static-SSR forms. */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-four);
    margin-bottom: var(--space-three);
}

.plan-card {
    position: relative;
    display: block;
    border: 1.5px solid var(--mud-palette-divider-light);
    border-radius: 10px;
    padding: var(--space-five);
    cursor: pointer;
    background: var(--mud-palette-surface);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.plan-card:hover {
    border-color: var(--mud-palette-primary-lighten);
    box-shadow: 0 2px 8px rgba(var(--mud-palette-primary-rgb), 0.10);
}

.plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-card.selected,
.plan-card:has(input[type="radio"]:checked) {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 2px 12px rgba(var(--mud-palette-primary-rgb), 0.18);
    background: var(--color-primary-container);
}

.plan-card:has(input[type="radio"]:focus-visible) {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-two);
}

.plan-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--mud-palette-text-primary);
}

.plan-card-badge {
    background: var(--color-primary-container);
    color: var(--color-on-primary-container);
    font-size: 0.7rem;
    font-weight: 600;
    padding: var(--space-one) var(--space-three);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.plan-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    margin-bottom: var(--space-two);
}

.plan-card-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
}

.plan-card-desc {
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: var(--space-three);
}

.plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
}

.plan-card-features li {
    padding: var(--space-one) 0;
}

@media (max-width: 640px) {
    .plan-cards {
        grid-template-columns: 1fr;
    }
}

/* ─── Legal pages ────────────────────────────────────────────────────────
   /privacy, /data-safety, /delete-account. Plain HTML, not MudText per line —
   legal copy is mostly prose and a component per paragraph is unreadable to
   edit. MudBlazor styles only its own components (body typography, nothing for
   bare h1/a/p/table), so these cover just the gaps browser defaults get wrong.
   ──────────────────────────────────────────────────────────────────────── */
.legal { max-width: 46rem; margin: 0 auto; }
/* Browser defaults are 24px/700 for h2 — too heavy beside a 32px h1, and the
   privacy page has 26 of them. Asymmetric margin binds a heading to its text. */
.legal h1 { font-size: 1.95rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 var(--space-three); }
.legal h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin: var(--space-seven) 0 var(--space-three); }
.legal strong { font-weight: 600; }               /* 700 is shouty in Inter */
.legal code { background: var(--color-brand-leaf); padding: 0.1em 0.35em; border-radius: 4px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88em; }
.legal p, .legal li { line-height: 1.65; }        /* Mud's ~1.43 is tight for prose */
.legal li { margin: var(--space-three) 0; }
.legal a { color: var(--color-brand-primary); }   /* else browser blue */
.legal-updated { color: var(--mud-palette-text-secondary); font-size: 0.88rem; margin: 0 0 var(--space-seven); }

.legal table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid var(--color-line); padding: var(--space-three) var(--space-four); text-align: left; }
.legal th { background: var(--color-brand-leaf); font-weight: 600; }

.legal .card {
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    border-left: 3px solid var(--color-brand-primary);
    border-radius: var(--radius-card);
    padding: var(--space-five) var(--space-six);
    margin: var(--space-six) 0;
}
.legal .card p:first-child { margin-top: 0; }
.legal .card p:last-child  { margin-bottom: 0; }

/* ─── Empty states (Components/Shared/EmptyState.razor) ─────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-two);
    padding: var(--space-seven) var(--space-six);
}
.empty-state--card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--radius-card);
}
.empty-state__icon {
    box-sizing: content-box;
    padding: 14px;
    margin-bottom: var(--space-three);
    border-radius: 50%;
    background: var(--color-primary-container);
    color: var(--color-on-primary-container);
}
.empty-state__title { font-weight: 600; color: var(--mud-palette-text-primary); }
.empty-state__body { color: var(--mud-palette-text-secondary); max-width: 42ch; }

/* Chart cards in a row share a height, so a short donut doesn't leave a ragged edge. */
.chart-card { height: 100%; }

/* ─── Form rows (plan occasion items, plan targets) ──────────────────────
   One baseline per row, fixed columns so consecutive rows line up. MudBlazor fields centre
   themselves in a flex row, so a field with helper text or an unfloated label sat higher or
   lower than its neighbours. */
.slot-item-row {
    display: grid;
    grid-template-columns: 130px minmax(220px, 1fr) 120px 150px 80px 90px 40px;
    gap: var(--space-four);
    align-items: end;
    margin-top: var(--space-two);
}
.slot-item-row__kcal { padding-bottom: 10px; white-space: nowrap; }
.slot-item-row > .mud-icon-button { margin-bottom: 4px; }

@media (max-width: 960px) {
    .slot-item-row { grid-template-columns: 1fr 1fr; }
    .slot-item-row > :nth-child(2) { grid-column: span 2; }
}

/* A selected entry in an in-page category list (e.g. the formula categories): the drawer's
   selected-link colours, so the label keeps its contrast in light and dark. MudNavLink puts
   its Class on the wrapping .mud-nav-item, so the link is styled through it. */
.mud-navmenu .nc-nav-selected > .mud-nav-link,
.mud-navmenu .nc-nav-selected > .mud-nav-link:hover {
    background-color: var(--color-secondary-container);
    color: var(--color-on-primary-container);
    font-weight: 700;
}
.mud-navmenu .nc-nav-selected > .mud-nav-link .mud-nav-link-icon {
    color: inherit;
}

/* Custom formula parameters: variable, display name, unit and remove on one baseline. */
.formula-param-row {
    display: grid;
    grid-template-columns: 120px minmax(180px, 1fr) 140px 40px;
    gap: var(--space-four);
    align-items: end;
    margin-top: var(--space-two);
}
.formula-param-row > .mud-icon-button { margin-bottom: 4px; }
@media (max-width: 600px) {
    .formula-param-row { grid-template-columns: 1fr 1fr; }
}

/* Import profile mappings: the table scrolls sideways on narrow screens rather than squeezing
   the trait and timepoint inputs to a few characters. */
.import-mapping-table .mud-table-container { overflow-x: auto; }
