/*
 * Candfit brand styles.
 *
 * Colors from the candfit.com palette:
 *   #1F5EFF — Candfit blue, the wordmark's "fit" box and every accent
 *   #12161F — ink, the wordmark's "cand" and body text
 *
 * The accent variables keep their original --brand-orange* names so that
 * styles written against them keep working; read "orange" as "accent".
 *
 * WCAG AA contrast notes (against white):
 *   - #1F5EFF on white = 5.1:1 → AA for normal-weight text as well as
 *     buttons, large accents and focus rings (--brand-orange).
 *   - #12161F on white = 18:1 → AAA. Use for body and headings.
 *   - #1A4FD8 on white = 6.8:1 → the hover / inline-link shade
 *     (--brand-orange-hover, --brand-orange-text).
 *
 * If you want to riff on the palette, keep these contrast budgets in
 * mind — automated checkers will catch drift.
 */

:root {
    --brand-orange: #1F5EFF;
    --brand-orange-hover: #1A4FD8;
    --brand-orange-text: #1A4FD8;      /* AA-safe on white */
    --brand-orange-tint: rgba(31, 94, 255, 0.08);

    --brand-charcoal: #12161F;
    --brand-muted: #6b7280;
    --brand-border: #e2e2e2;
    --brand-border-strong: #c4c4c4;
    --brand-bg: #ffffff;
    --brand-bg-soft: #f7f7f7;

    --brand-danger-bg: #fdecea;
    --brand-danger-text: #8a1f11;
    --brand-danger-border: #f5c2c0;

    --brand-radius: 6px;
    --brand-radius-btn: 999px;   /* pill / fully rounded buttons */
    --brand-shadow: 0 1px 2px rgba(18, 22, 31, 0.06);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--brand-charcoal);
    background: var(--brand-bg);
    line-height: 1.6;
}

a {
    color: var(--brand-orange-text);
    /* No underlines anywhere -- operator decision 2026-08-26 during the portal
       review. Links are distinguished by the brand color; hover darkens it so
       the affordance survives. */
    text-decoration: none;
}

a:hover {
    color: var(--brand-orange-hover);
}

a:hover {
    color: var(--brand-orange-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

h1, h2, h3 {
    color: var(--brand-charcoal);
    line-height: 1.25;
}

/* ------- Layout ------- */

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem 2rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--brand-border);
    margin-bottom: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: inherit;
}

.brand:hover {
    color: inherit;
}

.brand-logo {
    height: 22px;
    width: auto;
    display: block;
}

.brand-divider {
    width: 1px;
    height: 22px;
    background: var(--brand-border-strong);
}

.brand-product {
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--brand-charcoal);
}

.brand-product .brand-product-accent {
    color: var(--brand-orange);
}

.primary-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin-left: auto;
    font-size: 0.9rem;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.user-bar .user-email {
    color: var(--brand-charcoal);
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    background: var(--brand-orange-tint);
    border-radius: 999px;
}

.signout-form {
    margin: 0;
    white-space: nowrap;
}

/* Seven links since 2026-10-13: below this width the nav drops its icons to stay on one line. */
@media (max-width: 1400px) {
    .primary-nav .btn-icon {
        display: none;
    }
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    padding: 0;
    color: var(--brand-orange-text);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.link-button:hover {
    color: var(--brand-orange-hover);
}

/* Matches .btn-primary:disabled — used while an invite/regenerate round-trip
 * is in flight so a second click can't fire. */
.link-button:disabled {
    opacity: 0.5;
    cursor: default;
    text-decoration: none;
}

.content {
    line-height: 1.6;
}

/* Buttons: white-on-orange is 3.4:1 — bold/large text only. The button
 * font-weight + size keeps it inside the "UI component / large text"
 * 3:1 bucket WCAG AA permits. Works on both <button> and <a> elements.
 * Rounded (pill) edges + inline-flex layout for left-aligned icons. */
.btn-primary,
a.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--brand-orange);
    border: none;
    border-radius: var(--brand-radius-btn);
    cursor: pointer;
    text-decoration: none;
    transition: background 120ms ease;
    line-height: 1.2;
}

/* SVG icon sized to match the button text. Flex centering on the button
 * keeps it vertically aligned, so no vertical-align nudge is needed. */
.btn-icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    display: inline-block;
}

.btn-primary:hover,
a.btn-primary:hover {
    background: var(--brand-orange-hover);
    color: #ffffff;
    text-decoration: none;
}

.btn-primary:active,
a.btn-primary:active {
    background: #1743B5;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ------- Signed-out front door (AuthLayout: /login, /signup) -------
 * A split screen: the ink brand panel (candfit.com's headline and proof points) beside
 * the form. Geist, candfit.com's typeface, is self-hosted in wwwroot/fonts (SIL OFL, see
 * OFL.txt there) and used on these pages only. Below 900px the panel shrinks to a header
 * band above the form. Text on the ink panel is AA or better. */

@font-face {
    font-family: "Geist";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/geist-v5-latin.woff2") format("woff2");
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(380px, 5fr) 7fr;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 2.5rem 3rem;
    color: #f5f6f8;
    background: linear-gradient(160deg, #1B2130 0%, var(--brand-charcoal) 55%, #0d1017 100%);
}

/* Everything sits above the grid and the glow (declared first, so those two can still
   take position: absolute below). */
.auth-brand > * {
    position: relative;
}

.auth-brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 15%, transparent 75%);
    mask-image: radial-gradient(ellipse at 30% 40%, #000 15%, transparent 75%);
    pointer-events: none;
}

.auth-brand-glow {
    position: absolute;
    right: -200px;
    bottom: -200px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(31, 94, 255, 0.4) 0%, rgba(31, 94, 255, 0) 65%);
    pointer-events: none;
}

.auth-brand-logo {
    display: inline-flex;
    align-self: flex-start;
}

.auth-brand-logo svg {
    display: block;
    width: auto;
    height: 34px;
}

.auth-brand-copy {
    max-width: 30rem;
}

.auth-brand-title {
    margin: 0 0 2rem;
    font-size: clamp(2rem, 3.3vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: #ffffff;
    text-wrap: balance;
}

/* As on candfit.com: the highlighted word in the blue of the wordmark's "fit" box. */
.auth-brand-title mark {
    padding: 0 0.1em;
    margin-right: -0.07em;
    color: #ffffff;
    background: var(--brand-orange);
    border-radius: 2px;
}

.auth-brand-points {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-brand-points li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.05rem;
    line-height: 1.4;
    color: #d5d9e2;
}

.auth-brand-points .btn-icon {
    flex: 0 0 auto;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0.22rem;
    color: #ffffff;
    background: var(--brand-orange);
    border-radius: 999px;
}

.auth-brand-note {
    margin: 2rem 0 0;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7FA4FF;
}

.auth-brand-foot {
    margin: 0;
    font-size: 0.85rem;
    color: #8b93a5;
}

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 1.5rem;
    background: #f5f7fa;
}

/* margin: auto centers the card in the column while the footer sits at the bottom. */
.auth-panel {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    padding: 1.5rem 0 2rem;
}

.auth-card {
    padding: 2.5rem 2.25rem 2.25rem;
    background: #ffffff;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(18, 22, 31, 0.04), 0 16px 40px rgba(18, 22, 31, 0.08);
}

.auth-card h1 {
    margin: 0 0 0.4rem;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

/* FocusOnNavigate moves focus to the h1 for screen readers on a page with no autofocus
   field (/signup); it is not an interactive control, so no focus ring. */
.auth-card h1:focus {
    outline: none;
}

.auth-lede {
    margin: 0 0 1.75rem;
    color: var(--brand-muted);
    line-height: 1.5;
}

.auth-card .alert {
    margin-bottom: 1.25rem;
}

/* "Sign in with Microsoft", after Microsoft's button guidance: white, a mid-gray
   border, dark gray label, the four-square logo on the left. */
.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 46px;
    padding: 0.6rem 1rem;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    color: #3b3f47;
    background: #ffffff;
    border: 1px solid #8c8c8c;
    border-radius: var(--brand-radius-btn);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}

.btn-microsoft:hover {
    background: #f4f5f7;
    border-color: #5e5e5e;
}

.btn-microsoft svg {
    flex: 0 0 auto;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    color: var(--brand-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e3e7ee;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-form label {
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-form input + label {
    margin-top: 0.65rem;
}

.auth-form input {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    font: inherit;
    font-size: 1rem;
    color: var(--brand-charcoal);
    background: #ffffff;
    border: 1px solid var(--brand-border-strong);
    border-radius: 10px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-form input::placeholder {
    color: #8a919d;
}

.auth-form input:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 4px var(--brand-orange-tint);
}

/* The page's one primary action: a full-width pill (works on <button> and <a>). */
.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 46px;
    margin-top: 1.1rem;
    padding: 0.6rem 1rem;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--brand-orange);
    border: none;
    border-radius: var(--brand-radius-btn);
    box-shadow: 0 6px 18px rgba(31, 94, 255, 0.28);
    cursor: pointer;
    text-decoration: none;
    transition: background 120ms ease;
}

.auth-submit:hover {
    color: #ffffff;
    background: var(--brand-orange-hover);
}

.auth-submit:active {
    background: #1743B5;
}

.auth-steps {
    padding: 1rem 1.1rem;
    color: #2b3242;
    background: #f3f6ff;
    border: 1px solid #dbe5ff;
    border-radius: 12px;
}

.auth-steps p {
    margin: 0;
}

.auth-switch {
    margin: 1.5rem 0 0;
    font-size: 0.925rem;
    text-align: center;
    color: var(--brand-muted);
}

.auth-switch a {
    font-weight: 600;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.auth-footer a {
    color: var(--brand-muted);
}

.auth-footer a:hover {
    color: var(--brand-charcoal);
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        gap: 1.1rem;
        padding: 1.5rem 1.5rem 1.75rem;
    }

    .auth-brand-logo svg {
        height: 28px;
    }

    .auth-brand-title {
        margin: 0;
        font-size: 1.65rem;
    }

    .auth-brand-points,
    .auth-brand-note,
    .auth-brand-foot {
        display: none;
    }

    .auth-main {
        padding: 0.5rem 1rem 1.25rem;
    }

    .auth-panel {
        margin: 0;
    }

    .auth-card {
        padding: 1.75rem 1.4rem;
    }
}

/* ------- Anonymous landing (Home.razor / NotAuthorized) ------- */

.landing {
    max-width: 640px;
    margin: 3rem auto;
    text-align: center;
}

.landing h2 {
    font-size: 1.875rem;
    margin: 0 0 1rem 0;
}

.landing .lede {
    color: var(--brand-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 auto 1.75rem auto;
    max-width: 32rem;
}

.landing .btn-primary {
    margin-top: 0;
    padding: 0.55rem 1.4rem;
    font-size: 0.95rem;
}

.landing-fineprint {
    margin-top: 1.25rem;
    color: var(--brand-muted);
    font-size: 0.85rem;
}

/* ------- Signed-out page (SignedOut.razor) -------
 * A dark "console" card in the brand colors: a slowly drifting grid, a soft orange
 * glow and a check mark that draws itself. CSS only; every animation stops under
 * prefers-reduced-motion. Text contrast on the charcoal is AA or better. */

.signed-out {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
}

.signed-out-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 560px;
    padding: 3rem 2.5rem 2.75rem;
    text-align: center;
    color: #f5f6f8;
    background: linear-gradient(160deg, #262a38 0%, var(--brand-charcoal) 45%, #11131a 100%);
    border: 1px solid rgba(31, 94, 255, 0.35);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(17, 19, 26, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    animation: signed-out-rise 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* The grid and the glow sit behind everything else in the card. */
.signed-out-card > * {
    position: relative;
}

.signed-out-grid {
    position: absolute;
    inset: -40px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    animation: signed-out-drift 18s linear infinite;
    pointer-events: none;
}

.signed-out-glow {
    position: absolute;
    top: -130px;
    left: 50%;
    width: 380px;
    height: 380px;
    margin-left: -190px;
    background: radial-gradient(circle, rgba(31, 94, 255, 0.35) 0%, rgba(31, 94, 255, 0) 65%);
    animation: signed-out-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

.signed-out-check {
    width: 72px;
    height: 72px;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 12px rgba(31, 94, 255, 0.55));
}

.signed-out-check-ring {
    fill: none;
    stroke: var(--brand-orange);
    stroke-width: 3;
    stroke-dasharray: 176;          /* the ring's circumference: 2 x pi x 28 */
    stroke-dashoffset: 176;
    animation: signed-out-draw 900ms ease-out 200ms forwards;
}

.signed-out-check-mark {
    fill: none;
    stroke: #ffffff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: signed-out-draw 500ms ease-out 900ms forwards;
}

.signed-out-kicker {
    margin: 0 0 0.5rem;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brand-orange);
}

.signed-out-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.6rem;
    line-height: 1.3;
    color: #ffffff;
}

.signed-out-lede {
    margin: 0 0 1.75rem;
    color: #b9bdc8;
    font-size: 1.05rem;
}

.signed-out-card .btn-primary {
    margin-top: 0;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(31, 94, 255, 0.35);
}

@keyframes signed-out-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes signed-out-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 32px 32px, 32px 32px; }
}

@keyframes signed-out-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes signed-out-draw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .signed-out-card,
    .signed-out-grid,
    .signed-out-glow,
    .signed-out-check-ring,
    .signed-out-check-mark {
        animation: none;
    }

    .signed-out-check-ring,
    .signed-out-check-mark {
        stroke-dashoffset: 0;
    }
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--brand-radius);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-error {
    background: var(--brand-danger-bg);
    color: var(--brand-danger-text);
    border: 1px solid var(--brand-danger-border);
}

.alert-success {
    background: #e7f6ec;
    color: #1d6e3e;
    border: 1px solid #b8e0c4;
}

/* A question to answer before going on (e.g. "replace this candidate's Resume/CV?"):
   neither an error nor a success. */
.alert-warning {
    background: #fff6e5;
    color: #7a4b00;
    border: 1px solid #f3d29a;
}

.replace-confirm p {
    margin: 0 0 0.6rem;
}

.replace-confirm .form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

/* The "Resume/CV" column on the position page: one page icon per row. */
.applications-section .data-table .resume-cell {
    text-align: center;
}

.resume-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    border-radius: var(--brand-radius);
    color: var(--brand-orange-text);
}

.resume-icon-link:hover {
    background: var(--brand-orange-tint);
}

.resume-icon-link .btn-icon {
    width: 1.3rem;
    height: 1.3rem;
}

/* Score history + earlier Resumes/CVs in the screening-details window. */
.history-heading {
    margin: 1.1rem 0 0.3rem;
    font-size: 0.95rem;
    color: var(--brand-charcoal);
}

/* "Summary" heading with its Copy to Clipboard button on the same line. */
.summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.summary-head .history-heading {
    margin: 0;
}

.summary-paragraph {
    margin: 0 0 0.6rem;
}

.copy-icon-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 0.2rem 0.5rem;
    color: var(--brand-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.copy-icon-button:hover {
    border-color: var(--brand-orange);
    color: var(--brand-orange-text);
}

.copy-icon-button.copied {
    background: #e7f6ec;
    border-color: #b8e0c4;
    color: #1d6e3e;
}

.history-list {
    margin: 0;
    padding-left: 1.2rem;
}

/* ------- Blazor circuit error bar (App.razor #blazor-error-ui) -------
 * Hidden until the runtime unhides it (it sets `display: block` inline) when
 * an interactive circuit errors or is disconnected for good. Dressed as a
 * bottom banner in the same danger palette as .alert-error so a dead circuit
 * looks like the rest of the app instead of the framework's default yellow. */
#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    font-size: 0.95rem;
    background: var(--brand-danger-bg);
    color: var(--brand-danger-text);
    border-top: 1px solid var(--brand-danger-border);
    box-shadow: 0 -1px 2px rgba(18, 22, 31, 0.08);
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
    color: var(--brand-danger-text);
    font-weight: 600;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.65rem;
    right: 1rem;
    cursor: pointer;
    color: var(--brand-danger-text);
    text-decoration: none;
}

/* ------- POC-4 Positions ------- */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin: 1rem 0 2rem 0;
}

.page-header h2 {
    margin: 0 0 0.25rem 0;
}

.page-header .muted {
    color: var(--brand-muted);
    margin: 0;
    max-width: 48rem;
}

.muted {
    color: var(--brand-muted);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    color: var(--brand-charcoal);
    font-weight: 600;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--brand-radius);
}

.nav-link:hover {
    background: var(--brand-orange-tint);
    color: var(--brand-charcoal);
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg-soft);
}

.empty-state p:first-child {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    overflow: hidden;
    background: var(--brand-bg);
    box-shadow: var(--brand-shadow);
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--brand-border);
    vertical-align: middle;
}

.data-table thead th {
    background: var(--brand-bg-soft);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-muted);
}

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

.data-table .cell-title a {
    font-weight: 600;
}

.data-table .cell-actions {
    text-align: right;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-badge.status-open {
    background: var(--brand-orange-tint);
    color: var(--brand-orange-text);
    border-color: rgba(31, 94, 255, 0.25);
}

.status-badge.status-closed {
    background: #eef0f3;
    color: var(--brand-muted);
    border-color: var(--brand-border-strong);
}

.status-badge.status-neutral {
    background: var(--brand-bg-soft);
    color: var(--brand-charcoal);
    border-color: var(--brand-border-strong);
}

.muted.small,
.small {
    font-size: 0.8rem;
    margin: 0.125rem 0 0 0;
}

/* ------- POC-9 Public booking page ------- */

.booking-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 1rem;
    background: var(--brand-bg-soft);
}

.booking {
    width: 100%;
    max-width: 640px;
}

.booking-card {
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    padding: 2rem;
}

.booking-head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.booking-head img {
    height: 22px;
    width: auto;
}

.booking-card h1 {
    font-size: 1.5rem;
    margin: 0;
}

.booking-card h2 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem 0;
}

.slot-form {
    margin-top: 1rem;
}

/* Slot calendar (booking-calendar.js renders into .slot-cal-grid). */
.slot-calendar-widget {
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 0.75rem 0.85rem 0.85rem 0.85rem;
    margin: 0 auto 1.25rem auto;
    max-width: 22rem;
}

.slot-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.slot-cal-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.slot-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--brand-border-strong);
    border-radius: 999px;
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.slot-cal-nav:hover:not(:disabled) {
    border-color: var(--brand-orange);
    color: var(--brand-orange-text);
}

.slot-cal-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.slot-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.2rem;
}

.slot-cal-dow {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--brand-muted);
    padding: 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.slot-cal-day {
    min-height: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--brand-radius);
    background: none;
    color: var(--brand-charcoal);
    font-size: 0.85rem;
    cursor: default;
    padding: 0;
}

.slot-cal-day.is-empty {
    color: var(--brand-muted);
    opacity: 0.4;
}

.slot-cal-day.is-available {
    background: rgba(31, 94, 255, 0.12);
    border-color: rgba(31, 94, 255, 0.35);
    color: var(--brand-orange-text);
    font-weight: 600;
    cursor: pointer;
}

.slot-cal-day.is-available:hover {
    border-color: var(--brand-orange);
}

.slot-cal-day.is-selected,
.slot-cal-day.is-selected:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #ffffff;
}

.slot-cal-fallback {
    margin: 0.75rem 0 0 0;
    font-size: 0.85rem;
}

.slot-time-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.slot-time-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.slot-time-row select {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    max-width: 18rem;
}

.slot-time-row select:disabled {
    color: var(--brand-muted);
    background: var(--brand-bg-soft);
}

.booked-actions {
    margin-top: 1.5rem;
    border-top: 1px solid var(--brand-border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* buttons size to content, not full width */
    gap: 0.75rem;
}

/* "Change interview time" toggle: the <summary> IS the button (native
 * details/summary keeps the reveal working with no JS / no Blazor circuit).
 * Strip the default disclosure triangle so it reads as a plain button. */
.change-time > summary {
    list-style: none;
    cursor: pointer;
}

.change-time > summary::-webkit-details-marker {
    display: none;
}

.change-time > summary::marker {
    content: "";
}

.cancel-form {
    margin: 0;
}

/* Destructive action (cancel the booked interview). Outline danger so it's
 * clearly a button but visually distinct from the orange/secondary ones. */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #b3261e;
    background: var(--brand-bg);
    border: 1px solid #e3b1ad;
    border-radius: var(--brand-radius-btn);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.btn-danger:hover {
    border-color: #b3261e;
    color: #8c1d18;
}

/* ------- POC-8 Invite cell (Position detail) ------- */

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
}

.invite-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 220px;
}

.invite-url {
    font-size: 0.8rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg-soft);
    color: var(--brand-charcoal);
    width: 100%;
}

.invite-actions {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
}

/* Screening-score rationale opens in a MODAL. It started inline (a row was most
   of a screen tall), became a <details> toggle, and the expanded text was still a
   thin unreadable column squeezed into a table cell -- so it gets a real reading
   surface instead. */
/* A READING modal -- distinct from .modal-card, which is the small progress
   dialog (24rem, padded, centered content) used by the upload and save flows.
   Reusing that class made this render as a thin, tall column: its 24rem
   max-width, declared later in this file, beat the wide one declared here.
   Different job, own class. */
.modal-reading {
    background: var(--brand-bg);
    border-radius: var(--brand-radius);
    box-shadow: 0 12px 40px rgba(18, 22, 31, 0.25);
    width: min(60rem, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-reading header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem 0.6rem;
    border-bottom: 1px solid var(--brand-border);
}

.modal-reading header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-reading .modal-body {
    padding: 1rem 1.5rem 1.4rem;
    overflow-y: auto;
    line-height: 1.6;
}

/* Application rows stay ONE LINE each; the modal holds anything long. */
.applications-section .data-table th,
.applications-section .data-table td {
    white-space: nowrap;
}

/* Score verdict on the pipeline: green = cleared the position's pass threshold,
   red = under it. Same green as .alert-success; red is the brand danger token. */
.score-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-variant-numeric: tabular-nums;
}

.score-pass {
    color: #1d6e3e;
}

.score-fail {
    color: var(--brand-danger-text);
}

/* One-line table rows: the pipeline gets the same treatment as the position
   page's applications table. Headers too -- "Screening Score" was wrapping. */
.pipeline-page .data-table th,
.pipeline-page .data-table td {
    white-space: nowrap;
}

/* Secondary text (a candidate's email) rides the same line, ellipsized. */
.cell-secondary {
    display: inline-block;
    max-width: 24ch;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    margin-left: 0.4rem;
}

.applications-section .stage-reason,
.pipeline-page .stage-reason {
    display: inline-block;
    max-width: 26ch;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    margin-left: 0.4rem;
}

.interview-link {
    white-space: nowrap;
}

/* ------- POC-12 Interview review ------- */

/* Recording metrics. Three columns: label, figure, and the caveat that stops the
   figure being over-read -- every one of these numbers has a real limit (mic-active
   is not speech, response time includes the question) and the caveat column is where
   that gets said. It is not decoration; a recruiter reads these next to a pass/fail. */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}

.metrics-table th,
.metrics-table td {
    padding: 0.45rem 0.6rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--brand-border);
}

.metrics-table tr:last-child th,
.metrics-table tr:last-child td {
    border-bottom: none;
}

.metrics-table th[scope="row"] {
    font-weight: 600;
    white-space: nowrap;
    width: 12rem;
}

/* The figure itself: tabular numerals so rows line up when scanned vertically. */
.metrics-table td:first-of-type {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    width: 6rem;
}

/* Interviewer audio the candidate never heard. Same treatment as an error banner,
   because it means a low score may be this platform's fault and not the candidate's. */
.metrics-table tr.metric-warn th,
.metrics-table tr.metric-warn td {
    background: var(--brand-danger-bg);
    color: var(--brand-danger-text);
}

.metrics-table tr.metric-warn .muted {
    color: var(--brand-danger-text);
}

@media (max-width: 640px) {
    /* Stack: three columns of prose do not fit, and the caveat is the part that must
       stay readable. */
    .metrics-table th[scope="row"],
    .metrics-table td {
        display: block;
        width: auto;
        border-bottom: none;
        padding: 0.15rem 0;
    }

    .metrics-table tr {
        display: block;
        border-bottom: 1px solid var(--brand-border);
        padding: 0.5rem 0;
    }
}

.review-block {
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--brand-shadow);
}

/* Section heading with an action pinned to the right edge (e.g. the transcript's
   Copy control). */
.review-block h3.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.review-block h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.review-block .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 0.75rem 0;
}

.review-block textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    resize: vertical;
}

.transcript-body {
    margin: 0;
    padding: 0.75rem 1rem;
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 24rem;
    overflow-y: auto;
}

/* In-page interview playback. max-width:100% so a 1080p recording can't push the
   review page into horizontal scroll, and a black background so letterboxed video
   doesn't read as a broken element while it loads. */
.media-player {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
    border-radius: 6px;
}

video.media-player {
    background: #000;
    max-height: 70vh;
}

audio.media-player {
    /* Audio controls have a fixed intrinsic height; full width just makes the
       scrubber usable on a long interview. */
    margin-bottom: 0.5rem;
}

/* Status pills on the prompts page. Like .prompt-editor below, the class was
   used by the markup but never defined, so "default" / "edited" / "needs push"
   rendered as bare text glued to the prompt title. */
.pill {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--brand-bg-soft);
    color: var(--brand-muted);
    border: 1px solid var(--brand-border);
    vertical-align: middle;
}

.pill-warn {
    background: var(--brand-orange-tint);
    color: var(--brand-orange-text);
    border-color: var(--brand-orange-text);
}

/* The prompt editor. This class had NO styles at all, so the textarea rendered
   at the browser default (~20 columns wide x 28 rows) -- a thin vertical column
   for editing prompts that run thousands of characters. */
.prompt-editor {
    width: 100%;
    min-height: 24rem;
    padding: 0.75rem 0.9rem;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    resize: vertical;
}

.prompt-editor:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-orange-tint);
}

/* /admin/models: one row per AI task, with its model picker. */
.model-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}

.model-list li {
    padding: 0.9rem 0;
}

.model-now {
    margin: 0.4rem 0 0.15rem;
}

.model-pick {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.model-pick select {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    min-width: 280px;
    max-width: 100%;
}

.model-pick select:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-orange-tint);
}

.model-pick .btn-primary {
    margin-top: 0;
}

.model-warning {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--brand-radius);
    background: var(--brand-orange-tint);
    color: var(--brand-orange-text);
    border: 1px solid var(--brand-orange-text);
}

@media (max-width: 600px) {
    .model-pick select {
        min-width: 0;
        width: 100%;
    }
}

.file-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-links li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--brand-border);
}

.file-links li:last-child {
    border-bottom: none;
}

/* ------- POC-13 Pipeline ------- */

.pipeline-filters {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.pipeline-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.pipeline-filters select {
    padding: 0.45rem 0.6rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    min-width: 180px;
}

.pipeline-filters select:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-orange-tint);
}

.pipeline-count {
    margin-left: auto;
    color: var(--brand-muted);
    font-size: 0.9rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------- POC-4 Position editor ------- */

.position-editor .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.5rem;
}

.position-editor label {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Checkbox + its own label on one line (the outer .form-row label is the field
   title; this is the actionable row under it). */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.position-editor .field-hint {
    color: var(--brand-muted);
    font-size: 0.85rem;
    margin: 0;
}

.position-editor input[type="text"],
.position-editor input[type="number"],
.position-editor select,
.position-editor textarea {
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--brand-charcoal);
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    width: 100%;
}

.position-editor textarea {
    resize: vertical;
    line-height: 1.5;
}

.position-editor input:focus,
.position-editor select:focus,
.position-editor textarea:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-orange-tint);
}

.position-editor .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.position-editor .form-grid .form-row {
    margin-bottom: 0;
}

.form-fieldset {
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    margin: 0 0 1.5rem 0;
    background: var(--brand-bg-soft);
}

.form-fieldset legend {
    padding: 0 0.5rem;
    font-weight: 600;
}

.question-row {
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.question-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.question-row-num {
    font-weight: 600;
    color: var(--brand-muted);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-charcoal);
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius-btn);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.btn-secondary:hover {
    border-color: var(--brand-orange);
    color: var(--brand-orange-text);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

/* ------- POC-5 Position detail ------- */

.position-detail .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.position-detail .page-header .muted {
    margin-top: 0.5rem;
}

.jd-preview {
    margin: 0 0 2rem 0;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    background: var(--brand-bg-soft);
    padding: 0.5rem 1rem;
}

.jd-preview summary {
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
}

.jd-body {
    margin: 0.75rem 0 0.25rem 0;
    padding: 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--brand-charcoal);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 18rem;
    overflow-y: auto;
}

.upload-section,
.applications-section {
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--brand-shadow);
}

.upload-section h3,
.applications-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.upload-section .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.upload-section .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.upload-section label {
    font-weight: 600;
    font-size: 0.9rem;
}

.upload-section input[type="text"],
.upload-section input[type="email"] {
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--brand-charcoal);
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    width: 100%;
}

.upload-section input:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-orange-tint);
}

.upload-section input[type="file"] {
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.upload-section .field-hint {
    color: var(--brand-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ------- Upload progress modal (POC-5/6 per-step feedback) ------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 22, 31, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
}

.modal-card {
    width: 100%;
    max-width: 24rem;
    background: var(--brand-bg);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    padding: 1.5rem 1.75rem;
}

.modal-title {
    margin: 0 0 1.1rem 0;
    font-size: 1.15rem;
}

.progress-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.progress-icon {
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-label {
    line-height: 1.3;
}

.progress-note {
    display: block;
    font-size: 0.8rem;
    color: var(--brand-muted);
}

/* pending: hollow dot */
.progress-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    border: 2px solid var(--brand-border-strong);
}

.step-pending .progress-label {
    color: var(--brand-muted);
}

/* active: spinner */
.spinner {
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid var(--brand-orange-tint);
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* done / error / skipped colors */
.step-done .progress-icon {
    color: #1f7a3d;
}

.step-error .progress-icon,
.step-error .progress-label {
    color: #b3261e;
}

.step-skipped .progress-label {
    color: var(--brand-muted);
}

.progress-skip {
    color: var(--brand-muted);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.modal-actions {
    margin-top: 1.4rem;
    display: flex;
    justify-content: flex-end;
}

/* ------- POC-10 live interview room (booking page) ------- */

.interview-room {
    margin-top: 1rem;
}

.interview-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.interview-status {
    margin: 1rem 0 0 0;
    font-weight: 600;
    color: var(--brand-charcoal);
    min-height: 1.4em;
}

.interview-transcript {
    margin-top: 1rem;
    max-height: 18rem;
    overflow-y: auto;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 0.5rem 0.85rem;
    background: var(--brand-bg-soft);
}

.interview-transcript:empty {
    display: none;
}

.transcript-line {
    margin: 0.4rem 0;
    line-height: 1.4;
    font-size: 0.92rem;
}

.transcript-line strong {
    color: var(--brand-orange-text);
}

.transcript-user strong {
    color: var(--brand-charcoal);
}

/* Live (in-progress) interview indicators — recruiter "watch live" view. */
.live-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #d11;
    margin-right: 0.4rem;
    vertical-align: middle;
    animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.alert-live {
    display: flex;
    align-items: center;
    background: rgba(209, 17, 17, 0.06);
    border: 1px solid rgba(209, 17, 17, 0.3);
    color: #8c1d18;
}

.live-join {
    color: #b3261e;
    font-weight: 600;
    text-decoration: none;
}

.live-join:hover {
    text-decoration: underline;
}

/* Two-sided conversation view (recruiter watching the live transcript). */
.convo {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 26rem;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.convo-turn {
    max-width: 85%;
    padding: 0.5rem 0.8rem;
    border-radius: var(--brand-radius);
    line-height: 1.45;
}

.convo-agent {
    align-self: flex-start;
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
}

.convo-candidate {
    align-self: flex-end;
    background: rgba(31, 94, 255, 0.10);
    border: 1px solid rgba(31, 94, 255, 0.30);
}

.convo-other {
    align-self: center;
    color: var(--brand-muted);
}

.convo-speaker {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
    color: var(--brand-muted);
}

.convo-agent .convo-speaker {
    color: var(--brand-charcoal);
}

.convo-candidate .convo-speaker {
    color: var(--brand-orange-text);
}

.convo-text {
    white-space: pre-wrap;
}

/* ------- Responsive: phones / narrow viewports -------
 * The recruiter pages were laid out desktop-first; these rules keep them
 * usable down to ~360px. (The candidate booking page is already fluid.)
 * Single breakpoint — the POC has no in-between tablet-specific needs. */
@media (max-width: 640px) {
    .page {
        padding: 0 1rem 1.5rem 1rem;
    }

    /* Top bar wraps: brand row, then nav + user bar below it. */
    .topbar {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
        margin-bottom: 1.5rem;
    }
    .primary-nav {
        margin-left: 0;
        order: 3;
        flex-basis: 100%;
    }
    .user-bar {
        order: 2;
        margin-left: auto;
    }

    /* Page headers stack: title above the action buttons. */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Wide data tables scroll horizontally inside their own box instead of
     * forcing the whole page to overflow. */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Pipeline filters stack full-width and lose the fixed min-width. */
    .pipeline-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .pipeline-filters select {
        min-width: 0;
        width: 100%;
    }
    .pipeline-count {
        margin-left: 0;
    }

    /* Tighter card padding so the booking calendar + forms fit a phone. */
    .booking-card {
        padding: 1.25rem;
    }
}

/* ---- Clients, History, Analytics (2026-10-13) ---------------------------------------- */

.breadcrumb {
    margin: 0 0 0.15rem;
    font-size: 0.85rem;
}

.client-notes {
    white-space: pre-wrap;
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.upload-provenance {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
}

/* History */
.history-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.history-filters label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--brand-muted);
    gap: 0.2rem;
}

.history-filters select {
    min-width: 11rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg);
}

.history-scope {
    margin: 0 0 0.75rem;
}

.history-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
}

.history-item {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--brand-border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-when {
    font-size: 0.85rem;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
}

.history-summary {
    overflow-wrap: anywhere;
}

.history-kind {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.05rem 0.45rem;
    border-radius: var(--brand-radius-btn);
    margin-right: 0.45rem;
    background: var(--brand-bg-soft);
    color: var(--brand-charcoal);
    border: 1px solid var(--brand-border);
}

.history-kind.kind-client { background: #fff4e8; border-color: #ffd5ad; color: #8a4200; }
.history-kind.kind-position { background: #eef4ff; border-color: #c9dbff; color: #1e429f; }
.history-kind.kind-resume { background: #ecfdf5; border-color: #b7ebd4; color: #05603a; }
.history-kind.kind-stage { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.history-kind.kind-email { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
.history-kind.kind-interview { background: #fefce8; border-color: #fde68a; color: #854d0e; }
.history-kind.kind-user { background: var(--brand-bg-soft); }
.history-kind.kind-admin { background: #fdecea; border-color: #f5c2c0; color: #8a1f11; }

.history-rebuilt {
    font-size: 0.72rem;
    color: var(--brand-muted);
    border: 1px dashed var(--brand-border-strong);
    border-radius: var(--brand-radius-btn);
    padding: 0 0.4rem;
    margin-left: 0.35rem;
}

.history-meta {
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.history-paging {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

/* Analytics */
.analytics-header {
    align-items: flex-start;
}

.analytics-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.analytics-controls select {
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--brand-border-strong);
    border-radius: var(--brand-radius);
    background: var(--brand-bg);
    min-width: 9rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
    margin: 0.5rem 0 1.25rem;
}

.kpi-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.kpi-card,
.analytics-card {
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: var(--brand-bg);
    box-shadow: var(--brand-shadow);
}

.analytics-card {
    margin-bottom: 1rem;
}

.analytics-card h3,
.analytics-panel > h3 {
    margin: 0.25rem 0 0.1rem;
}

.kpi-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.kpi-title .btn-icon {
    color: var(--brand-muted);
}

.kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.35rem;
}

.kpi-note {
    font-size: 0.8rem;
    color: var(--brand-muted);
}

.analytics-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.analytics-tab {
    border: none;
    background: transparent;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--brand-muted);
    cursor: pointer;
}

.analytics-tab.active {
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    font-weight: 600;
    box-shadow: var(--brand-shadow);
}

.analytics-panel {
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.analytics-panel > .analytics-card,
.analytics-panel > .questions-grid .analytics-card {
    box-shadow: none;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.5rem;
    margin: 0.75rem 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--brand-muted);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-green { color: #047857; }
.stat-blue { color: #1d4ed8; }

/* Charts (inline SVG) */
.chart {
    margin: 0.75rem 0 0.5rem;
}

.chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart-grid {
    stroke: #e5e7eb;
    stroke-dasharray: 4 4;
}

.chart-axis {
    stroke: #9ca3af;
}

.chart-tick {
    fill: var(--brand-muted);
    font-size: 12px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.25rem;
    font-size: 0.85rem;
    color: var(--brand-muted);
}

.chart-legend-stacked {
    flex-direction: column;
    align-items: flex-start;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.chart-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 2px;
}

.chart-pie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.chart-pie-svg {
    width: 12rem;
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .history-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .history-when {
        flex-direction: row;
        gap: 0.5rem;
    }

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