/* ==========================================================================
   Official Roster – design tokens
   Chart colours follow the validated reference palette (dataviz skill):
   categorical slots in fixed order, blue sequential ramp, reserved status colours.
   ========================================================================== */
/* Inter (SIL Open Font License), served from wwwroot/fonts: one variable file per script range, weights 100-900. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --page: #f3f4f6;
    --surface-1: #ffffff;
    --surface-2: #f1f3f5;
    --surface-sunk: #e6e9ed;
    --ink: #0f172a;
    --ink-2: #4b5563;
    --muted: #667085;
    --line: #e3e6ea;
    --line-strong: #c5cad3;
    --ring: rgba(11, 11, 11, 0.10);
    --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .04);

    --accent: #1c5cab;
    --accent-ink: #ffffff;
    --accent-soft: #cde2fb;
    --accent-wash: #e8f1fc;

    /* an event override: a seat held by someone else during one event (always with a label, never colour alone) */
    --override: #e58a2b;
    --override-ink: #8a4a06;
    --override-soft: #fbdcb8;
    --override-wash: #fdf1e3;

    --nav-bg: #0f2536;
    --nav-ink: #c9d6e2;
    --nav-ink-strong: #ffffff;
    --nav-active: rgba(255, 255, 255, .10);

    /* categorical (fixed order) */
    --series-1: #2a78d6;
    --series-2: #eb6834;
    --series-3: #1baf7a;
    --series-4: #eda100;
    --series-5: #e87ba4;
    --series-6: #008300;
    --series-7: #6250d6;
    --series-8: #e34948;

    /* sequential blue */
    --seq-100: #cde2fb;
    --seq-250: #86b6ef;
    --seq-450: #2a78d6;
    --seq-600: #184f95;

    /* status – always paired with an icon/label */
    --good: #0ca30c;
    --good-ink: #006300;
    --warning: #fab219;
    --warning-ink: #8a5a00;
    --serious: #ec835a;
    --critical: #d03b3b;
    --critical-ink: #b02a2a;
    --info-ink: #1c5cab;

    /* venue graphic */
    --water: #cfe6f3;
    --water-deep: #b5d8ec;
    --rope: #ffffff;
    --rope-dot: #2a78d6;
    --deck: #ece9e1;
    --deck-edge: #d6d2c6;

    --radius: 10px;
    --radius-sm: 6px;
}

@media (prefers-color-scheme: dark) {
    :root:where(:not([data-theme="light"])) {
        color-scheme: dark;
        --override: #d98a3d;
        --override-ink: #f3c594;
        --override-soft: #5c3b16;
        --override-wash: #33240f;
        --page: #0d0d0d;
        --surface-1: #1a1a19;
        --surface-2: #232321;
        --surface-sunk: #121211;
        --ink: #f0efec;
        --ink-2: #c3c2b7;
        --muted: #9b998f;
        --line: #2c2c2a;
        --line-strong: #383835;
        --ring: rgba(255, 255, 255, 0.10);
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        --accent: #3987e5;
        --accent-ink: #0b0b0b;
        --accent-soft: #184f95;
        --accent-wash: #16273b;
        --nav-bg: #0a1823;
        --series-1: #3987e5;
        --series-2: #d95926;
        --series-3: #199e70;
        --series-4: #c98500;
        --series-5: #d55181;
        --series-6: #008300;
        --series-7: #9085e9;
        --series-8: #e66767;
        --seq-100: #1c2f45;
        --seq-250: #184f95;
        --seq-450: #3987e5;
        --seq-600: #86b6ef;
        --good-ink: #0ca30c;
        --warning-ink: #fab219;
        --critical-ink: #e66767;
        --info-ink: #86b6ef;
        --water: #12324a;
        --water-deep: #0e2a3f;
        --rope: #5a7a92;
        --rope-dot: #3987e5;
        --deck: #232321;
        --deck-edge: #383835;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --override: #d98a3d;
    --override-ink: #f3c594;
    --override-soft: #5c3b16;
    --override-wash: #33240f;
    --page: #0d0d0d;
    --surface-1: #1a1a19;
    --surface-2: #232321;
    --surface-sunk: #121211;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9b998f;
    --line: #2c2c2a;
    --line-strong: #383835;
    --ring: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --accent-ink: #0b0b0b;
    --accent-soft: #184f95;
    --accent-wash: #16273b;
    --water: #12324a;
    --water-deep: #0e2a3f;
    --rope: #5a7a92;
    --deck: #232321;
    --deck-edge: #383835;
}

/* ---------- base ---------- */
html, body {
    font-family: var(--font);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    background: var(--page);
    color: var(--ink);
}

/* Density: a desk tool with a lot on each page, so in a desktop window everything is a step smaller than the browser's
   default (sizes and spacing are in rem, so they follow). Phones keep the default, for touch and the sign-up page; so
   does print. */
@media screen and (min-width: 861px) {
    html { font-size: 14px; }
}

/* The public sign-up page is a form people fill in once, often on a phone: it keeps the browser's size. */
html:has(.portal) { font-size: 16px; }

body {
    --bs-body-bg: var(--page);
    --bs-body-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-secondary-color: var(--ink-2);
    --bs-link-color-rgb: 28, 92, 171;
    --bs-table-bg: transparent;
}

h1, h2, h3, h4 { font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1.02rem; }
h1:focus { outline: none; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }

.small-caps { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- buttons & forms (light Bootstrap overrides) ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 550; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); background: var(--accent); border-color: var(--accent); }
.btn-outline-secondary { color: var(--ink); background: var(--surface-1); border-color: var(--line-strong); }
.btn-outline-secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
/* Bootstrap gives a disabled button a visible border; a ghost button stays borderless and just fades. */
.btn-ghost:disabled, .btn-ghost.disabled { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px var(--accent);
    outline: none;
}
.form-control, .form-select {
    background-color: var(--surface-1);
    color: var(--ink);
    border-color: var(--line-strong);
    border-radius: var(--radius-sm);
    padding-top: .28rem;
    padding-bottom: .28rem;
}
.form-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: .15rem; }

/* ---------- cards & layout helpers ---------- */
.card-x {
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-x > .card-x-head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .55rem .9rem; border-bottom: 1px solid var(--line);
}
.card-x > .card-x-head h2, .card-x > .card-x-head h3 { margin: 0; }
.card-x > .card-x-body { padding: .85rem .9rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.grid-auto { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table-x th {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface-2); color: var(--ink-2);
    font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 650;
    text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--line-strong);
}
.table-x td { padding: .32rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-x tbody tr:hover td { background: var(--accent-wash); }
.table-x tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.table-wrap { overflow: auto; max-width: 100%; }

/* A page whose main table takes the rest of the window: the table scrolls (under its sticky header) and the page
   doesn't, so there is never a second scroll bar. 4.5rem is .app-content's vertical padding. Don't give a table a
   viewport-based max-height instead: whenever the page is taller than the window, both scroll. */
.fill-page { display: flex; flex-direction: column; height: calc(100vh - 4.5rem); height: calc(100dvh - 4.5rem); }
.fill-page > * { flex: none; }
.fill-page > .fill-grow { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.fill-grow > * { flex: none; }
.fill-grow > .table-wrap { flex: 1 1 auto; min-height: 0; }
/* Too little room for that (short window, phone): everything is laid out in full and only the page scrolls. */
@media (max-height: 700px), (max-width: 860px) {
    .fill-page, .fill-page > .fill-grow { display: block; height: auto; }
}

/* ---------- badges / pills ---------- */
.pill {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .74rem; font-weight: 600; line-height: 1;
    padding: .28rem .5rem; border-radius: 999px;
    background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
    white-space: nowrap;
}
.pill .dot { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; }
.pill-good { color: var(--good-ink); }
.pill-warn { color: var(--warning-ink); }
.pill-bad { color: var(--critical-ink); }
.pill-info { color: var(--info-ink); }
.swatch { width: .7rem; height: .7rem; border-radius: 3px; display: inline-block; flex: none; }

/* category identity (series slots 1-4) */
.cat-host { --cat: var(--series-1); }
.cat-alumni { --cat: var(--series-2); }
.cat-visiting { --cat: var(--series-3); }
.cat-none { --cat: var(--series-4); }

/* ---------- toasts ---------- */
.toast-stack { position: fixed; right: 1rem; bottom: 4.5rem; /* clear of the assistant launcher */ display: flex; flex-direction: column; gap: .5rem; z-index: 2000; max-width: min(420px, calc(100vw - 2rem)); }
.toast-x {
    background: var(--surface-1); color: var(--ink); border: 1px solid var(--line-strong);
    border-left: 4px solid var(--accent); border-radius: var(--radius-sm);
    padding: .65rem .8rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); font-size: .9rem;
    display: flex; gap: .6rem; align-items: flex-start;
    animation: toast-in .18s ease-out;
}
.toast-x.toast-warn { border-left-color: var(--warning); }
.toast-x.toast-error { border-left-color: var(--critical); }
.toast-x.toast-good { border-left-color: var(--good); }
.toast-x button { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1.1rem; line-height: 1; }@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- modal ---------- */
.modal-x-backdrop { position: fixed; inset: 0; background: rgba(5, 15, 25, .45); z-index: 1500; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem; overflow: auto; }
/* A dialog never outgrows the window: its head and foot stay put and the body is the one thing that scrolls.
   Lists inside a dialog must not scroll on their own, or a tall dialog shows two scroll bars. */
.modal-x { background: var(--surface-1); color: var(--ink); border-radius: var(--radius); width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.modal-x-head, .modal-x-foot { flex: none; }
.modal-x-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.modal-x.wide { width: min(980px, 100%); }
.modal-x-head { padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-x-head h2 { margin: 0; font-size: 1.1rem; }
.modal-x-body { padding: 1.1rem; }
.modal-x-foot { padding: .8rem 1.1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); font-size: 1rem; margin-bottom: .25rem; }

/* ---------- validation / error boundary ---------- */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--good); }
.invalid { outline: 1px solid var(--critical); }
.validation-message { color: var(--critical-ink); font-size: .85rem; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.2rem;
    color: white;
    border-radius: var(--radius-sm);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* ---------- print ---------- */
@media print {
    .no-print { display: none !important; }
    html, body { background: #fff; color: #000; }
}

/* ---------- charts (HTML marks; see dataviz mark specs) ---------- */
.chart { margin: 0; position: relative; }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding: 0; margin: 0 0 .75rem; font-size: .8rem; color: var(--ink-2); }
.chart-legend li { display: inline-flex; align-items: center; gap: .4rem; }

.chart-tip {
    display: none; position: absolute; z-index: 20; pointer-events: none;
    background: var(--surface-1); color: var(--ink); border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    padding: .5rem .65rem; font-size: .8rem; min-width: 170px; white-space: nowrap;
}
.chart-tip strong { display: block; margin-bottom: .25rem; }
.tip-row { display: flex; align-items: center; gap: .4rem; color: var(--ink-2); }
.tip-val { margin-left: auto; padding-left: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.tip-total { border-top: 1px solid var(--line); margin-top: .2rem; padding-top: .2rem; }
.tip-detail { color: var(--muted); margin-top: .25rem; white-space: normal; max-width: 260px; }

/* horizontal bars */
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr; align-items: center; gap: .75rem; position: relative; border-radius: 4px; outline: none; }
.hbar-row:hover, .hbar-row:focus-visible { background: var(--accent-wash); }
.hbar-row:hover .chart-tip, .hbar-row:focus-visible .chart-tip { display: block; left: min(55%, 260px); top: 100%; }
.hbar-label { font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.hbar-area { display: flex; align-items: center; gap: .4rem; min-width: 0; padding-right: 2.5rem; }
.hbar { display: flex; gap: 2px; height: 18px; min-width: 2px; }
.hbar .seg { height: 100%; min-width: 2px; }
.hbar .seg:last-child { border-radius: 0 4px 4px 0; }
.hbar-value { font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* vertical columns */
.vcols { display: flex; align-items: flex-end; gap: .25rem; position: relative; padding-left: 2.2rem; }
.vcols-grid { position: absolute; left: 2.2rem; right: 0; top: 0; height: var(--plot-h); pointer-events: none; }
.vgrid-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.vgrid-line span { position: absolute; left: -2.2rem; width: 2rem; text-align: right; top: -.55rem; font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vcol { flex: 1 1 0; min-width: 28px; display: flex; flex-direction: column; align-items: center; position: relative; outline: none; border-radius: 4px; }
.vcol:hover, .vcol:focus-visible { background: var(--accent-wash); }
.vcol:hover .chart-tip, .vcol:focus-visible .chart-tip { display: block; bottom: calc(100% - 1rem); left: 50%; transform: translateX(-50%); }
.vcol-plot { height: var(--plot-h); width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-bottom: 1px solid var(--line-strong); }
.vcol-bar { width: min(24px, 70%); display: flex; flex-direction: column; gap: 2px; min-height: 2px; }
.vcol-bar .seg { width: 100%; min-height: 2px; }
.vcol-bar .seg:first-child { border-radius: 4px 4px 0 0; }
.vcol-value { font-size: .72rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.vcol-label { font-size: .72rem; color: var(--ink-2); text-align: center; margin-top: .3rem; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* A chart that fills its card (beside a taller one): the plot takes the spare height, the labels keep one line. */
.chart.fill { flex: 1; display: flex; flex-direction: column; }
.chart.fill .vcols { flex: 1; align-items: stretch; min-height: calc(var(--plot-h) + 1.3rem); }
.chart.fill .vcol-plot { height: auto; flex: 1; }
.chart.fill .vcol-label { height: 1rem; white-space: nowrap; }
.chart.fill .vcols-grid { height: auto; bottom: 1.3rem; }

/* ---------- pages made for a larger screen (Shared/LargeScreenOnly) ---------- */
.large-screen-note { display: none; }

/* Screens only: paper is narrow too, and a printed page must not be the note. */
@media screen and (max-width: 760px) {
    .large-screen-note:not(.dismissed) { display: block; }
    /* Everything else the page renders stays out of the way until "Show it anyway". */
    .app-content:has(> .large-screen-note:not(.dismissed)) > :not(.large-screen-note) { display: none; }

    .large-screen-card { padding: 1.5rem 1.25rem; text-align: center; }
    .large-screen-card h1 { font-size: 1.25rem; margin: .5rem 0; }
    .large-screen-card .row-gap { justify-content: center; margin-top: 1rem; }
    .large-screen-icon { color: var(--accent); }
}

/* ---------- phones (≤760px) ---------- */
/* Tables drop secondary columns (hide-phone) and show a compact summary under the name instead (phone-only). */
.phone-only { display: none; }

@media (max-width: 760px) {
    .hide-phone { display: none !important; }
    .phone-only { display: revert; }
    .phone-meta { display: block; font-size: .78rem; color: var(--muted); margin-top: .1rem; }

    /* Page headers: actions under the title, full width so they're easy to tap. */
    .page-actions { width: 100%; }

    /* Dialogs use the whole width and start near the top. */
    .modal-x-backdrop { padding: .75rem .5rem 0; }
    .modal-x-head, .modal-x-body { padding-left: .9rem; padding-right: .9rem; }
    /* Long dialogs (a sign-up's positions) keep Save and Cancel on screen. */
    .modal-x-foot {
        flex-wrap: wrap;
        position: sticky;
        bottom: 0;
        background: var(--surface-1);
        border-radius: 0 0 var(--radius) var(--radius);
    }

    /* Comfortable tap targets for row buttons. */
    .table-x .btn-sm { min-height: 36px; }
}

/* ===== Layers: the session's roster or jobs, and the events that differ (Session roster, Session setup) ===== */
/* ---------- what the board is showing ---------- */
.showing { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-bottom: .9rem; font-size: .85rem; }
.showing-pill { font-weight: 650; padding: .15rem .6rem; border-radius: 6px; background: var(--accent-wash); color: var(--accent); }
.showing-pill.event { background: var(--override-wash); color: var(--override-ink); }
.legend { margin-left: auto; display: inline-flex; gap: 1rem; font-size: .76rem; color: var(--ink-2); }
.legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.key { width: 14px; height: 11px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--surface-1); }
.key.open { border-style: dashed; }
.key.override { border-color: var(--override); background: var(--override-wash); }

/* ---------- roster layers: the session roster, and the events that differ from it ---------- */
.layers { display: flex; flex-direction: column; gap: .7rem; padding: 1rem; }
.layers-sub { font-size: .82rem; color: var(--ink-2); margin-top: .15rem; }
.layers-help { font-size: .8rem; color: var(--ink-2); margin: 0; }


.layer-list { display: flex; flex-direction: column; gap: .4rem; }



.layer {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-1);
    color: var(--ink);
    text-align: left;
}

.layer:hover:not(:disabled) { border-color: var(--line-strong); }
.layer:disabled { background: var(--surface-2); color: var(--ink-2); cursor: default; }
.layer.base.on { border-color: var(--accent); background: var(--accent-wash); box-shadow: 0 0 0 1px var(--accent); }
.layer.event.on { border-color: var(--override); background: var(--override-wash); box-shadow: 0 0 0 1px var(--override); }

.layer-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .88rem; font-weight: 650; }
.layer-sub { font-size: .76rem; color: var(--ink-2); }

.layer-pill {
    flex: none;
    font-size: .7rem;
    font-weight: 650;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
}

.layer.base .layer-pill { background: var(--accent-soft); color: var(--accent); }
.layer-pill.change { background: var(--override-soft); color: var(--override-ink); }


/* Session setup: the deck layouts, a list of the session's events in order split into runs. A layout's header picks it;
   its first and last events have ↑ ↓ to move into the layout next to it, and ＋ to split off into a new one. */
.layout-list { display: flex; flex-direction: column; gap: .5rem; }
.deck-layout { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-1); overflow: hidden; }
.deck-layout.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.layout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    padding: .4rem .6rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink);
    font-size: .8rem;
    font-weight: 700;
    text-align: left;
}
.deck-layout.on .layout-head { background: var(--accent-wash); }
.layout-events { list-style: none; margin: 0; padding: .15rem 0; }
.layout-events li { display: flex; align-items: center; gap: .4rem; min-height: 1.7rem; padding: .1rem .6rem; font-size: .8rem; }
.layout-event { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layout-moves { display: flex; gap: .2rem; flex: none; }
.layout-moves button {
    width: 1.5rem;
    height: 1.4rem;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--surface-1);
    color: var(--ink-2);
    font-size: .78rem;
    line-height: 1;
}
.layout-moves button:hover, .layout-moves button:focus-visible { border-color: var(--accent); color: var(--accent); }
/* The session layout: what every deck layout shares, above them. */
.session-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .05rem;
    width: 100%;
    padding: .45rem .6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: .8rem;
    font-weight: 700;
    text-align: left;
}
.session-layout .muted { font-size: .72rem; font-weight: 500; }
.session-layout.on { border-color: var(--accent); background: var(--accent-wash); box-shadow: 0 0 0 1px var(--accent); }
/* A seat of the session's jobs that an event moves or doesn't use: it can't be changed there. */
.seat-lock { margin-left: auto; padding-left: .3rem; font-size: .64rem; color: var(--muted); white-space: nowrap; }


.changes-head { margin-top: .3rem; padding-top: .8rem; border-top: 1px solid var(--line); }

.change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .45rem .65rem;
    border: 1px solid var(--override);
    border-radius: 8px;
    background: var(--override-wash);
}

.change-main { display: flex; flex-direction: column; min-width: 0; }
.change-seat { font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.change-who { font-size: .82rem; }
.change-who s { color: var(--ink-2); }

.revert-all { align-self: flex-start; }

/* An event whose own roster has warnings. */
.layer-pill.warn { background: color-mix(in srgb, var(--warning) 18%, var(--surface-1)); color: var(--warning-ink); }

/* ---------- moving between pages ---------- */
/* roster.js marks the page while the next one is on its way: a thin bar along the top, shown only if it takes more
   than a moment, so a quick page change doesn't flash it. */
html.nav-pending { cursor: progress; }
html.nav-pending body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 2000;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%) no-repeat;
    background-size: 40% 100%;
    opacity: 0;
    animation: nav-bar-show 0s linear 120ms forwards, nav-bar-run 1.1s ease-in-out 120ms infinite;
    pointer-events: none;
}
@keyframes nav-bar-show { to { opacity: 1; } }
@keyframes nav-bar-run { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media print { html.nav-pending body::before { display: none; } }

/* ---------- sign-in pages: sign in, forgot password, choose a password ---------- */
.auth-title {
    font-size: 1.3rem;
    margin: 0 0 1rem;
}

.auth-msg {
    font-size: .88rem;
    padding: .55rem .75rem;
    border-radius: var(--radius-sm);
    background: var(--accent-wash);
    color: var(--ink-2);
    border-left: 3px solid var(--accent);
}

.auth-msg-error {
    background: var(--surface-2);
    color: var(--critical-ink);
    border-left-color: var(--critical);
}

.auth-form {
    gap: .8rem;
}

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

.auth-or::before, .auth-or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line);
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
}

.forgot-link { display: inline-block; margin-top: .3rem; }
