/* SSHINE ATS — Vantage Analytical theme (greens) */
:root {
    --navy-1:     #15592E;   /* primary green */
    --navy-2:     #0E3D21;   /* darker green (hover) */
    --navy-3:     #2F9152;   /* mid green accent / links */
    --navy-gold:  #2E9E54;   /* light green accent */
    --silver:     #B9BAC2;
    --space-deep: #08160E;   /* space black */
    --bg:         #f4f6fb;
    --panel:      #ffffff;
    --text:       #0f1424;
    --muted:      #5B6A61;
    --border:     #d9dde7;
    --good:       #2E9E54;
    --warn:       #b78103;
    --bad:        #b3261e;
    --shadow:     0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(8,18,46,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

a { color: var(--navy-3); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Login screen ---- */
.login-careers-link {
    position: absolute; top: 24px; left: 56px; z-index: 10;
    color: #fff; background: var(--navy-gold);
    border: 1px solid var(--navy-gold);
    padding: 9px 18px; border-radius: 4px; font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    text-decoration: none; transition: all .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
@media (max-width: 900px) { .login-careers-link { left: 32px; top: 16px; } }
.login-careers-link::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: #fff; margin-right: 9px; vertical-align: middle;
}
.login-careers-link:hover {
    background: #16693B; border-color: #16693B;
    box-shadow: 0 2px 6px rgba(0,0,0,.22); text-decoration: none;
}
.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 460px;
    background: var(--space-deep);
}
.login-hero {
    background:
        linear-gradient(135deg, rgba(8,22,14,.62), rgba(21,89,46,.88)),
        url("../img/hero.svg") center/cover no-repeat, var(--space-deep);
    color: #fff;
    padding: 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-hero h1 { font-size: 56px; margin: 0 0 12px; letter-spacing: 2px; }
.login-hero h2 { font-weight: 400; font-size: 18px; opacity: .92; margin: 0 0 24px; max-width: 540px; }
.login-hero .badge-row { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.login-hero .badge {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.25);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: .5px;
}
.login-hero .stamp {
    color: var(--navy-gold);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 12px;
    margin-top: 36px;
    margin-bottom: 8px;
}
.login-hero footer { font-size: 12px; opacity: .7; }

.login-card {
    background: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-card h3 { margin: 0 0 6px; font-size: 22px; }
.login-card .sub { color: var(--muted); margin-bottom: 32px; }
.login-card label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 13px; }
.login-card input[type=text], .login-card input[type=password] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px;
}
.login-card input:focus { outline: 2px solid var(--navy-3); outline-offset: 0; border-color: var(--navy-3); }
.login-card button {
    margin-top: 20px; width: 100%; padding: 12px;
    background: var(--navy-1); color: #fff; border: none; border-radius: 6px;
    font-size: 14px; font-weight: 600; letter-spacing: .5px; cursor: pointer;
}
.login-card button:hover { background: var(--navy-2); }
.login-card .err { color: var(--bad); font-size: 13px; margin-top: 12px; min-height: 18px; }
.login-card .test-hint { font-size: 12px; color: var(--muted); margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.login-card .login-links { margin-top: 14px; font-size: 13px; }
.login-card .login-links a { color: var(--navy-3); text-decoration: none; }
.login-card .login-links a:hover { text-decoration: underline; }
.login-card .test-hint code { background: #EEF5F0; padding: 1px 6px; border-radius: 3px; }

/* ---- Vantage Analytical branding ---- */
.login-card .brand-logo { display: block; width: 240px; max-width: 70%; height: auto; margin: 0 0 28px; }
.login-hero .hero-mark { width: 92px; height: auto; margin-bottom: 8px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.45)); }
.topbar .brand-mark { height: 26px; width: auto; margin-right: 10px; vertical-align: middle; }

@media (max-width: 900px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-hero { padding: 32px; min-height: 280px; }
    .login-hero h1 { font-size: 40px; }
}

/* ---- App shell ---- */
.topbar {
    background: var(--navy-1);
    color: #fff;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 3px solid var(--navy-gold);
    position: sticky; top: 0; z-index: 50;
}
.topbar .brand { font-weight: 700; letter-spacing: 3px; font-size: 18px; }
.topbar .brand-sub { color: var(--navy-gold); margin-left: 12px; font-size: 11px; letter-spacing: 2px; opacity: .9; }
.topbar nav { margin-left: 32px; display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
    color: #fff; padding: 8px 14px; border-radius: 4px; font-size: 13px;
    text-decoration: none; opacity: .85;
}
.topbar nav a:hover, .topbar nav a.active { background: rgba(255,255,255,.15); opacity: 1; }
.topbar .user {
    margin-left: auto; font-size: 12px; display: flex; align-items: center; gap: 12px; color: #CFE0D4;
}
.topbar .user .name { color: #fff; font-weight: 600; }
.topbar .user a { color: var(--navy-gold); }

.container { max-width: 1400px; margin: 0 auto; padding: 24px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 22px; }
.page-head .actions { display: flex; gap: 8px; }

/* Cards & tables */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}
.card h3 { margin: 0 0 12px; font-size: 15px; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.kpi .val { font-size: 28px; font-weight: 700; color: var(--navy-1); }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { background: #F6FAF7; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
table.data tr:hover td { background: #FAFCFA; }
table.data tr.rowlink { cursor: pointer; }
table.data tr.rowlink:hover td { background: #EEF6F0; }

button.btn, .btn {
    background: var(--navy-1); color: #fff; border: none; border-radius: 5px;
    padding: 7px 14px; font-size: 13px; cursor: pointer; font-weight: 500;
}
button.btn:hover { background: var(--navy-2); }
button.btn-sm, .btn-sm { padding: 4px 10px; font-size: 12px; }
button.btn-secondary { background: #fff; color: var(--navy-1); border: 1px solid var(--navy-1); }
button.btn-secondary:hover { background: #EEF6F0; }
button.btn-danger  { background: var(--bad); }
button.btn-success { background: var(--good); }
button.btn-warn    { background: var(--warn); }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
    width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 13px;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-3); outline-offset: 0; border-color: var(--navy-3); }
label { font-size: 12px; font-weight: 600; color: #333; display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(6,18,38,.55); z-index: 100; display: none; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 20px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 8px; max-width: 760px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head button.x { background: transparent; color: #888; font-size: 22px; border: none; cursor: pointer; }
.modal-body { padding: 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* Pills */
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.pill-blue   { background: #DCEFE0; color: #1D6B3E; }
.pill-green  { background: #dcf3e3; color: #185c33; }
.pill-amber  { background: #fff1cc; color: #6e4d00; }
.pill-red    { background: #ffd8d4; color: #7d1410; }
.pill-gray   { background: #e7e9ee; color: #444; }
.pill-gold   { background: var(--navy-gold); color: #fff; }
.pill-self   { background: var(--navy-gold); color: #fff; letter-spacing: .5px; }

/* ---- Sortable table headers (any table.data) ---- */
table.data thead th { cursor: pointer; user-select: none; position: relative; padding-right: 22px; }
table.data thead th:empty,
table.data thead th:not(:has(*)):empty { cursor: default; }
table.data thead th::after {
    content: ""; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 0; height: 0; opacity: .25;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-bottom: 5px solid var(--navy-3);
}
table.data thead th:hover::after { opacity: .6; }
table.data thead th.sort-asc::after  { opacity: 1; border-bottom: 5px solid var(--navy-1); border-top: 0; }
table.data thead th.sort-desc::after { opacity: 1; border-top: 5px solid var(--navy-1); border-bottom: 0; }
/* Hide arrows on empty (action) header cells. */
table.data thead th:empty::after { display: none; }
table.data thead th:empty { cursor: default; padding-right: 8px; }

/* ---- Duplicate-candidate confirmation prompt ---- */
.dup-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.dup-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dup-table th, .dup-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.dup-table thead th { background: #EEF5F0; color: var(--navy-1); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.dup-table .dup-lbl { font-weight: 700; color: var(--muted); width: 90px; text-transform: uppercase; font-size: 10px; letter-spacing: 1px; }
.dup-table tr.dup-hit td { background: #fdf6e6; }
.dup-table tr.dup-hit .dup-lbl { color: var(--warn); }

/* ---- Positions → Tasks sub-tab: grouped tables by task value ---- */
.task-summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 12px 14px;
}
.task-group { margin-bottom: 22px; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.task-group-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; background: #EEF5F0; border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--navy-gold);
}
.task-group-head h3 { margin: 0; font-size: 14px; color: var(--navy-1); font-weight: 700; letter-spacing: .5px; }
.task-group-meta { font-size: 12px; color: var(--navy-2); font-weight: 600; }
.task-group table.data { box-shadow: none; border-radius: 0; }
.task-group table.data thead th {
    background: #F6FAF7; font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--muted); font-weight: 700;
}

/* Hiring stage pills (scoped to .pill so the class can also tag fill-cards) */
.pill.stage-PENDING        { background: #e7e9ee; color: #444; }
.pill.stage-INTERVIEWED    { background: #DCEFE0; color: #1D6B3E; }
.pill.stage-ASSIGNED       { background: #fff1cc; color: #6e4d00; }
.pill.stage-OFFER_MADE     { background: #CFE9D6; color: #14633A; }
.pill.stage-OFFER_ACCEPTED { background: #dcf3e3; color: #185c33; }
.pill.stage-BADGED         { background: var(--navy-gold); color: #FFFFFF; }

/* Candidate status pills */
.cstatus-available  { background: #dcf3e3; color: #185c33; }
.cstatus-evaluating { background: #DCEFE0; color: #1D6B3E; }
.cstatus-assigned   { background: #fff1cc; color: #6e4d00; }
.cstatus-dismissed  { background: #ffd8d4; color: #7d1410; }

.toast {
    position: fixed; bottom: 20px; right: 20px;
    background: #222; color: #fff; padding: 10px 16px; border-radius: 5px;
    font-size: 13px; max-width: 360px;
    z-index: 200; opacity: 0; transform: translateY(10px); transition: all .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--bad); }
.toast.ok { background: var(--good); }

.empty { text-align: center; padding: 32px; color: var(--muted); }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 16px; gap: 4px; }
.tabs a { padding: 8px 16px; border-bottom: 2px solid transparent; margin-bottom: -2px; color: var(--muted); }
.tabs a.active { border-bottom-color: var(--navy-1); color: var(--navy-1); font-weight: 600; }

.flex { display: flex; gap: 12px; }
.flex-grow { flex: 1; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.small { font-size: 12px; }
hr.div { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
pre.preview { font-size: 11px; max-height: 280px; overflow: auto; background: #F6FAF7; padding: 10px; border-radius: 4px; border: 1px solid var(--border); }

/* ---- Admin home ---- */
.admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.admin-tile {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 18px 16px;
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.admin-tile:hover {
    text-decoration: none;
    border-color: var(--navy-3);
    box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 28px rgba(8,18,46,.10);
    transform: translateY(-1px);
}
.admin-tile .t-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-1);
    margin-bottom: 6px;
}
.admin-tile .t-desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.45;
}

/* ---- Audit preview card (clickable) ---- */
.audit-preview-card {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 16px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
.audit-preview-card:hover {
    text-decoration: none;
    border-color: var(--navy-3);
    box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 28px rgba(8,18,46,.10);
}
.audit-preview-card .apc-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 10px;
}
.audit-preview-card .apc-head h3 { margin: 0; font-size: 14px; }
.audit-preview-card .apc-link {
    font-size: 12px; color: var(--navy-3); font-weight: 600;
}
.audit-preview-card table.data tr:last-child td { border-bottom: none; }

/* ---- Dashboard pipeline funnel + positions fill ---- */
.funnel-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.funnel-lbl { width: 130px; font-size: 13px; }
.funnel-bar { flex: 1; background: #eef; border-radius: 3px; height: 20px; overflow: hidden; }
.funnel-bar > span { display: block; height: 100%; background: var(--navy-3); min-width: 2px; }
.funnel-val { width: 48px; text-align: right; font-weight: 700; color: var(--navy-1); }
.fill-summary .fill-num { font-size: 20px; font-weight: 700; color: var(--navy-1); }
.fill-bar { height: 10px; background: #eef; border-radius: 5px; overflow: hidden; margin: 8px 0 4px; }
.fill-bar > span { display: block; height: 100%; background: var(--good); }

/* ---- Position fill card + stage strip ---- */
/* Position fill card — colour-highlighted by hiring stage (strong left border
   + a faint background tint). */
.fill-card { border-left: 4px solid var(--border); }
.fill-card.stage-open           { border-left-color: var(--silver); }
.fill-card.stage-PENDING        { border-left-color: #9BB0A2; background: #fbfbfc; }
.fill-card.stage-INTERVIEWED    { border-left-color: var(--navy-3);   background: #F1F8F3; }
.fill-card.stage-ASSIGNED       { border-left-color: var(--warn);     background: #fffaf0; }
.fill-card.stage-OFFER_MADE     { border-left-color: #2F9152;         background: #F1F8F3; }
.fill-card.stage-OFFER_ACCEPTED { border-left-color: var(--good);     background: #f3fbf6; }
.fill-card.stage-BADGED         { border-left-color: var(--navy-gold);background: #faf6ec; }

.stage-strip { display: flex; gap: 4px; margin: 14px 0; }
.stage-step { flex: 1; text-align: center; position: relative; }
.stage-step .dot {
    width: 14px; height: 14px; border-radius: 50%; background: #d9dde7;
    margin: 0 auto 4px; border: 2px solid #d9dde7; position: relative; z-index: 1;
}
.stage-step .lbl { font-size: 11px; color: var(--muted); }
.stage-step.reached .dot { background: var(--navy-3); border-color: var(--navy-3); }
.stage-step.reached .lbl { color: var(--navy-1); }
.stage-step.current .dot { background: var(--navy-gold); border-color: var(--navy-1); }
.stage-step.current .lbl { font-weight: 700; color: var(--navy-1); }
.stage-step:not(:last-child)::after {
    content: ''; position: absolute; top: 8px; left: 50%; width: 100%; height: 2px;
    background: #d9dde7;
}
.stage-step.reached:not(:last-child)::after { background: var(--navy-3); }

.stage-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.stage-actions .spacer { flex: 1; }
.interview-box {
    background: #F6FAF7; border-left: 3px solid var(--navy-3);
    padding: 8px 12px; margin: 10px 0; border-radius: 0 4px 4px 0;
}

/* ---- Print / Save-as-PDF ---- */
@media print {
    .topbar, .page-head .actions, .tabs, .toast, .modal-bg { display: none !important; }
    body { background: #fff; }
    .container { max-width: none; padding: 0; }
    .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
    .btn { display: none !important; }
}

/* ---- Help ---- */
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.help-head h2 { margin: 0; font-size: 22px; }
.help-search {
    padding: 7px 12px; border: 1px solid var(--border); border-radius: 5px;
    font-size: 13px; width: 260px; font-family: inherit;
}
.help-tabs { flex-wrap: nowrap; overflow-x: auto; }
.help-tabs a { white-space: nowrap; cursor: pointer; }
.help-tab-badge {
    display: inline-block; margin-left: 6px; background: var(--navy-3); color: #fff;
    border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 6px;
}
.help-body { line-height: 1.55; }
.help-body h3 { font-size: 16px; margin: 22px 0 8px; color: var(--navy-1); }
.help-body h3:first-child { margin-top: 0; }
.help-body h4 {
    font-size: 12px; margin: 16px 0 6px; text-transform: uppercase;
    letter-spacing: .5px; color: var(--muted);
}
.help-body p { margin: 6px 0; }
.help-body ul, .help-body ol { margin: 6px 0 6px 22px; }
.help-body li { margin: 3px 0; }
.help-body .lead { font-size: 14px; color: var(--text); }
.help-body code {
    background: #eef1f7; padding: 1px 5px; border-radius: 3px;
    font-size: 12px; color: var(--navy-2);
}
.help-usecase {
    background: #F6FAF7; border-left: 3px solid var(--navy-3);
    padding: 10px 14px; margin: 10px 0; border-radius: 0 4px 4px 0;
}
.help-usecase .uc-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--navy-3);
}
.help-mark { background: #fff1a8; border-radius: 2px; }

/* ========================================================================
   Public Careers page (/careers.php) — brand-aligned with the SPA shell:
   navy topbar + gold accent border, hero.svg background, gold stamp,
   badge chips, KPI-style stat strip. Mirrors the login screen's visual
   language so the public side feels like the same product.
   ======================================================================== */
body.careers-body { background: var(--bg); }

/* ---- Topbar (mirrors .topbar in the SPA) ---- */
.careers-topbar {
    background: var(--navy-1); color: #fff; height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 3px solid var(--navy-gold);
    position: sticky; top: 0; z-index: 50;
}
.careers-topbar .careers-brand { display: flex; align-items: baseline; gap: 12px; }
.careers-topbar .brand-mark { font-weight: 700; letter-spacing: 3px; font-size: 18px; color: #fff; }
.careers-topbar .brand-sub {
    color: var(--navy-gold); font-size: 11px; letter-spacing: 2px; opacity: .9; text-transform: uppercase;
}
.careers-signin {
    color: #fff; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.30);
    padding: 7px 16px; border-radius: 4px; font-size: 12px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
}
.careers-signin:hover { background: rgba(255,255,255,.20); border-color: rgba(255,255,255,.55); text-decoration: none; }

/* ---- Hero (reuses login-hero's background + gradient overlay) ---- */
.careers-hero {
    background:
        linear-gradient(135deg, rgba(8,22,14,.62), rgba(21,89,46,.88)),
        url("../img/hero.svg") center/cover no-repeat, var(--space-deep);
    color: #fff; padding: 56px 56px 44px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.careers-hero-inner { max-width: 1100px; }
.careers-hero .stamp {
    color: var(--navy-gold); font-weight: 700; letter-spacing: 3px;
    font-size: 12px; text-transform: uppercase; margin-bottom: 14px;
}
.careers-hero h1 {
    font-size: 44px; margin: 0 0 14px; letter-spacing: 1.5px; font-weight: 700; line-height: 1.1;
}
.careers-hero p {
    font-weight: 400; font-size: 17px; opacity: .92; margin: 0 0 24px; max-width: 700px; line-height: 1.5;
}
.careers-hero .badge-row { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.careers-hero .badge {
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.25);
    padding: 6px 14px; border-radius: 999px; font-size: 12px; letter-spacing: .5px;
}
.careers-hero .badge strong { color: var(--navy-gold); font-weight: 700; margin-right: 4px; }
.careers-search-row { display: flex; gap: 12px; max-width: 820px; flex-wrap: wrap; }
.careers-search-row input[type=search], .careers-search-row select {
    padding: 11px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.97); font-size: 14px; min-width: 180px; color: var(--text);
}
.careers-search-row input[type=search] { flex: 1; min-width: 260px; }
.careers-search-row input:focus, .careers-search-row select:focus {
    outline: 2px solid var(--navy-gold); outline-offset: 0; border-color: var(--navy-gold);
}

/* ---- Main two-column layout ---- */
.careers-main {
    display: grid; grid-template-columns: 240px 1fr; gap: 32px;
    max-width: 1200px; margin: 0 auto; padding: 36px 28px 56px;
}
@media (max-width: 760px) {
    .careers-hero { padding: 36px 24px 28px; }
    .careers-hero h1 { font-size: 32px; }
    .careers-main { grid-template-columns: 1fr; padding: 24px 18px 36px; gap: 20px; }
}
.careers-side h3 {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--muted); margin: 0 0 12px; font-weight: 700;
}
.careers-chips { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .careers-chips { flex-direction: row; flex-wrap: wrap; } }
.careers-chip {
    text-align: left; padding: 8px 14px; background: #fff; border: 1px solid var(--border);
    border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--navy-2); font-weight: 600;
    transition: all .12s;
}
.careers-chip:hover { background: #EEF5F0; border-color: var(--navy-3); }
.careers-chip.active {
    background: var(--navy-1); color: #fff; border-color: var(--navy-1);
    box-shadow: 0 0 0 2px rgba(197,165,114,.25);
}

/* ---- Meta + job cards ---- */
.careers-meta {
    font-size: 12px; color: var(--muted); margin-bottom: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
}
.careers-meta strong { color: var(--navy-1); font-size: 14px; }
.careers-list { display: flex; flex-direction: column; gap: 12px; }
.careers-empty {
    padding: 48px; text-align: center; color: var(--muted); background: #fff;
    border: 1px dashed var(--border); border-radius: 8px; font-style: italic;
}
.careers-card {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: 20px 22px 16px; box-shadow: var(--shadow);
    position: relative; transition: box-shadow .18s, transform .18s, border-color .18s;
    border-left: 3px solid transparent;
}
.careers-card:hover {
    box-shadow: 0 4px 16px rgba(10,34,64,.14);
    transform: translateY(-1px); border-left-color: var(--navy-gold);
}
.careers-card-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px;
}
.careers-card-head h3 {
    margin: 0; font-size: 18px; color: var(--navy-1); font-weight: 700; line-height: 1.3;
}
.careers-code {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 11px; color: var(--navy-2); font-weight: 700; letter-spacing: 1px;
    background: #EEF5F0; padding: 4px 10px; border-radius: 3px; white-space: nowrap;
    border: 1px solid #E1ECE4;
}
.careers-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.careers-tag {
    font-size: 11px; padding: 4px 10px; border-radius: 999px; background: #EEF5F0;
    color: var(--navy-2); font-weight: 700; letter-spacing: .3px;
}
.careers-tag-clear { background: #fdf3e3; color: #8b6914; border: 1px solid #efd9a8; }
.careers-tag-task  { background: #e8f3ec; color: #2a6b3f; border: 1px solid #c8e2d0; }
.careers-tag-fte   { background: #f2eaf8; color: #5b3a82; border: 1px solid #ddc9eb; }
.careers-card-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border);
}
.careers-co { font-size: 13px; color: var(--muted); }
.careers-co::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--navy-gold); margin-right: 8px; vertical-align: middle;
}
.careers-apply-btn {
    background: var(--navy-1); color: #fff; border: none; border-radius: 4px;
    padding: 9px 18px; font-size: 12px; font-weight: 700; cursor: pointer;
    letter-spacing: 1.5px; text-transform: uppercase; transition: background .15s;
}
.careers-apply-btn:hover:not(:disabled) { background: var(--navy-2); }
.careers-apply-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Footer ---- */
.careers-foot {
    text-align: center; padding: 28px 16px; font-size: 12px; color: rgba(255,255,255,.7);
    background: var(--space-deep); border-top: 3px solid var(--navy-gold);
    letter-spacing: .5px;
}
.careers-foot strong { color: var(--navy-gold); font-weight: 700; letter-spacing: 1px; }

/* ---- Modal ---- */
.careers-modal-bg {
    position: fixed; inset: 0; background: rgba(6,18,38,.65); display: flex;
    align-items: flex-start; justify-content: center; padding: 48px 16px;
    overflow-y: auto; z-index: 100; backdrop-filter: blur(2px);
}
.careers-modal-bg[hidden] { display: none; }
.careers-modal {
    background: #fff; border-radius: 10px; max-width: 720px; width: 100%;
    box-shadow: 0 24px 64px rgba(6,18,38,.5); position: relative;
    overflow: hidden; border-top: 4px solid var(--navy-gold);
}
.careers-x {
    position: absolute; top: 10px; right: 16px; background: none; border: none;
    font-size: 30px; line-height: 1; color: rgba(255,255,255,.85); cursor: pointer; z-index: 2;
}
.careers-x:hover { color: #fff; }
#careersModalBody { padding: 0; }
.careers-detail-head {
    background: var(--navy-1); color: #fff; padding: 22px 32px 20px;
    border-bottom: 3px solid var(--navy-gold);
}
.careers-detail-head .careers-code {
    background: rgba(255,255,255,.10); color: var(--navy-gold);
    border: 1px solid rgba(255,255,255,.20); display: inline-block; margin-bottom: 8px;
}
.careers-detail-head h2 { margin: 0; color: #fff; font-size: 22px; letter-spacing: .5px; }
.careers-detail-body { padding: 24px 32px 28px; }
.careers-detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 24px; margin-bottom: 18px;
}
.careers-detail-grid dt {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted);
    margin-bottom: 3px; font-weight: 700;
}
.careers-detail-grid dd { margin: 0; font-size: 14px; color: var(--navy-1); font-weight: 600; }
.careers-desc { margin-bottom: 20px; }
.careers-desc h4 {
    margin: 0 0 8px; font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700;
}
.careers-desc p { margin: 0; line-height: 1.6; color: var(--text); }
.careers-hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

.careers-dropzone {
    border: 2px dashed var(--navy-3); border-radius: 8px; background: #F6FAF7;
    padding: 20px 16px; text-align: center; margin: 0 0 20px; transition: all .15s;
}
.careers-dropzone.dragover { background: rgba(31,75,142,.10); border-color: var(--navy-gold); }
.careers-dropzone .dz-icon { font-size: 24px; color: var(--navy-3); line-height: 1; }
.careers-dropzone .dz-main { font-weight: 700; color: var(--navy-1); margin-top: 6px; font-size: 14px; }
.careers-dropzone .dz-sub  { font-size: 12px; color: var(--muted); margin-top: 4px; }
.careers-dropzone .dz-browse {
    background: none; border: none; color: var(--navy-3); font-weight: 700;
    cursor: pointer; text-decoration: underline; font-size: 12px; padding: 0;
}
.careers-dropzone .dz-status { font-size: 12px; margin-top: 10px; min-height: 16px; }
.careers-dropzone .dz-status.dz-ok  { color: var(--good); font-weight: 600; }
.careers-dropzone .dz-status.dz-err { color: var(--warn); font-weight: 600; }
/* Auto-filled field highlight (both the public careers form and the SPA modal).
   Gold tint + left bar signals "auto-filled, please confirm"; clears on edit. */
.dz-autofilled,
input.dz-autofilled, select.dz-autofilled, textarea.dz-autofilled {
    background: #fdf6e6 !important;
    border-color: var(--navy-gold) !important;
    box-shadow: inset 3px 0 0 var(--navy-gold);
}
.careers-apply-heading {
    font-size: 15px; color: var(--navy-1); margin: 0 0 14px;
    display: flex; align-items: center; gap: 10px;
}
.careers-apply-heading::before {
    content: ""; display: inline-block; width: 24px; height: 2px; background: var(--navy-gold);
}
/* Form fields share one definition. Every visible control (input/select/
   textarea) becomes a block-level element with width:100%, so labels stack
   their text on top of the control and the control fills the label/grid
   column. File inputs and checkboxes stay native. */
.careers-form-card label {
    display: block; font-size: 11px; font-weight: 700; color: var(--navy-2);
    margin: 0 0 6px; letter-spacing: 1px; text-transform: uppercase;
}
.careers-form-card form > label,
.careers-form-row > label { margin-top: 14px; }
.careers-form-card label em {
    font-weight: 400; color: var(--muted); font-size: 11px;
    text-transform: none; letter-spacing: 0; margin-left: 4px;
}
.careers-form-card input:not([type=checkbox]):not([type=file]),
.careers-form-card select,
.careers-form-card textarea {
    display: block; width: 100%; padding: 10px 12px; height: 40px;
    border: 1px solid var(--border); border-radius: 5px;
    font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
    margin-top: 6px; box-sizing: border-box;
}
.careers-form-card textarea { height: auto; min-height: 80px; resize: vertical; }
.careers-form-card input[type=file] {
    display: block; width: 100%; padding: 9px 12px; margin-top: 6px;
    border: 1px dashed var(--border); border-radius: 5px;
    font-size: 13px; background: #FAFCFA;
}
.careers-form-card input:focus, .careers-form-card select:focus, .careers-form-card textarea:focus {
    outline: 2px solid var(--navy-3); outline-offset: 0; border-color: var(--navy-3);
}
.careers-form-section {
    font-size: 10px; font-weight: 700; color: var(--navy-1); letter-spacing: 2.5px;
    text-transform: uppercase; margin: 24px 0 0; padding: 0 0 6px;
    border-bottom: 1px solid var(--border);
}
.careers-form-section:first-of-type { margin-top: 8px; }
/* Two-column row: equal columns, consistent gap, all controls align to the
   bottom of the column so the input rows line up perfectly. */
.careers-form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
    align-items: end;
}
@media (max-width: 520px) { .careers-form-row { grid-template-columns: 1fr; } }
.careers-form-row > label { margin-top: 14px; }
.careers-form-row > label > input,
.careers-form-row > label > select,
.careers-form-row > label > textarea { margin-bottom: 0; }
/* Checkbox label is laid out as a tidy pill row aligned with the bottom of
   any sibling input on the same grid row. */
.careers-form-card .careers-checkbox-label {
    display: flex; align-items: center; gap: 10px;
    height: 40px; margin: 14px 0 0; padding: 0 12px;
    text-transform: none; letter-spacing: 0; font-size: 14px;
    color: var(--navy-2); font-weight: 600;
    border: 1px solid var(--border); border-radius: 5px;
    background: #FAFCFA;
}
.careers-form-card .careers-checkbox-label input[type=checkbox] {
    width: 16px; height: 16px; padding: 0; margin: 0;
    accent-color: var(--navy-gold); flex: 0 0 auto;
}
.careers-form-card .careers-checkbox-label span {
    font-weight: 600; color: var(--navy-2);
    text-transform: none; letter-spacing: 0; font-size: 14px;
}
.careers-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.careers-form-actions .btn-secondary {
    background: transparent; color: var(--navy-2); border: 1px solid var(--border);
    padding: 9px 18px; border-radius: 4px; font-weight: 700; cursor: pointer;
    letter-spacing: 1px; text-transform: uppercase; font-size: 12px;
}
.careers-form-actions .btn-secondary:hover { background: #EEF5F0; }
.careers-msg { margin-top: 14px; font-size: 13px; min-height: 18px; color: var(--muted); }
.careers-msg-err { color: var(--bad); font-weight: 600; }
.careers-hp { position: absolute; left: -10000px; opacity: 0; }  /* honeypot */
.careers-thanks { text-align: center; padding: 36px 24px; }
.careers-thanks::before {
    content: "✓"; display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(31,138,79,.12); color: var(--good);
    font-size: 30px; font-weight: 700; margin-bottom: 16px;
}
.careers-thanks h2 { color: var(--navy-1); margin: 0 0 12px; font-size: 22px; letter-spacing: .5px; }
.careers-thanks p { color: var(--muted); margin: 0 auto 24px; line-height: 1.55; max-width: 460px; }

/* ---- Candidate portal (signup / signin / verify / dashboard) ---- */
.careers-nav { display: flex; align-items: center; gap: 16px; }
.careers-nav a { color: #fff; text-decoration: none; font-size: 14px; opacity: .9; }
.careers-nav a:hover { opacity: 1; text-decoration: underline; }
.careers-nav-user { color: rgba(255,255,255,.6); font-size: 13px; }
.careers-portal-main { max-width: 760px; margin: 36px auto; padding: 0 20px; }
.careers-form-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.careers-form-card.careers-form-wide { max-width: 760px; }
.careers-form-card.careers-msg-card { max-width: 520px; margin: 0 auto; text-align: center; }
.careers-form-card h2 { color: var(--navy-1); margin: 0 0 8px; }
.careers-form-sub { color: var(--muted); margin: 0 0 20px; line-height: 1.5; }
.careers-form-alt { margin-top: 16px; color: var(--muted); font-size: 14px; }
/* Portal form field/label/section/checkbox styling is defined once above
   (scoped to .careers-form-card) so signup/signin/forgot/reset all match. */

/* Apply call-to-action in the position modal */
.careers-cta { text-align: center; padding: 6px 0; }
.careers-cta p { color: var(--muted); line-height: 1.55; margin: 0 0 14px; }
.careers-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.careers-apply-alt { background: #fff !important; color: var(--navy-1) !important; border: 1px solid var(--navy-3) !important; }
.careers-applied { color: var(--good); font-weight: 700; }

/* Dashboard */
.careers-dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.careers-dash-head h2 { color: var(--navy-1); margin: 0; }
.careers-app-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.careers-app-table th { text-align: left; background: var(--navy-1); color: #fff; padding: 10px 14px; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
.careers-app-table td { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 14px; vertical-align: top; }
.cand-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.cand-pill-blue  { background: rgba(31,75,142,.12);  color: var(--navy-1); }
.cand-pill-amber { background: rgba(212,160,23,.18); color: #8a6400; }
.cand-pill-red   { background: rgba(176,42,42,.12);  color: var(--bad); }
.cand-pill-grey  { background: rgba(100,116,139,.15); color: var(--muted); }
.careers-dash-summary { color: var(--muted); font-size: 13px; margin-top: 4px; }
.careers-app-table td a { color: var(--navy-1); text-decoration: none; font-weight: 600; }
.careers-app-table td a:hover { text-decoration: underline; }
.careers-app-actions { white-space: nowrap; text-align: right; }
.careers-link-btn { background: none; border: 1px solid var(--border); color: var(--navy-1);
    padding: 4px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.careers-link-btn:hover:not(:disabled) { background: rgba(31,75,142,.08); border-color: var(--navy-2); }
.careers-link-btn:disabled { opacity: .5; cursor: not-allowed; }
.careers-file-label { display: inline-block; }
.careers-docs { margin-top: 8px; }
.careers-doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.careers-doc-row:first-child { border-top: 0; }
.careers-msg-ok { color: var(--good, #2a7a3f); }

/* ---- Account / Security (self-service 2FA + password) ---- */
.acct-2fa-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.totp-qr { margin: 4px 0 14px; }
.totp-qr img { display: block; border: 1px solid var(--border); border-radius: 6px; background: #fff; image-rendering: pixelated; }
hr.div { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.backup-codes { background: var(--navy-1); color: #EAF3ED; padding: 14px 16px; border-radius: 6px;
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 1px; line-height: 1.9;
    white-space: pre; overflow: auto; margin: 4px 0 0; }

/* =======================================================================
   Mobile / small-screen refinements (≤640px).
   ADDITIVE ONLY: everything above (desktop + the existing 900/760/520
   tablet breakpoints) is untouched, and these are presentational rules
   only — no layout/markup/behaviour the app depends on changes.
   ======================================================================= */
@media (max-width: 640px) {
    /* Inputs ≥16px so iOS doesn't auto-zoom the page on focus. */
    input[type=text], input[type=email], input[type=password], input[type=number],
    input[type=date], input[type=url], input[type=search], select, textarea {
        font-size: 16px;
    }

    /* ---- Staff app shell: brand + user on the first row, the tab nav as a
       horizontally-scrollable second row (instead of overflowing the bar). ---- */
    .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; row-gap: 4px; }
    .topbar .brand { font-size: 16px; letter-spacing: 2px; }
    .topbar .brand-sub { display: none; }
    .topbar .user { order: 2; margin-left: auto; }
    .topbar nav {
        order: 3; flex: 0 0 100%; width: 100%; margin-left: 0;
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        gap: 2px; padding-bottom: 2px;
    }
    .topbar nav a { white-space: nowrap; padding: 8px 12px; }

    .container { padding: 14px 12px; }

    /* Page header: title stacked above its (wrapping) action buttons. */
    .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-head .actions { flex-wrap: wrap; }

    /* Wide data tables scroll within their card rather than breaking the page. */
    .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.data { white-space: nowrap; }
    table.data th, table.data td { padding: 7px 8px; }

    /* Tabs scroll horizontally instead of wrapping into a tall stack. */
    .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tabs a { white-space: nowrap; }

    /* Modals: full width, tighter padding. */
    .modal-bg { padding: 12px; }
    .modal-head { padding: 12px 14px; }
    .modal-body { padding: 14px; }
    .modal-foot { padding: 10px 14px; flex-wrap: wrap; }

    .help-search { width: 100%; }

    /* ---- Public Careers chrome: let the nav wrap beneath the brand. ---- */
    .careers-topbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 6px 12px; }
    .careers-nav { flex-wrap: wrap; gap: 8px 14px; }
    .careers-nav-user { width: 100%; order: 5; }

    /* Careers position-detail modal padding. */
    .careers-detail-head { padding: 18px 18px 16px; }
    .careers-detail-head h2 { font-size: 19px; }
    .careers-detail-body { padding: 18px; }

    /* Applications dashboard table: tighter so its columns fit a phone. */
    .careers-app-table th, .careers-app-table td { padding: 8px 9px; font-size: 13px; }
}

