:root {
  --bg: #111923;
  --surface: #1d2835;
  --surface-muted: #273545;
  --text: #e7eef7;
  --muted: #9aa9bb;
  --line: #344354;
  --sidebar: #172033;
  --sidebar-text: #f7fafc;
  --accent: #4f8fca;
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --warn: #d79b00;
  --good: #169b62;
  --dropoff-warning-bg: #8f2426;
  --dropoff-warning-hover: #9d2b2d;
  --dropoff-warning-text: #ffffff;
  --dropoff-warning-border: rgba(255, 255, 255, 0.24);
  --radius: 8px;
  --sticky-ncr-actions-top: 72px;
  --sticky-ncr-table-head-top: 132px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

body.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.muted {
  color: var(--muted);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.link-btn {
  max-width: 100%;
  padding: 2px 0;
  min-height: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn:hover {
  color: color-mix(in srgb, var(--accent) 82%, var(--text) 18%);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 52%, transparent);
  text-underline-offset: 3px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}

/* Chrome Sidebar */
.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-collapse-btn {
  margin: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-rail {
  display: none;
  min-height: 100vh;
  padding: 10px 8px;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sidebar-text);
}

body.sidebar-collapsed .sidebar {
  display: none;
}

body.sidebar-collapsed .sidebar-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

.brand {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-button {
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.brand-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mini-nav-group,
.mini-shortcuts {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.mini-nav-group {
  position: relative;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mini-nav-group:last-child,
.mini-bottom-actions {
  border-bottom: 0;
}

.mini-restore-group .mini-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.mini-nav-spacer {
  flex: 1;
}

.mini-brand-btn,
.mini-nav-btn {
  position: relative;
  width: 44px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.mini-brand-btn {
  min-height: 44px;
}

.mini-brand-btn .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.mini-nav-btn i {
  width: 18px;
  text-align: center;
}

.mini-brand-btn:hover,
.mini-nav-btn:hover,
.mini-brand-btn.active,
.mini-nav-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.mini-brand-btn.active,
.mini-nav-btn.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.mini-tech-actions.collapsed,
.mini-shortcuts:empty {
  display: none;
}

.mini-file-tools-flyout {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 0;
  z-index: 60;
  width: 180px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.mini-file-tools-flyout[hidden] {
  display: none;
}

.mini-file-tools-flyout strong {
  padding: 2px 4px 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.mini-file-tools-flyout button {
  min-height: 34px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.mini-file-tools-flyout button:hover {
  background: var(--surface-muted);
}

.mini-file-tools-flyout i {
  width: 18px;
  color: var(--muted);
  text-align: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--accent);
  color: var(--accent-ink);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-section-label {
  margin: 12px 8px 3px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.sidebar-shortcuts {
  display: grid;
  gap: 4px;
}

.sidebar-shortcuts:empty {
  display: none;
}

.shortcut-nav-item {
  min-height: 30px;
  padding-left: 28px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 7px 7px 0;
}

.shortcut-nav-item:hover,
.shortcut-nav-item.active {
  color: #fff;
  border-left-color: var(--accent);
}

.nav-item,
.ghost-btn {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  text-align: left;
}

.nav-item i,
.ghost-btn i {
  width: 18px;
  text-align: center;
}

.nav-item:hover,
.ghost-btn:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-actions {
  margin-top: auto;
  display: grid;
  gap: 6px;
}

.file-tools-panel {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.file-tools-panel.collapsed {
  display: none;
}

.file-tools-panel .ghost-btn {
  min-height: 34px;
  font-size: 13px;
}

.tech-actions {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.tech-actions.collapsed {
  display: none;
}

.tech-actions strong {
  padding: 0 2px 4px;
  font-size: 13px;
}

.app-shell {
  min-width: 0;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 72px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 31px;
}
h2 {
  font-size: 18px;
}

.topbar-actions,
.inline-controls,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.save-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.save-state.dirty {
  background: #1f2937;
  color: #ffffff;
  border: 1px solid var(--accent);
}

.dirty-details {
  position: relative;
}

.dirty-details-btn {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.dirty-details-btn:not(:disabled):hover {
  border-color: var(--accent);
}

.dirty-details-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: min(320px, 86vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.dirty-details-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.dirty-details-list {
  display: grid;
  gap: 2px;
}

.dirty-detail-row {
  min-height: 34px;
  padding: 7px 0;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
}

.dirty-detail-row span {
  font-weight: 850;
}

.dirty-detail-examples {
  display: grid;
  gap: 2px;
}

.dirty-detail-examples span {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.dirty-detail-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.primary-btn,
.secondary-btn,
.icon-btn {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
}

.primary-btn {
  background: var(--accent);
  color: var(--accent-ink);
}

.secondary-btn,
.icon-btn {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--line);
}

.secondary-btn.active,
.modal-mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.icon-btn {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric {
  min-height: 104px;
  padding: 16px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 4%);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  font-size: 30px;
}

.metric small {
  color: var(--muted);
  font-weight: 700;
}

.profile-title-card {
  min-height: 104px;
}

.profile-title-card strong {
  font-size: 24px;
}

.profile-requirements-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.profile-requirement-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 118px;
  padding: 3px 14px;
  border-left: 1px solid var(--line);
}

.profile-requirement-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.profile-requirement-stat strong {
  color: var(--text);
  font-size: 16px;
}

.profile-requirement-stat span,
.profile-requirements-no-history {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.profile-requirement-stat.primary strong {
  color: var(--accent);
}

.profile-requirement-stat.overdue strong {
  color: color-mix(in srgb, #dc2626 78%, var(--text) 22%);
}

.profile-requirements-list {
  display: grid;
}

.profile-requirement-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(90px, 0.55fr) minmax(120px, 0.7fr) minmax(130px, 0.7fr);
  gap: 14px;
  align-items: center;
  min-height: 38px;
  padding: 7px 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.profile-requirement-row:first-child {
  border-top: 0;
}

.profile-requirement-row > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-requirement-head {
  min-height: 32px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-requirements-list .empty,
.profile-requirements-no-history {
  padding: 14px;
}

.requirement-status-badge.due,
.requirement-status-badge.due-soon {
  border-color: color-mix(in srgb, #d97706 55%, var(--line) 45%);
  background: color-mix(in srgb, #d97706 14%, var(--surface) 86%);
}

.requirement-status-badge.not-yet-due,
.requirement-status-badge.no-current-occurrence {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .profile-requirement-row {
    grid-template-columns: minmax(160px, 1.35fr) 90px 118px 128px;
    gap: 10px;
  }
}

.dashboard-grid,
.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-grid.single {
  grid-template-columns: 1fr;
}

.chart-wrap {
  height: 310px;
  position: relative;
}

.dashboard-chart-picker {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  z-index: 4;
}

.dashboard-chart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(62vw, 360px);
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.dashboard-chart-toggle:hover,
.dashboard-chart-toggle[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-muted);
}

.dashboard-chart-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dashboard-chart-toggle i {
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.16s ease;
}

.dashboard-chart-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.dashboard-chart-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: 100%;
  min-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.dashboard-chart-menu[hidden] {
  display: none;
}

.dashboard-chart-menu button {
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 750;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.dashboard-chart-menu button:hover,
.dashboard-chart-menu button:focus-visible {
  outline: none;
  background: var(--surface-muted);
}

.dashboard-chart-menu button[aria-checked="true"] {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
}

.scope-chart-series {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.scope-chart-series label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.scope-chart-series label:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

.scope-chart-series input {
  accent-color: var(--accent);
}

#dashboard-tech-filter:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, #000000 8%);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  table-layout: fixed;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.table-sort {
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-transform: inherit;
}

.table-sort i {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-size: 11px;
}

.table-sort.active {
  color: var(--text);
}

.table-sort.active i {
  color: var(--accent);
}

.production-summary-name-sort {
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 22px;
}

.production-summary-name-head .table-sort {
  width: 100%;
}

#production-summary-head .table-sort {
  min-height: 18px;
}

.production-summary-name-mode {
  position: absolute;
  right: 0;
  width: 20px;
  height: 18px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.production-summary-name-mode:hover {
  color: var(--accent);
  background: transparent;
}

#production-summary-head th:not(.production-summary-name-head) .table-sort {
  width: 100%;
  justify-content: center;
  text-align: center;
}

tr:last-child td {
  border-bottom: 0;
}

#production-table-head,
#production-table-body {
  font-size: 13px;
}

#production-table-body input[type="number"] {
  min-height: 30px;
  padding: 4px 6px;
  text-align: center;
}

.repair-col {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: center;
}

.production-date-col {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
}

.production-metric-col {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  text-align: center;
}

.production-action-col {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
}

.inline-production-input {
  width: 48px;
  min-width: 48px;
}

.date-inline {
  width: 112px;
  min-width: 112px;
}

.hours-inline {
  width: 64px;
  min-width: 64px;
}

#production-table-body .repair-zero {
  color: color-mix(in srgb, var(--muted) 58%, var(--bg) 42%);
  background: color-mix(
    in srgb,
    var(--input-bg, var(--surface)) 46%,
    var(--bg) 54%
  );
  border-color: color-mix(in srgb, var(--line) 42%, var(--bg) 58%);
  font-weight: 500;
}

#production-table-body .repair-zero:hover,
#production-table-body .repair-zero:focus {
  color: var(--text);
  background: var(
    --input-bg,
    color-mix(in srgb, var(--surface) 72%, #000000 28%)
  );
  border-color: var(--accent);
}

.summary-date-input {
  min-width: 132px;
  min-height: 30px;
  padding: 4px 6px;
}

.summary-date-cell {
  width: 116px;
  cursor: pointer;
}

.summary-tech-col {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.summary-tech-col .link-btn {
  display: inline-block;
}

#tardy-summary-panel table,
#upto-summary-panel table {
  table-layout: fixed;
  min-width: 920px;
}

#tardy-summary-panel,
#upto-summary-panel {
  padding: 10px;
}

#tardy-summary-panel .panel-header,
#upto-summary-panel .panel-header {
  margin-bottom: 8px;
}

#tardy-summary-panel .table-wrap,
#upto-summary-panel .table-wrap {
  background: color-mix(in srgb, var(--surface) 84%, var(--bg) 16%);
}

#tardy-summary-panel th,
#tardy-summary-panel td,
#upto-summary-panel th,
#upto-summary-panel td {
  height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

#tardy-summary-panel .summary-tech-col,
#upto-summary-panel .summary-tech-col {
  width: 185px;
  min-width: 185px;
  max-width: 185px;
}

.dropoff-summary-name-sort {
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 24px;
}

.dropoff-summary-name-sort .table-sort {
  width: 100%;
}

.dropoff-summary-count-sort {
  position: absolute;
  right: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.dropoff-summary-count-sort:hover,
.dropoff-summary-count-sort.active {
  color: var(--accent);
  background: transparent;
}

.summary-control-group {
  min-height: 36px;
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.summary-inline-field {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
}

.summary-inline-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-inline-field select,
.summary-inline-field input {
  width: auto;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(
    --input-bg,
    color-mix(in srgb, var(--surface) 72%, #000000 28%)
  );
  color: var(--text);
}

.summary-inline-field select {
  min-width: 128px;
}

.production-summary-date-field input {
  min-width: 126px;
}

.summary-default-btn {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-default-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface-muted) 70%, var(--accent) 30%);
}

#tardy-summary-panel .summary-date-cell,
#upto-summary-panel .summary-date-cell {
  width: 92px;
  min-width: 92px;
}

.summary-date-cell:hover {
  background: var(--surface-muted);
}

.warning-cell {
  background: var(--dropoff-warning-bg);
  color: var(--dropoff-warning-text);
  border-color: var(--dropoff-warning-border);
}

.summary-date-cell.warning-cell:hover,
tbody tr:hover td.warning-cell,
tbody tr:hover th.warning-cell {
  background: var(--dropoff-warning-hover);
  color: var(--dropoff-warning-text);
}

body[data-theme="executive-teal"],
body[data-theme="workshop-sage"] {
  --dropoff-warning-bg: #b74745;
  --dropoff-warning-hover: #c4514f;
  --dropoff-warning-text: #ffffff;
  --dropoff-warning-border: rgba(255, 255, 255, 0.34);
  color-scheme: light;
}

body[data-theme="classic"] {
  --dropoff-warning-bg: #4a2a2a;
  --dropoff-warning-hover: #573232;
  --dropoff-warning-text: #ffffff;
  --dropoff-warning-border: #444444;
}

body[data-theme="classic"] .panel,
body[data-theme="classic"] .table-wrap,
body[data-theme="classic"] .definition-item,
body[data-theme="classic"] .metric {
  box-shadow: none;
}

body[data-theme="classic"] .nav-item.active,
body[data-theme="classic"] .shortcut-nav-item.active {
  border: 1px solid #ffffff;
  background: #3a3a3a;
}

#production-table-body td,
#production-table-head th {
  padding: 6px 7px;
}

#production-table-body td {
  vertical-align: middle;
}

#production-table-body .production-metric-col,
#production-table-body .score-cell {
  vertical-align: middle;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field small {
  color: var(--muted);
  line-height: 1.35;
}

.date-stepper {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.date-stepper input {
  min-width: 0;
}

.date-stepper .date-step-btn {
  width: 24px;
  min-width: 24px;
  min-height: 30px;
  font-size: 10px;
}

#conversation-form .field:has(.date-stepper),
#training-update-form .field:has(.date-stepper) {
  min-width: 220px;
}

.field.compact span {
  color: rgba(255, 255, 255, 0.68);
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(
    --input-bg,
    color-mix(in srgb, var(--surface) 72%, #000000 28%)
  );
  color: var(--text);
}

textarea {
  resize: vertical;
}

textarea.conversation-inline,
#conversation-topic {
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sidebar select {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar option {
  color: #111827;
}

.workspace-panel {
  margin-top: -6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.workspace-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--sidebar-text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}

.workspace-panel summary::-webkit-details-marker {
  display: none;
}

.workspace-panel summary i {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  transition: transform 0.16s ease;
}

.workspace-panel[open] summary i {
  transform: rotate(180deg);
}

.workspace-panel .field {
  margin: 0;
  padding: 0 10px 10px;
}

.workspace-actions {
  display: flex;
  gap: 12px;
  margin-top: -2px;
  padding: 0 10px 10px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.text-btn:hover {
  color: var(--text);
}

.danger-text {
  color: #fecaca;
}

.check-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}

.check-field input {
  width: 17px;
  min-height: 17px;
}

.technician-entry-setting {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.technician-entry-setting .check-field {
  min-height: 28px;
  font-weight: 800;
}

.technician-entry-setting .setting-help {
  margin: 0 0 0 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.settings-dashboard {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

#settings-form.settings-dashboard {
  display: block;
  column-count: 2;
  column-gap: 12px;
}

#settings-form.settings-dashboard .settings-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 12px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.form-grid.collapsed {
  display: none;
}

.tech-modal-form {
  margin-bottom: 0;
}

.ncr-summary-panel .panel-header {
  align-items: flex-end;
}

.ncr-summary-panel .panel-header .setting-help {
  max-width: 760px;
  margin: 4px 0 0;
}

.ncr-summary-table th,
.ncr-summary-table td {
  white-space: nowrap;
}

.technician-modal-panel {
  width: min(920px, calc(100vw - 64px));
}

.technician-modal-panel > .panel-header {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.technician-period-section,
.technician-period-status {
  grid-column: 1 / -1;
}

.technician-period-section {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.technician-period-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.technician-period-header h3,
.technician-period-header .setting-help {
  margin: 0;
}

.technician-period-header h3 {
  font-size: 15px;
}

.technician-period-header .setting-help {
  margin-top: 3px;
}

.technician-period-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.technician-period-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 150px) minmax(180px, 1fr) auto;
  gap: 9px;
  align-items: end;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.technician-period-row > .field,
.technician-period-row input {
  min-width: 0;
  max-width: 100%;
}

.technician-period-row input {
  width: 100%;
  box-sizing: border-box;
}

.technician-period-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 1px;
}

.technician-period-empty {
  min-height: 46px;
  padding: 13px;
}

.technician-period-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tech-modal-actions {
  grid-column: 1 / -1;
}

.settings-span {
  grid-column: 1 / -1;
}

.compact-header {
  margin-bottom: 8px;
}

.band-editor {
  display: grid;
  gap: 8px;
}

.band-row {
  display: grid;
  grid-template-columns: 86px minmax(130px, 1fr) 72px 34px;
  gap: 8px;
  align-items: end;
}

.skill-level-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
}

.skill-level-row {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, #ffffff 3%);
}

.skill-level-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.skill-level-row .field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.shortcut-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.shortcut-option {
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.shortcut-option input {
  width: auto;
  min-height: 0;
}

.shortcut-option span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shortcut-option i {
  width: 16px;
  color: var(--accent);
  text-align: center;
}

.summary-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-tabs .active {
  background: var(--accent);
  color: var(--accent-ink);
}

.dual-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scope-summary-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 6px;
}

.scope-summary-heading h3 {
  margin: 0;
}

#scope-monthly-panel .dual-table-grid {
  gap: 12px;
}

#scope-monthly-panel .table-wrap {
  overflow-x: auto;
}

#scope-monthly-panel table {
  min-width: 0;
  table-layout: fixed;
}

#scope-monthly-panel th,
#scope-monthly-panel td {
  padding: 7px 8px;
  white-space: nowrap;
}

#scope-monthly-panel th:first-child,
#scope-monthly-panel td:first-child {
  width: 34%;
  text-align: left;
}

#scope-monthly-panel th:not(:first-child),
#scope-monthly-panel td:not(:first-child) {
  text-align: right;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

#scope-monthly-panel th:not(:first-child) .table-sort-btn {
  justify-content: flex-end;
}

.monthly-hours-summary {
  margin-top: 22px;
}

.monthly-hours-summary .scope-summary-heading {
  align-items: end;
}

.monthly-hours-summary th:not(:first-child),
.monthly-hours-summary td:not(:first-child) {
  text-align: right;
}

.table-sort-btn:hover,
.table-sort-btn.active {
  color: var(--accent);
}

.sort-indicator {
  display: inline-block;
  min-width: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.table-sort-btn.active .sort-indicator {
  color: var(--accent);
}

.summary-panel {
  display: none;
}

.summary-panel.active {
  display: block;
}

.summary-panel > .table-wrap {
  max-height: calc(100vh - 220px);
}

.summary-panel > .table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.summary-panel > .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface-muted);
  box-shadow: 0 1px 0 var(--line);
}

.summary-panel table th,
.summary-panel table td {
  border-right: 1px solid var(--line);
}

#skills-summary-panel .summary-tech-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}

#skills-summary-panel thead .summary-tech-col {
  z-index: 5;
  background: var(--surface-muted);
}

#skills-summary-panel th:not(.summary-tech-col),
#skills-summary-panel td:not(.summary-tech-col),
.skill-value-cell {
  text-align: center;
}

#skills-form select {
  text-align: center;
  text-align-last: center;
}

.potential-stack {
  width: min(128px, 100%);
  margin: 0 auto;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-left: 5px solid var(--potential-color, currentColor);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  color: var(--text);
  text-align: left;
}

.potential-stack strong,
.potential-stack span {
  display: block;
  line-height: 1.1;
}

.potential-stack strong {
  font-size: 12px;
  font-weight: 900;
}

.potential-stack span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-panel table th:last-child,
.summary-panel table td:last-child {
  border-right: 0;
}

.score-cell {
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.hover-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 220px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--sidebar) 82%, #000000 18%);
  color: var(--sidebar-text);
  white-space: pre-line;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition:
    opacity 0.08s ease,
    transform 0.08s ease;
}

.hover-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.score-cell.light-text {
  color: #1f2937;
}

.compact-production-table table {
  min-width: 0;
}

.wide-field {
  grid-column: span 2;
}

.section-subtitle {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.row-action-col {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  text-align: center;
}

.training-actions {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  white-space: nowrap;
}

.training-actions .icon-btn + .icon-btn {
  margin-left: 5px;
}

.wrap-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.production-form {
  --production-entry-input-height: 38px;
  --production-repair-width: 58px;
  flex: 1 1 680px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  overflow: visible;
  padding-bottom: 2px;
}

/* Date field is wider */
.production-form .prod-date-field {
  flex: 0 0 224px;
}

.production-form input {
  height: var(--production-entry-input-height);
  min-height: var(--production-entry-input-height);
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
}

.production-form-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-end;
  padding-top: 0;
  padding-bottom: 2px;
}

.production-form-actions .clear-production-entry-btn {
  margin-left: auto;
}

.production-entry-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.production-controls {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 8px;
  align-items: end;
}

.production-availability-toggle {
  min-height: 30px;
  align-self: end;
  white-space: nowrap;
}

.production-controls select {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 13px;
}

#production-tech-select,
#skills-tech-select {
  max-width: 420px;
}

#skills-tech-select {
  width: min(100%, 360px);
  min-width: 240px;
  max-width: 360px;
}

.production-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-end;
}

.production-filter-controls .field {
  min-width: 150px;
  max-width: 200px;
}

.records-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.records-actions {
  justify-content: flex-end;
}

.compact-check {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #667085;
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-check input {
  width: 13px;
  min-height: 13px;
}

.repair-grid,
.skills-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.production-form .repair-grid {
  flex: 1 1 420px;
  width: auto;
}

#production .table-wrap {
  max-height: none;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
}

#production .table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

#production-table-head th {
  position: sticky;
  top: 0;
  z-index: 5;
}

#production .production-date-col {
  position: sticky;
  left: 0;
  z-index: 6;
  box-shadow: 1px 0 0 var(--line);
}

#production-table-body .production-date-col {
  background: var(--surface);
}

#production .production-action-col {
  position: sticky;
  right: 0;
  z-index: 6;
  box-shadow: -1px 0 0 var(--line);
}

#production-table-body .production-action-col {
  background: var(--surface);
}

#production .production-prod-col {
  position: sticky;
  right: 48px;
  z-index: 6;
  box-shadow: -1px 0 0 var(--line);
}

#production-table-head .production-date-col,
#production-table-head .production-prod-col,
#production-table-head .production-action-col {
  z-index: 8;
  background: var(--surface-muted);
}

.count-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
}

.training-status {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 900;
}

.training-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.training-type-badge.development {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line) 52%);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface) 86%);
}

.training-type-badge.retraining {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 48%, var(--line) 52%);
  background: color-mix(in srgb, var(--warn) 14%, var(--surface) 86%);
}

.training-progress-pill {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.selected-row td {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface) 84%);
}

[data-training-row] {
  cursor: pointer;
}

#training-plans-panel table {
  min-width: 0;
}

#training-plans-panel th,
#training-plans-panel td {
  white-space: normal;
}

#training-plans-panel .row-action-col {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: right;
}

#training .row-action-col {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: right;
}

.training-plan-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.training-plan-subtabs .secondary-btn {
  min-height: 34px;
  padding: 7px 10px;
}

.training-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.training-ncr-card {
  grid-column: span 2;
}

.training-focus-card {
  grid-column: span 2;
}

.training-detail-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.training-detail-card span,
.training-detail-card strong {
  display: block;
}

.training-detail-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.training-detail-card strong {
  margin-top: 4px;
}

.training-checklist-panel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, #ffffff 3%);
}

.training-checklist-list {
  display: grid;
  gap: 8px;
}

.training-checklist-empty-actions,
.training-checklist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.training-checklist-actions {
  justify-content: flex-start;
  padding-top: 4px;
}

.training-checklist-add-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  width: min(100%, 620px);
  padding-top: 4px;
}

.training-checklist-add-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.training-checklist-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.training-checklist-item:first-child {
  border-top: 0;
}

.training-checklist-status {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.training-checklist-status input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.training-checklist-item.complete .training-checklist-status {
  border-color: var(--good);
  color: var(--good);
}

.training-checklist-item strong,
.training-checklist-item small {
  display: block;
}

.training-checklist-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.training-checklist-edit {
  min-height: 28px;
  padding: 0 4px;
  font-size: 12px;
  white-space: nowrap;
}

.training-checklist-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.training-checklist-delete {
  min-height: 28px;
  padding: 0 4px;
  font-size: 12px;
  white-space: nowrap;
}

.training-checklist-item small {
  margin-top: 3px;
  color: var(--muted);
}

.training-checklist-edit-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: 540px;
}

.training-checklist-edit-panel textarea {
  width: 100%;
  min-height: 38px;
  resize: vertical;
}

.training-checklist-date {
  max-width: 180px;
  margin-top: 6px;
}

.training-final-signoff {
  margin-top: 4px;
  border-top: 1px solid var(--accent);
}

.training-checklist-status.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.training-requirements-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, #ffffff 3%);
}

.training-requirement-editor {
  display: grid;
  gap: 8px;
}

.training-requirement-row {
  display: grid;
  grid-template-columns: 34px 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: end;
}

.training-requirement-row .field {
  min-width: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 32px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.58);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(1180px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.compact-modal-panel {
  width: min(560px, calc(100vw - 64px));
}

.hours-tardy-panel {
  width: min(840px, calc(100vw - 64px));
}

.hours-tardy-panel > .panel-header {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hours-tardy-list {
  max-height: min(55vh, 440px);
  overflow: auto;
}

.hours-tardy-list td:first-child,
.hours-tardy-list th:first-child {
  width: 54px;
  text-align: center;
}

#training-area-modal-panel {
  width: min(720px, calc(100vw - 64px));
}

.training-area-modal-form {
  margin-bottom: 0;
}

.compact-modal-panel > .panel-header,
#ncr-modal .modal-panel > .panel-header {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.training-print-options-panel > .panel-header {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.training-print-options-panel {
  width: min(600px, calc(100vw - 32px));
  overflow: hidden;
}

.training-print-options-body {
  display: grid;
  gap: 12px;
}

.training-print-options-body .setting-help {
  margin: 0;
}

.training-print-mode-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.training-print-mode-options legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.training-print-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.training-print-mode-option:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.training-print-mode-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface-muted) 88%, var(--accent) 12%);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.training-print-mode-option input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent);
}

.training-print-mode-option span,
.training-print-mode-option strong,
.training-print-mode-option small {
  display: block;
  min-width: 0;
}

.training-print-mode-option span {
  flex: 1 1 auto;
}

.training-print-mode-option strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.training-print-mode-option small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.modal-panel .table-wrap {
  max-height: 320px;
}

.modal-footer {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.modal-footer .danger-btn {
  margin-right: auto;
}

#training-detail-panel > .panel-header {
  position: sticky;
  top: -1px;
  z-index: 2;
  padding-bottom: 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

#training-detail-panel > .panel-header .inline-controls {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-muted) 78%, #000000 8%);
}

#training-modal-overview-btn,
#training-detail-edit-plan,
#training-update-add-btn {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

#training-modal-overview-btn:not(:disabled):hover,
#training-detail-edit-plan:not(:disabled):hover,
#training-update-add-btn:not(:disabled):hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-muted) 88%);
}

#training-modal-overview-btn.active,
#training-detail-edit-plan.active,
#training-update-add-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 70%, #ffffff 20%);
}

#training-detail-close {
  margin-left: 6px;
}

.modal-subpanel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 4%);
}

.training-plan-form,
.training-update-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  gap: 10px;
  align-items: end;
}

.training-update-plan-field {
  display: none;
}

#report-list-techs {
  min-height: 72px;
}

.ncr-responsibility-cell {
  display: grid;
  gap: 4px;
  align-content: start;
}

.ncr-secondary-pill {
  justify-self: start;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-muted) 82%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ncr-secondary-pill:hover,
.ncr-secondary-pill:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line) 42%);
  color: var(--text);
}

.ncr-naf-label {
  justify-self: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.ncr-npf-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--warn) 54%, var(--line) 46%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 16%, var(--surface) 84%);
  color: var(--warn);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ncr-npf-field {
  align-self: end;
}

.ncr-naf-field {
  align-self: end;
}

.report-people-field {
  grid-column: span 2;
}

.training-plan-form .wide-field,
.training-update-form .wide-field {
  grid-column: span 2;
}

#training-plan-participants {
  min-height: 88px;
}

.training-group-placeholder {
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 14px;
}

.training-plan-actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-start;
}

.training-panel {
  display: none;
}

.training-panel.active {
  display: grid;
  gap: 14px;
}

.training-plan-grid {
  grid-template-columns: 1fr;
}

#repair-inputs {
  display: contents;
}

#repair-inputs .field {
  flex: 0 0 var(--production-repair-width);
  min-width: 0;
}

#repair-inputs .field span {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-align: center;
}

#repair-inputs input {
  width: 100%;
  height: var(--production-entry-input-height);
  min-height: var(--production-entry-input-height);
  padding: 6px 4px;
  font-size: 13px;
  text-align: center;
}

.add-production-btn,
.clear-production-entry-btn {
  align-self: end;
  white-space: nowrap;
}

.clear-production-entry-btn {
  justify-self: end;
}

#skills .panel {
  display: grid;
  justify-items: center;
}

#skills-form.skills-grid {
  display: flex;
  width: 100%;
  align-items: end;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
}

#skills-form .field {
  flex: 0 0 104px;
  width: 104px;
  max-width: 104px;
  min-width: 0;
}

#skills-form select {
  width: 100%;
  max-width: 104px;
  min-height: 34px;
  padding: 6px 8px;
}

#skills-form .field span {
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

#skills .panel-header {
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
}

#skills .panel-header h2 {
  margin-right: 0;
}

.skills-live-summary {
  flex: 1 0 100%;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 4px;
}

.skill-stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.skill-stat {
  min-width: 150px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(90deg, var(--skill-stat-accent, var(--accent)) 0 4px, transparent 4px),
    color-mix(in srgb, var(--surface) 90%, #ffffff 5%);
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.skill-stat strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
}

.skill-stat small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stack-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.definition-list,
.band-list,
.source-list {
  display: grid;
  gap: 8px;
}

.definition-item,
.band-item,
.source-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 4%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.definition-item[draggable="true"] {
  cursor: grab;
}

.definition-item.dragging {
  opacity: 0.45;
}

.definition-item.drop-target {
  outline: 2px solid var(--accent);
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.requirement-grid span {
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.definition-item small,
.source-item small,
.band-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-strip.centered {
  justify-content: center;
}

.skill-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 4%);
  color: var(--text);
  font-weight: 800;
}

.avg-start {
  border-left: 10px solid var(--bg) !important;
  box-shadow: inset 3px 0 0 rgba(231, 238, 247, 0.68);
}

.na-cell {
  text-align: center;
  color: var(--muted);
}

.year-header td,
.year-total td {
  background: var(--surface-muted);
  font-weight: 800;
}

.year-header td {
  color: var(--text);
}

.table-pagination {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.settings-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 4%);
}

#settings .settings-card {
  grid-column: auto;
}

#settings .settings-card-small {
  grid-column: auto;
}

#settings .settings-card .panel-header {
  margin-bottom: 6px;
}

#settings .compact-settings {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.settings-save-actions {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: -2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, #000000 8%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.setting-help {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.compact-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conversation-table {
  table-layout: fixed;
}

.conversation-table th:nth-child(1),
.conversation-table td:nth-child(1) {
  width: 160px;
}

.conversation-table th:nth-child(2),
.conversation-table td:nth-child(2) {
  width: 46px;
  text-align: center;
}

.conversation-table th:nth-child(3),
.conversation-table td:nth-child(3) {
  width: 145px;
}

.conversation-table th:nth-child(5),
.conversation-table td:nth-child(5) {
  width: 54px;
  text-align: right;
}

.conversation-table td {
  vertical-align: top;
}

.attendance-inline,
.conversation-inline {
  min-height: 30px;
  padding: 4px 6px;
}

.conversation-topic-inline {
  width: 100%;
  min-height: 34px;
  resize: vertical;
  overflow: hidden;
}

#conversation-form {
  align-items: start;
}

#conversation-form .form-actions {
  align-self: start;
  padding-top: 22px;
}

body.attendance-scoped #attendance-form label:has(#attendance-tech),
body.attendance-scoped #attendance-form label:has(#attendance-type),
body.conversations-scoped #conversation-form label:has(#conversation-tech) {
  display: none;
}

#attendance-form {
  grid-template-columns:
    minmax(160px, 1fr)
    minmax(100px, 0.65fr)
    minmax(190px, 200px)
    minmax(240px, 1.5fr)
    auto;
}

#attendance-form .wide-field {
  grid-column: auto;
}

#attendance-form .form-actions {
  justify-self: start;
}

body.attendance-scoped #attendance-form {
  grid-template-columns: minmax(190px, 200px) minmax(320px, 1fr) auto;
}

#attendance table {
  table-layout: fixed;
}

#attendance th:nth-child(1),
#attendance td:nth-child(1) {
  width: 160px;
}

#attendance th:nth-child(2),
#attendance td:nth-child(2) {
  width: 46px;
  text-align: center;
}

#attendance th:nth-child(3),
#attendance td:nth-child(3) {
  width: 90px;
}

#attendance th:nth-child(4),
#attendance td:nth-child(4) {
  width: 145px;
}

#attendance th:nth-child(5),
#attendance td:nth-child(5) {
  white-space: normal;
}

#attendance th:nth-child(6),
#attendance td:nth-child(6) {
  width: 54px;
  text-align: right;
}

.filter-panel {
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 4%);
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-title > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.filter-title .secondary-btn {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
  text-transform: none;
}

.quality-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  gap: 10px;
  align-items: end;
}

.quality-filters .field {
  min-width: 0;
}

#quality > .panel > .panel-header {
  position: sticky;
  top: var(--sticky-ncr-actions-top);
  z-index: 60;
  padding: 10px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.ncr-entry-form {
  grid-template-columns:
    minmax(224px, 244px)
    minmax(190px, 230px)
    minmax(240px, 320px)
    minmax(130px, 170px)
    minmax(110px, 150px)
    minmax(110px, 150px);
  column-gap: 16px;
  row-gap: 12px;
  align-items: start;
}

.ncr-entry-form #ncr-date {
  min-width: 0;
  padding-right: 10px;
}

.ncr-entry-form .field {
  align-self: start;
}

.ncr-entry-form .wide-field {
  grid-column: span 2;
}

.ncr-entry-form .form-actions {
  align-self: end;
  padding-bottom: 1px;
}

.scope-modal-actions {
  flex: 1 0 100%;
}

#scope-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
}

#scope-form .field:has(#scope-date) {
  flex: 0 0 244px;
  max-width: 244px;
}

#scope-form .field:has(#scope-minor-medium),
#scope-form .field:has(#scope-overhaul) {
  flex: 0 0 108px;
  max-width: 108px;
}

.ncr-secondary-field {
  position: relative;
}

#ncr-secondary-techs,
#report-tech-select {
  display: none;
}

.report-tech-picker {
  width: 100%;
}

.ncr-secondary-picker {
  position: relative;
  min-width: 0;
}

#ncr-modal .modal-panel:has(.ncr-secondary-picker.open) {
  overflow: visible;
}

.ncr-secondary-toggle {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--input-bg);
  color: var(--text);
  text-align: left;
}

.ncr-secondary-toggle:not(:disabled):hover,
.ncr-secondary-picker.open .ncr-secondary-toggle {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line) 30%);
}

.ncr-secondary-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ncr-secondary-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.ncr-secondary-picker span {
  letter-spacing: 0;
  text-transform: none;
}

.ncr-selection-chip,
.ncr-selection-more {
  min-width: 0;
  max-width: 120px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line) 60%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface) 87%);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ncr-selection-more {
  flex: 0 0 auto;
  color: var(--muted);
}

.ncr-secondary-placeholder {
  color: var(--muted);
}

.ncr-secondary-popover {
  position: fixed;
  top: var(--ncr-picker-top);
  left: var(--ncr-picker-left);
  z-index: 180;
  width: var(--ncr-picker-width);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.ncr-secondary-popover[hidden] {
  display: none;
}

.ncr-secondary-search-field {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--input-bg);
  color: var(--muted);
}

.ncr-secondary-search-field input {
  min-width: 0;
  border: 0;
  padding-inline: 0;
  background: transparent;
  box-shadow: none;
}

.ncr-secondary-options {
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
  padding-right: 3px;
}

.ncr-secondary-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
}

.ncr-secondary-option:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-muted) 88%);
}

.ncr-secondary-option input {
  flex: 0 0 auto;
  width: auto;
}

.ncr-secondary-empty {
  margin: 8px;
  color: var(--muted);
  font-size: 12px;
}

.ncr-secondary-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.ncr-modal-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.ncr-modal-footer-left .check-field {
  min-height: 34px;
}

.requirements-table-wrap td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.requirements-panel {
  display: none;
}

.requirements-panel.active {
  display: block;
}

#requirements table {
  min-width: 0;
}

#requirements th,
#requirements td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#requirements td:first-child,
#requirements td:nth-child(2) {
  white-space: normal;
}

#requirements .requirements-col-tech {
  width: 18%;
}

#requirements .requirements-col-main {
  width: auto;
}

#requirements .requirements-col-compact {
  width: 116px;
}

#requirements .requirements-col-status {
  width: 104px;
}

#requirements .requirements-col-progress {
  width: 142px;
}

#requirements .requirements-col-attention {
  width: 132px;
}

#requirements .requirements-col-action {
  width: 48px;
}

#requirements .row-action-col {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  padding-left: 7px;
  padding-right: 7px;
  text-align: center;
  white-space: nowrap;
}

#requirements .row-action-col .icon-btn {
  margin-inline: auto;
}

#requirement-assignment-techs {
  min-height: 108px;
}

#requirement-template-techs {
  min-height: 108px;
}

.requirement-group-row td {
  background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%);
}

.requirement-detail-row td {
  color: var(--muted);
  font-size: 13px;
}

.requirement-period-row td {
  background: color-mix(in srgb, var(--surface-muted) 82%, var(--surface) 18%);
  color: var(--text);
  font-size: 13px;
}

.requirement-period-row td:first-child {
  padding-left: 28px;
}

.requirement-technician-row td {
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.requirement-technician-row td:first-child {
  padding-left: 46px;
}

.requirement-tech-name {
  color: var(--text);
  font-weight: 750;
}

.requirement-period-outcomes {
  color: color-mix(in srgb, #d97706 78%, var(--text) 22%);
  font-weight: 750;
}

.requirement-attention {
  color: color-mix(in srgb, #dc2626 78%, var(--text) 22%);
  font-weight: 800;
}

.requirement-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.requirement-count.complete {
  border-color: color-mix(in srgb, #16a34a 55%, var(--line) 45%);
}

.requirement-count.overdue {
  border-color: color-mix(in srgb, #dc2626 55%, var(--line) 45%);
}

.requirement-assignment-summary {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #d97706 45%, var(--line) 55%);
  border-radius: var(--radius);
  background: color-mix(in srgb, #d97706 12%, var(--surface) 88%);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.requirement-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.requirement-status-badge.active {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line) 52%);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface) 86%);
}

.requirement-status-badge.inactive {
  color: var(--muted);
}

.requirement-status-badge.multiple {
  border-color: color-mix(in srgb, #d97706 52%, var(--line) 48%);
  background: color-mix(in srgb, #d97706 14%, var(--surface) 86%);
}

.requirement-status-badge.complete {
  border-color: color-mix(in srgb, #16a34a 55%, var(--line) 45%);
  background: color-mix(in srgb, #16a34a 14%, var(--surface) 86%);
}

.requirement-status-badge.incomplete {
  border-color: color-mix(in srgb, #d97706 55%, var(--line) 45%);
  background: color-mix(in srgb, #d97706 14%, var(--surface) 86%);
}

.requirement-status-badge.pending {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line) 58%);
}

.requirement-status-badge.overdue {
  border-color: color-mix(in srgb, #dc2626 55%, var(--line) 45%);
  background: color-mix(in srgb, #dc2626 14%, var(--surface) 86%);
}

.compact-action-btn {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.requirement-completion-summary {
  padding: 8px 0 2px;
  color: var(--text);
  font-weight: 850;
}

.requirement-template-actions {
  align-items: center;
}

.requirement-template-actions > .muted {
  margin-right: auto;
  font-size: 12px;
}

.report-builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  gap: 10px;
  align-items: end;
}

.report-title-field {
  grid-column: span 2;
  max-width: 460px;
}

.report-comment-field {
  margin-top: 10px;
  max-width: 720px;
}

.report-comment-field textarea {
  resize: vertical;
}

#reports.report-mode-list .performance-report-option,
#reports.report-mode-performance .list-report-option {
  display: none;
}

.report-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.report-preview {
  display: grid;
  justify-items: center;
  gap: 22px;
  overflow-x: auto;
  padding: 18px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 82%, #000000 18%);
}

.report-page {
  position: relative;
  width: 8in;
  height: 10.5in;
  padding: 0.28in 0.28in 0.5in;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  page-break-after: always;
  break-after: page;
}

.report-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.report-page h2,
.report-page h3 {
  margin: 0;
}

.report-page h2 {
  font-size: 22px;
  line-height: 1.15;
}

.report-person-name {
  margin-top: 3px;
  color: #1e293b;
  font-size: 16px;
  font-weight: 900;
}

.report-page h3 {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  color: #475569;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 14px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.report-comments {
  margin: 10px 0 12px;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.report-comments strong {
  display: block;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-comments p {
  margin: 4px 0 0;
  color: #1f2937;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.report-kpi {
  padding: 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.report-kpi span {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-kpi strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.report-table {
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #111827;
  background: #ffffff;
  font-size: 11px;
}

.report-table--list {
  font-size: 10.5px;
}

.report-table th,
.report-table td {
  padding: 5px 6px;
  border: 1px solid #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-table th {
  background: #e2e8f0;
  color: #334155;
}

.report-table .signature-date-cell {
  width: 90px;
  min-width: 90px;
}

.report-table .signature-cell {
  width: 170px;
  min-width: 170px;
}

.report-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-note {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.report-footer {
  position: absolute;
  right: 0.28in;
  bottom: 0.12in;
  left: 0.28in;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding-top: 5px;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.report-page.report-fit-compact {
  padding: 0.24in 0.24in 0.44in;
}

.report-page.report-fit-compact .report-footer {
  right: 0.24in;
  left: 0.24in;
}

.report-page.report-fit-compact h2 {
  font-size: 20px;
}

.report-page.report-fit-compact .report-person-name {
  font-size: 14px;
}

.report-page.report-fit-compact h3 {
  margin-top: 11px;
  font-size: 11px;
}

.report-page.report-fit-compact .report-meta,
.report-page.report-fit-compact .report-note,
.report-page.report-fit-compact .report-comments p {
  font-size: 10px;
}

.report-page.report-fit-compact .report-table {
  font-size: 9.8px;
}

.report-page.report-fit-compact .report-table th,
.report-page.report-fit-compact .report-table td {
  padding: 4px 5px;
}

.report-page.report-fit-tight {
  padding: 0.2in 0.2in 0.38in;
}

.report-page.report-fit-tight .report-footer {
  right: 0.2in;
  left: 0.2in;
}

.report-page.report-fit-tight h2 {
  font-size: 18px;
}

.report-page.report-fit-tight .report-person-name {
  font-size: 13px;
}

.report-page.report-fit-tight .report-kpi {
  padding: 6px;
}

.report-page.report-fit-tight .report-kpi strong {
  font-size: 15px;
}

.report-page.report-fit-tight .report-table {
  font-size: 8.8px;
}

.report-page.report-fit-tight .report-table th,
.report-page.report-fit-tight .report-table td {
  padding: 3px 4px;
}

.report-page.report-overflow {
  outline: 2px solid #dc2626;
}

.report-page.report-overflow::after {
  content: "Content exceeds one printed page";
  position: absolute;
  right: 0.25in;
  bottom: 0.42in;
  padding: 4px 7px;
  border-radius: 4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

#management .stack-form,
#training .stack-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.repair-type-preview {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  grid-column: 1 / -1;
}

.repair-type-preview span {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

#management .stack-form .check-field,
#training .stack-form .check-field {
  align-self: end;
}

#management .stack-form .primary-btn,
#training .stack-form .primary-btn {
  justify-self: start;
  white-space: nowrap;
}

#management .definition-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

#management .definition-list {
  gap: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

#management .definition-item {
  min-height: 38px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#management .definition-item:hover {
  background: color-mix(in srgb, var(--surface) 88%, #ffffff 5%);
}

#management .definition-row {
  display: grid;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#management .repair-definition-row {
  grid-template-columns: 20px minmax(38px, 48px) minmax(130px, 1fr) 64px 58px 58px 58px 58px 62px 34px;
  min-width: 660px;
}

#management .skill-definition-row {
  grid-template-columns: 20px minmax(46px, 58px) minmax(150px, 1fr) 96px 34px;
  min-width: 390px;
}

#management .definition-drag-handle {
  color: var(--muted);
  cursor: grab;
  text-align: center;
}

#management .definition-abbr {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

#management .definition-name {
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#management .definition-primary-metric {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-muted) 82%, var(--accent) 18%);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

#management .definition-reference-metric {
  color: color-mix(in srgb, var(--muted) 78%, var(--surface-muted) 22%);
  font-size: 11px;
  font-weight: 800;
}

#management .definition-state {
  text-align: right;
}

#management .definition-row .icon-btn {
  justify-self: end;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grand-total {
  background: var(--surface-muted);
  font-weight: 800;
}

#ncr-table {
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

#ncr-table th,
#ncr-table td {
  padding: 6px;
}

#quality .table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

#ncr-table thead th {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-muted);
  box-shadow: 0 1px 0 var(--line);
}

#ncr-table input,
#ncr-table select {
  min-height: 30px;
  padding: 4px 6px;
}

#ncr-table th:nth-child(1),
#ncr-table td:nth-child(1) {
  width: 86px;
}

#ncr-table th:nth-child(2),
#ncr-table td:nth-child(2) {
  width: 102px;
}

#ncr-table th:nth-child(3),
#ncr-table td:nth-child(3),
#ncr-table th:nth-child(4),
#ncr-table td:nth-child(4),
#ncr-table th:nth-child(5),
#ncr-table td:nth-child(5),
#ncr-table th:nth-child(8),
#ncr-table td:nth-child(8) {
  width: 82px;
}

#ncr-table th:nth-child(6),
#ncr-table td:nth-child(6) {
  width: 390px;
}

#ncr-table th:nth-child(7),
#ncr-table td:nth-child(7) {
  width: 102px;
}

.pill,
.score-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.score-red {
  background: var(--danger);
  color: #fff;
}
.score-yellow {
  background: var(--warn);
  color: #1f2937;
}
.score-green {
  background: var(--good);
  color: #fff;
}

.muted {
  color: var(--muted);
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3000;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 7px;
  color: #fff;
  background: #111827;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.migration-status {
  margin-bottom: 12px;
  color: var(--muted);
}

body.density-compact .app-shell {
  padding: 14px 16px;
}

body.density-compact {
  --sticky-ncr-actions-top: 52px;
  --sticky-ncr-table-head-top: 102px;
}

body.density-compact .topbar {
  min-height: 52px;
  margin-bottom: 10px;
}

body.density-compact h1 {
  font-size: 25px;
}

body.density-compact h2 {
  font-size: 16px;
}

body.density-compact .view.active {
  gap: 10px;
}

body.density-compact .panel {
  padding: 10px;
}

body.density-compact .panel-header {
  margin-bottom: 8px;
}

body.density-compact .metric {
  min-height: 78px;
  padding: 10px 12px;
}

body.density-compact .metric strong {
  font-size: 24px;
}

body.density-compact .summary-tabs {
  gap: 5px;
}

body.density-compact .primary-btn,
body.density-compact .secondary-btn,
body.density-compact .icon-btn,
body.density-compact input,
body.density-compact select,
body.density-compact textarea {
  min-height: 32px;
}

body.density-compact .primary-btn,
body.density-compact .secondary-btn {
  padding: 0 10px;
}

body.density-compact .production-form {
  --production-entry-input-height: 32px;
  --production-repair-width: 52px;
  gap: 6px;
}

body.density-compact .production-form .prod-date-field {
  flex-basis: 208px;
}

body.density-compact .date-stepper,
body.density-laptop .date-stepper {
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  gap: 4px;
}

body.density-compact .date-stepper .date-step-btn,
body.density-laptop .date-stepper .date-step-btn {
  width: 22px;
  min-width: 22px;
  min-height: 28px;
}

body.density-compact .production-form .field input,
body.density-compact #repair-inputs input {
  height: var(--production-entry-input-height);
  min-height: var(--production-entry-input-height);
  padding: 4px 3px;
}

body.density-compact th,
body.density-compact td {
  padding: 5px 7px;
  font-size: 12px;
}

body.density-compact .summary-tech-col {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

body.density-compact .summary-date-cell {
  width: 96px;
}

body.density-compact .table-wrap table {
  min-width: 620px;
}

body.density-compact .eyebrow {
  margin-bottom: 2px;
  font-size: 11px;
}

body.density-laptop .app-shell {
  padding: 14px 16px;
}

body.density-laptop {
  --sticky-ncr-actions-top: 54px;
  --sticky-ncr-table-head-top: 106px;
}

body.density-laptop .topbar {
  min-height: 54px;
  margin-bottom: 10px;
}

body.density-laptop h1 {
  font-size: 25px;
}

body.density-laptop h2 {
  font-size: 16px;
}

body.density-laptop .view.active {
  gap: 10px;
}

body.density-laptop .panel {
  padding: 10px;
}

body.density-laptop .metric {
  min-height: 78px;
  padding: 10px 12px;
}

body.density-laptop .metric strong {
  font-size: 24px;
}

body.density-laptop .summary-tabs {
  gap: 5px;
}

body.density-laptop .primary-btn,
body.density-laptop .secondary-btn,
body.density-laptop .icon-btn,
body.density-laptop input,
body.density-laptop select,
body.density-laptop textarea {
  min-height: 32px;
}

body.density-laptop .primary-btn,
body.density-laptop .secondary-btn {
  padding: 0 10px;
}

body.density-laptop .production-form {
  --production-entry-input-height: 32px;
  --production-repair-width: 52px;
  gap: 6px;
}

body.density-laptop .production-form .prod-date-field {
  flex-basis: 208px;
}

body.density-laptop .production-form .field input,
body.density-laptop #repair-inputs input {
  height: var(--production-entry-input-height);
  min-height: var(--production-entry-input-height);
  padding: 4px 3px;
}

body.density-laptop .chart-wrap {
  height: 270px;
}

body.density-laptop th,
body.density-laptop td {
  padding: 5px 7px;
  font-size: 12px;
}

body.density-laptop .summary-tech-col {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

body.density-laptop .summary-date-cell {
  width: 96px;
}

body.density-laptop .eyebrow {
  margin-bottom: 2px;
  font-size: 11px;
}

body.density-laptop .compact-check {
  min-height: 24px;
  padding: 0 8px;
}

body.density-laptop #production .table-wrap {
  max-height: none;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
}

body.density-laptop #production .table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

body.density-laptop #production-table-head th {
  position: sticky;
  top: 0;
  z-index: 5;
}

@media (max-width: 1500px) and (min-width: 1051px) {
  :root {
    --sticky-ncr-actions-top: 58px;
    --sticky-ncr-table-head-top: 112px;
  }

  .app-shell {
    padding: 16px;
  }
  .topbar {
    min-height: 58px;
    margin-bottom: 12px;
  }
  h1 {
    font-size: 27px;
  }
  .view.active {
    gap: 12px;
  }
  .panel {
    padding: 12px;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric {
    min-height: 82px;
    padding: 10px 12px;
  }
  .chart-panel {
    min-height: 300px;
  }
  th,
  td {
    padding: 6px 8px;
  }
}

@media (max-width: 1050px) {
  body {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .nav {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .metric-grid,
  .dashboard-grid,
  .management-grid,
  .dual-table-grid {
    grid-template-columns: 1fr 1fr;
  }
  .production-controls,
  .production-filter-controls,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
  #settings-form.settings-dashboard {
    column-count: 1;
  }
  .production-form {
    flex-wrap: wrap;
  }
  .training-plan-form,
  .training-update-form {
    grid-template-columns: 1fr 1fr;
  }
  .training-detail-summary {
    grid-template-columns: 1fr 1fr;
  }
  .technician-period-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .technician-period-reason {
    grid-column: 1 / -1;
  }
  .technician-period-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  :root {
    --sticky-ncr-actions-top: 118px;
    --sticky-ncr-table-head-top: 206px;
  }

  .app-shell {
    padding: 16px;
  }
  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .metric-grid,
  .dashboard-grid,
  .management-grid,
  .report-two-col,
  .dual-table-grid,
  .production-controls,
  .production-filter-controls,
  .form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  #settings-form.settings-dashboard {
    column-count: 1;
  }
  .production-form {
    flex-wrap: wrap;
  }
  .training-plan-form,
  .training-update-form,
  .training-plan-form .wide-field,
  .training-update-form .wide-field,
  .training-plan-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .training-detail-summary {
    grid-template-columns: 1fr;
  }
  .technician-modal-panel {
    width: min(100%, calc(100vw - 32px));
  }
  .technician-period-header,
  .technician-period-row {
    grid-template-columns: 1fr;
  }
  .technician-period-header {
    display: grid;
  }
  .technician-period-reason {
    grid-column: auto;
  }
  .technician-period-actions {
    justify-content: flex-end;
  }
  .records-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .wide-field {
    grid-column: auto;
  }
  h1 {
    font-size: 26px;
  }
  .topbar-actions,
  .inline-controls {
    width: 100%;
  }
  .topbar-actions > *,
  .inline-controls > * {
    flex: 1;
  }
  #attendance-form,
  body.attendance-scoped #attendance-form {
    grid-template-columns: 1fr;
  }
}

#training-plan-print-root {
  display: none;
}

#ncr-report-print-root {
  display: none;
}

.ncr-report-modal-panel {
  max-width: 760px;
}

.ncr-report-options {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ncr-report-options .helper-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ncr-report-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
}

.ncr-report-column-options {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

@page {
  size: Letter portrait;
  margin: 0.25in;
}

@page ncr-report-page {
  size: Letter landscape;
  margin: 0.25in;
}

@media print {
  html,
  body {
    width: 8in;
    min-height: 10.5in;
    margin: 0;
    padding: 0;
  }

  body {
    display: block;
    background: #ffffff;
    color: #111827;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sidebar,
  .sidebar-rail,
  .topbar,
  .view:not(#reports),
  #reports > .panel:first-child,
  #reports .panel-header {
    display: none !important;
  }

  .app-shell {
    padding: 0;
  }

  #reports,
  #reports.view.active,
  .report-preview-panel,
  .report-preview {
    display: block !important;
  }

  .report-preview-panel {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #ffffff;
  }

  .report-preview {
    padding: 0;
    overflow: visible;
    background: #ffffff;
  }

  .report-page {
    width: 8in;
    height: 10.5in;
    padding: 0.28in 0.28in 0.5in;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .report-page.report-fit-compact {
    padding: 0.24in 0.24in 0.44in;
  }

  .report-page.report-fit-tight {
    padding: 0.2in 0.2in 0.38in;
  }

  .report-page.report-overflow {
    outline: none;
  }

  .report-page.report-overflow::after {
    display: none;
  }

  body.printing-training-plan {
    width: auto;
    min-height: auto;
  }

  body.printing-training-plan .sidebar,
  body.printing-training-plan .sidebar-rail,
  body.printing-training-plan .topbar,
  body.printing-training-plan .app-shell,
  body.printing-training-plan .view,
  body.printing-training-plan .modal-backdrop {
    display: none !important;
  }

  body.printing-training-plan #training-plan-print-root {
    display: block !important;
  }

  body.printing-ncr-report {
    width: auto;
    min-height: auto;
  }

  html:has(body.printing-ncr-report) {
    width: auto;
    min-height: auto;
  }

  body.printing-ncr-report .sidebar,
  body.printing-ncr-report .sidebar-rail,
  body.printing-ncr-report .topbar,
  body.printing-ncr-report .app-shell,
  body.printing-ncr-report .view,
  body.printing-ncr-report .modal-backdrop,
  body.printing-ncr-report #training-plan-print-root {
    display: none !important;
  }

  body.printing-ncr-report #ncr-report-print-root {
    display: block !important;
    width: 100%;
  }

  .ncr-print-sheet {
    page: ncr-report-page;
    display: block;
    width: 100%;
    max-width: 10.5in;
    min-height: 0;
    padding: 0.24in 0.28in 0.2in;
    background: #ffffff;
    color: #111827;
    font-family: Arial, sans-serif;
    font-size: 8.4pt;
    line-height: 1.25;
  }

  .ncr-print-header {
    display: flex;
    justify-content: space-between;
    gap: 0.18in;
    padding-bottom: 0.08in;
    border-bottom: 1.5px solid #111827;
  }

  .ncr-print-workspace {
    color: #374151;
    font-size: 7.5pt;
    font-weight: 700;
    text-transform: uppercase;
  }

  .ncr-print-header h1 {
    margin: 0.02in 0 0;
    font-size: 16pt;
    line-height: 1.1;
  }

  .ncr-print-date {
    font-size: 8pt;
    font-weight: 700;
    white-space: nowrap;
  }

  .ncr-print-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.05in 0.14in;
    margin: 0.08in 0 0.1in;
    color: #374151;
    font-size: 7.8pt;
  }

  .ncr-print-summary strong {
    color: #111827;
  }

  .ncr-print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .ncr-print-table thead {
    display: table-header-group;
  }

  .ncr-print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ncr-print-table th,
  .ncr-print-table td {
    padding: 0.04in 0.035in;
    border: 1px solid #c6ccd5;
    color: #111827;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .ncr-print-table th {
    background: #f3f4f6;
    font-size: 7pt;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    vertical-align: middle;
  }

  .ncr-print-table .ncr-print-date {
    width: 0.74in;
  }

  .ncr-print-table .ncr-print-tech,
  .ncr-print-table .ncr-print-secondary {
    width: 1.05in;
  }

  .ncr-print-table .ncr-print-compact,
  .ncr-print-table .ncr-print-status {
    width: 0.82in;
  }

  .ncr-print-table .ncr-print-status {
    width: 0.78in;
  }

  .ncr-print-table .ncr-print-flag {
    width: 0.35in;
    text-align: center;
  }

  .ncr-print-table .ncr-print-issue {
    width: auto;
  }

  .training-print-sheet {
    display: block;
    width: 8in;
    min-height: 0;
    padding: 0.24in 0.3in 0.2in;
    background: #ffffff;
    color: #111827;
    font-family: Arial, sans-serif;
    font-size: 9.2pt;
    line-height: 1.2;
    page-break-after: auto;
  }

  .training-print-header {
    display: flex;
    justify-content: space-between;
    gap: 0.18in;
    padding-bottom: 0.08in;
    border-bottom: 1.5px solid #111827;
  }

  .training-print-header h1 {
    margin: 0.02in 0 0;
    font-size: 17pt;
  }

  .training-print-date {
    font-weight: 700;
    white-space: nowrap;
  }

  .training-print-section {
    margin-top: 0.09in;
    break-inside: avoid;
  }

  .training-print-checklist-section {
    break-inside: auto;
  }

  .training-print-section h2 {
    margin: 0 0 0.045in;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .training-print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.075in 0.14in;
  }

  .training-print-field span {
    display: block;
    color: #374151;
    font-size: 7pt;
    font-weight: 700;
    text-transform: uppercase;
  }

  .training-print-field strong {
    display: block;
    min-height: 0.2in;
    padding-bottom: 0.015in;
    border-bottom: 1px solid #9ca3af;
    font-size: 8.5pt;
  }

  .training-print-field-prominent strong {
    border-bottom-color: #111827;
    font-size: 9.5pt;
    font-weight: 800;
  }

  .training-print-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border-top: 1px solid #111827;
  }

  .training-print-table th,
  .training-print-table td {
    padding: 0.045in 0.04in;
    border: 0;
    border-bottom: 1px solid #b6beca;
    vertical-align: top;
    color: #111827;
  }

  .training-print-table th {
    background: transparent;
    border-bottom: 1px solid #111827;
    font-size: 7pt;
    text-align: left;
    text-transform: uppercase;
  }

  .training-print-instruction {
    margin: -0.02in 0 0.045in;
    color: #374151;
    font-size: 8pt;
  }

  .training-print-table small {
    display: block;
    margin-top: 0.025in;
    color: #374151;
    font-size: 7.5pt;
  }

  .training-print-note-line {
    height: 0.25in;
    border-bottom: 1px solid #9ca3af;
  }

  .training-print-short .training-print-note-line {
    height: 0.28in;
  }

  .training-print-long .training-print-note-line {
    height: 0.21in;
  }

  .training-print-checklist-blocks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.065in 0.16in;
  }

  .training-print-requirement-block {
    break-inside: avoid;
    min-width: 0;
    padding: 0.045in 0 0.02in;
    border-top: 1px solid #9ca3af;
  }

  .training-print-requirement-main {
    display: grid;
    grid-template-columns: 0.24in 1fr;
    gap: 0.06in;
    align-items: start;
  }

  .training-print-requirement-main strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 8.6pt;
  }

  .training-print-check-box {
    display: grid;
    width: 0.17in;
    height: 0.17in;
    margin-top: 0.01in;
    border: 1.5px solid #111827;
    place-items: center;
    font-size: 9pt;
    font-weight: 900;
    line-height: 1;
  }

  .training-print-check-box.is-complete::after {
    content: "\2713";
  }

  .training-print-requirement-blank .training-print-requirement-main strong {
    min-height: 0.18in;
    border-bottom: 1px solid #111827;
  }

  .training-print-requirement-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.9in;
    column-gap: 0.12in;
    row-gap: 0.015in;
    margin: 0.05in 0 0 0.3in;
    align-items: end;
  }

  .training-print-requirement-fields span {
    display: block;
    color: #374151;
    font-size: 7pt;
    font-weight: 700;
    text-transform: uppercase;
  }

  .training-print-requirement-fields strong {
    display: block;
    min-height: 0.15in;
    border-bottom: 1px solid #111827;
    line-height: 0.15in;
  }

  .training-print-digital-note {
    margin: 0.035in 0 0 0.3in;
    color: #374151;
    font-size: 7.5pt;
  }

  .training-print-requirement-notes {
    margin-left: 0.3in;
  }

}
