/*
 * RecruitArc app styles. Colors come from Radzen theme variables (--rz-*) so light,
 * dark and WCAG variants stay consistent; app tokens below only add semantics.
 * Layout: header + collapsible sidebar; content is a wide, data-dense work surface.
 */
:root {
    --ra-accent: var(--rz-primary);
    --ra-ink: var(--rz-text-color);
    --ra-muted: var(--rz-text-secondary-color);
    --ra-surface: var(--rz-base-background-color);
    --ra-raised: var(--rz-base-50, var(--rz-base-background-color));
    --ra-line: var(--rz-base-300);
    --ra-good: var(--rz-success);
    --ra-warn: var(--rz-warning);
    --ra-bad: var(--rz-danger);
    --ra-info: var(--rz-info);
    --ra-radius: 10px;
    --ra-gap: 1rem;
    --ra-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* The only color literals in the app: fixed paper, ink and fallbacks. Everything else is a var(--ra-*) or var(--rz-*). */
    /* stylelint-disable color-no-hex, function-disallowed-list -- token definitions */
    --ra-white: #fff;
    --ra-black: #000;
    --ra-sidebar-fallback: #30445f;
    --ra-shadow: rgb(15 30 60 / 0.35);
    --ra-scroll-shadow: rgb(0 0 0 / 0.16);
    /* stylelint-enable color-no-hex, function-disallowed-list */
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--rz-body-background-color, var(--ra-surface));
    color: var(--ra-ink);
    /* Radzen applies its font only inside its own components; pages without them (sign-in) need it here. */
    font-family: var(--rz-text-font-family, system-ui, sans-serif);
    font-size: var(--rz-body-font-size, 1rem);
    line-height: var(--rz-body-line-height, 1.5);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--ra-accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    z-index: 1000;
    inset: 0.75rem auto auto 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: var(--ra-surface);
    color: var(--ra-ink);
    transform: translateY(-300%);
}

.skip-link:focus { transform: none; }

.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--ra-muted); }
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Brand ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ra-ink);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand b { color: var(--ra-accent); font-weight: 750; }
.brand__mark { width: 1.6rem; height: 1.6rem; color: var(--ra-accent); }
.brand--large { font-size: 1.5rem; }
.brand--large .brand__mark { width: 2rem; height: 2rem; }

/* ---------- App shell ---------- */
.app-header__row { width: 100%; padding-inline: 0.5rem 1rem; min-height: 3.5rem; }
.app-header__spacer { flex: 1; }
.app-sidebar { display: flex; flex-direction: column; }

/* Narrow screens: Radzen leaves the sidebar in the layout grid, so opening it squeezed the page to a sliver. Lift it out
   so it overlays the content instead, below the header, over everything else. */
@media (max-width: 48rem) {
    .rz-layout > .app-sidebar {
        position: fixed;
        inset-block: 3.5rem 0;
        inset-inline-start: 0;
        z-index: 40;
        max-width: 85vw;
        box-shadow: 0 0 1.5rem var(--ra-shadow);
    }
}
.app-sidebar__footer {
    margin: auto 1rem 1rem;
    /* On the sidebar's own background, so its text color, slightly softened (about 7:1 in light and dark). */
    color: color-mix(in srgb, var(--rz-sidebar-color, var(--ra-white)) 82%, var(--rz-sidebar-background-color, var(--ra-sidebar-fallback)));
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    /* Fractional glyph advances: with whole-pixel ones the letter spacing opened a gap inside words ("Rem ote OK"). */
    text-rendering: geometricPrecision;
}

.app-main {
    max-width: 1600px;
    margin-inline: auto;
    padding: clamp(1rem, 2.5vw, 2rem);
    padding-left: max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-right, 0px));
    outline: none;
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--ra-accent);
    color: var(--rz-on-primary, var(--ra-white));
    font-size: 0.8rem;
    font-weight: 650;
}

.user-menu__name { margin-inline-start: 0.5rem; }

@media (max-width: 48rem) {
    .user-menu__name { display: none; }
}

.page-loading { padding: 2rem; color: var(--ra-muted); }

/* ---------- Page header ---------- */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-block-end: 1.5rem;
}

.page-header h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 650; letter-spacing: -0.02em; }
.page-header__lede { margin: 0.35rem 0 0; color: var(--ra-muted); max-width: 70ch; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page-header__crumbs { margin-block-end: 0.35rem; font-size: 0.9rem; }
.page-header__crumbs .rz-breadcrumb-item:last-child { color: var(--ra-muted); }

/* ---------- Status badge (Components/Ui/StatusBadge.razor) ----------
   Radzen's lighter badges take their text color from the deep status colors, which are unreadable on dark
   surfaces (and amber on white). The tone's --ra-* token is used instead: text, a light tint and a 3:1 border. */
:root .rz-badge.status-badge {
    --status-tone: var(--ra-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--status-tone);
    background: color-mix(in srgb, var(--status-tone) 10%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--status-tone) 55%, transparent);
    font-weight: 650;
    text-transform: none;
    letter-spacing: normal;
    vertical-align: middle;
}
:root .rz-badge.status-badge .rzi { font-size: 1.1em; }
:root .rz-badge.status-badge--neutral { color: var(--ra-ink); }
:root .rz-badge.status-badge--accent { --status-tone: var(--ra-accent); }
:root .rz-badge.status-badge--info { --status-tone: var(--ra-info); }
:root .rz-badge.status-badge--good { --status-tone: var(--ra-good); }
:root .rz-badge.status-badge--warn { --status-tone: var(--ra-warn); }
:root .rz-badge.status-badge--bad { --status-tone: var(--ra-bad); }
:root .rz-badge.status-badge--compact { padding-inline: 0.3rem; }
/* A smaller tint in dark mode keeps the text on a surface close to the page's own (AA, 4.5:1). */
:root[data-theme="dark"] .rz-badge.status-badge { background: color-mix(in srgb, var(--status-tone) 5%, transparent); }

/* ---------- Account pages (static SSR, no Radzen interactivity) ---------- */
.account-shell {
    min-height: 100%;
    display: grid;
    place-content: center;
    gap: 1.25rem;
    padding: 2rem max(16px, env(safe-area-inset-left, 0px));
    font-size: 1rem;
    background:
        radial-gradient(60rem 30rem at 10% -10%, color-mix(in srgb, var(--ra-accent) 14%, transparent), transparent 70%),
        var(--rz-body-background-color, var(--ra-surface));
}

.account-card {
    width: min(26rem, calc(100vw - 2rem));
    display: grid;
    gap: 1.25rem;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border: 1px solid var(--ra-line);
    border-radius: 14px;
    background: var(--ra-surface);
    box-shadow: 0 18px 40px -24px var(--ra-shadow);
    outline: none;
}

.account-shell__note { margin: 0; text-align: center; color: var(--ra-muted); font-size: 0.875rem; }
.account-title { font-size: 1.4rem; font-weight: 650; }
.account-lede { margin: -0.5rem 0 0; color: var(--ra-muted); }
.account-form { display: grid; gap: 1rem; }

.field { display: grid; gap: 0.35rem; align-content: start; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field__hint { color: var(--ra-muted); font-size: 0.8rem; }

/* Plain (account page) inputs only; Radzen inputs inside .field keep their own look. */
.field input:not([class*="rz-"]) {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: var(--rz-input-border, 1px solid var(--ra-line));
    border-radius: 8px;
    background: var(--rz-input-background-color, var(--ra-surface));
    color: var(--ra-ink);
    font: inherit;
}

.field input[aria-invalid="true"], .field input.invalid { border-color: var(--ra-bad); }

.checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.checkbox input { width: 1.1rem; height: 1.1rem; accent-color: var(--ra-accent); }
.form-summary .validation-errors { margin: 0; padding: 0.6rem 0.9rem 0.6rem 2rem; border: 1px solid var(--ra-bad); border-radius: 8px; color: var(--ra-bad); font-size: 0.9rem; }
.form-summary .validation-errors:empty { display: none; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button--primary { background: var(--rz-primary); color: var(--rz-on-primary, var(--ra-white)); }
.button--primary:hover { filter: brightness(1.08); }
.button--quiet { background: transparent; color: var(--ra-accent); }

/* ---------- Error UI ---------- */
#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--ra-surface);
    color: var(--ra-bad);
    border-block-start: 2px solid var(--ra-bad);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Sections and shared atoms ---------- */
.section { display: grid; gap: 0.85rem; margin-block-start: 2rem; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.section__head h2 { font-size: 1.1rem; font-weight: 650; }
.section-note { margin: 0 0 1rem; max-width: 80ch; font-size: 0.9rem; }

.empty {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--ra-muted);
}
.empty > .rzi { font-size: 2.25rem; color: var(--ra-accent); opacity: 0.8; }
.empty strong { color: var(--ra-ink); font-size: 1.05rem; }
.empty p { margin: 0 0 0.5rem; max-width: 46ch; }

.with-icon { display: inline-flex; align-items: center; gap: 0.3rem; }
.with-icon .rzi { font-size: 1.05rem; color: var(--ra-muted); }
.icon-link { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px; color: var(--ra-accent); }
.icon-link:hover { background: color-mix(in srgb, var(--ra-accent) 10%, transparent); }
.mono, .mono textarea { font-family: var(--ra-font-mono) !important; font-size: 0.85rem !important; }

.switch { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--ra-line);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--ra-muted);
}
.chip--strong { border-color: color-mix(in srgb, var(--ra-accent) 55%, transparent); color: var(--ra-accent); font-weight: 600; }

/* ---------- Header run chip ---------- */
.run-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--ra-line);
    border-radius: 999px;
    color: var(--ra-muted);
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
}
.run-chip .rzi { font-size: 1.05rem; }
.run-chip--active { color: var(--ra-info); border-color: color-mix(in srgb, var(--ra-info) 50%, transparent); }
.run-chip__count { margin-inline-start: 0.25rem; font-weight: 650; }
@media (max-width: 40rem) { .run-chip span:not(.run-chip__count) { display: none; } }

/* ---------- Today ---------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    gap: var(--ra-gap);
}

.stat-tile {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.stat-tile__label { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ra-muted); font-size: 0.82rem; font-weight: 600; }
.stat-tile__label .rzi { font-size: 1.05rem; }
.stat-tile__value { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.stat-tile__context { color: var(--ra-muted); font-size: 0.8rem; }
.stat-tile--accent .stat-tile__value { color: var(--ra-accent); }
.stat-tile--good .stat-tile__value { color: var(--ra-good); }
.stat-tile--bad .stat-tile__value { color: var(--ra-bad); }
.stat-tile--warn .stat-tile__value { color: var(--ra-warn); }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--ra-gap); }
.skill-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.6rem;
    padding: 1rem 1.1rem 0.5rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.skill-card--paused { opacity: 0.7; }
.skill-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.skill-card__head h3 { font-size: 0.98rem; font-weight: 650; }
.skill-card__head a { color: inherit; text-decoration: none; }
.skill-card__head a:hover { color: var(--ra-accent); text-decoration: underline; }
.skill-card__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; }
.skill-card__numbers { display: grid; gap: 0.1rem; }
.skill-card__big { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.skill-card__open { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--ra-good); font-size: 0.82rem; font-weight: 600; }
.skill-card__open .rzi { font-size: 1rem; }
.skill-card__actions { display: flex; justify-content: space-between; border-top: 1px solid var(--ra-line); padding-top: 0.25rem; }

.sparkline { overflow: visible; flex-shrink: 0; }
.sparkline__line { fill: none; stroke: var(--ra-accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.sparkline__area { fill: color-mix(in srgb, var(--ra-accent) 14%, transparent); stroke: none; }
.sparkline__dot { fill: var(--ra-accent); }

.run-digest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.run-digest__error, .run-error, .status-card__error { color: var(--ra-bad); font-size: 0.85rem; }

/* ---------- Jobs ---------- */
.filters {
    display: grid;
    gap: 0.75rem;
    margin-block-end: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.filters__primary { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1.25rem; }
.filters__secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.filter { display: grid; gap: 0.3rem; }
.filter--grow { flex: 1 1 14rem; }
.filter label, .filter__label { font-size: 0.78rem; font-weight: 650; color: var(--ra-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.bulk-bar {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-block-end: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--ra-radius);
    background: color-mix(in srgb, var(--ra-accent) 10%, var(--ra-surface));
    border: 1px solid color-mix(in srgb, var(--ra-accent) 35%, transparent);
}

.grid-wrap { overflow-x: auto; border-radius: var(--ra-radius); container-type: inline-size; }
/* An empty grid is wider than the screen; keep its message in the visible part instead of the middle of the table. */
.grid-wrap .empty { position: sticky; left: 0; box-sizing: border-box; width: min(100cqi, 100vw); }
.jobs-grid .rz-data-row { cursor: pointer; }

.job-cell { display: grid; gap: 0.1rem; min-width: 0; }
.job-cell__meta { color: var(--ra-muted); font-size: 0.82rem; white-space: normal; }
.job-cell__hint { color: var(--ra-warn); font-size: 0.75rem; }
.job-cell__narrow { display: none; }
@media (max-width: 640px) {
    .job-cell__narrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-size: 0.8rem; }
    .job-cell__status { color: var(--ra-muted); }
    .job-cell__status::before { content: "Status: "; }
}

.terms { display: grid; gap: 0.1rem; white-space: normal; }
.terms__tax { font-weight: 650; font-size: 0.85rem; }
.terms__tax--c2c, .terms__tax--c2corw2 { color: var(--ra-good); }
.terms__tax--w2only { color: var(--ra-bad); }
.terms__tax--unknown { color: var(--ra-muted); font-weight: 500; }
.terms__auth { font-size: 0.78rem; color: var(--ra-muted); }

.early { color: var(--ra-warn); font-weight: 700; }

/* ---------- Job detail panel ---------- */
.job-detail { display: grid; gap: 1.25rem; }
.job-detail__head { display: grid; gap: 0.6rem; }
.job-detail__company { display: flex; align-items: center; gap: 0.75rem; }
.job-detail__company img { border-radius: 8px; border: 1px solid var(--ra-line); background: var(--ra-white); }
.job-detail__company div { display: grid; }
.job-detail__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.job-detail__when { margin: 0; font-size: 0.85rem; }
.job-detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.job-detail__actions a.rz-button { text-decoration: none; }

.detail-section { display: grid; gap: 0.6rem; padding-top: 1rem; border-top: 1px solid var(--ra-line); }
.detail-section h3 { font-size: 0.95rem; font-weight: 650; display: flex; align-items: baseline; gap: 0.5rem; }
.detail-section__sub { font-size: 0.78rem; font-weight: 500; }
.screen-summary { margin: 0; font-weight: 600; }

.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.45rem 1rem; margin: 0; }
.facts dt { color: var(--ra-muted); font-size: 0.85rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 0.4rem; } }

.evidence { margin-top: 0.2rem; font-size: 0.8rem; }
.evidence blockquote {
    margin: 0.35rem 0 0;
    padding: 0.4rem 0.7rem;
    border-inline-start: 3px solid var(--ra-line);
    color: var(--ra-muted);
    font-style: italic;
}

.contacts { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.contacts li { display: flex; align-items: center; gap: 0.5rem; }
.contacts li > .rzi { color: var(--ra-muted); }
.contacts li div { display: grid; }

.job-description { line-height: 1.6; overflow-wrap: anywhere; }
.job-description :where(p, ul, ol) { margin: 0 0 0.75rem; }
.job-description :where(h1, h2, h3, h4, h5, h6) { font-size: 1rem; margin: 1rem 0 0.4rem; }

/* ---------- Searches ---------- */
.search-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.search-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.search-row--paused { opacity: 0.72; }
.search-row__order { display: grid; }
.search-row__main { display: grid; gap: 0.3rem; min-width: 0; }
.search-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.search-row__title h2 { font-size: 1rem; font-weight: 650; }
.search-row__query {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--ra-font-mono);
    font-size: 0.78rem;
    color: var(--ra-muted);
}
.search-row__meta { font-size: 0.8rem; }
.search-row__yield { display: grid; grid-template-columns: repeat(4, minmax(4.5rem, auto)); gap: 0.25rem 1rem; margin: 0; }
.search-row__yield div { display: grid; }
.search-row__yield dt { font-size: 0.7rem; color: var(--ra-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.search-row__yield dd { margin: 0; font-weight: 650; }
.noise--high { color: var(--ra-bad); }
.search-row__actions { display: flex; align-items: center; gap: 0.25rem; }

@media (max-width: 64rem) {
    .search-row { grid-template-columns: auto minmax(0, 1fr); }
    .search-row__yield, .search-row__actions { grid-column: 2; }
}

.search-editor { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.form-grid--3 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.search-editor .field label { font-weight: 600; font-size: 0.88rem; }
.query-status { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; font-weight: 600; }
.query-status .rzi { font-size: 1.05rem; }
.query-status--ok { color: var(--ra-good); }
.query-status--bad { color: var(--ra-bad); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; padding-top: 0.5rem; }

/* ---------- Runs ---------- */
.live-run {
    display: grid;
    gap: 0.5rem;
    margin-block-end: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--ra-info) 45%, transparent);
    border-radius: var(--ra-radius);
    background: color-mix(in srgb, var(--ra-info) 6%, var(--ra-surface));
}
.live-run__head { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }

/* ---------- System ---------- */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: var(--ra-gap); }
.status-card {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.status-card header { display: flex; align-items: center; gap: 0.5rem; }
.status-card header h2 { font-size: 1.05rem; font-weight: 650; flex: 1; }
.status-card header > .rzi { color: var(--ra-accent); }
.status-card p { margin: 0; }

.vendor-form { display: grid; gap: 1rem; }
.vendor-form .field label { font-weight: 600; font-size: 0.88rem; }
.field__hint--warn { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--ra-bad); font-weight: 600; }
.vendor-detail { display: grid; gap: 1.25rem; }
.vendor-detail__head { display: grid; gap: 0.6rem; }
.vendor-detail__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }

.vendor-contacts { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.vendor-contacts li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--ra-line);
    border-radius: 8px;
}
.vendor-contacts__main { display: grid; gap: 0.2rem; min-width: 0; }
.vendor-contacts__lines { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.88rem; overflow-wrap: anywhere; }
.vendor-contacts__notes { font-size: 0.82rem; }
.vendor-contacts__actions { display: flex; align-items: flex-start; flex-shrink: 0; }

.hotlist-box { display: grid; gap: 0.5rem; margin: 0; padding: 0.75rem 0.9rem; border: 1px solid var(--ra-line); border-radius: 8px; }
.hotlist-box legend { padding-inline: 0.4rem; font-weight: 650; font-size: 0.85rem; }
.hotlist-box__off { display: flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--ra-bad); font-weight: 600; }

.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; }
.plain-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.1rem 1rem; }

.submit-dialog { display: grid; gap: 1rem; }
.submit-dialog__job { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.6rem 0.8rem; border-radius: 8px; background: color-mix(in srgb, var(--ra-accent) 7%, var(--ra-surface)); }
.conflict-alert ul { margin: 0.4rem 0; }
.stage-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.stage-form .field { min-width: 11rem; }
.stage-form__note { flex: 1 1 16rem; }

.pipeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 1fr); gap: var(--ra-gap); overflow-x: auto; padding-block-end: 0.5rem; align-items: start; }
.pipeline__col { display: grid; gap: 0.6rem; align-content: start; padding: 0.75rem; border: 1px solid var(--ra-line); border-radius: var(--ra-radius); background: var(--ra-surface); min-width: 0; }
.pipeline__head { display: flex; justify-content: space-between; align-items: center; }
.pipeline__count { font-weight: 700; color: var(--ra-muted); }
.pipeline__empty { margin: 0; font-size: 0.85rem; }
.pipe-card {
    all: unset;
    box-sizing: border-box;
    display: grid;
    gap: 0.15rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--ra-line);
    border-radius: 8px;
    background: var(--ra-raised);
    cursor: pointer;
    font-size: 0.88rem;
    /* Long words hyphenate (the page is lang="en"); only a word longer than the card, such as an address, breaks bare. */
    hyphens: auto;
    overflow-wrap: break-word;
}
.pipe-card:hover { border-color: var(--ra-accent); }
.pipe-card:focus-visible { outline: 2px solid var(--ra-accent); outline-offset: 2px; }
.pipe-card__meta { font-size: 0.78rem; }
.stat-row--compact { grid-template-columns: repeat(auto-fit, minmax(11.5rem, 16rem)); }

/* ==========================================================================
   Bench (consultants, resumes, job fits) — Features/Consultants
   ========================================================================== */

.bench-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--ra-info) 45%, transparent);
    border-radius: var(--ra-radius);
    background: color-mix(in srgb, var(--ra-info) 6%, var(--ra-surface));
    color: var(--ra-ink);
    font-size: 0.88rem;
}

.chips--tight { gap: 0.25rem; }
.chips--tight .chip { padding: 0.05rem 0.5rem; font-size: 0.75rem; white-space: nowrap; }


/* Job detail: who fits */
.bench-fits { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.bench-fits li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: start; gap: 0.75rem; }
.bench-fits__who { display: grid; gap: 0.1rem; min-width: 0; }
.bench-fits__reasons { color: var(--ra-muted); font-size: 0.82rem; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .bench-fits li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* Today: fits your bench */
.bench-today { display: grid; grid-template-columns: minmax(11.5rem, 15rem) minmax(0, 1fr); gap: var(--ra-gap); align-items: start; }
.bench-today__list {
    margin: 0;
    padding: 0.4rem 1rem;
    list-style: none;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.bench-today__list li { display: grid; gap: 0.2rem; padding: 0.55rem 0; }
.bench-today__list li + li { border-top: 1px solid var(--ra-line); }
.bench-today__none { margin: 0; align-self: center; }
.bench-today__empty { border: 1px dashed var(--ra-line); border-radius: var(--ra-radius); }
@media (max-width: 48rem) { .bench-today { grid-template-columns: 1fr; } }

/* Consultant panel */
.consultant-panel { display: grid; gap: 1rem; }
.consultant-panel__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem 1rem; }
.consultant-panel__name { font-size: 1.25rem; font-weight: 650; }
.consultant-panel__meta { margin: 0.2rem 0 0; font-size: 0.88rem; }
.consultant-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.consultant-form { display: grid; gap: 1rem; padding-top: 0.5rem; }
.form-group { display: grid; gap: 0.85rem; margin: 0; padding: 0.9rem 1rem 1rem; border: 1px solid var(--ra-line); border-radius: var(--ra-radius); min-width: 0; }
.form-group legend { padding: 0 0.35rem; font-size: 0.78rem; font-weight: 650; color: var(--ra-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.consultant-form .field label { font-weight: 600; font-size: 0.88rem; }
.consultant-form :is(.rz-textbox, .rz-dropdown, .rz-numeric, .rz-datepicker, .rz-textarea) { width: 100%; }
.switch-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.query-status--idle { color: var(--ra-muted); font-weight: 500; }

.skill-chips { margin: 0.25rem 0 0; padding: 0; list-style: none; }
.chip--removable { display: inline-flex; align-items: center; gap: 0.2rem; padding-inline-end: 0.25rem; color: var(--ra-ink); }
.chip--removable button {
    all: unset;
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    cursor: pointer;
    color: var(--ra-muted);
    font-size: 0.9rem;
    line-height: 1;
}
.chip--removable button:hover { background: color-mix(in srgb, var(--ra-bad) 14%, transparent); color: var(--ra-bad); }
.chip--removable button:focus-visible { outline: 2px solid var(--ra-accent); }
.skill-suggest { display: grid; gap: 0.4rem; justify-items: start; }

/* Resumes */
.resumes { display: grid; gap: 1rem; padding-top: 0.5rem; }
.resume-upload { display: grid; gap: 0.4rem; }
.resume-upload__drop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1.5px dashed color-mix(in srgb, var(--ra-accent) 45%, var(--ra-line));
    border-radius: var(--ra-radius);
    cursor: pointer;
}
.resume-upload__drop:hover { background: color-mix(in srgb, var(--ra-accent) 6%, transparent); }
.resume-upload__drop > span { display: grid; gap: 0.1rem; font-size: 0.88rem; }
.resume-upload__drop .rzi { font-size: 1.8rem; color: var(--ra-accent); }
.resume-upload__drop--busy { cursor: progress; opacity: 0.75; }
.resume-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.resume-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
}
.resume-row > .rzi { font-size: 1.6rem; color: var(--ra-muted); }
.resume-row__main { display: grid; gap: 0.1rem; min-width: 0; }
.resume-row__name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-weight: 600; overflow-wrap: anywhere; }
.resume-row__meta { font-size: 0.8rem; }
.resume-row__actions { display: flex; gap: 0.1rem; }

/* Best jobs */
.best-jobs { display: grid; gap: 0.75rem; padding-top: 0.5rem; }
.best-jobs__list { margin: 0; padding: 0; list-style: none; display: grid; }
.best-jobs__list li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.5rem; padding: 0.6rem 0; }
.best-jobs__list li + li { border-top: 1px solid var(--ra-line); }
.best-jobs__main { display: grid; gap: 0.1rem; min-width: 0; font-size: 0.88rem; }
/* ---------- end Bench ---------- */

/* ==========================================================================
   Team, roles and settings (Features/Team, Features/Settings, job assignment)
   ========================================================================== */
.user-menu__role {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--ra-muted);
}
.user-menu__name { display: inline-grid; text-align: start; line-height: 1.2; }

.avatar--off { background: var(--ra-line); color: var(--ra-muted); }
.avatar--sm { width: 1.6rem; height: 1.6rem; font-size: 0.68rem; }

/* Team page */
.team-person { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.team-person__text { display: grid; min-width: 0; white-space: normal; }
.team-person__name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.team-person__email { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-person__you { width: fit-content; padding: 0 0.45rem; font-size: 0.7rem; }
.team-status { font-size: 0.88rem; }
.team-status--ok .rzi { color: var(--ra-good); }
.team-status--warn .rzi { color: var(--ra-warn); }
.team-status--off { color: var(--ra-muted); }
.team-actions { display: inline-flex; gap: 0.15rem; justify-content: flex-end; }
.team-note { margin-top: 1rem; }
.team-form { display: grid; gap: 1rem; }
.team-form__who { margin: -0.25rem 0 0; }
.team-form .switch { margin-bottom: -0.6rem; }

.role-choice { display: grid; gap: 0.5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.role-choice legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.role-choice__option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--ra-line);
    border-radius: 8px;
    cursor: pointer;
}
.role-choice__option--selected { border-color: var(--ra-accent); background: color-mix(in srgb, var(--ra-accent) 7%, transparent); }
.role-choice__option input { margin-top: 0.2rem; accent-color: var(--ra-accent); }
.role-choice[disabled] .role-choice__option { cursor: not-allowed; opacity: 0.7; }
.role-choice__text { display: grid; gap: 0.15rem; }
.role-choice__name { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 650; }
.role-choice__name .rzi { font-size: 1.1rem; color: var(--ra-accent); }
.role-choice__desc { font-size: 0.82rem; color: var(--ra-muted); }

.temp-password { display: grid; gap: 1rem; }
.temp-password p { margin: 0; }
.temp-password__facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.temp-password__value {
    font-family: var(--ra-font-mono);
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border: 1px dashed var(--ra-line);
    border-radius: 6px;
    user-select: all;
}
.temp-password__note {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--ra-warn) 45%, transparent);
    background: color-mix(in srgb, var(--ra-warn) 8%, transparent);
    font-size: 0.9rem;
}
.temp-password__note .rzi { color: var(--ra-warn); }

/* Settings page */
.settings-updated { display: block; margin-top: 0.25rem; font-size: 0.85rem; }
.settings-layout { display: grid; gap: var(--ra-gap); max-width: 64rem; }
.settings-card {
    display: grid;
    gap: 1.1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.settings-card__head { display: flex; align-items: center; gap: 0.5rem; }
.settings-card__head h2 { font-size: 1.1rem; font-weight: 650; flex: 1; }
.settings-card__head > .rzi { color: var(--ra-accent); }
.settings-card p { margin: 0; }
.settings-card__actions { display: flex; justify-content: flex-end; gap: 0.5rem; padding-top: 0.25rem; border-top: 1px solid var(--ra-line); padding-block-start: 0.9rem; }
.settings-field { display: grid; gap: 0.35rem; }
.settings-field > label:not(.switch) { font-weight: 600; font-size: 0.9rem; }
.default-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-size: 0.78rem; color: var(--ra-muted); }

.settings-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem 2rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: var(--ra-raised);
}
.settings-preview h3 { font-size: 0.78rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ra-muted); margin-bottom: 0.4rem; }
.next-runs { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.2rem; }
.next-runs li { display: flex; gap: 0.75rem; }
.next-runs__day { min-width: 7.5rem; }
.next-runs__zone { margin-top: 0.4rem !important; font-size: 0.78rem; }
.estimate { display: flex; align-items: baseline; gap: 0.4rem; }
.settings-warning, .settings-ok { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.88rem; margin-top: 0.5rem !important; }
.settings-warning { color: var(--ra-warn); font-weight: 600; }
.settings-ok { color: var(--ra-good); }
.settings-warning .rzi, .settings-ok .rzi { font-size: 1.15rem; }
.settings-recipients { display: flex; align-items: flex-start; gap: 0.5rem; }
.settings-recipients .rzi { color: var(--ra-muted); }

.spend-meter { display: grid; gap: 0.4rem; max-width: 32rem; }
.spend-meter__numbers { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.spend-meter__value { font-size: 1.5rem; font-weight: 650; }

.schedule-builder { display: grid; gap: 0.75rem; }
.schedule-builder__label { font-weight: 600; font-size: 0.9rem; }
.schedule-builder__row { display: grid; grid-template-columns: 4rem 1fr; align-items: center; gap: 0.5rem 0.75rem; }
.schedule-builder__sub { font-size: 0.82rem; color: var(--ra-muted); }
.schedule-builder__summary, .schedule-builder__problem { display: flex; align-items: center; gap: 0.35rem; margin: 0; font-size: 0.88rem; }
.schedule-builder__summary { font-weight: 600; }
.schedule-builder__summary .rzi { color: var(--ra-accent); font-size: 1.1rem; }
.schedule-builder__problem { color: var(--ra-bad); font-weight: 600; }
.schedule-builder__problem .rzi { font-size: 1.1rem; }
@media (max-width: 30rem) { .schedule-builder__row { grid-template-columns: 1fr; } }
.time-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.time-list li { display: inline-flex; align-items: center; gap: 0.15rem; }

/* Job assignment and activity */
.assignee { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; min-width: 0; }
.assignee__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-filter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.job-team { display: grid; gap: 0.6rem; }
.job-team__owner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* Searches page for recruiters: no reorder column */
.search-row--readonly { grid-template-columns: minmax(0, 1fr) auto auto; }
@media (max-width: 64rem) {
    .search-row--readonly { grid-template-columns: minmax(0, 1fr); }
    .search-row--readonly .search-row__yield, .search-row--readonly .search-row__actions { grid-column: 1; }
}
.no-access { display: grid; gap: 1rem; max-width: 34rem; }
.no-access .button { width: fit-content; }
span.switch label { cursor: pointer; }

/* ======================================================================
   Email, summary, outreach and hotlist
   ====================================================================== */
.status-card__links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.9rem; }
.test-email { display: grid; gap: 0.35rem; }
.test-email label { font-size: 0.85rem; font-weight: 600; }
.test-email__row { display: flex; gap: 0.5rem; align-items: center; }

.log-recipient { overflow-wrap: anywhere; }
.log-subject { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.log-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; }

.summary-status { margin-block-end: 1.25rem; }
.summary-preview {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.summary-preview__head { display: grid; gap: 0.15rem; padding-block-end: 0.75rem; border-bottom: 1px solid var(--ra-line); }
.summary-preview__text pre {
    margin: 0.5rem 0 0;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    border-radius: 8px;
    background: var(--ra-raised);
    font-family: var(--ra-font-mono);
    font-size: 0.82rem;
    white-space: pre-wrap;
}

.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }

.template-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.template-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.template-card__main { display: grid; gap: 0.3rem; min-width: 0; flex: 1 1 24rem; }
.template-card__title { display: flex; align-items: center; gap: 0.5rem; }
.template-card__title h3 { font-size: 1rem; font-weight: 650; }
.template-card__subject, .template-card__body { margin: 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.template-card__body { color: var(--ra-muted); }
.template-card__actions { display: flex; flex-wrap: wrap; gap: 0.15rem; }

.template-editor { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem 1.5rem; align-items: start; }
.template-editor > :first-child { grid-column: 1 / -1; }
.template-editor__form { display: grid; gap: 1rem; }
.template-editor__side { display: grid; gap: 1.25rem; min-width: 0; }
.template-editor__side h3 { font-size: 0.95rem; font-weight: 650; margin-block-end: 0.4rem; }
.template-editor__actions { grid-column: 1 / -1; }
.template-preview {
    margin: 0;
    padding: 0.75rem 1rem;
    max-height: 18rem;
    overflow: auto;
    border: 1px solid var(--ra-line);
    border-radius: 8px;
    background: var(--ra-raised);
    font: inherit;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.template-preview__subject { margin: 0 0 0.4rem; display: grid; }
.placeholder-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; max-height: 14rem; overflow: auto; }
.placeholder-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; font-size: 0.82rem; }
@media (max-width: 56rem) { .template-editor { grid-template-columns: 1fr; } }

.outreach-draft { display: grid; gap: 1rem; }
.outreach-draft__job { margin: 0; }
.outreach-draft__actions, .outreach-draft__send { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.outreach-draft__actions a.rz-button { text-decoration: none; }
.outreach-draft__send { justify-content: space-between; padding-top: 0.75rem; border-top: 1px solid var(--ra-line); }

.hotlist-step__tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 1.25rem; }
.hotlist-preview__intro p { margin: 0 0 0.75rem; white-space: pre-line; }
.hotlist-preview__footer { margin: 0; padding-top: 0.6rem; border-top: 1px solid var(--ra-line); font-size: 0.82rem; }
.batch-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.batch-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1.25rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.batch-row__main { display: grid; min-width: 0; }
.batch-row__counts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; font-size: 0.88rem; }
.status-card__links a { display: inline-flex; align-items: center; gap: 0.3rem; }
.status-card__links .rzi { font-size: 1.1rem; }
.avail--now { color: var(--ra-good); font-weight: 600; }

/* ==========================================================================
   Global UI fixes: theme, contrast, focus, dialogs, phone layout
   ========================================================================== */

/* Theme. <html data-theme> is rendered from the theme cookie and kept in step with the header toggle
   (wwwroot/js/theme.js). Native controls and scrollbars follow it too. */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Amber text on white is unreadable (#fac152 is 1.7:1), so light mode uses a deep amber, and a deeper teal for info:
   both reach 4.5:1 on their own tinted badge and notice backgrounds (QA4: 4.42:1 before).
   Dark mode keeps Radzen's bright amber, which reads well on the dark surfaces. */
:root {
    --ra-warn: color-mix(in srgb, var(--rz-warning) 45%, var(--ra-black));
    --ra-info: color-mix(in srgb, var(--rz-info) 85%, var(--ra-black));
}
/* Radzen's dark WCAG palette keeps the deep status colors (made for white text on a filled button), which
   are unreadable as text on the dark surfaces. Text tokens get a lighter tint of the same hue (about 5:1). */
:root[data-theme="dark"] {
    --ra-warn: color-mix(in srgb, var(--rz-warning) 70%, var(--ra-white));
    --ra-accent: color-mix(in srgb, var(--rz-primary) 25%, var(--ra-white));
    --ra-good: color-mix(in srgb, var(--rz-success) 25%, var(--ra-white));
    --ra-bad: color-mix(in srgb, var(--rz-danger) 25%, var(--ra-white));
    --ra-info: color-mix(in srgb, var(--rz-info) 25%, var(--ra-white));
    /* Radzen's base-50 is white in the dark theme; raised surfaces (cards on the board) need a dark tone. */
    --ra-raised: var(--rz-base-700);
}
/* The avatar is a filled badge with white initials, so it keeps the deep brand color. */
.avatar:not(.avatar--off) { background: var(--rz-primary); }

/* Tinted alerts: body text in the normal ink; the title and icon carry the tone. */
:root .rz-alert.rz-shade-lighter { --rz-alert-color: var(--ra-ink); }
:root .rz-alert.rz-warning.rz-shade-lighter { --rz-alert-title-color: var(--ra-warn); --rz-alert-icon-color: var(--ra-warn); }
/* Notice (Components/Ui/Notice.razor): the title and icon take the tone's --ra-* token, which stays readable in dark mode. */
:root .rz-alert.notice--info { --rz-alert-title-color: var(--ra-info); --rz-alert-icon-color: var(--ra-info); }
:root .rz-alert.notice--success { --rz-alert-title-color: var(--ra-good); --rz-alert-icon-color: var(--ra-good); }
:root .rz-alert.notice--error { --rz-alert-title-color: var(--ra-bad); --rz-alert-icon-color: var(--ra-bad); }

/* Plain links use the theme's link color (the browser default blue is unreadable in dark mode). */
:where(a) { color: var(--rz-link-color, var(--ra-accent)); }
:where(a):hover { color: var(--rz-link-hover-color, var(--rz-link-color)); }

/* Focus. Blazor moves focus to the page's h1 (and the account card) after navigation so screen readers
   announce the new page. That focus is programmatic, so it shouldn't draw a ring. */
:where(h1, h2, h3, main, [role="main"], .account-card)[tabindex="-1"]:focus,
:where(h1, h2, h3):focus:not(:focus-visible) { outline: none; }

/* Inputs. Plain account-page fields use the same visible border as Radzen inputs (WCAG 1.4.11, 3:1). The
   .field input rule near the top takes --rz-input-border as the full border shorthand it is. */
.field input:not([class*="rz-"]):hover { border-color: var(--ra-accent); }
.field input:not([class*="rz-"])[aria-invalid="true"], .field input:not([class*="rz-"]).invalid { border-color: var(--ra-bad); }
/* Placeholders are examples, not values: lighter than real text, but still 4.5:1 (QA4: 4.46:1 before). Radzen's
   dropdowns and numerics read the same token. */
:root { --ra-placeholder: color-mix(in srgb, var(--ra-muted) 90%, var(--ra-surface)); --rz-input-placeholder-color: var(--ra-placeholder); }
:is(input, textarea)::placeholder { color: var(--ra-placeholder); opacity: 1; }

/* Disabled text and outlined buttons (move up/down, disable a member): Radzen fades them to 20% opacity, which leaves
   the icon near 1:1, invisible in dark mode. They keep full opacity in the muted ink instead (over 4.5:1); being
   grey rather than the accent color, and not clickable, marks them as unavailable. */
:root .rz-button.rz-state-disabled:is(.rz-variant-text, .rz-variant-outlined) { opacity: 1; color: var(--ra-muted); }
:root .rz-button.rz-state-disabled:is(.rz-variant-text, .rz-variant-outlined) .rzi { color: inherit; }

/* Links inside a notice take the notice's body ink and an underline: the theme's link color falls under 4.5:1 on
   the tinted background (QA4: 4.40:1 in dark). */
.notice a:not(.rz-button) { color: var(--ra-ink); text-decoration: underline; }

/* Inline validation messages take the readable danger token: Radzen's deep red is about 2:1 on dark cards. */
:root .rz-messages-error { color: var(--ra-bad); }

/* Dialogs. A dialog opened from a side panel (Submit a consultant, Add a vendor, Edit contact…) must sit
   above the panel; Radzen gives both the same z-index. Toasts stay above everything. */
.rz-dialog-wrapper, .rz-dialog-wrapper .rz-dialog { z-index: calc(var(--rz-dialog-zindex, 1001) + 100); }
.rz-dialog-wrapper .rz-dialog-mask { z-index: calc(var(--rz-dialog-mask-zindex, 1000) + 100); }
.rz-notification { z-index: 1300; }

/* A board wider than the screen scrolls sideways; a soft edge shadow shows there is more. */
@media (max-width: 80rem) {
    .pipeline {
        background:
            linear-gradient(to right, var(--rz-body-background-color), transparent) left / 1.5rem 100% no-repeat local,
            linear-gradient(to left, var(--rz-body-background-color), transparent) right / 1.5rem 100% no-repeat local,
            radial-gradient(farthest-side at 0 50%, var(--ra-scroll-shadow), transparent) left / 0.75rem 100% no-repeat scroll,
            radial-gradient(farthest-side at 100% 50%, var(--ra-scroll-shadow), transparent) right / 0.75rem 100% no-repeat scroll;
    }
}
.job-cell { white-space: normal; }

/* Pipeline: the six stages share the width equally, each wide enough for a long company name on one line, so
   all six fit at 1440. Narrower screens scroll the board sideways, one column at a time. */
.pipeline:has(.pipeline__col--closed) {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(10rem, 1fr));
    gap: 0.75rem;
    scroll-snap-type: x proximity;
}
.pipeline__col { scroll-snap-align: start; }
.pipeline__col--closed { background: var(--ra-raised); }
.pipeline__col--closed .pipe-card { background: var(--ra-surface); }
@media (max-width: 48rem) {
    .pipeline:has(.pipeline__col--closed) { grid-template-columns: repeat(6, minmax(15rem, 82vw)); }
}

/* Filters fold behind a "Filters (n)" button on a phone (Components/Ui/FiltersPanel.razor). */
.filters__body { display: contents; }
.filters__toggle { display: none; }
@media (max-width: 48rem) {
    .filters { gap: 0; padding: 0.35rem; }
    .filters__toggle {
        all: unset;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        min-height: 2.75rem;
        padding: 0 0.65rem;
        border-radius: 8px;
        font-weight: 650;
        color: var(--ra-ink);
        cursor: pointer;
    }
    .filters__toggle:focus-visible { outline: 2px solid var(--ra-accent); outline-offset: 1px; }
    .filters__toggle .rzi { color: var(--ra-muted); }
    .filters__chevron { margin-inline-start: auto; }
    .filters__body { display: none; }
    .filters--open .filters__body { display: grid; gap: 0.75rem; padding: 0.5rem 0.65rem 0.65rem; }
    .filters--open { gap: 0; }
    .filters .filter, .filters .filter--grow { flex: 1 1 100%; }
    .filters .filter :is(.rz-dropdown, .rz-datepicker, .rz-textbox) { width: 100% !important; }
    .filters__secondary :is(.rz-dropdown) { width: 100% !important; }
}

/* Header on a phone: avatar only (the name and role are in the menu), and no wrapping. */
@media (max-width: 48rem) {
    .user-menu__name { display: none; }
    .app-header__row { gap: 0.25rem !important; padding-inline: 0.25rem 0.5rem; }
    .app-header .rz-profile-menu .rz-navigation-item-icon-children { display: none; }
    .app-header .rz-profile-menu .rz-navigation-item-link { padding-inline: 0.25rem; }
}
@media (max-width: 26rem) {
    .app-header .brand > span { display: none; }
}

/* Stage moves and hard stops (Submissions) */
.conflict-alert__ask { margin: 0.5rem 0 0; }
.conflict-alert__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.dialog-actions { align-items: center; }
.dialog-actions__note { margin-inline-end: auto; font-size: 0.88rem; }
.fit-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.default-note__changed { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--ra-warn); font-weight: 650; }
.default-note__changed .rzi { font-size: 0.95rem; }
/* Dark mode: Radzen's selected select-bar item is deep red on dark red; use the readable accent tint. */
:root[data-theme="dark"] .rz-selectbar .rz-button.rz-state-active { color: var(--ra-accent); }
/* Phone: settings cards never grow past the screen (long dropdowns and previews shrink instead). */
.settings-layout > *, .settings-card > * { min-width: 0; }
.settings-card :is(.rz-dropdown, .rz-textbox, .rz-numeric) { max-width: 100%; }
@media (max-width: 48rem) {
    .rz-selectbar { flex-wrap: wrap; }
    .search-row__yield { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Dark mode: text and outlined primary buttons ("Add time", "Clear filters", "Keep it where it is") use the
   readable accent tint instead of the deep brand red. */
:root[data-theme="dark"] .rz-button:is(.rz-variant-text, .rz-variant-outlined).rz-primary:not(:disabled) { color: var(--ra-accent); }
:root[data-theme="dark"] .rz-button.rz-variant-outlined.rz-primary:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ra-accent); }
/* The same for danger ("Block this vendor", "Delete", "Remove logo"): deep red text is 1.5:1 on the dark cards. */
:root[data-theme="dark"] .rz-button:is(.rz-variant-text, .rz-variant-outlined).rz-danger:not(:disabled) { color: var(--ra-bad); }
:root[data-theme="dark"] .rz-button.rz-variant-outlined.rz-danger:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ra-bad); }

/* ======================================================================
   Workspaces, platform and branding (picker, switcher, Support view, /platform, logo)
   ====================================================================== */

/* A workspace's logo or initials. */
.workspace-mark {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    border: 1px solid var(--ra-line);
    background: color-mix(in srgb, var(--ra-accent) 14%, var(--ra-surface));
    color: var(--ra-ink);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    object-fit: contain;
}
/* Logos are drawn for a light page; a white tile keeps a dark logo readable in dark mode. */
.workspace-mark { position: relative; overflow: hidden; }
.workspace-mark__img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 2px; object-fit: contain; background: var(--ra-white); }
/* Painted only when the image failed: the alt text (the initials) over the tile colour, hiding the broken-image icon. */
.workspace-mark__img::after {
    content: attr(alt);
    position: absolute;
    inset: -2px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--ra-accent) 14%, var(--ra-surface));
    color: var(--ra-ink);
}
.workspace-mark--sm { width: 1.75rem; height: 1.75rem; border-radius: 6px; font-size: 0.7rem; }
.workspace-mark--lg { width: 4rem; height: 4rem; border-radius: 12px; font-size: 1.35rem; }

/* Header switcher: the current workspace's mark and name. */
.workspace-switcher { min-width: 0; }
.workspace-switcher__name {
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
    margin-inline-start: 0.45rem;
}
.switcher-item { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.switcher-item__text { display: grid; line-height: 1.2; }
.switcher-item__text small { color: var(--ra-muted); font-size: 0.75rem; }
.switcher-item__name { font-weight: 600; }
.switcher-item--paused .workspace-mark, .switcher-item--paused .switcher-item__name { opacity: 0.6; }
@media (max-width: 48rem) {
    .app-header .brand > span { display: none; }
    .workspace-switcher__name { max-width: 7.5rem; }
}
@media (max-width: 26rem) {
    /* The workspace's own mark and name matter more than RecruitArc's on a phone. */
    .app-header .brand { display: none; }
    .workspace-switcher__name { max-width: 7rem; }
}

/* Support view banner: cannot be dismissed, words and an icon, not colour alone. */
.support-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    width: 100%;
    padding: 0.5rem max(1rem, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--ra-warn) 16%, var(--ra-surface));
    border-block-end: 2px solid var(--ra-warn);
    color: var(--ra-ink);
    font-size: 0.9rem;
}
.support-banner__icon { color: var(--ra-warn); font-size: 1.35rem; }
.support-banner__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.75rem; margin: 0; flex: 1; min-width: 0; }
.support-banner__reason { overflow-wrap: anywhere; }
.support-banner__ends { color: var(--ra-muted); }
.support-banner__leave {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 2.25rem;
    padding: 0.25rem 0.85rem;
    border: 1px solid var(--ra-ink);
    border-radius: 8px;
    color: var(--ra-ink);
    font-weight: 650;
    text-decoration: none;
}
.support-banner__leave:hover { background: color-mix(in srgb, var(--ra-ink) 8%, transparent); }
.support-banner__leave:focus-visible { outline: 2px solid var(--ra-accent); outline-offset: 2px; }
.app-header:has(.support-banner) { height: auto; flex-wrap: wrap; }

/* Workspace picker and paused page (account card). */
.picker { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.picker__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--ra-line);
    border-radius: 10px;
    color: var(--ra-ink);
    text-decoration: none;
}
.picker__item:hover { border-color: var(--ra-accent); background: color-mix(in srgb, var(--ra-accent) 6%, transparent); }
.picker__item:focus-visible { outline: 2px solid var(--ra-accent); outline-offset: 2px; }
.picker__text { display: grid; flex: 1; min-width: 0; }
.picker__name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--ra-muted); font-size: 0.85rem; }
.picker__go { color: var(--ra-muted); }
.picker__item--paused .workspace-mark, .picker__item--paused .picker__name { opacity: 0.65; }
.picker-footer { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; }
.paused { display: grid; gap: 0.75rem; justify-items: start; }
.paused__name { margin: 0; font-weight: 650; color: var(--ra-muted); }
.paused .account-title { display: inline-flex; align-items: center; gap: 0.4rem; }
.paused .account-title .rzi { color: var(--ra-warn); }
.paused .account-lede { margin: 0; }
.paused__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Platform pages: RadzenLayout without a sidebar, one column. */
.platform-header .app-header__row { padding-inline: 1rem; }
.platform-main { width: 100%; max-width: 72rem; }

.platform-ws { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ra-ink); text-decoration: none; }
.platform-ws:hover strong { text-decoration: underline; }
.platform-ws:focus-visible { outline: 2px solid var(--ra-accent); outline-offset: 2px; border-radius: 6px; }
.platform-ws__text { display: grid; }
.platform-flag { margin-inline-start: 0.4rem; }
.platform-person-cell { display: grid; }
.platform-ws-head__title { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.platform-ws-head .page-header__lede { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.platform-form { display: grid; gap: 1rem; }
.platform-step__number {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--ra-accent);
    color: var(--rz-on-primary, var(--ra-white));
    font-weight: 700;
    font-size: 0.9rem;
}
.platform-step__number--done { background: var(--ra-good); }
.platform-step__number--done .rzi { font-size: 1.1rem; color: inherit; }
.platform-subhead { font-size: 0.95rem; font-weight: 650; margin: 0.5rem 0 0; display: flex; align-items: center; gap: 0.35rem; }
.platform-subhead--danger { color: var(--ra-bad); }
.platform-people { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.platform-person { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.65rem; }
.platform-person__text { display: grid; flex: 1; min-width: 12rem; }
.platform-person__email { font-size: 0.82rem; overflow-wrap: anywhere; }
.platform-person__role { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.platform-person--off .platform-person__text { opacity: 0.7; }

.slug-input { display: flex; align-items: center; gap: 0.35rem; }
.slug-input__prefix { color: var(--ra-muted); }

.purge { display: grid; gap: 0.85rem; }
.purge p { margin: 0; }
.purge__list li { justify-content: flex-start; align-items: center; gap: 0.4rem; }
.purge__list .rzi { color: var(--ra-bad); font-size: 1.1rem; }

/* Settings: Workspace, Apify, AI and Email cards. */
.settings-label { font-weight: 600; font-size: 0.9rem; }
.logo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.logo-field__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.logo-upload { gap: 0.35rem; border-color: var(--ra-line); min-height: 2.5rem; }
fieldset.settings-field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.settings-field legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; padding: 0; }
.email-test { display: grid; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--ra-line); }
.email-test h3 { font-size: 0.95rem; font-weight: 650; margin: 0; }

/* Support access log. */
.support-log { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--ra-gap); max-width: 64rem; }
.support-log__item article {
    display: grid;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--ra-line);
    border-radius: var(--ra-radius);
    background: var(--ra-surface);
}
.support-log__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.support-log__head h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.support-log__reason { margin: 0; overflow-wrap: anywhere; }
.support-log__actions { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; font-size: 0.9rem; }
.support-log__actions li { display: grid; grid-template-columns: 4.75rem 1fr; gap: 0.5rem; }
.settings-card .form-grid { align-items: start; }
.workspace-switcher .rz-navigation-item-link { flex-direction: row; align-items: center; flex-wrap: nowrap; }
.workspace-switcher .item-text { display: flex; align-items: center; min-width: 0; }
.workspace-switcher__name { display: inline-block; }
.workspace-switcher .rz-navigation-item, .workspace-switcher .rz-navigation-item-wrapper, .workspace-switcher .rz-navigation-item-link { min-width: 0; }
.workspace-switcher { flex: 0 1 auto; }
.workspace-switcher .workspace-mark { flex-shrink: 0; }

/* Platform navigation, filters and people (/platform, /platform/people, /platform/audit). */
/* A RadzenMenu laid out as a quiet tab row: the theme's menu variables, set for this menu only. */
.rz-menu.platform-nav {
    --rz-menu-top-background-color: transparent;
    --rz-menu-top-item-border-radius: 0;
    --rz-menu-top-item-color: var(--ra-muted);
    --rz-menu-top-item-icon-color: var(--ra-muted);
    --rz-menu-top-item-hover-color: var(--ra-ink);
    --rz-menu-top-item-icon-hover-color: var(--ra-ink);
    --rz-menu-top-item-hover-background-color: transparent;
    --rz-menu-top-item-selected-color: var(--ra-ink);
    --rz-menu-top-item-selected-background-color: transparent;
    margin-block-end: 1rem;
    padding: 0;
    border: 0;
    border-block-end: 1px solid var(--ra-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.platform-nav .rz-navigation-item-link {
    margin-block-end: -1px;
    padding: 0.5rem 0.75rem;
    border-block-end: 2px solid transparent;
    font-weight: 600;
}
.platform-nav .rz-navigation-item-link.active { border-block-end-color: var(--rz-primary); }
.stat-row + .grid-wrap { margin-block-start: 1rem; }
.platform-filter { max-width: 24rem; margin-block-end: 1rem; }
.platform-filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-block-end: 1rem; }
.platform-filters .field { min-width: min(14rem, 100%); }
.platform-memberships { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.15rem; }
