/* ==========================================================================
   NUBCC Committee Application — design system
   Self-contained stylesheet (no build step required).
   Brand palette derived from the club logo: navy #2a358e, grey #87898c, white.
   ========================================================================== */

:root {
    /* Brand — sampled from the NUBCC wordmark */
    --brand-50:  #f2f3fd;
    --brand-100: #e4e7fb;
    --brand-200: #c8cdf5;
    --brand-300: #a2aaec;
    --brand-400: #7a85e0;
    --brand-500: #5561cf;
    --brand-600: #3f4cb8;
    --brand-700: #2a358e;
    --brand-800: #212a72;
    --brand-900: #1a2158;
    --brand-950: #11163a;

    --accent-300: #67e8f9;
    --accent-400: #22d3ee;
    --accent-500: #06b6d4;

    /* Neutrals — warmed slightly toward the logo grey */
    --ink-950: #0a0d18;
    --ink-900: #12161f;
    --ink-800: #1c2230;
    --ink-700: #2c3444;
    --ink-600: #48505f;
    --ink-500: #6a7180;
    --ink-400: #949aa6;
    --ink-300: #bfc4cd;
    --ink-200: #dfe2e8;
    --ink-100: #eef0f4;
    --ink-50:  #f7f8fa;

    --ok-600: #059669;
    --ok-500: #10b981;
    --ok-50:  #ecfdf5;
    --warn-600: #d97706;
    --warn-500: #f59e0b;
    --warn-50: #fffbeb;
    --err-600: #dc2626;
    --err-500: #ef4444;
    --err-50:  #fef2f2;
    --info-500: #3b82f6;
    --info-50:  #eff6ff;

    --surface: #ffffff;
    --page: #f5f6fa;
    --border: #e5e8ee;
    --border-strong: #d3d8e2;

    --radius-xs: 7px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    /* Layered shadows read softer than a single large blur */
    --shadow-xs: 0 1px 2px rgba(17, 22, 58, .05);
    --shadow-sm: 0 1px 2px rgba(17, 22, 58, .05), 0 2px 6px rgba(17, 22, 58, .04);
    --shadow: 0 2px 4px rgba(17, 22, 58, .04), 0 8px 20px rgba(17, 22, 58, .07);
    --shadow-md: 0 4px 8px rgba(17, 22, 58, .05), 0 16px 32px rgba(17, 22, 58, .09);
    --shadow-lg: 0 8px 16px rgba(17, 22, 58, .06), 0 28px 56px rgba(17, 22, 58, .13);
    --ring: 0 0 0 3.5px rgba(63, 76, 184, .16);

    --font: "Inter", "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-bn: "Hind Siliguri", "Noto Sans Bengali", var(--font);
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --max: 1160px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-800);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

html[lang="bn"] body, body.lang-bn { font-family: var(--font-bn); }

img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 {
    margin: 0 0 .4em;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -.021em;
    color: var(--ink-900);
}
h1 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -.025em; }
h3 { font-size: 1.075rem; }
p { margin: 0 0 1em; }

::selection { background: var(--brand-200); color: var(--brand-900); }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 22px; }
.container-wide { max-width: 1440px; }

/* Custom scrollbars keep long lists from looking heavy */
.post-picker, .sidebar__nav, .modal__body {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-300) transparent;
}
.post-picker::-webkit-scrollbar, .sidebar__nav::-webkit-scrollbar, .modal__body::-webkit-scrollbar { width: 8px; }
.post-picker::-webkit-scrollbar-thumb, .modal__body::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 99px; }

/* ---------- Brand logo ---------- */
/* The lockup is tall and narrow; height is set per placement by the logo component. */
.logo-img { display: block; width: auto; object-fit: contain; flex: none; }

/* ---------- Header nav ---------- */
.header-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav__link {
    color: rgba(255, 255, 255, .76);
    font-size: .875rem; font-weight: 600;
    padding: 8px 14px; border-radius: 9px;
    text-decoration: none;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.site-nav__link:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.site-nav__link.is-active { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Language switch ---------- */
body[data-lang="bn"] .lang-en { display: none; }
body[data-lang="en"] .lang-bn { display: none; }

.lang-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    backdrop-filter: blur(8px);
}
.lang-toggle button {
    border: 0; background: transparent; color: rgba(255, 255, 255, .82);
    font: inherit; font-size: .8rem; font-weight: 600;
    padding: 6px 15px; border-radius: 999px; cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-toggle button:hover { color: #fff; }
.lang-toggle button[aria-pressed="true"] {
    background: #fff; color: var(--brand-700);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}

/* ---------- Public header ---------- */
.site-header {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1100px 460px at 78% -10%, rgba(34, 211, 238, .26), transparent 60%),
        radial-gradient(760px 420px at 8% 108%, rgba(85, 97, 207, .40), transparent 62%),
        linear-gradient(150deg, var(--brand-950) 0%, var(--brand-800) 52%, var(--brand-700) 100%);
}
/* Faint grid gives the "computer club" surface some texture */
.site-header::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
    pointer-events: none;
}
.site-header > * { position: relative; z-index: 1; }

.site-header__bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; color: #fff; }
/* No fixed height here — the logo component sets its own so each variant can size itself. */
.brand__logo { display: flex; align-items: center; flex: none; }
.brand__divider { width: 1px; height: 30px; background: rgba(255, 255, 255, .2); flex: none; }
/* These live inside inline <span> wrappers, so they must be blocks to stack. */
.brand__name { display: block; font-weight: 700; font-size: 1rem; line-height: 1.25; letter-spacing: -.01em; }
.brand__sub { display: block; font-size: .755rem; color: rgba(255, 255, 255, .68); letter-spacing: .01em; }

.hero { padding: 22px 0 52px; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .92);
    font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero__badge .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent-400);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .25);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.hero h1 { color: #fff; max-width: 20ch; margin-bottom: .35em; }
.hero p { color: rgba(255, 255, 255, .8); max-width: 60ch; margin-bottom: 0; font-size: 1.02rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.hero__chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .94);
    font-size: .8rem; font-weight: 500;
    padding: 8px 14px; border-radius: 10px;
    backdrop-filter: blur(6px);
}
.hero__chip svg { opacity: .8; }

/* ---------- Deadline countdown ---------- */
.countdown {
    margin-top: 22px;
    padding: 16px 18px;
    max-width: 460px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .17);
    backdrop-filter: blur(8px);
}
.countdown__head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: rgba(255, 255, 255, .9); }
.countdown__label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.countdown__units { display: flex; gap: 9px; }
.countdown__unit {
    flex: 1; min-width: 0; text-align: center;
    padding: 9px 6px;
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .14);
}
.countdown__unit b {
    display: block;
    font-size: 1.5rem; font-weight: 800; line-height: 1.1;
    color: #fff; font-variant-numeric: tabular-nums;
}
.countdown__unit small {
    display: block; margin-top: 2px;
    font-size: .64rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}

.countdown__deadline { margin: 10px 0 0; font-size: .76rem; color: rgba(255, 255, 255, .62); }
.countdown__expired { margin: 0; font-size: .9rem; font-weight: 600; color: #ffd7d7; }

/* Last 24 hours — warm the panel so the urgency is obvious. */
.countdown.is-urgent {
    background: rgba(239, 68, 68, .18);
    border-color: rgba(255, 150, 150, .42);
}
.countdown.is-urgent .countdown__unit { background: rgba(255, 255, 255, .14); }

@media (max-width: 520px) {
    .countdown { max-width: none; padding: 13px 14px; }
    .countdown__unit b { font-size: 1.25rem; }
}

/* ---------- Cards & panels ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card__head { padding: 19px 24px; border-bottom: 1px solid var(--border); }
.card__head h2 { letter-spacing: -.015em; }
.card__body { padding: 26px 24px; }
.card__foot {
    padding: 16px 24px; border-top: 1px solid var(--border);
    background: var(--ink-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }

/* The wizard card gets a hairline brand accent along its top edge */
.card--accent { position: relative; overflow: hidden; }
.card--accent::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand-700), var(--brand-500) 45%, var(--accent-500));
}

/* ---------- Stepper ---------- */
.stepper-wrap {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.stepper { display: flex; gap: 3px; overflow-x: auto; padding: 12px 0 10px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }

.step-pill {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 14px; border-radius: 10px;
    border: 1px solid transparent; background: transparent;
    font: inherit; font-size: .83rem; font-weight: 500; color: var(--ink-500);
    white-space: nowrap; cursor: pointer; flex: none;
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.step-pill:hover:not(:disabled) { background: var(--ink-100); color: var(--ink-800); }
.step-pill:disabled { cursor: not-allowed; opacity: .5; }
.step-pill__num {
    width: 23px; height: 23px; border-radius: 7px;
    display: grid; place-items: center; flex: none;
    background: var(--ink-200); color: var(--ink-600);
    font-size: .73rem; font-weight: 700;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.step-pill.is-active {
    background: var(--brand-50); border-color: var(--brand-200);
    color: var(--brand-700); font-weight: 600;
}
.step-pill.is-active .step-pill__num { background: var(--brand-700); color: #fff; }
.step-pill.is-done { color: var(--ink-700); }
.step-pill.is-done .step-pill__num { background: var(--ok-500); color: #fff; }

.progress-track { height: 3px; background: var(--ink-200); border-radius: 999px; overflow: hidden; }
.progress-bar {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand-700), var(--brand-500) 60%, var(--accent-500));
    border-radius: 999px;
    transition: width .4s var(--ease);
}

/* ---------- Steps ---------- */
.step { display: none; }
.step.is-active { display: block; animation: stepIn .32s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.step__head { margin-bottom: 24px; }
.step__eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .7rem; font-weight: 700; letter-spacing: .11em;
    text-transform: uppercase; color: var(--brand-600); margin-bottom: 8px;
}
.step__eyebrow::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--brand-500); }
.step__title { font-size: 1.5rem; margin-bottom: 5px; }
.step__desc { color: var(--ink-500); margin: 0; font-size: .93rem; max-width: 68ch; }

/* ---------- Forms ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2; }
.col-full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field__label { font-size: .87rem; font-weight: 600; color: var(--ink-800); letter-spacing: -.005em; }
.field__label .req { color: var(--err-500); margin-left: 2px; }
.field__hint { font-size: .79rem; color: var(--ink-500); line-height: 1.5; }
.field__error { font-size: .79rem; color: var(--err-600); font-weight: 500; display: none; }
.field.has-error .field__error { display: flex; align-items: center; gap: 5px; }
.field.has-error .field__error::before { content: "!"; width: 14px; height: 14px; border-radius: 50%; background: var(--err-500); color: #fff; font-size: .62rem; font-weight: 800; display: grid; place-items: center; flex: none; }

.input, .select, .textarea {
    width: 100%; font: inherit; font-size: .93rem; color: var(--ink-900);
    background: #fff; border: 1px solid var(--border-strong);
    border-radius: var(--radius-xs); padding: 11px 13px;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover:not(:focus), .select:hover:not(:focus), .textarea:hover:not(:focus) { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand-500); box-shadow: var(--ring);
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--err-500); box-shadow: 0 0 0 3.5px rgba(239, 68, 68, .12); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.66; }
.select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236a7180' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}
input[type="date"], input[type="datetime-local"] { cursor: pointer; }
.char-count { font-size: .74rem; color: var(--ink-400); text-align: right; font-variant-numeric: tabular-nums; }
.char-count.is-low { color: var(--warn-600); }

/* Radio / checkbox cards */
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.choice {
    position: relative; display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
    padding: 12px 14px; cursor: pointer; background: #fff;
    transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.choice:hover { border-color: var(--brand-300); background: var(--brand-50); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__dot {
    width: 18px; height: 18px; border-radius: 50%; flex: none;
    border: 2px solid var(--ink-300); background: #fff;
    display: grid; place-items: center;
    transition: border-color .16s var(--ease);
}
.choice__dot::after {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--brand-700); transform: scale(0);
    transition: transform .18s var(--ease);
}
.choice input:checked ~ .choice__dot { border-color: var(--brand-700); }
.choice input:checked ~ .choice__dot::after { transform: scale(1); }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: var(--ring); }
.choice__text { font-size: .88rem; font-weight: 500; }

.checkbox { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-700); flex: none; cursor: pointer; }
.checkbox__text { font-size: .9rem; line-height: 1.55; }

/* A prominent, card-like agreement box */
.consent {
    border: 1.5px solid var(--border-strong); border-radius: var(--radius);
    padding: 16px 18px; background: var(--ink-50);
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
.consent:has(input:checked) { border-color: var(--ok-500); background: var(--ok-50); }
.field.has-error .consent { border-color: var(--err-500); background: var(--err-50); }

/* File upload */
.upload {
    position: relative; display: flex; align-items: center; gap: 14px;
    border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
    padding: 16px; background: var(--ink-50); cursor: pointer;
    transition: border-color .16s var(--ease), background .16s var(--ease);
}
.upload:hover { border-color: var(--brand-400); background: var(--brand-50); }
.upload.is-filled { border-style: solid; border-color: var(--ok-500); background: var(--ok-50); }
.upload.has-error { border-color: var(--err-500); background: var(--err-50); }
.upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload__icon {
    width: 42px; height: 42px; border-radius: 11px; flex: none;
    background: #fff; border: 1px solid var(--border);
    display: grid; place-items: center; color: var(--brand-600);
    box-shadow: var(--shadow-xs);
}
.upload.is-filled .upload__icon { color: var(--ok-600); border-color: rgba(16, 185, 129, .3); }
.upload__body { min-width: 0; flex: 1; }
.upload__title { font-size: .88rem; font-weight: 600; }
.upload__meta { font-size: .77rem; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__thumb { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; border: 1px solid var(--border); flex: none; }

/* ---------- Requirement / rule lists ---------- */
.req-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.req-item {
    display: flex; gap: 13px; padding: 16px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.req-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-200); }
.req-item__icon {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    background: linear-gradient(140deg, var(--brand-100), var(--brand-50));
    color: var(--brand-700);
    display: grid; place-items: center;
    border: 1px solid var(--brand-100);
}
.req-item__title { font-size: .9rem; font-weight: 600; margin-bottom: 3px; }
.req-item__note { font-size: .8rem; color: var(--ink-500); line-height: 1.55; }

.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; counter-reset: rule; }
.rule-list li {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: .89rem; line-height: 1.6; color: var(--ink-700);
}
.rule-list li::before {
    counter-increment: rule; content: counter(rule);
    width: 23px; height: 23px; border-radius: 7px; flex: none;
    background: var(--brand-700); color: #fff;
    font-size: .71rem; font-weight: 700;
    display: grid; place-items: center; margin-top: 1px;
}

/* ---------- Post picker ---------- */
.post-search { position: relative; margin-bottom: 12px; }
.post-search .input { padding-left: 40px; }
.post-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-400); pointer-events: none; }

.post-picker {
    max-height: 430px; overflow-y: auto;
    border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff;
}
.post-group__label {
    position: sticky; top: 0; z-index: 1;
    background: rgba(247, 248, 250, .96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
    padding: 9px 16px; font-size: .72rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500);
}
.post-option {
    /* Anchors the visually hidden radio to this label. Without it the radio's
       containing block is the card, so it escapes the picker's overflow clipping and
       lands thousands of pixels down the page — focusing it then scrolls the form away. */
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 11px 16px; cursor: pointer; border-bottom: 1px solid var(--ink-100);
    transition: background .14s var(--ease);
}
.post-option:last-child { border-bottom: 0; }
.post-option:hover { background: var(--brand-50); }
.post-option input { position: absolute; opacity: 0; pointer-events: none; }
.post-option__dot {
    width: 17px; height: 17px; border-radius: 50%; flex: none;
    border: 2px solid var(--ink-300); display: grid; place-items: center;
    transition: border-color .15s var(--ease);
}
.post-option__dot::after {
    content: ""; width: 7px; height: 7px; border-radius: 50%;
    background: var(--brand-700); transform: scale(0); transition: transform .16s var(--ease);
}
.post-option input:checked ~ .post-option__dot { border-color: var(--brand-700); }
.post-option input:checked ~ .post-option__dot::after { transform: scale(1); }
.post-option:has(input:checked) { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand-600); }
.post-option__title { font-size: .88rem; font-weight: 500; display: block; }
.post-option__desc { font-size: .77rem; color: var(--ink-500); display: block; }
.post-empty { padding: 32px; text-align: center; color: var(--ink-400); font-size: .87rem; }

/* ---------- Review ---------- */
.review-group {
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; margin-bottom: 14px; background: #fff;
}
.review-group__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; background: var(--ink-50); border-bottom: 1px solid var(--border);
}
.review-group__title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-600); }
.review-list { display: grid; grid-template-columns: minmax(180px, 250px) 1fr; }
.review-list dt {
    padding: 10px 16px; font-size: .82rem; color: var(--ink-500);
    border-bottom: 1px solid var(--ink-100); font-weight: 500;
}
.review-list dd {
    padding: 10px 16px; margin: 0; font-size: .87rem; color: var(--ink-900);
    border-bottom: 1px solid var(--ink-100); word-break: break-word; white-space: pre-wrap;
}
.review-list dt:last-of-type, .review-list dd:last-of-type { border-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: .89rem; font-weight: 600; letter-spacing: -.005em;
    padding: 11px 20px; border-radius: var(--radius-xs);
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease),
                box-shadow .16s var(--ease), transform .08s var(--ease);
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
    color: #fff; box-shadow: 0 1px 2px rgba(26, 33, 88, .3), 0 3px 10px rgba(42, 53, 142, .22);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--brand-700), var(--brand-800)); color: #fff; }
.btn-success {
    background: linear-gradient(180deg, var(--ok-500), var(--ok-600));
    color: #fff; box-shadow: 0 1px 2px rgba(5, 150, 105, .3), 0 3px 10px rgba(16, 185, 129, .24);
}
.btn-success:hover:not(:disabled) { background: linear-gradient(180deg, var(--ok-600), #047857); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-700); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-ghost:hover:not(:disabled) { background: var(--ink-50); border-color: var(--ink-400); color: var(--ink-900); }
.btn-danger { background: var(--err-500); color: #fff; box-shadow: 0 1px 2px rgba(220, 38, 38, .3); }
.btn-danger:hover:not(:disabled) { background: var(--err-600); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: .95rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 8px; }

.step-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border);
}
.step-nav__spacer { flex: 1; }

/* ---------- Alerts & badges ---------- */
.alert {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 13px 16px; border-radius: var(--radius-xs);
    font-size: .87rem; line-height: 1.55; margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert svg { flex: none; margin-top: 2px; }
.alert-info { background: var(--info-50); color: #1e40af; border-color: #bfdbfe; }
.alert-success { background: var(--ok-50); color: #065f46; border-color: #a7f3d0; }
.alert-warn { background: var(--warn-50); color: #92400e; border-color: #fde68a; }
.alert-error { background: var(--err-50); color: #991b1b; border-color: #fecaca; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
/* Inline links inherit the alert's tone, but a button inside one keeps its own. */
.alert a:not(.btn) { color: inherit; text-decoration: underline; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: .73rem; font-weight: 600;
    background: var(--ink-100); color: var(--ink-600);
    white-space: nowrap;
}
.badge-green { background: var(--ok-50); color: #047857; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .22); }
.badge-blue { background: var(--info-50); color: #1d4ed8; box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .22); }
.badge-amber { background: var(--warn-50); color: #b45309; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .25); }
.badge-red { background: var(--err-50); color: #b91c1c; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .22); }
.badge-slate { background: var(--ink-100); color: var(--ink-600); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* ---------- Public footer ---------- */
.site-footer {
    margin-top: 52px; padding: 30px 0;
    border-top: 1px solid var(--border); background: #fff;
    color: var(--ink-500); font-size: .84rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.site-footer__brand { display: flex; align-items: center; gap: 11px; }
.site-footer__credit {
    margin: 18px 0 0;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .8rem;
    color: var(--ink-500);
}
.site-footer__credit strong { color: var(--ink-800); font-weight: 700; }
.site-footer__credit-role { color: var(--ink-400); }
.site-footer__credit-role::before { content: "· "; }
.site-footer__brand .logo-img { flex: none; }

/* ---------- Success / closed pages ---------- */
.state-page { min-height: 70vh; display: grid; place-items: center; padding: 52px 0; }
.state-card { max-width: 640px; width: 100%; text-align: center; padding: 44px 38px; box-shadow: var(--shadow-md); }
.state-card .logo-img { margin: 0 auto 22px; }
.state-icon { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; }
.state-icon-ok { background: var(--ok-50); color: var(--ok-500); box-shadow: 0 0 0 8px rgba(16, 185, 129, .08); }
.state-icon-warn { background: var(--warn-50); color: var(--warn-500); box-shadow: 0 0 0 8px rgba(245, 158, 11, .08); }
.tracking-code {
    display: inline-block; font-family: var(--mono);
    font-size: 1.12rem; font-weight: 700; letter-spacing: .07em;
    background: var(--brand-50); color: var(--brand-700);
    border: 1px dashed var(--brand-300); border-radius: var(--radius-sm);
    padding: 12px 24px; margin: 6px 0 20px;
}

/* ==========================================================================
   Admin panel
   ========================================================================== */
.admin-body { background: var(--page); }
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 262px; flex: none;
    background: linear-gradient(180deg, var(--brand-950) 0%, #0d1130 60%, var(--brand-950) 100%);
    color: var(--ink-300);
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    border-right: 1px solid rgba(255, 255, 255, .07);
    transition: transform .28s var(--ease);
}
.sidebar__head { padding: 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar__brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.sidebar__brand:hover { text-decoration: none; color: #fff; }
.sidebar__logo { display: flex; align-items: center; flex: none; }
.sidebar__title { display: block; font-size: .9rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.sidebar__subtitle { display: block; font-size: .71rem; color: var(--ink-500); }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 12px; }
.nav-label {
    font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
    color: #5b6478; padding: 14px 10px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 11px; border-radius: 9px; margin-bottom: 2px;
    color: #b3bacb; font-size: .87rem; font-weight: 500; text-decoration: none;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-link.is-active {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
    color: #fff; box-shadow: 0 2px 10px rgba(42, 53, 142, .45);
}
.nav-link svg { flex: none; opacity: .85; }
.nav-link.is-active svg { opacity: 1; }
.nav-link__count {
    margin-left: auto; font-size: .71rem; font-weight: 700;
    background: var(--accent-500); color: #04222b;
    padding: 1px 8px; border-radius: 999px;
}
.nav-link.is-active .nav-link__count { background: rgba(255, 255, 255, .22); color: #fff; }

.sidebar__foot { padding: 13px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar__user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    background: linear-gradient(140deg, var(--brand-500), var(--brand-700));
    color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700;
}
.sidebar__user-name { display: block; font-size: .84rem; font-weight: 600; color: #fff; line-height: 1.2; }
.sidebar__user-role { display: block; font-size: .71rem; color: var(--ink-500); text-transform: capitalize; }
.sidebar__foot .btn-ghost {
    background: rgba(255, 255, 255, .06); color: #cdd3df;
    border-color: rgba(255, 255, 255, .12); box-shadow: none;
}
.sidebar__foot .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); }

.admin-main { flex: 1; min-width: 0; margin-left: 262px; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px; padding: 13px 26px;
}
.topbar__title { font-size: 1.05rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sidebar-toggle { display: none; }
.admin-content { padding: 26px; flex: 1; }
.sidebar-backdrop { display: none; }

/* Stat tiles */
.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 20px; }
.stat {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; display: flex; gap: 14px; align-items: flex-start;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat__icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.stat__label { font-size: .78rem; color: var(--ink-500); font-weight: 500; }
.stat__value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -.035em; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.stat__meta { font-size: .75rem; color: var(--ink-400); }

.tint-brand { background: var(--brand-50); color: var(--brand-700); }
.tint-green { background: var(--ok-50); color: var(--ok-600); }
.tint-amber { background: var(--warn-50); color: var(--warn-600); }
.tint-blue { background: var(--info-50); color: var(--info-500); }
.tint-red { background: var(--err-50); color: var(--err-600); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 760px; }
.table th {
    text-align: left; padding: 11px 15px; white-space: nowrap;
    background: var(--ink-50); border-bottom: 1px solid var(--border);
    font-size: .72rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--ink-500);
}
.table td { padding: 12px 15px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .14s var(--ease); }
.table tbody tr:hover { background: var(--brand-50); }
.table__name { font-weight: 600; color: var(--ink-900); }
.table__sub { font-size: .77rem; color: var(--ink-500); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

.empty-state { padding: 60px 24px; text-align: center; color: var(--ink-400); }
.empty-state h3 { color: var(--ink-600); margin-bottom: 4px; }

/* Filter bar */
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); align-items: end; }
.filters .field { gap: 5px; }
.filters .field__label { font-size: .75rem; color: var(--ink-500); font-weight: 600; }
.filters .input, .filters .select { padding: 8px 11px; font-size: .85rem; }

/* Bar chart (dashboard) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 152px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar {
    width: 100%; border-radius: 6px 6px 3px 3px; min-height: 3px;
    background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
    transition: opacity .16s var(--ease);
}
.bar-col:hover .bar { opacity: .75; }
.bar-label { font-size: .65rem; color: var(--ink-400); white-space: nowrap; }

.meter { height: 7px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-600), var(--brand-500)); }

/* Detail view */
.detail-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 336px; align-items: start; }
.detail-list { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; }
.detail-list dt { padding: 9px 0; font-size: .82rem; color: var(--ink-500); border-bottom: 1px solid var(--ink-100); }
.detail-list dd { padding: 9px 0; margin: 0; font-size: .87rem; border-bottom: 1px solid var(--ink-100); word-break: break-word; }
.detail-list dd.prewrap { white-space: pre-wrap; line-height: 1.65; }
.detail-list dt:last-of-type, .detail-list dd:last-of-type { border-bottom: 0; }

.file-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.file-tile {
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    overflow: hidden; background: #fff; text-decoration: none; color: inherit;
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.file-tile:hover { box-shadow: var(--shadow); border-color: var(--brand-300); text-decoration: none; transform: translateY(-2px); }
.file-tile__preview { height: 110px; background: var(--ink-50); display: grid; place-items: center; color: var(--ink-400); }
.file-tile__preview img { width: 100%; height: 100%; object-fit: cover; }
.file-tile__label { padding: 8px 10px; font-size: .78rem; font-weight: 600; border-top: 1px solid var(--border); }

.applicant-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

/* One-time edit link, surfaced when the email cannot be delivered */
.link-once { background: var(--info-50); border: 1px solid #bfdbfe; border-radius: var(--radius-xs); padding: 11px 12px; }
.link-once__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .78rem; color: #1e40af; margin-bottom: 8px; }
.link-once__head strong { font-size: .82rem; }
.link-once__head span { color: var(--ink-500); }
.link-once__row { display: flex; gap: 7px; align-items: stretch; }
.link-once__row .input { font-family: var(--mono); font-size: .72rem; padding: 7px 9px; }
.link-once__row .btn { flex: none; }

/* Applicant edit mode: banner above the wizard, and "already on file" notes */
.edit-banner {
    display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
    background: linear-gradient(135deg, #eef1ff, #f7f9ff);
    border: 1px solid #c9d2f5;
    border-left: 4px solid var(--brand-700);
    border-radius: var(--radius);
    padding: 15px 18px; margin-bottom: 20px;
}
.edit-banner__icon { flex: none; color: var(--brand-700); margin-top: 1px; }
.edit-banner__body { flex: 1 1 260px; min-width: 0; }
.edit-banner__body strong { display: block; color: var(--ink-800); font-size: .95rem; }
.edit-banner__body p { margin: 4px 0 0; font-size: .83rem; line-height: 1.6; color: var(--ink-600); }
.edit-banner__body b { color: var(--brand-700); font-family: ui-monospace, Menlo, Consolas, monospace; }
.edit-banner__limits { display: flex; gap: 10px; flex: none; }
.edit-banner__stat {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 92px; padding: 8px 12px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xs);
}
.edit-banner__stat b { font-size: 1rem; color: var(--ink-800); line-height: 1.2; }
.edit-banner__stat small { font-size: .68rem; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-500); margin-top: 2px; }

.upload-current {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-top: 7px; font-size: .78rem; color: var(--ink-600);
}
.upload-current svg { flex: none; color: var(--ok-500); }
.upload-current a { color: var(--brand-700); font-weight: 600; word-break: break-all; }
.upload-current em { font-style: normal; color: var(--ink-500); }

.state-contact { font-size: .88rem; line-height: 1.7; color: var(--ink-600); }
.state-contact__name { font-weight: 700; color: var(--ink-800); }

/* Edit-access panel and the field-level change history in the admin */
.grant-box { background: var(--ink-50); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 13px; }
.grant-box__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; padding: 4px 0; }
.grant-box__row span:first-child { color: var(--ink-500); }
.grant-box__row span:last-child { color: var(--ink-800); font-weight: 600; text-align: right; }
.grant-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .69rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
.grant-pill--active { background: var(--ok-50); color: #047857; }
.grant-pill--dead { background: var(--ink-100); color: var(--ink-500); }

.revision { border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; }
.revision + .revision { margin-top: 12px; }
.revision__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: var(--ink-50); border-bottom: 1px solid var(--border);
    padding: 9px 13px; font-size: .79rem; color: var(--ink-600);
}
.revision__head strong { color: var(--ink-800); }
.revision__field { padding: 11px 13px; border-top: 1px dashed var(--border); }
.revision__field:first-child { border-top: 0; }
.revision__name { font-size: .78rem; font-weight: 700; color: var(--ink-800); margin-bottom: 6px; }
.revision__pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 9px; align-items: start; }
.revision__val { font-size: .79rem; line-height: 1.55; padding: 7px 10px; border-radius: 6px; word-break: break-word; }
.revision__val--from { background: #fef2f2; color: #991b1b; text-decoration: line-through; text-decoration-color: rgba(153,27,27,.35); }
.revision__val--to { background: #ecfdf5; color: #065f46; }
.revision__val em { font-style: italic; opacity: .7; }
.revision__arrow { color: var(--ink-400); padding-top: 7px; }

@media (max-width: 560px) {
    .revision__pair { grid-template-columns: 1fr; }
    .revision__arrow { display: none; }
}

/* Status-email controls inside the review panel */
.notify-box {
    background: var(--ink-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 12px 13px;
}
.notify-box__toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .87rem; font-weight: 600; color: var(--ink-800); }
.notify-box__toggle input { width: 16px; height: 16px; accent-color: var(--brand-700); cursor: pointer; flex: none; }
.notify-box__hint { margin: 7px 0 0; font-size: .78rem; line-height: 1.55; color: var(--ink-500); }
.notify-box__hint strong { color: var(--ink-700); word-break: break-all; }
.notify-box__sent {
    display: flex; align-items: center; gap: 6px;
    margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--border);
    font-size: .77rem; line-height: 1.45; color: #047857;
}
.notify-box__sent svg { flex: none; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(10, 13, 24, .55); backdrop-filter: blur(4px);
    display: none; padding: 20px; overflow-y: auto;
}
.modal-backdrop.is-open { display: block; }
.modal {
    background: #fff; border-radius: var(--radius-lg);
    max-width: 640px; margin: 40px auto; box-shadow: var(--shadow-lg);
    animation: modalIn .22s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal__title { margin: 0; font-size: 1.02rem; }
.modal__body { padding: 22px; max-height: 68vh; overflow-y: auto; }
.modal__foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 9px; background: var(--ink-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-close { background: none; border: 0; cursor: pointer; color: var(--ink-500); padding: 5px; border-radius: 7px; display: grid; place-items: center; transition: background .15s var(--ease); }
.modal-close:hover { background: var(--ink-100); color: var(--ink-900); }

/* Login */
.login-page {
    /* Flex + margin:auto centres without clipping the top when the viewport is
       shorter than the card (place-items:center pushes overflow out of reach). */
    min-height: 100vh; display: flex; padding: 32px 24px;
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 500px at 82% 8%, rgba(34, 211, 238, .2), transparent 60%),
        radial-gradient(700px 500px at 12% 96%, rgba(85, 97, 207, .34), transparent 62%),
        linear-gradient(150deg, var(--brand-950), #0d1130 55%, var(--brand-800));
}
.login-page::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%);
}
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; margin: auto; }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand img { width: auto; margin: 0 auto 14px; object-fit: contain; }
.login-brand__title { color: #fff; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.login-brand__sub { color: rgba(255, 255, 255, .6); font-size: .82rem; }
.login-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 32px; }

/* Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .78rem; }
.text-muted { color: var(--ink-500); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
/* The hidden attribute has to beat the display rules components set on themselves. */
[hidden] { display: none !important; }
.break-all { word-break: break-all; }
.divider { height: 1px; background: var(--border); margin: 22px 0; border: 0; }

/* ---------- Committee board (placements) ---------- */
.board-note {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 15px; margin-bottom: 16px;
    border: 1px solid var(--border); border-left: 3px solid var(--brand-500);
    border-radius: var(--radius-sm); background: var(--brand-50);
    color: var(--ink-700); font-size: .86rem; line-height: 1.5;
}
.board-note svg { flex: none; margin-top: 1px; color: var(--brand-600); }

.board { display: grid; grid-template-columns: 322px minmax(0, 1fr); gap: 18px; align-items: start; }

.board__pool {
    position: sticky; top: 78px;
    display: flex; flex-direction: column; max-height: calc(100vh - 104px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.board__pool-head { display: grid; gap: 9px; padding: 14px; border-bottom: 1px solid var(--border); background: var(--ink-50); }
.board__pool-list { flex: 1; overflow-y: auto; padding: 12px; }
.board__title { margin: 0; font-size: .95rem; }
.board__count { font-size: .76rem; color: var(--ink-500); white-space: nowrap; }

.board__posts { display: grid; gap: 22px; }
.board__group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.board__group-tools { display: flex; align-items: center; gap: 10px; }
.board__remove-group {
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
    padding: 2px 10px; font-size: .7rem; color: var(--ink-500); cursor: pointer; opacity: 0;
    transition: opacity .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.board__group:hover .board__remove-group, .board__remove-group:focus { opacity: 1; }
.board__remove-group:hover { color: var(--err-600); border-color: var(--err-500); }
.slot-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); align-items: start; }

.slot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.slot__head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--border); }
.slot__headings { flex: 1; min-width: 0; }
.slot__grip {
    display: grid; place-items: center; flex: none; cursor: grab;
    color: var(--ink-300); border-radius: 6px; padding: 2px;
    transition: color .15s var(--ease), background .15s var(--ease);
}
.slot__grip:active { cursor: grabbing; }
.slot:hover .slot__grip { color: var(--ink-500); }
.slot__grip:hover { background: var(--ink-100); color: var(--brand-700); }
.slot__remove {
    display: grid; place-items: center; flex: none; width: 22px; height: 22px;
    border: 1px solid transparent; border-radius: 6px; background: none;
    color: var(--ink-300); cursor: pointer; opacity: 0;
    transition: opacity .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.slot:hover .slot__remove, .slot__remove:focus { opacity: 1; }
.slot__remove:hover { color: var(--err-600); border-color: var(--err-500); }
/* The column being carried, and the row it is being carried into. */
.slot.is-moving { opacity: .45; }
.slot-grid.is-regrouping { outline: 2px dashed var(--brand-300); outline-offset: 6px; border-radius: var(--radius); }
.slot__title { font-weight: 700; font-size: .88rem; }
/* A heading that is really a button: it reads as text until you reach for it. */
.name-edit {
    border: 0; background: none; padding: 0; margin: 0; cursor: text;
    font: inherit; color: inherit; text-align: left;
    border-bottom: 1px dashed transparent;
    transition: border-color .15s var(--ease), color .15s var(--ease);
}
.name-edit:hover { color: var(--brand-700); border-bottom-color: var(--brand-300); }
.slot__rename { display: grid; gap: 7px; padding: 11px 13px; border-bottom: 1px solid var(--border); background: var(--ink-50); }
.slot__rename .input { padding: 6px 9px; font-size: .82rem; }
.slot__rename-seats { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--ink-500); }
.slot__rename-seats .input { width: 74px; }
.slot__rename-warn { margin: 0; font-size: .73rem; line-height: 1.45; color: var(--warn-600); }
.slot__rename-actions { display: flex; gap: 6px; }
.slot__sub { font-size: .73rem; color: var(--ink-500); }
.slot__seats {
    font-size: .78rem; font-weight: 700; color: var(--ink-600);
    background: var(--ink-100); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.slot__seats-of { color: var(--ink-400); font-weight: 600; }
/* More people placed than the post has seats: not blocked, just flagged. */
.slot.is-over { border-color: var(--warn-500); }
.slot.is-over .slot__seats { background: var(--warn-50); color: var(--warn-600); }

.board__drop { display: grid; gap: 9px; align-content: start; }
.slot__drop { padding: 11px; min-height: 86px; }
.board__drop.is-dropping { background: var(--brand-50); outline: 2px dashed var(--brand-300); outline-offset: -4px; border-radius: var(--radius-sm); }
.board__empty { margin: 0; padding: 12px 4px; text-align: center; font-size: .76rem; color: var(--ink-400); }

.board-card {
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    padding: 9px 11px 7px; cursor: grab; transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.board-card:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-300); }
/* No payment marked: the panel should see that before placing anyone. */
.board-card.is-unpaid { border-left: 3px solid var(--err-500); }
.board-card__badges { display: flex; align-items: center; gap: 5px; flex: none; }
.board-card__unpaid {
    background: var(--err-50); color: var(--err-600);
    border: 1px solid rgba(239, 68, 68, .28); border-radius: 999px;
    padding: 1px 8px; font-size: .66rem; font-weight: 700; white-space: nowrap;
}
.board-card:active { cursor: grabbing; }
.board-card.is-dragging { opacity: .4; transform: scale(.98); }
.board-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-card__name { font-weight: 700; font-size: .85rem; line-height: 1.3; }
.board-card__meta { font-size: .73rem; color: var(--ink-500); margin-top: 2px; }
.board-card__star { color: var(--warn-500); }

/* The applicant's own answer. Always on the card, never edited by the board. */
.board-card__applied { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: .72rem; }
.board-card__applied-label { color: var(--ink-400); text-transform: uppercase; letter-spacing: .05em; font-size: .64rem; font-weight: 700; }
.board-card__applied-post { color: var(--ink-700); font-weight: 600; }
.board-card__moved { background: var(--warn-50); color: var(--warn-600); border-radius: 999px; padding: 1px 7px; font-size: .66rem; font-weight: 700; }

/* The panel's decision, shown only when it differs from the application. */
.board-card__given { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 3px; font-size: .72rem; }
.board-card__given svg { color: var(--warn-500); }
.board-card__given-label { color: var(--ink-400); text-transform: uppercase; letter-spacing: .05em; font-size: .64rem; font-weight: 700; }
.board-card__given-post { color: var(--warn-600); font-weight: 700; }

.board-card__note {
    display: flex; align-items: flex-start; gap: 5px; margin: 7px 0 0;
    padding: 6px 8px; border-radius: var(--radius-xs);
    background: var(--ink-50); color: var(--ink-600);
    font-size: .73rem; line-height: 1.4;
}
.board-card__note svg { flex: none; margin-top: 2px; color: var(--ink-400); }
.board-card__note-edit { display: flex; gap: 5px; margin-top: 7px; }
.board-card__note-edit .input { padding: 5px 8px; font-size: .75rem; }

.board-card__actions { display: flex; gap: 5px; margin-top: 7px; opacity: .55; transition: opacity .15s var(--ease); }
.board-card:hover .board-card__actions, .board-card:focus-within .board-card__actions { opacity: 1; }
.board-card__btn {
    display: inline-flex; align-items: center; gap: 4px;
    border: 1px solid var(--border-strong); background: #fff; color: var(--ink-700);
    border-radius: 7px; padding: 3px 7px; font-size: .7rem; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: background .15s var(--ease), color .15s var(--ease);
}
.board-card__btn:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); text-decoration: none; }
.board-card__btn--quiet { color: var(--ink-500); }

/* Command palette */
.kbd {
    display: inline-block; margin-left: 3px; padding: 1px 5px; border-radius: 5px;
    border: 1px solid var(--border-strong); background: var(--ink-50);
    font-family: inherit; font-size: .68rem; font-weight: 700; color: var(--ink-600);
}
.palette-backdrop {
    position: fixed; inset: 0; z-index: 120; padding: 12vh 20px 20px;
    background: rgba(10, 13, 24, .5); backdrop-filter: blur(4px);
}
.palette {
    max-width: 560px; margin: 0 auto; background: #fff;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
    animation: modalIn .18s var(--ease);
}
.palette__head { display: flex; align-items: center; gap: 8px; padding: 11px 16px 0; font-size: .74rem; }
.palette__step { color: var(--ink-500); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.palette__chosen { background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.palette__input {
    width: 100%; border: 0; border-bottom: 1px solid var(--border);
    padding: 13px 16px; font-size: 1rem; font-family: inherit; color: var(--ink-900); outline: none;
}
.palette__list { list-style: none; margin: 0; padding: 6px; max-height: 44vh; overflow-y: auto; }
.palette__item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 11px; border-radius: var(--radius-xs); cursor: pointer; font-size: .86rem;
}
.palette__item.is-active { background: var(--brand-50); }
.palette__item--empty { color: var(--ink-400); cursor: default; justify-content: center; }
.palette__label { font-weight: 600; color: var(--ink-900); }
.palette__hint { font-size: .74rem; color: var(--ink-500); white-space: nowrap; }
.palette__foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border); background: var(--ink-50); font-size: .72rem; color: var(--ink-500); }

.board-toast {
    position: fixed; right: 22px; bottom: 22px; z-index: 130;
    background: var(--ink-900); color: #fff; border-radius: var(--radius-sm);
    padding: 10px 15px; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-lg);
    animation: modalIn .18s var(--ease); max-width: 380px;
}
.board-toast.is-bad { background: var(--err-600); }

/* ---------- Committee chain (read-only org chart) ---------- */
.chain-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.chain-head__title { margin: 0; font-size: 1.15rem; }
.chain-head__sub { margin: 3px 0 0; font-size: .84rem; color: var(--ink-500); }
.chain-head__state { display: flex; align-items: center; gap: 9px; }

.chain__tier { display: grid; justify-items: center; }
/* The line that makes the levels read as one chain. */
.chain__link { width: 2px; height: 26px; background: linear-gradient(var(--border-strong), var(--brand-300)); }
.chain__tier-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: center; margin: 14px 0 12px; }
.chain__rank { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--brand-600); background: var(--brand-50); border-radius: 999px; padding: 2px 9px; }
.chain__tier-title { margin: 0; font-size: .98rem; }
.chain__tier-sub { font-size: .79rem; color: var(--ink-500); }

.chain__row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.chain__node {
    flex: 0 1 232px; background: var(--surface);
    border: 1px solid var(--border); border-top: 3px solid var(--brand-500);
    border-radius: var(--radius-sm); padding: 11px 13px 10px; box-shadow: var(--shadow-sm);
}
.chain__node.is-empty { border-top-color: var(--ink-300); background: var(--ink-50); box-shadow: none; }
.chain__node { position: relative; }
.chain__remove-seat {
    position: absolute; top: 7px; right: 7px;
    display: grid; place-items: center; width: 22px; height: 22px;
    border: 1px solid transparent; border-radius: 6px;
    background: none; color: var(--ink-300); cursor: pointer; opacity: 0;
    transition: opacity .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.chain__node:hover .chain__remove-seat, .chain__remove-seat:focus { opacity: 1; }
.chain__remove-seat:hover { color: var(--err-600); border-color: var(--err-500); }
.chain__remove-tier {
    border: 0; background: none; cursor: pointer; padding: 2px 4px;
    font-size: .72rem; font-weight: 600; color: var(--ink-400);
    transition: color .15s var(--ease);
}
.chain__remove-tier:hover { color: var(--err-600); }
.chain__post { font-weight: 700; font-size: .87rem; line-height: 1.35; }
.chain__member { margin-top: 7px; }
.chain__name { display: block; font-size: .86rem; font-weight: 600; color: var(--brand-700); }
.chain__sub { display: block; font-size: .72rem; color: var(--ink-500); }
.chain__moved { color: var(--warn-600); }
.chain__vacant { margin-top: 7px; font-size: .76rem; color: var(--ink-400); }
.chain__note {
    display: flex; align-items: flex-start; gap: 5px; margin: 7px 0 0;
    padding: 6px 8px; border-radius: var(--radius-xs);
    background: var(--ink-50); color: var(--ink-600); font-size: .73rem; line-height: 1.4;
}
.chain__note svg { flex: none; margin-top: 2px; color: var(--ink-400); }
.chain__warn { margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: .71rem; font-weight: 600; color: var(--warn-600); }
.chain__assistants { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--border-strong); font-size: .72rem; color: var(--ink-500); }

/* Posts holding people that the chart has no seat for — each row can make one. */
.orphan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.orphan {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 10px 0; border-bottom: 1px solid var(--ink-100);
}
.orphan:last-child { border-bottom: 0; }
.orphan__post { font-size: .88rem; font-weight: 700; }
.orphan__people { font-size: .78rem; color: var(--ink-500); line-height: 1.45; }
.orphan__form { display: flex; align-items: center; gap: 7px; flex: none; }
.orphan__form .select { width: auto; padding: 6px 30px 6px 10px; font-size: .8rem; }

/* Another level of the chart, added without leaving the page. */
.chain__new-tier {
    margin-top: 26px; border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm); padding: 12px 15px; background: var(--surface);
}
.chain__new-tier summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px;
    font-size: .88rem; font-weight: 700; color: var(--ink-600);
}
.chain__new-tier summary::-webkit-details-marker { display: none; }
.chain__new-tier[open] summary { margin-bottom: 11px; color: var(--brand-700); }
.chain__new-tier-form { display: flex; gap: 8px; flex-wrap: wrap; }
.chain__new-tier-form .input { flex: 1 1 220px; }
.chain__new-tier-form .select { flex: 0 1 210px; width: auto; }

/* People on the chain: portrait, name, and the student ID they are known by. */
.chain__person { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.chain__photo {
    width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--brand-100); background: var(--ink-50);
}
.chain__photo--blank {
    display: grid; place-items: center;
    font-weight: 800; font-size: .95rem; color: var(--brand-600);
}
.chain__person-text { min-width: 0; }
.chain__code { display: block; font-size: .72rem; color: var(--ink-500); letter-spacing: .02em; }

.chain__empty-tier { flex: 0 1 232px; margin: 0; padding: 22px 0; text-align: center; font-size: .8rem; color: var(--ink-400); }

/* Seat added straight from the chain, without a trip to Committee Structure. */
.chain__add {
    flex: 0 1 232px; display: grid; gap: 7px; align-content: start;
    border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
    padding: 11px 13px; background: transparent;
}
.chain__add summary {
    cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--ink-500);
    list-style: none; display: flex; align-items: center; gap: 6px;
}
.chain__add summary::-webkit-details-marker { display: none; }
.chain__add[open] summary { margin-bottom: 4px; color: var(--brand-700); }
.chain__add .input, .chain__add .select { padding: 6px 9px; font-size: .8rem; }
.chain__add-seats { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-500); font-weight: 600; }
.chain__add-seats .input { width: 74px; }

/* Share card — the code and link that open the members-only view. */
.share-card {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--brand-500);
    border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 20px;
}
.share-card__label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-400); }
.share-card__code { font-size: 1.32rem; font-weight: 800; letter-spacing: .16em; color: var(--brand-700); }
.share-card__link { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.share-card__link .input { min-width: 260px; font-size: .8rem; padding: 7px 10px; }

/* Code gate on the public side. */
.codegate { max-width: 440px; margin: 72px auto; text-align: center; }
.codegate__icon {
    display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px;
    border-radius: 50%; background: var(--brand-50); color: var(--brand-600);
}
.codegate__title { margin: 0 0 8px; font-size: 1.5rem; }
.codegate__lead { color: var(--ink-500); margin: 0 0 22px; }
.codegate__form { display: grid; gap: 11px; }
.codegate__input { text-align: center; font-size: 1.5rem; font-weight: 800; letter-spacing: .3em; padding: 13px; }
.codegate__error { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 13px; color: var(--err-600); font-size: .86rem; font-weight: 600; }
.codegate__back { display: inline-block; margin-top: 22px; font-size: .86rem; color: var(--ink-500); }

.shared-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 40px 0 26px; }
.shared-head__title { margin: 0; font-size: 1.5rem; }
.shared-head__sub { margin: 4px 0 0; color: var(--ink-500); font-size: .88rem; }

@media print {
    .chain__node { break-inside: avoid; box-shadow: none; }
    .chain-head { border-bottom: 1px solid #ccc; padding-bottom: 8px; }
}

/* ---------- Payment, viva invite and check-in ---------- */
.viva-box { border-top: 1px solid var(--border); padding-top: 14px; }
.viva-box__line { display: flex; align-items: center; gap: 6px; margin: 0 0 7px; font-size: .82rem; color: var(--ok-600); font-weight: 600; }
.viva-box__code { margin: 0 0 11px; font-size: .82rem; color: var(--ink-600); letter-spacing: .04em; }
.viva-box__hint { margin: 9px 0 0; font-size: .76rem; color: var(--ink-400); }
.mailtest { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-start; }
.mailtest__send { display: flex; gap: 9px; flex: 1 1 380px; }
.mailtest .input { flex: 1 1 240px; }

/* What the server itself sees when it tries to reach the mail host. */
.probe { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.probe__head { padding: 10px 14px; background: var(--ink-50); border-bottom: 1px solid var(--border); font-size: .82rem; color: var(--ink-600); }
.probe__row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--ink-100); }
.probe__row:last-child { border-bottom: 0; }
.probe__row.is-ok > svg { color: var(--ok-500); flex: none; margin-top: 1px; }
.probe__row.is-bad > svg { color: var(--err-500); flex: none; margin-top: 1px; }
.probe__label { font-size: .85rem; font-weight: 700; }
.probe__detail { font-size: .79rem; color: var(--ink-600); line-height: 1.5; margin-top: 2px; }
.probe__ms { margin-left: auto; font-size: .73rem; color: var(--ink-400); white-space: nowrap; }
.probe__fix { margin: 0; padding: 12px 14px; background: var(--warn-50); color: #92400e; font-size: .8rem; line-height: 1.6; }
.probe__fix code { background: rgba(255, 255, 255, .7); border-radius: 4px; padding: 1px 5px; font-size: .96em; }

.viva-box__when {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 11px;
    padding: 8px 10px; border-radius: var(--radius-xs);
    background: var(--brand-50); color: var(--brand-700);
    font-size: .78rem; font-weight: 600; line-height: 1.45;
}
.viva-box__when a { font-weight: 600; color: var(--ink-500); font-size: .72rem; }

/* Paste-a-list panel on the applications screen. */
.paylist summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
    padding: 15px 20px; font-size: .92rem; font-weight: 700; color: var(--ink-700);
}
.paylist summary::-webkit-details-marker { display: none; }
.paylist[open] summary { border-bottom: 1px solid var(--border); color: var(--brand-700); }

/* Check-in desk */
.scan-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.scanner { position: relative; border-radius: var(--radius); overflow: hidden; background: #0c1020; margin-bottom: 14px; }
.scanner__video { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.scanner__frame {
    position: absolute; inset: 14% 22%; border: 3px solid rgba(255, 255, 255, .85);
    border-radius: var(--radius); box-shadow: 0 0 0 100vmax rgba(8, 11, 24, .35);
}
.scanner__hint { font-size: .82rem; color: var(--ink-500); line-height: 1.6; margin: 0 0 14px; }
.scanner__blocked {
    display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--warn-50); border: 1px solid #fde68a;
    color: #92400e; font-size: .82rem; line-height: 1.55;
}
.scanner__blocked svg { flex: none; margin-top: 2px; }
.scanner__blocked strong { display: block; }
.scanner__blocked .btn { display: inline-flex; }
.scanner__manual { display: flex; gap: 9px; }
.scanner__manual .input { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

.scan-result { margin-top: 16px; border: 1px solid var(--border); border-left: 4px solid var(--ink-300); border-radius: var(--radius-sm); overflow: hidden; }
.scan-result[data-state="ok"] { border-left-color: var(--ok-500); background: var(--ok-50); }
.scan-result[data-state="already"] { border-left-color: var(--warn-500); background: var(--warn-50); }
.scan-result[data-state="not_found"], .scan-result[data-state="not_invited"] { border-left-color: var(--err-500); background: var(--err-50); }
.scan-result[data-state="undone"] { border-left-color: var(--ink-400); background: var(--ink-50); }
.scan-result__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.scan-result__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px 0; }
.scan-result__state { font-weight: 700; font-size: .92rem; color: var(--ink-900); }
.scan-result__body { display: flex; align-items: center; gap: 13px; padding: 9px 14px 14px; }
.scan-result__photo { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.scan-result__name { font-weight: 700; font-size: .95rem; }
.scan-result__meta { font-size: .78rem; color: var(--ink-600); margin-top: 2px; }
.scan-result__link { font-size: .78rem; font-weight: 600; }

.checkin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ink-100); }
.checkin:last-child { border-bottom: 0; }
.checkin__name { font-weight: 600; font-size: .87rem; }
.checkin__meta { font-size: .75rem; color: var(--ink-500); }
.checkin__right { display: flex; align-items: center; gap: 11px; }
.checkin__when { font-size: .78rem; color: var(--ink-600); text-align: right; white-space: nowrap; }
.checkin__undo {
    border: 1px solid var(--border-strong); background: #fff; color: var(--ink-500);
    border-radius: 7px; padding: 4px 9px; font-size: .74rem; font-weight: 600; cursor: pointer;
    transition: color .15s var(--ease), border-color .15s var(--ease);
}
.checkin__undo:hover { color: var(--err-600); border-color: var(--err-500); }
.checkin__by { display: block; font-size: .71rem; color: var(--ink-400); }

/* The desk as its own page, for volunteers working the door on a phone. */
.desk { max-width: 1100px; margin: 34px auto 60px; }
.desk__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.desk__title { margin: 0; font-size: 1.5rem; }
.desk__sub { margin: 4px 0 0; color: var(--ink-500); font-size: .88rem; }
.desk__grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }

@media (max-width: 900px) {
    .desk__grid { grid-template-columns: 1fr; }
    .desk { margin-top: 20px; }
}

/* What the scanned QR opens */
.checkin-card { max-width: 460px; margin: 10px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; }
.checkin-card__person { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.checkin-card__photo { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand-100); background: var(--ink-50); }
.checkin-card__photo--blank { display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--brand-600); }
.checkin-card__name { margin: 0; font-size: 1.15rem; }
.checkin-card__meta { margin: 5px 0 0; font-size: .82rem; color: var(--ink-500); line-height: 1.55; }
.checkin-card__state { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: .86rem; font-weight: 600; margin-bottom: 16px; }
.checkin-card__state.is-ok { background: var(--ok-50); color: #047857; }
.checkin-card__state.is-warn { background: var(--warn-50); color: var(--warn-600); }
.checkin-card__state.is-bad { background: var(--err-50); color: var(--err-600); }
.checkin-card__actions { margin-bottom: 14px; }
.checkin-card__link { display: block; text-align: center; font-size: .82rem; color: var(--ink-500); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .scan-grid { grid-template-columns: 1fr; }
    .board { grid-template-columns: 1fr; }
    .board__pool { position: static; max-height: 420px; }
    .board-card__actions { opacity: 1; }
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.is-open { transform: none; }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10, 13, 24, .5); opacity: 0; pointer-events: none; transition: opacity .24s var(--ease); }
    .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
    .admin-content { padding: 18px 16px; }
    .topbar { padding: 12px 16px; }
    .topbar__title { font-size: .98rem; }
}

@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: auto; }
    .review-list, .detail-list { grid-template-columns: 1fr; }
    .review-list dt, .detail-list dt { padding-bottom: 0; border-bottom: 0; font-weight: 600; color: var(--ink-600); }
    .review-list dd { padding-top: 3px; }
    .detail-list dd { padding-top: 3px; }
    .card__body { padding: 20px 17px; }
    .card__head, .card__foot { padding: 16px 17px; }
    .state-card { padding: 32px 20px; }
    .step-nav { flex-direction: column-reverse; }
    .step-nav .btn { width: 100%; }
    .step-nav__spacer { display: none; }
    .modal { margin: 12px auto; }
    .hero { padding-bottom: 36px; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
    body { font-size: 14.5px; }
    .container { padding-inline: 15px; }
    .brand__sub, .brand__divider { display: none; }
    .brand__logo { height: 38px; }
    .stat__value { font-size: 1.5rem; }
    .step__title { font-size: 1.3rem; }
    .login-card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Shown only on paper - see report-print.css for the report layout itself. */
.print-only { display: none !important; }

@media print {
    .sidebar, .topbar, .site-header, .site-footer, .step-nav, .stepper-wrap, .no-print { display: none !important; }
    .admin-main { margin-left: 0; }
    body { background: #fff; }
    .card, .panel, .table-wrap { border-color: #ccc; box-shadow: none; }
    a { color: inherit; text-decoration: none; }
}
