html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: auto;
    overflow-x: hidden;
}

/* ─── elevation tokens ──────────────────────────────────────────────
   Five layers + two hairlines. MudBlazor swaps its palette CSS vars
   between light and dark; mixing white into Surface gives a uniform
   "lift" direction in both themes, so a single token set serves both.

   Use these instead of one-off color-mix expressions:
     --layer-canvas    L0 — app background (drawn by MudLayout / body)
     --layer-surface   L1 — default content (where reading happens)
     --layer-raised    L2 — cards, sections, summary strips
     --layer-floating  L3 — sticky bars, popovers, dialog content
     --layer-overlay   L4 — modal backdrops
     --hairline-strong       — section dividers, card borders
     --hairline-soft         — secondary dividers (between rows etc.)
*/
:root {
    --layer-canvas:    var(--mud-palette-background);
    --layer-surface:   var(--mud-palette-surface);
    --layer-raised:    color-mix(in srgb, var(--mud-palette-surface) 88%, white 12%);
    --layer-floating:  color-mix(in srgb, var(--mud-palette-surface) 76%, white 24%);
    --layer-overlay:   rgba(15, 18, 23, 0.45);

    --hairline-strong: color-mix(in srgb, var(--mud-palette-text-primary) 12%, transparent);
    --hairline-soft:   color-mix(in srgb, var(--mud-palette-text-primary) 6%, transparent);
}

h1:focus {
    outline: none;
}

/* Inline #blazor-error-ui in index.html is the fallback for runtime errors; this rule controls
   the bar's positioning and visibility when Blazor displays it. */
#blazor-error-ui {
    background: #b32121;
    color: #ffffff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

/* iOS safe-area block — kept because both Hosts.Web/index.html and
   Hosts.Maui/wwwroot/index.html render a <div class="status-bar-safe-area"></div>
   that needs height under WKWebView. */
.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }
}

.flex-fullsize {
    flex-grow: 1;
}

.center-loading {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Timetracking toolbar: task autocomplete popover should be wider than its input.
   Stays global because MudPopoverProvider renders outside the component tree, so
   scoped CSS via PopoverClass can't reach it. */
.timetracking-task-autocomplete-popover { min-width: 320px; }
