/* ═══════════════════════════════════════════════════════════════════════
   Employer Portal — styles (brand colours are set at runtime from the API)
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --accent: #334155; --accent-soft: #EEF2F6; --accent-text: #334155; --ink: #0F172A;
  --bg: #F4F6F9; --surface: #FFFFFF; --surface-2: #F1F4F8; --line: #E2E7EE; --line-2: #D3DAE4;
  --text: #0E1A2B; --muted: #5A697D; --faint: #8A97A8;
  --ok: #117A55; --ok-soft: #E3F4EC; --warn: #9A5B00; --warn-soft: #FDF2DD; --danger: #B42318; --danger-soft: #FCE9E7;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .05), 0 4px 16px rgba(14, 26, 43, .05);
  --shadow-lg: 0 12px 40px rgba(14, 26, 43, .18);
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A111C; --surface: #111A28; --surface-2: #162133; --line: #223047; --line-2: #2C3C57;
    --text: #E7EDF5; --muted: #9AA8BB; --faint: #6F7E93;
    --ok: #4CC79A; --ok-soft: rgba(76, 199, 154, .12); --warn: #F0B54A; --warn-soft: rgba(240, 181, 74, .12);
    --danger: #FF8A80; --danger-soft: rgba(255, 138, 128, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
  /* the brand logos have dark lettering: give them a light chip on dark backgrounds */
  .auth-card .logo, .terms .logo, .side .logo, .top .logo-m { background: #fff; padding: 6px 10px; border-radius: 10px; box-sizing: content-box; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── buttons & fields ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); }
.btn-ok { color: var(--ok); }
.btn svg { width: 16px; height: 16px; flex: none; }
.auth-side li i svg { width: 14px; height: 14px; }
.doc .ic svg { width: 18px; height: 18px; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }

/* ── auth screens ─────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .auth { grid-template-columns: 1.05fr 1fr; } }
.auth-side {
  display: none; position: relative; overflow: hidden; color: #fff; padding: 56px;
  background: radial-gradient(1200px 600px at -10% -10%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 60%), var(--ink);
}
@media (min-width: 960px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-side h2 { font-size: 34px; line-height: 1.15; font-weight: 750; max-width: 460px; letter-spacing: -.02em; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 440px; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, .86); }
.auth-side li i { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-style: normal; font-size: 14px; }
.auth-side .fine { color: rgba(255, 255, 255, .55); font-size: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 18px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo { height: 44px; width: auto; margin-bottom: 28px; display: block; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 26px; }
.lock-pill { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 4px 10px; border-radius: 99px; margin-bottom: 16px; }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--muted); }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); }
.lang-switch button.on { background: var(--accent-soft); color: var(--accent-text); }
.pw-meter { height: 4px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: hidden; }
.pw-meter > i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
/* show/hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }   /* Edge's own eye would double ours */
.pw-eye {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 44px; height: 38px;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-eye:hover { background: var(--surface-2); color: var(--text); }
.pw-eye[aria-pressed="true"] { color: var(--accent-text); }
.pw-match { display: block; min-height: 18px; margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.pw-match.ok { color: var(--ok); }
.pw-match.bad { color: var(--muted); }

/* terms */
.terms { max-width: 760px; margin: 0 auto; padding: 32px 18px 64px; }
.terms .logo { height: 40px; margin-bottom: 26px; }
.terms ol { padding-left: 20px; margin: 18px 0 24px; display: grid; gap: 14px; }
.terms li p + p { margin-top: 4px; }
.terms .en { color: var(--muted); font-size: 14px; }
.terms .card { padding: 24px; }

/* ── app shell ────────────────────────────────────────────────────────── */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .shell { grid-template-columns: 248px 1fr; } }
.side {
  display: none; position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line);
  background: var(--surface); flex-direction: column; gap: 6px;
}
@media (min-width: 1024px) { .side { display: flex; } }
.side .logo { height: 34px; width: auto; margin: 0 8px 22px; align-self: flex-start; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 600; font-size: 14px; position: relative;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent-text); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.side-foot b { color: var(--text); }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .logo-m { height: 28px; width: auto; }
@media (min-width: 1024px) { .top .logo-m { display: none; } .top { padding: 14px 32px; } }
.top .company { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .spacer { flex: 1; }
.conf-pill { display: none; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); padding: 4px 10px; border-radius: 99px; }
@media (min-width: 720px) { .conf-pill { display: inline-flex; } }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 13px; border: 0; cursor: pointer; }
.menu { position: absolute; right: 18px; top: 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; z-index: 30; }
.menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu button, .menu a { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
main.content { padding: 22px 16px 104px; max-width: 1180px; width: 100%; margin: 0 auto; }
@media (min-width: 1024px) { main.content { padding: 30px 32px 64px; } }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) { .tabbar { display: none; } }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; border-radius: 10px; position: relative; }
.tabbar a.on { color: var(--accent-text); }
.tabbar a:hover { text-decoration: none; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* ── content blocks ───────────────────────────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.section { margin-top: 26px; }
.section > h2 { margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 16px 18px; display: block; color: inherit; }
.kpi:hover { text-decoration: none; border-color: var(--line-2); }
.kpi .n { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 4px; }
.kpi.hot .n { color: var(--accent-text); }
.todo { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit; }
.todo:last-child { border-bottom: 0; }
.todo:hover { background: var(--surface-2); text-decoration: none; }
.todo .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.todo .ic svg { width: 18px; height: 18px; }
.todo .t { font-weight: 600; }
.todo .chev { margin-left: auto; color: var(--faint); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* candidate cards */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .c { opacity: .7; margin-left: 4px; }
.cands { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cands { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cands { grid-template-columns: repeat(3, 1fr); } }
.cand { display: flex; flex-direction: column; gap: 12px; padding: 18px; color: inherit; position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; }
.cand:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.cand .ref { font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.cand .title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.cand .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.cand .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.new-dot { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 99px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.de { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.stage.s-reviewing, .stage.s-shared { color: var(--accent-text); background: var(--accent-soft); }
.stage.s-interview_requested, .stage.s-interview_scheduled, .stage.s-trial { color: var(--warn); background: var(--warn-soft); }
.stage.s-offer, .stage.s-contract, .stage.s-visa, .stage.s-arrived { color: var(--ok); background: var(--ok-soft); }
.stage.s-declined, .stage.s-withdrawn { color: var(--faint); }
/* partner portal: candidate journey stages */
.stage.ps-new, .stage.ps-screening { color: var(--accent-text); background: var(--accent-soft); }
.stage.ps-academy, .stage.ps-documents { color: var(--warn); background: var(--warn-soft); }
.stage.ps-matched, .stage.ps-interview, .stage.ps-offer, .stage.ps-visa { color: var(--accent-text); background: var(--accent-soft); }
.stage.ps-placed { color: var(--ok); background: var(--ok-soft); }
.stage.ps-rejected { color: var(--faint); }
.req-status.ds-missing, .req-status.ds-rejected, .req-status.ds-expired { background: var(--warn-soft); color: var(--warn); }
.req-status.ds-received { background: var(--accent-soft); color: var(--accent-text); }
.req-status.ds-verified { background: var(--ok-soft); color: var(--ok); }
/* phones: let grid/flex children shrink instead of pushing the page wider than the screen */
.shell > div, .p-grid > *, .kpis > *, .cands > *, .grid > * { min-width: 0; }
.top .company { min-width: 0; flex: 0 1 auto; }
.top .lang-switch, .top .avatar, .top .logo-m { flex: none; }
.p-head > div, .li .a, .doc .sub, .summary, .msg { overflow-wrap: anywhere; }
.li > .muted:first-child { flex: none; }
.li .a { text-align: right; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.form-grid .check { margin: 4px 0 6px; font-size: 14px; }
/* intro videos */
/* box follows the video's real shape (portal.js fitVideoBox sets --vw/--vh); intro videos are usually
   9:16 phone selfies. Height is capped, and the width shrinks with it so the box keeps the shape. */
.video-wrap, .rec-wrap { --vw: 9; --vh: 16; --vmax: min(62vh, 520px); position: relative; border-radius: 12px; overflow: hidden; background: #000;
  aspect-ratio: var(--vw) / var(--vh); width: 100%; max-width: calc(var(--vmax) * var(--vw) / var(--vh)); margin-inline: auto; }
.rec-wrap { --vw: 16; --vh: 9; }   /* before the camera starts: laptop webcams are landscape */
@media (orientation: portrait) and (pointer: coarse) { .rec-wrap { --vw: 9; --vh: 16; } }   /* phones held upright record portrait */
.video-wrap video, .rec-wrap video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.video-wrap:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; max-width: none; border-radius: 0; }
.video-wm { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; padding: 24px; text-align: center;
  color: rgba(255, 255, 255, .24); font-size: 13px; font-weight: 700; transform: rotate(-16deg); text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  -webkit-user-select: none; user-select: none; }
.video-wrap:fullscreen .video-wm { font-size: 22px; }
.video-fs { position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 0 10px; background: rgba(0, 0, 0, .55); color: #fff; border-color: transparent; z-index: 2; }
.video-fs:hover { background: rgba(0, 0, 0, .75); }
.rec-time { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .6); color: #fff; padding: 2px 10px; border-radius: 99px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-time.on::before { content: "● "; color: #ff4d4f; }
.vprog { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 12px; }
.vprog > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.vrules { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 3px; }
.req-status.vs-pending { background: var(--warn-soft); color: var(--warn); }
.req-status.vs-approved { background: var(--ok-soft); color: var(--ok); }
.req-status.vs-rejected { background: var(--danger-soft); color: var(--danger); }
.btn-danger { color: var(--danger); }
.score { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 750; font-size: 14px;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); position: relative; }
.score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.score span { position: relative; }

/* profile */
.profile-wrap { position: relative; }
.protected { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wm { position: fixed; inset: 0; pointer-events: none; z-index: 15; background-repeat: repeat; opacity: .085; }
@media (prefers-color-scheme: dark) { .wm { opacity: .12; filter: invert(1); } }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.p-head { padding: 22px; display: grid; gap: 16px; }
/* name + actions side by side only when the column is wide enough (sidebar takes 248px from 1024px) */
@media (min-width: 760px) and (max-width: 1023px), (min-width: 1240px) { .p-head { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.p-head .ref { font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--faint); }
.p-head h1 { font-size: 24px; margin: 4px 0 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.p-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 1240px) { .p-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.p-aside { display: grid; gap: 16px; }
@media (min-width: 1240px) { .p-aside { position: sticky; top: 80px; } }
.block { padding: 20px; }
.block + .block { border-top: 1px solid var(--line); }
.block h3 { margin-bottom: 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.fact .v { font-weight: 700; font-size: 15px; margin-top: 2px; }
.summary { font-size: 15px; line-height: 1.65; white-space: pre-line; }
.summary-de { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; white-space: pre-line; }
/* motivation letter: the candidate's own words, set like a page; long letters fold after ~14 lines */
.letter { position: relative; padding: 16px 18px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--line-2);
  font-size: 14.5px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; max-width: 72ch; }
.letter.clamp { max-height: 24em; overflow: hidden; }
.letter.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px;
  background: linear-gradient(to bottom, transparent, var(--surface-2)); pointer-events: none; }
#letter-more { margin-top: 6px; }
.letter-img { display: block; max-width: 100%; max-height: 80vh; border-radius: 10px; border: 1px solid var(--line); }
.job { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.job:last-child { padding-bottom: 0; }
.job::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.job:last-child::before { display: none; }
.job .pin { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); background: var(--surface); margin-top: 4px; }
.job .jt { font-weight: 700; }
.job .js { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.job ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); display: grid; gap: 3px; }
.list { display: grid; gap: 10px; }
.li { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; font-size: 14px; }
.li .a { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.verified { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 5px 10px; border-radius: 8px; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 14px; display: flex; gap: 12px; align-items: flex-start; }
.notice.warn { background: var(--warn-soft); }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--accent-text); margin-top: 1px; }
/* profile: proposed role, at-a-glance tiles, why-we-recommend, readiness checklist, section jumps */
.for { display: flex; align-items: center; gap: 6px; color: var(--accent-text); margin: -2px 0 10px; font-size: 14px; }
.for svg { width: 16px; height: 16px; flex: none; }
.cand .for { margin: 6px 0 0; font-size: 13px; }
/* flex, not grid: every row is filled edge to edge (a lone last tile stretches), so the tiles line up */
.glance { display: flex; flex-wrap: wrap; gap: 10px; }
.glance > .tile { flex: 1 1 170px; }
.glance > .tile.wide { flex-basis: 100%; }
.tile { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tile.wide { grid-column: 1 / -1; }
.tile .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile .v { font-weight: 750; font-size: 18px; margin-top: 2px; overflow-wrap: anywhere; }
.tile .v.sm { font-size: 15px; font-weight: 700; }
.tile .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tile details summary { cursor: pointer; color: var(--accent-text); font-weight: 600; }
.tile details[open] summary { margin-bottom: 4px; }
.cefr { display: flex; gap: 3px; margin-top: 8px; }
.cefr i { flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); }
.cefr i.on { background: var(--accent); }
.cefr i.tg { outline: 2px solid var(--ok); outline-offset: 1px; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; font-size: inherit; }
.why .hl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.why .hl li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 15px; line-height: 1.5; }
.why .hl svg { color: var(--ok); margin-top: 3px; }
.team-note { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); border-left: 3px solid var(--accent); }
.team-note .k { font-size: 12px; font-weight: 700; color: var(--accent-text); margin-bottom: 4px; }
.team-note p { margin: 0; white-space: pre-line; font-size: 14.5px; }
.rsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rsteps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.rsteps li:last-child { border-bottom: 0; }
.rsteps .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--faint); border: 1px solid var(--line-2); align-self: center; }
.rsteps .nm { font-weight: 600; }
.rsteps .st { font-size: 13px; color: var(--muted); text-align: right; }
.rsteps .rs-done .ic { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.rsteps .rs-progress .ic { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
@media (max-width: 560px) { .rsteps li { grid-template-columns: 24px minmax(0, 1fr); } .rsteps .st { grid-column: 2; text-align: left; } }
.dur { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: 1px; }
.jnav { display: flex; gap: 6px; overflow-x: auto; padding: 12px 2px 2px; scrollbar-width: none; }
.jnav::-webkit-scrollbar { display: none; }
.jnav button { flex: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.jnav button:hover { color: var(--accent-text); border-color: var(--accent); }
[id^="sec-"] { scroll-margin-top: 84px; }
.bul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
.sg + .sg { margin-top: 14px; }
.sgk { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.sg .a { font-weight: 700; }
.pre { white-space: pre-line; margin: 4px 0 0; color: var(--muted); }
.job .ach { margin-top: 8px; display: grid; gap: 3px; font-size: 14px; color: var(--ok); font-weight: 600; }
.job .tools { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.appdocs { display: grid; gap: 14px; }
@media (min-width: 900px) { .appdocs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.appdoc { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); min-width: 0; }
.appdoc .ah { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.appdoc .ah .k { font-weight: 700; }
.appdoc .letter { white-space: pre-line; font-size: 14px; }
.cvdoc { position: relative; font-size: 13.5px; }
.cvdoc.clamp { max-height: 24em; overflow: hidden; }
.cvdoc.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(transparent, var(--surface)); }
.cvdoc .cvh { font-weight: 700; margin-bottom: 6px; }
.cvdoc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text); margin: 12px 0 4px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.cvdoc p { margin: 0 0 6px; }
.cvdoc .ih { font-weight: 700; margin-top: 6px; }
.cvdoc .det { font-size: 12.5px; color: var(--muted); }
.cvdoc ul { margin: 4px 0 4px; padding-left: 18px; display: grid; gap: 2px; }
.own { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-style: italic; white-space: pre-line; font-size: 14.5px; }
.own .k { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; padding: 6px 0; color: var(--faint); position: relative; }
.steps li::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: -6px; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .b { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 11px; background: var(--surface); position: relative; z-index: 1; }
.steps li.done { color: var(--text); }
.steps li.done .b { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.cur { color: var(--text); font-weight: 700; }
.steps li.cur .b { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hist { display: grid; gap: 8px; font-size: 13px; }
.hist .when { color: var(--faint); font-size: 12px; }

/* messages */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg .by { font-size: 11px; font-weight: 700; color: var(--faint); margin-bottom: 2px; }
.msg.team { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.employer { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.employer .by { color: rgba(255, 255, 255, .75); }
.msg.assistant { border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.msg .ai { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 0 5px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent-text); vertical-align: 1px; }
.msg.typing { color: var(--muted); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dotblink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dotblink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.composer textarea { min-height: 46px; max-height: 180px; }

/* documents */
.doc { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.doc .body { min-width: 0; flex: 1; }
.doc .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc .sub { font-size: 12px; color: var(--muted); }
.doc .act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.req-status { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.req-open, .req-changes { background: var(--warn-soft); color: var(--warn); }
.req-submitted { background: var(--accent-soft); color: var(--accent-text); }
.req-accepted { background: var(--ok-soft); color: var(--ok); }
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }

/* modal + toast */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(9, 18, 32, .5); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .overlay { align-items: center; padding: 24px; } }
.modal { background: var(--surface); width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); max-height: 92vh; overflow: auto; }
.modal.modal-wide { max-width: 720px; }
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.modal-b { padding: 10px 20px 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
#toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); }
@media (min-width: 1024px) { #toast { bottom: 28px; } }
.foot-legal { margin-top: 40px; font-size: 12px; color: var(--faint); text-align: center; }

/* print: never print portal content */
.print-block { display: none; }
@media print {
  #app, #modal-root, #toast { display: none !important; }
  .print-block { display: block; padding: 40px; font: 16px sans-serif; }
}
/* partner submission: AI-read CV, check step */
label.drop { display: block; }
.from-cv { font-size: 11px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 1px 7px; border-radius: 99px; margin-left: 4px; white-space: nowrap; }
.ai-read { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.ai-read-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ai-read ul { margin: 4px 0 0 18px; padding: 0; font-size: 13px; }
.ai-cols { display: grid; grid-template-columns: 1fr; gap: 8px 16px; margin-top: 8px; }
@media (min-width: 640px) { .ai-cols { grid-template-columns: 1fr 1fr; } }
.top .refresh { flex: none; padding: 6px 8px; }
.refresh.spinning svg { animation: spin .8s linear infinite; }

/* ── nursing record: six phases (candidate dashboard + nursing employers) ── */
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .phases { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ph { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 13px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); min-width: 0; position: relative; }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ph-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none;
  background: var(--surface-2); color: var(--faint); border: 1px solid var(--line-2); }
.ph-s { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.ph-l { font-weight: 700; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ph-d { font-size: 12px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.ph-done .ph-ic { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.ph-done .ph-s { color: var(--ok); }
.ph-active .ph-ic { background: var(--warn-soft); color: var(--warn); border-color: transparent; font-size: 10px; }
.ph-active .ph-s { color: var(--warn); }
.ph-cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.ph-cur .ph-s { color: var(--accent-text); }
.ph-cur .ph-ic { background: var(--accent); color: #fff; border-color: transparent; }

.ph-mini-wrap { display: grid; gap: 6px; }
.ph-mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.ph-mini i { height: 6px; border-radius: 99px; background: var(--line-2); }
.ph-mini i.done { background: var(--ok); }
.ph-mini i.active { background: var(--warn); }
.ph-mini i.cur { background: var(--accent); }

.n-band { margin-top: 16px; display: grid; gap: 14px; }
.n-band-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.n-band-h h3 { margin: 0; }
.n-kpis { margin-top: 14px; }
.n-band .n-kpis { margin-top: 0; }
.n-band .kpi { box-shadow: none; background: var(--surface-2); }
.kpi .n small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.n-kpis .kpi .n { font-size: 22px; }

.now-box { border-radius: var(--radius); padding: 18px 20px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  display: grid; gap: 6px; margin-bottom: 22px; }
.now-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.now-t { font-size: 18px; font-weight: 700; line-height: 1.4; }
.now-s { font-size: 13px; color: var(--muted); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

.todo .btn { margin-left: auto; flex: none; }
.todo .t { min-width: 0; overflow-wrap: anywhere; }
.todo-warn .ic { background: var(--warn-soft); color: var(--warn); }
.c-grid { display: grid; gap: 16px; margin-top: 26px; }
@media (min-width: 1024px) { .c-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.c-col { display: grid; gap: 16px; }

/* ── login chooser (/portal/start) ── */
.starts { display: grid; gap: 10px; margin-top: 18px; }
.start-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); color: inherit; min-height: 64px; transition: border-color .15s, background .15s; }
.start-opt:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.start-opt .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.start-opt .ic svg { width: 20px; height: 20px; }
.start-opt .tx { display: grid; gap: 2px; min-width: 0; }
.start-opt .chev { margin-left: auto; color: var(--faint); flex: none; }

/* ── candidate profile on A4 pages (dossier.js) vs. all details ── */
.p-maincol { display: grid; gap: 16px; align-content: start; }
.pv-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pv-switch button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 650; }
.pv-switch button:hover { color: var(--accent-text); border-color: var(--accent); }
.pv-switch button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pv-switch button svg { width: 15px; height: 15px; }
.pv-hint { margin-left: 6px; }
@media (max-width: 640px) { .pv-hint { display: none; } }

/* 📝 contract to read + sign online */
.ct-pages { display: grid; gap: 18px; justify-items: center; margin: 4px 0 20px; }
.ct-page { margin: 0; width: 100%; max-width: 820px; }
.ct-page img { display: block; width: 100%; height: auto; background: #fff; border-radius: 4px; border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 10px 28px rgba(15, 23, 42, .12); }
.ct-page figcaption { text-align: center; font-size: 12px; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.ct-sign { max-width: 820px; margin: 0 auto; border: 2px solid var(--accent); }
.ct-sign h2 { margin-bottom: 14px; }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-agree { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 16px; font-size: 14.5px; cursor: pointer; }
.ct-agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.ct-btn { width: 100%; justify-content: center; min-height: 48px; font-size: 16px; }
.ct-done { max-width: 820px; margin: 0 auto 18px; border-color: var(--ok); background: var(--ok-soft); }
.ct-done-h { display: flex; gap: 10px; align-items: center; color: var(--ok); }
.ct-done-h b { color: var(--text); }
@media (max-width: 640px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-pages { gap: 12px; }
  .ct-page img { border-radius: 2px; }
}
