/* HR: employment records, My employment, cases, surveys and wellbeing. Tokens from app.css only.
   The feel is calm and warm: soft surfaces, generous spacing, plain words about who can see what. */

.hr-gap { margin-top: var(--s3); }
.hr-gap-sm { margin-top: var(--s2); display: inline-block; }
details.hr-gap-sm { display: block; }
.hr-seg { margin-bottom: var(--s5); }
.hr-search { margin-left: auto; min-width: 0; flex: 0 1 260px; }
.hr-search .input { height: 34px; }

/* who can see this */
.hr-who { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 0; margin-inline: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.hr-who .icon { flex: none; margin-top: 2px; color: var(--accent-text); }
.card-foot .hr-who { margin: 0; }

/* key facts */
.hr-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s4) var(--s5); margin-bottom: 0; margin-inline: 0; }
.hr-fact { min-width: 0; }
.hr-fact dt { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.hr-fact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.hr-fact-hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* list rows that are links */
.hr-row-link { display: flex; align-items: center; gap: var(--s3); flex: 1; min-width: 0; color: var(--text); }
.hr-row-link:hover { text-decoration: none; }
.hr-row-link:hover .title { color: var(--accent-text); }
.hr-row-text { display: flex; flex-direction: column; min-width: 0; }
.hr-row-text .title { overflow: hidden; text-overflow: ellipsis; }
.hr-inline-list > li { padding-left: 0; padding-right: 0; min-height: 44px; }

/* lifecycle cards */
.hr-life-grid { align-items: start; }
.hr-life .list > li { min-height: 56px; }
.hr-count { margin-left: auto; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center;
  font: 600 12px/1 var(--font); background: var(--surface-3); color: var(--text-2); }
.hr-note { background: var(--surface-2); }
.hr-note h3 { margin-bottom: var(--s2); }
.hr-note p + p { margin-top: var(--s2); }
.hr-points { margin-bottom: 0; margin-inline: 0; padding-left: 18px; display: grid; gap: 6px; }

/* working pattern week strip */
.hr-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 460px; }
.hr-weekday { display: grid; place-items: center; height: 38px; border-radius: 10px; font: 600 12.5px/1 var(--font); color: var(--faint);
  background: var(--surface-2); border: 1px dashed var(--border-strong); }
.hr-weekday.on { color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--violet) 30%, transparent); }

.hr-days { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hr-days legend { margin-bottom: var(--s2); padding: 0; width: 100%; }
.hr-day { position: relative; cursor: pointer; }
.hr-day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hr-day span { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-strong);
  font: 600 12.5px/1 var(--font); color: var(--text-2); background: var(--surface); }
.hr-day input:checked + span { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.hr-day input:focus-visible + span { box-shadow: var(--focus); }

/* emergency contact, pay */
.hr-contact { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface-2); }
.hr-phone { font: 600 17px/1.4 var(--font); font-variant-numeric: tabular-nums; margin-top: 4px; }
.hr-pay-now { display: flex; flex-direction: column; gap: 2px; }
.hr-pay-amount { font: 700 28px/1.15 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hr-benefits { list-style: none; margin-bottom: 0; margin-inline: 0; padding: 0; display: grid; gap: var(--s2); }
.hr-benefits li { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14px; }
.hr-benefits .icon { flex: none; margin-top: 3px; color: var(--good); }

/* progressive disclosure */
.hr-more > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent-text); padding: 6px 0; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 24px; }
.hr-more > summary::-webkit-details-marker { display: none; }
.hr-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; background: var(--accent-soft); font-size: 13px; }
.hr-more[open] > summary::before { content: "−"; }
.hr-more[open] > summary { margin-bottom: var(--s3); }
.hr-flag { padding-top: var(--s3); border-top: 1px solid var(--border); }

/* adjustments and absence */
.hr-adj.ended > .grow { opacity: .6; }
.hr-absence { align-items: flex-start !important; flex-wrap: wrap; }
.hr-absence > .status { margin-top: 2px; }
.hr-date { width: auto; max-width: 170px; }
.hr-rate { display: inline-block; vertical-align: middle; width: 54px; height: 6px; border-radius: 99px; background: var(--surface-3); margin-right: 8px; overflow: hidden; }
.hr-rate-bar { display: block; height: 100%; border-radius: inherit; background: var(--warn); }

/* invitations to answer a survey */
.hr-invite { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); margin-bottom: var(--s5); border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--violet) 25%, var(--border)); background: var(--accent-soft); color: var(--text); flex-wrap: wrap; }
.hr-invite:hover { text-decoration: none; border-color: var(--violet); }
.hr-invite > .icon { color: var(--accent-text); flex: none; }
.hr-invite > .grow { min-width: 200px; }
.hr-invite.done { background: var(--surface); border-color: var(--border); }
.hr-invite.done > .icon { color: var(--good); }

/* quotes and prose */
.hr-quote { margin-bottom: 0; margin-inline: 0; padding: var(--s3) var(--s4); border-left: 3px solid var(--lavender); background: var(--surface-2); border-radius: 0 var(--r) var(--r) 0;
  white-space: pre-line; line-height: var(--lh); }
.hr-prose { white-space: pre-line; line-height: var(--lh); margin-bottom: 0; margin-inline: 0; overflow-wrap: anywhere; }
.hr-steps { margin-bottom: 0; margin-inline: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.hr-head-status { margin-left: auto; }

/* case stages */
.hr-stages { list-style: none; display: flex; gap: 0; margin: 0 0 var(--s5); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow-x: auto; box-shadow: var(--shadow-1); }
.hr-stages li { display: flex; align-items: center; gap: 8px; flex: 1 0 auto; font-size: 13px; color: var(--muted); padding-right: var(--s3); white-space: nowrap; }
.hr-stages li + li::before { content: ""; width: 22px; height: 1.5px; background: var(--border-strong); margin-right: 4px; flex: none; }
.hr-stage-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; border: 1.5px solid var(--border-strong); background: var(--surface); flex: none; }
.hr-stages li.done { color: var(--text-2); }
.hr-stages li.done .hr-stage-dot { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.hr-stages li.current { color: var(--text); font-weight: 600; }
.hr-stages li.current .hr-stage-dot { border-color: var(--violet); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--violet); }

/* case record timeline */
.hr-timeline { list-style: none; margin: 0; padding: var(--s2) var(--s5) var(--s4); }
.hr-timeline > li { position: relative; display: flex; gap: var(--s3); padding: var(--s3) 0; }
.hr-timeline > li + li::before { content: ""; position: absolute; left: 13px; top: -10px; height: 22px; border-left: 1.5px solid var(--border); }
.hr-tl-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.hr-timeline .meeting .hr-tl-dot { background: var(--accent-soft); color: var(--accent-text); }
.hr-tl-body { flex: 1; min-width: 0; }
.hr-tl-body .hr-prose { margin-top: 4px; }
.hr-tick { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-grid; place-items: center;
  cursor: pointer; color: var(--on-primary); padding: 0; }
.hr-tick.on { background: var(--violet); border-color: var(--violet); }
.hr-tick:focus-visible { box-shadow: var(--focus); outline: none; }
.hr-done .grow { text-decoration: line-through; color: var(--muted); }

/* survey results */
.hr-big { margin-left: auto; font: 700 22px/1 var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hr-q .card-head h2 { font-size: 15px; line-height: 1.4; }
.hr-dist { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.hr-dist-seg { display: grid; place-items: center; font: 600 11.5px/1 var(--font); min-width: 0; overflow: hidden; }
.hr-v1 { background: color-mix(in srgb, var(--danger) 70%, var(--surface)); color: var(--text); }
.hr-v2 { background: color-mix(in srgb, var(--warn) 45%, var(--surface)); color: var(--text); }
.hr-v3 { background: var(--neutral-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.hr-v4 { background: color-mix(in srgb, var(--violet) 40%, var(--surface)); color: var(--text); }
.hr-v5 { background: var(--violet); color: #FFFFFF; }
.hr-legend { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px var(--s4); font-size: 12.5px; color: var(--muted); }
.hr-legend li { display: inline-flex; align-items: center; gap: 6px; }
.hr-key { width: 10px; height: 10px; border-radius: 3px; }
.hr-comments { list-style: none; margin-bottom: 0; margin-inline: 0; padding: 0; display: grid; gap: var(--s2); }
.hr-comments li { padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface-2); line-height: var(--lh); }
.hr-score { font: 700 16px/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

.hr-trend { display: flex; align-items: flex-end; gap: var(--s5); height: 170px; padding: var(--s2) var(--s2) 0; border-bottom: 1px solid var(--border); }
.hr-trend-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; flex: 0 1 90px; min-width: 0; }
.hr-trend-bar { display: block; width: 100%; max-width: 64px; min-height: 4px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--violet), var(--lavender)); }
.hr-trend-val { font: 700 15px/1 var(--font-display); }
.hr-trend-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; margin-bottom: -22px; height: 16px; }
.hr-trend + .table-wrap { margin-top: var(--s8); }

/* answering a survey */
.hr-survey { max-width: 760px; }
.hr-survey > * + * { margin-top: var(--s4); }
.hr-assure { display: flex; gap: var(--s2); align-items: flex-start; margin-bottom: 0; margin-inline: 0; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--accent-soft);
  color: var(--text-2); font-size: 14px; }
.hr-assure .icon { color: var(--accent-text); margin-top: 3px; flex: none; }
.hr-question { padding: 0; margin-left: 0; margin-right: 0; }
.hr-q-text { display: flex; gap: var(--s3); align-items: flex-start; float: left; width: 100%; padding: var(--s4) var(--s5) 0; font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.hr-q-text + .card-body { clear: both; }
.hr-q-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-text);
  font: 700 12.5px/1 var(--font); }
.hr-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.hr-nps { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.hr-opt { position: relative; cursor: pointer; min-width: 0; }
.hr-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hr-opt span { display: grid; place-items: center; text-align: center; min-height: 48px; padding: 6px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text-2); line-height: 1.25; transition: background .12s, border-color .12s; }
.hr-opt:hover span { border-color: var(--violet); }
.hr-opt input:checked + span { background: var(--accent-soft); border-color: var(--violet); color: var(--accent-text); font-weight: 600; }
.hr-opt input:focus-visible + span { box-shadow: var(--focus); }
.hr-nps .hr-opt span { min-height: 40px; padding: 4px 0; font-variant-numeric: tabular-nums; }

/* wellbeing */
.hr-eap { background: linear-gradient(135deg, var(--surface) 0%, var(--surface) 55%, var(--accent-soft) 100%); }
.hr-eap-head { display: flex; gap: var(--s4); align-items: center; margin-bottom: var(--s3); }
.hr-eap-head h2 { font-size: 20px; }
.hr-eap-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.hr-eap-ways { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.hr-eap-way { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); min-width: 0; flex: 1 1 220px; }
.hr-eap-way:hover { text-decoration: none; border-color: var(--violet); }
.hr-eap-way > .icon { color: var(--accent-text); flex: none; }
.hr-eap-way > span { display: flex; flex-direction: column; min-width: 0; }
.hr-aiders { list-style: none; margin: 0; padding: var(--s4) var(--s5); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s4); }
.hr-aiders li { display: flex; gap: var(--s3); align-items: center; min-width: 0; }
.hr-aiders li > span { display: flex; flex-direction: column; min-width: 0; }
.hr-ask { border-color: color-mix(in srgb, var(--violet) 25%, var(--border)); }

@media (max-width: 720px) {
  .hr-scale { grid-template-columns: minmax(0, 1fr); }
  .hr-opt span { min-height: 44px; justify-items: start; padding: 0 var(--s4); text-align: left; }
  .hr-nps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hr-nps .hr-opt span { justify-items: center; padding: 0; }
  .hr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); }
  .hr-search { flex: 1 1 100%; margin-left: 0; }
  .hr-trend { gap: var(--s3); }
  .hr-big { font-size: 18px; }
}
