/**
 * Page structure building blocks (UI standards, decided 18 November 2026).
 *
 * Breadcrumb, summary cards, underline tabs, empty state, page sections,
 * detail lists and form actions. Markup comes from the parts in
 * parts/common/ (breadcrumb.php, summary-cards.php, empty-state.php).
 * Approved drawings: docs/08-history/audits/2026-11-17-ui-consistency/approvals/.
 */

/* Breadcrumb: above the title on every page below a top-level page, wizards included. */
.hrc-breadcrumb {
  margin: 0 0 var(--spacing-3);
}

.hrc-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hrc-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.hrc-breadcrumb li + li::before {
  content: "\203A";
  color: var(--text-muted);
}

.hrc-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.hrc-breadcrumb a:hover,
.hrc-breadcrumb a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Summary cards: compact, one line each, above the page card. Each filters the list below. */
.hrc-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-4);
  margin: 0 0 var(--spacing-5);
}

.hrc-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-3);
  min-width: 0;
  padding: 14px var(--spacing-5);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  text-decoration: none;
}

a.hrc-summary-card:hover,
a.hrc-summary-card:focus-visible {
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.hrc-summary-card.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.hrc-summary-card__label {
  min-width: 0;
  color: var(--text-muted);
}

.hrc-summary-card__value {
  font-size: 22px;
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* Optional second line under the label, for cards that explain the number. */
.hrc-summary-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hrc-summary-card__hint {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

/* Numbered steps: number in a circle (no full stop), bold title, one line of text.
   <ol class="hrc-steps"><li><strong>Title</strong><p>Text</p></li></ol>
   The ID keeps the theme's generic "1." list numbering off this list. */
.site-main:not(#_) ol:is(.hrc-steps, .hrc-rec-steps) {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: hrc-step;
}

.site-main:not(#_) ol:is(.hrc-steps, .hrc-rec-steps) > li {
  position: relative;
  margin: 0;
  padding: 2px 0 var(--spacing-4) 40px;
  counter-increment: hrc-step;
}

.site-main:not(#_) ol:is(.hrc-steps, .hrc-rec-steps) > li:last-child {
  padding-bottom: 0;
}

.site-main:not(#_) ol:is(.hrc-steps, .hrc-rec-steps) > li::before {
  content: counter(hrc-step);
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold, 600);
  text-align: center;
}

.site-main:not(#_) ol:is(.hrc-steps, .hrc-rec-steps) > li > p {
  margin: 2px 0 0;
  color: var(--text-muted);
}

.dark-mode .site-main:not(#_) ol:is(.hrc-steps, .hrc-rec-steps) > li::before {
  background: var(--dark-bg-tertiary);
  color: var(--dark-text-primary);
}

/* Underline tabs, directly under the page header. */
.hrc-tabs {
  display: flex;
  gap: var(--spacing-1);
  margin: 0 0 var(--spacing-6);
  overflow-x: auto;
  border-bottom: 1px solid var(--border-color);
}

.hrc-tabs a,
.hrc-tabs button {
  margin-bottom: -1px;
  padding: 10px var(--spacing-4);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
}

.hrc-tabs a:hover,
.hrc-tabs button:hover {
  color: var(--text-primary);
}

.hrc-tabs [aria-current="page"],
.hrc-tabs [aria-selected="true"] {
  border-bottom-color: var(--color-primary);
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
}

/*
 * Tab buttons: the second level of switching inside a tab (BugHerd #3886).
 * One row of underline tabs (.hrc-tabs) per page, at the top. Any further
 * switching inside a panel is a row of small outline buttons where the
 * selected one is the dark filled button. Markup:
 *   <div class="hrc-tab-buttons" role="tablist"><button role="tab" aria-selected="true">..</button> ...</div>
 * Selected: [aria-selected="true"], [aria-current="page"] or .is-active.
 */
.hrc-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--spacing-4, 16px);
  padding: 0;
  border: 0;
}

.hrc-tab-buttons > :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  margin: 0;
  padding: 0 14px;
  background: var(--white, #fff);
  border: 1px solid var(--color-secondary);
  border-radius: 6px;
  box-shadow: none;
  color: var(--color-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.hrc-tab-buttons > :is(a, button):hover {
  background: var(--gray-100, #f3f4f6);
  color: var(--color-secondary);
  text-decoration: none;
}

.hrc-tab-buttons > :is(a, button):is([aria-selected="true"], [aria-current="page"], .is-active),
.hrc-tab-buttons > :is(a, button):is([aria-selected="true"], [aria-current="page"], .is-active):hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--white, #fff);
}

.hrc-tab-buttons > :is(a, button):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus, 0 0 0 3px rgba(0, 0, 0, 0.2));
}

.dark-mode .hrc-tab-buttons > :is(a, button) {
  background: transparent;
  border-color: var(--white, #fff);
  color: var(--white, #fff);
}

.dark-mode .hrc-tab-buttons > :is(a, button):hover {
  background: var(--dark-bg-tertiary);
  color: var(--white, #fff);
}

.dark-mode .hrc-tab-buttons > :is(a, button):is([aria-selected="true"], [aria-current="page"], .is-active),
.dark-mode .hrc-tab-buttons > :is(a, button):is([aria-selected="true"], [aria-current="page"], .is-active):hover {
  background: var(--white, #fff);
  border-color: var(--white, #fff);
  color: var(--color-secondary);
}

/* Empty state: what belongs here, one line, and the first action. */
.hrc-empty-state {
  padding: var(--spacing-12) var(--spacing-4);
  text-align: center;
}

.hrc-empty-state__title {
  margin: 0 0 var(--spacing-2);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.hrc-empty-state__text {
  margin: 0 0 var(--spacing-4);
  color: var(--text-muted);
}

/* Empty state kinds (owner decisions, 20 Nov 2026).
   First use: steps under the line, a drawing beside the text on wide screens.
   All done: a green tick, no orange button. One-line version for sections, tabs and tables. */
.hrc-empty-state--first,
.hrc-empty-state--done {
  max-width: 640px;
  margin: 0 auto;
}

.hrc-empty-state--first .hrc-empty-state__text,
.hrc-empty-state--done .hrc-empty-state__text {
  margin-bottom: var(--spacing-6);
}

.site-main:not(#_) ol.hrc-empty-state__steps {
  max-width: 460px;
  margin: 0 auto var(--spacing-6);
  text-align: left;
}

.hrc-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-3);
}

.hrc-empty-state__art img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto var(--spacing-4);
}

.hrc-empty-state__tick {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--spacing-4);
  border-radius: 50%;
  background: var(--color-success-light);
  color: var(--color-success-dark);
}

.hrc-empty-state__tick svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

@media (min-width: 992px) {
  .hrc-empty-state--has-art {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: var(--spacing-12);
    max-width: 860px;
    text-align: left;
  }

  .hrc-empty-state--has-art .hrc-empty-state__art img {
    margin-bottom: 0;
  }

  .site-main:not(#_) .hrc-empty-state--has-art ol.hrc-empty-state__steps {
    margin-left: 0;
  }

  .hrc-empty-state--has-art .hrc-empty-state__actions {
    justify-content: flex-start;
  }
}

/* Coming up, under an all-done block. */
.hrc-tasks-coming-up {
  margin-top: var(--spacing-8);
}

.hrc-empty-line {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
}

/* A line above a table needs air before the table starts. */
.hrc-empty-line + .dt-container,
.hrc-empty-line + table,
.hrc-empty-line + .dt-table-wrap {
  margin-top: var(--spacing-4);
}

.hrc-empty-line strong {
  color: var(--text-primary);
}

.hrc-empty-line a {
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
  text-decoration: underline;
}

.hrc-empty-line__tick {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-success-light);
  color: var(--color-success-dark);
}

/* Sections inside one page card: headings and a dividing line, not cards inside the card. */
.hrc-section + .hrc-section {
  margin-top: var(--spacing-8);
  padding-top: var(--spacing-8);
  border-top: 1px solid var(--border-color);
}

.hrc-section__title {
  margin: 0 0 var(--spacing-4);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.hrc-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-4) var(--spacing-8);
  margin: 0;
}

.hrc-details dt {
  margin: 0 0 2px;
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}

.hrc-details dd {
  margin: 0;
}

/* Form fields: red star when required; actions at the bottom left, main action first. */
.hrc-field-required {
  margin-left: 2px;
  color: var(--color-error);
}

.hrc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-3);
  margin-top: var(--spacing-8);
}

.dark-mode .hrc-summary-card {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border);
  color: var(--dark-text-primary);
}

.dark-mode .hrc-breadcrumb li,
.dark-mode .hrc-tabs [aria-current="page"],
.dark-mode .hrc-tabs [aria-selected="true"] {
  color: var(--dark-text-primary);
}

@media (max-width: 767px) {
  .hrc-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-3);
  }

  .hrc-summary-card {
    padding: var(--spacing-3) var(--spacing-4);
  }
}

/* Older number cards (icon above, big number) take the compact summary card
   look until their markup moves to parts/common/summary-cards.php. */
.main-content :is(.whs-stat-card, .hrc-stat-card) {
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 14px var(--spacing-5) !important;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: none;
}

.main-content :is(.whs-stat-card, .hrc-stat-card) > :is(.whs-stat-icon, .hrc-stat-icon) {
  display: none;
}

.main-content :is(.whs-stat-card > .whs-stat-content, .hrc-stat-card > .hrc-stat-content) {
  display: flex;
  flex: 1;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-3);
  min-width: 0;
}

.main-content :is(.whs-stat-label, .hrc-stat-card .hrc-stat-label) {
  color: var(--text-muted);
}

.site-main:not(#_) :is(.whs-stat-value, .hrc-stat-card .hrc-stat-number) {
  font-size: 22px !important;
  font-weight: var(--font-weight-extrabold) !important;
  line-height: 1.1 !important;
  font-variant-numeric: tabular-nums;
}

/* No line between the top bar and the page (BugHerd #3280). Kept here, not in
   style-fix.css, so QA deploys of that file do not bring the line back. */
.site-main:not(#_) .main-content {
  border-top: 0;
}

/* ==========================================================================
   STANDARDS BRIDGE (19 Nov 2026, page-by-page conformance scan)
   Modules that still carry their own markup take the shared look from here
   until each template moves to the shared parts. One rule per building block;
   add a module's class to the list, do not restyle it in the module.
   ========================================================================== */

/* Page title: one size on every page (the dashboard keeps its own). */
body:not(.home) .site-main:not(#_) .main-content h1 {
  font-size: 30px !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

/* Headers that are not on the standard row yet: title, then its button, controls to the right. */
.content-body .hrc-page-header:not(:has(.hrc-page-header__row)) {
  align-items: center;
  justify-content: flex-start;
  gap: 16px 24px;
}

.content-body .hrc-page-header:not(:has(.hrc-page-header__row)) > :is(form, [class*="search"], [class*="filter"], [class*="controls"]):last-child {
  margin-left: auto;
}

/* Tabs: every tab strip is the underline strip. The Learning report views (.hrc-lms-report-tabs) are a row of tab buttons (.hrc-tab-buttons) and are not in this list (BugHerd #3886). */
.site-main:not(#_) .main-content :is(.nav.nav-tabs, .hrc-screening-tabs, .hrc-rec-nav, .hrc-tt-tabs) {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--spacing-1);
  margin: 0 0 var(--spacing-6);
  padding: 0;
  overflow-x: auto;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  list-style: none;
}

.site-main:not(#_) .main-content :is(.nav.nav-tabs, .hrc-screening-tabs, .hrc-rec-nav, .hrc-tt-tabs) :is(a, button) {
  margin: 0 0 -1px;
  padding: 10px var(--spacing-4) !important;
  background: none !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text-muted) !important;
  font-weight: var(--font-weight-medium) !important;
  text-decoration: none;
  white-space: nowrap;
}

.site-main:not(#_) .main-content :is(.nav.nav-tabs, .hrc-screening-tabs, .hrc-rec-nav, .hrc-tt-tabs) :is(a, button):hover {
  color: var(--text-primary) !important;
}

.site-main:not(#_) .main-content :is(.nav.nav-tabs, .hrc-screening-tabs, .hrc-rec-nav, .hrc-tt-tabs) :is(.active, .is-active, [aria-current]:not([aria-current="false"]), [aria-selected="true"]) {
  border-bottom-color: var(--color-primary) !important;
  color: var(--text-primary) !important;
  font-weight: var(--font-weight-bold) !important;
}

.dark-mode .site-main:not(#_) .main-content :is(.nav.nav-tabs, .hrc-screening-tabs, .hrc-rec-nav, .hrc-tt-tabs) :is(.active, .is-active, [aria-current]:not([aria-current="false"]), [aria-selected="true"]) {
  color: var(--dark-text-primary) !important;
}

/* Number cards: User Management's cards take the compact layout (label left, number right). */
.site-main:not(#_) .um-stat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px var(--spacing-3);
  padding: 14px var(--spacing-5);
  border-radius: var(--radius-xl);
  box-shadow: none;
  transform: none;
}

.site-main:not(#_) .um-stat-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.site-main:not(#_) .um-stat-card .stat-label {
  grid-column: 1;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-body) !important;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.site-main:not(#_) .um-stat-card .stat-sub {
  grid-column: 1;
  margin: 0;
  font-size: var(--font-size-xs) !important;
}

.site-main:not(#_) .um-stat-card .stat-value {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 22px !important;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* Fields: every text field and dropdown is the 38px field. */
.site-main:not(#_) .main-content :is(
  input[type="text"], input[type="search"], input[type="email"], input[type="number"],
  input[type="tel"], input[type="url"], input[type="date"], input[type="password"],
  input:not([type]), select
):not(.select2-hidden-accessible, .select2-search__field, .dt-input, .flatpickr-input[type="hidden"], [class*="numInput"], .hrc-ctb__editor-surface *, table input, table select) {
  height: var(--input-height);
  min-height: var(--input-height);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  font-size: var(--font-size-body);
  box-shadow: none;
}

.site-main:not(#_) .main-content textarea {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
}

.site-main:not(#_) .main-content .select2-container .select2-selection--single {
  height: var(--input-height);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
}

/* Buttons: module buttons take the shared size, corners and text. Colours stay with the module for now. */
.site-main:not(#_) .main-content :is(.v-btn, .hf-btn:not(.sm), .cc-button, .hrc-rec-button:not(.small):not(.icon), .gform_button, .button.change-subscription) {
  height: var(--btn-height-md);
  min-height: var(--btn-height-md);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-border-radius);
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  line-height: var(--line-height-tight);
}

/* Labels and small headings are sentence case, never capitals. */
.site-main:not(#_) .main-content :is(.form-label, label, .stat-label, .hrc-ps-eyebrow, .hrc-toolkit-card__mark, .hrc-toolkit-card__visual-label) {
  letter-spacing: normal;
  text-transform: none;
}

/* No inner frame around a whole page. */
.site-main:not(#_) .main-content :is(.whs-report-container, .whs-report-container.whs-psych) {
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* Notice boxes keep a visible border (BugHerd #3294). */
.site-main:not(#_) .main-content .whs-privilege-box {
  border: 1px solid var(--color-warning, #f5a524);
}

/* A page has one main card. A card nested inside it is a plain section (BugHerd #3298). */
.site-main:not(#_) .main-content .content-body .content-body {
  margin: var(--spacing-8) 0 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Section headings drawn by the shared header part sit one step below the page title. */
.site-main:not(#_) .main-content h2.hrc-page-title {
  font-size: 20px !important;
  line-height: 1.3;
}

/* Summary cards directly under the page header. */
.content-body > .hrc-summary-cards,
.hrc-page-metrics > .hrc-summary-cards {
  margin-bottom: var(--spacing-6);
}

/* Secondary tools row under the page header (one main button stays in the header). */
.hrc-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-3);
  margin: 0 0 var(--spacing-5);
}

.hrc-page-actions:empty {
  display: none;
}

/* Templates: the copy tools are a plain row, not a box (BugHerd #3299). */
.hrc-template-copy-toolbar {
  margin: 0 0 var(--spacing-5);
}

/* Templates: tickboxes line up and every title starts at the same edge (BugHerd #3302, #3303). */
.main-content :is(.hrc-template-copy-checkbox, .hrc-template-copy-checkbox-all) {
  flex: none;
  margin: 0 var(--spacing-2) 0 0 !important;
  vertical-align: middle;
}

.main-content .hrc-template-copy-spacer {
  display: inline-block;
  width: 1em;
  margin-right: var(--spacing-2);
}

/* Pinned table columns keep the row background, not a grey panel (BugHerd #3304). */
.site-main:not(#_) table.dataTable tbody tr > :is(.dtfc-fixed-end, .dtfc-fixed-start) {
  background-color: var(--card-bg, #fff);
}

.dark-mode .site-main:not(#_) table.dataTable tbody tr > :is(.dtfc-fixed-end, .dtfc-fixed-start) {
  background-color: var(--dark-bg-secondary);
}

/* The hidden select behind the top bar business picker must stay 1px wide, or the page scrolls sideways (BugHerd #3306). */
.site-header .header-company {
  position: relative;
}

.site-header .header-company select.select2-hidden-accessible {
  width: 1px !important;
  min-width: 0 !important;
}

/* Employees: the orange plus beside a name adds that person to Workforce (BugHerd #3302, #3902). */
.hrc-wf-add-btn {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: var(--spacing-2);
  padding: 0;
  background: var(--color-primary);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

.hrc-wf-add-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Add new user, step 1 (Round 4, option A, Angus 19 Nov 2026): choice cards on the
   left, the original help cards kept on the right, even spacing under every title. */
#form-confirm-user-details .hrc-add-user-card,
#form-confirm-user-details .employment-type-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-3);
}

#form-confirm-user-details > :is(h2, .hrc-add-user-card, .employment-type-section, .submit-btn-row),
#form-confirm-user-details .hrc-add-user-card > :is(h2, .employment-type-section),
#form-confirm-user-details .employment-type-section > h2 {
  grid-column: 1 / -1;
}

#form-confirm-user-details .row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin: 0 !important;
}

#form-confirm-user-details .row > .form-field {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 12px var(--spacing-4);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
}

#form-confirm-user-details .row > .form-field:has(input:checked) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

#form-confirm-user-details .form-field input[type="radio"] {
  flex: none;
  margin: 3px 0 0;
  accent-color: var(--color-primary);
}

#form-confirm-user-details .form-field label {
  flex: 1;
  margin: 0;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}

#form-confirm-user-details .form-field label::after {
  content: "";
  position: absolute;
  inset: 0;
}

.site-main:not(#_) #form-confirm-user-details .hrc-choice-hint {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--font-size-xs) !important;
  font-weight: 400;
}

.site-main:not(#_) #form-confirm-user-details h2.add-employee-label {
  margin: var(--spacing-5) 0 0 !important;
  font-size: 16px !important;
  line-height: 1.4;
}

/* Add new user / contractor: the question and its choices sit in a card (BugHerd #3805). */
.site-main:not(#_) #form-confirm-user-details .hrc-add-user-card > h2.add-employee-label:first-child {
  margin-top: 0 !important;
}

#form-confirm-user-details .submit-btn-row {
  margin-top: var(--spacing-4) !important;
  padding-top: 0;
  border-top: 0;
}

#form-confirm-user-details .submit-btn-row > .form-group {
  display: flex;
  gap: var(--spacing-3);
  width: 100%;
  margin: 0 !important;
  padding: 0;
}

/* Step line and step title. */
.site-main:not(#_) .content-col-main .step-wrap h2,
.site-main:not(#_) .content-col-main .step-wrap p {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: var(--font-size-body) !important;
  font-weight: 400;
}

.site-main:not(#_) .content-col-main h2.step-heading-title {
  margin: 0;
  font-size: 20px !important;
  line-height: 1.3;
}

/* Help cards on the right: one gap under every title, one gap between cards. */
.site-main:not(#_) .content-col-sidebar .advice-sidebar {
  margin: 0 0 var(--spacing-4);
  padding: var(--spacing-5);
}

.site-main:not(#_) .content-col-sidebar .advice-sidebar h2 {
  margin: 0 0 var(--spacing-3) !important;
  font-size: 16px !important;
  line-height: 1.4;
}

.site-main:not(#_) .content-col-sidebar .advice-sidebar strong {
  display: block;
  margin: 0 0 var(--spacing-1);
}

.site-main:not(#_) .content-col-sidebar .advice-sidebar p {
  margin: 0 0 var(--spacing-3);
}

.site-main:not(#_) .content-col-sidebar .advice-sidebar > :last-child,
.site-main:not(#_) .content-col-sidebar .advice-sidebar > div > :last-child {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  #form-confirm-user-details .hrc-add-user-card,
  #form-confirm-user-details .employment-type-section {
    grid-template-columns: 1fr;
  }
}

/* Add new user: the help cards are spaced by their own margin, not stray line breaks. */
.site-main:not(#_) .content-col-sidebar > br {
  display: none;
}

/* Breadcrumb: the site's generic "1." list numbering must not reach it; only the chevron shows. */
.site-main:not(#_) .hrc-breadcrumb ol > li::before {
  content: none;
  position: static;
  margin: 0;
}

.site-main:not(#_) .hrc-breadcrumb ol > li + li::before {
  content: "\203A";
  color: var(--text-muted);
}

/* Header controls: dropdowns keep a sensible width so search and filters stay on one row. */
.hrc-page-header .hrc-page-controls {
  flex-wrap: wrap;
  gap: var(--spacing-3);
}

.hrc-page-header .hrc-page-controls :is(select, .select2-container) {
  flex: none;
  width: 180px !important;
  min-width: 0;
  max-width: 100%;
}

.hrc-page-header .hrc-page-controls select.select2-hidden-accessible {
  width: 1px !important;
}

/* Header controls: the search box keeps a fixed width so it shares the row with the filters. */
.hrc-page-header .hrc-page-controls > :is(div, form, label):has(> input:is([type="text"], [type="search"])) {
  flex: none;
  width: 220px;
  max-width: 100%;
}

.hrc-page-header .hrc-page-controls > input:is([type="text"], [type="search"]) {
  flex: none;
  width: 220px;
  max-width: 100%;
}

/* Breadcrumb items carry no list indent. */
.site-main:not(#_) .hrc-breadcrumb ol > li {
  margin: 0;
  padding: 0;
}

/* Add new user: one line of help under each question. */
#form-confirm-user-details .hrc-choice-sub {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  color: var(--text-muted);
}

/* Checked on staging 19 Nov: leftovers from the first fix round. */
/* Templates: a tickbox and the spacer that stands in for it are the same width, so titles line up (BugHerd #3387). */
.main-content :is(.hrc-template-copy-checkbox, .hrc-template-copy-checkbox-all) {
  width: 16px;
  height: 16px;
}

.main-content .hrc-template-copy-spacer {
  width: 16px;
}

/* Tab strips scroll without showing a scrollbar stub (BugHerd #3475, #3328). */
:is(.hrc-tabs, .nav.nav-tabs, .hrc-screening-tabs, .hrc-lms-report-tabs, .hrc-rec-nav, .hrc-tt-tabs) {
  overflow-y: hidden;
  scrollbar-width: none;
}

:is(.hrc-tabs, .nav.nav-tabs, .hrc-screening-tabs, .hrc-lms-report-tabs, .hrc-rec-nav, .hrc-tt-tabs)::-webkit-scrollbar {
  display: none;
}

/* A disabled course tile still lets its View course button and title link be clicked (BugHerd #3471, #3520). */
.hrc-lms-course-card :is(a, button) {
  pointer-events: auto;
}

/* Checked on staging 19 Nov, second round leftovers. */
/* Row action icons drawn with a stroke stay outline (no fill) wherever they appear (BugHerd #3537, #3515, #3416). */
.v-action svg[stroke="currentColor"],
.v-actions svg[stroke="currentColor"] {
  fill: none !important;
}

/* Recruitment: wide content scrolls inside its own area, the page itself never scrolls sideways (BugHerd #3414). */
.main-content #hrc-recruitment {
  overflow-x: clip;
}

/* Dark buttons always carry white text, including inside module screens (BugHerd #3562). */
.main-content :is(.hrc-comms, .hrc-recruitment, .hrc-lms-page) .verimus-btn.secondary-verimus-btn,
.main-content :is(.hrc-comms, .hrc-recruitment, .hrc-lms-page) .verimus-btn.secondary-verimus-btn:hover {
  color: var(--white) !important;
}

/* Third round, patterns found on many pages when checked on staging. */
/* Fields are white (the grey fill is for disabled or read-only fields only). */
.site-main:not(#_) .main-content :is(
  input[type="text"], input[type="search"], input[type="email"], input[type="number"],
  input[type="tel"], input[type="url"], input[type="date"], input[type="password"],
  input:not([type]), select, textarea, .select2-container .select2-selection--single, .select2-container .select2-selection--multiple
):not(:disabled):not([readonly]):not(.select2-hidden-accessible):not(.select2-search__field) {
  background-color: var(--input-bg) !important;
}

.select2-container.select2-container--disabled .select2-selection--single {
  background-color: var(--input-bg-disabled) !important;
}

/* Table empty state sits centred in its row with modest spacing. */
.hrc-empty-state--table {
  padding: var(--spacing-8) var(--spacing-4);
}

/* Probation reviews launcher: no extra block above the page, the button sits with the page actions. */
#hrc-probation-launcher {
  margin: 0 0 var(--spacing-3);
}

/* Add new user wizard, Angus's review 19 Nov (BugHerd #3606-#3611). */
/* A single line separates the questions from the help column (#3606). */
@media (min-width: 992px) {
  .site-main:not(#_) .page-template-page-add-new-employee .content-col-sidebar,
  .page-template-page-add-new-employee .site-main:not(#_) .content-col-sidebar {
    padding-left: var(--spacing-6);
    border-left: 1px solid var(--border-color);
  }
}

/* Steps 2 onward: the step's own title is the page title, the step line sits
 * under it in the same quiet style as step 1 (#3608, #3609, #3611). */
.page-template-page-add-new-employee .site-main:not(#_) .entry-header {
  display: flex;
  flex-direction: column;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-header :is(h1.step-heading-title, h1.entry-title) {
  order: -2;
  max-width: none;
  margin: 0 0 var(--spacing-2);
  font-size: var(--font-size-3xl) !important;
  line-height: 36px;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-header:has(> h1) .step-wrap {
  order: -1;
  gap: var(--spacing-3);
  align-items: center;
  margin: 0 0 var(--spacing-5);
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-header .step-wrap h2,
.page-template-page-add-new-employee .site-main:not(#_) .entry-header .step-wrap p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-body) !important;
  font-weight: 400;
  line-height: 1.5;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-header #back-to-step {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-muted);
  font-size: var(--font-size-body) !important;
  font-weight: 400;
  line-height: 1.5;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-header #back-to-step:hover {
  color: var(--color-primary);
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-header #back-to-step + h2::before {
  content: "\00b7";
  margin-right: var(--spacing-3);
}

/* Wizard forms use the approved field: medium-weight label above a 38px
 * field, 20px section headings, 16px sub headings (#3610). */
.page-template-page-add-new-employee .site-main:not(#_) .entry-content form :is(p.fw-bold, label.fw-bold, .form-field > p, .form-field > label:not(.form-check-label)) {
  margin-bottom: var(--spacing-2) !important;
  font-size: var(--font-size-body) !important;
  font-weight: var(--font-weight-medium, 500) !important;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-content form h2 {
  margin: var(--spacing-6) 0 var(--spacing-4);
  font-size: 20px !important;
  line-height: 1.3;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-content form > h2:first-child,
.page-template-page-add-new-employee .site-main:not(#_) .entry-content form > :first-child h2:first-child {
  margin-top: 0;
}

.page-template-page-add-new-employee .site-main:not(#_) .entry-content form h3 {
  font-size: 16px !important;
  line-height: 1.4;
}

/* Contractors: the name column does not take all the spare width (#3605), and is narrower than Employees (#3351). */
.page-template-page-contractors #employees-table-status_wrapper :is(th, td):first-child,
.page-template-page-contractors #archived-employees-table-status_wrapper :is(th, td):first-child {
  width: 240px !important;
  min-width: 240px;
  max-width: 240px;
}

/* Contractors: the Action column is wide enough for its three icons (view, edit, archive) on one line (#3351).
 * 3 x 24px icons + 2 x 16px gaps + 2 x 16px cell padding = 136px, plus the divider. Applies to the empty and the populated table. */
.page-template-page-contractors #employees-table-status_wrapper :is(th.no-sort:not(.dt-mobile), td.td-action-wrap),
.page-template-page-contractors #archived-employees-table-status_wrapper :is(th.no-sort:not(.dt-mobile), td.td-action-wrap) {
  width: 144px !important;
  min-width: 144px;
}

.page-template-page-contractors #employees-table-status_wrapper td.td-action-wrap .v-actions,
.page-template-page-contractors #archived-employees-table-status_wrapper td.td-action-wrap .v-actions {
  flex-wrap: nowrap;
  gap: var(--spacing-md, 16px);
}

/* Employees: an email address stays on one line (#3604). */
@media (min-width: 768px) {
  #employees-table-status_wrapper .dt-scroll-head th:nth-child(5),
  #archived-employees-table-status_wrapper .dt-scroll-head th:nth-child(5),
  #employees-table-status tbody td:nth-child(5),
  #archived-employees-table-status tbody td:nth-child(5) {
    width: auto;
    max-width: 300px;
    white-space: nowrap;
  }

  #employees-table-status tbody td:nth-child(5) .user_name_txt,
  #archived-employees-table-status tbody td:nth-child(5) .user_name_txt {
    display: block;
    max-width: 280px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }

  /* Employees: the name column gets more room than email (BugHerd #3804). */
  .page-template-page-employees #employees-table-status_wrapper .dt-scroll-head th:nth-child(1),
  .page-template-page-employees #archived-employees-table-status_wrapper .dt-scroll-head th:nth-child(1),
  .page-template-page-employees #employees-table-status tbody td:nth-child(1),
  .page-template-page-employees #archived-employees-table-status tbody td:nth-child(1) {
    min-width: 340px;
  }
}

/* ==========================================================================
   Templates, review overview, row icons, left menu: Angus's pinned items (BugHerd #3613-#3626, #3632), 19 Nov 2026
   ========================================================================== */

/* Row view icon drawn as an outline (stroke) stays an outline like the Employees eye (#3613). */
.v-action--view svg[stroke="currentColor"] :is(path, circle) {
  fill: none;
  stroke: var(--icon-color-default);
  stroke-width: 1.5;
}

.v-action--view:hover svg[stroke="currentColor"] :is(path, circle) {
  fill: none;
  stroke: var(--main);
}

/* Templates: Admin tools section, a plain section with a 16px heading (#3614). */
.site-main:not(#_) .hrc-template-admin-tools {
  margin: 0 0 var(--spacing-5);
}

.site-main:not(#_) .hrc-template-admin-tools__head {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin: 0 0 var(--spacing-1);
}

.site-main:not(#_) .hrc-template-admin-tools__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.site-main:not(#_) .hrc-template-admin-tools__help {
  margin: 0 0 var(--spacing-3);
  font-size: 12px;
  color: var(--text-muted);
}

.site-main:not(#_) .hrc-template-admin-tools__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-3);
  margin: 0 0 var(--spacing-3);
}

.site-main:not(#_) .hrc-template-admin-tools__actions:empty {
  display: none;
}

/* Templates table: tags sit under the title and start at the same left edge as the title text (#3617). */
.site-main:not(#_) .hrc-template-namecell {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.site-main:not(#_) .hrc-template-namecell > :is(.hrc-template-copy-checkbox, .hrc-template-copy-spacer) {
  margin-top: 3px !important;
}

.site-main:not(#_) .hrc-template-namebody {
  min-width: 0;
}

.site-main:not(#_) .hrc-template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

/* Tags that wrap onto a second line inside a table cell keep a 4px gap (#3619). */
.site-main:not(#_) td:has(> .v-badge + .v-badge) > .v-badge {
  margin-block: 2px;
}

/* Templates table: Documents column holds just the count, so it is narrow (#3620). */
#templates-table th.template-document-col,
#templates-table td.template-document {
  width: 1%;
  white-space: nowrap;
}

/* Table footer (paging row) has no top line: the last row already has its own (#3621). */
.site-main:not(#_) .dt-scroll + .bottom .custom-bottom-wrapper {
  border-top: 0;
}

/* Review overview: the table fits its box, no scroll bar at desktop widths (#3626). */
@media (min-width: 992px) {
  .site-main:not(#_) .reviews-table-container .table-responsive {
    overflow: visible;
  }
}

/* Left menu: sub-menu links start where the parent link's text starts (#3618).
   Parent text = link padding-left (16px) + icon (24px) + gap (10px); the sub-menu list already supplies 24px. */
ul#menu-sidebar > li > .sub-menu > li {
  padding-left: calc(var(--spacing-4) + var(--spacing-2-5));
}

.short-sidebar-menu ul#menu-sidebar > li > .sub-menu > li {
  padding-left: 15px;
}

/* Left menu: sub-links share one weight; only the current one is heavier. */
#menu-sidebar .sub-menu > li:not(.current-menu-item):not(.active) > a {
  font-weight: var(--font-weight-medium, 500) !important;
}

/* Contractors: column headings stay on one line (BugHerd #3499). */
.page-template-page-contractors #employees-table-status_wrapper th,
.page-template-page-contractors #employees-table-status_wrapper th .dt-column-title,
.page-template-page-contractors #archived-employees-table-status_wrapper th,
.page-template-page-contractors #archived-employees-table-status_wrapper th .dt-column-title {
  white-space: nowrap !important;
}

.page-template-page-contractors #employees-table-status_wrapper th:nth-child(2),
.page-template-page-contractors #archived-employees-table-status_wrapper th:nth-child(2) {
  min-width: 150px;
}

/* An empty table with an action in its empty state: the page header already carries the main button. */
.page-template-page-contractors .dt-empty .verimus-btn,
.page-template-page-contractors .hrc-empty-state--table .verimus-btn {
  display: none;
}

/* Create document step: the step heading is a section heading, not a second page title (BugHerd #3575). */
.site-main:not(#_):not(#__) .main-content [data-tour-page="document-create"] h1 {
  font-size: 20px !important;
  line-height: 1.3;
}

/* Add new user: equal space either side of the line between questions and help (BugHerd #3689), 19 Nov 2026 */
@media (min-width: 992px) {
  .site-main:not(#_) .page-template-page-add-new-employee .template-content .row > .content-col-main,
  .page-template-page-add-new-employee .site-main:not(#_) .template-content .row > .content-col-main {
    padding-right: 24px;
  }

  .site-main:not(#_) .page-template-page-add-new-employee .content-col-sidebar,
  .page-template-page-add-new-employee .site-main:not(#_) .content-col-sidebar {
    padding-left: 24px;
  }
}

/* Collapsible details: one outline chevron at the right end of the summary row, no browser triangle (BugHerd #3692). */
.site-main:not(#_) details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-main:not(#_) details > summary::-webkit-details-marker {
  display: none;
}

.site-main:not(#_) details > summary::marker {
  content: "";
}

.site-main:not(#_) details > summary::after {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23687588' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.site-main:not(#_) details[open] > summary::after {
  transform: rotate(180deg);
}

/* One search field everywhere (BugHerd #3687), 19 Nov 2026 */
/* Reference: the header search on Employees. 38px, white, 8px corners, 1px border, 14px text, magnifier inside on the right. */
.site-main:not(#_) :is(
  input[type="search"], input[id*="search" i], input[class*="search" i], input[name*="search" i], input[placeholder^="Search" i]
):not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="button"], [type="submit"], .select2-search__field, .select2-hidden-accessible) {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding: 8px 45px 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--input-bg, #fff) !important;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: none;
}

/* Phone: search fields match the other fields (44px high, 16px text so iOS does not zoom in), 24 Nov 2026. */
@media (max-width: 767px) {
  .site-main:not(#_) :is(
    input[type="search"], input[id*="search" i], input[class*="search" i], input[name*="search" i], input[placeholder^="Search" i]
  ):not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="button"], [type="submit"], .select2-search__field, .select2-hidden-accessible) {
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }
}

/* Fields that have no magnifier of their own get one drawn on the right (18px, outline). !important beats the background shorthand some pages set on their own id. */
.site-main:not(#_) :not(:has(> :is(.icon-search-wrapper, .icon-search, .v-search-icon, [class*="search-icon"]))) > :is(
  input[type="search"], input[id*="search" i], input[class*="search" i], input[name*="search" i], input[placeholder^="Search" i]
):not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="button"], [type="submit"], .select2-search__field, .select2-hidden-accessible),
.site-main:not(#_) label > input[type="search"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23687588' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 18px 18px !important;
}

/* A left-hand icon addon beside a search input is hidden; the input keeps all four corners. */
.site-main:not(#_) .input-group:has(> input[type="search"], > input[id*="search" i]) > .input-group-text {
  display: none;
}

/* Width: 220px in header rows. */
.site-main:not(#_) :is(.hrc-page-controls, .v-content-controls, .v-controls-row) :is(.v-search-wrap, .dt-table-search-wrap, .cc-search-wrap, .search-posts-container, .whs-search-group, .hrc-digitiser-search) {
  width: 220px;
  max-width: 100%;
}

.site-main:not(#_) :is(.hrc-page-controls, .v-content-controls, .v-controls-row) > :is(input[type="search"], input[id*="search" i]) {
  flex: none;
  width: 220px;
  max-width: 100%;
}

.site-main:not(#_) :is(.hrc-page-controls, .v-content-controls, .v-controls-row) :is(.v-search-wrap, .dt-table-search-wrap, .cc-search-wrap, .search-posts-container, .whs-search-group, .hrc-digitiser-search) > input {
  width: 100%;
  max-width: 100%;
}

.site-main:not(#_) .cc-search-wrap {
  width: 220px;
}

/* Width: 280px in toolbar rows. */
.site-main:not(#_) .hf-toolbar input[type="search"],
.site-main:not(#_) .hrc-rec-toolbar input[type="search"] {
  flex: none;
  width: 280px;
  max-width: 100%;
}

.site-main:not(#_) .hrc-rec-toolbar label:has(> input[type="search"]) {
  width: 280px;
  max-width: 100%;
}

.site-main:not(#_) .hrc-lms-report-field--search,
.site-main:not(#_) .v-search-wrap:has(> #training-certification-table-search) {
  flex: none;
  width: 280px;
  max-width: 100%;
}

.site-main:not(#_) .hrc-lms-report-field--search > input {
  width: 100%;
}

/* Training & certification sets its 340px search box with !important, and Knowledge Hub sets 40px right padding on an id: both are beaten here on purpose. */
.site-main:not(#_) .v-controls-row .dt-table-search-wrap.v-search-wrap:has(> #training-certification-table-search) {
  flex: 0 0 280px !important;
  width: 280px !important;
  min-width: 0 !important;
}

.site-main:not(#_) .search-posts-container #search-posts-input {
  padding-right: 45px !important;
}

/* Row action icons draw at one size whatever their own viewBox (BugHerd #3688). */
.site-main:not(#_) .v-actions .v-action > svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

/* One palette: shared colours (colour review), 19 Nov 2026 */
/* Bootstrap defaults feed table lines (#DEE2E6), table and body text (#000000) and dropdown outlines: point them at the app palette. */
body:not(.dark-mode) {
  --bs-border-color: var(--border-color, #E9EAEC);
  --bs-border-color-translucent: var(--border-color, #E9EAEC);
  --bs-body-color: var(--text-primary, #171717);
  --bs-emphasis-color: var(--text-primary, #171717);
  --bs-heading-color: var(--text-primary, #171717);
  --bs-table-color: var(--text-primary, #171717);
  --bs-table-border-color: var(--border-color, #E9EAEC);
  --bs-dropdown-border-color: var(--border-color, #E9EAEC);
  --bs-modal-header-border-color: var(--border-color, #E9EAEC);
  --bs-modal-footer-border-color: var(--border-color, #E9EAEC);
  --bs-pagination-border-color: var(--border-color, #E9EAEC);
  --bs-list-group-border-color: var(--border-color, #E9EAEC);
  --bs-card-border-color: var(--border-color, #E9EAEC);
  --bs-nav-tabs-border-color: var(--border-color, #E9EAEC);
}

body:not(.dark-mode) :is(.site-main .table, .site-main table.dataTable, .dropdown-menu, .modal-content, .list-group, .card, .pagination, .nav-tabs) {
  --bs-table-color: var(--text-primary, #171717);
  --bs-table-border-color: var(--border-color, #E9EAEC);
  --bs-border-color: var(--border-color, #E9EAEC);
  --bs-border-color-translucent: var(--border-color, #E9EAEC);
  --bs-dropdown-border-color: var(--border-color, #E9EAEC);
  --bs-modal-header-border-color: var(--border-color, #E9EAEC);
  --bs-modal-footer-border-color: var(--border-color, #E9EAEC);
  --bs-list-group-border-color: var(--border-color, #E9EAEC);
  --bs-card-border-color: var(--border-color, #E9EAEC);
}

/* Table cells: the DataTables rule sets the line to currentcolor; use the app border colour. */
body:not(.dark-mode) .site-main:not(#_) table.dataTable > tbody > tr > td,
body:not(.dark-mode) .site-main:not(#_) .table > :not(caption) > * > * {
  border-bottom-color: var(--border-color, #E9EAEC);
}

/* Left menu: panel edge, item lines and the collapse arrow use the app border colour. */
body:not(.dark-mode) #main-sidebar {
  border-right-color: var(--border-color, #E9EAEC);
}
body:not(.dark-mode) #main-sidebar :is(#menu-sidebar li > a, .sub-menu li a, .toggle-sidebar) {
  border-bottom-color: var(--border-color, #E9EAEC);
}

/* Switches and check boxes: track, border and text colour from the palette (off-state; checked keeps orange). */
body:not(.dark-mode) :is(.form-switch .form-check-input, #input-dark-mode, input.form-check-input[type="checkbox"]) {
  border-color: var(--border-color, #E9EAEC);
  color: var(--text-primary, #171717);
}
body:not(.dark-mode) .form-switch .form-check-input:not(:checked) {
  background-color: var(--border-color, #E9EAEC);
}
body:not(.dark-mode) .form-switch .form-check-input:checked {
  border-color: var(--color-primary, #FF8030);
}
body:not(.dark-mode) input.form-check-input[type="checkbox"]:checked {
  border-color: var(--color-primary, #FF8030);
}

/* style-fix.css values overridden here (style-fix.css is not edited): pagination arrows, asset quick button, template separator line. */
div.pagination .page-numbers.previous,
div.pagination .page-numbers.next,
.hrc-asset-registry .hrc-quick-action-btn,
form hr.field-hr {
  border-color: var(--border-color, #E9EAEC);
}
form hr.field-hr {
  border-top-color: var(--border-color, #E9EAEC);
}

/* Business switcher highlight: plain grey row, no cream tint; search box text. */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--white-100, #F9F9F9);
  color: var(--text-primary, #171717);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  color: var(--text-primary, #171717);
}

/* Notification cards and profile dropdown outlines. */
.site-header .dropdown-menu,
.user-menu .dropdown-menu {
  border-color: var(--border-color, #E9EAEC);
}
.notifications-list > a.notification-link-card {
  border-color: var(--border-color, #E9EAEC);
}

/* Employees tables: the pinned action column edge (style-fix.css uses #F5F5F5). */
#employees-table-status_wrapper th.no-sort:not(.dt-mobile),
#archived-employees-table-status_wrapper th.no-sort:not(.dt-mobile),
#employees-table-status_wrapper .td-action-wrap,
#archived-employees-table-status_wrapper .td-action-wrap {
  border-left-color: var(--border-color, #E9EAEC);
}

/* Table select check boxes and the employee detail column line (set with !important / ids elsewhere). */
body:not(.dark-mode) table.dataTable input.dt-select-checkbox {
  border-color: var(--border-color, #E9EAEC) !important;
}
body:not(.dark-mode) .employee-detail-left-container {
  border-right-color: var(--border-color, #E9EAEC);
}

/* Helper class set to #E5E5E5 in parts/employees-single-create.css. */
body:not(.dark-mode) .border-bottom-gray {
  border-bottom-color: var(--border-color, #E9EAEC) !important;
}

/* Tick boxes and radio buttons stay visible: an unticked box uses the icon grey for its outline,
 * not the light divider colour (a 1px #E9EAEC square on white cannot be seen). Ticked stays orange. */
body:not(.dark-mode) .site-main:not(#_) input[type="checkbox"]:not(:checked):not(.form-check-input[role="switch"]):not(.form-switch .form-check-input),
body:not(.dark-mode) .site-main:not(#_) input[type="radio"]:not(:checked),
body:not(.dark-mode) .modal input[type="checkbox"]:not(:checked):not(.form-switch .form-check-input),
body:not(.dark-mode) dialog input[type="checkbox"]:not(:checked),
body:not(.dark-mode) table.dataTable input.dt-select-checkbox:not(:checked) {
  border-color: var(--text-muted, #687588) !important;
}

/* One palette, pass 2 (re-measure 19 Nov) */
/* style-fix.css is loaded after this file, so every selector below carries .site-main:not(#_) (or an id) to win on specificity, never on order. */

/* Bootstrap "light" background and secondary text feed bg-light boxes (#F8F9FA) and .text-muted (#6C757D). */
body:not(.dark-mode) {
  --bs-light-rgb: 249, 249, 249;
  --bs-light: #F9F9F9;
  --bs-secondary-color: var(--text-muted, #687588);
}

/* Pinned Action column cell edges (th.dtfc-fixed-end had a #F5F5F5 line). */
.site-main:not(#_) table.dataTable :is(thead, tfoot, tbody) tr > :is(.dtfc-fixed-end, .dtfc-fixed-start) {
  border-color: var(--border-color, #E9EAEC);
}

/* Unticked tick boxes and radios anywhere (dialogs and pages outside .site-main too): muted outline. Ticked ones keep the orange fill. */
body:not(.dark-mode) :is(input[type="checkbox"], input[type="radio"]):not(:checked):not([role="switch"]):not(.form-switch .form-check-input) {
  border-color: var(--text-muted, #687588) !important;
}

/* Add new user choice cards: light card border, orange only when selected. */
.site-main:not(#_) #form-confirm-user-details .form-field {
  border-color: var(--border-color, #E9EAEC);
}
.site-main:not(#_) #form-confirm-user-details .row > .form-field:has(input:checked) {
  border-color: var(--color-primary, #FF8030);
}

/* Employee view: grey link beside "Sensitive information" is an orange link. */
.site-main:not(#_) a.retention-policy-link {
  color: var(--color-primary, #FF8030) !important;
}

/* Tag text on blue info tags and grey chips: tag family colours. */
.site-main:not(#_) .notification-card .notification-tag {
  color: #0C5460;
}
.site-main:not(#_) .notification-card .notification-tag .v-badge--info { background-color: #D1ECF1; color: #0C5460; }
.site-main:not(#_) .notification-card .notification-tag .v-badge--success { background-color: #D4EDDA; color: #155724; }
.site-main:not(#_) .notification-card .notification-tag .v-badge--warning { background-color: #FFF3CD; color: #856404; }
.site-main:not(#_) .notification-card .notification-tag .v-badge--muted { background-color: #F5F5F5; color: #737373; }
body:not(.dark-mode) .v-badge-group,
body:not(.dark-mode) .v-badge-group-item,
body:not(.dark-mode) .v-badge-group-item > span:not(.v-badge) {
  color: var(--text-secondary, #737373);
}

/* Orange "subtitle" tags on Settings (Pay increments, Document alerts) use the warning family. */
.site-main:not(#_) .subtitle-card .v-badge.v-badge--primary {
  background-color: #FFF3CD;
  color: #856404;
}

/* Subscription status text. */
.site-main:not(#_) li > strong.text-success {
  color: #155724 !important;
}

/* Settings > Content partners multi-select box and its search text. */
.site-main:not(#_) .select2-container--default:not(.select2-container--focus):not(.select2-container--open) .select2-selection--multiple {
  border-color: var(--border-color, #E9EAEC);
}
.site-main:not(#_) .select2-container .select2-search--inline .select2-search__field {
  color: var(--text-primary, #171717);
}

/* Training upload drop box: grey-box background, not #E5E5E5. */
.site-main:not(#_) label.upload-document-label,
.site-main:not(#_) label.upload-document-label:hover,
.site-main:not(#_) label.upload-document-label.dragover {
  background-color: var(--white-100, #F9F9F9);
}

/* Add asset: the auto-generated (read-only) field text. */
.site-main:not(#_) .hrc-asset-registry input.form-control:disabled,
.site-main:not(#_) .hrc-asset-registry input.form-control[readonly] {
  color: var(--text-primary, #171717);
  -webkit-text-fill-color: var(--text-primary, #171717);
}

/* Onboarding: the orange Add button's border is the same orange as its fill. */
.site-main:not(#_) .hrc-page-header a.hrc-page-header__primary {
  border-color: var(--color-primary, #FF8030);
}
.site-main:not(#_) .hrc-page-header a.hrc-page-header__primary:hover {
  border-color: #ED7020;
}

/* Our Insights pagination numbers. */
.site-main:not(#_) div.pagination a.page-numbers:not(.current):not(.previous):not(.next) {
  color: var(--text-primary, #171717);
}

/* Position description form: the "Section headings" collapse button. */
.site-main:not(#_) button[data-bs-target="#hrc-position-section-headings"],
.site-main:not(#_) button[data-bs-target="#hrc-position-section-headings"] > span {
  color: var(--text-primary, #171717);
}

/* WordPress classic editor (Add position and other in-app editors): one palette for frames, toolbars, tabs and icons. */
body:not(.dark-mode) .wp-editor-container,
body:not(.dark-mode) .mce-tinymce,
body:not(.dark-mode) .mce-panel,
body:not(.dark-mode) .mce-statusbar,
body:not(.dark-mode) .mce-toolbar-grp,
body:not(.dark-mode) .quicktags-toolbar,
body:not(.dark-mode) .wp-switch-editor {
  border-color: var(--border-color, #E9EAEC) !important;
}
body:not(.dark-mode) .mce-toolbar-grp,
body:not(.dark-mode) .mce-toolbar-grp .mce-toolbar,
body:not(.dark-mode) .mce-toolbar-grp .mce-btn-group,
body:not(.dark-mode) .mce-statusbar,
body:not(.dark-mode) .quicktags-toolbar,
body:not(.dark-mode) .wp-editor-tools {
  background: var(--white-100, #F9F9F9) !important;
}
body:not(.dark-mode) .mce-toolbar .mce-ico,
body:not(.dark-mode) .mce-toolbar .mce-btn,
body:not(.dark-mode) .mce-toolbar .mce-btn button,
body:not(.dark-mode) .mce-toolbar .mce-txt,
body:not(.dark-mode) .mce-statusbar .mce-path-item,
body:not(.dark-mode) .quicktags-toolbar input.button {
  color: var(--text-muted, #687588) !important;
}
body:not(.dark-mode) .wp-switch-editor {
  background: transparent !important;
  color: var(--text-muted, #687588) !important;
}
body:not(.dark-mode) .html-active .switch-html,
body:not(.dark-mode) .tmce-active .switch-tmce {
  background: var(--white, #fff) !important;
  color: var(--text-muted, #687588) !important;
}

/* Top bar: the icon for the page you are on is the same outline icon in orange,
 * with no filled square behind it (tasks, calendar and bell behave alike). */
body:not(.dark-mode) .header-icon-link.active,
body:not(.dark-mode) .my-task-label.active {
  background-color: transparent !important;
  color: var(--color-primary, #FF8030) !important;
}

body:not(.dark-mode) :is(.header-icon-link.active, .my-task-label.active) svg :is(path, rect, polyline, line, circle) {
  stroke: var(--color-primary, #FF8030) !important;
}

/* WHS report titles that open the report are normal dark links in the table. */
.site-main:not(#_) #whs-my-reports-table td a,
.site-main:not(#_) #whs-my-reports-table td .whs-title-text {
  color: var(--text-primary, #171717);
}

/* UI standards fixes (BugHerd #3767, #3769), 19 Nov 2026 - employee dashboard: card titles use the card title size, task headings use the shared border colour. */
.site-main:not(#_) .hrc-dash-card-title {
  font-size: 16px;
  font-weight: 700;
}
.site-main:not(#_) #my-tasks h4.task__title,
.site-main:not(#_) .hrc-comms-ess-tasks h4.task__title {
  border-bottom-color: var(--border-color, #E9EAEC);
}

/* Templates: the Admin tools box only shows while its copy toolbar is in use (rows ticked); otherwise it was an empty bordered box (BugHerd #3573). */
.site-main:not(#_) .hrc-template-admin-tools:has(> #hrc-template-copy-toolbar[hidden]):not(:has(> .hrc-lgnsw-tools)) {
  display: none;
}

/* Collapse card (BugHerd #3898), 20 Nov 2026 */
/* The shared fold-open card: a white bordered card (1px, 12px corners, 16px 24px padding) whose header row is the title in bold with the shared outline chevron at the right (down when closed, up when open); the content shows inside the card when open.
 * Markup: <details class="hrc-collapse-card"><summary>Title</summary> content </details>. The chevron comes from the shared "details > summary" rule above.
 * Same look as the Performance reviewer panels and the Workforce Setup group boxes. */
.site-main:not(#_) details.hrc-collapse-card {
  box-sizing: border-box;
  min-width: 0;
  margin: 0 0 16px;
  padding: 16px 24px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: none;
}

.site-main:not(#_) details.hrc-collapse-card > summary {
  min-height: 32px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary, #171717);
}

.site-main:not(#_) details.hrc-collapse-card > summary > :is(h2, h3, h4) {
  margin: 0;
  font-weight: 700;
}

.site-main:not(#_) details.hrc-collapse-card[open] > summary {
  margin-bottom: 16px;
}

/* Employee view page (BugHerd #3898, #3899, #3900): the older Bootstrap fold-open rows (a header row plus a .collapse body) draw as the same card. */
.site-main:not(#_) .hrc-employee-view .employee-detail-section {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin: 0 0 16px !important;
  padding: 16px 24px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color) !important;
  border-radius: 12px;
  cursor: pointer;
}

.site-main:not(#_) .hrc-employee-view .employee-detail-section:not(.collapsed) {
  margin-bottom: 0 !important;
  border-bottom-color: transparent !important;
  border-radius: 12px 12px 0 0;
}

.site-main:not(#_) .hrc-employee-view .employee-detail-section .employee-detail-title {
  margin: 0;
  font-weight: 700;
}

.site-main:not(#_) .hrc-employee-view .employee-detail-section .arrow-icon {
  display: none;
}

.site-main:not(#_) .hrc-employee-view .employee-detail-section::after {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23687588' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.site-main:not(#_) .hrc-employee-view .employee-detail-section:not(.collapsed)::after {
  transform: rotate(180deg);
}

.site-main:not(#_) .hrc-employee-view .employee-detail-section + :is(.collapse.show, .collapsing) {
  margin: 0 0 16px;
  padding: 0 24px 16px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

/* User management > Employee profiles form: standard dropdowns and one baseline (BugHerd #3897), 20 Nov 2026 */
/* Select2 sized its box to the original select (156px) so the text clipped under the chevron. Fill the column, 38px, text clear of the chevron. */
.site-main:not(#_) #hrc-employee-status-form .select2-container {
  width: 100% !important;
  display: block;
  height: 38px;
}

.site-main:not(#_) #hrc-employee-status-form .select2-selection--single {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--input-bg, #fff);
}

.site-main:not(#_) #hrc-employee-status-form .select2-selection--single .select2-selection__rendered {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 36px 0 12px;
  font-size: 14px;
  line-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-main:not(#_) #hrc-employee-status-form .select2-selection--single .select2-selection__arrow {
  position: absolute;
  top: 0;
  right: 8px;
  width: 20px;
  height: 36px;
}

.site-main:not(#_) #hrc-employee-status-form .form-label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
}

.site-main:not(#_) #hrc-employee-status-form button[type="submit"] {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.site-main:not(#_) #hrc-employee-status-form #hrc-employee-status-message {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Page card minimum height (BugHerd #3918): short pages fill at least 70% of the window. Dashboard excluded. */
body:not(.home) .main-content > .content-body {
  min-height: 70vh;
}
