/* Payroll design system — authoritative shared UI layer.
   Page-specific layout remains in base.css; shared colours and controls live here. */
:root {
    --ds-navy: #19324A;
    --ds-sidebar: #23496E;
    --ds-sidebar-active: #087F7B;
    --ds-teal: #006D6F;
    --ds-teal-hover: #005A5C;
    --ds-plum: #8C4260;
    --ds-plum-hover: #74344E;
    --ds-page: #FAF9F6;
    --ds-surface: #FFFFFF;
    --ds-surface-soft: #F5F7F1;
    --ds-text: #2F3437;
    --ds-muted: #52605B;
    --ds-border: #D7DED0;
    --ds-sage: #A3B18A;
    --ds-success: #17603E;
    --ds-success-bg: #EAF6EF;
    --ds-warning: #7A4B00;
    --ds-warning-bg: #FFF4D6;
    --ds-danger: #8B2F29;
    --ds-danger-bg: #FDEDEC;
    --ds-info: #174F78;
    --ds-info-bg: #EAF3FA;
    --ds-radius-sm: 4px;
    --ds-radius: 6px;
    --ds-radius-lg: 8px;
    --ds-shadow: 0 8px 24px rgba(25, 50, 74, 0.08);
    --ds-focus: 0 0 0 3px rgba(0, 109, 111, 0.34);
}

/* Pay Setup calculation explainer */
.pay-setup-calculation-explainer {
  grid-column: 1 / -1;
  margin-top: 18px;
  overflow: hidden;
  color: #0b2b45;
  background: #fff;
  border: 1px solid #cbd8e4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 43, 69, .07);
}

.pay-setup-calculation-explainer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  color: #fff;
  background: #1c6cac;
}

body.employer-site .pay-setup-calculation-explainer__header h3 {
  margin: 2px 0 4px;
  color: #fff !important;
  font-size: 20px;
  line-height: 1.25;
}

.pay-setup-calculation-explainer__header p {
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
}

.pay-setup-calculation-explainer__eyebrow {
  display: block;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pay-setup-calculation-explainer__status {
  flex: 0 0 auto;
  padding: 5px 10px;
  color: #1c6cac;
  background: #eff7fe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.pay-setup-calculation-explainer__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #eff7fe;
  border-bottom: 1px solid #cbd8e4;
}

.pay-setup-calculation-explainer__summary > div {
  padding: 16px 22px;
  border-right: 1px solid #cbd8e4;
}

.pay-setup-calculation-explainer__summary > div:last-child {
  border-right: 0;
}

.pay-setup-calculation-explainer__summary span,
.pay-setup-calculation-explainer__summary strong {
  display: block;
}

.pay-setup-calculation-explainer__summary span {
  color: #536b7c;
  font-size: 12px;
}

.pay-setup-calculation-explainer__summary strong {
  margin-top: 4px;
  color: #1c6cac;
  font-size: 18px;
}

.pay-setup-calculation-explainer__sections {
  padding: 12px 18px 4px;
}

.pay-setup-calculation-explainer details {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #dbe4ec;
  border-radius: 7px;
}

.pay-setup-calculation-explainer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  color: #0b2b45;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.pay-setup-calculation-explainer details[open] > summary {
  color: #1c6cac;
  background: #eff7fe;
  border-bottom: 1px solid #dbe4ec;
}

.pay-setup-calculation-explainer summary strong {
  white-space: nowrap;
}

.pay-setup-calculation-explainer__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 10px 15px;
  border-top: 1px solid #e8eef3;
  font-size: 13px;
  line-height: 1.35;
}

.pay-setup-calculation-explainer__row:first-of-type {
  border-top: 0;
}

.pay-setup-calculation-explainer__row small {
  display: block;
  margin-top: 2px;
  color: #607689;
  font-size: 11px;
}

.pay-setup-calculation-explainer__row > strong {
  text-align: right;
  white-space: nowrap;
}

.pay-setup-calculation-explainer__row--total {
  color: #0b2b45;
  background: #f7fafc;
}

.ordinary-pay-rate-details {
  margin: 0 15px 12px;
  overflow: hidden;
  background: #f7fbfe;
  border: 1px solid #cbd8e4;
  border-left: 4px solid #1c6cac;
  border-radius: 7px;
}

.ordinary-pay-rate-details__intro {
  padding: 11px 13px;
  color: #0b2b45;
  background: #eff7fe;
}

.ordinary-pay-rate-details__intro > strong,
.ordinary-pay-rate-details__intro > span,
.ordinary-pay-rate-details__intro > small,
.ordinary-pay-rate-details__portion small {
  display: block;
}

.ordinary-pay-rate-details__intro > span,
.ordinary-pay-rate-details__intro > small,
.ordinary-pay-rate-details__portion small {
  margin-top: 3px;
  color: #536b7c;
  font-size: 11px;
}

.ordinary-pay-rate-details__portion,
.ordinary-pay-rate-details__total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 9px 13px;
  border-top: 1px solid #dbe4ec;
  font-size: 12px;
  line-height: 1.35;
}

.ordinary-pay-rate-details__portion > strong,
.ordinary-pay-rate-details__total > strong {
  text-align: right;
  white-space: nowrap;
}

.ordinary-pay-rate-details__total {
  color: #0b2b45;
  background: #fff;
  font-weight: 700;
}

.pay-setup-calculation-explainer__comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 12px 15px;
}

.pay-setup-calculation-explainer__comparison > div {
  padding: 12px 14px;
  background: #eff7fe;
  border-radius: 7px;
}

.pay-setup-calculation-explainer__comparison span,
.pay-setup-calculation-explainer__comparison strong {
  display: block;
}

.pay-setup-calculation-explainer__comparison span {
  color: #536b7c;
  font-size: 11px;
}

.pay-setup-calculation-explainer__comparison strong {
  margin-top: 4px;
  color: #1c6cac;
}

.pay-setup-calculation-explainer__notice {
  margin: 10px 15px;
  padding: 10px 12px;
  color: #0b2b45;
  background: #eff7fe;
  border-left: 3px solid #1c6cac;
  font-size: 12px;
  line-height: 1.4;
}

.pay-setup-calculation-explainer__notice--warning {
  color: #7a4a00;
  background: #fff4d8;
  border-left-color: #d88a00;
}

.pay-setup-calculation-explainer__footnote {
  margin: 0;
  padding: 12px 22px 16px;
  color: #607689;
  font-size: 12px;
}

@media (max-width: 700px) {
  .pay-setup-calculation-explainer__header {
    flex-direction: column;
  }

  .pay-setup-calculation-explainer__summary {
    grid-template-columns: 1fr;
  }

  .pay-setup-calculation-explainer__summary > div {
    border-right: 0;
    border-bottom: 1px solid #cbd8e4;
  }

  .pay-setup-calculation-explainer__summary > div:last-child {
    border-bottom: 0;
  }

  .pay-setup-calculation-explainer__comparison {
    grid-template-columns: 1fr;
  }

  .pay-setup-calculation-explainer__comparison > span {
    text-align: center;
    transform: rotate(90deg);
  }
}

.uif-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.uif-inline-form select,
.uif-form-grid input,
.uif-form-grid select {
    min-height: 42px;
    border: 1px solid #d7e0e8;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.uif-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin: 16px 0;
}

.uif-form-grid .form-group,
.uif-form-grid label,
.uif-form-grid input,
.uif-form-grid select {
    display: block;
    width: 100%;
}

.uif-form-grid small,
.uif-export-row span,
.uif-export-row small {
    display: block;
    color: #5f6f7d;
    margin-top: 4px;
}

.uif-export-row {
    border-top: 1px solid #e5ebf0;
    padding: 16px 0;
}

@media (max-width: 720px) {
    .uif-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Monthly Payroll option 4: current run beside compact payroll records. */
.payroll-run-admin-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.payroll-run-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}
.payroll-run-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #B7C7D5;
    border-radius: 6px;
    box-shadow: 0 8px 19px rgba(25, 50, 74, .10), 0 2px 4px rgba(25, 50, 74, .05);
}
.payroll-run-panel-heading {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 21px 15px;
    background: #F2F7FC;
    border-top: 3px solid #2F72A8;
    border-bottom: 1px solid #D7E2EA;
}
.payroll-run-current .payroll-run-panel-heading {
    background: #F0F8F7;
    border-top-color: #087F7B;
}
.payroll-run-panel-heading > div > span {
    display: block;
    margin-bottom: 4px;
    color: #5F7587;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.payroll-run-panel-heading h2 {
    margin: 0;
    color: #19324A;
    font-size: 20px;
    font-weight: 600;
}
.payroll-run-employer {
    margin: 16px 21px 0;
    color: #52697D;
    font-size: 12px;
}
.payroll-run-summary {
    margin: 0;
    padding: 8px 21px 15px;
}
.payroll-run-summary > div {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #E1E8ED;
}
.payroll-run-summary dt,
.payroll-run-summary dd { margin: 0; }
.payroll-run-summary dt {
    color: #52697D;
    font-size: 13px;
    font-weight: 400;
}
.payroll-run-summary dd {
    color: #19324A;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}
.payroll-run-primary-action {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: auto 21px 21px;
    border-radius: 4px;
    font-weight: 400 !important;
}
.payroll-run-empty {
    min-height: 191px;
    display: flex;
    align-items: center;
    padding: 28px 21px;
}
.payroll-run-empty p {
    max-width: 340px;
    margin: 0;
    color: #5E7385;
    font-size: 13px;
    line-height: 1.6;
}
.payroll-run-past .table-responsive { padding: 5px 20px 17px; }
.payroll-run-past .table-responsive { margin-bottom: auto; }
.payroll-run-history-page {
    width: 100%;
    max-width: none;
}
.payroll-run-past .dashboard-run-button.payroll-run-history-action {
    color: #FFFFFF !important;
    background: #2F72A8 !important;
    border-color: #2F72A8 !important;
}
.payroll-run-past .dashboard-run-button.payroll-run-history-action:not([disabled]):not(.disabled):hover,
.payroll-run-past .dashboard-run-button.payroll-run-history-action:not([disabled]):not(.disabled):focus {
    color: #FFFFFF !important;
    background: #255F8E !important;
    border-color: #255F8E !important;
}
.payroll-run-table { margin-bottom: 0; }
.payroll-run-table > thead > tr > th {
    padding: 12px 10px;
    color: #52697D;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid #D7E0E7;
}
.payroll-run-table > tbody > tr > td {
    padding: 14px 10px;
    color: #243F53;
    font-size: 13px;
    vertical-align: middle;
    border-top: 0;
    border-bottom: 1px solid #E1E8ED;
}
.payroll-run-table > tbody > tr:last-child > td { border-bottom: 0; }
.payroll-run-table .btn {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 4px;
    font-weight: 400 !important;
}
.payroll-run-past-empty { padding: 28px 12px; }

@media (max-width: 1080px) {
    .payroll-run-overview { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .payroll-run-panel-heading { align-items: flex-start; flex-direction: column; }
    .payroll-run-past .table-responsive { padding-right: 13px; padding-left: 13px; }
    .payroll-run-summary { padding-right: 17px; padding-left: 17px; }
    .payroll-run-primary-action { margin-right: 17px; margin-left: 17px; }
    .payroll-run-table > thead > tr > th,
    .payroll-run-table > tbody > tr > td { padding-right: 6px; padding-left: 6px; }
}

html { color: var(--ds-text); background: var(--ds-page); }
body { color: var(--ds-text); background: var(--ds-page); }
h1, h2, h3, h4, h5, h6 { color: var(--ds-navy); }
p, li, dd, td { color: inherit; }
a { color: var(--ds-teal); }
a:hover, a:focus { color: var(--ds-teal-hover); }

/* Navigation */
.app-sidebar { color: #FFFFFF; background: var(--ds-sidebar); }
.app-sidebar a { color: #FFFFFF; border-radius: var(--ds-radius-sm); }
.app-sidebar a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.10); }
.app-sidebar a.active,
.app-sidebar a[aria-current="page"] {
    color: #FFFFFF;
    background: var(--ds-sidebar-active);
    box-shadow: inset 3px 0 0 #C8D8B6;
}
.nav-logout__button { color: #FFFFFF; }

/* Buttons: teal primary, neutral secondary, semantic success/danger. */
.btn,
button,
input[type="button"],
input[type="submit"] {
    border-radius: var(--ds-radius-sm);
    font-weight: 400 !important;
    text-transform: capitalize !important;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-run-button,
.regular-input-add,
.action-button,
.dashboard-action-button--payroll,
.dashboard-action-button--secondary {
    font-weight: 400 !important;
    text-transform: capitalize !important;
}
.btn-primary,
.dashboard-run-button,
.regular-input-add,
.action-button,
.dashboard-action .dashboard-action-button--payroll {
    color: #FFFFFF !important;
    background: var(--ds-teal) !important;
    border-color: var(--ds-teal) !important;
}
.btn-primary:not([disabled]):not(.disabled):hover,
.dashboard-run-button:not([disabled]):not(.disabled):hover,
.regular-input-add:not([disabled]):not(.disabled):hover,
.action-button:not([disabled]):not(.disabled):hover,
.dashboard-action .dashboard-action-button--payroll:hover {
    color: #FFFFFF !important;
    background: var(--ds-teal-hover) !important;
    border-color: var(--ds-teal-hover) !important;
}
.btn-default,
.login-register .btn {
    color: var(--ds-navy) !important;
    background: var(--ds-surface) !important;
    border-color: var(--ds-border) !important;
}
.btn-default:not([disabled]):not(.disabled):hover,
.login-register .btn:hover {
    color: var(--ds-navy) !important;
    background: var(--ds-surface-soft) !important;
    border-color: var(--ds-sage) !important;
}
.btn-success {
    color: #FFFFFF !important;
    background: var(--ds-success) !important;
    border-color: var(--ds-success) !important;
}
.btn-danger {
    color: #FFFFFF !important;
    background: var(--ds-danger) !important;
    border-color: var(--ds-danger) !important;
}
.dashboard-action .dashboard-action-button--secondary {
    color: var(--ds-plum) !important;
    background: var(--ds-surface) !important;
    border-color: var(--ds-plum) !important;
}
.dashboard-action .dashboard-action-button--secondary:hover {
    color: var(--ds-plum-hover) !important;
    background: #F9F4F6 !important;
    border-color: var(--ds-plum-hover) !important;
}
.btn[disabled], .btn.disabled, button[disabled], input[disabled] {
    cursor: not-allowed;
    opacity: 0.58;
}

/* Forms */
label, legend { color: var(--ds-navy); font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
    color: var(--ds-text);
    background: var(--ds-surface);
    border-color: var(--ds-border);
    border-radius: var(--ds-radius-sm);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
select:focus,
textarea:focus {
    border-color: var(--ds-teal);
    box-shadow: var(--ds-focus);
}
.help-block, .form-text, .text-muted, small { color: var(--ds-muted); }
.errorlist, .has-error label, .has-error .help-block { color: var(--ds-danger); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--ds-danger); }

/* Shared containers */
.card,
.panel,
.dashboard-card,
.employees-list-card,
.settings-card,
.user-management-card {
    background: var(--ds-surface);
    border-color: var(--ds-border);
    border-radius: var(--ds-radius);
}
.panel, .dashboard-card, .settings-card { box-shadow: var(--ds-shadow); }
.panel-heading, .card-header { color: var(--ds-navy); border-color: var(--ds-border); }

/* Tables */
.table, table { color: var(--ds-text); background: var(--ds-surface); }
.table > thead > tr > th,
table thead th {
    color: var(--ds-navy);
    background: var(--ds-surface-soft);
    border-color: var(--ds-border);
}
.table > tbody > tr > td,
table tbody td { border-color: var(--ds-border); }
.table-striped > tbody > tr:nth-of-type(odd) { background: #FCFCFA; }
.table-hover > tbody > tr:hover { background: #F2F6F3; }

/* Messages and statuses */
.alert { border-radius: var(--ds-radius); }
.alert-success { color: var(--ds-success); background: var(--ds-success-bg); border-color: #B9D9C5; }
.alert-warning { color: var(--ds-warning); background: var(--ds-warning-bg); border-color: #E8CF8B; }
.alert-danger, .alert-error { color: var(--ds-danger); background: var(--ds-danger-bg); border-color: #E7B9B5; }
.alert-info { color: var(--ds-info); background: var(--ds-info-bg); border-color: #BCD6E8; }
.badge-success, .status-success, .employee-ready-status { color: var(--ds-success); background: var(--ds-success-bg); }
.badge-warning, .status-warning { color: var(--ds-warning); background: var(--ds-warning-bg); }
.badge-danger, .status-danger { color: var(--ds-danger); background: var(--ds-danger-bg); }

/* High-contrast headings retained from Round 1. */
.payroll-review-heading { color: #FFFFFF !important; background: var(--ds-sidebar) !important; }
.payroll-review-heading h2,
.payroll-review-heading small { color: #FFFFFF !important; }
.login-brand .login-mark { color: var(--ds-navy); }
.login-form .alert,
.login-form .alert .errorlist,
.login-form .alert strong,
.login-form .alert li { color: var(--ds-danger); }

/* Keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(0, 109, 111, 0.42);
    outline-offset: 2px;
}
.app-sidebar a:focus-visible,
.nav-logout__button:focus-visible { outline-color: #BDEFF1; }

@media (max-width: 767px) {
    .btn, button, input[type="button"], input[type="submit"] { min-height: 42px; }
    .table-responsive { border-color: var(--ds-border); border-radius: var(--ds-radius-sm); }
}

/* Employee Records table: scoped to the employer Employees page. */
.employees-route .employee-records-card {
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #B7C7D5;
    border-radius: 6px;
    box-shadow: 0 8px 19px rgba(25, 50, 74, .10), 0 2px 4px rgba(25, 50, 74, .05);
}
.employees-route .employee-records-card::before {
    display: block;
    height: 3px;
    content: "";
    background: #31D2F7;
}
.employees-route .employee-records-header {
    padding: 21px 24px 15px;
}
.employees-route .employee-records-header h2 {
    margin: 0 0 4px;
    color: #19324A;
    font-size: 21px;
    font-weight: 600;
}
.employees-route .employee-records-header p {
    margin: 0;
    color: #65788A;
    font-size: 13px;
}
.employees-route .employee-records-table-wrap {
    overflow-x: auto;
    padding: 0 24px 22px;
}
.employees-route .employee-records-table {
    width: 100%;
    min-width: 900px;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}
.employees-route .employee-records-table th {
    padding: 12px 14px;
    color: #52697D;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #D7E0E7;
}
.employees-route .employee-records-table td {
    padding: 16px 14px;
    color: #243F53;
    font-size: 13px;
    vertical-align: middle;
    border-bottom: 1px solid #E1E8ED;
}
.employees-route .employee-records-table tbody tr:last-child td { border-bottom: 0; }
.employees-route .employee-records-table tbody tr:hover { background: #F8FAFB; }
.employees-route .employee-records-table th:nth-child(1) { width: 18%; }
.employees-route .employee-records-table th:nth-child(2) { width: 15%; }
.employees-route .employee-records-table th:nth-child(3) { width: 13%; }
.employees-route .employee-records-table th:nth-child(4) { width: 15%; }
.employees-route .employee-records-table th:nth-child(5) { width: 12%; }
.employees-route .employee-records-table th:nth-child(6) { width: 27%; }
.employees-route .employee-record-name {
    display: inline-block;
    color: #19324A;
    font-weight: 700;
}
.employees-route .employee-record-name:hover,
.employees-route .employee-record-name:focus { color: #087F7B; }
.employees-route .employee-record-detail {
    display: block;
    margin-top: 5px;
    color: #65788A;
    font-size: 11px;
    line-height: 1.35;
}
.employees-route .employee-record-money { white-space: nowrap; }
.employees-route .employee-employment-status {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 10px;
    color: #176B4B;
    background: #E9F6EF;
    border: 1px solid #B9D9C5;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}
.employees-route .employee-employment-status.is-inactive {
    color: #596A79;
    background: #F1F4F6;
    border-color: #CED7DE;
}
.employees-route .employee-record-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.employees-route .employee-record-actions form {
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.employees-route .employee-record-actions .btn,
.employees-route .employee-record-actions .dashboard-run-button {
    min-height: 40px;
    margin: 0;
    padding: 9px 13px;
    border-radius: 4px;
    font-weight: 400 !important;
    line-height: 1.42857143;
    white-space: nowrap;
}
.employees-route .employee-record-actions-heading,
.employees-route .employee-record-actions-cell { text-align: left; }
.employees-route .employee-record-actions { justify-content: flex-start; gap: 6px; }
.employees-route .employee-record-actions .btn,
.employees-route .employee-record-actions .dashboard-run-button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px !important;
}
.employees-route .employee-record-actions .employee-view-edit-action {
    display: inline-flex;
    width: 34px;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.employees-route .employee-view-edit-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 1050px) {
    .employees-route .employee-records-table { min-width: 820px; }
    .employees-route .employee-records-table th,
    .employees-route .employee-records-table td { padding-right: 10px; padding-left: 10px; }
}

/* Income History employee selector */
.income-history-page {
    width: 100%;
    max-width: none;
}

.income-history-selector-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid #C9D9E5;
    border-radius: 6px;
    background: #FFFFFF;
    box-shadow: 0 7px 18px rgba(18, 63, 99, 0.1);
}

.income-history-selector-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: #2F76AD;
}

.income-history-selector-card header h2,
.income-history-selected-employee h3 {
    margin: 0;
    color: #123F63;
}

.income-history-selector-card header p,
.income-history-selected-employee p {
    margin: 7px 0 0;
    color: #405C73;
}

.income-history-selector-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 20px;
}

.income-history-selector-form label {
    display: block;
    margin-bottom: 7px;
    color: #123F63;
    font-weight: 600;
}

.income-history-selector-form select {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #BFD0DC;
    border-radius: 5px;
    color: #123F63;
    background: #FFFFFF;
}

.income-history-view-button {
    min-height: 44px;
}

.income-history-selected-employee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 16px 18px;
    border-left: 4px solid #087F7B;
    border-radius: 4px;
    background: #EDF8F6;
}

@media (max-width: 640px) {
    .income-history-selector-card {
        padding: 20px 16px;
    }

    .income-history-selector-row {
        grid-template-columns: 1fr;
    }

    .income-history-selected-employee {
        align-items: stretch;
        flex-direction: column;
    }

    .income-history-view-button,
    .income-history-selected-employee .btn {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .employees-route .employee-records-card { overflow: visible; background: transparent; border: 0; box-shadow: none; }
    .employees-route .employee-records-card::before { display: none; }
    .employees-route .employee-records-header { padding: 0 0 12px; }
    .employees-route .employee-records-table-wrap { overflow: visible; padding: 0; }
    .employees-route .employee-records-table,
    .employees-route .employee-records-table tbody,
    .employees-route .employee-records-table tr,
    .employees-route .employee-records-table td { display: block; width: 100%; min-width: 0; }
    .employees-route .employee-records-table thead { display: none; }
    .employees-route .employee-records-table tr {
        position: relative;
        margin-bottom: 14px;
        overflow: hidden;
        background: #FFFFFF;
        border: 1px solid #B7C7D5;
        border-radius: 6px;
        box-shadow: 0 7px 16px rgba(25, 50, 74, .09);
    }
    .employees-route .employee-records-table tr::before {
        display: block;
        height: 3px;
        content: "";
        background: linear-gradient(90deg, #087F7B, #76B9B0);
    }
    .employees-route .employee-records-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        padding: 11px 14px;
        border-bottom: 1px solid #E1E8ED;
    }
    .employees-route .employee-records-table td::before {
        color: #52697D;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
    }
    .employees-route .employee-records-table .employee-record-actions-cell { display: block; }
    .employees-route .employee-records-table .employee-record-actions-cell::before { display: block; margin-bottom: 9px; }
    .employees-route .employee-record-actions { align-items: stretch; justify-content: flex-start; flex-direction: column; }
    .employees-route .employee-record-actions .btn,
    .employees-route .employee-record-actions .dashboard-run-button,
    .employees-route .employee-record-actions form,
    .employees-route .employee-record-actions form .btn { width: 100%; justify-content: center; }
}

/* Round 4: structured standby capture and privacy-safe reporting. */
.standby-shift-form-card {
    max-width: 980px;
}

.standby-active-work-heading {
    margin: 22px 0 12px;
}

.standby-active-work-heading h2 {
    margin: 0 0 4px;
    color: #173f5a;
    font-size: 18px;
}

.standby-active-work-heading p {
    margin: 0;
    color: #52697d;
}

.standby-active-work-row {
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid #c8d5df;
    border-radius: var(--ds-radius);
    background: #f7fafc;
}

.standby-active-work-row legend {
    padding: 0 7px;
    color: #294d68;
    font-size: 14px;
    font-weight: 600;
}

.standby-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.employee-input-row--standby {
    border-left: 3px solid #4a75a8;
}

.employee-input-row--standby small {
    display: block;
    margin-top: 2px;
    color: #607487;
    font-weight: 400;
}

.employee-input-row--standby strong {
    color: #315f8f;
}

.night-work-compliance-report .report-balance-grid {
    margin-bottom: 16px;
}

@media (max-width: 700px) {
    .standby-active-work-row {
        padding: 12px;
    }

    .standby-form-actions .btn {
        width: 100%;
    }
}

/* Employment agreement workflow */
.agreement-intro-card,
.agreement-form-card,
.agreement-history-card,
.agreement-summary-card,
.agreement-compliance-card {
    background: #fff;
    border: 1px solid #c9d7e2;
    border-radius: 6px;
    box-shadow: 0 5px 16px rgba(24, 55, 79, .08);
}

.agreement-intro-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-top: 4px solid #1a6986;
}

.agreement-intro-card h2,
.agreement-history-card h2,
.agreement-summary-card h2,
.agreement-compliance-card h2,
.agreement-form-card h2 { margin: 4px 0 8px; color: #173f5a; }
.agreement-intro-card p { margin: 0; color: #4b6176; }
.agreement-kicker { color: #1a6986; font-size: 13px; font-weight: 600; }
.agreement-status { min-width: 170px; padding: 10px 14px; background: #f2f7fc; border: 1px solid #cbdde9; border-radius: 5px; }
.agreement-status span { display: block; color: #607487; font-size: 12px; }
.agreement-status strong { display: block; color: #173f5a; font-size: 16px; margin-top: 3px; }
.agreement-actions, .agreement-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.agreement-form-actions form { margin: 0; }
.agreement-history-card, .agreement-compliance-card, .agreement-form-card { padding: 22px 24px; }
.agreement-history-row { display: grid; grid-template-columns: .55fr 1.15fr 1fr .8fr .7fr; gap: 12px; align-items: center; padding: 12px 10px; border-top: 1px solid #dbe4eb; }
.agreement-history-row--head { border-top: 0; background: #f2f7fc; color: #3c556b; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.agreement-guidance { display: flex; flex-direction: column; gap: 3px; margin: 0 0 16px; padding: 14px 16px; color: #214d66; background: #edf7f8; border-left: 4px solid #2b7a78; }
.agreement-form-card section + section { margin-top: 22px; padding-top: 16px; border-top: 1px solid #dbe4eb; }
.agreement-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agreement-field { margin: 0 0 15px; }
.agreement-field > label:not(.agreement-checkbox) { display: block; margin-bottom: 5px; color: #20384c; font-weight: 600; }
.agreement-field input[type="text"], .agreement-field input[type="date"], .agreement-field input[type="number"], .agreement-field select, .agreement-field textarea { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #aebfcd; border-radius: 4px; background: #fff; }
.agreement-field textarea { min-height: 70px; resize: vertical; }
.agreement-field ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 0; list-style: none; }
.agreement-field ul label, .agreement-checkbox, .agreement-confirm { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.agreement-field small { display: block; color: #607487; margin-top: 4px; }
.agreement-field--error input, .agreement-field--error select, .agreement-field--error textarea { border-color: #b42318; }
.field-error { display: block; color: #9b2c2c; margin-top: 4px; }
.agreement-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.agreement-summary-card { padding: 19px 20px; }
.agreement-checklist { margin: 0; padding: 0; list-style: none; columns: 2; }
.agreement-checklist li { break-inside: avoid; margin: 0 0 8px; color: #314b5f; }
.agreement-checklist li::before { content: "\2713"; color: #2b7a78; font-weight: 700; margin-right: 7px; }
.agreement-key-terms { display: grid; grid-template-columns: 1fr 1.2fr; margin: 0; }
.agreement-key-terms dt, .agreement-key-terms dd { margin: 0; padding: 7px 0; border-bottom: 1px solid #e2e9ee; }
.agreement-key-terms dt { color: #607487; font-weight: 400; }
.agreement-key-terms dd { color: #1f3344; font-weight: 600; }
.agreement-result, .agreement-issue { border: 1px solid; border-radius: 5px; padding: 13px 15px; margin: 12px 0; }
.agreement-result { display: flex; flex-direction: column; gap: 2px; }
.agreement-result--pass { background:#f2f7ee; border-color:#b7d3a7; color:#315a29; }
.agreement-result--warning, .agreement-issue--warning { background:#fff8e8; border-color:#e9c778; color:#694a12; }
.agreement-result--block, .agreement-issue--block { background:#fff1f1; border-color:#e2aaaa; color:#782626; }
.agreement-issue--info { background:#f2f7fc; border-color:#bfd3e4; color:#294f6e; }
.agreement-issue h2, .agreement-issue h3 { margin: 0 0 5px; color: inherit; font-size: 16px; }
.agreement-issue p { margin: 0 0 8px; }
.agreement-confirm { padding-top: 7px; border-top: 1px solid rgba(105,74,18,.18); }
.agreement-disclaimer { color:#607487; font-size:12px; }
.agreement-hash { overflow-wrap:anywhere; font-family:monospace; }
.agreement-compliance-summary > h2 { margin-bottom: 14px; }
.agreement-review-status {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 12px;
    border-left: 4px solid;
    border-radius: 4px;
    font-size: 14px;
}
.agreement-review-status--block { background: #fff1f1; border-color: #b42318; color: #782626; }
.agreement-review-status--warning { background: #fff8e8; border-color: #c17d00; color: #694a12; }
.agreement-review-status--pass { background: #f2f7ee; border-color: #4f7b3b; color: #315a29; }
.agreement-review-group { margin-top: 17px; }
.agreement-review-group h3 { margin: 0 0 8px; color: #173f5a; font-size: 15px; }
.agreement-review-points { margin: 0; padding: 0; list-style: none; }
.agreement-review-points > li {
    position: relative;
    padding: 9px 0 9px 20px;
    border-top: 1px solid #e2e9ee;
    color: #314b5f;
}
.agreement-review-points > li:first-child { border-top: 0; }
.agreement-review-points > li::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #698196;
}
.agreement-review-points--block > li::before { background: #b42318; }
.agreement-review-points--warning > li::before { background: #c17d00; }
.agreement-review-points > li > div { display: inline; }
.agreement-review-points > li > div strong { color: inherit; }
.agreement-review-points > li > div span::before { content: " — "; }
.agreement-review-link { display: inline-block; margin-left: 8px; font-weight: 600; }
.agreement-review-confirmations label { display: flex; align-items: flex-start; gap: 9px; margin: 0; font-weight: 400; }
.agreement-review-confirmations input[type="checkbox"] { flex: 0 0 auto; margin-top: 3px; }
.agreement-review-confirmations small { display: block; margin-top: 2px; color: #52697d; font-size: 13px; }
.agreement-review-confirmations .btn { margin-top: 10px; }
.agreement-review-notes { padding-top: 2px; }
.agreement-review-points--info > li { padding-top: 7px; padding-bottom: 7px; }
.agreement-review-points--info > li::before { top: 14px; background: #3e779f; }
.night-work-summary-card {
    margin: 16px 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #c9d7e2;
    border-top: 4px solid #1a6986;
    border-radius: 6px;
    box-shadow: 0 5px 16px rgba(24, 55, 79, .08);
}
.night-work-summary-card h2 { margin: 3px 0 12px; color: #173f5a; }
.benefit-option-card--night-work { border-top: 4px solid #67509a; }
.benefit-option-card--night-work small { display: block; margin-top: 8px; color: #607487; }
.employee-input-row--night-work small { display: block; margin-top: 2px; color: #607487; font-weight: 400; }
.employee-input-row--night-work strong { color: #67509a; font-size: 12px; }
.additional-night-work-form-card { max-width: 900px; }
.payroll-night-work-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 3px solid #67509a;
    background: #f6f2fb;
    color: #49366d;
    font-size: 12px;
}
.night-work-notice {
    margin: 10px 0 16px;
    padding: 13px 15px;
    background: #f2f7fc;
    border: 1px solid #bfd3e4;
    border-left: 4px solid #1a6986;
    border-radius: 5px;
    color: #294f6e;
}
.night-work-notice--detected { background: #fff8e8; border-color: #e9c778; color: #694a12; }
.night-work-notice--benefit { background: #fff1f1; border-color: #e2aaaa; color: #782626; }
.night-work-notice--protection { background: #f6f2fb; border-color: #cdb8e2; color: #55386f; }
.night-work-notice p { margin: 4px 0 0; }
.accommodation-deduction-guidance h3 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.4;
}
.accommodation-deduction-guidance p { margin: 0; }
.accommodation-deduction-guidance p + p { margin-top: 14px; }
.night-work-daytime-note { color: #52697d; }
.night-work-confirmations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
[data-night-work-details][hidden],
[data-night-active-fields][hidden],
[data-night-transport-fields][hidden],
[data-night-regular-fields][hidden],
[data-night-standby-fields][hidden],
[data-night-shift-definition][hidden],
[data-night-partial-period][hidden] { display: none; }

@media (max-width: 760px) {
    .agreement-intro-card { flex-direction: column; }
    .agreement-form-grid, .agreement-review-grid { grid-template-columns: 1fr; }
    .agreement-field ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agreement-history-row { grid-template-columns: 1fr 1fr; }
    .agreement-history-row--head { display: none; }
    .night-work-confirmations { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .agreement-form-card, .agreement-history-card, .agreement-compliance-card { padding: 17px 15px; }
    .agreement-field ul { grid-template-columns: 1fr; }
    .agreement-review-status { align-items: flex-start; flex-direction: column; gap: 2px; }
    .agreement-review-link { display: block; margin: 5px 0 0; }
}

/* Round 3 — interface structure and responsive navigation. */
.mobile-menu-close,
.sidebar-backdrop { display: none; }

.employees-workflow {
    margin: 0 0 22px;
    padding: 18px 20px;
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    box-shadow: 0 14px 28px rgba(25, 50, 74, 0.10), 0 3px 7px rgba(25, 50, 74, 0.06);
}
.employees-workflow-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}
.employees-workflow-heading .employees-section-title { margin: 0 0 3px; font-size: 19px; }
.employees-workflow-heading p { margin: 0; color: var(--ds-muted); font-size: 13px; }
.employees-workflow-period {
    flex: 0 0 auto;
    padding: 5px 9px;
    color: var(--ds-navy);
    background: var(--ds-surface-soft);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.employees-workflow-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.employees-workflow-grid > li { position: relative; min-width: 0; }
.employees-workflow-grid > li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 20px;
    right: -10px;
    z-index: 0;
    width: 10px;
    height: 2px;
    background: var(--ds-border);
}
.employees-workflow-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-areas: "number copy" "status status";
    grid-template-rows: 1fr auto;
    gap: 8px 10px;
    min-height: 154px;
    height: 100%;
    padding: 12px;
    margin: 0;
    color: #243F53;
    background: #FFFFFF;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -2px 2px rgba(40, 65, 79, 0.025), 0 7px 13px rgba(25, 50, 74, 0.10), 0 2px 3px rgba(25, 50, 74, 0.08);
    text-decoration: none;
}
.employees-workflow-card:hover,
.employees-workflow-card:focus {
    color: var(--ds-text);
    border-color: var(--ds-teal);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 18px rgba(25, 50, 74, 0.14), 0 3px 5px rgba(25, 50, 74, 0.09);
    text-decoration: none;
    transform: none;
}
.employees-workflow .employees-step-number {
    grid-area: number;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--ds-navy);
    background: var(--ds-surface-soft);
    border: 2px solid var(--ds-border);
    border-radius: 50%;
    font-weight: 800;
}
.employees-step-copy { grid-area: copy; min-width: 0; }
.employees-step-copy .employees-step-label {
    display: block;
    margin-bottom: 2px;
    color: var(--ds-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.employees-step-copy strong { display: block; color: #173F63; font-size: 13px; line-height: 1.3; }
.employees-step-copy > span:last-child { display: block; margin-top: 5px; color: #3E5668; font-size: 11px; line-height: 1.4; }
.employees-workflow .employees-step-status {
    grid-area: status;
    justify-self: start;
    padding: 3px 7px;
    color: var(--ds-muted);
    background: var(--ds-surface-soft);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}
.employees-workflow-card.is-current { border-color: #9CCFC6; }
.employees-workflow-card.is-current .employees-step-status { color: var(--ds-teal-hover); background: #E3F4F1; border-color: #9CCFC6; }
.employees-workflow-card.is-complete { border-color: #A8CFB7; }
.employees-workflow-card.is-complete .employees-step-status { color: var(--ds-success); background: var(--ds-success-bg); border-color: #B9D9C5; }
.employees-workflow-card.is-locked { border-color: var(--ds-border); }
.employees-workflow-card.is-locked .employees-step-copy { opacity: 1; }
.employees-workflow-card.is-ready .employees-step-status { color: var(--ds-plum-hover); background: #F9F4F6; border-color: #D8B9C5; }
.employees-workflow .employees-workflow-card--step-1,
.employees-workflow .employees-workflow-card--step-2,
.employees-workflow .employees-workflow-card--step-3,
.employees-workflow .employees-workflow-card--step-4,
.employees-workflow .employees-workflow-card--step-5 { background: #FFFFFF; }
.employees-workflow .employees-workflow-card--step-1 .employees-step-number { color: #174B49; background: #F0F8F7; border-color: #A9D5CF; }
.employees-workflow .employees-workflow-card--step-2 .employees-step-number { color: #244D72; background: #F2F7FC; border-color: #B4CCE2; }
.employees-workflow .employees-workflow-card--step-3 .employees-step-number { color: #3F6337; background: #F2F7EE; border-color: #BED4B3; }
.employees-workflow .employees-workflow-card--step-4 .employees-step-number { color: #5A4373; background: #F6F2FB; border-color: #CDBDE0; }
.employees-workflow .employees-workflow-card--step-5 .employees-step-number { color: #6F5B18; background: #FFF9E8; border-color: #E2CE83; }
.employees-workflow .employees-step-status { min-height: 24px; display: inline-flex; align-items: center; }

/* Compact Employees toolbar controls. */
.employees-redesign .employee-status-toolbar { gap: 8px; }
.employees-redesign .employee-status-filter {
    gap: 7px;
    margin: 0;
    padding: 4px 8px !important;
    background: #FFFFFF;
    border: 1px solid var(--ds-border);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(25, 50, 74, 0.05);
}
.employees-redesign .employee-status-filter label {
    font-size: 12px;
}
.employees-redesign .employee-status-filter select {
    width: 92px;
    min-width: 92px;
    height: 28px;
    min-height: 28px;
    padding: 2px 22px 2px 7px;
    font-size: 12px !important;
}
.employees-redesign .employee-status-toolbar > .dashboard-run-button {
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 4px;
    font-size: 12px !important;
    line-height: 18px;
}

@media (max-width: 767px) {
    .employees-redesign .employee-status-filter select,
    .employees-redesign .employee-status-toolbar > .dashboard-run-button { min-height: 42px; }
}

/* Present each employee as a distinct raised record card. */
.employees-redesign .employees-list-card {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.employees-redesign .employees-list-card > header {
    padding: 4px 4px 12px;
    background: transparent;
}
.employees-redesign .employees-list-card .monthly-employee-row {
    position: relative;
    margin: 0 0 14px;
    padding: 18px 20px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #9FB0BD;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95),
                0 8px 18px rgba(25, 50, 74, 0.11),
                0 2px 4px rgba(25, 50, 74, 0.07);
    color: #243F53;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.employees-redesign .employees-list-card .monthly-employee-row::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, #087f7b, #a3b18a);
}
.employees-redesign .employees-list-card .monthly-employee-row:last-of-type {
    margin-bottom: 0;
    border-bottom: 1px solid #9FB0BD;
}
.employees-redesign .employees-list-card .monthly-employee-row:hover {
    border-color: #6F8798;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95),
                0 11px 22px rgba(25, 50, 74, 0.14),
                0 3px 5px rgba(25, 50, 74, 0.08);
}
.employees-redesign .employees-list-card .monthly-employee-main h3 a {
    color: #123A5A;
}
.employees-redesign .employees-list-card .monthly-employee-main p {
    color: #334B5C;
}
.employees-redesign .employees-list-card .employee-pay-summary strong {
    color: #173F63;
}

/* Tighter, consistent information rhythm on the main employer workspaces. */
.dashboard-employer-overview,
.employees-page,
.employee-payroll-workspace,
.uif-layout,
.reports-hub { --ds-section-gap: 22px; }
.dashboard-employer-overview > section,
.employee-payroll-workspace > section,
.reports-hub > .report-group { margin-bottom: var(--ds-section-gap); }
.dashboard-glance-card {
    min-height: 138px;
    gap: 10px;
    padding: 18px 19px 16px;
}
.dashboard-glance-card .dashboard-icon-tile {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 8px;
}
.dashboard-glance-card .dashboard-icon-tile svg { width: 24px; height: 24px; }
.dashboard-glance-card .dashboard-card-intro { gap: 13px; }
.dashboard-glance-card .dashboard-card-intro > div { gap: 3px; }
.dashboard-glance-card strong { font-size: 16px; }
.dashboard-glance-card small,
.dashboard-glance-card > a { font-size: 13px; }
.payroll-review-tools,
.payroll-review-totals,
.payroll-review-employees,
.payroll-review-finalise { margin-bottom: 20px; }
.uif-summary-grid { gap: 12px; }
.uif-card { margin-bottom: 18px; }
.report-card-grid { gap: 12px; }
.report-card { min-height: 92px; }
.page-heading { margin-bottom: 22px; }

/* The public entry point now shares the signed-in surface, border and focus language. */
.login-panel {
    border-color: rgba(215, 222, 208, 0.34);
    border-radius: var(--ds-radius-lg);
    box-shadow: 0 16px 42px rgba(5, 18, 34, 0.30);
}
.login-brand .login-mark { border-radius: var(--ds-radius-sm); }

/* Desktop sidebar can collapse to its icon rail. */
.sidebar-collapse-button {
    position: absolute;
    top: 20px;
    right: -15px;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: var(--ds-sidebar, #23496e);
    background: #fff;
    border: 1px solid #cad8e3;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(16, 42, 67, 0.18);
}
.sidebar-collapse-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}
.sidebar-collapse-button:hover,
.sidebar-collapse-button:focus { color: #fff; background: var(--ds-teal, #008d9b); }

@media (min-width: 841px) {
    body,
    .app-sidebar { transition: padding-left 0.2s ease, width 0.2s ease; }
    body.sidebar-collapsed { padding-left: 76px !important; }
    body.sidebar-collapsed .app-sidebar {
        width: 76px;
        padding-right: 10px;
        padding-left: 10px;
        overflow-x: visible;
    }
    body.sidebar-collapsed .sidebar-collapse-button svg { transform: rotate(180deg); }
    body.sidebar-collapsed .app-brand {
        align-items: center;
        min-height: 42px;
        margin-right: 0;
        margin-left: 0;
        text-align: center;
    }
    body.sidebar-collapsed .app-brand__company {
        width: 100%;
        overflow: hidden;
        font-size: 0;
        white-space: nowrap;
    }
    body.sidebar-collapsed .app-brand__company::after {
        content: "TPC";
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.04em;
    }
    body.sidebar-collapsed .app-sidebar nav a,
    body.sidebar-collapsed .nav-logout__button {
        justify-content: center;
        gap: 0;
        padding-right: 0;
        padding-left: 0;
        overflow: hidden;
        font-size: 0;
    }
    body.sidebar-collapsed .app-sidebar .nav-icon { margin: 0; }
    body.sidebar-collapsed .employer-menu-group,
    body.sidebar-collapsed .employer-menu-account { padding-right: 0; padding-left: 0; }
}

@media (max-width: 1180px) {
    .employees-workflow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .employees-workflow-grid > li:not(:last-child)::after { display: none; }
    .employees-workflow-card { height: 100%; margin: 0; }
}

@media (max-width: 840px) {
    .sidebar-collapse-button { display: none; }
    body.sidebar-open { overflow: hidden; }
    .mobile-menu-button { z-index: 1250; }
    .app-sidebar {
        z-index: 1300;
        visibility: hidden;
        transform: translateX(-102%);
        transition: transform 0.2s ease, visibility 0s linear 0.2s;
    }
    body.sidebar-open .app-sidebar {
        visibility: visible;
        transform: translateX(0);
        transition: transform 0.2s ease;
    }
    .mobile-menu-close {
        display: inline-flex;
        align-items: center;
        align-self: flex-end;
        gap: 7px;
        min-height: 38px;
        padding: 7px 10px;
        margin: -8px 0 12px;
        color: #FFFFFF;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.48);
        border-radius: var(--ds-radius-sm);
    }
    .mobile-menu-close span:first-child { font-size: 22px; line-height: 1; }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1275;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(5, 17, 31, 0.68);
        border: 0;
        border-radius: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    }
    body.sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.2s ease;
    }
    .employees-workflow { padding: 16px; }
    .employees-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payroll-review-tools,
    .payroll-review-heading,
    .payroll-review-finalise,
    .uif-card-heading { align-items: flex-start; flex-direction: column; }
    .payroll-review-tools > div,
    .payroll-review-final-actions { display: flex; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 540px) {
    .employees-workflow-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .employees-workflow-grid { grid-template-columns: 1fr; }
    .employees-workflow-card { min-height: 0; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "number copy status"; align-items: center; }
    .employees-step-copy > span:last-child { display: none; }
    .employees-step-status { justify-self: end; white-space: nowrap; }
    .page-shell { padding-top: 68px; }
    .page-heading h1 { overflow-wrap: anywhere; }
    .employee-pay-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
    .employee-pay-summary i { display: none; }
    .monthly-employee-actions,
    .payroll-review-actions,
    .payroll-review-final-actions,
    .payroll-delivery-actions { align-items: stretch; flex-direction: column; width: 100%; }
    .monthly-employee-actions .btn,
    .monthly-employee-actions form,
    .monthly-employee-actions form .btn,
    .payroll-review-actions .btn,
    .payroll-review-final-actions form,
    .payroll-review-final-actions .btn,
    .payroll-delivery-actions .btn { width: 100%; }
    .uif-summary-grid { grid-template-columns: 1fr 1fr; }
    .report-filters { align-items: stretch; flex-direction: column; }
    .dashboard-glance-card { min-height: 124px; padding: 16px 17px 14px; }
}

/* Forms and templates: separate each document into a padded, raised card. */
.forms-template-list {
    display: grid;
    gap: 18px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.forms-template-list .advance-record,
.forms-template-list .advance-record + .advance-record {
    position: relative;
    padding: 22px 24px 20px;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    border: 1px solid rgba(23, 63, 99, .26);
    border-radius: 8px;
    box-shadow: 0 8px 0 rgba(23, 63, 99, .06), 0 13px 24px rgba(23, 63, 99, .10);
}

.forms-template-list .advance-record::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, #087f7b, #a3b18a);
}

.forms-template-list .advance-record h2 {
    margin: 0 0 8px;
    color: #173f63;
}

.forms-template-list .advance-record p {
    margin: 0 0 16px;
    color: #3f566b;
}

.forms-template-list .advance-record .btn {
    margin-top: 2px;
}

@media (max-width: 700px) {
    .forms-template-list { gap: 15px; }
    .forms-template-list .advance-record,
    .forms-template-list .advance-record + .advance-record { padding: 19px 18px 17px; }
}

/* Compact laptop layout. Large monitors and touch layouts keep their own scale. */
@media screen and (min-width: 841px) and (max-width: 1536px) {
    body { font-size: 13px; }
    .page-shell { padding: 36px 0 48px; }
    .page-heading { margin-bottom: 24px; }
    .page-heading h1 { font-size: 30px; }
    .employees-heading-row h1 { font-size: 30px; }
    .page-heading p,
    .employees-heading-row p { font-size: 14px; }

    .app-brand__welcome { font-size: 18px; }
    .app-brand__employer,
    .app-sidebar nav a,
    .nav-logout__button { font-size: 14px; }

    .dashboard-section-title,
    .employees-section-title { font-size: 19px; }
    .section-heading h2,
    .card > h2,
    .reports-intro h2,
    .report-result-heading h2,
    .leave-activity-heading h2 { font-size: 19px; }

    .btn,
    button,
    input[type="button"],
    input[type="submit"],
    .dashboard-run-button,
    .regular-input-add,
    .action-button { font-size: 13px !important; }

    .dashboard-employer-overview,
    .employees-page,
    .employee-payroll-workspace,
    .uif-layout,
    .reports-hub { --ds-section-gap: 18px; }

    .dashboard-glance-card {
        min-height: 122px;
        gap: 8px;
        padding: 15px 16px 14px;
    }
    .dashboard-actions-panel { padding: 20px; }
    .dashboard-action { gap: 16px; padding: 18px 20px; }
    .dashboard-action h3 { font-size: 16px; }
    .dashboard-action p { font-size: 13px; }
    .dashboard-quick-actions { gap: 15px; }
    .dashboard-quick-actions a { min-height: 100px; gap: 14px; padding: 16px; }
    .dashboard-quick-actions strong { font-size: 15px; }
    .dashboard-quick-actions .dashboard-quick-copy > span { font-size: 13px; }

    .employees-workflow { padding: 16px 18px; }
    .employees-workflow-card { min-height: 145px; padding: 10px; }
    .employees-redesign .employees-list-card .monthly-employee-row { padding: 16px 18px; }
    .employees-list-card .monthly-employee-main h3 { font-size: 16px; }
    .employees-list-card .monthly-employee-main p { font-size: 13px; }

    .form-card { padding: 20px; }
    .report-card { min-height: 112px; padding: 15px; }
    .uif-period-panel,
    .uif-card,
    .uif-empty { padding: 15px; }
}

/* Employees page: light airy-blue treatment approved from the visual mockup. */
.employees-route .app-main { background: #FAF9F6; }
.employees-route .page-heading { margin-bottom: 28px; }
.employees-route .employees-heading-row { align-items: center; }
.employees-route .employees-heading-row h1 {
    color: #173F63;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.employees-route .employees-heading-row p {
    color: #52697D;
    font-size: 16px;
}
.employees-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}
.employees-route .employees-workflow {
    padding: 24px 28px 22px;
    background: #FFFFFF;
    border-color: #D7E1E8;
    box-shadow: 0 7px 18px rgba(25, 50, 74, .09);
}
.employees-route .employees-workflow-heading { margin-bottom: 17px; }
.employees-route .employees-workflow-heading .employees-section-title {
    color: #19324A;
    font-size: 22px;
    font-weight: 700;
}
.employees-route .employees-workflow-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
}
.employees-route .employees-workflow-grid > li { position: relative; }
.employees-route .employees-workflow-grid > li:not(:last-child)::after {
    top: 23px;
    right: -28%;
    z-index: 0;
    display: block;
    width: 56%;
    height: 2px;
    background: #DDE4EA;
}
.employees-route .employees-workflow-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-areas: "number" "copy" "status";
    grid-template-columns: 1fr;
    grid-template-rows: 42px auto 24px;
    min-height: 116px;
    justify-items: center;
    gap: 6px;
    padding: 0 9px;
    color: #52697D;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    text-align: center;
}
.employees-route .employees-workflow-card:hover,
.employees-route .employees-workflow-card:focus {
    color: #19324A;
    transform: none;
}
.employees-route .employees-step-number {
    width: 38px;
    height: 38px;
    color: #087F7B;
    background: #E5F3F1;
    border-color: #B9DDD8;
}
.employees-route .employees-workflow-card--step-2 .employees-step-number {
    color: #2676B8;
    background: #EAF3FB;
    border-color: #C7DFF1;
}
.employees-route .employees-workflow-card--step-3 .employees-step-number {
    color: #6550A5;
    background: #F1ECF8;
    border-color: #D9CAF1;
}
.employees-route .employees-workflow-card--step-4 .employees-step-number {
    color: #087F7B;
    background: #E5F3F1;
    border-color: #B9DDD8;
}
.employees-route .employees-workflow-card--step-5 .employees-step-number {
    color: #2676B8;
    background: #EAF3FB;
    border-color: #C7DFF1;
}
.employees-route .employees-step-copy { text-align: center; }
.employees-route .employees-step-copy strong {
    color: #19324A;
    font-size: 16px;
}
.employees-route .employees-step-copy > span:last-child { display: none; }
.employees-route .employees-workflow .employees-step-status {
    justify-self: center;
    color: #52697D;
    background: transparent;
    border: 0;
}
.employees-route .employees-workflow-card.is-current .employees-step-status {
    color: #087F7B;
    background: #E5F3F1;
}
.employees-route .employee-status-toolbar {
    justify-content: space-between;
    margin-bottom: 18px;
}
.employees-route .employee-status-toolbar .employee-add-button {
    font-size: 13px !important;
    font-weight: 400;
}
.employees-route .employees-list-card .monthly-employee-row {
    display: block;
    padding: 0;
    overflow: hidden;
    border-color: #B7C7D5;
    border-radius: 8px;
    box-shadow: 0 8px 19px rgba(25, 50, 74, .11), 0 2px 4px rgba(25, 50, 74, .06);
}
.employees-route .employees-list-card .monthly-employee-row::before {
    background: linear-gradient(90deg, #087F7B, #76B9B0);
}
.employees-route .employees-list-card .monthly-employee-main {
    display: grid;
    grid-template-columns: minmax(230px, 1.15fr) minmax(430px, 1.55fr);
    align-items: center;
    gap: 28px;
    padding: 23px 28px 21px;
}
.employees-route .employees-list-card .monthly-employee-main h3 {
    margin: 7px 0 5px;
    color: #19324A;
    font-size: 16px;
}
.employees-route .employees-list-card .monthly-employee-main h3 a:hover,
.employees-route .employees-list-card .monthly-employee-main h3 a:focus { color: #087F7B; }
.employees-route .employees-list-card .monthly-employee-main h3 a {
    font-weight: 700;
}
.employees-route .employee-input-count {
    display: block;
    color: #65788A;
    font-size: 13px;
}
.employees-route .employee-record-identity .employee-ready-status {
    display: table;
    margin-top: 10px;
}
.employees-route .employees-list-card .employee-pay-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
}
.employees-route .employee-pay-summary > div {
    min-width: 0;
    padding: 4px 22px;
    border-left: 1px solid #DDE4EA;
}
.employees-route .employee-pay-summary dt {
    margin-bottom: 7px;
    color: #52697D;
    font-size: 13px;
    font-weight: 400;
}
.employees-route .employee-pay-summary dd {
    margin: 0;
    color: #19324A;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
}
.employees-route .employees-list-card .monthly-employee-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 28px 17px;
    border-top: 1px solid #DDE4EA;
}
.employees-route .employees-list-card .monthly-employee-actions form {
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.employees-route .employees-list-card .monthly-employee-actions .btn,
.employees-route .employees-list-card .monthly-employee-actions .dashboard-run-button {
    font-weight: 400 !important;
}
.employees-route .employees-list-card .monthly-employee-actions .dashboard-run-button {
    margin-left: 0;
}
.employees-route .employees-list-card .monthly-employee-actions .employee-primary-action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 4px;
    line-height: 1.42857143;
}
.payslip-notes-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 16px 0 0;
    list-style: none;
}
.payslip-note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid var(--ds-border);
    border-radius: 6px;
    background: #FFFFFF;
}
.payslip-note-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}
.payslip-note-copy strong { color: var(--ds-navy); font-size: 14px; }
.payslip-note-copy span { color: #52697D; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.payslip-note-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}
.payslip-note-actions form {
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.payslip-note-edit-button,
.payslip-note-remove-button {
    min-height: 36px;
    padding: 7px 11px;
}
.payslip-note-remove-button {
    color: var(--ds-danger) !important;
    background: #FFFFFF !important;
    border-color: #E2B9B5 !important;
}
.payslip-note-remove-button:hover,
.payslip-note-remove-button:focus {
    color: var(--ds-danger) !important;
    background: var(--ds-danger-bg) !important;
    border-color: var(--ds-danger) !important;
}
@media (max-width: 1050px) {
    .employees-route .employees-workflow-grid { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; }
    .employees-route .employees-list-card .monthly-employee-main { grid-template-columns: 1fr; gap: 18px; }
    .employees-route .employee-pay-summary > div:first-child { border-left: 0; }
}
@media (max-width: 700px) {
    .employees-route .employees-heading-row { align-items: flex-start; }
    .employees-heading-actions { width: 100%; align-items: flex-start; flex-direction: column; }
    .employees-route .employees-heading-actions .dashboard-run-button { width: 100%; justify-content: center; }
    .employees-route .employees-workflow { padding: 20px 17px; }
    .employees-route .employees-workflow-grid { grid-template-columns: 1fr; overflow: visible; }
    .employees-route .employees-workflow-grid > li:not(:last-child)::after { display: none; }
    .employees-route .employees-workflow-card { grid-template-areas: "number copy status"; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-rows: auto; min-height: 58px; justify-items: start; text-align: left; }
    .employees-route .employees-step-copy { align-self: center; text-align: left; }
    .employees-route .employees-workflow .employees-step-status { align-self: center; justify-self: end; }
    .employees-route .employees-list-card .monthly-employee-main { padding: 21px 18px 18px; }
    .employees-route .employees-list-card .employee-pay-summary { grid-template-columns: 1fr; }
    .employees-route .employee-pay-summary > div { display:flex; justify-content:space-between; gap:16px; padding:8px 0; border-left:0; border-top:1px solid #E5EBF0; }
    .employees-route .employee-pay-summary dt { margin:0; }
    .employees-route .employee-pay-summary dd { font-size:15px; }
    .employees-route .employees-list-card .monthly-employee-actions { align-items:stretch; justify-content:flex-start; flex-direction:column; padding:15px 18px 18px; }
    .employees-route .employees-list-card .monthly-employee-actions .btn,
    .employees-route .employees-list-card .monthly-employee-actions .dashboard-run-button { width:100%; justify-content:center; }
}

@media (max-width: 767px) {
    .employees-route .employees-list-card .monthly-employee-actions .employee-primary-action {
        min-height: 42px;
    }
    .payslip-note-edit-button,
    .payslip-note-remove-button {
        min-height: 42px;
        padding: 9px 13px;
    }
    .payslip-note-item {
        align-items: stretch;
        flex-direction: column;
    }
    .payslip-note-actions {
        align-self: flex-start;
    }
}

/* Forms and Templates: scalable two-selector library. */
.forms-template-selector-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.forms-template-selector-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
}

.forms-template-selector-form .payslip-input-amount-field {
    margin: 0;
}

.forms-template-selector-form select {
    width: 100%;
    min-height: 44px;
}

.forms-template-selector-help {
    margin: 12px 0 0;
    color: #52697D;
}

.forms-template-selection {
    margin-top: 18px;
}

.document-preview-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.document-preview-paper {
    width: min(100%, 820px);
    min-height: 900px;
    margin: 0 auto;
    padding: 48px 54px;
    border: 1px solid #cad5df;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 63, 99, .11);
    color: #19324a;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.document-preview-paper h2,
.document-preview-paper h3,
.document-preview-paper h4 { color: #19324a; }
.document-preview-paper h2 { margin: 26px 0 10px; font-size: 22px; }
.document-preview-paper h3 { margin: 22px 0 9px; font-size: 18px; }
.document-preview-paper h4 { margin: 18px 0 8px; font-size: 16px; }
.document-preview-paper p { margin: 0 0 11px; }
.document-preview-footer {
    margin-top: 36px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}
.document-preview-paper .document-preview-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 28px;
}
.document-preview-subtitle { text-align: center; font-style: italic; }
.document-preview-list-item { padding-left: 20px; }
.document-preview-list-item::before { content: "•"; margin-left: -16px; margin-right: 9px; }
.document-preview-table-wrap { margin: 16px 0 22px; overflow-x: auto; }
.document-preview-table { width: 100%; border-collapse: collapse; }
.document-preview-table td {
    padding: 9px 10px;
    border: 1px solid #ccd5dd;
    vertical-align: top;
}
.document-preview-table td:first-child { font-weight: 600; background: #f2f7fc; }
.document-preview-paper[data-template-key="certificate-of-service"] .document-preview-table {
    table-layout: fixed;
}
.document-preview-paper[data-template-key="certificate-of-service"] .document-preview-table td:first-child {
    width: 33.57%;
    background: #eaf3fb;
}
.document-preview-paper[data-template-key="certificate-of-service"] .document-preview-table td:nth-child(2) {
    width: 66.43%;
    background: #fff;
}
.document-preview-paper[data-template-key="bank-details"] .document-preview-table {
    table-layout: fixed;
}
.document-preview-paper[data-template-key="bank-details"] .document-preview-table td:first-child {
    width: 30%;
    border-right: 0;
}
.document-preview-paper[data-template-key="bank-details"] .document-preview-table td:nth-child(2) {
    width: 70%;
    border-left: 0;
}
.document-preview-frame {
    display: block;
    width: 100%;
    min-height: 78vh;
    border: 1px solid #cad5df;
    border-radius: 6px;
    background: #fff;
}

@media (max-width: 620px) {
    .document-preview-toolbar .btn { width: 100%; }
    .document-preview-paper { min-height: 0; padding: 24px 18px; }
    .document-preview-paper .document-preview-title { font-size: 23px; }
}

.forms-template-empty {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 24px;
    color: #52697D;
    background: #FFFFFF;
    border: 1px dashed #B9CBD6;
    border-radius: var(--ds-radius);
}

.forms-template-empty strong {
    color: #173F63;
    font-size: 18px;
}

@media (max-width: 700px) {
    .forms-template-selector-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Existing employee editor: full-width form with a responsive section index. */
.employee-onboarding-card[data-employee-edit] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 240px);
    gap: 22px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    align-items: start;
    margin-right: 0;
    margin-left: 0;
}

.employee-onboarding-card[data-employee-edit] .employee-onboarding-form {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
}

.employee-onboarding-card[data-employee-edit] .employee-edit-sections {
    position: sticky;
    top: 82px;
    display: flex;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    margin: 0;
    padding: 14px;
    box-sizing: border-box;
}

.employee-onboarding-card[data-employee-edit] .employee-edit-sections__title {
    margin: 0 8px 5px;
}

.employee-onboarding-card[data-employee-edit] .employee-edit-sections__button {
    width: 100%;
}

.employee-onboarding-card[data-employee-edit] .employee-edit-sections__button--night-work,
.employee-onboarding-card[data-employee-edit] .employee-edit-sections__button--night-work:hover,
.employee-onboarding-card[data-employee-edit] .employee-edit-sections__button--night-work:focus,
.employee-onboarding-card[data-employee-edit] .employee-edit-sections__button--night-work:visited {
    font-weight: 400;
    text-decoration: none;
}

@media (max-width: 700px) {
    body.employee-onboarding-page {
        padding-bottom: 86px;
    }

    .employee-onboarding-card[data-employee-edit] {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .employee-onboarding-card[data-employee-edit] .employee-onboarding-form {
        order: 1;
    }

    .employee-onboarding-card[data-employee-edit] .employee-edit-sections {
        position: fixed;
        z-index: 850;
        right: 12px;
        bottom: 10px;
        left: 12px;
        top: auto;
        display: flex;
        width: auto;
        max-width: none;
        flex-direction: row;
        order: 2;
        gap: 5px;
        margin: 0;
        padding: 8px;
        overflow-x: auto;
        border-color: #B9CBD6;
        box-shadow: 0 8px 22px rgba(25, 50, 74, .18);
    }

    .employee-onboarding-card[data-employee-edit] .employee-edit-sections__title {
        display: none;
    }

    .employee-onboarding-card[data-employee-edit] .employee-edit-sections__button {
        width: auto;
        min-width: 132px;
        min-height: 48px;
        flex: 0 0 auto;
        justify-content: flex-start;
        padding: 8px 9px;
        font-size: 12px;
    }

    .employee-onboarding-card[data-employee-edit] .employee-edit-sections__button span {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }
}

@media screen and (min-width: 841px) and (max-width: 1536px) {
    .employees-route .employees-heading-row h1 { font-size: 30px; }
    .employees-route .employees-heading-row p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar,
    .sidebar-backdrop,
    .btn,
    button { transition: none !important; }
}

/* Employer Overview welcome banner. The artwork is clipped to its decorative
   right-hand portion so the employer name remains live, accessible text. */
.page-heading .dashboard-welcome-banner {
    position: relative;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 330px;
    min-height: 152px;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    overflow: hidden;
    background: linear-gradient(112deg, #F7FBFF 0%, #EDF7FF 58%, #EAF5FF 100%);
    border: 1px solid #C9E3F7;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(23, 63, 99, 0.06);
}
.page-heading .dashboard-welcome-hand {
    position: relative;
    z-index: 2;
    display: flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #D9ECFC;
    font-size: 40px;
    line-height: 1;
}
.page-heading .dashboard-welcome-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}
.page-heading .dashboard-welcome-banner h1.dashboard-welcome {
    margin: 0;
    color: #152B4B;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.page-heading .dashboard-welcome-banner p {
    margin: 10px 0 0;
    color: #52697D;
    font-size: 16px;
}
.page-heading .dashboard-welcome-banner .dashboard-uif-reference {
    margin-top: 10px;
    color: #64798A;
    font-size: 12px;
    font-weight: 500;
    white-space: normal;
}
.page-heading .dashboard-welcome-art {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    background: url("../images/dashboard-welcome-reference.png") right center / auto 100% no-repeat;
}
.dashboard-overview .dashboard-glance-card {
    background: #FFFFFF;
}

@media screen and (min-width: 841px) and (max-width: 1180px) {
    .page-heading .dashboard-welcome-banner { grid-template-columns: 72px minmax(0, 1fr) 245px; gap: 18px; }
    .page-heading .dashboard-welcome-hand { width: 64px; height: 64px; font-size: 34px; }
    .page-heading .dashboard-welcome-art { width: 270px; }
}
@media (max-width: 760px) {
    .page-heading .dashboard-welcome-banner {
        grid-template-columns: 58px minmax(0, 1fr);
        min-height: 124px;
        gap: 15px;
        padding: 18px;
    }
    .page-heading .dashboard-welcome-hand { width: 54px; height: 54px; font-size: 29px; }
    .page-heading .dashboard-welcome-banner h1.dashboard-welcome { font-size: 24px; }
    .page-heading .dashboard-welcome-banner p { font-size: 14px; }
    .page-heading .dashboard-welcome-art { display: none; }
}

/* Employer sidebar groups and support panel. Operations navigation is unchanged. */
.employer-navigation {
    display: flex;
    flex-direction: column;
}
.employer-navigation .employer-menu-group {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.employer-navigation .nav-section {
    display: block;
    margin: 0 12px 7px;
    color: #B9CCDC;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.employer-navigation .nav-settings {
    margin-top: 0 !important;
}

/* Employer sidebar soft rail. Operations navigation remains on its existing theme. */
.app-sidebar.app-sidebar--employer {
    color: #FFFFFF;
    background: #1C6CAC !important;
}
.app-sidebar--employer .app-brand,
.app-sidebar--employer .app-brand:hover,
.app-sidebar--employer .app-brand:focus,
.app-sidebar--employer .app-brand__company {
    color: #FFFFFF;
}
.app-sidebar--employer .employer-navigation a,
.app-sidebar--employer .nav-logout__button {
    color: #FFFFFF;
}
.app-sidebar--employer .employer-navigation a:hover,
.app-sidebar--employer .employer-navigation a:focus,
.app-sidebar--employer .nav-logout__button:hover,
.app-sidebar--employer .nav-logout__button:focus {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
}
.app-sidebar--employer .employer-navigation a.is-active {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 4px 0 0 #31D2F7, 0 6px 16px rgba(21, 43, 75, 0.08);
}
.app-sidebar--employer .employer-navigation .employer-menu-group {
    border-top-color: rgba(255, 255, 255, 0.28);
}
.app-sidebar--employer .employer-navigation .nav-section {
    color: #FFFFFF;
}
.app-sidebar--employer .mobile-menu-close {
    color: #FFFFFF;
}
.app-sidebar--employer .employer-navigation a:focus-visible,
.app-sidebar--employer .nav-logout__button:focus-visible,
.app-sidebar--employer .mobile-menu-close:focus-visible {
    outline-color: #31D2F7;
}

/* Employer page canvas only. Cards and the Operations workspace are unchanged. */
body.employer-site,
body.employer-site .app-main {
    background: #FAF9F6;
}
/* Secure employer and Operations support centre. */
.support-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.support-page-heading h1 { margin: 0; }
.support-return-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
}
.support-ticket-heading { margin-bottom: 24px; }
.support-ticket-heading .support-reference {
    margin: 9px 0 7px;
}
.support-ticket-heading p { margin: 0; }
.support-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.support-contact-card {
    display: flex;
    min-width: 0;
    min-height: 142px;
    flex-direction: column;
    padding: 17px 18px;
    background: #FFFFFF;
    border: 1px solid #D7DED0;
    border-radius: var(--ds-radius);
    box-shadow: 0 7px 18px rgba(25, 50, 74, 0.07);
}
.support-contact-card__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
}
.support-contact-card__heading h2 {
    margin: 0;
    color: #163A5A;
    font-size: 14px;
    font-weight: 600;
}
.support-contact-card__icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: #2F6FA6;
}
.support-contact-card--phone .support-contact-card__icon { color: #27865D; }
.support-contact-card--resources .support-contact-card__icon { color: #7955B4; }
.support-contact-card__icon svg { width: 18px; height: 18px; }
.support-contact-card__value {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 7px;
    color: #163A5A;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.support-contact-card__value--email { font-size: 18px; }
.support-contact-card__value:hover,
.support-contact-card__value:focus { color: var(--ds-teal); text-decoration: underline; }
.support-contact-card p {
    margin: auto 0 0;
    color: #64748B;
    font-size: 12px;
}
.support-contact-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.support-reference {
    display: block;
    margin-bottom: 7px;
    color: #52697D;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.support-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.support-summary-grid article {
    display: grid;
    gap: 7px;
    padding: 17px 18px;
    background: #FFFFFF;
    border: 1px solid #D7DED0;
    border-top: 3px solid #2F6FA6;
    border-radius: 6px;
    box-shadow: 0 7px 18px rgba(25, 50, 74, 0.07);
}
.support-summary-grid span { color: #52605B; font-size: 13px; }
.support-summary-grid strong { color: #163A5A; font-size: 24px; font-weight: 600; }
.support-ticket-panel,
.support-form-card,
.support-conversation-panel,
.support-ticket-sidebar {
    background: #FFFFFF;
    border: 1px solid #D7DED0;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(25, 50, 74, 0.07);
}
.support-ticket-panel { padding: 20px; }
.support-section-heading { margin-bottom: 16px; }
.support-section-heading h2 { margin: 0; color: #163A5A; font-size: 20px; }
.support-section-heading p { margin: 5px 0 0; color: #52605B; font-size: 13px; }
.support-table-wrap { overflow-x: auto; }
.support-ticket-table { width: 100%; border-collapse: collapse; }
.support-ticket-table th,
.support-ticket-table td { padding: 13px 12px; border-bottom: 1px solid #E2E7DE; text-align: left; vertical-align: middle; }
.support-ticket-table th { color: #52605B; background: #F8FAF7; font-size: 12px; font-weight: 600; }
.support-ticket-table td { color: #2F3437; font-size: 14px; }
.support-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #CAD6DF;
    border-radius: 999px;
    color: #31566C;
    background: #F2F7FC;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.support-status--new,
.support-status--waiting_support { color: #694C00; border-color: #E9D69B; background: #FFF9E8; }
.support-status--waiting_client { color: #31566C; border-color: #C9DEEF; background: #F2F7FC; }
.support-status--in_progress { color: #006568; border-color: #B7D9D5; background: #F0F8F7; }
.support-status--resolved,
.support-status--closed { color: #315B32; border-color: #C9DDBF; background: #F2F7EE; }
.support-empty-state { padding: 38px 20px; text-align: center; }
.support-empty-state h3 { margin: 0 0 7px; color: #163A5A; }
.support-empty-state p { margin: 0 0 17px; color: #52605B; }
.support-form-card { max-width: 900px; padding: 22px; }
.support-privacy-note {
    display: grid;
    gap: 3px;
    margin-bottom: 20px;
    padding: 13px 15px;
    color: #31566C;
    background: #F2F7FC;
    border-left: 3px solid #2F6FA6;
    border-radius: 6px;
    font-size: 13px;
}
.support-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.support-field { display: grid; gap: 6px; }
.support-field--wide { grid-column: 1 / -1; }
.support-field label { margin: 0; color: #163A5A; font-size: 13px; font-weight: 600; }
.support-field input,
.support-field select,
.support-field textarea { width: 100%; }
.support-field small { color: #64748B; font-size: 12px; }
.support-field .errorlist { margin: 0; padding: 0; color: #A12E2E; font-size: 12px; list-style: none; }
.support-form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.support-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.support-conversation-panel { padding: 20px; }
.support-message-list { display: grid; gap: 13px; }
.support-message { padding: 15px 17px; background: #F7FAFC; border: 1px solid #DDE6ED; border-radius: 6px; }
.support-message--support { background: #F0F8F7; border-color: #C5DEDA; }
.support-message--internal { background: #FFF9E8; border-color: #E9D69B; }
.support-message header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 8px; color: #163A5A; font-size: 13px; }
.support-message time { color: #64748B; font-size: 12px; white-space: nowrap; }
.support-message-body { color: #2F3437; font-size: 14px; line-height: 1.55; }
.support-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.support-attachments a { font-size: 13px; }
.support-notification-state { display: block; margin-top: 10px; color: #64748B; font-size: 11px; }
.support-reply-form,
.support-internal-form { margin-top: 20px; padding-top: 19px; border-top: 1px solid #E2E7DE; }
.support-reply-form h2,
.support-internal-form h2,
.support-ticket-sidebar h2 { margin: 0 0 14px; color: #163A5A; font-size: 18px; }
.support-reply-form .support-field,
.support-internal-form .support-field { margin-bottom: 14px; }
.support-ticket-sidebar { padding: 19px; }
.support-ticket-sidebar .support-field { margin-bottom: 13px; }
.support-ticket-sidebar dl { margin: 18px 0 0; padding-top: 17px; border-top: 1px solid #E2E7DE; }
.support-ticket-sidebar dt { margin-top: 15px; color: #64748B; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.support-ticket-sidebar dt:first-child { margin-top: 0; }
.support-ticket-sidebar dd { margin: 4px 0 0; color: #2F3437; font-size: 13px; line-height: 1.45; }
.support-ticket-sidebar .support-resolve-form {
    display: flex;
    margin: 20px 0 0;
    padding: 18px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid #E2E7DE !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.support-filter-row { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; margin-bottom: 18px; }
.support-filter-row label { display: grid; gap: 5px; margin: 0; color: #52605B; font-size: 12px; }
.support-filter-row input { min-width: 230px; }
.support-filter-row select { min-width: 180px; }

@media (max-width: 1000px) {
    .support-contact-grid { grid-template-columns: 1fr; }
    .support-contact-card { min-height: 0; }
    .support-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .support-detail-layout { grid-template-columns: 1fr; }
    .support-ticket-sidebar { order: -1; }
}
@media (max-width: 620px) {
    .support-page-heading { flex-direction: column; }
    .support-summary-grid,
    .support-form-grid { grid-template-columns: 1fr; }
    .support-field--wide { grid-column: auto; }
    .support-message header { flex-direction: column; gap: 3px; }
    .support-filter-row { align-items: stretch; flex-direction: column; }
    .support-filter-row input,
    .support-filter-row select { min-width: 0; width: 100%; }
}

/* Support-ticket creation modal. */
.support-ticket-dialog {
    width: min(840px, calc(100% - 30px));
    max-width: 840px;
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: hidden;
    color: #2F3437;
    background: #FFFFFF;
    border: 1px solid #C7D3DC;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(6, 30, 53, 0.32);
}
.support-ticket-dialog::backdrop { background: rgba(6, 30, 53, 0.66); }
.support-ticket-dialog__surface {
    display: flex;
    max-height: calc(100vh - 40px);
    flex-direction: column;
    margin: 0;
}
.support-ticket-dialog__header {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #E2E7DE;
}
.support-ticket-dialog__header h2 { margin: 0; color: #163A5A; font-size: 22px; font-weight: 600; }
.support-ticket-dialog__header p { margin: 5px 0 0; color: #64748B; font-size: 13px; }
.support-ticket-dialog__close {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    padding: 0;
    color: #52605B;
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}
.support-ticket-dialog__close:hover,
.support-ticket-dialog__close:focus { color: #163A5A; background: #F2F7FC; }
.support-ticket-dialog__body { padding: 22px 24px 24px; overflow-y: auto; }
.support-ticket-dialog .support-form-grid { gap: 20px 18px; }
.support-ticket-dialog .support-field { gap: 7px; }
.support-ticket-dialog select,
.support-ticket-dialog textarea,
.support-ticket-dialog input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 3px;
}
.support-ticket-dialog textarea {
    min-height: 150px;
    line-height: 1.5;
    resize: vertical;
}
.support-ticket-dialog input[type="file"] {
    padding: 7px 9px;
}
.support-ticket-dialog__footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 22px;
    background: #FAFBF9;
    border-top: 1px solid #E2E7DE;
}
@media (max-width: 620px) {
    .support-ticket-dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); }
    .support-ticket-dialog__surface { max-height: calc(100vh - 20px); }
    .support-ticket-dialog__header { padding: 17px 16px 13px; }
    .support-ticket-dialog__body { padding: 18px 16px 20px; }
    .support-ticket-dialog__footer { padding: 13px 16px; }
}

/* Employer Documents: full-width cards with compact horizontal controls. */
.document-register-upload,
.document-register-filters,
.documentation-list-card {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}
.document-register-form {
    display: grid;
    align-items: end;
    width: 100%;
    gap: 14px;
    margin: 0;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid #D7E2EA;
    border-radius: 5px;
}
.document-register-upload-grid {
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.1fr) minmax(150px, .9fr) auto;
}
.document-register-filter-grid {
    grid-template-columns: minmax(200px, .9fr) minmax(240px, 1.1fr) auto;
}
.document-register-field { min-width: 0; }
.document-register-field label {
    display: block;
    margin-bottom: 7px;
}
.document-register-field input:not([type="file"]),
.document-register-field select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
}
.document-register-file-field input[type="file"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    line-height: 26px;
}
.document-register-action {
    display: flex;
    align-items: flex-end;
}
.document-register-action .btn {
    min-height: 42px;
    white-space: nowrap;
}
.document-register-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.document-register-actions form {
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.document-register-actions .document-register-icon-action {
    display: inline-flex;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.document-register-icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 760px) {
    .document-register-upload-grid,
    .document-register-filter-grid { grid-template-columns: 1fr; }
    .document-register-action .btn { width: 100%; }
}
/* Keep the payslip month selector compact inside its header. */
.employee-live-preview .payslip-summary-header form {
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.employee-payroll-workspace > .payslip-preview-column {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.payslip-preview-top-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.payslip-preview-top-actions .payslip-header-action {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 1 1 0;
    width: 100%;
    max-width: 210px;
    min-width: 0;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.payslip-preview-top-actions .payslip-header-action--notes {
    color: #173F63;
    background: #EAF3FB;
    border-color: #C5DBED;
}

.payslip-preview-top-actions .payslip-header-action--notes:hover,
.payslip-preview-top-actions .payslip-header-action--notes:focus {
    color: #173F63;
    background: #DCECF8;
    text-decoration: none;
}

.payslip-preview-top-actions .payslip-header-action--preview {
    color: #FFFFFF;
    background: #087F7B;
    border-color: #087F7B;
}

.payslip-preview-top-actions .payslip-header-action--preview:hover,
.payslip-preview-top-actions .payslip-header-action--preview:focus {
    color: #FFFFFF;
    background: #066662;
    border-color: #066662;
    text-decoration: none;
}

@media (max-width: 760px) {
    .payslip-preview-top-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 1050px) {
    .employee-payroll-workspace > .payslip-preview-column {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Compact overtime confirmation */
.payslip-input-adjustment-grid .payslip-input-confirmation-field {
    grid-column: 1 / -1;
}

.payslip-input-adjustment-grid .payslip-input-confirmation-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: #123F63;
    font-weight: 600;
    cursor: pointer;
}

.payslip-input-adjustment-grid .payslip-input-confirmation-label input[type="checkbox"] {
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: #087F7B;
}

/* Site-wide surface consistency: match the subtle 6px attention-card radius. */
.page-heading,
.toolbar-panel,
.metric-tile,
.dashboard-panel,
.attention-strip,
.table,
.panel,
.well,
.card,
.template-preview-panel,
.template-preview-frame,
.end-service-option-list > div,
.end-service-option-list > form,
.monthly-checklist,
.monthly-employees,
.employee-setup-notifications,
.documentation-upload-card,
.documentation-list-card,
.leave-workspace-employee-filter,
.leave-workspace-empty,
.employee-onboarding-card,
.employee-edit-sections,
.weekend-work-schedule,
.employee-review,
.dashboard-summary-card,
.dashboard-glance-card,
.dashboard-actions-panel,
.dashboard-action,
.dashboard-caught-up,
.dashboard-quick-actions a,
.dashboard-tip,
.employees-payroll-month,
.employees-workflow,
.employees-workflow-card,
.employees-list-card,
.employees-list-card .monthly-employee-row,
.form-card,
.report-result,
.planned-leave-card,
.leave-calendar-card,
.leave-records-card,
.leave-balances-panel,
.employee-profile-panel,
.employee-input-panel,
.regular-input-add,
.end-service-severance,
.end-service-severance-warning,
.payslip-summary-card,
.leave-activity-filters,
.report-balance-grid > div,
.report-card,
.report-data-note,
.workflow-steps,
.payroll-review-totals,
.payroll-review-employees,
.payroll-review-employee dl,
.payroll-review-finalise,
.payroll-delivery-panel,
.payroll-password-panel,
.leave-setup-redesign__eligibility,
.leave-rule-card,
.leave-rule-card__recorded,
.sick-balance-question__unknown,
.leave-rule-card__guidance,
.leave-rule-card__footnote,
.advance-record,
.advance-deferred-note,
.advance-record__history .table,
.uif-test-banner,
.uif-period-panel,
.uif-card,
.uif-empty,
.uif-summary-grid > div,
.uif-findings,
.uif-response-card,
.uif-simulation-controls,
.uif-existing-file-notice,
.pay-income-summary-card,
.pay-income-history,
.pay-income-breakdown-row details,
.pay-income-storage-note,
.historical-income-intro,
.historical-income-form,
.historical-income-confirm,
.user-summary-grid article,
.user-account-switch > label,
.privilege-switch,
.forms-template-list .advance-record,
.page-heading .dashboard-welcome-banner,
.support-contact-card,
.support-summary-grid article,
.support-ticket-panel,
.support-form-card,
.support-conversation-panel,
.support-ticket-sidebar,
.support-privacy-note,
.support-message,
.income-history-selector-card {
    border-radius: var(--ds-radius);
}

/* Payroll final-check callout: warm warning treatment. */
.payroll-review-finalise {
    color: #6F3D0B;
    background: #FFF4E5;
    border-color: #F1C38E;
    border-left-color: #D97706;
}

.payroll-review-finalise strong {
    color: #6F3D0B;
    font-size: 18px;
    line-height: 1.25;
}

.payroll-review-finalise span {
    color: #7A5220;
    font-size: 14px;
    line-height: 1.45;
}

.payroll-review-finalise .btn-primary {
    color: #FFFFFF;
    background: #B45309;
    border-color: #B45309;
}

.payroll-review-finalise .btn-primary:hover,
.payroll-review-finalise .btn-primary:focus {
    color: #FFFFFF;
    background: #92400E;
    border-color: #92400E;
}

/* Employees table: compact, confirmed delete action. */
.employees-route .employee-record-actions .employee-delete-action {
    display: inline-flex;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #9B2C2C;
    background: #FFFFFF;
    border-color: #D9B4B4;
}

.employees-route .employee-record-actions .employee-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.employees-route .employee-record-actions .employee-delete-action:hover,
.employees-route .employee-record-actions .employee-delete-action:focus {
    color: #FFFFFF;
    background: #9B2C2C;
    border-color: #9B2C2C;
}

.employees-route .employee-delete-action svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 700px) {
    .employees-route .employee-record-actions .employee-delete-form {
        width: auto;
        align-self: flex-start;
    }

    .employees-route .employee-record-actions .employee-delete-form .employee-delete-action {
        width: 34px;
        min-width: 34px;
    }
}


/* Page 2: Client Registration typography aligned with the current Overview. */
.registration-panel,
.registration-form {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.registration-panel .login-copy h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.registration-panel .login-copy p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}
.registration-panel .login-brand strong {
    font-size: 17px;
    font-weight: 700;
}
.registration-panel .login-brand span {
    font-size: 13px;
    font-weight: 400;
}
.registration-panel .login-mark {
    font-size: 20px;
    font-weight: 700;
}
.registration-form .control-label,
.registration-form label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.registration-form input:not([type="submit"]):not([type="button"]),
.registration-form select,
.registration-form textarea {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.registration-form .help-block,
.registration-form .form-text {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}
.registration-form .errorlist,
.registration-form .has-error .help-block,
.registration-form .alert,
.registration-form .alert li {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}
.registration-panel .btn,
.registration-panel button,
.registration-panel input[type="submit"],
.registration-panel input[type="button"] {
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
}
@media (max-width: 767px) {
    .registration-panel .login-copy h1 { font-size: 24px; }
    .registration-panel .login-copy p { font-size: 14px; }
    .registration-form .control-label,
    .registration-form label,
    .registration-form input:not([type="submit"]):not([type="button"]),
    .registration-form select,
    .registration-form textarea,
    .registration-panel .btn,
    .registration-panel button,
    .registration-panel input[type="submit"],
    .registration-panel input[type="button"] { font-size: 14px !important; }
}


/* Page 4: Monthly Payroll list typography aligned with the current Overview. */
.payroll-run-list-page {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.payroll-run-list-page .page-heading h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.payroll-run-list-page .page-heading p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-list-page .payroll-run-panel-heading > div > span,
.payroll-run-list-page .payroll-run-panel-heading > .panel-kicker {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}
.payroll-run-list-page .payroll-run-panel-heading h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}
.payroll-run-list-page .payroll-run-employer {
    font-size: 14px;
    font-weight: 600;
}
.payroll-run-list-page .payroll-run-summary dt {
    font-size: 15px;
    font-weight: 500;
}
.payroll-run-list-page .payroll-run-summary dd {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.payroll-run-list-page .payroll-run-table > thead > tr > th {
    font-size: 13px;
    font-weight: 600;
}
.payroll-run-list-page .payroll-run-table > tbody > tr > td {
    font-size: 14px;
    font-weight: 400;
}
.payroll-run-list-page .payroll-run-table > tbody > tr > td strong {
    font-weight: 600;
}
.payroll-run-list-page .badge {
    font-size: 13px;
    font-weight: 600;
}
.payroll-run-list-page .btn,
.payroll-run-list-page button,
.payroll-run-list-page .dashboard-run-button {
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
}
.payroll-run-list-page .empty-state strong {
    font-size: 17px;
    font-weight: 700;
}
.payroll-run-list-page .empty-state span,
.payroll-run-list-page .payroll-run-empty p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
@media screen and (min-width: 841px) and (max-width: 1536px) {
    .payroll-run-list-page .page-heading p { font-size: 14px; }
    .payroll-run-list-page .payroll-run-panel-heading h2 { font-size: 19px; }
    .payroll-run-list-page .payroll-run-summary dt { font-size: 13px; }
    .payroll-run-list-page .payroll-run-employer,
    .payroll-run-list-page .payroll-run-table > tbody > tr > td { font-size: 13px; }
    .payroll-run-list-page .payroll-run-table > thead > tr > th,
    .payroll-run-list-page .badge { font-size: 12px; }
    .payroll-run-list-page .btn,
    .payroll-run-list-page button,
    .payroll-run-list-page .dashboard-run-button { font-size: 13px !important; }
    .payroll-run-list-page .empty-state strong { font-size: 15px; }
    .payroll-run-list-page .empty-state span,
    .payroll-run-list-page .payroll-run-empty p { font-size: 13px; }
}
@media (max-width: 767px) {
    .payroll-run-list-page .page-heading h1 { font-size: 24px; }
    .payroll-run-list-page .page-heading p { font-size: 14px; }
    .payroll-run-list-page .payroll-run-panel-heading h2 { font-size: 19px; }
    .payroll-run-list-page .payroll-run-summary dt,
    .payroll-run-list-page .payroll-run-employer,
    .payroll-run-list-page .payroll-run-table > tbody > tr > td,
    .payroll-run-list-page .btn,
    .payroll-run-list-page button,
    .payroll-run-list-page .dashboard-run-button,
    .payroll-run-list-page .empty-state span,
       .payroll-run-list-page .payroll-run-empty p { font-size: 14px !important; }
    .payroll-run-list-page .payroll-run-table > thead > tr > th,
    .payroll-run-list-page .badge { font-size: 13px; }
    .payroll-run-list-page .empty-state strong { font-size: 16px; }
}


/* Page 5: Create or review payroll month, aligned with the current Overview. */
.payroll-run-create-page {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.payroll-run-create-page .page-heading h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.payroll-run-create-page .page-heading p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-create-page .form-card {
    width: 100%;
    max-width: none;
}
.payroll-run-create-page .form-card label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.payroll-run-create-page .form-card input,
.payroll-run-create-page .form-card select,
.payroll-run-create-page .form-card textarea {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-create-page .form-card .help-block {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}
.payroll-run-create-page .form-card .alert {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-create-page .form-card .alert strong {
    font-weight: 700;
}
.payroll-run-create-page .btn,
.payroll-run-create-page button,
.payroll-run-create-page input[type="submit"],
.payroll-run-create-page input[type="button"] {
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
}
@media screen and (min-width: 841px) and (max-width: 1536px) {
    .payroll-run-create-page .page-heading p,
    .payroll-run-create-page .form-card label,
    .payroll-run-create-page .form-card input,
    .payroll-run-create-page .form-card select,
    .payroll-run-create-page .form-card textarea,
    .payroll-run-create-page .form-card .alert,
    .payroll-run-create-page .btn,
    .payroll-run-create-page button,
    .payroll-run-create-page input[type="submit"],
    .payroll-run-create-page input[type="button"] { font-size: 13px !important; }
}
@media (max-width: 767px) {
    .payroll-run-create-page .page-heading h1 { font-size: 24px; }
    .payroll-run-create-page .page-heading p,
    .payroll-run-create-page .form-card label,
    .payroll-run-create-page .form-card input,
    .payroll-run-create-page .form-card select,
    .payroll-run-create-page .form-card textarea,
    .payroll-run-create-page .form-card .alert,
    .payroll-run-create-page .btn,
    .payroll-run-create-page button,
    .payroll-run-create-page input[type="submit"],
    .payroll-run-create-page input[type="button"] { font-size: 14px !important; }
}


/* Page 6: Payroll Month Detail typography aligned with the current Overview. */
.payroll-run-detail-page {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.payroll-run-detail-page .page-heading h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.payroll-run-detail-page .page-heading .badge {
    font-size: 13px;
    font-weight: 600;
}
.payroll-run-detail-page .payroll-delivery-heading h2,
.payroll-run-detail-page .payroll-password-panel h2,
.payroll-run-detail-page .page-shell > .card > h2,
.payroll-run-detail-page .page-shell > .card .section-heading h2,
.payroll-run-detail-page .payroll-review-heading h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}
.payroll-run-detail-page .payroll-delivery-heading p,
.payroll-run-detail-page .payroll-password-panel > p,
.payroll-run-detail-page .payroll-review-heading small {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-detail-page .payroll-delivery-heading > span,
.payroll-run-detail-page .payroll-review-heading > span {
    font-size: 13px;
    font-weight: 600;
}
.payroll-run-detail-page .payroll-review-finalise strong {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}
.payroll-run-detail-page .payroll-review-finalise span {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-detail-page .payroll-review-person h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}
.payroll-run-detail-page .employee-ready-status {
    font-size: 13px;
    font-weight: 600;
}
.payroll-run-detail-page .payroll-review-person > p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

/* Stage 1 PAYE states: blocked calculations must never look like a zero result. */
.paye-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 9px;
    border: 1px solid #C9DEEF;
    border-radius: 999px;
    color: #31566C;
    background: #F2F7FC;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.paye-status--calculated { color: #315B32; border-color: #C9DDBF; background: #F2F7EE; }
.paye-status--blocked,
.paye-status--directive_required { color: #782626; border-color: #E4B9B9; background: #FFF1F1; }

.paye-readiness-page {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.paye-readiness-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-bottom: 16px;
    color: #173F5A;
    background: #FFFFFF;
    border: 1px solid #D9E2E8;
    border-radius: var(--ds-radius);
}
.paye-readiness-summary h2 { margin: 0 0 4px; font-size: 22px; }
.paye-readiness-summary p { margin: 0; color: #607487; }
.paye-readiness-counts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.paye-readiness-counts article {
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #D9E2E8;
    border-radius: var(--ds-radius);
}
.paye-readiness-counts strong,
.paye-readiness-counts span { display: block; }
.paye-readiness-counts strong { color: #173F5A; font-size: 24px; }
.paye-readiness-counts span { margin-top: 3px; color: #607487; font-size: 13px; }
.paye-readiness-table .paye-status { margin-top: 0; }
.paye-readiness-table ul { margin: 0 0 10px; padding-left: 18px; }
.paye-readiness-table li + li { margin-top: 5px; }
@media (max-width: 767px) {
    .paye-readiness-summary { align-items: flex-start; flex-direction: column; }
    .paye-readiness-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.payroll-run-detail-page .payroll-review-employee dt {
    font-size: 13px;
    font-weight: 500;
}
.payroll-run-detail-page .payroll-review-employee dd {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.payroll-run-detail-page .payroll-night-work-breakdown strong {
    font-size: 14px;
    font-weight: 600;
}
.payroll-run-detail-page .payroll-night-work-breakdown span {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-detail-page .table > thead > tr > th {
    font-size: 13px;
    font-weight: 600;
}
.payroll-run-detail-page .table > tbody > tr > td {
    font-size: 14px;
    font-weight: 400;
}
.payroll-run-detail-page .payroll-password-panel code {
    font-size: 15px;
    font-weight: 700;
}
.payroll-run-detail-page .alert {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.payroll-run-detail-page .alert strong { font-weight: 700; }
.payroll-run-detail-page .run-row {
    font-size: 14px;
    font-weight: 400;
}
.payroll-run-detail-page .run-row strong { font-weight: 600; }
.payroll-run-detail-page .btn,
.payroll-run-detail-page button,
.payroll-run-detail-page input[type="submit"],
.payroll-run-detail-page input[type="button"] {
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
}
@media screen and (min-width: 841px) and (max-width: 1536px) {
    .payroll-run-detail-page .payroll-delivery-heading h2,
    .payroll-run-detail-page .payroll-password-panel h2,
    .payroll-run-detail-page .page-shell > .card > h2,
    .payroll-run-detail-page .page-shell > .card .section-heading h2,
    .payroll-run-detail-page .payroll-review-heading h2 { font-size: 19px; }
    .payroll-run-detail-page .payroll-delivery-heading p,
    .payroll-run-detail-page .payroll-password-panel > p,
    .payroll-run-detail-page .payroll-review-heading small,
    .payroll-run-detail-page .payroll-review-finalise span,
    .payroll-run-detail-page .payroll-review-person > p,
    .payroll-run-detail-page .payroll-night-work-breakdown span,
    .payroll-run-detail-page .table > tbody > tr > td,
    .payroll-run-detail-page .alert,
    .payroll-run-detail-page .run-row { font-size: 13px; }
    .payroll-run-detail-page .payroll-review-finalise strong { font-size: 16px; }
    .payroll-run-detail-page .payroll-review-person h3 { font-size: 15px; }
    .payroll-run-detail-page .page-heading .badge,
    .payroll-run-detail-page .payroll-delivery-heading > span,
    .payroll-run-detail-page .payroll-review-heading > span,
    .payroll-run-detail-page .employee-ready-status,
    .payroll-run-detail-page .payroll-review-employee dt,
    .payroll-run-detail-page .table > thead > tr > th { font-size: 12px; }
    .payroll-run-detail-page .payroll-night-work-breakdown strong,
    .payroll-run-detail-page .btn,
    .payroll-run-detail-page button,
    .payroll-run-detail-page input[type="submit"],
    .payroll-run-detail-page input[type="button"] { font-size: 13px !important; }
}
@media (max-width: 767px) {
    .payroll-run-detail-page .page-heading h1 { font-size: 24px; }
    .payroll-run-detail-page .payroll-delivery-heading h2,
    .payroll-run-detail-page .payroll-password-panel h2,
    .payroll-run-detail-page .page-shell > .card > h2,
    .payroll-run-detail-page .page-shell > .card .section-heading h2,
    .payroll-run-detail-page .payroll-review-heading h2 { font-size: 19px; }
    .payroll-run-detail-page .payroll-review-finalise strong,
    .payroll-run-detail-page .payroll-review-person h3 { font-size: 16px; }
    .payroll-run-detail-page .page-heading .badge,
    .payroll-run-detail-page .payroll-delivery-heading > span,
    .payroll-run-detail-page .payroll-review-heading > span,
    .payroll-run-detail-page .employee-ready-status,
    .payroll-run-detail-page .payroll-review-employee dt,
    .payroll-run-detail-page .table > thead > tr > th { font-size: 13px; }
    .payroll-run-detail-page .payroll-delivery-heading p,
    .payroll-run-detail-page .payroll-password-panel > p,
    .payroll-run-detail-page .payroll-review-heading small,
    .payroll-run-detail-page .payroll-review-finalise span,
    .payroll-run-detail-page .payroll-review-person > p,
    .payroll-run-detail-page .table > tbody > tr > td,
    .payroll-run-detail-page .alert,
    .payroll-run-detail-page .run-row,
    .payroll-run-detail-page .btn,
    .payroll-run-detail-page button,
    .payroll-run-detail-page input[type="submit"],
    .payroll-run-detail-page input[type="button"] { font-size: 14px !important; }
}

/* Page 8 — Leave Management, aligned with the employer Overview language. */
.leave-workspace-route .page-heading {
    padding: 0;
    margin-bottom: 20px;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.leave-workspace-route .page-heading h1 {
    margin: 0;
    color: #152B4B;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.2;
}
.leave-workspace-route .page-heading p {
    margin: 8px 0 0;
    color: #52697D;
    font-size: 16px;
    line-height: 1.5;
}
.leave-workspace-route .leave-workspace-employee-filter {
    display: grid;
    grid-template-columns: 150px minmax(260px, 460px);
    width: 100%;
    align-items: center;
    gap: 16px;
    padding: 16px 18px !important;
    margin-bottom: 20px;
    background: #EDF7FF !important;
    border: 1px solid #C9E3F7 !important;
    border-radius: 6px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 3px 5px rgba(23, 63, 99, .08),
        0 10px 22px rgba(23, 63, 99, .09) !important;
}
.leave-workspace-route .leave-workspace-employee-filter label {
    margin: 0;
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}
.leave-workspace-route .leave-workspace-employee-filter select,
.leave-workspace-route .leave-activity-filters select {
    height: 42px;
    padding: 8px 34px 8px 12px;
    color: #173F63;
    background-color: #FFFFFF;
    border: 1px solid #B7C7D5;
    border-radius: 6px;
    font-size: 14px;
}
.leave-workspace-route .leave-workspace-employee-filter select:focus,
.leave-workspace-route .leave-activity-filters select:focus {
    border-color: #2F72A8;
    outline: 3px solid rgba(47, 114, 168, .22);
    outline-offset: 1px;
}
.leave-workspace-route .leave-activity-page {
    width: 100%;
    max-width: none;
}
.leave-workspace-route .leave-activity-heading {
    align-items: flex-end;
    margin-bottom: 18px;
}
.leave-workspace-route .leave-activity-heading h2 {
    margin: 0 0 4px;
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
}
.leave-workspace-route .leave-activity-heading p {
    margin: 0;
    color: #52697D;
    font-size: 14px;
}
.leave-workspace-route .leave-activity-actions .btn {
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600 !important;
    box-shadow: 0 3px 0 rgba(23, 63, 99, .18), 0 7px 13px rgba(23, 63, 99, .10);
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.leave-workspace-route .leave-activity-actions .btn-default {
    color: #173F63;
    background: #FFFFFF;
    border-color: #B7C7D5;
}
.leave-workspace-route .leave-activity-actions .btn-primary,
.leave-workspace-route .planned-leave-heading .btn-primary {
    color: #FFFFFF;
    background: #087F7B;
    border-color: #087F7B;
}
.leave-workspace-route .leave-activity-actions .btn-primary:hover,
.leave-workspace-route .leave-activity-actions .btn-primary:focus,
.leave-workspace-route .planned-leave-heading .btn-primary:hover,
.leave-workspace-route .planned-leave-heading .btn-primary:focus {
    color: #FFFFFF;
    background: #006D6F;
    border-color: #006D6F;
}
.leave-workspace-route .leave-activity-actions .btn:hover,
.leave-workspace-route .planned-leave-heading .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 rgba(23, 63, 99, .17), 0 9px 16px rgba(23, 63, 99, .13);
}
.leave-workspace-route .leave-activity-actions .btn:active,
.leave-workspace-route .planned-leave-heading .btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(23, 63, 99, .18), 0 3px 7px rgba(23, 63, 99, .10);
}
.leave-workspace-route .leave-balances-panel,
.leave-workspace-route .planned-leave-card,
.leave-workspace-route .leave-calendar-card,
.leave-workspace-route .leave-records-card,
.leave-workspace-route .leave-activity-filters {
    overflow: hidden;
    background: #FFFFFF !important;
    border: 1px solid #D7E2EA !important;
    border-radius: 6px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 3px 5px rgba(23, 63, 99, .09),
        0 12px 27px rgba(23, 63, 99, .11) !important;
}
.leave-workspace-route .leave-balances-panel > h3,
.leave-workspace-route .planned-leave-heading,
.leave-workspace-route .leave-calendar-heading,
.leave-workspace-route .leave-records-card > h3 {
    color: #173F63 !important;
    background: #EDF7FF !important;
    border-bottom: 1px solid #C9E3F7 !important;
}
.leave-workspace-route .leave-balances-panel > h3,
.leave-workspace-route .leave-records-card > h3 {
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
}
.leave-workspace-route .planned-leave-heading,
.leave-workspace-route .leave-calendar-heading {
    padding: 15px 18px;
}
.leave-workspace-route .planned-leave-heading h3,
.leave-workspace-route .leave-calendar-heading h3 {
    color: #173F63 !important;
    font-size: 16px;
    font-weight: 700;
}
.leave-workspace-route .planned-leave-heading p,
.leave-workspace-route .leave-calendar-heading p {
    color: #52697D;
    font-size: 13px;
}
.leave-workspace-route .planned-leave-heading .btn-primary {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600 !important;
    box-shadow: 0 3px 0 rgba(0, 72, 70, .28), 0 7px 13px rgba(23, 63, 99, .11);
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.leave-workspace-route .leave-balances-panel__grid {
    gap: 14px;
    padding: 16px;
    background: #F8FAFC;
}
.leave-workspace-route .leave-balances-panel__item {
    min-height: 112px;
    padding: 16px 18px;
    border: 2px solid rgba(23, 63, 99, .16) !important;
    border-radius: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .88),
        0 3px 4px rgba(23, 63, 99, .10),
        0 9px 18px rgba(23, 63, 99, .09);
    transition: transform .18s ease, box-shadow .18s ease;
}
.leave-workspace-route .leave-balances-panel__item:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .92),
        0 5px 7px rgba(23, 63, 99, .12),
        0 13px 23px rgba(23, 63, 99, .12);
}
.leave-workspace-route .leave-balances-panel__item:nth-child(1) {
    background: #E5F3F1;
    border-color: #A8CEC7 !important;
}
.leave-workspace-route .leave-balances-panel__item:nth-child(2) {
    background: #F5F1FB;
    border-color: #CFC1E2 !important;
}
.leave-workspace-route .leave-balances-panel__item:nth-child(3) {
    background: #FFF6F3;
    border-color: #E7C8BE !important;
}
.leave-workspace-route .leave-balances-panel__item:nth-child(4) {
    background: #FFFFFF;
    border-color: #C7D5DF !important;
}
.leave-workspace-route .leave-balances-panel__item span {
    color: #52697D;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: none;
}
.leave-workspace-route .leave-balances-panel__item strong {
    margin: 7px 0 5px;
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
}
.leave-workspace-route .leave-balances-panel__item small {
    color: #52697D;
    font-size: 12px;
    line-height: 1.45;
}
.leave-workspace-route .leave-activity-filters {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(220px, auto);
    align-items: end;
    gap: 16px;
    padding: 16px 18px !important;
    margin-bottom: 18px;
}
.leave-workspace-route .leave-activity-filters > div { min-width: 0; }
.leave-workspace-route .leave-activity-filters label {
    margin-bottom: 6px;
    color: #173F63;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.leave-workspace-route .leave-entitlement-cycle {
    min-height: 42px;
    align-items: center;
    padding: 6px 0;
    color: #52697D;
    font-size: 13px;
}
.leave-workspace-route .leave-entitlement-cycle strong { color: #173F63; }
.leave-workspace-route .planned-leave-table,
.leave-workspace-route .leave-records-card .table {
    margin: 0;
    font-size: 13px;
}
.leave-workspace-route .planned-leave-table > thead > tr > th,
.leave-workspace-route .leave-records-card .table > thead > tr > th {
    padding: 11px 14px;
    color: #52697D;
    background: #F8FAFC;
    border-bottom: 1px solid #D7E2EA;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.leave-workspace-route .planned-leave-table > tbody > tr > td,
.leave-workspace-route .leave-records-card .table > tbody > tr > td {
    padding: 12px 14px;
    color: #243F53;
    border-color: #E5EBF0;
    vertical-align: middle;
}
.leave-workspace-route .planned-leave-table th:nth-child(3),
.leave-workspace-route .planned-leave-table td:nth-child(3),
.leave-workspace-route .leave-records-card .table th:nth-child(2),
.leave-workspace-route .leave-records-card .table td:nth-child(2) {
    text-align: right;
    white-space: nowrap;
}
.leave-workspace-route .planned-leave-note,
.leave-workspace-route .leave-tracking-note {
    color: #52697D;
    font-size: 12px;
    line-height: 1.5;
}
.leave-workspace-route .leave-balance-unknown-note {
    padding: 13px 15px;
    color: #6E4B00;
    background: #FFF8E6;
    border: 1px solid #F2D49B;
    border-left: 4px solid #D89A2B;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}
.leave-workspace-route .leave-calendar-legend i,
.leave-workspace-route .leave-calendar-grid .has-leave {
    background: #D9ECFC;
    border-color: #9FCCE9;
    color: #173F63;
}
.leave-workspace-route .leave-workspace-empty {
    padding: 38px 24px;
    color: #52697D;
    background: #FFFFFF;
    border: 1px dashed #B7C7D5;
    border-radius: 6px;
}
.leave-workspace-route .leave-workspace-empty h2 {
    color: #173F63;
    font-size: 20px;
}
@media (max-width: 900px) {
    .leave-workspace-route .leave-activity-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .leave-workspace-route .leave-activity-actions { justify-content: flex-start; }
    .leave-workspace-route .leave-activity-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .leave-workspace-route .leave-entitlement-cycle { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .leave-workspace-route .page-heading h1 { font-size: 24px; }
    .leave-workspace-route .page-heading p { font-size: 14px; }
    .leave-workspace-route .leave-workspace-employee-filter,
    .leave-workspace-route .leave-activity-filters {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .leave-workspace-route .leave-workspace-employee-filter select { width: 100%; min-width: 0; }
    .leave-workspace-route .leave-activity-actions {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }
    .leave-workspace-route .leave-activity-actions .btn { width: 100%; }
    .leave-workspace-route .leave-balances-panel__grid { grid-template-columns: 1fr; }
    .leave-workspace-route .leave-balances-panel__item {
        border-right: 0;
        border-bottom: 1px solid #D7E2EA;
    }
    .leave-workspace-route .leave-balances-panel__item:last-child { border-bottom: 0; }
    .leave-workspace-route .leave-entitlement-cycle { grid-column: auto; }
    .leave-workspace-route .planned-leave-heading,
    .leave-workspace-route .leave-calendar-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .leave-workspace-route .planned-leave-heading .btn { width: 100%; }
}

/* Employee onboarding wizard aligned to overview visual language. */
body.employee-onboarding-page .employee-onboarding-card {
    max-width: none;
    margin-bottom: 28px;
    padding: 22px;
    border: 1px solid #D7E2EA;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 9px 22px rgba(25, 50, 74, 0.07);
    box-sizing: border-box;
}

body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] {
    display: block;
}

body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-onboarding-form {
    width: 100%;
}

body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-edit-sections {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 22px;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #CFE0EC;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(25, 50, 74, 0.06);
}

body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-edit-sections__title {
    grid-column: 1 / -1;
    margin: 0 2px 6px;
    color: #52697D;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-edit-sections__button {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 9px 12px;
}

body.employee-onboarding-page .employee-edit-sections__button span {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
}

body.employee-onboarding-page .employee-onboarding-form { max-width: 1300px; }

body.employee-onboarding-page .employee-onboarding-form.js-enabled .employee-form-step {
    display: none;
}

body.employee-onboarding-page .employee-onboarding-form.js-enabled .employee-form-step.is-active {
    display: block;
}

body.employee-onboarding-page .employee-form-step {
    padding: 18px 0;
    margin-bottom: 18px;
    background: #FFFFFF;
    border: 1px solid #D7E2EA;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(25, 50, 74, 0.05);
    box-sizing: border-box;
}

body.employee-onboarding-page .employee-form-step__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 0 20px 16px;
    margin: 0 0 16px;
    border-bottom: 1px solid #E4EBF1;
}

body.employee-onboarding-page .employee-form-step__header h2 {
    margin: 0 0 4px;
    color: #173F63;
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -0.015em;
}

body.employee-onboarding-page .employee-form-step__header p {
    margin: 0;
    color: #52697D;
}

body.employee-onboarding-page .employee-form-step__number {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

body.employee-onboarding-page .employee-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
    padding: 0 20px;
}

/* Keep the shared normal-hours questions and break details on clear rows. */
body.employee-onboarding-page
    .employee-form-step[data-step-key="employment_details"]
    > .employee-fields-grid
    > [data-field-name="work_schedule_mode"],
body.employee-onboarding-page
    .employee-form-step[data-step-key="employment_details"]
    > .employee-fields-grid
    > [data-field-name="additional_breaks_expected"],
body.employee-onboarding-page
    .employee-form-step[data-step-key="employment_details"]
    > .employee-fields-grid
    > [data-shared-additional-breaks] {
    grid-column: 1 / -1;
}

body.employee-onboarding-page
    .employee-form-step[data-step-key="employment_details"]
    > .employee-fields-grid
    > [data-shared-additional-breaks]
    > .additional-breaks-builder {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.employee-onboarding-page .employee-field > label,
body.employee-onboarding-page .employee-field--night_work_or_standby_planned label,
body.employee-onboarding-page .employee-field--night_work_expected label,
body.employee-onboarding-page .employee-field--standby_expected label,
body.employee-onboarding-page .employee-field--employer_covers_employee_uif label,
body.employee-onboarding-page .employee-field--basic_pay_excludes_additions_confirmed label,
body.employee-onboarding-page .employee-field__label-row > label {
    margin-bottom: 7px;
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

body.employee-onboarding-page .employee-field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
body.employee-onboarding-page .employee-field select,
body.employee-onboarding-page .employee-field textarea {
    border-color: #BFD0DE;
    border-radius: 6px;
    min-height: 40px;
}

body.employee-onboarding-page .employee-field ul li,
body.employee-onboarding-page .employee-field [id^="id_"] > div,
body.employee-onboarding-page .employee-field .help-block {
    margin-top: 7px;
}

body.employee-onboarding-page .employee-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 0;
    margin-top: 20px;
    border-top: 1px solid #E6EDF3;
}

body.employee-onboarding-page .employee-step-actions .btn {
    min-height: 40px;
}

body.employee-onboarding-page .employee-unsaved-modal__panel {
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(15, 35, 53, 0.28);
}

body.employee-onboarding-page .leave-setup-redesign,
body.employee-onboarding-page .leave-rule-card,
body.employee-onboarding-page .weekend-work-schedule,
body.employee-onboarding-page .employee-review,
body.employee-onboarding-page .standby-explainer,
body.employee-onboarding-page .basic-pay-setup-note,
body.employee-onboarding-page .sunday-pay-setup-note,
body.employee-onboarding-page .night-work-notice,
body.employee-onboarding-page .night-work-notice--detected,
body.employee-onboarding-page .night-work-overlap-note {
    border-radius: 8px;
}

body.employee-onboarding-page .basic-pay-setup-note,
body.employee-onboarding-page .sunday-pay-setup-note,
body.employee-onboarding-page .night-work-notice,
body.employee-onboarding-page .night-work-overlap-note {
    border-left-width: 4px;
    box-shadow: 0 6px 15px rgba(25, 50, 74, 0.08);
}

body.employee-onboarding-page .leave-setup-redesign__eligibility {
    margin: 0 20px 22px;
    padding: 16px 18px;
    border: 1px solid #D7E2EA;
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(25, 50, 74, 0.07);
}

body.employee-onboarding-page .leave-rule-card,
body.employee-onboarding-page .weekend-work-schedule {
    margin: 0 20px 16px;
}

body.employee-onboarding-page .weekend-work-schedule:not([hidden]) {
    margin-top: 28px;
}

body.employee-onboarding-page .weekend-work-schedule
    .weekend-work-schedule__fields {
    padding: 20px;
}

body.employee-onboarding-page .leave-rule-card__header,
body.employee-onboarding-page .weekend-work-schedule__header {
    border-radius: 8px 8px 0 0;
}

body.employee-onboarding-page .standby-explainer {
    margin: 4px 20px 0;
}

@media (max-width: 900px) {
    body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] {
        display: block;
    }

    body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-edit-sections {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        gap: 8px;
        margin: 0 0 18px;
    }

    body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-edit-sections__title {
        display: block;
        grid-column: 1 / -1;
    }

    body.employee-onboarding-page .employee-onboarding-card[data-employee-edit] .employee-edit-sections__button {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 8px 10px;
        font-size: 12px;
    }

    body.employee-onboarding-page .employee-fields-grid,
    body.employee-onboarding-page .employee-onboarding-page .employee-fields-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 20px;
    }

    body.employee-onboarding-page .employee-step-actions,
    body.employee-onboarding-page .employee-form-step__header,
    body.employee-onboarding-page .leave-rule-card,
    body.employee-onboarding-page .weekend-work-schedule,
    body.employee-onboarding-page .employee-review,
    body.employee-onboarding-page .standby-explainer {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Page 15: Payslip Notes follows the Overview typography and spacing system. */
body.payslip-notes-route .page-heading h1 {
    margin: 0;
    color: #173F63;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

body.payslip-notes-route .page-heading p {
    margin: 8px 0 0;
    color: #52697D;
    font-size: 16px;
    line-height: 1.5;
}

body.payslip-notes-route .payslip-notes-back-actions .btn {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 9px;
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

body.payslip-notes-route .payslip-notes-editor-card,
body.payslip-notes-route .payslip-notes-saved-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid rgba(23, 63, 99, 0.10);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.05);
}

body.payslip-notes-route .payslip-notes-editor-card form {
    margin: 0;
}

body.payslip-notes-route .payslip-notes-intro {
    margin: 0 0 22px;
    color: #52697D;
    font-size: 15px;
    line-height: 1.5;
}

body.payslip-notes-route .form-card form .payslip-note-field {
    gap: 7px;
    width: 100%;
    max-width: none;
    margin-bottom: 20px;
}

body.payslip-notes-route .form-card form .payslip-note-field > label {
    color: #173F63;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

body.payslip-notes-route .form-card form .payslip-note-field > select,
body.payslip-notes-route .form-card form .payslip-note-field > textarea {
    min-height: 42px;
    padding: 9px 11px;
    color: #2F3437;
    border: 1px solid #BFD0DE;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

body.payslip-notes-route .form-card form .payslip-note-field > textarea {
    min-height: 120px;
}

body.payslip-notes-route .payslip-note-field small {
    color: #52697D;
    font-size: 14px;
    line-height: 1.45;
}

body.payslip-notes-route .payslip-note-field .errorlist,
body.payslip-notes-route .payslip-notes-editor-card > form > .errorlist {
    margin-top: 7px;
    color: #A73E36;
    font-size: 13px;
    line-height: 1.45;
}

body.payslip-notes-route .payslip-notes-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

body.payslip-notes-route .payslip-notes-form-actions .btn,
body.payslip-notes-route .payslip-note-edit-button,
body.payslip-notes-route .payslip-note-remove-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

body.payslip-notes-route .payslip-notes-saved-card {
    margin-top: 20px;
}

body.payslip-notes-route .payslip-notes-saved-card > h2 {
    margin: 0;
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.3;
}

body.payslip-notes-route .payslip-notes-list {
    gap: 12px;
    margin-top: 18px;
}

body.payslip-notes-route .payslip-note-item {
    gap: 20px;
    padding: 16px 18px;
    border-color: #D8E3EC;
    border-radius: 10px;
    background: #F7FAFD;
}

body.payslip-notes-route .payslip-note-copy {
    gap: 5px;
}

body.payslip-notes-route .payslip-note-copy strong {
    color: #173F63;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

body.payslip-notes-route .payslip-note-copy span {
    color: #52697D;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    body.payslip-notes-route .page-heading h1 {
        font-size: 28px;
    }

    body.payslip-notes-route .payslip-notes-editor-card,
    body.payslip-notes-route .payslip-notes-saved-card {
        padding: 18px;
    }

    body.payslip-notes-route .payslip-notes-form-actions,
    body.payslip-notes-route .payslip-note-actions {
        align-items: stretch;
        flex-direction: column;
    }

    body.payslip-notes-route .payslip-notes-form-actions .btn,
    body.payslip-notes-route .payslip-note-actions .btn {
        width: 100%;
    }
}

/* Page 14: Adjust Annual Leave Balance follows the Overview visual language. */
.annual-leave-adjustment-route .content-width {
    width: calc(100% - 40px);
    max-width: none;
}

.annual-leave-adjustment-route .page-heading h1 {
    margin: 0;
    color: #173F63;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.annual-leave-adjustment-route .page-heading p {
    margin: 8px 0 0;
    color: #52697D;
    font-size: 16px;
    line-height: 1.5;
}

.annual-leave-adjustment-route .page-actions .btn {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 9px;
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

.annual-leave-adjustment-route .annual-leave-adjustment-card {
    width: 100%;
    max-width: none !important;
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid rgba(23, 63, 99, 0.10);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.05);
}

.annual-leave-adjustment-route .annual-leave-adjustment-card form {
    margin: 0;
}

.annual-leave-adjustment-route .annual-leave-adjustment-balances {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 22px;
}

.annual-leave-adjustment-route .annual-leave-adjustment-current,
.annual-leave-adjustment-route .annual-leave-adjustment-new {
    display: flex;
    min-height: 104px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 17px 18px;
    border: 1px solid #C6D9E9;
    border-left: 4px solid #2F72A8;
    border-radius: 12px;
    background: #F2F7FC;
}

.annual-leave-adjustment-route .annual-leave-adjustment-new {
    border-color: #B7DDD7;
    border-left-color: #087F7B;
    background: #F0F8F7;
}

.annual-leave-adjustment-route .annual-leave-adjustment-current span,
.annual-leave-adjustment-route .annual-leave-adjustment-new span {
    color: #52697D;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.annual-leave-adjustment-route .annual-leave-adjustment-current strong,
.annual-leave-adjustment-route .annual-leave-adjustment-new strong {
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.annual-leave-adjustment-route .annual-leave-adjustment-arrow {
    color: #087F7B;
    font-size: 24px;
    font-weight: 700;
}

.annual-leave-adjustment-route .annual-leave-adjustment-grid {
    gap: 20px 22px;
}

.annual-leave-adjustment-route .annual-leave-adjustment-grid label {
    margin-bottom: 7px;
    color: #173F63;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.annual-leave-adjustment-route .annual-leave-adjustment-grid select,
.annual-leave-adjustment-route .annual-leave-adjustment-grid input,
.annual-leave-adjustment-route .annual-leave-adjustment-grid textarea {
    min-height: 42px;
    padding: 9px 11px;
    color: #2F3437;
    border: 1px solid #BFD0DE;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.annual-leave-adjustment-route .annual-leave-adjustment-grid textarea {
    min-height: 112px;
    resize: vertical;
}

.annual-leave-adjustment-route .annual-leave-adjustment-grid .errorlist,
.annual-leave-adjustment-route .annual-leave-adjustment-card > form > .errorlist {
    margin-top: 7px;
    color: #A73E36;
    font-size: 13px;
    line-height: 1.45;
}

.annual-leave-adjustment-route .annual-leave-adjustment-note {
    margin: 22px 0;
    padding: 14px 16px;
    color: #365967;
    background: #F2F7FC;
    border: 1px solid #D8E8F6;
    border-left: 4px solid #2F72A8;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.annual-leave-adjustment-route .annual-leave-adjustment-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.annual-leave-adjustment-route .annual-leave-adjustment-actions .btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

.annual-leave-adjustment-route .annual-leave-adjustment-actions .btn-primary {
    color: #FFFFFF;
    background: #087F7B;
    border-color: #087F7B;
}

.annual-leave-adjustment-route .annual-leave-adjustment-actions .btn-primary:hover,
.annual-leave-adjustment-route .annual-leave-adjustment-actions .btn-primary:focus {
    color: #FFFFFF;
    background: #066C69;
    border-color: #066C69;
}

.annual-leave-adjustment-route .annual-leave-adjustment-actions .btn-default {
    color: #173F63;
    background: #FFFFFF;
    border-color: #B7C7D5;
}

@media (max-width: 700px) {
    .annual-leave-adjustment-route .content-width {
        width: calc(100% - 30px);
    }

    .annual-leave-adjustment-route .page-heading h1 {
        font-size: 28px;
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-card {
        padding: 18px;
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-balances {
        grid-template-columns: 1fr;
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-grid {
        grid-template-columns: 1fr;
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-reason {
        grid-column: auto;
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .annual-leave-adjustment-route .annual-leave-adjustment-actions .btn {
        width: 100%;
    }
}

/* Page 13: Add, Plan and Adjust Leave follows the Overview type scale. */
.leave-workspace-route .page-heading h1 {
    color: #173F63;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.leave-workspace-route .page-heading p {
    margin-top: 8px;
    color: #52697D;
    font-size: 16px;
    line-height: 1.5;
}

.leave-workspace-route .leave-activity-heading h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.018em;
}

.leave-workspace-route .leave-activity-heading p {
    color: #52697D;
    font-size: 15px;
    line-height: 1.5;
}

.leave-workspace-route .leave-balances-panel,
.leave-workspace-route .planned-leave-card,
.leave-workspace-route .leave-calendar-card,
.leave-workspace-route .leave-records-card,
.leave-workspace-route .leave-activity-filters {
    border-radius: 14px !important;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.05) !important;
}

.leave-workspace-route .leave-balances-panel > h3,
.leave-workspace-route .planned-leave-heading h3,
.leave-workspace-route .leave-calendar-heading h3,
.leave-workspace-route .leave-records-card > h3 {
    color: #173F63 !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.leave-workspace-route .planned-leave-heading p,
.leave-workspace-route .leave-calendar-heading p {
    color: #52697D;
    font-size: 14px;
    line-height: 1.5;
}

.leave-workspace-route .leave-balances-panel__item span {
    color: #52697D;
    font-size: 14px;
    font-weight: 600;
}

.leave-workspace-route .leave-balances-panel__item strong {
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
}

.leave-workspace-route .leave-balances-panel__item small {
    color: #52697D;
    font-size: 14px;
    line-height: 1.45;
}

.leave-workspace-route .leave-workspace-employee-filter label,
.leave-workspace-route .leave-activity-filters label {
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

.leave-workspace-route .leave-activity-actions .btn,
.leave-workspace-route .planned-leave-heading .btn-primary {
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600 !important;
}

.leave-workspace-route .planned-leave-table,
.leave-workspace-route .leave-records-card .table {
    font-size: 14px;
    line-height: 1.45;
}

.leave-workspace-route .planned-leave-table > thead > tr > th,
.leave-workspace-route .leave-records-card .table > thead > tr > th {
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

.leave-workspace-route .planned-leave-note,
.leave-workspace-route .leave-tracking-note,
.leave-workspace-route .leave-balance-unknown-note,
.leave-workspace-route .leave-entitlement-cycle {
    color: #52697D;
    font-size: 14px;
    line-height: 1.5;
}

.leave-workspace-route .leave-activity-page > * {
    margin-bottom: 22px;
}

.leave-workspace-route .leave-activity-page > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .leave-workspace-route .page-heading h1 {
        font-size: 28px;
    }

    .leave-workspace-route .leave-activity-actions .btn,
    .leave-workspace-route .planned-leave-heading .btn {
        width: 100%;
    }
}
/* Page 12: Pay Setup follows the Overview typography and spacing system. */
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-form-step__header h2 {
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.25;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-form-step__header p {
    color: #52697D;
    font-size: 15px;
    line-height: 1.5;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-fields-grid {
    gap: 20px 22px;
}

body.employee-onboarding-page .employee-form-step[data-step-key="agreement_details"] .employee-field--agreement_duties,
body.employee-onboarding-page .employee-form-step[data-step-key="agreement_details"] .employee-field--other_employment_conditions {
    grid-column: 1 / -1;
}

body.employee-onboarding-page .employee-field--agreement_duties > ul {
    columns: 2;
    column-gap: 28px;
    margin: 0;
    padding: 14px 16px;
    list-style: none;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    background: #fbfcfe;
}

body.employee-onboarding-page .employee-field--agreement_duties > ul li {
    break-inside: avoid;
    margin: 0 0 8px;
}

@media (max-width: 760px) {
    body.employee-onboarding-page .employee-field--agreement_duties > ul {
        columns: 1;
    }
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field > label,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field__label-row > label,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-checkbox-field label,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field ul label,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field [id^="id_"] > div label {
    color: #173F63;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field select,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-field textarea {
    min-height: 42px;
    color: #2F3437;
    font-size: 14px;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .help-block {
    color: #52697D;
    font-size: 14px;
    line-height: 1.5;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .basic-pay-setup-note {
    padding: 16px 18px;
    margin-bottom: 20px;
    color: #365967;
    background: #F0F8F7;
    border-color: #D7EBE8;
    border-left-color: #087F7B;
    font-size: 12px;
    line-height: 1.5;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .basic-pay-setup-note h3 {
    margin-bottom: 8px;
    color: #173F63;
    font-size: 16px;
    font-weight: 700;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .accommodation-setup-note {
    grid-column: 1 / -1;
    box-sizing: border-box;
    width: 100%;
}

body.employee-onboarding-page .accommodation-setup-question {
    width: 100%;
    margin: 14px 0 0;
    padding: 18px 20px;
    border: 1px solid #CDE6DC;
    border-radius: 8px;
    background: #FFFFFF;
}

body.employee-onboarding-page .accommodation-setup-question__prompt {
    margin: 0 0 12px;
    padding: 0;
    color: #173F63;
    font-size: 16px;
    font-weight: 700;
}

body.employee-onboarding-page .accommodation-setup-question__choices {
    display: flex;
    gap: 28px;
    align-items: center;
}

body.employee-onboarding-page .accommodation-setup-question__choices label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: #173F63;
    font-weight: 600;
    cursor: pointer;
}

body.employee-onboarding-page .accommodation-setup-question__choices input {
    margin: 0;
}

body.employee-onboarding-page .accommodation-setup-question__edit {
    margin-left: auto;
    color: #087F7B;
    border-color: #B8DCCD;
    background: #F1FAF6;
}

body.employee-onboarding-page .accommodation-setup-question__edit:hover,
body.employee-onboarding-page .accommodation-setup-question__edit:focus {
    color: #FFFFFF;
    border-color: #16847C;
    background: #16847C;
}

body.employee-onboarding-page .pay-setup-accommodation {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: auto;
    margin: 0 !important;
    padding: 48px;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.employee-onboarding-page .pay-setup-accommodation[hidden] {
    display: none !important;
}

body.employee-onboarding-page .pay-setup-accommodation .pay-setup-popout__backdrop {
    background: rgba(23, 63, 99, 0.30);
}

body.employee-onboarding-page .pay-setup-accommodation .pay-setup-popout__panel {
    width: min(780px, calc(100vw - 96px));
    max-width: 780px;
    max-height: calc(100vh - 96px);
}

body.employee-onboarding-page .pay-setup-accommodation__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 24px !important;
}

@media (max-width: 760px) {
    body.employee-onboarding-page .pay-setup-accommodation {
        padding: 16px;
    }

    body.employee-onboarding-page .pay-setup-accommodation .pay-setup-popout__panel {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
    }

    body.employee-onboarding-page .pay-setup-accommodation__fields {
        grid-template-columns: 1fr;
        padding: 18px !important;
    }
}

/* Restore Accommodation's green accent without changing other accordions. */
body.employee-onboarding-page
.employee-form-step[data-step-key="pay_setup"]
.standby-explainer.accommodation-explainer {
    border-color: #CDE6DC;
    border-left: 5px solid #16847C;
    background: #F1FAF6;
}

body.employee-onboarding-page
.employee-form-step[data-step-key="pay_setup"]
.standby-explainer.accommodation-explainer > summary {
    background: #F1FAF6 !important;
}

body.employee-onboarding-page
.employee-form-step[data-step-key="pay_setup"]
.standby-explainer.accommodation-explainer > summary::after {
    border-color: #B8DCCD;
    color: #16847C;
}

body.employee-onboarding-page
.employee-form-step[data-step-key="pay_setup"]
.standby-explainer.accommodation-explainer .standby-explainer__content {
    background: #F7FCF9;
    border-top-color: #CDE6DC;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer {
    width: 100%;
    margin: 4px 0 0;
    border: 1px solid #C6D9E9;
    border-left: 4px solid #2F72A8;
    border-radius: 10px;
    background: #F2F7FC;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.05);
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer > summary {
    min-height: 54px;
    padding: 14px 16px;
    color: #173F63;
    background: #F2F7FC !important;
    font-size: 18px !important;
    font-weight: 700;
    line-height: 1.35;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer > summary::after {
    border-color: #AFC9DE;
    color: #173F63;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer__content {
    padding: 16px 18px 18px;
    color: #2F3437;
    background: #F7FAFD;
    border-top-color: #D3E2EF;
    font-size: 14px;
    line-height: 1.5;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer__content h3,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .night-work-explainer .night-work-overlap-note > p:first-child {
    color: #173F63;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer__calculation,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer__remember {
    color: #173F63;
    background: #EAF3FB;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer__remember {
    border-left-color: #2F72A8;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer__summary,
body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .night-work-explainer .night-work-overlap-note__summary {
    color: #173F63;
}

body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-step-actions .btn {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
}

@media (max-width: 900px) {
    body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .employee-fields-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    body.employee-onboarding-page .employee-form-step[data-step-key="pay_setup"] .standby-explainer {
        margin-right: 0;
        margin-left: 0;
    }
}

/* Page 16: Advances & Loans follows the Overview typography and spacing system. */
body.employee-advances-route .page-heading h1 {
    margin: 0;
    color: #173F63;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

body.employee-advances-route .advances-back-actions .btn {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 9px;
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

body.employee-advances-route .advances-page {
    width: 100%;
    max-width: none;
}

body.employee-advances-route .advances-heading {
    gap: 24px;
    margin-bottom: 18px;
}

body.employee-advances-route .advances-heading__copy h2 {
    margin: 0;
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.3;
}

body.employee-advances-route .advances-heading__copy p {
    margin: 7px 0 0;
    color: #52697D;
    font-size: 15px;
    line-height: 1.5;
}

body.employee-advances-route .advances-heading__actions {
    gap: 12px;
}

body.employee-advances-route .advances-status-filter label {
    color: #173F63;
    font-size: 14px;
    font-weight: 600;
}

body.employee-advances-route .advances-status-filter select {
    min-width: 126px;
    height: 42px;
    padding: 8px 30px 8px 11px;
    color: #2F3437;
    background: #FFFFFF !important;
    border: 1px solid #BFD0DE !important;
    border-radius: 8px !important;
    font-size: 14px;
    font-weight: 600;
}

body.employee-advances-route .advances-heading .regular-input-add {
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600 !important;
}

body.employee-advances-route .advances-cap-note {
    margin: 0 0 20px;
    padding: 14px 16px;
    color: #365967;
    background: #F2F7FC;
    border: 1px solid #D8E8F6;
    border-left: 4px solid #2F72A8;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

body.employee-advances-route .advances-cap-note p {
    margin: 0;
}

body.employee-advances-route .advances-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 14px;
}

body.employee-advances-route .advance-record + .advance-record {
    margin-top: 14px;
}

body.employee-advances-route .advance-record {
    border-color: #D8E3EC;
    border-radius: 10px;
}

body.employee-advances-route .advance-record__header {
    gap: 20px;
    padding: 18px 20px;
}

body.employee-advances-route .advance-record__title {
    gap: 5px;
}

body.employee-advances-route .advance-record__title strong {
    color: #173F63;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

body.employee-advances-route .advance-record__title small {
    color: #52697D;
    font-size: 14px;
    line-height: 1.45;
}

body.employee-advances-route .advance-status {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
}

body.employee-advances-route .advance-record__content {
    padding: 0 20px 22px;
}

body.employee-advances-route .advance-record__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid #D8E3EC;
    border-radius: 10px;
    background: #D8E3EC;
}

body.employee-advances-route .advance-record__details > div {
    display: flex;
    min-height: 84px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    background: #FFFFFF;
}

body.employee-advances-route .advance-record__details dt {
    color: #52697D;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

body.employee-advances-route .advance-record__details dd {
    margin: 0;
    color: #173F63;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

body.employee-advances-route .advance-record__details .advance-record__outstanding {
    margin: 0;
    padding: 14px 16px !important;
    border: 0;
    background: #F2F7FC;
}

body.employee-advances-route .advance-record__actions {
    gap: 10px;
    margin-top: 20px;
}

body.employee-advances-route .advance-record__actions .btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

body.employee-advances-route .advance-agreement a {
    font-size: 14px;
    font-weight: 600;
}

body.employee-advances-route .advance-record__history {
    padding-top: 22px;
    margin-top: 24px;
}

body.employee-advances-route .advance-record__history h3 {
    margin-bottom: 14px;
    color: #173F63;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

body.employee-advances-route .advance-record__history .table > thead > tr > th {
    color: #173F63;
    font-size: 13px;
    font-weight: 700;
}

body.employee-advances-route .advance-record__history .table > tbody > tr > td {
    color: #2F3437;
    font-size: 14px;
    line-height: 1.45;
}

body.employee-advances-route .employee-input-empty {
    margin: 0;
    padding: 28px 20px;
    color: #52697D;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 900px) {
    body.employee-advances-route .advances-heading {
        align-items: stretch;
        flex-direction: column;
    }

    body.employee-advances-route .advances-heading__actions {
        justify-content: space-between;
    }

    body.employee-advances-route .advance-record__details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    body.employee-advances-route .page-heading h1 {
        font-size: 28px;
    }

    body.employee-advances-route .advances-heading__actions,
    body.employee-advances-route .advance-record__actions {
        align-items: stretch;
        flex-direction: column;
    }

    body.employee-advances-route .advances-status-filter {
        align-items: stretch;
        flex-direction: column;
    }

    body.employee-advances-route .advances-status-filter select,
    body.employee-advances-route .advances-heading .regular-input-add,
    body.employee-advances-route .advance-record__actions .btn {
        width: 100%;
    }

    body.employee-advances-route .advances-card {
        padding: 18px;
    }

    body.employee-advances-route .advance-record__header {
        align-items: flex-start;
        padding: 16px;
    }

    body.employee-advances-route .advance-record__content {
        padding: 0 16px 18px;
    }

    body.employee-advances-route .advance-record__details {
        grid-template-columns: 1fr;
    }
}

/* Give advance or loan uses the same full workspace width as End service. */
.form-card.advance-form-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.advance-form-card .loan-sars-interest-info {
    margin: 0 0 22px;
    overflow: hidden;
    border: 1px solid #BFD8EC;
    border-radius: 10px;
    background: #EFF7FE;
}

.advance-form-card .loan-sars-interest-info > summary {
    position: relative;
    padding: 15px 48px 15px 17px;
    color: #1C6CAC;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.advance-form-card .loan-sars-interest-info > summary::-webkit-details-marker {
    display: none;
}

.advance-form-card .loan-sars-interest-info > summary::after {
    position: absolute;
    top: 50%;
    right: 18px;
    content: "+";
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-50%);
}

.advance-form-card .loan-sars-interest-info[open] > summary::after {
    content: "−";
}

.advance-form-card .loan-sars-interest-info__content {
    padding: 0 17px 17px;
    border-top: 1px solid #D4E7F6;
    color: #294A60;
    font-size: 14px;
    line-height: 1.6;
}

.advance-form-card .loan-sars-interest-info__content p {
    margin: 14px 0 0;
}

.advance-form-card .loan-sars-interest-info__content h2 {
    margin: 20px 0 0;
    color: #173F63;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .advance-form-card .loan-sars-interest-info > summary {
        padding: 14px 44px 14px 15px;
    }

    .advance-form-card .loan-sars-interest-info__content {
        padding: 0 15px 15px;
    }
}

/* Page 17: End service follows the Overview typography and workspace layout. */
body.employee-end-service-page {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.employee-end-service-page .page-heading h1 {
    margin: 0;
    color: #173F63;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

body.employee-end-service-page .page-actions .btn {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

body.employee-end-service-page .end-service-page {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.employee-end-service-page .form-card.end-service-card,
body.employee-end-service-page .form-card.end-service-options {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.employee-end-service-page .end-service-heading {
    margin: 0 0 18px;
}

body.employee-end-service-page .end-service-heading h2 {
    margin: 0 0 6px;
    color: #173F63;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.25;
}

body.employee-end-service-page .end-service-heading p {
    margin: 0;
    color: #52697D;
    font-size: 15px;
    line-height: 1.5;
}

body.employee-end-service-page .form-card.end-service-card,
body.employee-end-service-page .form-card.end-service-options {
    padding: 24px;
    border: 1px solid rgba(23, 63, 99, 0.10);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.05);
}

body.employee-end-service-page .end-service-fields {
    gap: 20px 22px;
}

body.employee-end-service-page .end-service-fields label {
    margin-bottom: 7px;
    color: #173F63;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

body.employee-end-service-page .end-service-fields input,
body.employee-end-service-page .end-service-fields select,
body.employee-end-service-page .end-service-fields textarea {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 9px 11px;
    color: #2F3437;
    border: 1px solid #BFD0DE;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

body.employee-end-service-page .end-service-severance {
    margin: 22px 0;
    padding: 18px;
    border: 1px solid #D8E8F6;
    border-radius: 14px;
    background: #F7FAFD;
}

body.employee-end-service-page .end-service-severance h3 {
    margin: 0 0 8px;
    color: #173F63;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

body.employee-end-service-page .end-service-severance > p,
body.employee-end-service-page .end-service-options > p:not(.end-service-status),
body.employee-end-service-page .end-service-option-list p {
    color: #52697D;
    font-size: 14px;
    line-height: 1.5;
}

body.employee-end-service-page .end-service-note {
    margin: 20px 0;
    padding: 14px 16px;
    color: #365967;
    background: #F2F7FC;
    border: 1px solid #D8E8F6;
    border-left: 4px solid #2F72A8;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

body.employee-end-service-page .end-service-severance-warning {
    margin-top: 14px;
    padding: 12px 14px;
    color: #9B2924;
    background: #FFF1F0;
    border: 1px solid #E6B7B3;
    border-left: 4px solid #C13B32;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

body.employee-end-service-page .end-service-severance-warning strong {
    display: block;
    margin-bottom: 3px;
    color: #9B2924;
}

body.employee-end-service-page .end-service-severance-warning .errorlist {
    margin: 0;
    padding-left: 18px;
    color: inherit;
}

body.employee-end-service-page .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.employee-end-service-page .form-actions .btn,
body.employee-end-service-page .end-service-option-list .btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

body.employee-end-service-page .end-service-status {
    margin: 0 0 8px;
    color: #173F63;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

body.employee-end-service-page .end-service-option-list {
    gap: 14px;
    margin-top: 18px;
}

body.employee-end-service-page .end-service-option-list > div,
body.employee-end-service-page .end-service-option-list > form {
    padding: 18px;
    border: 1px solid #D8E2EA;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(23, 63, 99, 0.04);
}

@media (max-width: 700px) {
    body.employee-end-service-page .page-heading h1 {
        font-size: 28px;
    }

    body.employee-end-service-page .form-card.end-service-card,
    body.employee-end-service-page .form-card.end-service-options {
        padding: 18px;
    }

    body.employee-end-service-page .end-service-fields {
        grid-template-columns: 1fr;
    }

    body.employee-end-service-page .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    body.employee-end-service-page .form-actions .btn,
    body.employee-end-service-page .end-service-option-list .btn {
        width: 100%;
    }
}

/* Employer Settings uses the standard centered workspace at a 1320px maximum. */
body.employer-settings-page .content-width {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
}

body.employer-settings-page .row {
    margin-right: 0;
    margin-left: 0;
}

body.employer-settings-page .col-md-9 {
    float: none;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
}

@media (max-width: 840px) {
    body.employer-settings-page .content-width {
        width: calc(100% - 30px);
    }
}

/* Reopen Month uses the standard payroll workspace and page typography. */
body.payroll-run-reopen-page {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.payroll-run-reopen-page .content-width {
    width: min(1320px, calc(100% - 64px));
    max-width: 1320px;
}

body.payroll-run-reopen-page .page-heading h1 {
    margin-bottom: 6px;
    color: #173F63;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.16;
}

body.payroll-run-reopen-page .page-heading p {
    margin: 0;
    color: #52697D;
    font-size: 16px;
    line-height: 1.5;
}

body.payroll-run-reopen-page .reopen-month-page {
    display: grid;
    width: 100%;
    gap: 20px;
}

body.payroll-run-reopen-page .reopen-month-warning {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 22px;
    color: #6D4B12;
    border: 1px solid #E9C97A;
    border-left: 4px solid #D79C2F;
    border-radius: 14px;
    background: #FFF8E7;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.04);
}

body.payroll-run-reopen-page .reopen-month-warning h2 {
    margin: 0 0 7px;
    color: #6D4B12;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

body.payroll-run-reopen-page .reopen-month-warning p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

body.payroll-run-reopen-page .form-card.reopen-month-form-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid rgba(23, 63, 99, 0.10);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 3px 12px rgba(23, 63, 99, 0.05);
}

body.payroll-run-reopen-page .reopen-month-form-card .form-group {
    margin-bottom: 20px;
}

body.payroll-run-reopen-page .reopen-month-form-card label {
    display: block;
    margin-bottom: 7px;
    color: #173F63;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

body.payroll-run-reopen-page .reopen-month-form-card textarea.form-control {
    width: 100%;
    min-height: 128px;
    box-sizing: border-box;
    padding: 10px 12px;
    color: #2F3437;
    border: 1px solid #BFD0DE;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

body.payroll-run-reopen-page .reopen-month-form-card textarea.form-control:focus {
    border-color: #006D6F;
    box-shadow: 0 0 0 3px rgba(0, 109, 111, 0.16);
}

body.payroll-run-reopen-page .reopen-month-form-card .form-text {
    margin: 7px 0 0;
    color: #65798A;
    font-size: 13px;
    line-height: 1.45;
}

body.payroll-run-reopen-page .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.payroll-run-reopen-page .form-actions .btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 840px) {
    body.payroll-run-reopen-page .content-width {
        width: calc(100% - 30px);
    }
}

@media (max-width: 700px) {
    body.payroll-run-reopen-page .page-heading h1 {
        font-size: 28px;
    }

    body.payroll-run-reopen-page .reopen-month-warning,
    body.payroll-run-reopen-page .form-card.reopen-month-form-card {
        padding: 18px;
    }

    body.payroll-run-reopen-page .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    body.payroll-run-reopen-page .form-actions .btn {
        width: 100%;
    }
}

/* Employer dashboard: payroll action matches the Complete Details control. */
.dashboard-actions-panel .dashboard-action .dashboard-action-button--payroll {
    color: var(--ds-plum) !important;
    background: var(--ds-surface) !important;
    border-color: var(--ds-plum) !important;
}

.dashboard-actions-panel .dashboard-action .dashboard-action-button--payroll:hover {
    color: var(--ds-plum-hover) !important;
    background: #F9F4F6 !important;
    border-color: var(--ds-plum-hover) !important;
}

.dashboard-actions-panel .dashboard-action .dashboard-action-button--payroll:focus {
    color: var(--ds-plum-hover) !important;
    background: var(--ds-surface) !important;
    border-color: var(--ds-plum-hover) !important;
    outline: 3px solid #E8D7DB;
    outline-offset: 2px;
}

.dashboard-actions-panel .dashboard-action .dashboard-run-button {
    display: inline-flex;
    flex: 0 0 220px;
    width: 220px;
    height: 48px;
    min-height: 48px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: var(--ds-plum) !important;
    background: var(--ds-surface) !important;
    border-color: var(--ds-plum) !important;
}

.dashboard-actions-panel .dashboard-action .dashboard-run-button:hover {
    color: var(--ds-plum-hover) !important;
    background: #F9F4F6 !important;
    border-color: var(--ds-plum-hover) !important;
}

.dashboard-actions-panel .dashboard-action .dashboard-run-button:focus {
    color: var(--ds-plum-hover) !important;
    background: var(--ds-surface) !important;
    border-color: var(--ds-plum-hover) !important;
    outline: 3px solid #E8D7DB;
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .dashboard-actions-panel .dashboard-action .dashboard-run-button {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Employee schedule: repeatable paid and unpaid additional breaks. */
.additional-breaks-builder {
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px solid #C9DDEA;
    border-left: 4px solid #2F6F9F;
    border-radius: 10px;
    background: #EFF7FC;
}

/*
 * Variable-day break details sit outside the padded field grid so the visible
 * panel, not only its grid cell, reaches both edges of the weekday card.
 */
body.employee-onboarding-page
    .variable-weekday-schedule > .additional-breaks-builder--schedule-wide {
    width: calc(100% + 2px);
    max-width: none;
    margin: 0 -1px -1px;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
    container-type: inline-size;
}

body.employee-onboarding-page .weekend-work-schedule__header h3,
body.employee-onboarding-page .weekend-work-schedule__header p {
    color: #FFFFFF !important;
}

.additional-breaks-builder__intro p {
    margin: 5px 0 14px;
    color: var(--ds-muted);
}

.additional-breaks-builder__list {
    display: grid;
    gap: 12px;
}

.additional-breaks-builder__row {
    display: grid;
    grid-template-columns: minmax(190px, 1.5fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(145px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #D9E7F0;
    border-radius: 8px;
    background: #FFFFFF;
}

@container (max-width: 720px) {
    .additional-breaks-builder__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .additional-breaks-builder__remove {
        justify-self: start;
    }
}

.additional-breaks-builder__field {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--ds-navy);
    font-size: 13px;
}

.additional-breaks-builder__field > span {
    font-weight: 600;
}

.additional-breaks-builder__add {
    margin-top: 12px;
}

@media (max-width: 900px) {
    .additional-breaks-builder__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .additional-breaks-builder__row {
        grid-template-columns: 1fr;
    }
}

/* Employment Agreement: guided preparation card. */
.agreement-prepare-card {
    flex: 1 1 100%;
    width: 100%;
    max-width: 640px;
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    margin: 0;
    border: 1px solid #C9DDEA;
    border-left: 4px solid var(--ds-teal);
    border-radius: var(--ds-radius-lg);
    background: #EDF7F8;
    box-shadow: var(--ds-shadow);
}

.agreement-prepare-card h3,
.agreement-issue .agreement-prepare-card h3 {
    margin: 0;
    color: var(--ds-navy);
    font-size: 17px;
}

.agreement-prepare-card p,
.agreement-issue .agreement-prepare-card p {
    margin: -2px 0 2px;
    color: var(--ds-muted);
}

.agreement-prepare-card label {
    margin: 0;
    color: var(--ds-navy);
    font-weight: 600;
}

.agreement-prepare-card .form-control {
    width: 100%;
    min-height: 42px;
    border-color: #AEBFCD;
    background: var(--ds-surface);
}

.agreement-prepare-card .btn {
    width: 100%;
    min-height: 42px;
}

.agreement-issue .agreement-prepare-card {
    margin-top: 12px;
}

@media (max-width: 540px) {
    .agreement-prepare-card {
        max-width: none;
        padding: 16px;
    }
}

/* Additional Ordinary Day Worked: compact checkbox and clearly separated breaks. */
.additional-day-next-day > label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    margin: 0;
    cursor: pointer;
}

.additional-day-next-day input[type="checkbox"] {
    display: inline-block !important;
    flex: 0 0 18px;
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: var(--ds-teal);
}

.additional-day-break-list {
    display: grid;
    gap: 16px;
    margin-top: 10px;
}

.additional-day-break-row {
    gap: 14px;
    padding: 16px;
    border: 1px solid #D9E7F0;
    border-radius: 8px;
    background: #F8FBFD;
}

.additional-day-break-remove {
    justify-self: start;
    margin-top: 4px;
}

.additional-day-break-add {
    margin-top: 16px;
}

/* Employee payslip: contextual help for overtime compliance notices. */
.employee-detail-route .employee-live-preview .payslip-summary-card {
    overflow: hidden;
}

.employee-detail-route .overtime-compliance-notice {
    display: block;
    overflow: visible;
}

.employee-detail-route .overtime-compliance-notice > span:first-child {
    display: inline;
}

.employee-detail-route .overtime-compliance-notice:hover,
.employee-detail-route .overtime-compliance-notice:focus-within {
    position: relative;
    z-index: 100;
}

.employee-detail-route .overtime-notice-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    vertical-align: text-bottom;
}

.employee-detail-route .overtime-notice-help__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #9D690F;
    border-radius: 50%;
    color: #9D690F;
    background: #FFF0C8;
    font: 700 13px/1 Arial, sans-serif;
    cursor: help;
}

.employee-detail-route .overtime-notice-help__trigger:hover,
.employee-detail-route .overtime-notice-help__trigger:focus-visible {
    color: #FFFFFF;
    background: #9D690F;
    outline: none;
}

.employee-detail-route .overtime-notice-help__trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(157, 105, 15, 0.22);
}

.employee-detail-route .overtime-notice-help__tooltip {
    position: absolute;
    right: auto;
    left: 0;
    top: calc(100% + 7px);
    bottom: auto;
    z-index: 110;
    width: min(240px, calc(100vw - 64px));
    padding: 10px 12px;
    border: 1px solid #E8CF8B;
    border-radius: 8px;
    color: #173F63;
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(23, 63, 99, 0.16);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.employee-detail-route .overtime-notice-help__tooltip strong {
    display: block;
    margin-bottom: 5px;
    color: #9D690F;
}

.employee-detail-route .overtime-notice-help:hover .overtime-notice-help__tooltip,
.employee-detail-route .overtime-notice-help:focus-within .overtime-notice-help__tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Dashboard employee card colour treatment. */
.dashboard-overview .dashboard-glance-card--employees > a,
.dashboard-overview .dashboard-glance-card--employees > a:hover,
.dashboard-overview .dashboard-glance-card--employees > a:focus {
    color: #009B77;
}

.dashboard-overview .dashboard-glance-card--employees .dashboard-icon-tile {
    color: #009B77;
}

.dashboard-overview .dashboard-icon-tile--teal,
.dashboard-overview .dashboard-icon-tile--green,
.dashboard-overview .dashboard-icon-tile--tip,
.dashboard-overview .dashboard-caught-up .dashboard-action-icon {
    background: #D9F2EC;
}

.dashboard-overview .dashboard-actions-panel .dashboard-action .dashboard-run-button {
    border-color: #009B77 !important;
    background: #009B77 !important;
    color: #FFFFFF !important;
}

.dashboard-overview .dashboard-actions-panel .dashboard-action .dashboard-run-button:hover,
.dashboard-overview .dashboard-actions-panel .dashboard-action .dashboard-run-button:focus {
    border-color: #D9F2EC !important;
    background: #D9F2EC !important;
    color: #1C6CAC !important;
}

/* Unified ordinary action-button palette. Semantic and disabled controls are excluded. */
.btn-primary:not([disabled]):not(.disabled),
.btn-default:not([disabled]):not(.disabled),
.btn-success:not([disabled]):not(.disabled),
.dashboard-run-button:not([disabled]):not(.disabled),
.regular-input-add:not([disabled]):not(.disabled),
.action-button:not([disabled]):not(.disabled) {
    color: #FFFFFF !important;
    background: #009B77 !important;
    border-color: #009B77 !important;
}

.btn-primary:not([disabled]):not(.disabled):hover,
.btn-default:not([disabled]):not(.disabled):hover,
.btn-success:not([disabled]):not(.disabled):hover,
.dashboard-run-button:not([disabled]):not(.disabled):hover,
.regular-input-add:not([disabled]):not(.disabled):hover,
.action-button:not([disabled]):not(.disabled):hover,
.btn-primary:not([disabled]):not(.disabled):focus,
.btn-default:not([disabled]):not(.disabled):focus,
.btn-success:not([disabled]):not(.disabled):focus,
.dashboard-run-button:not([disabled]):not(.disabled):focus,
.regular-input-add:not([disabled]):not(.disabled):focus,
.action-button:not([disabled]):not(.disabled):focus {
    color: #1C6CAC !important;
    background: #D9F2EC !important;
    border-color: #D9F2EC !important;
}

.payroll-run-list-page .payroll-run-past .dashboard-run-button.payroll-run-history-action:not([disabled]):not(.disabled) {
    color: #FFFFFF !important;
    background: #1C6CAC !important;
    border-color: #1C6CAC !important;
}

.payroll-run-list-page .payroll-run-past .dashboard-run-button.payroll-run-history-action:not([disabled]):not(.disabled):hover,
.payroll-run-list-page .payroll-run-past .dashboard-run-button.payroll-run-history-action:not([disabled]):not(.disabled):focus {
    color: #1C6CAC !important;
    background: #EFF7FE !important;
    border-color: #EFF7FE !important;
}

.payroll-run-list-page .payroll-run-past .payroll-run-table .btn-default:not([disabled]):not(.disabled),
.payroll-run-list-page .payroll-run-past .payroll-run-table .btn-default:not([disabled]):not(.disabled):hover,
.payroll-run-list-page .payroll-run-past .payroll-run-table .btn-default:not([disabled]):not(.disabled):focus {
    color: #1C6CAC !important;
    background: #FFFFFF !important;
    border-color: #1C6CAC !important;
}

/* Payroll review: Employees section header bar. */
.payroll-run-detail-page .payroll-review-employees > .payroll-review-heading {
    color: #152B4B !important;
    background: #EFF7FE !important;
}

.payroll-run-detail-page .payroll-review-employees > .payroll-review-heading h2,
.payroll-run-detail-page .payroll-review-employees > .payroll-review-heading small,
.payroll-run-detail-page .payroll-review-employees > .payroll-review-heading > span {
    color: #152B4B !important;
}

/* Payroll review: warning-bar actions use orange outline styling. */
.payroll-run-detail-page .payroll-review-finalise .payroll-review-final-actions .btn:not([disabled]):not(.disabled) {
    color: #B45309 !important;
    background: #FFFFFF !important;
    border-color: #B45309 !important;
}

.payroll-run-detail-page .payroll-review-finalise .payroll-review-final-actions .btn:not([disabled]):not(.disabled):hover,
.payroll-run-detail-page .payroll-review-finalise .payroll-review-final-actions .btn:not([disabled]):not(.disabled):focus {
    color: #B45309 !important;
    background: #FFF4E5 !important;
    border-color: #B45309 !important;
}

/* Payroll review: employee detail and payslip action buttons. */
.payroll-run-detail-page .payroll-review-actions > .btn {
    color: #FFFFFF !important;
    background: #1C6CAC !important;
    border-color: #1C6CAC !important;
}

.payroll-run-detail-page .payroll-review-actions > .btn:hover,
.payroll-run-detail-page .payroll-review-actions > .btn:focus {
    color: #1C6CAC !important;
    background: #EFF7FE !important;
    border-color: #1C6CAC !important;
}

/* Employee Management: consistent content-action palette. */
.employees-route .app-main .btn:not([disabled]):not(.disabled),
.employees-route .app-main .dashboard-run-button:not([disabled]):not(.disabled) {
    color: #FFFFFF !important;
    background: #1C6CAC !important;
    border-color: #1C6CAC !important;
}

.employees-route .app-main .btn:not([disabled]):not(.disabled):hover,
.employees-route .app-main .dashboard-run-button:not([disabled]):not(.disabled):hover,
.employees-route .app-main .btn:not([disabled]):not(.disabled):focus,
.employees-route .app-main .dashboard-run-button:not([disabled]):not(.disabled):focus {
    color: #1C6CAC !important;
    background: #EFF7FE !important;
    border-color: #1C6CAC !important;
}

/* Employee Payroll Inputs: replace pale-green panels with the shared pale blue. */
.employee-detail-route .employee-input-panel .regular-input-heading,
.employee-detail-route .employer-contribution-helper {
    background: #EFF7FE !important;
    border-color: #C5DBED !important;
}

/* Employee Payroll Inputs: consistent action-button palette. */
.employee-detail-route .regular-input-add:not([disabled]):not(.disabled),
.employee-detail-route .payslip-preview-top-actions .payslip-header-action,
.employee-detail-route .btn:not([disabled]):not(.disabled) {
    color: #FFFFFF !important;
    background: #1C6CAC !important;
    border-color: #1C6CAC !important;
}

.employee-detail-route .regular-input-add:not([disabled]):not(.disabled):hover,
.employee-detail-route .regular-input-add:not([disabled]):not(.disabled):focus,
.employee-detail-route .payslip-preview-top-actions .payslip-header-action:hover,
.employee-detail-route .payslip-preview-top-actions .payslip-header-action:focus,
.employee-detail-route .btn:not([disabled]):not(.disabled):hover,
.employee-detail-route .btn:not([disabled]):not(.disabled):focus {
    color: #1C6CAC !important;
    background: #EFF7FE !important;
    border-color: #1C6CAC !important;
}

.employee-detail-route .regular-input-add > span {
    color: #1C6CAC !important;
}

/* Employee Payroll Inputs: Nett Pay band in the live payslip preview. */
.employee-detail-route .employee-live-preview .payslip-summary-net {
    color: #FFFFFF !important;
    background: #1C6CAC !important;
}

/* Employer contribution editor: full-width, stacked medical scheme fields. */
body.employer-contribution-form-page .employer-contribution-form-card {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}

body.employer-contribution-form-page .employer-contribution-form-card form > p {
    display: block;
    width: 100%;
    margin: 0 0 18px;
}

body.employer-contribution-form-page .employer-contribution-form-card form > p > label {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    color: #173F63;
    font-weight: 700;
}

body.employer-contribution-form-page .employer-contribution-form-card form > p > input,
body.employer-contribution-form-page .employer-contribution-form-card form > p > select,
body.employer-contribution-form-page .employer-contribution-form-card form > p > textarea {
    display: block;
    box-sizing: border-box;
}

body.employer-contribution-form-page .employer-contribution-form-card form > p > .helptext {
    display: block;
    width: 100%;
    margin-top: 7px;
    color: #52605B;
    line-height: 1.45;
}

body.employer-contribution-form-page #id_medical_scheme_payroll_treatment {
    width: 100%;
    max-width: none;
}

body.employer-contribution-form-page #id_medical_scheme_members {
    width: min(180px, 100%);
}

body.employer-contribution-form-page
  :is(#id_medical_scheme_registered,
      #id_medical_scheme_other_contributors,
      #id_medical_disability_status) {
    width: min(260px, 100%);
}

/* Leave balances: approved Option 2 colour arrangement (2026-09-24).
   Keep the cards neutral and use a narrow left guide for each leave type. */
.leave-workspace-route .leave-balances-panel > h3 {
    color: #173F63 !important;
    background: #EFF7FE !important;
    border-bottom-color: #CBD9E5 !important;
}

.leave-workspace-route .leave-balances-panel__grid {
    background: #F9FBFD !important;
}

.leave-workspace-route .leave-balances-panel__item,
.leave-workspace-route .leave-balances-panel__item:hover {
    background: #FFFFFF !important;
    border: 1px solid #CBD9E5 !important;
    border-left-width: 5px !important;
    box-shadow: none !important;
    transform: none;
}

.leave-workspace-route .leave-balances-panel__item:nth-child(1) {
    border-left-color: #009B77 !important;
}

.leave-workspace-route .leave-balances-panel__item:nth-child(2) {
    border-left-color: #1C6CAC !important;
}

.leave-workspace-route .leave-balances-panel__item:nth-child(3) {
    border-left-color: #D37A3A !important;
}

.leave-workspace-route .leave-balances-panel__item:nth-child(4) {
    border-left-color: #8DA1B3 !important;
}

/* Transport contribution pop-out controls: approved desktop dimensions.
   The max-width fallback preserves the layout on narrower screens. */
body.employee-onboarding-page
  .pay-setup-popout[data-active-employer-field="transport_direct"]
  .pay-setup-popout__panel {
    width: min(792px, 100%);
}

body.employee-onboarding-page
  .pay-setup-popout[data-active-employer-field="transport_direct"]
  .pay-setup-category-editor {
    grid-template-columns: 1fr;
}

body.employee-onboarding-page
  .pay-setup-popout[data-active-employer-field="transport_direct"]
  .pay-setup-category-editor > [data-field-name^="transport_direct_"] {
    grid-column: 1 / -1;
    width: min(750px, 100%);
}

body.employee-onboarding-page
  .pay-setup-popout[data-active-employer-field="transport_direct"]
  [data-field-name^="transport_direct_"]
  :is(input[type="number"], input[type="text"], select) {
    display: block;
    width: min(750px, 100%) !important;
    height: 42px !important;
    min-height: 42px !important;
}

/* Historical UIF declarations reuse the employer UIF workspace without
   changing Income History or current-payroll forms. */
.historical-uif-form {
    max-width: 1180px;
    margin-inline: auto;
}

.historical-uif-form-heading {
    align-items: center;
}

.historical-uif-back {
    flex: 0 0 auto;
}

.historical-uif-month-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 16px;
    margin: 18px 0;
}

.historical-uif-month-grid .form-group { margin: 0; }
.historical-uif-month-grid label { display: block; margin-bottom: 6px; font-weight: 700; }
.historical-uif-month-grid input {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #B9CAD7;
    border-radius: 6px;
    background: #FFFFFF;
}

.historical-uif-employees {
    padding: 16px;
    margin: 0 0 18px;
    border: 1px solid #D7E1E8;
    border-radius: 8px;
}

.historical-uif-employees legend { padding: 0 6px; color: #173F63; font-weight: 700; }
.historical-uif-employees > p { margin: 0 0 10px; color: #5D7180; }
.historical-uif-employees ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.historical-uif-employees li label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #EFF7FE;
}
.historical-uif-employees input { width: 18px; height: 18px; margin: 0; }

.historical-uif-guidance {
    padding: 14px 16px;
    margin-bottom: 18px;
    color: #173F63;
    background: #EFF7FE;
    border-left: 4px solid #1C6CAC;
    border-radius: 7px;
}
.historical-uif-guidance p { margin: 4px 0 0; }
.historical-uif-period { padding: 0; overflow: hidden; }
.historical-uif-period > h3 {
    padding: 12px 16px;
    margin: 0;
    color: #FFFFFF;
    background: #1C6CAC;
}
.historical-uif-period .table-responsive { padding: 0 14px 10px; }

@media (max-width: 620px) {
    .historical-uif-month-grid { grid-template-columns: 1fr; }
    .historical-uif-form-heading { align-items: center; }
    .historical-uif-form-heading > div { width: 100%; }
    .historical-uif-back { align-self: center; }
}

/* UIF declarations: make the historical-income path a clear, contextual action. */
.uif-historical-action {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin: 0 0 16px;
    color: #173F63;
    background: #EFF7FE;
    border: 1px solid #BDD8EB;
    border-left: 5px solid #31D2F7;
    border-radius: 8px;
}
.uif-historical-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #1C6CAC;
    background: #FFFFFF;
    border-radius: 50%;
    font-size: 21px;
    font-weight: 700;
}
.uif-historical-action__copy strong { display: block; }
.uif-historical-action__copy p {
    margin: 4px 0 0;
    color: #5D7180;
}
.uif-historical-action__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .uif-historical-action { grid-template-columns: auto minmax(0, 1fr); }
    .uif-historical-action__button {
        grid-column: 1 / -1;
        width: 100%;
    }
}
