h1:focus {
    outline: none;
}

/* Responsive nav (desktop dropdown row vs. mobile hamburger + drawer) is handled inside the
   NavBar.razor interactive island via MudHidden, not CSS media queries here. */

/* MudAppBar is always `position: fixed`, so page content sits underneath it in normal document
   flow unless something reserves the same space — MudBlazor doesn't do this automatically.
   64px covers the AppBar's tallest (desktop) height; the dense mobile bar (56px) just gets a
   little extra breathing room. `!important` needed for the same inline-style-wins-over-class
   reason as the nav rules above (MudMainContent's own Class="pa-6" resolves to a class, but
   Mud sets its own base padding via a stylesheet rule at a specificity this needs to beat). */
.mud-main-content {
    padding-top: 88px !important;
}

/* DESIGN-SYSTEM.md Accessibility floor: 44x44px minimum interactive target, "including inline
   table-row actions" — measured live (see .memory/logs) that MudBlazor's own control chrome falls
   short of this at every size actually used in this app: Size.Small row-action buttons render
   ~64x31, MudCheckBox's thumb ~37x37, even a default (Medium) button is ~64x37; only default
   MudIconButton (48x48) already clears it. Expand the actual hit area invisibly via ::after rather
   than growing the controls themselves — visually enlarging every row action would blow past the
   40px table-row-height budget DESIGN-SYSTEM.md deliberately set for roster scannability at max
   Program scale (50 students / 100 staff). ".mud-button-root" covers MudButton, MudIconButton, and
   MudCheckBox (all share that base class); MudChip's own delete/OnClose icon (14x14) isn't a
   button-root, so it's targeted separately.
   EXCLUDE .mud-switch-base: MudSwitch's thumb container is a .mud-button-root that MudBlazor
   positions `position:absolute` and translateX-es along the track. This rule loads after
   MudBlazor's CSS, so a blanket `position:relative` here overrode that and broke the thumb layout
   (rendered as a distorted, clipped blob) — the switch's own label already gives it a large hit
   target, so it doesn't need the ::after expansion anyway. */
.mud-button-root:not(.mud-switch-base),
.mud-nav-link,
.mud-chip-close-button {
    position: relative;
}

.mud-button-root:not(.mud-switch-base)::after,
.mud-nav-link::after,
.mud-chip-close-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(44px, 100%);
    height: max(44px, 100%);
    transform: translate(-50%, -50%);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Auth pages (Login, Register) — Steady Hand tokens (docs/design/DESIGN-SYSTEM.md), hand-authored
   because these pages stay static SSR for Identity's cookie sign-in (dotnet-blazor skill,
   rendering-auth-state.md 4.4) and can't use MudTextField's JS-driven binding. Hex values mirror
   SteadyHandTheme.cs 1:1 — same hardcode-per-token convention, since no CSS custom properties are
   declared app-wide yet. */
.steady-auth-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 64px);
    padding: 24px 16px;
}

.steady-auth-card {
    width: 100%;
    max-width: 420px;
}

.steady-auth-logo {
    font-family: "Teachers", sans-serif;
    font-weight: 600;
    color: #0369A1; /* --accent */
}

.steady-auth-subtitle {
    color: #475569; /* --text-muted */
}

.steady-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.steady-field label {
    font-family: "Teachers", sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569; /* --text-muted */
}

.steady-field input,
.steady-field select {
    font-family: "Teachers", sans-serif;
    font-size: 1rem;
    padding: 10px 12px;
    border: 1px solid #E2E8F0; /* --border */
    border-radius: 6px;
    color: #020617; /* --text */
    background: #FFFFFF; /* --surface-raised */
}

.steady-field input:focus-visible,
.steady-field select:focus-visible {
    outline: 2px solid #0369A1; /* --accent */
    outline-offset: 2px;
    border-color: #0369A1;
}

.steady-field-error {
    color: #DC2626; /* --severity-critical */
    font-size: 0.8125rem;
}

.steady-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Teachers", sans-serif;
    font-size: 0.9375rem;
    color: #020617; /* --text */
}

.steady-validation-summary {
    color: #DC2626; /* --severity-critical */
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.steady-validation-summary ul {
    margin: 0;
    padding-left: 1.2em;
}

.steady-link-button {
    background: none;
    border: none;
    padding: 4px 0;
    color: #0369A1; /* --accent */
    font-family: "Teachers", sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
}

.steady-link-button:hover {
    color: #075985;
}

@media (prefers-color-scheme: dark) {
    .steady-auth-card {
        background: #111C2E; /* --surface-raised (dark) */
        border-color: #1E293B; /* --border (dark) */
    }

    .steady-auth-logo {
        color: #38BDF8; /* --accent (dark) */
    }

    .steady-auth-subtitle {
        color: #94A3B8; /* --text-muted (dark) */
    }

    .steady-field label,
    .steady-checkbox {
        color: #F1F5F9; /* --text (dark) */
    }

    .steady-field input,
.steady-field select {
        background: #111C2E; /* --surface-raised (dark) */
        border-color: #1E293B; /* --border (dark) */
        color: #F1F5F9; /* --text (dark) */
    }

    .steady-field input:focus-visible,
.steady-field select:focus-visible {
        outline-color: #38BDF8; /* --accent (dark) */
        border-color: #38BDF8;
    }

    .steady-field-error,
    .steady-validation-summary {
        color: #F87171; /* --severity-critical (dark) */
    }

    .steady-link-button {
        color: #38BDF8; /* --accent (dark) */
    }
}
/* Weekly Schedule printing (Schedule.razor "Print week"): the interactive editing UI — the app bar,
   the generate/undo/redo toolbar, the per-unit cards with their staff dropdowns — doesn't print
   cleanly, so a hidden .print-only table (built from the same schedule data) carries the printout.
   On screen .print-only is hidden; in print we flip it on and hide everything else. */
.print-only {
    display: none;
}

@media print {
    /* Hide app chrome and the on-screen interactive schedule. */
    .mud-appbar,
    .mud-drawer,
    .mud-overlay,
    #blazor-error-ui,
    .no-print {
        display: none !important;
    }

    /* MudMainContent reserves 88px for the (now-hidden) fixed app bar — reclaim it for print. */
    .mud-main-content {
        padding: 0 !important;
    }

    /* The interactive schedule lives entirely in MudPaper cards; hide them and show the clean table. */
    .mud-paper {
        display: none !important;
    }

    .print-only {
        display: block !important;
        color: #000;
    }

    .print-schedule {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
    }

    .print-schedule th,
    .print-schedule td {
        border: 1px solid #333;
        padding: 6px 8px;
        text-align: left;
        vertical-align: top;
    }

    .print-schedule thead th {
        background: #eee;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-schedule tr {
        break-inside: avoid;
    }

    body {
        background: #fff;
    }
}

/* Dashboard current-week assignments (Dashboard.razor): a 2-column Staff | Student-Group table,
   ordered by unit so each student/group's rows are adjacent. Palette CSS variables keep it
   light/dark aware. `.group-start` draws a divider where the student/group changes. */
.assignment-list {
    border-collapse: collapse;
    width: 100%;
    max-width: 640px;
    font-size: 14px;
    color: var(--mud-palette-text-primary);
}

.assignment-list thead th {
    text-align: left;
    font-weight: 600;
    padding: 6px 12px;
    border-bottom: 2px solid var(--mud-palette-lines-default);
}

.assignment-list td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.assignment-list tbody tr.group-start td {
    border-top: 2px solid var(--mud-palette-lines-default);
}

.row-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--mud-palette-success);
    color: var(--mud-palette-success-text);
}
