/* Conservative presentation polish for the admin dashboard and shared sidebar. */
.dashboard-intro {
  align-items: center;
  padding: 6px 2px 8px;
}

.dashboard-intro h2 {
  margin-bottom: 7px;
  font-size: 23px;
}

.dashboard-intro p {
  margin-bottom: 0;
  max-width: 640px;
}

.dashboard-intro .secondary {
  flex: 0 0 auto;
}

.dashboard-cards {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.dashboard-cards article {
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  border-color: #dde4dd;
  box-shadow: 0 3px 10px rgba(18, 60, 45, 0.035);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-cards article:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(18, 60, 45, 0.07);
}

.dashboard-cards strong {
  margin: 12px 0 5px;
  font-size: 36px;
  letter-spacing: -0.02em;
}

.dashboard-cards em {
  color: #7e8a83;
  font-size: 12px;
}

.shell aside .profile {
  margin: 0 4px;
  padding: 16px 12px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.shell aside .profile b {
  overflow-wrap: anywhere;
}

.shell aside .profile small {
  margin-top: 3px;
  color: #b7cbbb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

@media (max-width: 850px) {
  .dashboard-cards { gap: 12px; }
  .dashboard-cards article { min-height: 126px; }
}

@media (max-width: 500px) {
  .dashboard-intro .secondary { width: 100%; }
  .dashboard-cards strong { font-size: 34px; }
}

/* System-user access management: compact, readable and consistent with IRIS. */
.system-access-panel { padding: 0; overflow: hidden; }
.system-access-panel .compact-heading { padding: 20px 22px 10px; }
.system-users-table th,
.system-users-table td { vertical-align: middle; }
.system-users-table td small { color: #68776c; line-height: 1.45; }
.system-user-actions { white-space: nowrap; }
.system-user-actions .text-btn { margin: 2px 8px 2px 0; }
.system-permission-grid { margin-top: 20px; }
.system-permission-grid .hint { margin-top: 0; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; }
.permission-options label { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #e0e8df; border-radius: 8px; background: #fbfcfa; font-weight: 600; color: #173d30; }
.permission-options input { width: auto; margin: 0; accent-color: #0d4634; }
.temporary-password { display: block; margin: 15px 0 6px; padding: 12px 14px; border: 1px dashed #b8c8b8; border-radius: 8px; background: #f7faf5; color: #123f2f; font-size: 15px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .permission-options { grid-template-columns: 1fr; }
  .system-user-actions { white-space: normal; min-width: 150px; }
}

/* Calendar month navigation presentation only. */
.communication-toolbar .calendar-month-navigator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce4dc;
  border-radius: 9px;
  background: #fff;
}

.communication-toolbar .calendar-month-navigator h2 {
  min-width: 164px;
  margin: 0;
  padding: 0 8px;
  text-align: center;
  font-size: 18px;
}

.communication-toolbar .calendar-month-navigator .secondary {
  min-width: 32px;
  min-height: 32px;
  padding: 2px 9px;
  border-color: transparent;
  background: transparent;
  color: #1f513c;
  font-size: 22px;
  line-height: 1;
}

.communication-toolbar .calendar-month-navigator .secondary:hover {
  background: #f1f5ee;
}

@media (max-width: 520px) {
  .communication-toolbar .calendar-month-navigator h2 {
    min-width: 142px;
    font-size: 16px;
  }
}

/* School policy list presentation only: status, row rhythm and existing actions. */
.policy-list {
  overflow: hidden;
  border: 1px solid #dde4dd;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(18, 60, 45, 0.025);
}

.policy-list .policy-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px 18px;
  border-bottom: 1px solid #e5ebe5;
  transition: background-color 150ms ease;
}

.policy-list .policy-item:last-child {
  border-bottom: 0;
}

.policy-list .policy-item:hover {
  background: #fbfcf8;
}

.policy-list .policy-content {
  min-width: 0;
  flex: 1 1 auto;
}

.policy-list .policy-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.policy-list .policy-heading > b {
  color: #183f2f;
  font-size: 15px;
}

.policy-list .policy-heading .status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #dce4dc;
  border-radius: 999px;
  background: #f6f8f5;
  color: #68776c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.policy-list .policy-heading .status.diterbitkan {
  border-color: #c7dfca;
  background: #eef7ee;
  color: #1f6533;
}

.policy-list .policy-heading .status.draf {
  border-color: #ead9aa;
  background: #fff8e6;
  color: #816115;
}

.policy-list .policy-meta {
  display: block;
  margin-top: 5px;
  color: #748077;
  line-height: 1.48;
}

.policy-list .policy-summary {
  margin: 7px 0 0;
  color: #56655c;
  line-height: 1.45;
}

.policy-list .policy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.policy-list .policy-actions > .text-btn {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d8e3d9;
  border-radius: 7px;
  background: #f6f9f5;
  color: #1f513c;
  font-weight: 700;
}

.policy-list .policy-actions > .text-btn:hover {
  border-color: #b7cfbc;
  background: #edf4ed;
}

.policy-list .policy-overflow {
  position: relative;
}

.policy-list .policy-overflow summary {
  display: grid;
  width: 32px;
  min-height: 32px;
  place-items: center;
  border: 1px solid #dfe6df;
  border-radius: 7px;
  background: #fff;
  color: #516458;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  list-style: none;
}

.policy-list .policy-overflow summary::-webkit-details-marker {
  display: none;
}

.policy-list .policy-overflow summary:hover {
  background: #f4f7f2;
  color: #1f513c;
}

.policy-list .policy-overflow-menu {
  z-index: 2;
}

@media (max-width: 760px) {
  .policy-list .policy-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .policy-list .policy-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Payroll history presentation only: Malay labels, quiet status and action treatment. */
.payroll-history-page {
  width: min(100%, 920px);
  max-width: 920px;
}

.payroll-history-toolbar {
  align-items: center;
  width: 100%;
  margin: 2px 0 20px;
  padding: 20px 22px;
  border: 1px solid #e0e7df;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 16px rgba(18, 60, 45, 0.035);
}

.payroll-history-copy {
  min-width: 0;
}

.payroll-history-eyebrow {
  margin: 0 0 6px;
  color: #af8425;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.095em;
}

.payroll-history-toolbar h2 {
  margin: 0 0 5px;
  color: #133c2c;
  font-size: 23px;
  letter-spacing: -0.015em;
}

.payroll-history-toolbar p:not(.payroll-history-eyebrow) {
  margin: 0;
  color: #718077;
  font-size: 14px;
}

.payroll-history-toolbar #generate-payroll {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(18, 60, 45, 0.12);
  white-space: nowrap;
}

.payroll-history-table {
  overflow: hidden;
  border-color: #dde4dd;
  box-shadow: 0 5px 16px rgba(18, 60, 45, 0.04);
}

.payroll-history-table th {
  padding: 14px 16px;
  color: #536258;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.payroll-history-table td {
  padding: 15px 16px;
  vertical-align: middle;
  border-color: #e5ebe5;
}

.payroll-history-table tbody tr {
  transition: background-color 150ms ease;
}

.payroll-history-table tbody tr:hover {
  background: #fbfcf8;
}

.payroll-history-table .payroll-money {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.payroll-history-table .payroll-history-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #dce4dc;
  border-radius: 999px;
  background: #f6f8f5;
  color: #68776c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.payroll-history-table .payroll-history-status.draf,
.payroll-history-table .payroll-history-status.draft {
  border-color: #dfe4dc;
  background: #f7f8f5;
  color: #627067;
}

.payroll-index-table table {
  width: 100%;
}

.payroll-index-table {
  width: 100%;
  max-width: none;
}

.payroll-index-table th:nth-child(1) { width: 45%; }
.payroll-index-table th:nth-child(2) { width: 25%; }
.payroll-index-table th:nth-child(3) { width: 12%; }
.payroll-index-table th:nth-child(4) { width: 18%; text-align: right; }

.payroll-index-table .payroll-staff-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #173f2e;
}

.payroll-index-table .payroll-period-name {
  color: #183f2e;
  font-weight: 750;
}

.payroll-index-table .payroll-history-actions {
  text-align: right;
}

.payroll-history-actions {
  white-space: nowrap;
}

.payroll-history-table .staff-view-action {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d8e3d9;
  border-radius: 7px;
  background: #f6f9f5;
  color: #1f513c;
  font-weight: 700;
}

.payroll-history-table .staff-view-action:hover {
  border-color: #b7cfbc;
  background: #edf4ed;
}

.payroll-history-table .payroll-delete-action {
  min-height: 32px;
  margin-left: 4px;
  padding: 6px 10px;
  border: 1px solid #ebcccc;
  border-radius: 7px;
  background: #fff8f8;
  color: #9a3d3d;
  font-weight: 700;
}

.payroll-history-table .payroll-delete-action:hover {
  border-color: #dfaaaa;
  background: #fdf0f0;
}

@media (max-width: 760px) {
  .payroll-history-toolbar { align-items: flex-start; padding: 17px; }
  .payroll-history-table { overflow: visible; }
  .payroll-history-table th,
  .payroll-history-table td { padding: 13px 14px; }
}

@media (max-width: 520px) {
  .payroll-history-toolbar #generate-payroll { width: 100%; }
}

/* Payroll detail presentation only: utilities are visually quieter than workflow actions. */
.payroll-detail-toolbar {
  align-items: flex-start;
  margin-bottom: 20px;
}

.payroll-detail-toolbar h2 {
  margin-bottom: 5px;
}

.payroll-detail-toolbar > div:first-child > p:last-child {
  margin-bottom: 0;
}

.payroll-detail-actions {
  min-width: 0;
}

.payroll-detail-utilities,
.payroll-detail-primary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payroll-detail-utilities .secondary {
  min-height: 34px;
  padding: 6px 10px;
  border-color: #d8e3d9;
  background: #f8faf7;
  color: #315946;
  font-size: 12px;
}

.payroll-detail-primary-actions button {
  min-height: 38px;
  padding: 8px 13px;
  white-space: nowrap;
}

.payroll-summary-cards article > small {
  color: #748078;
  line-height: 1.4;
}

.payroll-register table {
  min-width: 1080px;
}

.payroll-register th:nth-child(1),
.payroll-register td:nth-child(1) { width: 42px; }

.payroll-register th:nth-child(2),
.payroll-register td:nth-child(2) { width: 94px; }

.payroll-register th:nth-child(3),
.payroll-register td:nth-child(3) { min-width: 180px; }

.payroll-register th:nth-child(4),
.payroll-register td:nth-child(4) { min-width: 126px; }

.payroll-register th:nth-child(5),
.payroll-register td:nth-child(5) { min-width: 112px; }

.payroll-register th:nth-child(6),
.payroll-register td:nth-child(6) { min-width: 130px; }

.payroll-register th:nth-child(6) {
  white-space: normal;
  line-height: 1.3;
}

.payroll-register th:nth-child(7),
.payroll-register td:nth-child(7) { min-width: 108px; }

.payroll-register th:nth-child(8),
.payroll-register td:nth-child(8) { min-width: 120px; }

.payroll-register th:nth-child(9),
.payroll-register td:nth-child(9) { width: 62px; }

.payroll-register .payroll-prorata {
  display: block;
  margin-top: 4px;
  color: #7b877e;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .payroll-detail-toolbar {
    gap: 16px;
    flex-direction: column;
  }

  .payroll-detail-actions {
    align-items: flex-start;
  }

  .payroll-detail-utilities,
  .payroll-detail-primary-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .payroll-detail-actions,
  .payroll-detail-utilities,
  .payroll-detail-primary-actions {
    width: 100%;
  }

  .payroll-detail-primary-actions button {
    flex: 1 1 100%;
  }
}

/* Payslip container only: more desktop reading space while preserving its print layout. */
@media screen {
  .corporate-payslip-overlay {
    padding: 28px;
    overflow: hidden;
  }

  .corporate-payslip-overlay .corporate-payslip {
    width: min(1060px, calc(100vw - 56px));
    max-height: 92vh;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .corporate-payslip-overlay .corporate-payslip-header {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(18, 60, 45, 0.07);
  }
}

@media screen and (max-width: 700px) {
  .corporate-payslip-overlay {
    padding: 12px;
  }

  .corporate-payslip-overlay .corporate-payslip {
    width: calc(100vw - 24px);
    max-height: 94vh;
  }
}

/* Payroll settings presentation only: dynamic items remain unchanged, but are easier to scan. */
.payroll-settings-modal .modal {
  width: min(780px, 100%);
}

.payroll-settings-modal .dynamic-payroll-section {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid #e3e9e2;
}

.payroll-settings-modal .modal-head + .dynamic-payroll-section {
  border-top: 0;
  padding-top: 0;
}

.payroll-settings-modal .section-actions {
  align-items: flex-start;
  gap: 16px;
}

.payroll-settings-modal .section-actions h3 {
  margin-bottom: 4px;
}

.payroll-settings-modal .section-actions .muted {
  margin: 0;
}

.dynamic-payroll-item-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dynamic-payroll-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid #dee7de;
  border-radius: 9px;
  background: #fbfcfa;
}

.dynamic-payroll-item-main {
  min-width: 0;
}

.dynamic-payroll-item-main > b {
  display: block;
  color: #183f2e;
  font-size: 14px;
  line-height: 1.35;
}

.dynamic-payroll-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: 5px;
  color: #718077;
  font-size: 12px;
  line-height: 1.4;
}

.dynamic-payroll-item-meta span + span::before {
  margin: 0 7px;
  color: #b2bdb2;
  content: '·';
}

.dynamic-payroll-item-meta .dynamic-payroll-item-amount {
  color: #315946;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dynamic-payroll-item-assignees {
  color: #7b877e;
  font-weight: 500;
}

.dynamic-payroll-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.dynamic-payroll-item-actions .text-btn {
  min-height: 30px;
  padding: 5px 8px;
}

@media (max-width: 560px) {
  .payroll-settings-modal .section-actions,
  .dynamic-payroll-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .payroll-settings-modal .section-actions .secondary {
    width: 100%;
  }

  .dynamic-payroll-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Staff list presentation only: filters, table rhythm and non-wrapping staff IDs. */
.employee-toolbar {
  align-items: center;
  margin-bottom: 18px;
}

.employee-toolbar .tool-actions {
  align-items: center;
}

.employee-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(160px, 220px));
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.employee-filters input,
.employee-filters select {
  width: 100%;
  min-width: 0;
}

.employee-list-panel {
  overflow: hidden;
  border-color: #dde4dd;
  box-shadow: 0 3px 10px rgba(18, 60, 45, 0.025);
}

.employee-list-table th {
  padding: 14px 16px;
  color: #536258;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.employee-list-table td {
  padding: 15px 16px;
  vertical-align: middle;
  border-color: #e5ebe5;
}

.employee-list-table tbody tr {
  transition: background-color 150ms ease;
}

.employee-list-table tbody tr:hover {
  background: #fbfcf8;
}

.employee-list-table td b,
.employee-list-table td small {
  display: block;
}

.employee-list-table td small {
  margin-top: 3px;
  color: #7e8a83;
  line-height: 1.35;
}

.employee-id-cell {
  min-width: 112px;
  white-space: nowrap;
  color: #1e4d3a;
  font-weight: 750;
}

.employee-account-cell,
.employee-action-cell {
  white-space: nowrap;
}

.employee-list-table .status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
}

.employee-list-table .account-action,
.employee-list-table .staff-view-action {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d8e3d9;
  border-radius: 7px;
  background: #f6f9f5;
  color: #1f513c;
  font-weight: 700;
}

.employee-list-table .account-action:hover,
.employee-list-table .staff-view-action:hover {
  border-color: #b7cfbc;
  background: #edf4ed;
}

@media (max-width: 960px) {
  .employee-filters {
    grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(160px, 1fr));
  }

  .employee-filters #record-status {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .employee-toolbar {
    align-items: flex-start;
  }

  .employee-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .employee-list-panel {
    overflow: visible;
  }

  .employee-list-table th,
  .employee-list-table td {
    padding: 13px 14px;
  }
}

/* Contract list presentation only: streamlined filters and staff-list table treatment. */
.contract-toolbar {
  align-items: center;
  margin-bottom: 18px;
}

.contract-filters {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(180px, 230px) minmax(180px, 230px);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.contract-filters input,
.contract-filters select {
  width: 100%;
  min-width: 0;
}

.contract-list-panel {
  overflow: hidden;
  border-color: #dde4dd;
  box-shadow: 0 3px 10px rgba(18, 60, 45, 0.025);
}

.contract-list-table th {
  padding: 14px 16px;
  color: #536258;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.contract-list-table td {
  padding: 15px 16px;
  vertical-align: middle;
  border-color: #e5ebe5;
}

.contract-list-table tbody tr {
  transition: background-color 150ms ease;
}

.contract-list-table tbody tr:hover {
  background: #fbfcf8;
}

.contract-list-table td small,
.contract-list-table .contract-number-cell b {
  display: block;
}

.contract-list-table td small {
  margin-top: 3px;
  color: #7e8a83;
  line-height: 1.35;
}

.contract-number-cell {
  min-width: 168px;
}

.contract-number-cell b,
.contract-employee-id-cell,
.contract-action-cell {
  white-space: nowrap;
}

.contract-employee-id-cell {
  min-width: 112px;
  color: #1e4d3a;
  font-weight: 750;
}

.contract-list-table .status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
}

@media (max-width: 820px) {
  .contract-filters {
    grid-template-columns: minmax(240px, 1fr) minmax(170px, 1fr);
  }
}

@media (max-width: 640px) {
  .contract-toolbar { align-items: flex-start; }
  .contract-filters { grid-template-columns: 1fr; gap: 10px; }
  .contract-list-panel { overflow: visible; }
  .contract-list-table th,
  .contract-list-table td { padding: 13px 14px; }
}

/* Leave list presentation only: a grouped action area and four-control toolbar. */
.leave-toolbar {
  align-items: center;
  margin-bottom: 18px;
}

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

.leave-list-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(160px, 220px));
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.leave-list-filters input,
.leave-list-filters select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 960px) {
  .leave-list-filters {
    grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .leave-toolbar { align-items: flex-start; }
  .leave-actions { width: 100%; flex-wrap: wrap; }
  .leave-list-filters { grid-template-columns: 1fr; gap: 10px; }
}

/* Attendance header presentation only: operations are distinct from utilities. */
.attendance-toolbar {
  align-items: center;
}

.attendance-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.attendance-action-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.attendance-utilities {
  padding-left: 16px;
  border-left: 1px solid #d9e2da;
}

.attendance-utilities .secondary {
  border-color: #e0e6e0;
  background: #fafbf8;
  color: #4c6253;
}

.attendance-utilities .secondary:hover {
  border-color: #c7d5c8;
  background: #f2f6f0;
  color: #1f513c;
}

@media (max-width: 900px) {
  .attendance-toolbar { align-items: flex-start; }
  .attendance-actions { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .attendance-actions,
  .attendance-action-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .attendance-utilities {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid #d9e2da;
    border-left: 0;
  }
}

/* Attendance sub-navigation: compact presentation only; attendance behaviour is unchanged. */
.attendance-header {
  margin-bottom: 18px;
}

.attendance-title h2 {
  margin-bottom: 6px;
}

.attendance-title p:last-child {
  margin-bottom: 0;
}

.attendance-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #dfe6df;
}

.attendance-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.attendance-tab {
  min-height: 36px;
  padding: 8px 11px 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #365847;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.attendance-tab:hover {
  background: #f1f5ee;
  color: #173f2e;
}

.attendance-tab.is-active {
  border-bottom-color: #bb972f;
  background: #fafbf7;
  color: #123c2c;
  font-weight: 800;
}

.attendance-manual {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .attendance-subnav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .attendance-tabs {
    flex-wrap: wrap;
  }
}

/* Admin e-RPH reporting presentation only: compact controls and weekly-status pills. */
.erph-report-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

.erph-report-filters,
.erph-report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.erph-report-filters {
  flex: 1 1 auto;
  min-width: 0;
}

.erph-report-filters input {
  width: min(360px, 100%);
  min-width: 220px;
}

.erph-report-filters select {
  width: 170px;
  flex: 0 0 auto;
}

.erph-report-actions {
  flex: 0 0 auto;
}

.erph-weekly-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.erph-weekly-badge.complete {
  border-color: #c7dfca;
  background: #eef7ee;
  color: #1f6533;
}

.erph-weekly-badge.incomplete {
  border-color: #ead9aa;
  background: #fff8e6;
  color: #816115;
}

.erph-weekly-badge.late {
  border-color: #ebc9c9;
  background: #fdf0f0;
  color: #a13d3d;
}

.erph-weekly-badge.not-required {
  border-color: #dce4dc;
  background: #f6f8f5;
  color: #68776c;
}

.erph-monitor-teacher {
  padding: 3px 0;
  color: var(--green);
  font-weight: 700;
  text-align: left;
}

.erph-monitor-teacher:hover,
.erph-monitor-teacher:focus-visible {
  text-decoration: underline;
}

.erph-monitor-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.erph-monitor-breadcrumb .text-btn {
  margin-right: 5px;
  color: var(--green);
  font-weight: 700;
}

.erph-monitor-breadcrumb b { color: var(--ink); }

.erph-monitor-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.erph-monitor-heading h2 { margin: 3px 0 5px; }
.erph-monitor-heading p { margin: 0; }

.erph-rpm-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf8;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.erph-monitor-summary { margin-bottom: 18px; }
.erph-monitor-day {
  margin-top: 16px;
  overflow: hidden;
}
.erph-monitor-day h3 {
  margin: -1px -1px 12px;
  padding: 11px 14px;
  border-bottom: 1px solid #e7e1d4;
  background: #fbf7ec;
  color: var(--green);
  font-size: 14px;
  letter-spacing: .02em;
}
.erph-monitor-blocks {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}
.erph-monitor-blocks article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  border: 1px solid #ebe6da;
  border-radius: 8px;
  background: #fff;
}
.erph-monitor-blocks b,
.erph-monitor-blocks small { display: block; }
.erph-monitor-session-info { min-width: 0; }
.erph-monitor-blocks b { color: var(--ink); font-size: 14px; }
.erph-monitor-session-time {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}
.erph-monitor-blocks small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.erph-monitor-block-action { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.erph-monitor-block-action .status {
  margin: 0;
  white-space: nowrap;
}
.erph-monitor-entry { min-height: 32px; padding: 6px 10px; white-space: nowrap; }
.erph-monitor-not-started { color: var(--muted); font-size: 12px; white-space: nowrap; }

.staff-attendance-today { margin-bottom: 18px; }
.staff-attendance-today .compact-heading { align-items: center; gap: 16px; }
.staff-attendance-today h3 { margin: 2px 0 3px; }
.staff-attendance-clock-action { flex: 0 0 auto; }
.staff-attendance-today-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.staff-attendance-today-grid > div {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 12px;
  background: #fff;
}
.staff-attendance-today-grid span { color: var(--muted); font-size: 12px; }
.staff-attendance-today-grid b { color: var(--ink); font-size: 14px; }
.staff-attendance-today-grid .status { font-size: 12px; }
.staff-attendance-today > .hint { display: block; margin-top: 10px; }

@media (max-width: 560px) {
  .erph-monitor-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .erph-monitor-day h3 { padding: 10px 12px; }
  .erph-monitor-blocks { padding: 0 12px 12px; }
  .erph-monitor-blocks article { align-items: flex-start; flex-direction: column; gap: 9px; }
  .erph-monitor-block-action { width: 100%; justify-content: space-between; }
  .staff-attendance-today .compact-heading { align-items: flex-start; flex-direction: column; }
  .staff-attendance-clock-action { width: 100%; }
  .staff-attendance-clock-action button { width: 100%; }
  .staff-attendance-today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .erph-report-controls,
  .erph-report-filters,
  .erph-report-actions {
    flex-wrap: wrap;
  }

  .erph-report-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .erph-report-actions { width: 100%; }
}

@media (max-width: 500px) {
  .erph-report-filters,
  .erph-report-actions {
    width: 100%;
  }

  .erph-report-filters input,
  .erph-report-filters select {
    width: 100%;
  }
}
