/* MIC Immigration Pathway Finder — interface styles.
   A compact working tool: dense tables, small type, restrained colour. Colour
   is reserved for the four eligibility states and the availability states, so
   that when something is coloured it means something. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --ink: #16191d;
  --ink-2: #454b54;
  --ink-3: #6f7681;
  --line: #e3e6ea;
  --line-2: #d3d8de;
  --accent: #1f4e79;
  --accent-soft: #eaf1f8;
  --accent-ink: #163c5e;

  --likely: #16794a;
  --likely-bg: #e7f5ee;
  --potential: #9a6206;
  --potential-bg: #fdf3e0;
  --not-eligible: #a51e3c;
  --not-eligible-bg: #fdeef1;
  --unknown: #5a6472;
  --unknown-bg: #eef0f3;

  --radius: 7px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(16, 22, 30, 0.06), 0 1px 3px rgba(16, 22, 30, 0.04);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- layout ---------- */

#app { min-height: 100%; }

.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }

.sidebar {
  background: #14243a;
  color: #c7d3e2;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { padding: 4px 10px 16px; }
.brand strong { display: block; color: #fff; font-size: 14px; letter-spacing: -0.01em; }
.brand span { font-size: 11px; color: #8ea3bd; }

.nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: #c7d3e2; font-size: 13px; cursor: pointer; border: 0; background: none;
  width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: rgba(255,255,255,0.07); text-decoration: none; color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.13); color: #fff; font-weight: 600; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: #6f8399; padding: 14px 10px 4px; }
.nav-badge { background: rgba(255,255,255,0.16); border-radius: 20px; padding: 1px 7px; font-size: 11px; }
.nav-badge.warn { background: #b45309; color: #fff; }

.sidebar-footer { margin-top: auto; padding: 12px 10px 0; font-size: 11px; color: #7f93ab; border-top: 1px solid rgba(255,255,255,0.09); }

.main { padding: 22px 26px 60px; max-width: 1360px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 3px; font-size: 20px; letter-spacing: -0.02em; }
.page-head p { margin: 0; color: var(--ink-3); font-size: 13px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- surfaces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card.tight { padding: 12px 14px; }
.card h2 { margin: 0 0 4px; font-size: 14px; letter-spacing: -0.01em; }
.card h3 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.card-sub { color: var(--ink-3); font-size: 12px; margin: 0 0 12px; }

.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

/* ---------- stats ---------- */

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
.stat .value { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; margin-top: 2px; }
.stat .hint { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.stat.warn { border-color: #f0c98a; background: #fffaf1; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 13px; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #b9c1cb; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 550; }
.btn.primary:hover { background: #1a4368; }
.btn.subtle { border-color: transparent; background: transparent; color: var(--accent); }
.btn.subtle:hover { background: var(--accent-soft); }
.btn.danger { color: var(--not-eligible); border-color: #e9bfc9; }
.btn.danger:hover { background: var(--not-eligible-bg); }
.btn.sm { padding: 4px 9px; font-size: 12px; }

/* ---------- badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

.badge.likely { background: var(--likely-bg); color: var(--likely); border-color: #b9e0cb; }
.badge.potential { background: var(--potential-bg); color: var(--potential); border-color: #f0d5a4; }
.badge.not-eligible { background: var(--not-eligible-bg); color: var(--not-eligible); border-color: #f0c2ce; }
.badge.unknown { background: var(--unknown-bg); color: var(--unknown); border-color: var(--line-2); }
.badge.neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); font-weight: 500; }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: #c2d8ea; }

.avail { font-size: 11.5px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.avail.open { background: #eaf6ef; color: #16794a; border-color: #bfe2cd; }
.avail.gated { background: #eef4fa; color: #2b5a86; border-color: #c8dcee; }
.avail.paused { background: #fdf3e0; color: #9a6206; border-color: #f0d5a4; }
.avail.closed { background: #f4f5f6; color: #6f7681; border-color: var(--line-2); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.045em;
  color: var(--ink-3); font-weight: 600; padding: 9px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-click { cursor: pointer; }

/* ---------- match bar ---------- */

.match { display: flex; align-items: center; gap: 8px; min-width: 116px; }
.match-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; min-width: 54px; }
.match-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.match-fill.likely { background: var(--likely); }
.match-fill.potential { background: var(--potential); }
.match-fill.not-eligible { background: var(--not-eligible); }
.match-num { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; min-width: 34px; text-align: right; }

/* ---------- criteria list ---------- */

.criterion { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.criterion:last-child { border-bottom: 0; }
.criterion .mark { flex: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; margin-top: 1px; }
.mark.PASS { background: var(--likely); }
.mark.FAIL { background: var(--not-eligible); }
.mark.UNKNOWN { background: var(--potential); }
.mark.NOT_APPLICABLE { background: var(--unknown); }
.criterion .body { flex: 1; min-width: 0; }
.criterion .title { font-weight: 600; font-size: 13px; }
.criterion .title .opt { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.criterion .req { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.criterion .val { font-size: 12px; margin-top: 3px; }
.criterion .val b { color: var(--ink-2); }
.criterion .hint { font-size: 12px; color: var(--potential); margin-top: 3px; }

/* ---------- forms ---------- */

.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.field .help { font-size: 11.5px; color: var(--ink-3); margin-bottom: 5px; }
.field .req-star { color: var(--not-eligible); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%; padding: 7px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }

.check-row { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 5px; }
.check-row input { width: auto; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 14px; font-size: 12.5px; font-family: inherit; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }

.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.scores label { font-size: 11px; color: var(--ink-3); display: block; margin-bottom: 3px; }
@media (max-width: 700px) { .scores { grid-template-columns: repeat(2, 1fr); } }

.multi { display: flex; flex-wrap: wrap; gap: 6px; }
.multi label {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  border: 1px solid var(--line-2); border-radius: 20px; padding: 4px 11px; cursor: pointer; background: var(--surface);
}
.multi label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.multi input { width: auto; }

/* ---------- misc ---------- */

.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 12px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.notice { border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; border: 1px solid; margin-bottom: 12px; }
.notice.info { background: var(--accent-soft); border-color: #c2d8ea; color: var(--accent-ink); }
.notice.warn { background: var(--potential-bg); border-color: #f0d5a4; color: var(--potential); }
.notice.error { background: var(--not-eligible-bg); border-color: #f0c2ce; color: var(--not-eligible); }
.notice.ok { background: var(--likely-bg); border-color: #b9e0cb; color: var(--likely); }

.dropzone {
  border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 30px 20px;
  text-align: center; background: var(--surface-2); cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 14px; margin-bottom: 3px; }

.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 11px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.step.done { background: var(--likely-bg); border-color: #b9e0cb; color: var(--likely); }
.step.current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.step .n { font-weight: 700; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(12, 18, 26, 0.45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: var(--surface); border-radius: var(--radius); width: min(760px, 100%); max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(10,16,24,0.28); }
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: sticky; top: 0; background: var(--surface); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--surface); }

.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(160deg, #14243a 0%, #1f4e79 100%); }
.login-card { background: var(--surface); border-radius: 10px; padding: 28px; width: min(400px, 100%); box-shadow: 0 20px 50px rgba(8,14,22,0.32); }
.login-card h1 { margin: 0 0 3px; font-size: 19px; }
.login-card p.sub { margin: 0 0 20px; color: var(--ink-3); font-size: 13px; }

.spinner { width: 15px; height: 15px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: 14px; }

.src-list { list-style: none; padding: 0; margin: 0; }
.src-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.src-list li:last-child { border-bottom: 0; }
.src-list .st { font-weight: 600; }
.src-list .sa { color: var(--ink-3); font-size: 11.5px; }

.disclaimer { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 20px; }

.compare-table th:first-child, .compare-table td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.compare-table thead th:first-child { background: var(--surface-2); z-index: 2; }

/* ---------- Best Pathways ---------------------------------------------------
   The candidate-facing result view. Denser than a dashboard and louder about
   the three things that decide a conversation: how much of the stream the
   profile matches, whether they qualify, and whether anyone can apply today. */

.candidate-head {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px;
}
.candidate-head h1 { margin: 0 0 2px; font-size: 20px; letter-spacing: -0.02em; }
.candidate-head .meta { color: var(--ink-3); font-size: 12px; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px;
  background: var(--surface-2); font-size: 12.5px; white-space: nowrap;
}
.chip .k { color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.chip .v { font-weight: 600; }
.chip.strong { background: var(--accent-soft); border-color: #c2d8ea; color: var(--accent-ink); }

/* group section headers */
.group-head { display: flex; align-items: baseline; gap: 9px; margin: 20px 0 4px; }
.group-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.group-head .count {
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px;
}
.group-head .blurb { color: var(--ink-3); font-size: 12px; }
.group-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.group-dot.STRONGEST { background: var(--likely); }
.group-dot.POTENTIAL { background: var(--potential); }
.group-dot.FUTURE { background: #c2620d; }
.group-dot.NOT_A_MATCH { background: var(--unknown); }

/* pathway card */
.pw {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 15px; margin-bottom: 9px;
}
.pw.STRONGEST { border-left-color: var(--likely); }
.pw.POTENTIAL { border-left-color: var(--potential); }
.pw.FUTURE { border-left-color: #c2620d; }
.pw.NOT_A_MATCH { border-left-color: var(--line-2); }

.pw-top { display: flex; align-items: flex-start; gap: 14px; }
.pw-rank {
  font-size: 15px; font-weight: 700; color: var(--ink-3); min-width: 30px;
  font-variant-numeric: tabular-nums; padding-top: 1px;
}
.pw-id { flex: 1; min-width: 0; }
.pw-id .name { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.pw-id .prog { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.pw-score { text-align: right; min-width: 132px; flex: none; }
.pw-pct { font-size: 26px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.pw-pct.STRONGEST { color: var(--likely); }
.pw-pct.POTENTIAL { color: var(--potential); }
.pw-pct.FUTURE { color: #c2620d; }
.pw-pct.NOT_A_MATCH { color: var(--unknown); }
.pw-score .cap { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 2px; }
.pw-progress { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pw-progress i { display: block; height: 100%; border-radius: 3px; }
.pw-progress i.STRONGEST { background: var(--likely); }
.pw-progress i.POTENTIAL { background: var(--potential); }
.pw-progress i.FUTURE { background: #c2620d; }
.pw-progress i.NOT_A_MATCH { background: var(--unknown); }

.pw-badges { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 10px; }

.pw-tally { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; font-size: 12.5px; }
.pw-tally span { display: inline-flex; align-items: center; gap: 4px; }
.pw-tally .ok { color: var(--likely); }
.pw-tally .no { color: var(--not-eligible); }
.pw-tally .qq { color: var(--potential); }
.pw-tally .muted { color: var(--ink-3); }

.pw-ticks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tick {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; background: var(--surface-2);
}
.tick .g { font-weight: 700; font-size: 11px; }
.tick.PASS .g { color: var(--likely); }
.tick.FAIL .g { color: var(--not-eligible); }
.tick.UNKNOWN .g { color: var(--potential); }
.tick.FAIL { border-color: #f0c2ce; background: var(--not-eligible-bg); }

.pw-note { font-size: 12.5px; color: var(--ink-2); margin-top: 9px; line-height: 1.45; }
.pw-note .lead { font-weight: 650; color: var(--ink); }

.pw-gap {
  margin-top: 9px; padding: 8px 11px; border-radius: var(--radius-sm);
  font-size: 12.5px; border: 1px solid;
}
.pw-gap.fail { background: var(--not-eligible-bg); border-color: #f0c2ce; color: var(--not-eligible); }
.pw-gap.unknown { background: var(--potential-bg); border-color: #f0d5a4; color: var(--potential); }
.pw-gap b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }

.pw-improve { margin-top: 9px; }
.pw-improve summary { font-size: 12.5px; color: var(--accent); cursor: pointer; font-weight: 600; }
.pw-improve ul { margin: 7px 0 0; padding-left: 18px; }
.pw-improve li { font-size: 12.5px; color: var(--ink-2); margin-bottom: 3px; }
.pw-improve .caveat { font-size: 11px; color: var(--ink-3); margin-top: 6px; font-style: italic; }

.pw-actions { display: flex; gap: 8px; align-items: center; margin-top: 11px; flex-wrap: wrap; }

.pw-compact { padding: 9px 13px; }
.pw-compact .pw-pct { font-size: 18px; }
.pw-compact .pw-score { min-width: 92px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.filters .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
.filters select { width: auto; min-width: 130px; }

.score-explain { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.score-explain code {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 5px; font-family: var(--mono); font-size: 11px;
}

/* ---------------------------------------------------------------------------
   Labour Market Intelligence
   ---------------------------------------------------------------------------
   The two data families are styled deliberately differently. Verified market
   data reads as a neutral reference panel; MIC Career Intelligence carries a
   distinct accent and an explicit label, so a consultant never has to wonder
   which of the two they are reading. */

.badge.good { background: var(--likely-bg); color: var(--likely); border-color: #b9e0cb; }
.badge.warn { background: var(--potential-bg); color: var(--potential); border-color: #f0d5a4; }
.badge.bad { background: var(--not-eligible-bg); color: var(--not-eligible); border-color: #f0c2ce; }
.badge.muted { background: var(--unknown-bg); color: var(--unknown); border-color: var(--line-2); }
.badge.subtle { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); font-weight: 500; }

.data-panel { padding: 0; overflow: hidden; }
.data-panel > *:not(.data-panel-head) { padding: 0 16px; }
.data-panel > *:last-child { padding-bottom: 16px; }

.data-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.data-panel-kind {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}

.panel-market { border-top: 3px solid var(--accent); }
.panel-market .data-panel-head { background: var(--surface-2); }
.panel-market .data-panel-kind { color: var(--accent); }

.panel-mic { border-top: 3px solid #6b4fa8; }
.panel-mic .data-panel-head { background: #f6f3fc; }
.panel-mic .data-panel-kind { color: #584090; }

.mic-empty {
  margin: 16px 0; padding: 14px 16px; border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.mic-empty-title { font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }

.mic-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.mic-item:last-child { border-bottom: none; }
.mic-item-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.mic-item-headline { font-weight: 600; color: var(--ink); line-height: 1.45; }
.mic-item-body { margin: 6px 0 7px; color: var(--ink-2); line-height: 1.55; font-size: 13.5px; }

.market-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 16px 0 0; }
.market-figure { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; background: var(--surface-2); }
.market-figure .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 600; }
.market-figure .value { font-size: 20px; font-weight: 650; color: var(--ink); margin: 5px 0 3px; }
.market-figure .value.absent { font-size: 14px; font-weight: 500; color: var(--ink-3); }

.geo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.geo-crumb { font-size: 12px; color: var(--ink-3); }

.fit-factor { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: start; }
.fit-factor:last-child { border-bottom: none; }
.fit-factor .fit-outcome { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.fit-outcome.MATCHED { color: var(--likely); }
.fit-outcome.GAP { color: var(--not-eligible); }
.fit-outcome.UNKNOWN { color: var(--unknown); }
.fit-factor .fit-label { font-weight: 600; font-size: 13px; }
.fit-factor .fit-detail { color: var(--ink-2); font-size: 13px; line-height: 1.5; margin-top: 2px; }

.career-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; background: var(--surface); margin-bottom: 12px; }
.career-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.career-score { text-align: right; flex: none; }
.career-score .n { font-size: 26px; font-weight: 680; line-height: 1; color: var(--accent); }
.career-score .t { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 600; }

.theme-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.theme-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #d3e3f1; }
.theme-chip.gap { background: var(--unknown-bg); color: var(--ink-2); border-color: var(--line-2); }

.kb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 13px; }
.kb-form label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.kb-form .full { grid-column: 1 / -1; }
.kb-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kb-row:last-child { border-bottom: none; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-3);
  cursor: pointer; font-family: inherit;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }


/* ==========================================================================
   Consultant workspace
   Added for the multi-client workspace. Nothing above this line was changed;
   every rule here is new and scoped to a class that did not exist before.
   ========================================================================== */

.main-wrap { min-width: 0; }

/* --- test mode strip ------------------------------------------------------
   Deliberately understated: a working notice, not an alarm. It lives in the
   application shell only and is never part of a report or a PDF. */
.test-mode-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 26px;
  background: #fdf3e0; border-bottom: 1px solid #f0dcb4;
  color: #7a4d05; font-size: 12px; font-weight: 550;
  letter-spacing: 0.01em;
}
.test-mode-bar .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #c98a12; flex: none;
}
.test-mode-bar .tiny { font-weight: 400; color: #96702c; margin-left: auto; }

/* --- portfolio ------------------------------------------------------------ */
.portfolio-grid {
  display: grid; gap: 10px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.portfolio-card {
  display: block; padding: 13px 15px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); box-shadow: var(--shadow);
}
a.portfolio-card:hover { border-color: var(--line-2); text-decoration: none; background: var(--surface-2); }
.portfolio-card .value { font-size: 26px; font-weight: 650; line-height: 1.1; }
.portfolio-card .label { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.portfolio-card .hint { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.portfolio-card.warn { border-color: #f0dcb4; background: #fffdf8; }
.portfolio-card.warn .value { color: var(--potential); }
.portfolio-card.good .value { color: var(--likely); }

/* --- attention list ------------------------------------------------------- */
.attention {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); border-left-width: 3px; background: var(--surface-2);
}
.attention.error { border-left-color: var(--not-eligible); }
.attention.warn { border-left-color: var(--potential); }
.attention.info { border-left-color: var(--unknown); }
.attention-name { font-weight: 600; min-width: 150px; }
.attention-reasons { color: var(--ink-2); }

/* --- clients table -------------------------------------------------------- */
.filter-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
/* The global form rule sets width:100% on every control, which is right inside
   a field but wrong on a toolbar. Overridden here rather than there, so no
   existing form changes. */
.filter-bar input[type="search"], .filter-bar select {
  width: auto; padding: 6px 9px; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; background: var(--surface); color: var(--ink);
}
.filter-bar select { max-width: 220px; }
.row .btn + input, .row input, .row select { width: auto; }
.row input[type="text"] { min-width: 220px; flex: 1; }
.clients-table td { vertical-align: top; }
.row-actions { display: flex; gap: 2px; flex-wrap: nowrap; align-items: flex-start; }
.row-actions .btn { padding: 3px 7px; font-size: 12px; white-space: nowrap; }

/* Eleven columns need room. The table keeps its natural width and the wrapper
   scrolls when the window is narrower — which is honest — rather than
   compressing columns into each other. A sticky actions column was tried and
   removed: pinned to the wrapper's right edge it paints over the status column
   whenever the table is scrolled left, which is worse than scrolling. */
.clients-table { font-size: 12.5px; min-width: 1150px; }
.clients-table th, .clients-table td { padding: 8px 9px; }
.clients-table th:last-child, .clients-table td:last-child { width: 1%; white-space: nowrap; }
.clients-table th:nth-last-child(2), .clients-table td:nth-last-child(2) { white-space: nowrap; }
.clients-table td:nth-child(3) { min-width: 116px; }
/* The match bar is sized for the analysis screen, where it stands alone. In an
   eleven-column list it only has to be readable, so it gives width back. */
.clients-table .match { min-width: 78px; gap: 6px; }
.clients-table .match-bar { min-width: 36px; }
.clients-table .match-num { min-width: 30px; }
.danger-text { color: var(--not-eligible) !important; }

.completion { display: inline-flex; align-items: center; gap: 6px; }
.completion-bar {
  display: inline-block; width: 46px; height: 5px; border-radius: 3px;
  background: var(--unknown-bg); overflow: hidden; vertical-align: middle;
}
.completion-bar.wide { display: block; width: 100%; height: 7px; }
.completion-fill { display: block; height: 100%; border-radius: 3px; background: var(--unknown); }
.completion-fill.likely { background: var(--likely); }
.completion-fill.potential { background: var(--potential); }
.completion-fill.not-eligible { background: var(--not-eligible); }

/* --- client workspace tabs ------------------------------------------------ */
.tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.tab {
  padding: 8px 13px; font-size: 13px; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--accent); text-decoration: none; background: var(--surface-2); }
.tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab-count {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  background: var(--unknown-bg); border-radius: 8px;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.tab-panel { min-height: 220px; }

/* --- facts grid (overview) ------------------------------------------------ */
.facts {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.facts.tight { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 9px; }
.fact .label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.fact .value { font-size: 15px; font-weight: 600; margin-top: 1px; }
.fact .hint { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface-2);
}
.chip.complete { border-color: #b9dfcb; background: var(--likely-bg); color: var(--likely); }
.chip.partial { border-color: #f0dcb4; background: var(--potential-bg); color: var(--potential); }
.chip.missing { border-color: var(--line-2); background: var(--unknown-bg); color: var(--ink-3); }

.tight-list { margin: 4px 0 0; padding-left: 18px; }
.tight-list li { margin: 1px 0; }

/* --- action plan ---------------------------------------------------------- */
.action-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.action-row.done { color: var(--ink-3); }
.action-row.done > div > div:first-child { text-decoration: line-through; }

/* --- notes ---------------------------------------------------------------- */
.note {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.note-body { margin-top: 6px; white-space: pre-wrap; font-size: 13px; line-height: 1.5; }
.note textarea, .note select { width: 100%; }

.steps.compact { margin-bottom: 14px; }
.steps.compact .step { font-size: 12px; }

@media (max-width: 900px) {
  .test-mode-bar { padding: 7px 14px; }
  .test-mode-bar .tiny { display: none; }
  .attention { flex-direction: column; gap: 4px; }
  .attention-name { min-width: 0; }
}
