/* HR module: hiring, onboarding, the documents vault and offboarding (public/js/hr-hiring.js). */

/* Cards and grids of the module */
.hiring-pad { padding: 16px 18px; }
.hiring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; align-items: start; }
.hiring-grid > .wide { grid-column: 1 / -1; }
.hiring-wide { grid-column: 1 / -1; }
.hiring-scroll { overflow-x: auto; }
/* The shell's sticky table heads stick to the page; inside a scrolling box they must not. */
.hiring-scroll table.grid th { position: static; }
.hiring-top { margin-bottom: 14px; }
.hiring-head h1 { font-family: var(--ui-serif); font-size: 26px; margin: 6px 0 0; }
.hiring-head .en { color: var(--ui-muted); font-size: 13px; margin-bottom: 4px; }
.hiring-acts { margin-top: 12px; gap: 6px; }
.hiring-bul { margin: 4px 0 10px; padding-inline-start: 18px; font-size: 13px; line-height: 1.7; }
.hiring-soon { margin-bottom: 12px; }

/* Progress: black into gold on paper */
.hiring-prog { display: inline-block; vertical-align: middle; width: 110px; height: 8px; border-radius: 99px; background: var(--ui-line); overflow: hidden; margin-inline-end: 6px; }
.hiring-prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #26231f, #9a9265); }
.hiring-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hiring-sum .hiring-prog { width: 200px; height: 10px; }
.hiring-sum b { font-family: var(--ui-serif); font-size: 20px; }

/* The candidate board: a black header, a gold count, paper cards */
.hiring-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.hiring-col { background: var(--ui-cream); border: 1px solid var(--ui-line); border-radius: 12px; min-height: 180px; display: flex; flex-direction: column; transition: outline-color .12s; outline: 2px dashed transparent; outline-offset: -3px; }
.hiring-col > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #26231f; color: #f4eedc; border-radius: 11px 11px 0 0; padding: 8px 12px; font-size: 13px; }
.hiring-col > header em { font-style: normal; background: var(--ui-gold); color: #26231f; border-radius: 99px; min-width: 22px; text-align: center; font-size: 11.5px; line-height: 20px; padding: 0 6px; }
.hiring-col.closed { background: #f7f4ec; }
.hiring-col.closed > header { background: #56514a; }
.hiring-col.over { outline-color: var(--ui-gold-2); }
.hiring-cards { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.hiring-card { display: flex; flex-direction: column; gap: 3px; background: #fffdf8; border: 1px solid var(--ui-line); border-radius: 10px; padding: 9px 10px; text-decoration: none; color: inherit; transition: border-color .12s, box-shadow .12s; }
.hiring-card[draggable="true"] { cursor: grab; }
.hiring-card:hover { border-color: var(--ui-gold-2); box-shadow: 0 3px 12px rgba(33, 31, 28, .08); }
.hiring-card.drag { opacity: .45; }
.hiring-card b { font-size: 13.5px; }
.hiring-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 3px; }
.hiring-none { color: var(--ui-muted); text-align: center; padding: 14px 0; font-size: 12px; }

/* The stages a candidate passes through */
.hiring-steps { display: flex; list-style: none; margin: 14px 0 0; padding: 0; gap: 4px; flex-wrap: wrap; counter-reset: st; }
.hiring-steps li { flex: 1; min-width: 86px; text-align: center; font-size: 12px; padding: 6px 4px; border-radius: 8px; background: #fffdf8; border: 1px solid var(--ui-line); color: var(--ui-muted); }
.hiring-steps li.done { background: #efead6; color: #6d6641; border-color: #e0d9bd; }
.hiring-steps li.on { background: #26231f; color: #f4eedc; border-color: #26231f; font-weight: 600; }
.hiring-steps.closed li.on { background: var(--ui-bad-bg); color: var(--ui-bad); border-color: #e1b9b2; }

/* Evaluations */
.hiring-eval { border-bottom: 1px dashed var(--ui-line); padding: 8px 0 10px; }
.hiring-eval:last-child { border-bottom: 0; }
.hiring-eval .row { gap: 6px; }
table.hiring-crit { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
table.hiring-crit td { padding: 3px 0; vertical-align: top; }
table.hiring-crit td:first-child { width: 44%; }
.hiring-dots { color: var(--ui-gold-2); letter-spacing: 2px; font-size: 11px; white-space: nowrap; }
.hiring-dots i { font-style: normal; color: var(--ui-line-2); }

/* Checklists (joiners) and steps (leavers) */
ul.hiring-check { list-style: none; margin: 0; padding: 0; }
ul.hiring-check li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--ui-line); flex-wrap: wrap; }
ul.hiring-check li:last-child { border-bottom: 0; }
ul.hiring-check li .grow { min-width: 220px; }
ul.hiring-check li b { font-size: 13.5px; }
ul.hiring-check li.na b { color: var(--ui-muted); text-decoration: line-through; }
.hiring-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ui-line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: #fff; }
li.done .hiring-tick { background: #26231f; border-color: #26231f; color: var(--ui-gold); }
li.late .hiring-tick { background: var(--ui-bad-bg); border-color: #e1b9b2; color: var(--ui-bad); font-weight: 700; }
li.na .hiring-tick { color: var(--ui-muted); }
.hiring-due { min-width: 110px; color: var(--ui-ink-2); }
li.late .hiring-due { color: var(--ui-bad); font-weight: 600; }
.hiring-iacts { gap: 5px; }

/* The joiners' matrix */
table.hiring-matrix th { white-space: nowrap; }
table.hiring-matrix td.hiring-mx { text-align: center; font-size: 13px; width: 52px; color: var(--ui-muted); }
table.hiring-matrix td.hiring-mx.ok { color: #6d6641; font-weight: 700; }
table.hiring-matrix td.hiring-mx.late { color: var(--ui-bad); font-weight: 700; background: #fbf1ef; }
.hiring-pips { display: inline-flex; gap: 4px; }
.hiring-pips i { width: 12px; height: 12px; border-radius: 50%; background: var(--ui-line); border: 1px solid var(--ui-line-2); }
.hiring-pips i.ok { background: #26231f; border-color: #26231f; }
.hiring-pips i.na { background: repeating-linear-gradient(45deg, #f4eedc, #f4eedc 2px, #e3ded2 2px, #e3ded2 4px); }

/* The facts of an exit */
.hiring-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--ui-line); border: 1px solid var(--ui-line); border-radius: 10px; overflow: hidden; margin: 12px 0 10px; }
.hiring-facts > div { background: #fffdf8; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.hiring-facts span { font-size: 11.5px; color: var(--ui-ink-2); }
.hiring-facts b { font-family: var(--ui-serif); font-size: 18px; }
.hiring-facts i { font-style: normal; font-size: 11px; color: var(--ui-muted); }
.hiring-head .hiring-prog { width: 100%; height: 8px; }

/* The vault */
.hiring-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hiring-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ui-line); background: #fffdf8; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; }
.hiring-chip span { color: var(--ui-ink-2); font-size: 11.5px; }
.hiring-chip.ok { border-color: #cfdcc8; background: var(--ui-ok-bg); }
.hiring-chip.ok span { color: var(--ui-ok); }
.hiring-chip.warn { border-color: #ead9b4; background: var(--ui-warn-bg); }
.hiring-chip.warn span { color: var(--ui-warn); }
.hiring-chip.bad { border-color: #e1b9b2; background: var(--ui-bad-bg); }
.hiring-chip.bad span { color: var(--ui-bad); }
tr.hiring-old td { color: var(--ui-muted); }
.hiring-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 12px; margin-bottom: 8px; }
.hiring-kinds .check { margin-bottom: 6px; font-size: 13px; }

/* The end of service account */
table.hiring-basis th { width: 18%; }
table.hiring-basis td { padding-inline-end: 10px; }
.hiring-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
table.hiring-eos td.num, table.hiring-eos th.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.hiring-eos th { position: static; }
table.hiring-eos tr.hiring-na td { color: var(--ui-muted); }
table.hiring-eos tfoot th { background: #f4eedc; }
.hiring-net { margin: 12px 0 8px; padding: 12px 14px; border-radius: 10px; background: #26231f; color: #f4eedc; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hiring-net b { font-family: var(--ui-serif); font-size: 22px; color: var(--ui-gold); }

/* Dashboard lines */
li.hiring-wl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
li.hiring-wl .hiring-prog { width: 80px; }

@media (max-width: 900px) {
  .hiring-grid { grid-template-columns: 1fr; }
  .hiring-cols { grid-template-columns: 1fr; }
  .hiring-board { grid-auto-columns: minmax(190px, 78vw); }
  table.hiring-basis th { width: auto; }
}
@media print { .hiring-acts, .hiring-iacts { display: none; } }

/* ---------------------------------------------------------------- 2026-10-24: every stage shows, both screens */
/* The board wraps: the five open stages on the first row, hired / rejected / withdrawn under them; on a phone the
   stages stand one under another. Nothing is cut at the card's edge. */
.hiring-board { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-columns: auto; overflow: visible; }
.hiring-col > header b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hiring-count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 99px; background: #efe8d2; color: var(--ui-ink-2); font-size: 11.5px; line-height: 20px; text-align: center; font-family: var(--ui-font); font-weight: 600; vertical-align: middle; margin-inline-start: 6px; }
.hiring-file { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hiring-file .btn { cursor: pointer; }
li.hiring-miss { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-bottom: 1px dashed var(--ui-line); }
li.hiring-miss:last-child { border-bottom: 0; }
li.hiring-wl .hiring-wlm { display: inline-flex; align-items: center; gap: 8px; }
/* A checklist item keeps its actions at the end of its line; on a phone they stand under it as one row. */
ul.hiring-check li .grow { flex: 1 1 260px; }
.hiring-iacts { margin-inline-start: auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .hiring-board { grid-template-columns: minmax(0, 1fr); }
  ul.hiring-check li { gap: 8px 10px; align-items: flex-start; }
  ul.hiring-check li .grow { flex: 1 1 calc(100% - 40px); min-width: 0; }
  .hiring-due { min-width: 0; margin-inline-start: 34px; }
  .hiring-iacts { margin-inline-start: 34px; justify-content: flex-start; flex: 1 1 100%; }
  .hiring-chips { flex-direction: column; }
  .hiring-chip { justify-content: space-between; }
  .hiring-chip b { flex: 1; }
  .hiring-sum .hiring-prog { width: 100%; }
}
@media (max-width: 760px) { .hiring-col { min-height: 0; } .hiring-none { padding: 6px 0; } }

/* ---------------------------------------------------------------- second review, 2026-10-24 */
/* A checklist row: its tick, its words (the due date under them, at one place on every row), its actions at the end,
   wrapping inside their own column rather than dropping the whole row under the words. */
@media (min-width: 761px) {
  ul.hiring-check li { flex-wrap: nowrap; }
  ul.hiring-check li .grow { flex: 1 1 240px; min-width: 0; }
  ul.hiring-check li .hiring-iacts { flex: 0 1 auto; max-width: 62%; }
}
ul.hiring-check li .grow .hiring-due { min-width: 0; margin: 3px 0 0; }
/* On a phone: the action that issues a paper across the row, the two small ones together under it, on every row alike. */
@media (max-width: 760px) {
  ul.hiring-check li .grow .hiring-due { margin-inline-start: 0; }
  .hiring-iacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .hiring-iacts > .btn { width: 100%; justify-content: center; }
  .hiring-iacts > .btn:not(.ghost) { grid-column: 1 / -1; }
  /* The position filter takes the row, like the search under it. */
  .hrm .list-tools > #hg-f { flex: 1 1 100%; }
}
/* The rules: papers and dates side by side, the end of service across the row under them. */
.settings.hiring-rules > .hiring-wide { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- third review, 2026-10-24 */
/* A checklist row's buttons in two groups that each keep together: the papers to issue, then «Done manually ·
   Not applicable». A row with no room for both puts the second group whole on the next line (four buttons wrapped
   three and one, «Not applicable» alone under the others). On a phone the groups melt into the two-column grid. */
.hiring-iacts { row-gap: 6px; }
.hiring-ig { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
@media (max-width: 760px) {
  .hiring-iacts > .hiring-ig { display: contents; }
  .hiring-iacts .btn { width: 100%; justify-content: center; }
  .hiring-iacts .btn:not(.ghost) { grid-column: 1 / -1; }
}
/* «Mark exempt» inside a chip of a missing paper is a button, with its own white face and edge. */
.hiring-chip .btn.ghost { background: #fff; border: 1px solid #d9c9b4; color: var(--ui-ink); }
.hiring-chip.bad .btn.ghost { border-color: #e1b9b2; }
.hiring-chip .btn.ghost:hover { background: #fbf6ee; }
