/* NEW-106: HR Tuyển dụng (views/hr.js + HR-2 hr_jobs.js / hr_application.js, #/hr…). Tiền tố hr-. Nạp SAU form_view.css / project_kanban.css
   (Kanban hồ sơ dùng lại pk-board / pk-col / pk-card, trang hồ sơ dùng lại fv-* / fc-*) để ghi đè được. Chỉ dùng biến màu của app.css (sáng / tối), dựa trên card / btn / badge / msg / tabs / UI.table sẵn có.
   Mọi khối tự xuống dòng ⇒ không tràn ngang ở 320 px (bảng cuộn trong .table-wrap của UI.table). */
.hr-lead { margin: -4px 0 12px; max-width: 900px; }
.hr-s { font-size: 13px; }
.hr-h2 { font-size: 16px; margin: 0 0 10px; }
.hr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.hr-card { padding: 16px; min-width: 0; }
.hr-card p { margin: 0 0 10px; }
.hr-who { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.hr-links { margin: 12px 0 0; }
.hr-ul { margin: 4px 0 0; padding-left: 20px; }
.hr-ul li { margin: 4px 0; }
.hr-denied { max-width: 640px; }

/* Danh mục */
.hr-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.hr-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.hr-chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.field label.hr-chk { font-size: 14px; color: var(--ink); }
.hr-acts { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.hr-acts .btn, .hr-role .btn { white-space: nowrap; }
.hr-wrap { white-space: normal; min-width: 160px; max-width: 320px; overflow-wrap: anywhere; }
.hr-note { display: block; min-width: 180px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
/* dòng ngừng dùng: nhạt cả dòng, giữ nút bấm đọc rõ */
tr.hr-row-off td { color: var(--muted); background: var(--surface-2); }
tr.hr-row-off td b { font-weight: 600; }
.badge.hr-off-b { border: 1px solid var(--line); }

/* Thành viên HR */
.hr-role { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.hr-role select { min-width: 190px; }
.hr-roles { margin-top: 16px; }
.hr-roles dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0 0 10px; }
.hr-roles dt { font-weight: 600; }
.hr-roles dd { margin: 0; }

/* ======================= HR-2 ======================= */
.hr-code { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge.hr-wd, .badge.hr-done { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.badge.hr-me { background: var(--brand-soft); color: var(--brand-dark); }
.hr-ic { display: inline-flex; align-items: center; color: var(--muted); vertical-align: -2px; }
.hr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hr-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; font-weight: 400; }
.hr-warn-t { color: var(--warn); font-weight: 600; }
.hr-danger { color: var(--err); }
input[type=tel] { border: 1px solid var(--btn-border); border-radius: var(--radius-btn); padding: 5px 10px; min-height: 32px; background: var(--surface); min-width: 0; }
.modal input[type=file] { font: inherit; font-size: 13px; color: var(--ink); max-width: 100%; }

/* Tiến độ "Đã tuyển x / n" */
.hr-prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); min-width: 0; }
.hr-prog-bar { display: block; width: 96px; height: 6px; border-radius: 3px; background: var(--line-2, var(--line)); overflow: hidden; flex: none; }
.hr-prog-bar i { display: block; height: 100%; background: var(--ok); }
.hr-prog b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Tổng quan: Việc của tôi */
.hr-my { margin-bottom: 12px; }
.hr-my-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hr-my-h .hr-h2 { margin: 0; }
.hr-wait { margin: 0 0 10px; }
.hr-myjobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.hr-myjob { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); text-decoration: none; min-width: 0; transition: border-color .12s; }
.hr-myjob:hover { border-color: var(--brand); }
.hr-myjob-t { font-weight: 700; overflow-wrap: anywhere; }
.hr-myjob-m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.hr-myjob-n { font-size: 12.5px; color: var(--muted); }

/* Danh sách vị trí */
.hr-count { margin: 0 0 8px; }
.hr-empty { padding: 28px 16px; }
.hr-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.card.hr-job { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; color: var(--ink); text-decoration: none; min-width: 0; border: 1px solid var(--line);
  transition: border-color .12s; }
.card.hr-job:hover { border-color: var(--brand); }
.card.hr-job:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hr-job-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hr-job-t { font-size: 16px; font-weight: 700; line-height: 22px; overflow-wrap: anywhere; }
.hr-job-ppl { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; }
.hr-stages { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; }
.hr-sc { font-size: 12px; background: var(--surface-2); border-radius: 4px; padding: 1px 7px; line-height: 20px; white-space: nowrap; color: var(--ink); }
.hr-sc b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Trang vị trí: đầu trang + Kanban */
.hr-jhead { margin: 8px 0 16px; }
.hr-jhead-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-right: 16px; }
.hr-jhead-top .fv-acts { padding-top: 16px; }
.hr-jtitle { min-width: 0; flex: 1 1 320px; }
.hr-jnote { margin: 0 24px 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
.hr-jmsg { margin: 0 24px 16px; }
/* menu ⋯ neo theo cả hàng nút (không theo nút ⋯) ⇒ không tràn mép màn: đầu trang vị trí mở về bên trái, trang hồ sơ mở về bên phải */
.hr-jhead .fv-acts, .hr-rec .fv-acts { position: relative; }
.hr-jhead .fv-more, .hr-rec .fv-more { position: static; }
.hr-jhead .fv-more-pop { left: auto; right: 0; }
.fv-more-pop { max-width: calc(100vw - 24px); }
.hr-jhead .fv-fields { padding-bottom: 12px; }
.hr-bhead { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin: 0 0 8px; }
.hr-bhead .hr-h2 { margin: 0; }
.pk-board.hr-board { padding-bottom: 14px; }
.pk-board.hr-board:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pk-board.hr-board .pk-col { flex: 0 0 252px; width: 252px; min-height: 160px; background: var(--surface-2); padding: 8px; }
.pk-board.hr-board .pk-col.over { background: var(--brand-soft); }
.pk-board.hr-board .pk-head { padding: 0 2px 2px; }
.pk-board.hr-board .pk-t h3 { font-size: 14px; }
.hr-kcard .pk-bot { margin-top: 6px; }
.hr-kcard.hr-moving { opacity: .6; }
.hr-days { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
select.hr-move { position: relative; z-index: 1; display: block; width: 100%; margin-top: 8px; min-height: 28px; padding: 2px 8px; font-size: 12.5px; color: var(--muted);
  background-color: var(--surface-2); border-color: transparent; cursor: pointer; }
select.hr-move:hover { border-color: var(--btn-border); }
select.hr-move:hover, select.hr-move:focus { color: var(--ink); }
.hr-closed { margin: 4px 0 16px; }
.hr-closed > .btn { margin-bottom: 8px; }
.hr-closed p { margin: 0 0 8px; }

/* Trang hồ sơ */
.hr-rec .fv-sbar.hr-sbar { margin-bottom: 6px; }
.hr-days-b { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hr-stbwrap { margin: 0 0 8px; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; padding-bottom: 2px; }
.hr-stbwrap .fv-stb { margin-left: 0; width: max-content; max-width: none; }
.hr-stbnote { margin: -2px 0 8px; }
.hr-joblink { font-size: 13px; color: var(--brand); text-decoration: none; overflow-wrap: anywhere; }
.hr-joblink:hover { text-decoration: underline; }
.hr-outbox { margin: 12px 24px 0; }
.hr-sec { padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 14px; }
.hr-sec:last-child { padding-bottom: 16px; }
.hr-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 24px; }
.hr-sec-h .hr-h2 { margin: 0; font-size: 15px; }
.hr-sec .fv-fields { padding-top: 6px; }
.hr-sec .fv-v, .hr-jhead .fv-v { white-space: normal; flex-wrap: wrap; overflow-wrap: anywhere; }
.hr-sec-p { margin: 6px 24px 0; }
.hr-upbtn { position: relative; cursor: pointer; }
.hr-upbtn:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.hr-upbtn.busy { opacity: .6; pointer-events: none; }
.hr-files { list-style: none; margin: 8px 24px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hr-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-btn); flex-wrap: wrap; }
.hr-file-ic { color: var(--muted); display: inline-flex; }
.hr-file-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; }
.hr-file-t b { font-weight: 600; overflow-wrap: anywhere; }
.hr-file-a { display: flex; gap: 6px; flex-wrap: wrap; }
.hr-file-a .btn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.hr-preview { margin: 10px 24px 0; border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; background: var(--surface-2); }
.hr-preview[hidden] { display: none; }
.hr-preview-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface);
  font-size: 13px; flex-wrap: wrap; }
.hr-preview-h b { overflow-wrap: anywhere; min-width: 0; }
.hr-pdf { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: var(--surface); }
.hr-img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.hr-others { list-style: none; margin: 8px 24px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.hr-others a { color: var(--brand); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.hr-others a:hover { text-decoration: underline; }
/* chatter */
.hr-compose { padding: 12px 16px 8px; border-bottom: 1px solid var(--line-2, var(--line)); }
.hr-compose textarea { width: 100%; resize: vertical; min-height: 72px; }
.hr-compose-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.hr-compose-f .btn { margin-left: auto; }
.hr-compose > p { margin: 6px 0 0; }
.hr-kbd { font-size: 11.5px; }
.hr-fc-empty { padding: 4px 16px 16px; }
.badge.hr-int { background: var(--warn-soft); color: var(--warn); font-size: 11px; padding: 0 7px; }
.fc-note.hr-int-note { background: var(--warn-soft); }
.hr-sys .fc-trk b { font-weight: 600; }

/* Thêm hồ sơ */
.hr-addjob { margin: 0 0 12px; }
.hr-fs { border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
.hr-fs legend { font-weight: 700; font-size: 14px; padding: 0; margin: 0 0 8px; }
.hr-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.hr-hint { margin: -6px 0 12px; }
.hr-consent { margin: 0 0 14px; align-items: flex-start; }
.hr-consent input { margin-top: 2px; flex: none; }
.hr-person-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px; }
.hr-dup { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; color: var(--ink); }
.hr-dup-h { margin: 0 0 8px; }
.hr-dup-p { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 8px 10px; margin-bottom: 8px; }
.hr-dup-who { display: flex; flex-direction: column; margin-bottom: 4px; overflow-wrap: anywhere; }
.hr-dup-apps { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; }
.hr-dup-new { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

@media (max-width: 760px) {
  .hr-jhead-top { padding: 0 12px 0 0; }
  .hr-jhead-top .fv-acts { padding: 0 0 0 14px; width: 100%; }
  .hr-jhead .fv-more-pop { left: 14px; right: auto; }
  .hr-jnote, .hr-jmsg, .hr-outbox, .hr-sec-p, .hr-files, .hr-preview, .hr-others { margin-left: 14px; margin-right: 14px; }
  .hr-sec-h { padding: 0 14px; }
  .hr-2col, .hr-person-row { grid-template-columns: minmax(0, 1fr); }
  .hr-days-b { margin-left: 0; }
  .hr-pdf { height: 55vh; }
}
@media (max-width: 600px) {
  .pk-board.hr-board .pk-col { flex-basis: calc(100vw - 80px); width: calc(100vw - 80px); max-width: 300px; }
}
@media (max-width: 760px) {
  .hr-roles dl { grid-template-columns: 1fr; gap: 2px; }
  .hr-roles dd { margin-bottom: 8px; }
  .hr-note { min-width: 140px; }
}
/* màn cảm ứng: vùng bấm ≥ 44 px cho nút trong bảng + ô tick */
@media (pointer: coarse) {
  .hr-acts .btn, .hr-role .btn, .hr-role select { min-height: 44px; }
  .hr-chk { min-height: 44px; }
  select.hr-move, .hr-file-a .btn, .hr-sec-h .btn, .hr-closed > .btn, .hr-my-h .btn, .hr-dup .btn, .hr-preview-h .btn,
  .hr-stbwrap .fv-stb, .hr-compose-f .btn, .hr-jhead .fv-acts .btn, .hr-rec .fv-acts .btn { min-height: 44px; }
  .hr-stbwrap .fv-stb .path-step { line-height: 42px; }
  .hr-others a, .hr-joblink, .hr-jhead .fv-v a { display: inline-block; padding: 10px 0; }
}

/* ======================= HR-3: phỏng vấn, phiếu đánh giá, mail, lịch, check-in, mẫu mail ======================= */
.hr-h3 { font-size: 14px; margin: 12px 0 8px; }
.hr-lbl { font-size: 13px; color: var(--muted); }
.hr-3col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 12px; }
input[type=time] { border: 1px solid var(--btn-border); border-radius: var(--radius-btn); padding: 5px 10px; min-height: 32px; background: var(--surface); color: var(--ink);
  font: inherit; min-width: 0; }   /* app.css chưa có kiểu cho ô giờ (Hẹn phỏng vấn) */
.hr-testbar { margin: 0; }
.hr-testmode { margin: 0 0 12px; }
.hr-jobtext { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.badge.hr-mail-b { display: inline-flex; align-items: center; gap: 3px; background: var(--brand-soft); color: var(--brand-dark); font-size: 11px; padding: 0 7px; }
.fc-note.hr-mail-note { background: var(--surface-2); border: 1px solid var(--line-2, var(--line)); }

/* Tổng quan: Phỏng vấn của tôi */
.hr-myivs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-bottom: 4px; }
.hr-myiv { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); text-decoration: none; min-width: 0; transition: border-color .12s; }
.hr-myiv:hover { border-color: var(--brand); }
.hr-myiv:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hr-myiv.hr-myiv-need { border-color: var(--warn); background: var(--warn-soft); }
.hr-myiv-t { font-weight: 700; overflow-wrap: anywhere; }
.hr-myiv-m { font-size: 12.5px; color: var(--muted); }
.hr-myiv-cta { font-size: 12.5px; font-weight: 600; color: var(--brand); }

/* Trang hồ sơ: mục Phỏng vấn */
.hr-ivs { display: flex; flex-direction: column; gap: 10px; margin: 8px 24px 0; }
.hr-iv { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); min-width: 0; }
.hr-iv.hr-iv-mine { border-color: var(--brand); }
.hr-iv.hr-iv-off { background: var(--surface-2); }
.hr-iv.hr-iv-off .hr-iv-m { text-decoration: line-through; text-decoration-color: var(--muted); }
.hr-iv-h { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.hr-iv-r { font-size: 14px; }
.hr-iv-avg { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hr-iv-avg b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.hr-iv-m { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.hr-iv-when { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.hr-iv-when .ic { color: var(--muted); }
.hr-iv-note { color: var(--muted); }
.hr-iv-none { margin: 8px 0 0; }
.hr-panel { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line-2, var(--line)); }
.hr-pv { padding: 6px 0; border-bottom: 1px solid var(--line-2, var(--line)); min-width: 0; }
.hr-pv:last-child { border-bottom: 0; }
.hr-pv-h { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 13.5px; }
.hr-pv-n { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; margin-right: auto; overflow-wrap: anywhere; min-width: 0; }
.hr-ok-ic { color: var(--ok); display: inline-flex; }
.hr-score { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr-score b { font-size: 15px; color: var(--ink); }
.hr-pv-c { margin-top: 2px; color: var(--ink); }
.hr-sc-lock { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; }
.hr-iv-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hr-iv-a[hidden] { display: none; }
/* phiếu đánh giá */
.hr-scf { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--surface); }
.hr-scf .field { margin-bottom: 10px; }
.hr-scf textarea { width: 100%; resize: vertical; }
.hr-stars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.hr-star, .hr-seg-b { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--btn-border); border-radius: var(--radius-btn); cursor: pointer;
  transition: border-color .1s, background .1s; }
.hr-star { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 52px; padding: 4px 2px; min-width: 0; }
.hr-star b { font-size: 18px; line-height: 22px; }
.hr-star small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hr-star:hover, .hr-seg-b:hover { border-color: var(--brand); background: var(--hover); }
.hr-star:focus-visible, .hr-seg-b:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hr-star.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.hr-star.on small { color: var(--on-brand); }
.hr-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hr-seg-b { min-height: 40px; padding: 6px 8px; font-weight: 600; }
.hr-seg-b.on.hr-rec-pass { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.hr-seg-b.on.hr-rec-consider { background: var(--warn-soft); border-color: var(--warn); color: var(--ink); box-shadow: inset 0 0 0 1px var(--warn); }
.hr-seg-b.on.hr-rec-fail { background: var(--err); border-color: var(--err); color: var(--on-err); }
.hr-scf-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ô chọn nhiều người phỏng vấn */
.hr-pp { display: flex; flex-direction: column; gap: 6px; }
.hr-pp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hr-pp-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; }
.hr-pp-chip > span:first-child { overflow-wrap: anywhere; }
.hr-pp-chip .muted { padding-right: 6px; }
.hr-pp-x { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.hr-pp-x:hover { background: var(--surface); }
.hr-pp-x:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.hr-pp-none { padding: 2px 0; }
.hr-pp-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-pp-f .btn[hidden], .hr-pp [data-pp-find][hidden] { display: none; }

/* hộp Gửi mail */
.hr-mail-to { margin: 0 0 10px; overflow-wrap: anywhere; }
textarea.hr-mail-body { width: 100%; min-height: 220px; resize: vertical; font-size: 14px; line-height: 1.5; }
.hr-ics { display: flex; align-items: center; gap: 4px; margin: -4px 0 10px; }
.hr-notify { margin: 0 0 4px; align-items: flex-start; }
.hr-notify input { margin-top: 2px; flex: none; }
.hr-notify[hidden], .hr-ics[hidden], .modal .field[hidden] { display: none; }   /* .field / .hr-chk đặt display ⇒ thắng thuộc tính hidden */

/* Lịch phỏng vấn (tuần) — mặc định danh sách theo ngày (điện thoại / máy tính bảng), ≥ 1100 px: 7 cột */
.hr-cal-bar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 12px; }
.hr-cal-nav { display: inline-flex; gap: 4px; }
.hr-cal-range { margin: 0; font-variant-numeric: tabular-nums; }
.hr-cal-empty { margin-bottom: 12px; }
.hr-cal-empty p { margin: 6px 0 0; }
.hr-cal-none { display: none; }
.hr-cal { display: flex; flex-direction: column; gap: 10px; }
.hr-cal-d { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-width: 0; }
.hr-cal-d.empty:not(.today) { display: none; }
.hr-cal-d.today { border-color: var(--brand); }
.hr-cal-dh { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13.5px; }
.hr-cal-wd { display: none; }
.hr-cal-dn { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.hr-cal-free { margin: 0; }
.hr-cal-it { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; margin-top: 6px; border: 1px solid var(--line);
  border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13px; min-width: 0; transition: border-color .12s; }
.hr-cal-it:hover { border-color: var(--brand); }
.hr-cal-it:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hr-cal-it.mine { border-color: var(--brand); background: var(--brand-soft); }
.hr-cal-it.off { opacity: .7; }
.hr-cal-it.off .hr-cal-t, .hr-cal-it.off .hr-cal-n { text-decoration: line-through; }
.hr-cal-t { font-weight: 700; font-variant-numeric: tabular-nums; }
.hr-cal-n { font-weight: 600; overflow-wrap: anywhere; }
.hr-cal-j, .hr-cal-m, .hr-cal-p { color: var(--muted); overflow-wrap: anywhere; }
.hr-cal-it.mine .hr-cal-j, .hr-cal-it.mine .hr-cal-m, .hr-cal-it.mine .hr-cal-p { color: var(--ink); }
.hr-cal-b { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.hr-cal-b:empty { display: none; }
@media (min-width: 1100px) {
  .hr-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
  .hr-cal-d, .hr-cal-d.empty:not(.today) { display: block; min-height: 180px; padding: 6px; }
  .hr-cal-d.wkend { background: var(--surface-2); }
  .hr-cal-dh { flex-wrap: wrap; gap: 2px 6px; }
  .hr-cal-wdl { display: none; }
  .hr-cal-wd { display: inline; }
  .hr-cal-it { padding: 6px 7px; font-size: 12.5px; }
  .hr-cal-free { font-size: 12px; }
}

/* Check-in lễ tân — chạm lớn cho máy tính bảng */
.hr-ck-day { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin: -4px 0 4px; font-size: 15px; }
.hr-ck-day p { margin: 0; }
.hr-ck-sum { margin: 0 0 8px; }
.hr-ck { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hr-ck-it { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); }
.hr-ck-it.in { border-color: var(--ok); background: var(--ok-soft); }
.hr-ck-time { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hr-ck-time b { font-size: 24px; line-height: 28px; font-variant-numeric: tabular-nums; }
.hr-ck-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hr-ck-n { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.hr-ck-j { font-size: 14px; overflow-wrap: anywhere; }
.hr-ck-st { margin-top: 2px; }
.hr-ck-a { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.btn.hr-ck-btn { min-height: 56px; padding: 10px 22px; font-size: 16px; }
.hr-ck-done { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-text); font-weight: 700; white-space: nowrap; }

/* Mẫu mail */
.hr-tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 12px; align-items: start; }
.hr-tpls { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.hr-tpl { padding: 14px 16px; min-width: 0; }
.hr-tpl-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hr-tpl-h .hr-h2 { margin: 0; }
.hr-tpl > p { margin: 4px 0 8px; }
.hr-tpl-s { overflow-wrap: anywhere; }
.hr-tpl-b { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.hr-vars { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 10px; margin: 0 0 10px; font-size: 13px; }
.hr-vars dt { margin: 0; }
.hr-vars dd { margin: 0; color: var(--muted); }
.hr-vars code, .hr-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hr-vars code { background: var(--surface-2); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.hr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.hr-tpl-pv summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.hr-paper { background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.hr-paper-s { font-weight: 700; margin: 0 0 8px; overflow-wrap: anywhere; }
.hr-paper-b { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .hr-tpl-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hr-ivs { margin-left: 14px; margin-right: 14px; }
  .hr-3col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hr-3col > .field:first-child { grid-column: 1 / -1; }
  .hr-ck-it { grid-template-columns: 64px minmax(0, 1fr); padding: 12px; }
  .hr-ck-time b { font-size: 20px; }
  .hr-ck-a { grid-column: 1 / -1; align-items: stretch; }
  .hr-ck-a .btn { width: 100%; }
  .hr-ck-done { justify-content: center; }
}
@media (max-width: 400px) {
  .hr-star small { display: none; }
  .hr-star { min-height: 48px; }
}
@media (pointer: coarse) {
  .hr-iv-a .btn, .hr-scf-f .btn, .hr-pp-f .btn, .hr-ck-day .btn, .hr-cal-nav .btn, .hr-tpl-h .btn, .hr-chips .btn { min-height: 44px; }
  .hr-seg-b { min-height: 48px; }
  .hr-pp-x { width: 36px; height: 36px; }
  .hr-ck-a .btn.small { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .hr-myiv, .hr-cal-it, .hr-star, .hr-seg-b { transition: none; }
}
