/* ---------------------------------------------------------------------------
   Medixa design system
   Identity: "timetable ink" — chalk-slate sidebar with ruled lines, ledger
   double-rules under titles, teal chalk accent, Fraunces display / Inter body.
--------------------------------------------------------------------------- */

:root {
    --ink: #20303c;
    --ink-2: #182530;
    --ink-3: #2b3f4e;
    --paper: #f4f6f7;
    --surface: #ffffff;
    --line: #dbe2e7;
    --text: #243440;
    --muted: #5d6f7b;
    --teal: #177e6e;
    --teal-dark: #10604f;
    --teal-soft: #e2f0ed;
    --amber: #c08a2d;
    --amber-soft: #f7ecd8;
    --violet: #6456a5;
    --violet-soft: #eae6f7;
    --danger: #b3403a;
    --danger-soft: #f6e4e3;
    --chalk: #f3efe6;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(24, 37, 48, .05), 0 8px 24px rgba(24, 37, 48, .06);
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    /* the ruled-lines signature, used on the sidebar and auth aside */
    --ruled: repeating-linear-gradient(to bottom, transparent 0 30px, rgba(243, 239, 230, .07) 30px 31px);
}

html, body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--text);
    font-size: 15px;
}

h1, h2, h3 {
    color: var(--ink);
}

h1:focus {
    outline: none;
}

a {
    color: var(--teal);
    text-decoration: none;
}

    a:hover {
        color: var(--teal-dark);
        text-decoration: underline;
    }

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ shell */

.shell {
    display: flex;
    min-height: 100vh;
}

.shell__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 2.5rem 4rem;
}

/* ---------------------------------------------------------------- sidenav */

.sidenav {
    width: 248px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%), var(--ink);
    background-blend-mode: normal;
    background-image: var(--ruled), linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    color: var(--chalk);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidenav__brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.45rem;
    letter-spacing: .01em;
    color: var(--chalk);
    padding: 0 .55rem;
    margin-bottom: 2rem;
}

    .sidenav__brand span {
        color: #7fc4b6;
        font-style: italic;
    }

    .sidenav__brand:hover {
        color: #fff;
        text-decoration: none;
    }

/* brand lockup (BrandLogo.razor) — the mark plays the wordmark's capital M,
   so it is sized to the font's cap height and kerned tight to the text */
.brand-mark {
    height: .8em;
    vertical-align: -.015em;
    margin-right: .07em;
}

.topbar__brand span {
    color: var(--teal);
    font-style: italic;
}

.sidenav__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidenav__label {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(243, 239, 230, .45);
    padding: 1.1rem .55rem .35rem;
}

.sidenav__link {
    display: block;
    padding: .5rem .55rem .5rem .8rem;
    border-radius: 7px;
    border-left: 2px solid transparent;
    color: rgba(243, 239, 230, .85);
    font-weight: 500;
}

    .sidenav__link:hover {
        background: rgba(243, 239, 230, .08);
        color: #fff;
        text-decoration: none;
    }

    .sidenav__link.active {
        background: rgba(23, 126, 110, .35);
        border-left-color: #7fc4b6;
        color: #fff;
    }

.sidenav__foot {
    margin-top: auto;
    padding: 1rem .55rem 0;
    border-top: 1px solid rgba(243, 239, 230, .15);
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.sidenav__foot-label {
    font-size: .72rem;
    color: rgba(243, 239, 230, .5);
}

.sidenav__foot-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--chalk);
}

/* ----------------------------------------------------------------- topbar */

.topbar {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .7rem 2.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar__spacer {
    flex: 1;
}

/* mobile nav-drawer controls — the 900px breakpoint turns them on */
.nav-burger,
.nav-backdrop,
.topbar__brand {
    display: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.user-chip__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.user-chip__name {
    font-weight: 600;
    font-size: .88rem;
    color: var(--ink);
}

.logout-form {
    margin: 0;
}

/* ---------------------------------------------------------- language switch */

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.lang-switch__item {
    padding: .3rem .65rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--muted);
}

    .lang-switch__item:hover {
        color: var(--teal-dark);
        background: var(--teal-soft);
        text-decoration: none;
    }

.lang-switch__item--active {
    background: var(--ink);
    color: var(--chalk);
    pointer-events: none;
}

.auth-shell {
    position: relative;
}

.auth-shell__lang {
    position: absolute;
    top: 1.1rem;
    right: 1.2rem;
}

    .auth-shell__lang .lang-switch {
        background: var(--surface);
    }

/* -------------------------------------------------------------- page head */

.eyebrow {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--teal);
    margin-bottom: .4rem;
}

.page-head {
    margin-bottom: 1.75rem;
}

.page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.9rem;
    margin: 0 0 .6rem;
    padding-bottom: .55rem;
    /* ledger double-rule — the signature underline */
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 3px 0 -2px var(--ink);
    display: inline-block;
    padding-right: 2.5rem;
}

.page-lead {
    color: var(--muted);
    max-width: 60ch;
    margin: .35rem 0 0;
}

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .88rem;
    line-height: 1;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: .62rem 1.1rem;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}

    .btn:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

.btn-primary {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

    .btn-primary:hover:not(:disabled) {
        background: var(--teal-dark);
        border-color: var(--teal-dark);
        color: #fff;
    }

.btn-outline {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

    .btn-outline:hover:not(:disabled) {
        border-color: var(--teal);
        color: var(--teal-dark);
        background: var(--teal-soft);
    }

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

    .btn-ghost:hover:not(:disabled) {
        color: var(--ink);
        background: rgba(24, 37, 48, .06);
        text-decoration: none;
    }

.btn-danger-outline {
    background: transparent;
    border-color: var(--line);
    color: var(--danger);
}

    .btn-danger-outline:hover:not(:disabled) {
        border-color: var(--danger);
        background: var(--danger-soft);
    }

.btn-sm {
    padding: .45rem .8rem;
    font-size: .82rem;
}

.btn-xs {
    padding: .3rem .6rem;
    font-size: .76rem;
}

/* square button holding a single svg glyph; the accessible name lives in aria-label/title */
.btn-icon {
    padding: .38rem;
    line-height: 0;
}

    .btn-icon svg {
        width: 15px;
        height: 15px;
    }

.btn-block {
    width: 100%;
    padding: .75rem 1.1rem;
}

/* -------------------------------------------------------- fields & forms */

.field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: .9rem;
    min-width: 0;
}

.field--grow {
    flex: 1;
}

.field label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: .02em;
}

.field input,
.field select,
.field textarea,
.search {
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .55rem .7rem;
    width: 100%;
}

    .field input:focus,
    .field select:focus,
    .search:focus {
        border-color: var(--teal);
        outline: 2px solid rgba(23, 126, 110, .25);
        outline-offset: 0;
    }

.field-row {
    display: flex;
    gap: .9rem;
}

    .field-row .field {
        flex: 1;
    }

.form-line {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .9rem;
}

    .form-line .btn {
        margin-bottom: .9rem;
    }

.hint {
    font-size: .8rem;
    color: var(--muted);
}

.check-group {
    margin: .9rem 0;
}

.check-group__label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: .02em;
    margin-bottom: .45rem;
}

.check {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .5rem;
    font-size: .9rem;
    color: var(--text);
    cursor: pointer;
}

    .check input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
        flex: none;
        margin: 0;
        accent-color: var(--teal);
    }

/* short-label check lists (tags, lectures): fill columns instead of one tall stack */
.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0 .9rem;
}

/* long check lists (question pools): cap the height so the form stays one screen */
.check-scroll {
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .6rem .8rem;
}

/* one answer per line: text input, correct flag and remove button on a shared centerline */
.answer-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .9rem;
    margin-bottom: .55rem;
}

    .answer-row .field,
    .answer-row .check {
        margin-bottom: 0;
    }

/* standalone action row between page sections (e.g. the "Add question" button) */
.page-actions {
    margin: 0 0 1rem;
}

/* keep long free text (question previews) to two lines in tables */
.cell-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.invalid:not(form) {
    border-color: var(--danger) !important;
    outline: none;
}

.validation-message {
    color: var(--danger);
    font-size: .78rem;
}

/* ----------------------------------------------------------------- alerts */

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    border-radius: var(--radius);
    padding: .8rem 1rem;
    margin-bottom: 1.1rem;
    border: 1px solid;
    font-size: .88rem;
}

.app-alert--error {
    background: var(--danger-soft);
    border-color: #e4b7b4;
    color: #7c2b26;
}

.app-alert--success {
    background: var(--teal-soft);
    border-color: #b5d8d1;
    color: #0f5648;
}

.app-alert--info {
    background: var(--amber-soft);
    border-color: #e5d0a8;
    color: #7c5a1d;
}

.app-alert__body {
    flex: 1;
}

.app-alert__list {
    margin: 0;
    padding-left: 1.1rem;
}

    .app-alert__list:has(li:only-child) {
        list-style: none;
        padding-left: 0;
    }

.app-alert__close {
    background: none;
    border: none;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .6;
    padding: 0 .1rem;
}

    .app-alert__close:hover {
        opacity: 1;
    }

.app-alert--autohide {
    animation: app-alert-out .6s ease 6s forwards;
}

@keyframes app-alert-out {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ----------------------------------------------------------------- panels */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.4rem;
}

.panel__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0 0 .9rem;
}

.panel__actions {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-top: .6rem;
}

.empty {
    color: var(--muted);
    background: transparent;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin: 1rem 0;
}

/* --------------------------------------------------------- inline edit */

.inline-edit {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .35rem;
}

    /* the display fragment keeps its own type style; the pencil sits beside it */
    .inline-edit .panel__title {
        margin-bottom: 0;
    }

.inline-edit__input {
    flex: 1;
    min-width: 0;
    max-width: 22rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .35rem .6rem;
}

    .inline-edit__input:focus {
        border-color: var(--teal);
        outline: 2px solid rgba(23, 126, 110, .25);
        outline-offset: 0;
    }

.inline-edit__pencil {
    opacity: .55;
}

    .inline-edit__pencil:hover:not(:disabled) {
        opacity: 1;
    }

.service-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: .6rem;
}

    .service-card__head .panel__title {
        margin-bottom: .35rem;
    }

/* ----------------------------------------------------------------- tables */

.table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

/* table already inside a panel: keep the scroll, drop the double frame */
.table-card--flat {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.table-app {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

    .table-app th {
        text-align: left;
        font-size: .7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .1em;
        color: var(--muted);
        padding: .8rem 1rem;
        border-bottom: 2px solid var(--ink);
    }

    .table-app td {
        padding: .7rem 1rem;
        border-bottom: 1px solid var(--line);
        vertical-align: middle;
    }

    .table-app tbody tr:last-child td {
        border-bottom: none;
    }

    .table-app tbody tr:hover {
        background: rgba(23, 126, 110, .04);
    }

.t-right {
    text-align: right;
}

.num {
    font-variant-numeric: tabular-nums;
}

.row--muted td {
    color: var(--muted);
}

.cell-user {
    display: flex;
    flex-direction: column;
}

.cell-user__name {
    font-weight: 600;
    color: var(--ink);
}

.cell-user__email {
    font-size: .8rem;
    color: var(--muted);
}

.cell-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
}

.cell-actions--end {
    justify-content: flex-end;
}

/* ------------------------------------------------------------ terms cards */

/* auto-fill: one column on phones, as many as fit on desktop — no scroll ever */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .7rem;
    margin: .4rem 0 .9rem;
}

/* an inline edit form takes the whole row */
.card-grid__wide {
    grid-column: 1 / -1;
}

.terms-card {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .8rem .9rem;
}

.terms-card__name {
    margin: 0;
    font-size: inherit;
    font-weight: 600;
    color: var(--ink);
}

.terms-card__terms {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin: 0;
}

.terms-card__term {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .8rem;
    font-size: .88rem;
}

.terms-card__label {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
}

.terms-card__value {
    margin: 0;
}

.terms-card__actions {
    display: flex;
    gap: .45rem;
    margin-top: auto;
    padding-top: .15rem;
}

    .terms-card__actions .btn {
        flex: 1;
    }

/* -------------------------------------------------------- admin user cards */

.user-card {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .8rem .9rem;
}

    .user-card .cell-user {
        padding-bottom: .45rem;
        border-bottom: 1px solid var(--line);
    }

.user-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem .8rem;
}

.user-card__label {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
}

/* ----------------------------------------------------------------- badges */

.badge-app {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    border-radius: 999px;
    padding: .2rem .6rem;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.badge-app--teal {
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.badge-app--amber {
    background: var(--amber-soft);
    color: #7c5a1d;
}

.badge-app--muted {
    background: #edf1f3;
    color: var(--muted);
}

.badge-app--violet {
    background: var(--violet-soft);
    color: var(--violet);
}

/* ----------------------------------------------------- quiz test preview */

/* key/value metadata block (test summary) */
.def-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1rem 1.4rem;
    margin: 0;
}

    .def-grid dt {
        font-size: .72rem;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: .2rem;
    }

    .def-grid dd {
        margin: 0;
        font-weight: 500;
    }

/* read-only list of questions with their offered answers */
.quiz-view {
    list-style: none;
    counter-reset: q;
    margin: 0;
    padding: 0;
}

.quiz-view__item {
    counter-increment: q;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
}

.quiz-view__q {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 .9rem;
}

    .quiz-view__q::before {
        content: counter(q) ". ";
        color: var(--teal-dark);
    }

.quiz-view__answers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.quiz-view__a {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .55rem .8rem;
}

    /* correct answers are the key; a selected wrong answer is the student's mistake */
    .quiz-view__a.is-correct {
        border-color: var(--teal-dark);
        background: var(--teal-soft);
        color: var(--teal-dark);
        font-weight: 500;
    }

    .quiz-view__a.is-wrong {
        border-color: var(--danger);
        background: var(--danger-soft);
        color: var(--danger);
        font-weight: 500;
    }

.quiz-view__a-text {
    flex: 1;
}

/* per-question footnote (time spent) under the question text */
.quiz-view__meta {
    margin: -.5rem 0 .9rem;
    font-size: .8rem;
    color: var(--muted);
}

/* ------------------------------------------------------ quiz test taking */

/* timer + question navigation above the current question */
.quiz-take__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.quiz-take__timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

    .quiz-take__timer.is-low {
        color: var(--danger);
    }

.quiz-take__dots {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.quiz-dot {
    min-width: 2rem;
    height: 2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

    .quiz-dot.is-answered {
        border-color: var(--teal-dark);
        background: var(--teal-soft);
        color: var(--teal-dark);
    }

    .quiz-dot.is-current {
        outline: 2px solid var(--teal);
        outline-offset: 1px;
        font-weight: 700;
    }

/* the question number counter only makes sense in the full review list */
.quiz-take__q::before {
    content: none;
}

/* whole answer row is the click target while taking a test */
.quiz-take__option {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 1;
    cursor: pointer;
}

.quiz-view__a.is-picked {
    border-color: var(--teal-dark);
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-weight: 500;
}

/* fixed slot so answer text aligns whether or not the student ticked this one */
.quiz-view__mark {
    display: inline-flex;
    flex: none;
    width: 1rem;
    height: 1rem;
    color: currentColor;
}

    .quiz-view__mark svg {
        width: 1rem;
        height: 1rem;
    }

/* screen-reader-only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------- toolbar */

.toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search {
    max-width: 340px;
}

.toolbar__count {
    font-size: .8rem;
    color: var(--muted);
}

/* ------------------------------------------------------------ home & hero */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.4rem;
    color: var(--text);
    transition: transform .15s ease, border-color .15s ease;
}

    .tile:hover {
        text-decoration: none;
        border-color: var(--teal);
        transform: translateY(-2px);
        color: var(--text);
    }

    .tile h2 {
        font-family: var(--font-display);
        font-size: 1.15rem;
        font-weight: 600;
        margin: 0;
    }

    .tile p {
        color: var(--muted);
        font-size: .87rem;
        margin: 0;
        flex: 1;
    }

.tile__cta {
    color: var(--teal);
    font-weight: 600;
    font-size: .85rem;
}

    .tile__cta::after {
        content: " →";
    }

.hero {
    max-width: 640px;
    padding: 3.5rem 0 2rem;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.3rem);
    line-height: 1.08;
    margin: 0 0 1.1rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 3px 0 -2px var(--ink);
    display: inline-block;
    padding-right: 3rem;
}

.hero__lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 52ch;
    margin-bottom: 1.6rem;
}

.hero__actions {
    display: flex;
    gap: .8rem;
}

/* ------------------------------------------------------------- auth pages */

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--paper);
    padding: 2rem 1rem;
}

.auth-card {
    display: flex;
    width: min(880px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-card__aside {
    width: 300px;
    flex-shrink: 0;
    background-image: var(--ruled), linear-gradient(165deg, var(--ink-3) 0%, var(--ink-2) 90%);
    color: var(--chalk);
    padding: 2.2rem 1.9rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-card__brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.7rem;
    color: var(--chalk);
    line-height: 1.15;
}

    .auth-card__brand span {
        color: #7fc4b6;
        font-style: italic;
    }

    .auth-card__brand:hover {
        color: #fff;
        text-decoration: none;
    }

.auth-card__tagline {
    font-size: .92rem;
    color: rgba(243, 239, 230, .75);
    margin-top: auto;
    line-height: 1.55;
}

.auth-card__body {
    flex: 1;
    padding: 2.2rem 2.4rem;
    min-width: 0;
}

.auth-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    margin: 0 0 .3rem;
}

.auth-card__hint {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 1.4rem;
}

.auth-card__switch {
    margin-top: 1.4rem;
    font-size: .88rem;
    color: var(--muted);
}

.auth-card__divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1rem 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
}

    .auth-card__divider::before,
    .auth-card__divider::after {
        content: "";
        height: 1px;
        flex: 1;
        background: var(--line);
    }

.auth-card__forgot {
    font-size: .85rem;
    text-align: right;
    margin: -.5rem 0 1rem;
}

.btn-external {
    justify-content: center;
}

.btn-external__mark {
    display: inline-grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-weight: 700;
    line-height: 1;
}

/* -------------------------------------------------- availability planner */

.avail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem .9rem;
    margin-bottom: 1rem;
}

    .avail-head .panel__title {
        margin: 0;
    }

.avail-head__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
}

.avail-days {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

/* one row per weekday: name | switch | slots, stacking to a card on small screens */
.avail-day {
    display: grid;
    grid-template-columns: 7.5rem 11.5rem 1fr;
    gap: .55rem .9rem;
    align-items: start;
    padding: .85rem .95rem;
    background: var(--surface);
}

    .avail-day + .avail-day {
        border-top: 1px solid var(--line);
    }

.avail-day--off {
    background: var(--paper);
}

.avail-day__name {
    font-weight: 700;
    font-size: .85rem;
    color: var(--ink);
    padding-top: .3rem;
}

.avail-day__slots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .9rem;
    min-width: 0;
}

.avail-day__dash {
    color: var(--muted);
    padding-top: .25rem;
}

.avail-slot {
    display: flex;
    align-items: center;
    gap: .3rem;
}

    .avail-slot input[type="time"] {
        border: 1px solid var(--line);
        border-radius: 6px;
        padding: .3rem .35rem;
        font-size: .82rem;
        font-family: var(--font-body);
        font-variant-numeric: tabular-nums;
        background: var(--surface);
    }

.avail-slot__dash {
    color: var(--muted);
}

/* slots of a switched-off day: visible so the stored hours are obvious, but clearly inert */
.avail-day--off .avail-slot {
    opacity: .55;
}

    .avail-day--off .avail-slot input[type="time"]:disabled {
        background: var(--paper);
        color: var(--muted);
    }

    .avail-day--off .avail-slot__remove:disabled {
        cursor: default;
    }

.avail-slot__remove {
    color: var(--muted);
}

    .avail-slot__remove:hover {
        color: var(--danger);
    }

.avail-add {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--teal);
    font-family: var(--font-body);
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem 0;
}

    .avail-add:hover {
        color: var(--teal-dark);
        text-decoration: underline;
    }

.avail-note {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin: 1rem 0 0;
    padding: .7rem .9rem;
    border-radius: 8px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: .82rem;
}

    .avail-note svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        margin-top: .1em;
    }

/* ----------------------------------------------------------- switch */

.switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    user-select: none;
}

    /* visually hidden but still focusable, the track mirrors its state */
    .switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch__track {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: var(--line);
    flex-shrink: 0;
    transition: background .15s ease;
}

    .switch__track::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 2px rgba(24, 37, 48, .25);
        transition: transform .15s ease;
    }

.switch input:checked + .switch__track {
    background: var(--teal);
}

    .switch input:checked + .switch__track::after {
        transform: translateX(14px);
    }

.switch input:focus-visible + .switch__track {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.switch input:disabled + .switch__track {
    opacity: .6;
}

.switch__label {
    font-size: .82rem;
    color: var(--muted);
}

.avail-day:not(.avail-day--off) .switch__label {
    color: var(--text);
}

/* -------------------------------------------------------- day picker */

.step-num {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: .35rem;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-family: var(--font-body);
    font-size: .8rem;
    font-weight: 700;
    vertical-align: .12em;
}

.daypicker__view--month {
    display: none;
}

.daypicker__head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .8rem;
}

.daypicker__label {
    flex: 1;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
}

.daypicker__nav {
    width: 2.2rem;
    height: 2.2rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease;
}

    .daypicker__nav:hover:not(:disabled) {
        border-color: var(--teal);
        background: var(--teal-soft);
        color: var(--teal-dark);
    }

    .daypicker__nav:disabled {
        color: var(--muted);
        cursor: not-allowed;
        opacity: .55;
    }

.daypicker__week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .6rem;
}

.daypicker__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .7rem .2rem .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: var(--font-body);
    color: var(--text);
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease;
}

    .daypicker__day:hover:not(:disabled) {
        border-color: var(--teal);
    }

    .daypicker__day:disabled {
        background: var(--paper);
        color: var(--muted);
        cursor: not-allowed;
    }

.daypicker__day--today {
    border-color: var(--teal);
}

.daypicker__day--selected {
    border-color: var(--teal);
    box-shadow: 0 0 0 1px var(--teal);
}

.daypicker__dow {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.daypicker__num {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.02rem;
    font-variant-numeric: tabular-nums;
}

.daypicker__day--selected .daypicker__num,
.daypicker__cell--selected .daypicker__num {
    background: var(--teal);
    color: #fff;
}

.daypicker__mark {
    height: .4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daypicker__mark--dot::before {
    content: "";
    width: .35rem;
    height: .35rem;
    border-radius: 50%;
    background: var(--teal);
}

.daypicker__mark--dash::before {
    content: "";
    width: .8rem;
    height: 2px;
    border-radius: 1px;
    background: var(--line);
}

.daypicker__month {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .15rem;
    justify-items: center;
}

.daypicker__mdow {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    padding-bottom: .25rem;
}

.daypicker__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    width: 100%;
    padding: .1rem 0;
    background: none;
    border: none;
    font-family: var(--font-body);
    color: var(--text);
    cursor: pointer;
}

    .daypicker__cell:disabled {
        color: var(--muted);
        cursor: not-allowed;
    }

.daypicker__cell--out {
    color: var(--muted);
    opacity: .55;
}

.daypicker__cell--today:not(.daypicker__cell--selected) .daypicker__num {
    background: var(--teal-soft);
    color: var(--teal-dark);
}

/* ------------------------------------------------- sliding day timeline */

.dayline__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .8rem;
}

.dayline__range {
    flex: 1;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.dayline__nav {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease;
}

    .dayline__nav:hover {
        border-color: var(--teal);
        background: var(--teal-soft);
        color: var(--teal-dark);
    }

.dayline__days {
    display: grid; /* columns come inline from the component's Days parameter */
    gap: .6rem;
    /* vertical page scrolling stays native; horizontal finger travel reaches the swipe handler */
    touch-action: pan-y;
}

.dayline__day {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.dayline__day--today {
    border-color: var(--teal);
    box-shadow: inset 0 2px 0 var(--teal);
}

.dayline__dayhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .3rem;
    padding: .5rem .65rem;
    border-bottom: 2px solid var(--ink);
}

.dayline__dow {
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dayline__day--today .dayline__dow {
    color: var(--teal-dark);
}

.dayline__date {
    font-size: .8rem;
    color: var(--muted);
    white-space: nowrap;
}

.dayline__events {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: .5rem .55rem;
    min-width: 0;
}

.dayline .cal-event {
    font-size: .8rem;
    padding: .35rem .55rem;
}

.cal-event {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    min-width: 0;
    font-size: .72rem;
    line-height: 1.3;
    border-radius: 6px;
    padding: .25rem .45rem;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

    .cal-event strong {
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

.cal-event__detail {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cal-event--requested {
    background: var(--violet-soft);
    color: var(--violet);
}

.cal-event--processed {
    background: var(--amber-soft);
    color: #7c5a1d;
}

.cal-event--cancelled {
    background: #edf1f3;
    color: var(--muted);
    text-decoration: line-through;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .8rem;
}

/* --------------------------------------------------------- booking slots */

.timeline__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    margin: 1.1rem 0 .55rem;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
}

.slot-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 9px;
    padding: .7rem .85rem;
    font-size: .9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}

    .slot-chip:hover {
        border-color: var(--teal);
        background: var(--teal-soft);
    }

.slot-chip--selected {
    background: var(--teal-soft);
    border-color: var(--teal);
    color: var(--teal-dark);
}

.slot-chip__check {
    position: absolute;
    right: .6rem;
    display: grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
}

    .slot-chip__check svg {
        width: .7rem;
        height: .7rem;
    }

.book-bar {
    position: sticky;
    bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1rem;
    flex-wrap: wrap;
    background: var(--ink);
    color: var(--chalk);
    border-radius: var(--radius);
    padding: .8rem 1.2rem;
    box-shadow: 0 10px 30px rgba(24, 37, 48, .35);
}

.book-bar__summary {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

    .book-bar__summary span {
        font-size: .85rem;
        color: rgba(243, 239, 230, .8);
    }

.book-bar__actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
}

/* ------------------------------------------------------------- responsive */

/* Tablets and below: the sidebar becomes an off-canvas drawer. MainLayout owns the
   open state in C# (interactive router renders the layout interactively everywhere)
   and toggles .shell--nav-open; navigation and Escape close it — no JavaScript. */
@media (max-width: 900px) {
    .sidenav {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(80vw, 300px);
        height: 100dvh;
        transform: translateX(-100%);
        visibility: hidden; /* keeps the closed drawer out of the tab order */
        box-shadow: 0 0 40px rgba(24, 37, 48, .35);
        /* visibility flips only after the slide-out finishes; on open it must flip
           instantly (no transition) or the focus moved into the drawer is rejected */
        transition: transform .25s ease, visibility 0s .25s;
    }

    .shell--nav-open .sidenav {
        transform: none;
        visibility: visible;
        transition: transform .25s ease, visibility 0s;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 39;
        border: 0;
        padding: 0;
        background: rgba(24, 37, 48, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    .shell--nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body:has(.shell--nav-open) {
        overflow: hidden;
    }

    .nav-burger {
        display: grid;
        place-items: center;
        width: 2.5rem;
        height: 2.5rem;
        flex-shrink: 0;
        margin-left: -.45rem;
        border: 0;
        border-radius: 8px;
        background: none;
        color: var(--ink);
        cursor: pointer;
    }

        .nav-burger:hover {
            background: rgba(24, 37, 48, .06);
        }

        .nav-burger svg {
            width: 22px;
            height: 22px;
        }

    .topbar__brand {
        display: block;
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 1.2rem;
        color: var(--ink);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .topbar__brand:hover {
            color: var(--ink);
            text-decoration: none;
        }

    .topbar,
    .content {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .auth-card {
        flex-direction: column;
    }

    .auth-card__aside {
        width: 100%;
        padding: 1.6rem 1.9rem;
    }

    .auth-card__tagline {
        margin-top: .4rem;
    }

    .field-row {
        flex-direction: column;
        gap: 0;
    }

    /* Inline forms go vertical: every field and the submit button on its own full row. */
    .form-line {
        gap: .5rem .7rem;
    }

        .form-line .field {
            flex: 1 1 100%;
            margin-bottom: .45rem;
        }

        .form-line .btn {
            flex: 1 1 100%;
            margin-bottom: .45rem;
        }

    /* Stacked tables: each row becomes a small card, each cell a "label — value" line,
       so nothing is clipped however narrow the screen gets. Same breakpoint as the
       drawer nav — if the app looks mobile, tables behave mobile. */
    .table-app--stack thead {
        display: none;
    }

    .table-app--stack tbody,
    .table-app--stack tr,
    .table-app--stack td {
        display: block;
    }

    .table-app--stack tr {
        padding: .55rem .8rem;
        border-bottom: 1px solid var(--line);
    }

    .table-app--stack tbody tr:last-child {
        border-bottom: none;
    }

    .table-app--stack td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: .8rem;
        border: none;
        padding: .18rem 0;
        white-space: normal;
        text-align: right;
    }

        .table-app--stack td[data-label]::before {
            content: attr(data-label);
            flex-shrink: 0;
            font-size: .66rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .1em;
            color: var(--muted);
        }

    .table-app--stack .cell-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: .3rem;
    }
}

/* Phones: tighter spacing, stacked book bar. */
@media (max-width: 640px) {
    .content {
        padding: 1.1rem .9rem 3.5rem;
    }

    .topbar {
        padding: .55rem .9rem;
        gap: .6rem;
    }

    /* auth/user actions squeeze it into an ellipsis here; the drawer carries the brand */
    .topbar__brand {
        display: none;
    }

    .user-chip__name {
        display: none;
    }

    .page-title {
        font-size: 1.45rem;
        padding-right: 1.5rem;
    }

    .page-head {
        margin-bottom: 1.2rem;
    }

    .panel {
        padding: 1.05rem .95rem;
    }

    .toolbar {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .search {
        max-width: none;
    }

    .table-app th,
    .table-app td {
        white-space: nowrap;
        padding: .6rem .7rem;
    }

    /* the stacked td rows override the nowrap above */
    .table-app--stack td {
        white-space: normal;
        padding: .18rem 0;
    }

    .panel__actions {
        flex-wrap: wrap;
    }

    /* weekday rows fold into cards: name + switch on top, slots underneath */
    .avail-day {
        grid-template-columns: 1fr auto;
    }

    .avail-day__name {
        padding-top: 0;
        align-self: center;
    }

    .avail-day__slots {
        grid-column: 1 / -1;
    }

    .avail-day__dash {
        padding-top: 0;
    }

    .daypicker__view--week {
        display: none;
    }

    .daypicker__view--month {
        display: block;
    }

    .timeline {
        grid-template-columns: 1fr;
    }

    .dayline__dayhead {
        flex-direction: column;
        align-items: flex-start;
        gap: .05rem;
    }

    .book-bar {
        flex-direction: column;
        align-items: stretch;
        padding: .8rem .9rem;
    }

    .book-bar__actions .btn-primary {
        flex: 1;
    }

    .hero {
        padding-top: 2rem;
    }

    .hero__actions {
        flex-wrap: wrap;
    }

    .auth-shell {
        padding: 3.2rem .8rem 1.5rem;
        align-items: start;
    }

    .auth-card__body {
        padding: 1.6rem 1.2rem;
    }
}

/* Fingers need bigger targets than mouse pointers. */
@media (pointer: coarse) {
    .btn-xs {
        padding: .5rem .75rem;
    }

    .btn-icon {
        padding: .55rem;
    }

    .field input,
    .field select,
    .field textarea {
        padding: .7rem .75rem;
    }

    .lang-switch__item {
        padding: .45rem .75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    .app-alert--autohide {
        animation: none;
    }
}

/* ----------------------------------------------------- framework plumbing */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

#blazor-error-ui {
    color-scheme: light only;
    background: var(--amber-soft);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: var(--danger);
    padding: 1rem;
    color: white;
    border-radius: var(--radius);
}

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

/* ------------------------------------------------------------- pagination */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    margin-top: .9rem;
}

.pager__summary {
    color: var(--muted);
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}

.pager__controls {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.pager__btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0 .45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

    .pager__btn:hover:not(:disabled):not(.pager__btn--active) {
        border-color: var(--teal);
        color: var(--teal-dark);
        background: var(--teal-soft);
    }

    .pager__btn:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

.pager__btn--active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--chalk);
    cursor: default;
}

.pager__gap {
    min-width: 1.4rem;
    text-align: center;
    color: var(--muted);
    user-select: none;
}

/* -------------------------------------------------- unsaved-changes guard */

.confirm-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 0;
    border-top: 3px solid var(--amber);
    max-width: 26rem;
    width: 100%;
    padding: 1.4rem 1.5rem 1.3rem;
    color: inherit;
}

.confirm-card::backdrop {
    background: rgba(24, 37, 48, .45);
}

.confirm-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0 0 .5rem;
}

.confirm-card__text {
    color: var(--muted);
    font-size: .92rem;
    margin: 0 0 1.1rem;
}

.confirm-card__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .6rem;
}

/* amber pill next to a save button while the form has unsaved edits */
.dirty-flag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--amber);
    background: var(--amber-soft);
    border-radius: 999px;
    padding: .2rem .6rem;
}

    .dirty-flag::before {
        content: "";
        width: .45rem;
        height: .45rem;
        border-radius: 50%;
        background: var(--amber);
    }
