.modal-overlay.hr-modal-overlay { box-sizing: border-box; align-items: stretch; padding: 6px; }
.modal.hr-modal { position: relative; display: grid; grid-template-columns: clamp(168px, 14vw, 192px) minmax(0, 1fr); width: 100%; max-width: none; height: calc(100dvh - 12px); max-height: none; margin: auto; padding: 0; overflow: hidden; border-radius: 16px; }
.hr-header, .hr-stats, .hr-batchbar { flex: 0 0 auto; }
.hr-header { min-height: 66px; border-bottom: 1px solid #dbe2ef; }
.hr-header h3 { margin: 0; font-size: 18px; letter-spacing: 0; }
.hr-message { min-height: 18px; margin-top: 3px; color: #667085; font-size: 12px; }
.hr-message.is-error { color: #b42318; }
.hr-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid #dbe2ef; background: #f9fafb; }
.hr-stats span { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 9px; border-right: 1px solid #eaecf0; color: #667085; font-size: 12px; }
.hr-stats strong { color: #101828; font-size: 18px; }
.hr-accounts { flex: 0 0 auto; max-height: min(220px, 25dvh); overflow: auto; padding: 8px 14px; border-bottom: 1px solid #dbe2ef; background: #f8fafc; }
.hr-accounts summary { cursor: pointer; font-weight: 700; color: #112d4e; }
.hr-accounts p { margin: 6px 0; color: #475467; font-size: 12px; }
.hr-accounts table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hr-accounts th, .hr-accounts td { padding: 6px 9px; border-bottom: 1px solid #dbe2ef; text-align: left; }
.hr-accounts small { color: #667085; overflow-wrap: anywhere; }
.hr-account-pager { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 8px; background: white; border-top: 1px solid #dbe2ef; }
/* The account list occupies the remaining space in the standalone upload view. */
.modal:has(#calUploadPanel) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  max-height: calc(100% - 24px);
  overflow: hidden;
}
.modal-body:has(#calUploadPanel) {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.modal-body > [data-content]:has(> #calUploadPanel) {
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
#calUploadPanel {
  max-height: none;
  overflow: visible;
}
#calUploadPanel [data-upload-accounts] > table > thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}
.hr-batchbar { display: grid; grid-template-columns: 90px 140px minmax(180px, 1fr) minmax(170px, .8fr) auto; gap: 8px; align-items: center; min-height: 52px; padding: 8px 14px; border-bottom: 1px solid #dbe2ef; background: #fff; }
.hr-batchbar input, .hr-batchbar select, .hr-filters input, .hr-filters select, .hr-correction input, .hr-correction textarea { width: 100%; min-width: 0; border: 1px solid #d0d5dd; border-radius: 4px; background: #fff; color: #101828; font: inherit; letter-spacing: 0; }
.hr-batchbar input, .hr-batchbar select, .hr-filters input, .hr-filters select, .hr-correction input { height: 36px; padding: 0 9px; }
.hr-workbench-viewport { flex: 1 1 auto; min-height: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; }
.hr-workbench { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.45fr); grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100%; min-width: 0; min-height: 0; }
.hr-filters, .hr-queue, .hr-detail { min-width: 0; min-height: 0; overflow: auto; }
.hr-filters { padding: 14px; border-right: 1px solid #dbe2ef; background: #f9fafb; }
.hr-filters h4 { margin: 0 0 12px; font-size: 14px; letter-spacing: 0; }
.hr-filters label { display: block; margin-bottom: 10px; color: #344054; font-size: 12px; font-weight: 600; }
.hr-filters label input, .hr-filters label select { margin-top: 4px; font-weight: 400; }
.hr-check { display: flex !important; align-items: center; gap: 7px; }
.hr-check input { width: 16px !important; height: 16px !important; margin: 0 !important; }
.hr-queue { border-right: 1px solid #dbe2ef; background: #fff; }
.hr-queue-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; min-height: 43px; padding: 0 12px; border-bottom: 1px solid #eaecf0; background: #fff; color: #667085; font-size: 12px; }
.hr-task-list { min-height: 0; }
.hr-certificate { border-bottom: 1px solid #dbe2ef; }
.hr-certificate > summary { display: list-item; padding: 12px; cursor: pointer; color: #101828; background: #f9fafb; overflow-wrap: anywhere; }
.hr-certificate > summary strong { font-size: 14px; }
.hr-certificate > summary > span { display: inline-block; margin-left: 8px; font-size: 12px; }
.hr-task-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.hr-task-open:focus-visible { outline: 2px solid #165dff; outline-offset: 2px; }
.hr-task-open > span { display: block; }
.hr-task-open > .hr-task-title { display: flex; }
.hr-task-reason { margin: 5px 0; color: #475467; font-size: 12px; line-height: 1.45; }
.hr-task-origin { display: block; overflow-wrap: anywhere; }
.hr-task { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; padding: 11px 12px; border-bottom: 1px solid #eaecf0; cursor: pointer; }
.hr-task:hover { background: #f8faff; }
.hr-task.active { background: #eff4ff; box-shadow: inset 3px 0 #165dff; }
.hr-task input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; }
.hr-task-title { display: flex; justify-content: space-between; gap: 8px; color: #101828; }
.hr-task p { margin: 5px 0; color: #475467; font-size: 12px; line-height: 1.45; }
.hr-task small { color: #667085; }
.hr-source-file { display: block; max-width: 100%; margin: 3px 0; padding: 0; overflow: hidden; border: 0; background: transparent; color: #165dff; font: inherit; font-size: 12px; letter-spacing: 0; text-align: left; text-decoration: underline; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.hr-source-file:hover, .hr-source-file:focus-visible { color: #112d4e; }
.hr-source-file:focus-visible { outline: 2px solid #165dff; outline-offset: 2px; }
.hr-risk { flex: 0 0 auto; padding: 1px 6px; border-radius: 3px; font-size: 10px; text-transform: uppercase; }
.hr-risk.critical, .hr-risk.high { background: #fef3f2; color: #b42318; }
.hr-risk.medium { background: #fffaeb; color: #b54708; }
.hr-risk.low { background: #ecfdf3; color: #027a48; }
.hr-detail { padding: 16px 18px 28px; background: #fff; }
.hr-detail > header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid #dbe2ef; }
.hr-detail h4 { margin: 0 0 4px; font-size: 16px; letter-spacing: 0; }
.hr-detail header .hr-source-file { margin-bottom: 5px; font-size: 13px; }
.hr-detail small { color: #667085; }
.hr-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.hr-detail dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); gap: 1px; margin: 14px 0; background: #dbe2ef; border: 1px solid #dbe2ef; }
.hr-detail dl div { padding: 8px; background: #f9fafb; }
.hr-detail dt { color: #667085; font-size: 11px; }
.hr-detail dd { margin: 3px 0 0; color: #101828; font-size: 12px; overflow-wrap: anywhere; }
.hr-reason { padding: 9px 10px; border-left: 3px solid #165dff; background: #f5f8ff; color: #344054; font-size: 13px; }
.hr-correction { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.hr-correction label { color: #344054; font-size: 12px; font-weight: 600; }
.hr-correction label input, .hr-correction label textarea, .hr-correction label select { display: block; margin-top: 4px; font-weight: 400; }
.hr-correction label { min-width: 0; }
.hr-correction select { width: 100%; min-width: 0; max-width: 100%; height: 36px; padding: 0 9px; border: 1px solid #d0d5dd; border-radius: 4px; background: #fff; color: #101828; font: inherit; }
.hr-correction textarea { min-height: 74px; padding: 8px 9px; resize: vertical; }
.hr-correction input[readonly] { background: #f2f4f7; color: #475467; }
.hr-detail details { border-top: 1px solid #eaecf0; }
.hr-detail summary { padding: 10px 0; cursor: pointer; color: #344054; font-weight: 700; font-size: 12px; }
.hr-detail pre { max-height: 260px; margin: 0; padding: 10px; overflow: auto; background: #101828; color: #f2f4f7; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hr-timeline > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid #eaecf0; font-size: 12px; }
.hr-empty { display: grid; min-height: 180px; place-items: center; color: #98a2b3; }
.hr-scroll-nav { flex: 0 0 44px; display: grid; grid-template-columns: 36px minmax(140px, 1fr) 36px 48px; gap: 9px; align-items: center; padding: 6px 14px; border-top: 1px solid #dbe2ef; background: #f9fafb; }
.hr-scroll-nav button { display: grid; width: 34px; height: 32px; place-items: center; padding: 0; border: 1px solid #b8c7dc; border-radius: 4px; background: #fff; color: #112d4e; font-size: 22px; line-height: 1; cursor: pointer; }
.hr-scroll-nav button:hover:not(:disabled) { border-color: #165dff; color: #165dff; }
.hr-scroll-nav button:disabled { cursor: default; opacity: .4; }
.hr-scroll-nav input[type="range"] { width: 100%; min-width: 0; accent-color: #165dff; cursor: ew-resize; }
.hr-scroll-nav input[type="range"]:disabled { cursor: default; opacity: .45; }
.hr-scroll-position { color: #667085; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.hr-batch-dialog { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgb(16 24 40 / 46%); }
.hr-batch-dialog[hidden] { display: none; }
.hr-batch-dialog > div { width: min(620px, 100%); max-height: 75vh; padding: 18px; overflow: auto; border: 1px solid #dbe2ef; border-radius: 6px; background: #fff; box-shadow: 0 18px 50px rgb(16 24 40 / 24%); }
.hr-batch-dialog header, .hr-batch-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hr-batch-dialog header h4 { margin: 0; letter-spacing: 0; }
.hr-batch-dialog header button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.hr-batch-dialog footer { justify-content: flex-end; margin-top: 16px; }
.hr-batch-dialog li { margin: 5px 0; color: #b42318; font-size: 12px; }
@media (max-width: 1050px) {
  .modal-overlay.hr-modal-overlay { padding: 4px; }
  .modal.hr-modal { height: calc(100dvh - 8px); }
}
@media (max-width: 720px) {
  .hr-stats { grid-template-columns: repeat(5, minmax(58px, 1fr)); }
  .hr-stats span { display: grid; gap: 0; text-align: center; }
  .hr-batchbar { grid-template-columns: 1fr 1fr; }
  .hr-batchbar input { grid-column: 1 / -1; }
  .hr-filters, .hr-queue, .hr-detail { border-bottom: 0; }
  .hr-detail dl, .hr-correction { grid-template-columns: 1fr 1fr; }
  .hr-scroll-nav { grid-template-columns: 34px minmax(90px, 1fr) 34px 42px; padding-inline: 8px; }
}

.hr-rules { overflow:auto; padding:20px; min-height:300px; }
.hr-rule { margin:12px 0; padding:16px; border:1px solid #dce3ec; border-radius:8px; }
.hr-completion { color:#087f5b; padding:12px; background:#ecfdf5; border-radius:6px; }
.hr-completion-checks { margin: 10px 0; padding: 10px 12px; border: 1px solid #dbe2ef; border-radius: 6px; font-size: 12px; }
.hr-completion-checks p { margin: 6px 0 0; color: #667085; }
.hr-completion-checks ul { margin: 7px 0 0; padding-left: 18px; }
.hr-completion-checks li { margin: 3px 0; }
.hr-completion-checks .passed { color: #087f5b; }
.hr-completion-checks .pending { color: #b54708; }
.hr-followup-reason { display: block; margin: 6px 0; color: #b54708; font-size: 12px; }
#hrProposal { margin:14px 0; } #hrProposal table { width:100%; border-collapse:collapse; margin:12px 0; }
#hrProposal td, #hrProposal th { padding:8px; border:1px solid #ddd; text-align:left; overflow-wrap:anywhere; }
.hr-modal [hidden] { display:none !important; }
.hr-reverification { margin:14px 0; padding:16px; border:1px solid #b6cdf6; border-radius:8px; background:#f5f8ff; }
.hr-reverification h4 { margin:0 0 8px; color:#243c80; }
.hr-reverification p { font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.hr-reverification dd { white-space:pre-wrap; overflow-wrap:anywhere; }
.hr-reverification-actions { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.hr-reverification button:disabled { opacity:.55; cursor:not-allowed; }
#hrReverificationProgress { padding:8px 10px; background:#fff; border-radius:6px; }
.hr-verification-values { width:100%; border-collapse:collapse; margin:10px 0; font-size:13px; }
.hr-verification-values th,.hr-verification-values td { border:1px solid #dbe2ef; padding:8px; text-align:left; overflow-wrap:anywhere; }


/* Workbench navigation and controls share the site's indigo palette. */
.hr-modal {
  --hr-indigo: #283593;
  --hr-radius: 12px;
  --hr-line: #dbe2ef;
  font-size: 13px;
}
.hr-sidebar { min-height: 0; overflow: auto; padding: 20px 10px; background: #1a237e; color: white; }
.hr-brand { padding: 0 8px 18px; font-size: 16px; font-weight: 700; }
.hr-nav-group { display: grid; gap: 3px; }
.hr-nav-group + .hr-nav-group { margin-top: 13px; padding-top: 13px; border-top: 1px solid rgb(255 255 255 / 24%); }
.hr-nav-item { display: block; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; background: transparent; color: #eef0ff; text-align: left; font: inherit; font-weight: 500; cursor: pointer; }
.hr-nav-item:hover { background: rgb(255 255 255 / 12%); }
.hr-nav-item[aria-current="page"] { background: #e8eaf6; color: #1a237e; font-weight: 700; }
#hrNavToggle { display: none; }
.hr-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.hr-main .hr-header { min-height: 52px; padding: 9px 16px; }
.hr-header #hrViewTitle { font-size: 17px; color: #17234a; }
.hr-message:empty { display: none; }
.hr-main .hr-stats span { padding: 6px 3px; }
.hr-main .hr-stats strong { font-size: 16px; }
.hr-main .hr-accounts, .hr-main .hr-rules { flex: 1 1 0; min-height: 0; max-height: none; padding: 14px 16px; overflow: auto; background: white; }
.hr-main .hr-accounts th { background: #f8f9fc; }
.hr-main .hr-accounts td, .hr-main .hr-accounts th { padding: 8px; }
.hr-main .hr-accounts > [data-upload-accounts] > table > thead th,
#hrAccounts > table > thead th { position: sticky; top: -14px; z-index: 1; }
.hr-main .hr-batchbar { grid-template-columns: auto auto minmax(90px, 1fr) minmax(100px, .9fr) auto; min-height: 0; padding: 7px 14px; }
.hr-modal :is(button, input:not([type]), input[type="text"], input[type="search"], select, textarea) { border-radius: var(--hr-radius); }
.hr-modal select {
  appearance: none;
  padding-inline: 10px 28px;
  border: 1px solid #d0d5dd;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 10px) center;
  background-repeat: no-repeat;
  background-size: 4px 4px;
}
@media (forced-colors: active) { .hr-modal select { appearance: auto; } }
.hr-modal :is(.btn, select, input:not([type]), input[type="text"], textarea) { font-size: 12px; }
.hr-modal .btn { min-height: 32px; padding: 6px 12px; }
.hr-modal .modal-close { width: 32px; height: 32px; background: #f4f5fa; color: #475467; }
.hr-modal :is(input:not([type]), input[type="text"], select) { min-height: 32px; }
.hr-modal :is(.hr-accounts, .hr-account-pager) button:not(.btn) { padding: 5px 10px; border: 1px solid var(--hr-line); background: #fff; color: var(--hr-indigo); font: inherit; cursor: pointer; }
.hr-modal button:disabled { opacity: .55; cursor: default; }
.hr-modal :is(button, select, input, textarea, summary):focus-visible { outline: 2px solid var(--hr-indigo); outline-offset: 2px; }
.hr-sidebar button:focus-visible { outline-color: white; }
.hr-filters { grid-column: 1 / -1; max-height: 33dvh; padding: 7px 14px; border: 0; border-bottom: 1px solid var(--hr-line); }
.hr-filters summary { width: fit-content; color: #344054; font-size: 12px; font-weight: 650; cursor: pointer; }
.hr-filter-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px 8px; align-items: end; padding: 7px 0 2px; }
.hr-filter-fields label { min-width: 0; margin: 0; font-size: 11px; }
.hr-filter-fields .hr-check { align-self: center; font-size: 12px; }
.hr-filter-fields .btn { justify-self: start; }
.hr-filter-fields input, .hr-filter-fields select { height: 32px; }
.hr-modal .hr-certificate > summary strong { font-size: 13px; }
.hr-task.active { box-shadow: inset 3px 0 var(--hr-indigo); background: #f0f1fa; }
.hr-main .hr-source-file { color: var(--hr-indigo); }
.hr-main .hr-detail, .hr-main .hr-queue { overscroll-behavior: contain; }

@media (min-width: 721px) and (max-width: 1050px) {
  .hr-workbench { grid-template-columns: minmax(205px, .8fr) minmax(0, 1.2fr); }
  .hr-filter-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .modal.hr-modal { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .hr-sidebar { max-height: 44dvh; padding: 6px 10px; }
  .hr-brand { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 14px; }
  #hrNavToggle { display: inline-block; padding: 6px 14px; border: 1px solid #6974b8; background: #283593; color: #fff; font: inherit; }
  #hrNavigation:not(.is-expanded) { display: none; }
  .hr-nav-group { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
  .hr-nav-group + .hr-nav-group { margin-top: 5px; padding-top: 5px; }
  .hr-nav-item { min-height: 32px; padding: 6px; font-size: 12px; }
  .hr-main .hr-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .hr-main .hr-stats span { font-size: 10px; }
  .hr-main .hr-batchbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 6px; padding: 6px 10px; }
  .hr-main .hr-batchbar input { grid-column: auto; }
  .hr-main .hr-batchbar input:first-of-type { grid-column: 1 / 3; grid-row: 2; }
  .hr-main .hr-batchbar input:last-of-type { grid-column: 3; grid-row: 2; max-width: 34vw; }
  .hr-main .hr-batchbar button { grid-row: 1; grid-column: 3; }
  .hr-workbench-viewport { overflow-y: auto; }
  .hr-workbench { display: flex; flex-direction: column; height: auto; }
  .hr-filters { max-height: none; }
  .hr-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-queue { max-height: 40dvh; border-bottom: 1px solid var(--hr-line); }
  .hr-detail { overflow: visible; padding: 12px; }
  .hr-detail > header { flex-wrap: wrap; }
  .hr-timeline > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
