#authOverlay .auth-hero-copy h1 { margin-top: 0; }

#moduleViewWorkbench .filter-panel,
#moduleViewWorkbench .filter-panel .field,
#moduleViewWorkbench .filter-panel select,
#moduleViewWorkbench .filter-panel button,
#moduleViewWorkbench #filterChips {
  position: relative;
  pointer-events: auto;
  touch-action: manipulation;
}

#moduleViewWorkbench .filter-panel { isolation: isolate; }
#moduleViewWorkbench .filter-panel select,
#moduleViewWorkbench .filter-panel button { z-index: 1; }

#moduleViewWorkbench .filter-date-group {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(47, 107, 255, .18);
  border-radius: 12px;
  background: #f7faff;
  box-shadow: 0 4px 12px rgba(47, 107, 255, .06);
}

#moduleViewWorkbench .filter-date-segment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  color: #34587f;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  border: 0;
  border-right: 1px solid rgba(47, 107, 255, .13);
  background: transparent;
}

#moduleViewWorkbench .filter-date-segment:last-child { border-right: 0; }
#moduleViewWorkbench .filter-date-segment:hover { background: #edf4ff; }
#moduleViewWorkbench .filter-panel :is(select,button,input):focus { outline:none; box-shadow:none; border-color:#d4dae2; }
#moduleViewWorkbench .filter-panel :is(select,button,input):focus-visible { outline:2px solid #818b98; outline-offset:-3px; box-shadow:none; }
#moduleViewWorkbench :is(.filter-date-group,.filter-chip) { border-color:#dce2e9; box-shadow:none; }
#moduleViewWorkbench .filter-date-segment .filter-clear-icon { flex: 0 0 auto; color: #6e8cad; font-size: 16px; line-height: 1; }

#moduleViewWorkbench .mobile-hour-detail.status-cleared { border-color: rgba(8, 138, 112, .2); background: #eefaf6; }
#moduleViewWorkbench .mobile-hour-detail.status-cleared .hour-status,
#moduleViewWorkbench .score-modal-status.status-cleared { color: #087b68; }
#moduleViewWorkbench .score-modal-status.status-cleared { background: #e4f7f0; }

#moduleViewWorkbench .hour-detail-button.has-approved-type .hour-detail-foot {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
#moduleViewWorkbench .hour-detail-button.has-approved-type .hour-status {
  white-space: normal;
  font-size: 9px;
  line-height: 1.4;
}
#moduleViewWorkbench .hour-detail-button.status-cleared .hour-status { color: #087b68; }
#moduleViewWorkbench .mobile-hour-detail.has-approved-type .mobile-hour-status {
  flex-wrap: wrap;
  row-gap: 4px;
}
#moduleViewWorkbench .mobile-hour-detail.has-approved-type .mobile-hour-status b { white-space: normal; }

/* Fullscreen hides the peer-statistics footer; approved handling remains visible. */
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-button.has-approved-type .hour-detail-foot {
  display: flex;
  gap: 0;
}
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-button.has-approved-type .hour-detail-foot > :first-child {
  display: none;
}
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-button.has-approved-type .hour-status {
  font-size: 11px;
  line-height: 1.2;
}
/* Maintained warnings are already included in the approved status text. */
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-button.has-approved-type .hour-alert-badge {
  display: none;
}

@media (max-width: 760px) {
  #moduleViewWorkbench #filterChips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  #moduleViewWorkbench .filter-panel select,
  #moduleViewWorkbench .filter-panel button { min-height: 44px; }
  #moduleViewWorkbench .mobile-hour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #moduleViewWorkbench .filter-date-group {
    display: flex;
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
    overflow: visible;
    border-radius: 11px;
  }
  #moduleViewWorkbench .filter-date-segment { flex: 0 0 auto; padding-inline: 9px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  #moduleViewWorkbench .filter-date-segment { transition: none !important; }
}

/* Render text at its actual size, without scaling a composited table layer. */
#moduleViewWorkbench .matrix-snapshot-mode,
#moduleViewWorkbench .matrix-snapshot-mode [data-motion],
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix *,
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  will-change: auto !important;
}
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix-wrap {
  overflow: auto;
  scrollbar-width: thin;
}
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix {
  position: relative;
  top: 0;
  left: 0;
}
#moduleViewWorkbench .matrix-snapshot-mode .panel-head {
  flex-wrap: wrap;
  gap: 8px;
}
#moduleViewWorkbench .matrix-snapshot-mode .panel-title { min-width: 0; }
#moduleViewWorkbench .matrix-snapshot-mode .panel-title h3,
#moduleViewWorkbench .matrix-snapshot-mode .matrix-formula { white-space: normal; }
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix thead th { padding: 3px; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-hour-label,
#moduleViewWorkbench .matrix-snapshot-mode .matrix-heading-main { font-size: calc(var(--matrix-text-size, 11px) + 1px); }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-hour-total,
#moduleViewWorkbench .matrix-snapshot-mode .matrix-heading-sub { font-size: var(--matrix-text-size, 11px); margin-top: 2px; padding-block: 1px; }
#moduleViewWorkbench .matrix-snapshot-mode .shift-group-content { font-size: var(--matrix-text-size, 11px); line-height: 1.2; }
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix tbody td,
#moduleViewWorkbench .matrix-snapshot-mode .work-matrix tbody th { padding: 2px; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-button,
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-button {
  height: calc(var(--matrix-person-row-height) - 4px);
  min-height: max-content;
  padding: 3px 4px;
  gap: 2px;
  border-radius: 6px;
  box-shadow: none;
}
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-clock { font-size: calc(var(--matrix-text-size, 11px) - 1px); line-height: 1.2; }
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-top { flex-wrap: wrap; gap: 1px 3px; }
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-total { font-size: calc(var(--matrix-text-size, 11px) + 5px); line-height: 1; }
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-total small { font-size: 9px; }
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-split { font-size: calc(var(--matrix-text-size, 11px) - 1px); line-height: 1.2; gap: 2px; padding: 0; }
#moduleViewWorkbench .matrix-snapshot-mode .hour-alert-badge { font-size: calc(var(--matrix-text-size, 11px) - 1px); padding: 1px 3px; }
#moduleViewWorkbench .matrix-snapshot-mode .hour-detail-button.has-approved-type .hour-status { font-size: var(--matrix-text-size, 11px); line-height: 1.2; overflow-wrap: anywhere; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-top { gap: 3px; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-identity { display: flex; flex-wrap: wrap; gap: 2px 3px; min-width: 0; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-name { font-size: calc(var(--matrix-text-size, 11px) + 1px); white-space: normal; overflow-wrap: anywhere; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-rank { min-width: 0; height: auto; padding: 1px 3px; font-size: 10px; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-shift-badge { font-size: 10px; padding: 1px 3px; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-total { font-size: calc(var(--matrix-text-size, 11px) + 5px); }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-split span { padding: 1px 3px; font-size: 10px; }
#moduleViewWorkbench .matrix-snapshot-mode .matrix-person-split strong { font-size: 11px; margin-left: 2px; }
#moduleViewWorkbench #trendChart[data-people-layout^="rows:"] { min-height: 0; max-height: none; }

/* Leave enough line height for CJK and numeric glyphs at fractional display scales. */
#moduleViewWorkbench #kpiGrid .kpi-value { line-height: 1.35; }

/* Column spacers retain every date without laying out thousands of hour cards. */
#moduleViewWorkbench .matrix-windowed .work-matrix {
  width: var(--matrix-virtual-width) !important;
  table-layout: fixed;
}
#moduleViewWorkbench .matrix-windowed .work-matrix thead th,
#moduleViewWorkbench .matrix-windowed .work-matrix tbody td {
  width: var(--matrix-virtual-slot);
  min-width: 0;
  box-sizing: border-box;
}
#moduleViewWorkbench .matrix-windowed .work-matrix .person-summary-heading,
#moduleViewWorkbench .matrix-windowed .work-matrix tbody tr[data-person-row] > th {
  width: var(--matrix-virtual-summary);
  min-width: 0;
  position: sticky;
  left: 0;
}
#moduleViewWorkbench .matrix-windowed .work-matrix .matrix-column-spacer {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

/* Keep multi-day mobile detail cards bounded while retaining full-period totals. */
#moduleViewWorkbench .mobile-matrix-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #dbe1e7;
  border-radius: 12px;
  background: #fff;
}
#moduleViewWorkbench .mobile-matrix-pagination label { font-size: 13px; font-weight: 650; }
#moduleViewWorkbench .mobile-matrix-pagination .site-date-field { flex: 1; min-width: 145px; }
#moduleViewWorkbench .mobile-matrix-pagination select { min-height: 44px; max-width: 100%; }
#moduleViewWorkbench .mobile-matrix-page-count { color: #4b5c6f; font-size: 12px; }
#moduleViewWorkbench .mobile-matrix-pagination p { flex-basis: 100%; margin: 0; color: #4b5c6f; font-size: 12px; line-height: 1.5; }
