/* Hiring app: one small stylesheet, no build step. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1b1f24;
  --muted: #5d6673;
  --line: #e3e6ea;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --good: #1f7a4d;
  --good-bg: #e5f4ec;
  --warn: #8a5a00;
  --warn-bg: #fdf3dc;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }

/* Layout */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; background: linear-gradient(to right, #111827 230px, transparent 230px); }
.sidebar { background: #111827; color: #d1d5db; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.brand { color: #fff; font-weight: 700; font-size: 16px; padding: 0 8px 18px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { color: #d1d5db; padding: 8px 10px; border-radius: 6px; }
.sidebar nav a:hover { background: #1f2937; text-decoration: none; color: #fff; }
.sidebar nav a.active { background: #2f5bea; color: #fff; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; padding: 14px 10px 4px; }
.me { border-top: 1px solid #1f2937; padding: 14px 8px 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.me-name { color: #fff; font-weight: 600; }
.me-role { color: #9ca3af; }
.me a, .me button.link { color: #9ca3af; font-size: 13px; }
.content { padding: 28px 36px; max-width: 1200px; }
.bare { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }

/* Blocks */
.page-head { margin-bottom: 20px; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.back { display: inline-block; font-size: 13px; margin-bottom: 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { width: 100%; max-width: 400px; }
.card.narrow-left { max-width: 560px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile-num { font-size: 28px; font-weight: 700; }
.tile-label { color: var(--muted); font-size: 13px; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table tr.dim td { color: var(--muted); }

/* Badges */
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=url], .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #c7d4fb; border-color: var(--accent); }
.field-check label { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.help ul { margin: 4px 0 0; padding-left: 18px; }
.error, .has-error .help { color: var(--bad); font-size: 13px; margin-top: 4px; }
.form-errors { background: var(--bad-bg); color: var(--bad); border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; }
.form-errors p { margin: 0; }
.actions { display: flex; gap: 10px; margin-top: 8px; }

/* Buttons */
.btn { display: inline-block; padding: 9px 16px; border-radius: 6px; border: 1px solid #cfd4da; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; background: #f3f4f6; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #2549c4; }
.btn-danger { color: var(--bad); border-color: #f2b8b5; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }

/* Messages */
.messages { margin-bottom: 16px; width: 100%; max-width: 1200px; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; background: #eef2ff; }
.msg-success { background: var(--good-bg); color: var(--good); }
.msg-error { background: var(--bad-bg); color: var(--bad); }
.msg-warning { background: var(--warn-bg); color: var(--warn); }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .content { padding: 20px; }
}

/* Module 2: jobs */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.tabs a.active { background: #e8edfd; color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; background: #eef0f3; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.notice { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.notice ul { margin: 6px 0 0; }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice-info { background: #eef2ff; color: #2b3f8f; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.pre { white-space: pre-line; margin-top: 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
ol.questions { margin: 0; padding-left: 22px; }
ol.questions li { margin: 8px 0; }
.table.compact th, .table.compact td { padding: 8px 10px; }
.row-form { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-form:last-of-type { border-bottom: 0; }
.row-form textarea, .row-form input[type=text], .row-form input[type=number] { width: 100%; padding: 8px 10px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; }
.row-form textarea { min-height: 0; resize: vertical; }
.row-num { width: 22px; color: var(--muted); padding-top: 8px; text-align: right; }
.grow { flex: 1; }
.c-name { width: 200px; }
.c-weight { width: 80px; }
.del { font-size: 13px; color: var(--bad); white-space: nowrap; padding-top: 8px; display: flex; gap: 4px; align-items: center; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.field div > div > label, .field ul label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.page-head h1 .badge { vertical-align: middle; font-size: 13px; }
.actions form { margin: 0; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .row-form.criterion { flex-wrap: wrap; } .c-name { width: 100%; } }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 4px; }
.card-head h2 { margin: 0; }

/* Module 3: candidates */
.badge-blue { background: #e8edfd; color: #2b48b8; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filters select, .filters input[type=search] { padding: 8px 10px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; background: #fff; }
.filters input[type=search] { min-width: 240px; }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #eef0f3; color: var(--muted); font-size: 12px; text-align: center; }
.tabs a.active .count { background: #d5defb; color: var(--accent); }
.pipeline { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.pipe-step { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: center; }
.pipe-step.current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pipe-step.current .muted { color: #dbe3ff; }
.pipe-step.pipe-hired.current { background: var(--good); border-color: var(--good); }
.pipe-step.pipe-rejected.current { background: var(--bad); border-color: var(--bad); }
ul.timeline { list-style: none; margin: 0; padding: 0; }
ul.timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); margin-left: 4px; }
ul.timeline .when { display: inline-block; min-width: 150px; color: var(--muted); font-size: 13px; }
.h3 { font-size: 14px; margin: 16px 0 4px; }
.stage-strip { display: flex; gap: 8px; padding: 10px 18px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.stage-count { display: flex; flex-direction: column; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--muted); min-width: 90px; }
.stage-count .n { font-size: 18px; font-weight: 700; color: var(--ink); }
.stage-count:hover { text-decoration: none; border-color: var(--accent); }
.purpose { margin-top: 6px; } .purpose input { font-size: 13px; }

/* Module 4: AI usage */
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.t-bad { color: var(--bad); } .t-warn { color: var(--warn); }
.meter-wrap { margin-bottom: 18px; }
.meter-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.meter { height: 12px; border-radius: 999px; background: #dfe6fc; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.meter-warn { background: #fbe9c3; } .meter-warn .meter-fill { background: #c98a00; }
.meter-bad { background: #f8d4d0; } .meter-bad .meter-fill { background: var(--bad); }
.col-chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--line); }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; outline: none; }
.col-bar { width: 100%; max-width: 24px; min-height: 1px; background: var(--accent); border-radius: 4px 4px 0 0; }
.col:hover .col-bar, .col:focus .col-bar { background: #1d3fae; }
.col .tip { display: none; position: absolute; bottom: calc(100% + 4px); background: #111827; color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; z-index: 2; }
.col:hover .tip, .col:focus .tip { display: block; }
.col-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.price-table input { width: 100%; padding: 6px 8px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; }
.ai-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tile-link { color: inherit; } .tile-link:hover { text-decoration: none; border-color: var(--accent); }
.table th.right, .table td.right { text-align: right; }
.price-table td:first-child { width: 48%; }

/* Module 5: AI interview designer */
.designer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.designer-side { position: sticky; top: 16px; }
.inline-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.designer .field input[type=text], .designer .field input[type=number], .designer .field textarea { width: 100%; padding: 9px 11px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; }
.chat-log { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.bubble { padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.bubble .who { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.bubble.me { background: #e8edfd; align-self: flex-end; max-width: 90%; }
.bubble.ai { background: #f3f4f6; max-width: 95%; }
.bubble.note { font-size: 12px; color: var(--muted); text-align: center; padding: 2px; }
.chat textarea { width: 100%; padding: 9px 11px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
ul.versions { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
ul.versions li { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
ul.versions li:last-child { border-bottom: 0; }
button.link { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 1000px) { .designer-grid { grid-template-columns: 1fr; } .designer-side { position: static; } .inline-fields { grid-template-columns: 1fr; } }

/* Module 7: rounds, remarks, decisions */
.round { padding: 14px 18px; border-top: 1px solid var(--line); }
.round-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.remarks { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.remark { background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.remark-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.remark p { margin: 6px 0 0; }
details.add-remark, #decision details { margin-top: 10px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
details form { margin-top: 10px; max-width: 560px; }
.field ul, .field div[id^=id_] { list-style: none; padding: 0; margin: 0; }
.t-good { color: var(--good); }
.decision-now { font-size: 16px; margin: 0 0 4px; }

/* Module 8: candidate AI interview */
body.take { background: #f4f6fa; }
.take-head { display: flex; gap: 14px; align-items: center; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.take-org { font-weight: 700; flex: 1; }
.take-progress, .take-timer { font-size: 13px; color: var(--muted); }
.take-main { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.take-card { padding: 28px; }
.take-card h1 { margin-bottom: 12px; }
.take-facts { margin: 14px 0 20px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 0 0 16px; padding: 12px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; }
.consent input { margin-top: 4px; }
.chat-window { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cmsg { max-width: 85%; padding: 11px 14px; border-radius: 12px; white-space: pre-line; line-height: 1.5; }
.from-ai { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.from-me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.typing { display: flex; gap: 4px; padding: 14px; }
.typing[hidden] { display: none; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa3af; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.answer-form { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; position: sticky; bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.answer-form textarea { width: 100%; border: 0; resize: vertical; font: inherit; padding: 6px; outline: none; min-height: 80px; }
.answer-bar { display: flex; justify-content: space-between; align-items: center; }
.center { text-align: center; }
/* staff side */
.ai-session { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ai-session:last-of-type { border-bottom: 0; }
.copy-link { display: flex; gap: 8px; margin: 8px 0; }
.copy-link input { flex: 1; padding: 8px 10px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; font-size: 13px; background: #f8f9fb; }
.inline-form { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.inline-form select { padding: 6px 8px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; }
.transcript { display: flex; flex-direction: column; gap: 12px; }
.tline { border-left: 3px solid var(--line); padding-left: 12px; }
.tline-cand { border-left-color: var(--accent); }
.tline-who { font-weight: 600; font-size: 13px; margin-bottom: 2px; }

/* Module 9: AI assessment */
.assess-panel { margin: 10px 0; }
.assessment { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; background: #fcfcfd; }
.assess-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.assess-score .big { font-size: 30px; font-weight: 700; }
.crit-table { margin: 8px 0 12px; }
.nowrap { white-space: nowrap; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #dfe6fc; }
.dot.on { background: var(--accent); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* Module 10: settings, branding */
.logo-preview { max-height: 56px; max-width: 220px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { max-height: 26px; max-width: 60px; border-radius: 4px; background: #fff; padding: 2px; }
.take-org { display: flex; align-items: center; gap: 10px; }
.take-logo { max-height: 30px; max-width: 120px; }
.stage-table input[type=text], .stage-table select { width: 100%; padding: 6px 8px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; }
.stage-table .w-order input { width: 60px; padding: 6px 8px; border: 1px solid #cfd4da; border-radius: 6px; font: inherit; }
.notice-info-card { border-color: #c9d5fb; background: #f6f8ff; }
.table-scroll { overflow-x: auto; } .pipeline-table th { white-space: nowrap; }

/* Module 11: onboarding and probation */
.pad { padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.review-form .field > div[id] { display: flex; gap: 14px; flex-wrap: wrap; }
.review-form .field > div[id] label { font-weight: 400; display: flex; gap: 5px; align-items: center; }
.review-table td, .review-table th { font-size: 13px; }
.stage-table td input[type=text] { width: 100%; }
div.scale { display: flex; gap: 14px; flex-wrap: wrap; } div.scale label { font-weight: 400; display: flex; gap: 5px; align-items: center; }
.badge { white-space: nowrap; }
