/* Styles that belong to one page. */

/* ---------- sign in ---------- */

.login { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 56px 56px;
  color: #fff;
  /* Brand azure, with the arc pattern from the identity guide. It deepens towards the
     bottom so the white text there stays readable. */
  background:
    url("/assets/pattern-arcs.svg") 0 0 / 320px,
    linear-gradient(165deg, var(--azure) 35%, var(--azure-strong) 100%);
}
/* The approved all-white logo for use on azure. */
.login-brand img { width: 176px; height: auto; filter: brightness(0) invert(1); }
.login-pitch { max-width: 520px; }
.login-pitch h1 { font-size: 40px; line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
.login-pitch p { margin-top: 16px; font-size: 19px; font-weight: 500; line-height: 1.45; }

.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: min(380px, 100%); }
.login-mark { height: 56px; width: auto; margin-bottom: 22px; }
.login-form h2 { font-size: 28px; line-height: 1.2; }
.login-form > .muted { margin-top: 2px; }
.login-form .form-stack { margin-top: 26px; }
.login-form .notice { margin: 20px 0 0; }
.login-form .btn-block { margin-top: 22px; height: 44px; font-size: 16px; }

@media (max-width: 820px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-brand { padding: 28px 24px; gap: 28px; }
  .login-pitch h1 { font-size: 26px; }
  .login-pitch p { font-size: 16px; margin-top: 8px; }
  .login-panel { place-items: start center; padding-top: 32px; }
}

/* ---------- dashboard ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--leaf-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.stat:hover { border-color: var(--azure-40); text-decoration: none; }
/* A quarter circle tucked into the leaf corner. */
.stat::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54px;
  height: 54px;
  border-radius: 100% 0 0 0;
  background: var(--azure-10);
}
.stat-turquoise::after { background: var(--turquoise-20); }
.stat-amber::after { background: var(--warn-bg); }
.stat-violet::after { background: var(--violet-bg); }
.stat-label { font-weight: 500; color: var(--ink-2); }
.stat-value { font-size: 36px; font-weight: 600; line-height: 1.15; }
.stat-note { position: relative; z-index: 1; font-size: 13.5px; color: var(--ink-3); padding-right: 40px; }

.welcome { display: grid; grid-template-columns: minmax(0, 1fr) 240px; overflow: hidden; border-radius: var(--leaf-lg); }
.welcome-text { padding: 36px 36px 40px; }
.welcome-text h2 { font-size: 24px; }
.welcome-text p { margin: 10px 0 22px; max-width: 560px; color: var(--ink-2); font-size: 16px; }
.welcome-art { background: var(--azure) url("/assets/pattern-arcs.svg") 0 0 / 240px; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 28px; align-items: center; gap: 12px; }
.bars-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars-value { text-align: right; font-weight: 600; }

@media (max-width: 1080px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .stats { gap: 10px; }
  .stat { padding: 14px 14px 16px; }
  .stat-value { font-size: 28px; }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome-art { height: 72px; }
  .welcome-text { padding: 24px 20px; }
  .rows > li { flex-wrap: wrap; }
}

/* One column of cards, for when the parts that fill the wide column are switched off. */
.narrow-col { max-width: 640px; }

/* ---------- employee and project pages ---------- */

.profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 18px; }
.profile-main { flex: 1; min-width: 240px; }
.profile-main .badges { margin-top: 10px; }
.profile-desc { margin-top: 12px; max-width: 760px; color: var(--ink-2); white-space: pre-line; }
.load-summary { display: flex; align-items: center; gap: 12px; }
.pre { white-space: pre-line; }

.balances { display: flex; flex-direction: column; gap: 16px; }
.balance-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.balance-name { font-weight: 600; }
.balance-left { color: var(--ink-2); }
.balance-left.over, .balance-figure.over { color: var(--bad-ink); font-weight: 600; }
.balances .subtle { margin-top: 4px; }
.balance-figure { font-size: 17px; font-weight: 600; }
.th-note { font-weight: 500; letter-spacing: 0; text-transform: none; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.card-grid .card { margin-top: 0; }
.project-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; color: var(--ink); border-radius: 12px 12px 32px 12px; }
.project-card:hover { border-color: var(--azure-40); text-decoration: none; }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-top h2 { overflow-wrap: anywhere; }
.project-top .badges { flex: none; }
.project-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink-2);
}
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }

/* ---------- leave calendar ---------- */

.cal-title { min-width: 168px; text-align: center; font-size: 18px; }
.legend { display: flex; gap: 8px; }
.cal-card { overflow: hidden; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-names span {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 108px;
  padding: 7px 8px 8px;
  background: var(--surface);
  min-width: 0;
}
.cal-day.off { background: #fafbfc; }
.cal-day.outside .cal-date { color: var(--gray-300); }
.cal-date {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cal-day.today .cal-date { background: var(--azure-strong); color: #fff; }
.cal-holiday {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--violet-ink);
}
.cal-chip {
  display: inline-block;
  max-width: 100%;
  padding: 1px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--turquoise-20);
  color: var(--turquoise-deep);
  font-size: 13px;
  font-weight: 600;
}
a.cal-chip:hover { text-decoration: none; background: var(--turquoise-40); }
.cal-chip.pending { background: var(--surface); border: 1px dashed #d9a441; color: var(--warn-ink); }
.cal-more { font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 760px) {
  .cal-day { min-height: 72px; padding: 4px; }
  .cal-chip { padding: 0 4px; font-size: 11.5px; }
  .cal-names span { padding: 8px 4px; }
}

/* ---------- recruitment ---------- */

.job-figures { display: flex; gap: 22px; margin-top: 10px; }
.job-figures dt { font-size: 12.5px; color: var(--ink-3); }
.job-figures dd { font-size: 22px; font-weight: 600; line-height: 1.2; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.steps li { display: flex; gap: 12px; }
.steps p { margin-top: 3px; color: var(--ink-2); }
.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px 8px 16px 8px;
  background: var(--azure-10);
  color: var(--azure-deep);
  font-weight: 700;
}
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.progress { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
.progress .meter { width: 120px; }
.progress .meter > span { background: var(--turquoise); }

.panes {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr); /* lets each pane scroll inside the fixed height */
  height: calc(100vh - 262px);
  min-height: 460px;
  overflow: hidden;
}
.cand-list { overflow-y: auto; border-right: 1px solid var(--line); }
.cand-empty { padding: 28px 18px; color: var(--ink-2); text-align: center; }
.cand-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.cand-row:hover { background: var(--bg); }
.cand-row[aria-current="true"] { background: var(--azure-10); box-shadow: inset 3px 0 0 var(--azure); }
.cand-row:focus-visible { outline-offset: -3px; }
.cand-rank { color: var(--ink-3); text-align: right; }
.cand-main { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cand-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-sub { font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dec-shortlist { color: var(--ok-ink); font-weight: 600; }
.dec-reject { color: var(--bad-ink); font-weight: 600; }

.score-chip {
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 6px 6px 12px 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.score-chip.good, .score-box.good { background: var(--ok-bg); color: var(--ok-ink); }
.score-chip.mid, .score-box.mid { background: var(--warn-bg); color: var(--warn-ink); }
.score-chip.low, .score-chip.fail, .score-box.low { background: var(--bad-bg); color: var(--bad-ink); }
.score-chip.wait { background: var(--neutral-bg); color: var(--neutral-ink); }

.cand-detail { overflow-y: auto; padding: 22px 26px 30px; }
.cand-detail h2 { font-size: 22px; }
.cand-head { display: flex; justify-content: space-between; gap: 16px; }
.cand-head .muted { margin-top: 2px; }
.contact { margin-top: 4px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.score-box {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 14px 10px;
  border-radius: 10px 10px 28px 10px;
}
.score-num { font-size: 30px; font-weight: 700; line-height: 1.1; }
.score-cap { font-size: 12.5px; font-weight: 500; }

.cand-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.cand-actions .spacer { flex: 1; }
.act[aria-pressed="true"][data-act="shortlist"] { background: var(--ok-bg); border-color: #9cc24f; color: var(--ok-ink); }
.act[aria-pressed="true"][data-act="reject"] { background: var(--bad-bg); border-color: #e0a1a1; color: var(--bad-ink); }
.cand-detail .notice { margin: 0 0 14px; font-size: 14.5px; }
.cand-summary { font-size: 16px; line-height: 1.55; margin-bottom: 14px; }
.cand-section { margin-top: 22px; }
.cand-section h3 {
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crit { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.crit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.crit-label { font-weight: 600; }
.crit-tag { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.crit-tag.missed { color: var(--bad-ink); font-weight: 600; }
.crit-score { font-weight: 700; }
.evidence { margin-top: 6px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.cand-note { margin-top: 24px; }
.cand-hint { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
kbd {
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg);
  font: inherit;
  font-size: 12px;
}

.jd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.criteria-rows { margin-top: 14px; }
.c-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 84px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.c-row.c-head { border-top: 0; padding: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }

/* Narrow screens: one column, and the page scrolls instead of the panes. */
@media (max-width: 860px) {
  .panes { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; overflow: visible; }
  .cand-list { max-height: 44vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .cand-detail { overflow: visible; padding: 18px 16px 24px; }
  .c-row { grid-template-columns: minmax(0, 1fr) 124px 68px; }
}

/* ---------- settings ---------- */

.module-list { display: flex; flex-direction: column; gap: 10px; }
.module {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
}
.module:hover { border-color: var(--azure-40); }
.module:has(input:checked) { border-color: var(--azure-40); background: var(--azure-05); }
.module input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--azure-strong); }
.module-text { display: flex; flex-direction: column; gap: 2px; }
.module-name { font-weight: 600; }
.module-desc { color: var(--ink-2); font-size: 14.5px; }

.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.inline-form .field { flex: 1 1 180px; }
.narrow { max-width: 480px; }
.card-head .select { width: auto; }

/* ---------- recruitment: screening round ---------- */

/* These tiles only report; they don't lead anywhere. */
.stat-plain:hover { border-color: var(--line); }
.save-state { min-width: 110px; text-align: right; }

.sheet th, .sheet td { padding: 10px 12px; }
.sheet th:first-child, .sheet td:first-child { padding-left: 18px; }
/* The candidate stays in view while the columns scroll sideways. */
.sheet .sheet-name {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 230px;
  max-width: 300px;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}
.sheet-who { display: flex; gap: 10px; align-items: flex-start; }
.sheet-rank { min-width: 18px; padding-top: 1px; color: var(--ink-3); font-weight: 600; }
.sheet-resume { font-size: 13.5px; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.sheet-actions .btn { height: 26px; padding: 0 8px; font-size: 13.5px; }
.sheet-note { overflow-wrap: anywhere; }
.sheet tr.is-rejected .person-name { color: var(--ink-3); text-decoration: line-through; }
.sheet tr.is-rejected .cell-input { background: var(--bg); color: var(--ink-2); }
.col-head { display: inline-flex; align-items: center; gap: 2px; }
.col-head .icon-btn { width: 26px; height: 26px; color: var(--gray-400); }
.col-head .icon-btn:hover { color: var(--azure-strong); }
.sheet td.cell { padding-top: 7px; padding-bottom: 7px; }
.sheet .cell-input { height: 36px; }
.sheet .cell-text { min-width: 190px; }
.sheet .cell-number { width: 120px; }
.sheet .cell-date { width: 160px; }
.sheet .cell-choice { min-width: 150px; }
.cell-marks { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cell-marks .cell-input { width: 76px; }
.sheet .empty { padding: 28px 20px; }

@media (max-width: 900px) {
  .sheet .sheet-name { position: static; min-width: 190px; box-shadow: none; }
}
