/* Thogin brand tokens, mirrored from the website's globals.css */
:root {
  --cream: #fbfaf8;
  --navy: #11202e;
  --slate: #4b545d;
  --gray: #717477;
  --light-gray: #a7a8a8;
  --gold: #a18f77;
  --gold-deep: #7a6a52;
  --gold-bright: #c8b89e;
  --hairline: #dadde1;
  --green: #3d7a4f;
  --red: #a04338;

  /* Status-tag accent palette: deliberately more varied/saturated than the
     editorial brand tokens above. Chrome (header, buttons, page background)
     stays on-brand; this set exists only for status pills, score badges,
     and the slot tracker, where the owner wants statuses to read apart at
     a glance rather than blend into a muted, one-note page. */
  --status-red: #d64545;
  --status-orange: #d97b29;
  --status-yellow: #c9a227;
  --status-green: #2f9e56;
  --status-blue: #3b7dd8;
  --status-purple: #8259c9;
  --status-gray: #8b8f93;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--navy);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--gold-deep); }

/* --- Layout --- */
header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--navy);
  color: var(--cream);
}
.topbar .brand { font-weight: 600; letter-spacing: 0.14em; font-size: 17px; }
.topbar .brand span { color: var(--gold-bright); }
.topbar nav { display: flex; gap: 8px; align-items: center; }
.topbar nav button {
  background: none;
  border: none;
  color: var(--light-gray);
  font: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.topbar nav button.active { background: rgba(251, 250, 248, 0.12); color: var(--cream); }
.topbar nav button:hover { color: var(--cream); }

main { max-width: 1060px; margin: 0 auto; padding: 28px 20px 80px; }
h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
h2 { font-size: 17px; font-weight: 600; }
.subtitle { color: var(--slate); margin-bottom: 24px; }

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--gray); font-size: 13px; }
.meta { color: var(--slate); font-size: 13px; margin-top: 2px; }

/* --- Buttons --- */
button.btn {
  font: inherit;
  font-size: 14px;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--cream);
  transition: opacity 0.15s;
}
button.btn:hover { opacity: 0.88; }
button.btn.secondary { background: transparent; color: var(--navy); }
button.btn.gold { background: var(--gold-deep); border-color: var(--gold-deep); }
button.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
button.btn.small { padding: 4px 12px; font-size: 13px; }
button.btn:disabled { opacity: 0.45; cursor: default; }

/* --- Pills / status --- */
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--hairline);
  color: var(--slate);
  background: var(--cream);
}
.pill.new { border-color: var(--status-gray); color: var(--status-gray); }
.pill.active { border-color: var(--status-green); color: var(--status-green); }
.pill.paused { border-color: var(--status-gray); color: var(--status-gray); background: rgba(139, 143, 147, 0.12); }
.pill.shortlisted { border-color: var(--status-blue); color: var(--status-blue); background: rgba(59, 125, 216, 0.08); }
.pill.contacted { border-color: var(--status-purple); color: var(--status-purple); background: rgba(130, 89, 201, 0.08); }
.pill.responded { border-color: var(--status-yellow); color: #8a6d10; background: rgba(201, 162, 39, 0.16); }
.pill.rejected { border-color: var(--status-red); color: var(--status-red); background: rgba(214, 69, 69, 0.08); }
.pill.hired { border-color: var(--status-green); color: #fff; background: var(--status-green); font-weight: 600; }
.pill.completed { border-color: var(--status-blue); color: var(--status-blue); background: rgba(59, 125, 216, 0.08); }
.pill.current_need { border-color: var(--status-orange); color: #fff; background: var(--status-orange); font-weight: 600; }
.pill.future_need { border-color: var(--status-blue); color: var(--status-blue); background: rgba(59, 125, 216, 0.08); }
.pill.on_hold { border-color: var(--status-gray); color: var(--status-gray); background: rgba(139, 143, 147, 0.12); }

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  background: var(--status-gray);
  flex-shrink: 0;
}
.score.high { background: var(--status-green); }
.score.mid { background: var(--status-orange); }
.score.low { background: var(--status-gray); }

/* --- Forms --- */
label.field { display: block; margin-bottom: 12px; font-size: 13px; color: var(--slate); }
input[type="text"], input[type="password"], textarea, select {
  font: inherit;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  margin-top: 4px;
}
textarea { min-height: 74px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }

/* --- Progress --- */
.progress-track { height: 8px; border-radius: 999px; background: var(--hairline); overflow: hidden; margin: 10px 0; }
.progress-fill { height: 100%; background: var(--gold-deep); width: 0%; transition: width 0.4s; }

/* --- Candidate cards --- */
.cand { display: flex; gap: 16px; }
.cand .body { flex: 1; min-width: 0; }
.reasons { margin: 8px 0 0 0; padding-left: 18px; font-size: 13px; color: var(--slate); }
.flags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.flags .pill { border-color: var(--status-orange); color: var(--status-orange); background: rgba(217, 123, 41, 0.08); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.outreach-box {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  font-size: 14px;
  white-space: pre-wrap;
}
.outreach-box h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-deep); margin-bottom: 6px; }
.outreach-box + .outreach-box { margin-top: 8px; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }

.notice {
  background: #fff;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 18px;
}

.error-text { color: var(--red); font-size: 13px; margin-top: 8px; }
.hidden { display: none !important; }

/* --- Login page --- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}
.login-card {
  background: var(--cream);
  border-radius: 22px;
  padding: 40px 36px;
  width: min(380px, 92vw);
  text-align: center;
}
.login-card .brand { font-weight: 600; letter-spacing: 0.14em; font-size: 20px; margin-bottom: 4px; }
.login-card .brand span { color: var(--gold-deep); }
.login-card p { color: var(--slate); font-size: 14px; margin-bottom: 20px; }
.login-card form { text-align: left; }

/* Role editor: full-height left drawer. The CSS reset removes the UA's
   margin:auto centering, so position it deliberately. */
dialog {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  border: none;
  border-radius: 0 18px 18px 0;
  padding: 26px;
  width: min(560px, 94vw);
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(17, 32, 46, 0.35);
}
dialog::backdrop { background: rgba(17, 32, 46, 0.5); }

/* --- Projects / teams / positions --- */
.project-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.project-tabs button.btn { background: transparent; color: var(--navy); }
.project-tabs button.btn.active { background: var(--navy); color: var(--cream); }
.project-tabs button.btn.dashed { border-style: dashed; color: var(--slate); }

.team-section {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  margin-bottom: 14px;
  overflow: hidden;
}
.team-section summary {
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 600;
  font-size: 19px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.team-section summary::-webkit-details-marker { display: none; }
.team-section summary::after { content: "+"; color: var(--gold-deep); font-size: 18px; font-weight: 400; }
.team-section[open] summary::after { content: "\2212"; }
.team-section summary .muted { font-weight: 400; margin-left: 8px; }
.team-section .team-body { padding: 0 22px 18px; }
.team-section .position-card {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.team-section .position-card:last-child { margin-bottom: 0; }

.unassigned-details {
  background: #fff;
  border: 1px dashed var(--hairline);
  border-radius: 18px;
  padding: 4px 22px;
  margin-bottom: 18px;
}
.unassigned-details summary { cursor: pointer; padding: 12px 0; font-weight: 500; color: var(--slate); list-style: none; }
.unassigned-details summary::-webkit-details-marker { display: none; }

.checkbox-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--navy); }
.checkbox-list input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold-deep); margin: 0; }

.stepper {
  display: flex;
  align-items: stretch;
  width: fit-content;
  margin-top: 4px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow: hidden;
}
.stepper-btn {
  width: 36px;
  border: none;
  background: var(--cream);
  color: var(--navy);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}
.stepper-btn:hover { background: var(--hairline); }
.stepper input[type="number"] {
  width: 46px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  border-radius: 0;
  margin: 0;
  padding: 8px 4px;
  -moz-appearance: textfield;
}
.stepper input[type="number"]:focus { outline: none; }
.stepper input[type="number"]::-webkit-inner-spin-button,
.stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.radio-field { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.radio-field input[type="radio"] { width: 15px; height: 15px; accent-color: var(--gold-deep); margin: 0; }

.slot-tracker { display: flex; gap: 4px; margin-top: 8px; max-width: 220px; }
.slot {
  height: 8px;
  flex: 1;
  max-width: 34px;
  border-radius: 999px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  transition: background-color 0.2s, border-color 0.2s;
}
.slot.filled { background: var(--status-green); border-color: var(--status-green); }

.fill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.fill-row:last-child { border-bottom: none; }

/* --- Query review (pre-search approval) --- */
.review-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.review-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-deep);
  margin: 0;
  flex-shrink: 0;
}
.review-row input[type="text"] { margin-top: 0; font-size: 13px; }
.review-row:has(input[type="checkbox"]:not(:checked)) input[type="text"] { opacity: 0.5; }
