/* =====================================================================
   AIU Smart HR - UI preview styles (Milestone 1)
   Palette: navy (brand / structure) + teal (action / magnitude).
   ===================================================================== */

:root {
  --navy-950: #071427;
  --navy-900: #0b1b33;
  --navy-800: #10264a;
  --navy-700: #183a6b;
  --navy-600: #24508f;
  --navy-100: #e4eaf4;
  --teal-700: #0a6f6b;
  --teal-600: #0b7d78;   /* text-safe teal (>= 4.5:1 on white) */
  --teal-500: #12a197;   /* fills */
  --teal-300: #6fd3c8;
  --teal-100: #d3f2ee;
  --teal-50: #eefaf8;

  --ink: #0f1b2d;
  --ink-2: #3d4c63;
  --muted: #5f6e84;
  --line: #e1e6ee;
  --line-2: #cfd7e3;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  --good: #1b6e46;      --good-bg: #e2f3e9;
  --warning: #8a5a00;   --warning-bg: #fff2d1;
  --critical: #a8251b;  --critical-bg: #fde7e4;
  --info: #1d559a;      --info-bg: #e5eefa;
  --neutral: #485569;   --neutral-bg: #edf0f5;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 51, .06), 0 1px 1px rgba(11, 27, 51, .04);
  --shadow: 0 4px 14px rgba(11, 27, 51, .08), 0 1px 3px rgba(11, 27, 51, .06);
  --shadow-lg: 0 18px 48px rgba(7, 20, 39, .18);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --sidebar-w: 248px;
  --banner-h: 36px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; color: var(--navy-900); }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75em; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .86em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 3px solid var(--teal-300); outline-offset: 2px; border-radius: 4px; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--xs { width: 13px; height: 13px; }
.icon--lg { width: 24px; height: 24px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy-900); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Global preview banner ---------- */
.preview-banner {
  position: sticky; top: 0; z-index: 50; min-height: var(--banner-h);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 16px; font-size: .82rem; color: #fff7e0; text-align: center;
  background: repeating-linear-gradient(135deg, #5c3d00 0 12px, #664400 12px 24px);
}
.preview-banner strong { color: #ffd76a; letter-spacing: .04em; }

/* ---------- Buttons & form controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s; white-space: nowrap;
}
.btn--primary { background: var(--teal-600); color: #fff; }
.btn--primary:hover { background: var(--teal-700); }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); }
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--navy-800); }
.btn--ghost:hover { border-color: var(--navy-600); background: var(--surface-2); }
.btn--subtle { background: transparent; color: var(--teal-600); padding-inline: 10px; }
.btn--subtle:hover { background: var(--teal-50); }
.btn--danger { background: transparent; color: var(--critical); padding-inline: 10px; }
.btn--danger:hover { background: var(--critical-bg); }
.btn--sm { min-height: 32px; padding: 4px 10px; font-size: .84rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-100); }
.input--sm, .select--sm { min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 38px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.checkbox input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal-600); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
input[type="range"] { accent-color: var(--teal-600); width: 100%; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.chip--good { color: var(--good); background: var(--good-bg); }
.chip--warning { color: var(--warning); background: var(--warning-bg); }
.chip--critical { color: var(--critical); background: var(--critical-bg); }
.chip--info { color: var(--info); background: var(--info-bg); }
.chip--neutral { color: var(--neutral); background: var(--neutral-bg); }
.chip--teal { color: var(--teal-700); background: var(--teal-100); }
.chip--outline { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }
.demo-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px; border: 1px dashed #b78a1f;
  background: #fff6df; color: #7a5200; font-size: .68rem; font-weight: 700; letter-spacing: .06em; vertical-align: middle;
}
.tag { display: inline-block; padding: 3px 9px; margin: 0 6px 6px 0; border-radius: 6px; background: var(--navy-100); color: var(--navy-800); font-size: .82rem; }
.evidence {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px;
  background: var(--teal-50); border: 1px solid var(--teal-100); color: var(--teal-700);
  font-size: .74rem; font-weight: 600; cursor: help; white-space: nowrap;
}

/* ---------- Cards & layout primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card__body { padding: 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card__head h2, .card__head h3 { margin: 0; }
.card__foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.grid-wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.cell-strengths { min-width: 200px; max-width: 240px; }
.cell-title { min-width: 220px; }
.stack { display: grid; gap: 20px; }
.grid > *, .stack > *, .content > *, .portal-body > * { min-width: 0; }
.sticky-side { position: sticky; top: calc(var(--banner-h) + 92px); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack-sm { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: .88rem; border: 1px solid; line-height: 1.45;
}
.notice .icon { margin-top: 1px; }
.notice--info { background: var(--info-bg); border-color: #c7d9f3; color: #183f70; }
.notice--warning { background: #fff8e6; border-color: #f0d48d; color: #6b4600; }
.notice--teal { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-700); }

.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--navy-700), var(--teal-600)); color: #fff; font-size: .8rem; font-weight: 700;
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }

/* ---------- Score visuals (single hue = magnitude) ---------- */
.score { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.score__track { flex: 1; height: 8px; background: var(--navy-100); border-radius: 4px; overflow: hidden; }
.score__fill { height: 100%; background: var(--teal-500); border-radius: 4px; }
.score__value { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 2ch; text-align: right; color: var(--navy-900); }
.score--compact .score__track { height: 6px; }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring--md { width: 120px; height: 120px; }
.ring--sm { width: 64px; height: 64px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: var(--navy-100); stroke-width: 9; }
.ring__fg { fill: none; stroke: var(--teal-500); stroke-width: 9; stroke-linecap: round; }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring__label strong { font-size: 1.9rem; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.ring--sm .ring__label strong { font-size: 1.05rem; }
.ring__label span { font-size: .62rem; font-weight: 700; letter-spacing: .08em; color: #7a5200; }
.ring--sm .ring__label span { font-size: .5rem; }

.bars { display: grid; gap: 10px; }
.bars__row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 12px; align-items: center; font-size: .88rem; }
.bars__track { height: 10px; background: var(--navy-100); border-radius: 4px; overflow: hidden; }
.bars__fill { height: 100%; background: var(--teal-500); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars__value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.kpi { padding: 18px 20px; display: grid; gap: 4px; }
.kpi__label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.kpi__label .icon { color: var(--teal-600); }
.kpi__value { font-size: 2rem; font-weight: 750; color: var(--navy-900); font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi__sub { font-size: .8rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #fafcfe; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.cell-person strong { display: block; color: var(--navy-900); }
.rank { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--navy-100); color: var(--navy-800); font-weight: 750; font-variant-numeric: tabular-nums; }
.rank--1 { background: var(--navy-800); color: #fff; }

/* ---------- Public / auth layout ---------- */
.public { min-height: calc(100vh - var(--banner-h)); display: flex; flex-direction: column; }
.public__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; color: var(--navy-900); text-decoration: none !important; font-size: 1.05rem; }
.brand__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--navy-800), var(--teal-600)); color: #fff; font-size: .82rem; font-weight: 800; letter-spacing: .02em; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: .02em; }
.brand--light { color: #fff; }
.brand--light small { color: #a9bbd6; }

.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, rgba(18, 161, 151, .35), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-800) 60%, #123b5c); color: #e7eef8; }
.hero .public__nav .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.hero__inner { padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px) clamp(80px, 9vw, 120px); max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -.02em; }
.hero p.lead { font-size: 1.1rem; color: #c3d2e8; max-width: 56ch; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(111, 211, 200, .14); border: 1px solid rgba(111, 211, 200, .35); color: var(--teal-300); font-size: .8rem; font-weight: 650; margin-bottom: 18px; }
.hero__visual { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); backdrop-filter: blur(6px); }
.hero__visual .card { box-shadow: none; color: var(--ink); }
.mini-row { display: grid; grid-template-columns: 30px 1fr 110px; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: .86rem; }
.mini-row:last-child { border-bottom: 0; }

.roles { max-width: 1180px; margin: -64px auto 0; padding: 0 clamp(16px, 4vw, 48px); position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.role-card { padding: 26px; display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow); }
.role-card__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); }
.role-card--hr .role-card__icon { background: var(--navy-100); color: var(--navy-700); }
.role-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; }
.role-card li { margin-bottom: 4px; }

.section { max-width: 1180px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px); width: 100%; }
.status-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.status-list .icon { margin-top: 2px; }
.ok { color: var(--good); }
.later { color: var(--warning); }
.public__footer { margin-top: auto; padding: 24px clamp(16px, 4vw, 48px); color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - var(--banner-h)); }
.auth__aside { background: linear-gradient(165deg, var(--navy-900), var(--navy-700) 70%, var(--teal-700)); color: #d5e1f1; padding: clamp(24px, 5vw, 56px); display: flex; flex-direction: column; gap: 28px; }
.auth__aside h2 { color: #fff; font-size: 1.6rem; }
.auth__aside--candidate { background: linear-gradient(165deg, #0a3d4a, var(--teal-700) 55%, var(--teal-600)); }
.auth__points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.auth__points li { display: flex; gap: 12px; align-items: flex-start; }
.auth__points .icon { color: var(--teal-300); margin-top: 2px; }
.auth__main { display: grid; place-items: center; padding: clamp(24px, 5vw, 56px); background: var(--surface); }
.auth__form { width: 100%; max-width: 420px; }
.auth__form h1 { font-size: 1.6rem; }
.pw-rules { display: grid; gap: 4px; margin: -4px 0 14px; padding: 0; list-style: none; font-size: .8rem; color: var(--muted); }
.pw-rules li { display: flex; gap: 6px; align-items: center; }
.pw-rules li.is-met { color: var(--good); }

/* ---------- App shell (HR) ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--banner-h)); }
.sidebar { background: var(--navy-900); color: #b9c7db; display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: var(--banner-h); height: calc(100vh - var(--banner-h)); overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 18px; }
.nav { display: grid; gap: 2px; }
.nav__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6e83a3; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #c4d1e3; font-weight: 550; font-size: .92rem; text-decoration: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.is-active { background: rgba(18, 161, 151, .18); color: #fff; box-shadow: inset 3px 0 0 var(--teal-300); }
.nav a .count { margin-left: auto; font-size: .74rem; background: rgba(255,255,255,.1); padding: 1px 8px; border-radius: 999px; }
.sidebar__foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; display: grid; gap: 10px; }
.sidebar__foot a { color: #9fb3cf; display: inline-flex; gap: 8px; align-items: center; }
.session-pill { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.05); color: #d7e1ef; }
.session-pill .avatar { width: 32px; height: 32px; background: #31476b; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px clamp(16px, 3vw, 32px); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: var(--banner-h); z-index: 20; }
.topbar__title { min-width: 0; }
.topbar__title h1 { font-size: 1.25rem; margin: 0; }
.crumbs { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.topbar .input-icon { width: 260px; }
.menu-btn { display: none; }
.content { padding: clamp(16px, 3vw, 32px); display: grid; gap: 24px; align-content: start; }

/* Filters bar */
.filters { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; padding: 16px 20px; }
.filters .field { margin: 0; }
.filters .range-value { font-weight: 700; color: var(--navy-800); }

/* Candidate detail */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 22px; }
.profile-head__meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .86rem; color: var(--ink-2); }
.profile-head__meta span { display: inline-flex; align-items: center; gap: 6px; }
.section-card .card__head { padding: 14px 18px; }
.section-card .card__head h3 { display: flex; align-items: center; gap: 10px; }
.section-card .card__head h3 .num-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--navy-100); color: var(--navy-800); font-size: .76rem; }
.section-card .card__body { padding: 16px 18px; }
.entry { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry__title { font-weight: 650; color: var(--navy-900); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.entry__sub { color: var(--muted); font-size: .86rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.skills-grid { display: grid; gap: 12px; }
.skills-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.criteria { display: grid; gap: 0; }
.criterion { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.criterion:last-child { border-bottom: 0; }
.criterion__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.criterion__label { font-weight: 600; font-size: .9rem; color: var(--navy-900); }
.criterion__text { font-size: .84rem; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a, .tabs button { padding: 10px 14px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; text-decoration: none; }
.tabs a.is-active, .tabs button.is-active { color: var(--navy-900); border-bottom-color: var(--teal-500); }

/* Vacancy editor */
.req-table { display: grid; gap: 0; }
.req-row {
  display: grid; gap: 10px 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) 40px;
  grid-template-areas: "cat type mand del" "label label weight weight";
}
.req-row:nth-child(even) { background: #fbfcfe; }
.rc-cat { grid-area: cat; } .rc-type { grid-area: type; } .req-label { grid-area: label; }
.req-row .mand { grid-area: mand; } .req-row .weight-ctl { grid-area: weight; } .rc-del { grid-area: del; }
.weight-ctl { display: grid; grid-template-columns: 1fr 64px; gap: 8px; align-items: center; }
.weight-ctl .input { text-align: right; padding-inline: 8px; }
.total { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.total--ok { color: var(--good); }
.total--bad { color: var(--critical); }
.mand { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink-2); }
.mand input { accent-color: var(--teal-600); width: 16px; height: 16px; }

/* Vacancy cards */
.vac-card { display: grid; gap: 12px; padding: 20px; }
.vac-card__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.vac-card__meta span { display: inline-flex; gap: 6px; align-items: center; }

/* Candidate portal */
.portal-top { background: var(--navy-900); color: #d5e1f1; }
.portal-top__bar { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 24px; padding: 12px clamp(16px, 3vw, 32px); }
.portal-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.portal-nav a { padding: 8px 14px; border-radius: 8px; color: #b9c7db; font-weight: 600; font-size: .9rem; text-decoration: none; }
.portal-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.portal-nav a.is-active { background: rgba(18, 161, 151, .22); color: #fff; }
.portal-user { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: .86rem; }
.portal-hero { background: linear-gradient(160deg, var(--navy-800), #0f4a5a); color: #d5e1f1; }
.portal-hero__inner { max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 64px; }
.portal-hero h1 { color: #fff; }
.portal-body { max-width: 1180px; margin: -40px auto 0; padding: 0 clamp(16px, 3vw, 32px) 48px; display: grid; gap: 24px; width: 100%; }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 8px 0 4px; list-style: none; padding: 0; }
.timeline li { position: relative; text-align: center; font-size: .76rem; color: var(--muted); padding-top: 26px; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); z-index: 1; }
.timeline li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.timeline li:first-child::after { display: none; }
.timeline li.is-done { color: var(--ink-2); }
.timeline li.is-done::before { background: var(--teal-500); border-color: var(--teal-500); }
.timeline li.is-done::after { background: var(--teal-500); }
.timeline li.is-current { color: var(--navy-900); font-weight: 700; }
.timeline li.is-current::before { background: var(--surface); border-color: var(--teal-500); box-shadow: 0 0 0 4px var(--teal-100); }
.timeline li.is-stopped::before { background: var(--critical); border-color: var(--critical); }
.dropzone {
  display: grid; place-items: center; gap: 8px; text-align: center; padding: 32px 20px; border-radius: var(--radius);
  border: 2px dashed var(--line-2); background: var(--surface-2); color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--teal-500); background: var(--teal-50); }
.dropzone .icon { width: 36px; height: 36px; color: var(--teal-600); }
.file-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.file-card__icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--navy-100); color: var(--navy-700); flex: none; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.checklist .icon { color: var(--muted); }

/* ---------- Report preview ---------- */
.report-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.report-controls { position: sticky; top: calc(var(--banner-h) + 84px); }
.paper-wrap { background: #dfe4ec; border-radius: var(--radius); padding: clamp(12px, 3vw, 32px); overflow-x: auto; }
.paper { position: relative; background: #fff; max-width: 794px; margin: 0 auto; padding: 56px 60px; box-shadow: var(--shadow-lg); font-size: 13.5px; color: #1b2738; overflow: hidden; }
.paper::before { content: "DEMO SAMPLE - NOT A REAL ASSESSMENT"; position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); font-size: 34px; font-weight: 800; letter-spacing: .06em; color: rgba(138, 90, 0, .08); white-space: nowrap; pointer-events: none; }
.paper__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 3px solid var(--navy-800); margin-bottom: 22px; }
.paper h2 { font-size: 1.05rem; color: var(--navy-800); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 22px 0 12px; }
.paper .table { font-size: 12.5px; }
.paper .table td, .paper .table th { padding: 7px 10px; }
.paper__summary { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.paper__foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: grid; gap: 4px; }
.signature { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 18px; }
.signature div { border-top: 1px solid var(--ink-2); padding-top: 6px; font-size: 11.5px; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: min(440px, calc(100vw - 40px));
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px;
  background: var(--navy-900); color: #eef3fa; box-shadow: var(--shadow-lg); font-size: .9rem;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.toast--warning { background: #5c3d00; }
.toast .icon { color: var(--teal-300); margin-top: 1px; }
.toast--warning .icon { color: #ffd76a; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .grid-wide-left { grid-template-columns: minmax(0, 1fr); }
  .grid-main-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .report-layout { grid-template-columns: minmax(0, 1fr); }
  .report-controls { position: static; }
  .form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-side { position: static; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .shell.is-nav-open .sidebar { transform: none; }
  .shell.is-nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(7, 20, 39, .45); z-index: 55; }
  .menu-btn { display: inline-flex; }
  .topbar .input-icon { display: none; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth__main { place-items: start center; }
  .auth__aside { gap: 14px; }
  .auth__aside { padding-block: 28px; }
  .auth__aside .auth__points { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .req-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; grid-template-areas: "cat type del" "label label label" "mand weight weight"; }
  .grid-2, .grid-3, .grid-4, .roles, .status-list, .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .roles { margin-top: -48px; }
  .filters { grid-template-columns: 1fr; }
  .bars__row { grid-template-columns: 110px 1fr 34px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .timeline li { font-size: .66rem; }
  .portal-top__bar { flex-wrap: wrap; gap: 10px; }
  .portal-user { margin-left: 0; }
  .paper { padding: 28px 22px; }
  .paper__summary { grid-template-columns: 1fr; }
  .topbar__actions .btn span { display: none; }
}

@media (max-width: 1100px) {
  /* Responsive tables -> stacked cards */
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table--stack td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .table--stack td::before { content: attr(data-label); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; flex: none; }
  .table--stack td.cell-full { display: block; }
  .table--stack td.cell-full::before { display: none; }
  .table--stack .score { min-width: 140px; }
  .cell-strengths, .cell-title { max-width: none; min-width: 0; }
}

/* ---------- Print (browser print of the report preview only) ---------- */
@media print {
  .preview-banner, .sidebar, .topbar, .report-controls, .toast { display: none !important; }
  .shell, .report-layout { display: block; }
  body, .paper-wrap { background: #fff; }
  .paper-wrap { padding: 0; }
  .paper { box-shadow: none; max-width: none; padding: 0; }
  .content { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* =====================================================================
   AIU Smart HR - warm orange & forest-green palette refresh
   Keeps the existing layout and components; changes colors only.
   ===================================================================== */
:root {
  /* Forest green = structure / trust */
  --navy-950: #102b20;
  --navy-900: #173f2d;
  --navy-800: #20583b;
  --navy-700: #2d704b;
  --navy-600: #3c875d;
  --navy-100: #e6f1e8;

  /* Burnt orange = actions / highlights */
  --teal-700: #9c4109;
  --teal-600: #b64d0b;
  --teal-500: #ed7a22;
  --teal-300: #ffb66f;
  --teal-100: #ffead6;
  --teal-50: #fff5eb;

  --bg: #faf8f4;
  --surface-2: #fcfaf6;
  --line: #e9e4dc;
  --line-2: #d9d1c5;
  --shadow-sm: 0 1px 2px rgba(23, 63, 45, .06), 0 1px 1px rgba(23, 63, 45, .04);
  --shadow: 0 4px 14px rgba(23, 63, 45, .08), 0 1px 3px rgba(23, 63, 45, .05);
}

.preview-banner {
  color: #fff8ef;
  background: repeating-linear-gradient(135deg, #20583b 0 14px, #b64d0b 14px 28px);
}
.preview-banner strong { color: #ffe0bd; }
:focus-visible { outline-color: var(--teal-300); }

.btn--primary { background: var(--teal-600); }
.btn--primary:hover { background: var(--teal-700); }
.btn--navy { background: var(--navy-800); }
.btn--navy:hover { background: var(--navy-700); }
.btn--ghost:hover { border-color: var(--teal-500); }
.btn--subtle { color: var(--teal-700); }
.btn--subtle:hover { background: var(--teal-50); }

.hero {
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(237, 122, 34, .28), transparent 62%),
    linear-gradient(155deg, #143b2a 0%, #20583b 62%, #2d704b 100%);
}
.eyebrow {
  background: rgba(237, 122, 34, .15);
  border-color: rgba(255, 182, 111, .42);
  color: #ffc18a;
}
.brand__mark {
  background: linear-gradient(135deg, #20583b 0%, #2d704b 52%, #ed7a22 100%);
}
.role-card__icon {
  background: #fff0df;
  color: #b64d0b;
}
.role-card--hr .role-card__icon {
  background: #e6f1e8;
  color: #20583b;
}
.auth__aside {
  background:
    radial-gradient(650px 320px at 92% 8%, rgba(237, 122, 34, .24), transparent 62%),
    linear-gradient(160deg, #143b2a, #20583b 72%, #2d704b);
}
.auth__aside--candidate {
  background:
    radial-gradient(600px 300px at 92% 8%, rgba(237, 122, 34, .2), transparent 62%),
    linear-gradient(160deg, #173f2d, #286644 72%, #3c875d);
}
.auth__points .icon { color: #ffb66f; }

.sidebar { background: linear-gradient(180deg, #173f2d 0%, #102b20 100%); }
.nav a.is-active {
  background: rgba(237, 122, 34, .2);
  box-shadow: inset 3px 0 0 #ed7a22;
}
.session-pill .avatar {
  background: linear-gradient(135deg, #b64d0b, #ed7a22);
}
.avatar { background: linear-gradient(135deg, #20583b, #ed7a22); }
.score__fill, .ring__fg, .bars__fill { background: var(--teal-500); }
.rank--1 { background: #b64d0b; color: #fff; }

.portal-top { background: linear-gradient(90deg, #173f2d, #20583b); }
.portal-nav a.is-active { background: rgba(237, 122, 34, .24); }
.portal-hero {
  background:
    radial-gradient(700px 300px at 88% 0%, rgba(237, 122, 34, .25), transparent 62%),
    linear-gradient(155deg, #173f2d, #286644 75%, #20583b);
}
.timeline li.is-done::before,
.timeline li.is-done::after { background: #ed7a22; }
.timeline li.is-done::before { border-color: #ed7a22; }
.timeline li.is-current { color: var(--navy-900); }
.timeline li.is-current::before {
  border-color: #ed7a22;
  box-shadow: 0 0 0 4px #ffead6;
}
.dropzone:hover, .dropzone.is-over { border-color: #ed7a22; background: #fff5eb; }

.paper__head { border-bottom-color: var(--navy-800); }
.paper h2 { color: var(--navy-800); }
.toast { background: #173f2d; }
.toast .icon { color: #ffb66f; }

@media (max-width: 960px) {
  .sidebar { background: linear-gradient(180deg, #173f2d 0%, #102b20 100%); }
}
