:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d8dee6;
  --border: #d8dee6;
  --text: #17212b;
  --muted: #667280;
  --primary: #047d91;
  --primary-dark: #045f72;
  --accent: #b74b28;
}

/* ECM certification and audit workspace */
.ecm-case-list {
  border-top: 1px solid var(--border, #d8e0e8);
}

.ecm-case-row {
  display: grid;
  grid-template-columns: 145px minmax(260px, 1fr) 180px 90px 150px;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border, #d8e0e8);
}

.ecm-case-row:hover {
  background: #f4f8f8;
}

.ecm-case-row small,
.ecm-record-table small,
.ecm-requirement-row small,
.ecm-case-summary span {
  display: block;
  margin-top: 3px;
  color: var(--muted, #627183);
}

.ecm-case-type {
  font-weight: 750;
  color: #176c68;
}

.ecm-progress {
  position: relative;
  display: block;
  height: 8px;
  overflow: visible;
  background: #dfe9e8;
  border-radius: 4px;
}

.ecm-progress i {
  display: block;
  height: 100%;
  background: #16766f;
  border-radius: inherit;
}

.ecm-progress small {
  white-space: nowrap;
}

.ecm-progress.wide {
  margin-top: 9px;
  width: 100%;
}

.ecm-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #bac7d1;
  border-radius: 6px;
}

.ecm-dialog::backdrop {
  background: rgb(8 25 36 / 55%);
}

.ecm-dialog > form {
  max-height: calc(100vh - 34px);
  padding: 20px;
  overflow-y: auto;
}

.dialog-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #d8e0e8);
}

.dialog-head h2 {
  margin: 0;
}

.dialog-head button {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 24px;
}

.ecm-case-summary {
  display: grid;
  grid-template-columns: 1.35fr repeat(5, 1fr);
  margin-top: 18px;
  border: 1px solid var(--border, #d8e0e8);
  background: var(--surface, #fff);
}

.ecm-case-summary > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border, #d8e0e8);
}

.ecm-case-summary > div:last-child {
  border-right: 0;
}

.ecm-case-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.ecm-case-tabs {
  position: sticky;
  z-index: 6;
  top: var(--app-header-height, 0);
  display: flex;
  gap: 4px;
  margin: 16px 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--border, #d8e0e8);
  background: var(--surface, #fff);
}

.ecm-case-tabs a {
  padding: 9px 12px;
  color: #174e56;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ecm-case-tabs a:hover {
  background: #e9f3f2;
}

.ecm-requirement-group {
  margin-top: 10px;
  border: 1px solid var(--border, #d8e0e8);
  background: var(--surface, #fff);
}

.ecm-requirement-group > summary {
  display: flex;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  background: #edf3f3;
}

.ecm-requirement-row {
  display: grid;
  grid-template-columns: 92px minmax(300px, 1fr) 190px 90px;
  gap: 16px;
  align-items: start;
  padding: 13px 16px;
  border-top: 1px solid var(--border, #d8e0e8);
  border-left: 4px solid #aab7c1;
}

.ecm-requirement-row.status-ready,
.ecm-requirement-row.status-not_applicable {
  border-left-color: #26845e;
}

.ecm-requirement-row.status-in_progress {
  border-left-color: #c88c17;
}

.ecm-requirement-row.status-nonconformity {
  border-left-color: #b92735;
}

.ecm-requirement-row h3 {
  margin: 0 0 5px;
  font-size: 14px;
  letter-spacing: 0;
}

.ecm-requirement-row p {
  margin: 0;
  color: #394b5a;
  line-height: 1.45;
}

.ecm-missing-list {
  margin: 8px 0;
  padding-left: 18px;
  color: #9b2531;
  font-size: 12px;
  line-height: 1.45;
}

.ecm-matched {
  color: #1f6d50 !important;
}

.ecm-clause strong {
  display: block;
  font-size: 16px;
}

.ecm-clause span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.row-editor {
  position: relative;
}

.row-editor > summary {
  cursor: pointer;
  color: #176c68;
  font-weight: 750;
}

.row-editor[open] form {
  position: absolute;
  z-index: 8;
  right: 0;
  width: min(420px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid #9fb0bc;
  background: var(--surface, #fff);
  box-shadow: 0 10px 28px rgb(24 44 58 / 22%);
}

.row-editor form label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
}

.row-editor form select,
.row-editor form input,
.row-editor form textarea {
  width: 100%;
  margin-top: 3px;
}

.ecm-inline-entry {
  margin: 10px 0 16px;
  border: 1px dashed #9fb2bd;
}

.ecm-inline-entry > summary {
  padding: 11px 14px;
  cursor: pointer;
  color: #176c68;
  font-weight: 750;
}

.ecm-inline-entry > form {
  padding: 14px;
  border-top: 1px solid var(--border, #d8e0e8);
}

.ecm-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}

.ecm-case-form {
  padding: 16px;
}

@media (max-width: 1050px) {
  .ecm-case-row {
    grid-template-columns: 120px minmax(230px, 1fr) 150px 120px;
  }

  .ecm-case-row > :nth-child(4) {
    display: none;
  }

  .ecm-requirement-row {
    grid-template-columns: 75px minmax(260px, 1fr) 150px;
  }

  .ecm-requirement-row > .row-editor {
    grid-column: 2 / -1;
  }
}

@media (max-width: 720px) {
  .ecm-case-row {
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
  }

  .ecm-case-row > :nth-child(2),
  .ecm-case-row > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .ecm-case-row > :nth-child(4) {
    display: none;
  }

  .ecm-case-summary {
    grid-template-columns: 1fr 1fr;
  }

  .ecm-case-summary > div:nth-child(2) {
    border-right: 0;
  }

  .ecm-case-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border, #d8e0e8);
  }

  .ecm-requirement-row {
    grid-template-columns: 64px 1fr;
    gap: 10px;
  }

  .ecm-requirement-row > :nth-child(3),
  .ecm-requirement-row > .row-editor {
    grid-column: 2;
  }
}

.post-sandblast-drawing-panel .panel-title-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.wagon-family-reference {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.wagon-family-reference img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.wagon-family-reference figcaption {
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.wagon-type-reference-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 22px;
  align-items: center;
}

.wagon-type-reference-layout.compact {
  grid-template-columns: minmax(0, 1fr) minmax(240px, .6fr);
}

.wagon-type-reference-figure {
  margin: 0;
  min-width: 0;
}

.wagon-type-reference-figure img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
}

.wagon-type-reference-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.wagon-type-reference-facts {
  margin: 0;
}

@media (max-width: 760px) {
  .wagon-type-reference-layout,
  .wagon-type-reference-layout.compact {
    grid-template-columns: minmax(0, 1fr);
  }
}

.direction-standard {
  line-height: 1.45;
}

.drawing-views {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.drawing-surface {
  position: relative;
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
  cursor: crosshair;
}

.drawing-surface svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  fill: none;
  stroke: #334155;
  stroke-width: 3;
}

.drawing-title {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.drawing-marker {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  text-decoration: none;
}

.drawing-note-form {
  display: none;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.drawing-note-form.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.drawing-note-form label {
  display: grid;
  gap: 6px;
  margin: 0;
}

@media (max-width: 980px) {
  .drawing-views {
    grid-template-columns: 1fr;
  }

  .drawing-note-form.is-active {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

/* The native application already provides navigation and account chrome. */
.rayop-native-webview .topbar,
.rayop-native-webview .drawer-toggle,
.rayop-native-webview .drawer-overlay,
.rayop-native-webview .side-drawer,
.rayop-native-webview .desktop-chat-launcher {
  display: none !important;
}

.rayop-native-webview .page {
  padding-top: 16px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.strong-link {
  font-weight: 700;
}

.topbar {
  align-items: center;
  background: #062b55;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: flex-start;
  min-height: 64px;
  padding: 0 28px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.topbar-popover {
  position: relative;
}

.topbar-popover summary {
  list-style: none;
}

.topbar-popover summary::-webkit-details-marker {
  display: none;
}

.topbar-icon-button {
  align-items: center;
  border: 1px solid #34414d;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  position: relative;
  user-select: none;
}

.topbar-icon-button:hover,
.topbar-icon-button:focus-visible,
.topbar-popover[open] .topbar-icon-button {
  background: #1b2733;
  outline: none;
}

.topbar-button-mark {
  align-items: center;
  background: var(--primary);
  border-radius: 6px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 30px;
}

.topbar-icon-button strong {
  font-size: 14px;
}

.topbar-count {
  align-items: center;
  background: #b74b28;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.topbar-popover-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(17, 24, 32, 0.22);
  color: var(--text);
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, calc(100vw - 24px));
  z-index: 30;
}

.topbar-popover-panel::before {
  border-bottom: 8px solid #fff;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  content: "";
  position: absolute;
  right: 24px;
  top: -8px;
}

.topbar-calendar-panel {
  width: min(460px, calc(100vw - 24px));
}

.topbar-popover-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.topbar-popover-head strong {
  display: block;
  font-size: 16px;
}

.topbar-popover-head small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.topbar-popover-head a {
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
  white-space: nowrap;
}

.topbar-account-panel {
  width: min(310px, calc(100vw - 24px));
}

.topbar-account-user {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 11px;
  padding-bottom: 12px;
}

.topbar-account-user > span {
  align-items: center;
  background: #e8f6f4;
  border: 1px solid #add8d2;
  border-radius: 50%;
  color: #126b68;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.topbar-account-user strong,
.topbar-account-user small {
  display: block;
  overflow-wrap: anywhere;
}

.topbar-account-user small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.topbar-account-actions {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.topbar-account-actions a,
.topbar-account-actions button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 40px;
  width: 100%;
}

.topbar-account-actions a:hover,
.topbar-account-actions button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.mini-calendar-weekdays,
.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mini-calendar-weekdays {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.mini-calendar-day {
  align-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-width: 0;
  padding: 0;
  text-decoration: none;
}

.mini-calendar-day.is-selected {
  background: #e6f3f0;
  border-color: #7eb7af;
}

.mini-calendar-day:hover,
.mini-calendar-day:focus-visible {
  background: #eef7f5;
  border-color: #b8d8d4;
  outline: none;
}

.mini-calendar-day strong {
  font-size: 13px;
}

.mini-calendar-day.muted-day {
  color: #a5afba;
}

.mini-calendar-day.today {
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 800;
}

.mini-calendar-day em {
  align-items: center;
  display: inline-flex;
  gap: 3px;
  height: 8px;
  justify-content: center;
}

.mini-calendar-day i {
  border-radius: 999px;
  display: inline-block;
  height: 5px;
  width: 5px;
}

.mini-calendar-day i.work {
  background: var(--primary);
}

.mini-calendar-day i.leave {
  background: #b74b28;
}

.mini-calendar-day i.note {
  background: #596579;
}

.mini-calendar-actions {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 10px;
}

.mini-calendar-actions details {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.mini-calendar-actions summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.mini-calendar-actions summary span {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.mini-calendar-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.mini-calendar-form label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
}

.mini-calendar-form input,
.mini-calendar-form select,
.mini-calendar-form textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-width: 0;
  padding: 7px 8px;
  width: 100%;
}

.mini-calendar-form textarea {
  resize: vertical;
}

.mini-calendar-range {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-calendar-agenda {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.mini-calendar-agenda details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.mini-calendar-agenda summary {
  cursor: pointer;
  display: grid;
  gap: 2px;
}

.mini-calendar-agenda summary strong {
  font-size: 13px;
}

.mini-calendar-agenda summary span {
  color: var(--muted);
  font-size: 11px;
}

.mini-calendar-agenda-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.mini-calendar-agenda-list a,
.mini-calendar-agenda-list div {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  text-decoration: none;
}

.mini-calendar-agenda-list span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-notification-panel {
  width: min(390px, calc(100vw - 24px));
}

.topbar-notification-list {
  display: grid;
  gap: 8px;
}

.topbar-notification-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid #8b95a1;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  padding: 10px 11px;
}

.topbar-notification-card:hover,
.topbar-notification-card:focus-visible {
  background: #eef7f5;
  border-color: #b8d8d4;
  outline: none;
}

.topbar-notification-card.needs-signature {
  border-left-color: var(--accent);
}

.topbar-notification-card.work {
  border-left-color: var(--primary);
}

.topbar-notification-card strong {
  font-size: 13px;
}

.topbar-notification-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.drawer-toggle {
  height: 1px;
  left: -9999px;
  opacity: 0;
  position: fixed;
  width: 1px;
}

.menu-button {
  align-items: center;
  border: 1px solid #34414d;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.menu-button span {
  background: #fff;
  border-radius: 2px;
  display: block;
  height: 2px;
  width: 19px;
}

.side-drawer {
  background: #edf1f2;
  box-shadow: 14px 0 36px rgba(17, 24, 32, 0.2);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  left: 0;
  max-width: calc(100vw - 36px);
  position: fixed;
  overflow: hidden;
  top: 0;
  transform: translateX(-105%);
  transition: transform 180ms ease;
  width: 410px;
  z-index: 101;
}

.drawer-overlay {
  background: rgba(17, 24, 32, 0.42);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 100;
}

.drawer-toggle:checked ~ .side-drawer {
  transform: translateX(0);
}

.drawer-toggle:checked ~ .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  align-items: center;
  background: #17252c;
  border-bottom: 1px solid #25313c;
  color: #fff;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  min-height: 72px;
  padding: 0 16px;
  flex: 0 0 auto;
}

.drawer-product-mark {
  align-items: center;
  background: #a9452f;
  border: 1px solid #cf7e69;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.drawer-head-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.drawer-head strong {
  font-size: 18px;
}

.drawer-head small {
  color: #bfcbd0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-close {
  align-items: center;
  border-radius: 6px;
  color: #d7dee6;
  cursor: pointer;
  display: inline-flex;
  font-size: 28px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.drawer-nav {
  background: #edf1f2;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  overflow-y: auto;
  padding: 10px 12px 22px;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}

.drawer-tools {
  background: #fff;
  border-bottom: 1px solid #d6dfe2;
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
  padding: 10px 14px 11px;
}

.drawer-tools > label {
  color: #53656c;
  font-size: 11px;
  font-weight: 800;
}

.drawer-search-field {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.drawer-search-field input {
  border: 1px solid #bfcdd2;
  border-radius: 5px;
  font-size: 14px;
  height: 38px;
  min-width: 0;
  padding: 7px 10px;
}

.drawer-search-field.has-query input {
  border-radius: 5px 0 0 5px;
}

.drawer-search-field input:focus {
  border-color: #176a63;
  box-shadow: 0 0 0 2px rgba(23, 106, 99, .12);
  outline: none;
}

.drawer-search-clear {
  align-items: center;
  background: #edf2f3;
  border: 1px solid #bfcdd2;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  color: #34484f;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.drawer-search-clear[hidden] {
  display: none;
}

.drawer-search-result {
  color: #6b7a80;
  font-size: 11px;
}

.drawer-nav::-webkit-scrollbar {
  width: 10px;
}

.drawer-nav::-webkit-scrollbar-track {
  background: #e4eaec;
}

.drawer-nav::-webkit-scrollbar-thumb {
  background: #9aa9ae;
  border: 2px solid #e4eaec;
  border-radius: 999px;
}

.drawer-section {
  --drawer-color: #176a63;
  background: #fff;
  border: 1px solid #d4dcdf;
  border-left: 4px solid var(--drawer-color);
  border-radius: 8px;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
}

.drawer-theme-flow { --drawer-color: #2d6496; }
.drawer-theme-home { --drawer-color: #176a63; }
.drawer-theme-wagon { --drawer-color: #a9452f; }
.drawer-theme-quality { --drawer-color: #287053; }
.drawer-theme-audit { --drawer-color: #8c3b48; }
.drawer-theme-warehouse { --drawer-color: #2c6a88; }
.drawer-theme-commercial { --drawer-color: #8a682a; }
.drawer-theme-workshop { --drawer-color: #6d586c; }
.drawer-theme-management { --drawer-color: #4d606b; }

.drawer-section-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  list-style: none;
  min-height: 58px;
  padding: 7px 12px 7px 10px;
}

.drawer-section-summary::-webkit-details-marker {
  display: none;
}

.drawer-section-summary:hover,
.drawer-section-summary:focus-visible {
  background: #f4f7f7;
  outline: none;
}

.drawer-section-summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.drawer-section-summary strong {
  color: #1c2930;
  font-size: 14px;
}

.drawer-section-summary small {
  color: #6b7880;
  font-size: 11px;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-section-code {
  align-items: center;
  background: var(--drawer-color);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 38px;
}

.drawer-section-summary > i {
  border-bottom: 2px solid #718087;
  border-right: 2px solid #718087;
  display: block;
  height: 8px;
  justify-self: center;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 150ms ease;
  width: 8px;
}

.drawer-accordion[open] > .drawer-section-summary {
  border-bottom: 1px solid #dfe5e7;
}

.drawer-accordion[open] > .drawer-section-summary > i {
  transform: rotate(225deg) translate(-1px, -1px);
}

.drawer-section-links {
  background: #fbfcfc;
  display: grid;
  gap: 3px;
  padding: 6px;
}

.drawer-accordion[open] > .drawer-section-links {
  max-height: none;
  overflow: visible;
}

.drawer-link {
  align-items: center;
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 40px;
  padding: 6px 9px;
}

.drawer-link:hover,
.drawer-link:focus-visible {
  background: #eef3f3;
  color: #143f3b;
  outline: none;
}

.drawer-link.is-primary {
  font-weight: 750;
}

.drawer-link.is-current {
  background: #e8f1f0;
  box-shadow: inset 3px 0 var(--drawer-color);
  color: #123f3b;
  font-weight: 800;
}

.drawer-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-link-code {
  align-items: center;
  background: #e7edf3;
  border: 1px solid #d6e0ea;
  border-radius: 6px;
  color: #425466;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 32px;
}

.drawer-link.is-current .drawer-link-code {
  background: var(--drawer-color);
  border-color: var(--drawer-color);
  color: #fff;
}

.drawer-section[hidden],
.drawer-link[hidden],
.drawer-empty[hidden] {
  display: none !important;
}

.drawer-empty {
  color: #66777e;
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 2px;
  padding: 14px;
  text-align: center;
}

.drawer-group {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 6px 0;
  padding: 6px 0;
}

.drawer-group-title {
  font-weight: 700;
}

.drawer-nav .drawer-child {
  color: var(--muted);
  font-size: 14px;
  margin-left: 12px;
  padding: 9px 12px;
}

.drawer-account {
  border-top: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 9px;
  flex: 0 0 auto;
  padding: 14px 18px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.drawer-account > div strong,
.drawer-account > div small {
  display: block;
  overflow-wrap: anywhere;
}

.drawer-account > div small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.drawer-account > a {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary-dark);
  display: flex;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
}

.drawer-logout {
  margin: 0;
}

body:has(.drawer-toggle:checked) {
  overflow: hidden;
}

.drawer-logout button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  justify-content: center;
  width: 100%;
}

.password-change-panel {
  margin-top: 44px;
}

.password-change-form label {
  color: var(--text);
  font-weight: 700;
}

.password-change-form .errorlist {
  color: #a11d27;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  padding-left: 18px;
}

.password-rules {
  background: #f3f7f9;
  border-left: 3px solid #5e7a89;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 9px 11px;
}

.password-rules ul {
  margin: 0;
  padding-left: 18px;
}

.password-change-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .password-change-panel {
    margin-top: 18px;
    padding: 18px;
  }

  .password-change-actions {
    flex-direction: column-reverse;
  }

  .password-change-actions > * {
    justify-content: center;
    width: 100%;
  }
}

/* Open measurement work queue */
.measurement-summary {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.measurement-summary > div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 13px 16px;
}

.measurement-summary > div:last-child {
  border-right: 0;
}

.measurement-summary span,
.measurement-result-count {
  color: var(--muted);
  font-size: 12px;
}

.measurement-summary strong {
  color: #176a63;
  font-size: 24px;
}

.measurement-filter-panel {
  padding: 14px 16px;
}

.measurement-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .8fr) minmax(150px, .8fr) auto auto auto;
}

.measurement-filter > label:not(.measurement-mine-toggle) {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 5px;
}

.measurement-mine-toggle {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  gap: 7px;
  min-height: 40px;
  white-space: nowrap;
}

.measurement-mine-toggle input {
  accent-color: #176a63;
  height: 18px;
  margin: 0;
  width: 18px;
}

.measurement-job-table td {
  vertical-align: middle;
}

.measurement-job-table td:first-child,
.measurement-job-table td:nth-child(2) {
  min-width: 170px;
}

.measurement-job-table td small,
.measurement-job-table td > span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.measurement-order-no {
  color: #173f3b;
}

.measurement-kind {
  border-left: 3px solid #2c6a88;
  color: #48626c !important;
  padding-left: 6px;
}

.measurement-progress {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.measurement-progress > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.measurement-progress > div span,
.measurement-progress > div strong {
  font-size: 11px;
}

.measurement-progress progress {
  accent-color: #176a63;
  height: 7px;
  width: 100%;
}

.measurement-progress.waiting progress { accent-color: #8a682a; }
.measurement-progress.started progress { accent-color: #2c6a88; }
.measurement-progress.complete progress { accent-color: #287053; }

.measurement-open-link {
  border: 1px solid #b9c8cc;
  color: #174f4a;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-width: 42px;
  padding: 7px 9px;
}

.measurement-open-link:hover,
.measurement-open-link:focus-visible {
  background: #edf6f4;
  border-color: #176a63;
  outline: none;
}

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

  .measurement-filter > :first-child,
  .measurement-mine-toggle {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .measurement-page-head {
    align-items: stretch;
  }

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

  .measurement-summary > div:nth-child(2) {
    border-right: 0;
  }

  .measurement-summary > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .measurement-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  .measurement-filter > :first-child,
  .measurement-mine-toggle {
    grid-column: auto;
  }

  .measurement-filter > button,
  .measurement-filter > .link-button {
    width: 100%;
  }

  .measurement-job-table .measurement-progress {
    min-width: 0;
    width: min(100%, 230px);
  }

  .measurement-job-table td:nth-child(1),
  .measurement-job-table td:nth-child(2) {
    min-width: 0;
  }
}

.brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 17px;
  font-weight: 700;
  gap: 10px;
}

.brand-logo {
  background: #fff;
  border-radius: 4px;
  display: block;
  height: 38px;
  max-width: 120px;
  object-fit: contain;
  padding: 3px;
}

.brand-logo-rayop {
  height: 40px;
  max-width: 40px;
  padding: 2px;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.08;
}

.brand-text strong {
  color: #fff;
  font-size: 17px;
}

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.nav a,
.nav button {
  background: transparent;
  border: 0;
  color: #dce4ec;
  cursor: pointer;
  font: inherit;
}

.nav-menu {
  align-self: stretch;
  display: flex;
  position: relative;
}

.nav-menu-trigger {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.nav-submenu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(17, 24, 32, 0.18);
  display: none;
  left: 0;
  min-width: 220px;
  padding: 6px;
  position: absolute;
  top: calc(100% - 1px);
  z-index: 50;
}

.nav-submenu a {
  border-radius: 4px;
  color: var(--text);
  display: block;
  padding: 10px 12px;
  white-space: nowrap;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible {
  background: #eef3f7;
  color: var(--primary);
}

.nav-menu:hover .nav-submenu,
.nav-menu:focus-within .nav-submenu {
  display: block;
}

.page {
  margin: 0 auto;
  max-width: 1380px;
  padding: 28px;
}

.page-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

/* Wagon QR workflow */
.qr-scan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.qr-camera-panel,
.qr-manual-panel {
  padding: 18px;
}

.qr-camera-frame {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: #0c1f24;
  border-radius: 6px;
}

.qr-camera-frame video {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.qr-target {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(58vw, 260px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  box-shadow: 0 0 0 999px rgb(4 20 24 / 48%);
  pointer-events: none;
}

.qr-camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #d9e8e6;
}

.qr-camera-placeholder strong { font-size: 54px; letter-spacing: 0; }
.qr-camera-placeholder[hidden] { display: none; }
.qr-scan-status { min-height: 22px; margin: 12px 0; color: var(--muted); }
.qr-camera-button { width: 100%; min-height: 46px; }
.qr-manual-panel { display: grid; gap: 18px; }
.qr-manual-panel h2 { margin: 4px 0; }
.qr-manual-panel p { margin: 0; color: var(--muted); }

.qr-wagon-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  background: #eef5f3;
}

.qr-wagon-summary div { padding: 14px 18px; border-right: 1px solid var(--border); }
.qr-wagon-summary div:last-child { border-right: 0; }
.qr-wagon-summary span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.qr-task-list { display: grid; gap: 8px; }
.qr-task-card { position: relative; display: grid; gap: 4px; padding: 14px 48px 14px 16px; border: 1px solid var(--border); color: inherit; text-decoration: none; }
.qr-task-card:hover { border-color: #176a63; background: #f2f8f6; }
.qr-task-card i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 21px; }
.qr-task-card small { color: var(--muted); }
.qr-task-department { color: #176a63; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.qr-task-empty { display: grid; gap: 5px; padding: 22px; border: 1px dashed var(--border); text-align: center; }
.qr-task-empty span { color: var(--muted); }

.qr-print-filter { display: flex; align-items: end; gap: 12px; padding: 14px 18px; }
.qr-print-filter label { flex: 1; }
.qr-select-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.qr-select-all input,
.qr-wagon-select-card input,
.qr-location-select-card input { width: 20px; height: 20px; margin: 0; accent-color: #176a63; }
.qr-wagon-select-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qr-wagon-select-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid var(--border); cursor: pointer; }
.qr-wagon-select-card:has(input:checked) { border-color: #176a63; background: #eef7f4; }
.qr-wagon-select-card span { min-width: 0; }
.qr-wagon-select-card strong,
.qr-wagon-select-card small { display: block; overflow-wrap: anywhere; }
.qr-wagon-select-card small { margin-top: 3px; color: var(--muted); }
.qr-location-select-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qr-location-select-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.qr-location-select-card:has(input:checked) { border-color: #176a63; background: #eef7f4; }
.qr-location-select-card > span { min-width: 0; }
.qr-location-select-card strong,
.qr-location-select-card small { display: block; overflow-wrap: anywhere; }
.qr-location-select-card small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.qr-print-actions { position: sticky; bottom: 8px; padding: 12px 0 0; background: var(--panel); }

.mobile-crash-panel { padding: 18px; }
.mobile-crash-list { display: grid; gap: 8px; }
.mobile-crash-item { border: 1px solid var(--border); background: #fbfcfc; }
.mobile-crash-item > summary { display: grid; grid-template-columns: auto minmax(140px, .7fr) minmax(220px, 1fr); gap: 12px; align-items: center; padding: 13px 15px; cursor: pointer; }
.mobile-crash-item > summary > span:last-child { color: var(--muted); font-size: 12px; text-align: right; }
.mobile-crash-severity { padding: 4px 7px; background: #fff0d5; color: #815400; font-size: 11px; font-weight: 800; }
.mobile-crash-severity.is-fatal { background: #fee7e4; color: #9b281c; }
.mobile-crash-detail { display: grid; gap: 12px; padding: 15px; border-top: 1px solid var(--border); }
.mobile-crash-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.mobile-crash-detail dl div { padding: 9px 11px; background: #eef4f2; }
.mobile-crash-detail dt { color: var(--muted); font-size: 11px; }
.mobile-crash-detail dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.mobile-crash-message p { margin: 5px 0 0; overflow-wrap: anywhere; }
.mobile-crash-stack summary { cursor: pointer; color: #176a63; font-weight: 700; }
.mobile-crash-stack pre { max-height: 300px; overflow: auto; margin: 10px 0 0; padding: 12px; background: #102127; color: #e7f1ef; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .qr-scan-layout { grid-template-columns: 1fr; }
  .qr-camera-frame,
  .qr-camera-frame video { min-height: 56vh; height: 56vh; }
  .qr-wagon-summary { grid-template-columns: 1fr; }
  .qr-wagon-summary div { border-right: 0; border-bottom: 1px solid var(--border); }
  .qr-wagon-summary div:last-child { border-bottom: 0; }
  .qr-wagon-head { align-items: stretch; }
  .qr-print-filter { align-items: stretch; flex-direction: column; }
  .qr-wagon-select-grid,
  .qr-location-select-grid { grid-template-columns: 1fr; }
  .qr-print-actions button { width: 100%; }
  .mobile-crash-item > summary { grid-template-columns: auto 1fr; }
  .mobile-crash-item > summary > span:last-child { grid-column: 1 / -1; text-align: left; }
  .mobile-crash-detail dl { grid-template-columns: 1fr; }
}

.page-actions,
.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

p {
  color: var(--muted);
  margin: 8px 0 0;
}

.panel,
.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.panel-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-title-row h2 {
  margin-bottom: 0;
}

.toolbar-file-input {
  display: none !important;
}

.toolbar-icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
  width: 40px;
}

.toolbar-icon-button:hover,
.toolbar-icon-button:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 111, 174, .12);
  color: var(--primary);
  outline: none;
}

.toolbar-icon-button svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.inline-form {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin: 0;
}

.inline-form select {
  min-width: 190px;
}

.compact-field {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  margin: 0;
}

.compact-field select[multiple] {
  min-height: 96px;
}

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

.status-card {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-left: 5px solid #8aa0b6;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.status-card.success {
  border-left-color: #15803d;
}

.status-card.danger {
  border-left-color: #b42318;
}

.status-card span {
  color: var(--muted);
  font-size: 13px;
}

.alert-list {
  display: grid;
  gap: 10px;
}

.expiry-alert {
  align-items: center;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-left: 5px solid #8aa0b6;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr) minmax(140px, .6fr);
  padding: 12px 14px;
}

.expiry-alert strong,
.expiry-alert span,
.expiry-alert em {
  overflow-wrap: anywhere;
}

.expiry-alert em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.expiry-alert.expired {
  background: #fff1f1;
  border-left-color: #b42318;
}

.expiry-alert.critical {
  background: #fff6ed;
  border-left-color: #c2410c;
}

.expiry-alert.warning {
  background: #fffbe6;
  border-left-color: #b7791f;
}

.expiry-alert.notice {
  background: #eef7ff;
  border-left-color: #2563eb;
}

.auth-panel {
  margin: 80px auto;
  max-width: 420px;
}

.auth-panel-branded {
  max-width: 460px;
  padding: 28px;
  text-align: center;
}

.auth-panel-branded .form {
  margin-top: 22px;
  text-align: left;
}

.auth-panel-branded h1 {
  font-size: 28px;
}

.login-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 360px;
}

.login-logo {
  display: block;
  height: 82px;
  margin: 0 auto 16px;
  max-width: 260px;
  object-fit: contain;
}

.login-logo-product {
  height: auto;
  margin-bottom: 18px;
  max-width: 380px;
  width: 100%;
}

.stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 22px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 18px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.stat-card:hover,
.stat-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(17, 24, 32, .09);
  transform: translateY(-1px);
}

.stats strong {
  display: block;
  font-size: 28px;
}

.stats span,
small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.help {
  color: var(--muted);
  font-size: 12px;
}

.inline-action {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  width: fit-content;
}

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

.dashboard-hero {
  align-items: stretch;
  background: #17212b;
  border: 1px solid #273541;
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
  margin-bottom: 22px;
  overflow: hidden;
  padding: 24px;
}

.dashboard-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
}

.dashboard-kicker {
  color: #a7d6d0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  font-size: 34px;
  margin-top: 10px;
}

.dashboard-hero p {
  color: #d6dee5;
  font-size: 16px;
  line-height: 1.5;
  max-width: 680px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.dashboard-hero .link-button {
  background: #fff;
  border-color: #fff;
  color: #17212b;
}

.dashboard-hero .link-button.primary {
  background: #2f8f83;
  border-color: #2f8f83;
  color: #fff;
}

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

.dashboard-status div {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  padding: 16px;
}

.dashboard-status span {
  color: #c6d0d8;
  display: block;
  font-size: 13px;
}

.dashboard-status strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}

.dashboard-shell {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.module-sections {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.module-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  border-left: 5px solid var(--primary);
  padding: 18px;
}

.module-section-ecm {
  border-left-color: #176a63;
}

.module-section-maintenance {
  border-left-color: #2b62a3;
}

.module-section-support {
  border-left-color: #7b5b22;
}

.module-section-commercial {
  border-left-color: #8b4e7a;
}

.module-section-admin {
  border-left-color: #596575;
}

.module-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.module-card {
  align-content: start;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 16px;
  position: relative;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.module-card:hover,
.module-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(17, 24, 32, .08);
  outline: none;
  transform: translateY(-1px);
}

.module-card-icon {
  align-items: center;
  background: #e5f0ee;
  border: 1px solid #c8dedb;
  border-radius: 8px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  letter-spacing: .04em;
  width: 42px;
}

.module-card strong {
  font-size: 15px;
  padding-right: 34px;
}

.module-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  max-width: 90%;
}

.module-card em {
  background: #eef3f7;
  border-radius: 8px;
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
  min-width: 28px;
  padding: 4px 8px;
  position: absolute;
  right: 12px;
  text-align: center;
  top: 12px;
}

.module-card::after {
  bottom: 14px;
  color: #8b97a3;
  content: "→";
  font-weight: 800;
  position: absolute;
  right: 14px;
}

.dashboard-side-panel {
  position: sticky;
  top: 84px;
}

.dashboard-mini-list {
  display: grid;
  gap: 10px;
}

.dashboard-mini-list a,
.dashboard-mini-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: block;
  padding: 12px;
  text-decoration: none;
}

.dashboard-mini-list a:hover,
.dashboard-mini-list a:focus-visible {
  border-color: var(--primary);
  outline: none;
}

.dashboard-mini-list strong {
  display: block;
  font-size: 14px;
}

.dashboard-mini-list span span,
.dashboard-mini-list a span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.dashboard-mini-list .is-disabled {
  opacity: .62;
}

.split.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 8px;
  padding: 18px;
}

.module-tile strong {
  font-size: 18px;
}

.module-tile span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.table-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.icon-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.icon-link:hover,
.icon-link:focus-visible {
  background: #eef7f5;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.icon-link svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.portal-access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-access-list span {
  background: #eef7f5;
  border: 1px solid #c7ded9;
  border-radius: 6px;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 7px 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

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

.form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-order-summary {
  align-items: end;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.4fr) auto;
}

.wheelset-assign-form {
  align-items: end;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(140px, 0.7fr) minmax(220px, 1.4fr) auto;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

label.is-disabled {
  opacity: 0.55;
}

input,
select,
textarea {
  border: 1px solid #cbd3dc;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.onboarding-inclusions {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
}

.onboarding-inclusions strong {
  flex-basis: 100%;
}

.onboarding-inclusions span {
  background: #eef5f3;
  border: 1px solid #bdd7d1;
  border-radius: 5px;
  color: var(--primary-dark);
  padding: 7px 9px;
}

.company-module-picker > div {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-module-picker > div > div {
  min-width: 0;
}

.company-module-picker label {
  align-items: start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font-size: 14px;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr);
  line-height: 1.35;
  min-height: 48px;
  padding: 12px;
}

.company-module-picker label:hover {
  border-color: #85aaa9;
  background: #f1f8f7;
}

.company-module-picker input[type="checkbox"] {
  accent-color: var(--primary);
  align-self: start;
  height: 20px;
  margin: 0;
  min-height: 20px;
  padding: 0;
  width: 20px;
}

.company-module-picker input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(4, 125, 145, .22);
  outline-offset: 2px;
}

.onboarding-progress {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  margin-top: 16px;
}

.onboarding-progress-track {
  background: #dce5e8;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.onboarding-progress-track span {
  background: var(--primary);
  display: block;
  height: 100%;
}

.onboarding-progress-compact {
  margin: 0;
  min-width: 220px;
}

.onboarding-summary {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.onboarding-summary > div {
  background: #fff;
  border-bottom: 3px solid var(--primary);
  display: grid;
  gap: 5px;
  padding: 18px;
}

.onboarding-summary strong {
  color: var(--text);
  font-size: 20px;
}

.onboarding-summary span {
  color: var(--muted);
  font-size: 13px;
}

.onboarding-task-list {
  border-top: 1px solid var(--line);
}

.onboarding-task-row {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 1.6fr) minmax(150px, 0.6fr) minmax(260px, 1fr) auto;
  padding: 16px 0;
}

.onboarding-task-copy h3 {
  font-size: 16px;
  margin: 3px 0 6px;
}

.onboarding-task-copy p,
.onboarding-task-copy small {
  color: var(--muted);
  margin: 0;
}

.onboarding-tool-link,
.onboarding-evidence-link {
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  margin: 8px 12px 0 0;
}

.onboarding-evidence-link {
  color: #315b74;
}

.onboarding-evidence-upload {
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
}

.onboarding-evidence-upload summary {
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  width: max-content;
}

.onboarding-evidence-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(260px, 1.4fr) auto;
  padding: 12px 0 0;
}

.onboarding-import-list {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.onboarding-import-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 0;
}

.onboarding-import-row > div {
  display: grid;
  gap: 4px;
}

.onboarding-import-row span,
.onboarding-import-row li {
  color: var(--muted);
  font-size: 13px;
}

.onboarding-page-head .eyebrow,
.onboarding-next-step .eyebrow,
.onboarding-checklist-head .eyebrow {
  color: var(--primary-dark);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.onboarding-summary-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.onboarding-next-step {
  align-items: center;
  background: #f2f8f6;
  border-left: 4px solid var(--primary);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px 20px;
}

.onboarding-next-step.is-ready {
  background: #eef8f0;
  border-left-color: #23834a;
}

.onboarding-next-step h2,
.onboarding-checklist-head h2 {
  font-size: 20px;
  margin: 0 0 5px;
}

.onboarding-next-step p {
  color: var(--muted);
  margin: 0;
  max-width: 850px;
}

.onboarding-phase-nav {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.onboarding-phase-nav a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 8px 10px;
}

.onboarding-phase-nav a > span {
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

.onboarding-phase-nav small {
  color: var(--muted);
}

.onboarding-checklist-head {
  align-items: end;
  border-bottom: 2px solid var(--text);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.onboarding-phase-list {
  background: #fff;
}

.onboarding-phase {
  border-bottom: 1px solid var(--line);
}

.onboarding-phase > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  list-style: none;
  min-height: 64px;
  padding: 10px 14px;
}

.onboarding-phase > summary::-webkit-details-marker {
  display: none;
}

.onboarding-phase[open] > summary {
  background: #eef5f3;
  border-bottom: 1px solid #bdd7d1;
}

.onboarding-phase-number {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.onboarding-phase > summary strong,
.onboarding-phase > summary small {
  display: block;
}

.onboarding-phase > summary small {
  color: var(--muted);
  margin-top: 3px;
}

.onboarding-phase-chevron {
  color: var(--muted);
  font-size: 22px;
  transform: rotate(-90deg);
  transition: transform 160ms ease;
}

.onboarding-phase[open] .onboarding-phase-chevron {
  transform: rotate(0);
}

.onboarding-phase .onboarding-task-list {
  border-top: 0;
  padding: 0 14px;
}

.onboarding-task-item {
  border-bottom: 1px solid var(--line);
  position: relative;
}

.onboarding-task-item:last-child {
  border-bottom: 0;
}

.onboarding-task-item.status-completed {
  box-shadow: inset 3px 0 #23834a;
}

.onboarding-task-item.status-blocked {
  box-shadow: inset 3px 0 #b45309;
}

.onboarding-task-item.status-in_progress {
  box-shadow: inset 3px 0 #2563a6;
}

.onboarding-task-item.status-not_applicable {
  opacity: 0.68;
}

.onboarding-task-row {
  align-items: start;
  border-bottom: 0;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  padding: 18px 14px;
}

.onboarding-task-controls {
  display: grid;
  gap: 10px;
}

.onboarding-task-controls button {
  justify-content: center;
}

.onboarding-task-kicker {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.onboarding-task-kicker > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.required-badge,
.optional-badge,
.module-badge {
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
}

.required-badge {
  background: #fcebea;
  color: #9b2c2c;
}

.optional-badge {
  background: #f1f3f5;
  color: #59636e;
}

.module-badge {
  background: #e8f1fb;
  color: #245e93;
}

.onboarding-guidance {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 0;
}

.onboarding-guidance > div {
  border-left: 2px solid #cad4dc;
  padding-left: 10px;
}

.onboarding-guidance dt {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}

.onboarding-guidance dd {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.onboarding-completed-by {
  color: #237144;
  display: block;
  margin-top: 9px;
}

.onboarding-evidence-upload {
  margin: 0 14px;
}

.onboarding-print-status {
  display: none;
}

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

  .onboarding-phase-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-task-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .onboarding-evidence-form {
    grid-template-columns: 1fr 1fr;
  }

  .onboarding-task-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .onboarding-summary,
  .onboarding-summary-five,
  .onboarding-task-row,
  .onboarding-evidence-form {
    grid-template-columns: 1fr;
  }

  .onboarding-next-step,
  .onboarding-checklist-head {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-phase-nav {
    grid-template-columns: 1fr;
  }

  .onboarding-guidance {
    grid-template-columns: 1fr;
  }

  .onboarding-phase > summary {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding-inline: 8px;
  }

  .onboarding-phase .onboarding-task-list {
    padding-inline: 5px;
  }

  .onboarding-task-row {
    padding-inline: 10px;
  }

  .onboarding-import-row {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-progress {
    grid-template-columns: 1fr auto;
  }

  .onboarding-progress > span {
    grid-column: 1 / -1;
  }

  .onboarding-progress-compact {
    min-width: 0;
    width: 100%;
  }
}

/* Mobile field actions stay compact in the embedded RayOP application. */
.mobile-icon-command {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
}

.mobile-icon-command svg {
  fill: none;
  flex: 0 0 19px;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.mobile-icon-command.js-open-camera svg,
.mobile-icon-command.js-item-camera svg {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 700px) {
  .mobile-icon-command .mobile-action-label,
  .file-upload-button > span {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .inspection-marker-trigger.mobile-icon-command,
  .post-sandblast-drawing-summary .mobile-icon-command,
  .focused-repair-actions .mobile-icon-command,
  .inspection-photo-actions .mobile-icon-command,
  .photo-upload-form .mobile-icon-command,
  .qr-camera-button.mobile-icon-command,
  .file-upload-button {
    flex: 0 0 42px;
    height: 42px;
    min-height: 42px;
    min-width: 42px;
    padding: 0;
    width: 42px;
  }

  .inspection-marker-trigger.mobile-icon-command {
    margin-left: auto;
    margin-top: 6px;
  }

  .inspection-photo-cell {
    min-width: 94px;
  }
}

/* Platform assurance and production controls */
.platform-assurance {
  width: min(100%, 1540px);
  margin: 0 auto;
  color: var(--text);
}

.assurance-heading {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 2px solid #263b4b;
}

.assurance-heading h1,
.assurance-section h2,
.assurance-section h3 {
  margin-top: 0;
}

.assurance-heading p,
.assurance-section > .section-heading-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.assurance-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.assurance-metrics a {
  min-width: 0;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--border);
}

.assurance-metrics a:last-child {
  border-right: 0;
}

.assurance-metrics a:hover {
  background: #f0f7f6;
}

.assurance-metrics span,
.assurance-metrics strong {
  display: block;
}

.assurance-metrics span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.assurance-metrics strong {
  margin-top: 4px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.assurance-tabs {
  position: sticky;
  z-index: 7;
  top: var(--app-header-height, 0);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 24px;
  background: #253b4b;
  box-shadow: 0 2px 8px rgb(20 36 48 / 12%);
}

.assurance-tabs a {
  min-height: 44px;
  padding: 13px 15px;
  color: #dbe6ed;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.assurance-tabs a:hover,
.assurance-tabs a[aria-current="page"] {
  color: #fff;
  background: #176a63;
  border-bottom-color: #f3b44c;
}

.assurance-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.assurance-overview-grid a {
  min-height: 104px;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.assurance-overview-grid a:hover {
  background: #f4f8f8;
  box-shadow: inset 4px 0 #176a63;
}

.assurance-overview-grid strong,
.assurance-overview-grid span {
  display: block;
}

.assurance-overview-grid strong {
  color: #183d4a;
  font-size: 17px;
}

.assurance-overview-grid span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.assurance-section {
  margin-bottom: 32px;
}

.section-heading-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.assurance-form-panel {
  margin: 14px 0 22px;
  border: 1px solid #bdc9d2;
  background: #fff;
}

.assurance-form-panel > summary,
.inline-action > summary {
  cursor: pointer;
  font-weight: 750;
}

.assurance-form-panel > summary {
  padding: 14px 16px;
  color: #183d4a;
  background: #eef3f5;
}

.assurance-form-panel[open] > summary {
  border-bottom: 1px solid #bdc9d2;
}

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

.assurance-form > div {
  min-width: 0;
}

.assurance-form > div:has(textarea),
.assurance-form > div:has([type="checkbox"]),
.assurance-form > .errorlist,
.assurance-form > button {
  grid-column: 1 / -1;
}

.assurance-form label,
.compact-form label {
  display: block;
  margin-bottom: 5px;
  color: #435667;
  font-size: 12px;
  font-weight: 700;
}

.assurance-form input:not([type="checkbox"]):not([type="radio"]),
.assurance-form select,
.assurance-form textarea,
.compact-form input,
.compact-form select,
.compact-form textarea,
.inline-action textarea {
  width: 100%;
}

.assurance-form input[type="checkbox"],
.assurance-form input[type="radio"],
.compact-form input[type="checkbox"],
.compact-form input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

.security-policy-form #id_security-mfa_roles_field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
  margin-top: 8px;
}

.security-policy-form #id_security-mfa_roles_field > div {
  min-width: 0;
}

.security-policy-form #id_security-mfa_roles_field label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  margin: 0;
  overflow-wrap: anywhere;
}

.assurance-form .helptext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.assurance-form .errorlist {
  margin: 0;
  color: #a11d27;
}

.assurance-table-wrap {
  max-width: 100%;
  margin: 12px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: #fff;
}

.assurance-table {
  width: 100%;
  min-width: 780px;
  margin: 0;
}

.assurance-table th {
  color: #435667;
  font-size: 11px;
  text-transform: uppercase;
  background: #edf2f4;
}

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

.assurance-table td strong,
.assurance-table td small {
  display: block;
}

.assurance-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.assurance-record-list {
  border-top: 1px solid var(--border);
}

.assurance-record-list article {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.assurance-record-list article > div {
  min-width: 0;
}

.assurance-record-list strong,
.assurance-record-list span,
.assurance-record-list small {
  display: block;
}

.assurance-record-list span,
.assurance-record-list small {
  margin-top: 3px;
  color: var(--muted);
}

.assurance-two-column,
.assurance-three-column {
  display: grid;
  gap: 28px;
}

.assurance-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assurance-three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-columns {
  gap: 18px;
}

.assurance-status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.assurance-status-strip span {
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
  border-right: 1px solid var(--border);
}

.assurance-status-strip span:last-child {
  border-right: 0;
}

.assurance-status-strip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 20px;
}

.inline-action {
  position: relative;
  min-width: 150px;
}

.inline-action > summary {
  color: var(--primary);
}

.inline-action form {
  display: grid;
  gap: 8px;
  min-width: 260px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  background: #f7f9fa;
}

.compact-form {
  display: grid;
  gap: 10px;
}

.status-badge,
.severity-info,
.severity-warning,
.severity-error,
.severity-critical {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 750;
  border: 1px solid #b9c6cf;
  border-radius: 4px;
  background: #edf2f4;
}

.status-ready,
.status-verified,
.status-success,
.severity-info {
  color: #0b624b;
  border-color: #9bcdbd;
  background: #e7f5ef;
}

.status-danger,
.status-failed,
.severity-error,
.severity-critical {
  color: #91212b;
  border-color: #e0a8ae;
  background: #fbecef;
}

.status-processing,
.status-pending,
.severity-warning {
  color: #76500d;
  border-color: #dfc17d;
  background: #fff7df;
}

.error-text {
  color: #a11d27 !important;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.security-auth-panel {
  position: relative;
  max-width: 470px;
}

.security-auth-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  background: #176a63;
  border-radius: 50%;
}

.security-code-form input[name="code"] {
  min-height: 52px;
  font-size: 26px;
  letter-spacing: 6px;
  text-align: center;
}

.security-resend-form {
  margin-top: 10px;
}

@media (max-width: 1180px) {
  .assurance-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .assurance-metrics a:nth-child(4) {
    border-right: 0;
  }

  .assurance-three-column {
    grid-template-columns: 1fr;
  }

  .assurance-status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .assurance-heading,
  .section-heading-row,
  .assurance-record-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .assurance-metrics,
  .assurance-overview-grid,
  .assurance-two-column,
  .assurance-form,
  .assurance-status-strip {
    grid-template-columns: 1fr;
  }

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

  .assurance-metrics a:last-child {
    grid-column: 1 / -1;
  }

  .assurance-metrics a,
  .assurance-metrics a:nth-child(4),
  .assurance-status-strip span {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .assurance-metrics a:nth-child(odd):not(:last-child) {
    border-right: 1px solid var(--border);
  }

  .assurance-tabs {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assurance-tabs a {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .assurance-form > div,
  .assurance-form > button {
    grid-column: 1;
  }

  .security-policy-form #id_security-mfa_roles_field {
    grid-template-columns: 1fr;
  }

  .assurance-table-wrap {
    width: 100%;
  }

  .inline-action form {
    min-width: 0;
  }
}

/* ECM Function III: Fleet maintenance management */
.fleet-page-head,
.fleet-detail-head {
  align-items: flex-end;
  border-bottom: 1px solid var(--border, #d8e0e8);
}

.fleet-page-head h1,
.fleet-detail-head h1 {
  margin-bottom: 5px;
}

.fleet-head-actions,
.fleet-form-actions,
.fleet-row-actions,
.fleet-lifecycle-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fleet-back-link {
  display: block;
  margin-bottom: 12px;
  color: #28546f;
  font-weight: 700;
  text-decoration: none;
}

.fleet-agreement-state {
  display: grid;
  min-width: 190px;
  padding: 12px 16px;
  border-left: 4px solid #16756f;
  background: #f1f7f6;
}

.fleet-agreement-state span,
.fleet-agreement-state small {
  color: var(--muted, #5d6b79);
}

.fleet-agreement-state strong {
  margin: 3px 0;
  font-size: 20px;
}

.fleet-metric-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 18px 0;
  border-block: 1px solid var(--border, #d8e0e8);
  background: #fff;
}

.fleet-metric-band > div {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--border, #d8e0e8);
}

.fleet-metric-band > div:last-child {
  border-right: 0;
}

.fleet-metric-band span,
.fleet-metric-band strong {
  display: block;
}

.fleet-metric-band span {
  min-height: 34px;
  color: var(--muted, #5d6b79);
  font-size: 12px;
  line-height: 1.35;
}

.fleet-metric-band strong {
  margin-top: 4px;
  color: #10263a;
  font-size: 28px;
}

.fleet-metric-band .is-risk {
  background: #fff1f1;
}

.fleet-metric-band .is-risk strong,
.fleet-risk-text {
  color: #a11d27 !important;
}

.fleet-metric-band .is-warning {
  background: #fff9e8;
}

.fleet-command-band {
  margin: 18px 0 26px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border, #d8e0e8);
}

.fleet-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto auto;
  align-items: end;
  gap: 10px;
}

.fleet-search-form label,
.fleet-form-grid label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #415466;
  font-size: 12px;
  font-weight: 700;
}

.fleet-search-form input,
.fleet-search-form select,
.fleet-form-grid input,
.fleet-form-grid select,
.fleet-form-grid textarea,
.fleet-inline-form input,
.fleet-inline-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.fleet-create,
.fleet-form-drawer {
  margin-top: 14px;
  border-top: 1px solid var(--border, #d8e0e8);
}

.fleet-create > summary,
.fleet-form-drawer > summary {
  padding: 14px 4px;
  color: #0e5f5a;
  cursor: pointer;
  font-weight: 800;
  list-style-position: inside;
}

.fleet-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 16px;
  padding: 16px;
  border: 1px solid var(--border, #d8e0e8);
  background: #f8fafb;
}

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

.fleet-form-grid label:has(textarea),
.fleet-form-grid label:has(select[multiple]),
.fleet-form-grid > .errorlist,
.fleet-form-actions {
  grid-column: 1 / -1;
}

.fleet-form-grid small {
  color: var(--muted, #5d6b79);
  font-weight: 400;
}

.fleet-form-grid .errorlist {
  margin: 0;
  padding-left: 18px;
  color: #a11d27;
}

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

.fleet-list-band,
.fleet-section {
  margin: 24px 0 0;
}

.fleet-list-band .panel-title-row p,
.fleet-section-heading p {
  margin: 4px 0 0;
  color: var(--muted, #5d6b79);
}

.fleet-table {
  width: 100%;
  border-collapse: collapse;
}

.fleet-table th,
.fleet-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border, #d8e0e8);
  text-align: left;
  vertical-align: top;
}

.fleet-table th {
  color: #506273;
  background: #f4f7f9;
  font-size: 11px;
  text-transform: uppercase;
}

.fleet-table td {
  color: #172d40;
}

.fleet-table td strong,
.fleet-table td span,
.fleet-table td small,
.fleet-table td em {
  display: block;
}

.fleet-table td small {
  margin-top: 4px;
  color: var(--muted, #5d6b79);
}

.fleet-table.compact th,
.fleet-table.compact td {
  padding-block: 8px;
}

.fleet-row-actions {
  min-width: 150px;
}

.fleet-row-actions a,
.fleet-lifecycle-actions a {
  white-space: nowrap;
}

.fleet-empty {
  padding: 24px !important;
  color: var(--muted, #5d6b79) !important;
  text-align: center !important;
}

.fleet-section-nav {
  position: sticky;
  z-index: 8;
  top: 68px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 8px 0;
  border-block: 1px solid var(--border, #d8e0e8);
  background: rgba(255, 255, 255, .97);
  scrollbar-width: thin;
}

.fleet-section-nav a {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #2f4b61;
  border-right: 1px solid var(--border, #d8e0e8);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.fleet-process-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 22px 0 28px;
  border: 1px solid var(--border, #d8e0e8);
}

.fleet-process-strip > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 11px;
  border-right: 1px solid var(--border, #d8e0e8);
}

.fleet-process-strip > div:last-child {
  border-right: 0;
}

.fleet-process-strip strong,
.fleet-section-heading > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: #16756f;
  border-radius: 4px;
}

.fleet-process-strip span {
  color: #364e63;
  font-size: 12px;
  line-height: 1.35;
}

.fleet-section {
  scroll-margin-top: 118px;
  padding-top: 23px;
  border-top: 2px solid #1d3448;
}

.fleet-section-heading {
  margin-bottom: 15px;
}

.fleet-section-heading > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
}

.fleet-section-heading h2,
.fleet-section-heading p {
  grid-column: 2;
}

.fleet-section-heading h2 {
  margin: 0;
  font-size: 21px;
}

.fleet-progress {
  width: 140px;
  height: 7px;
  overflow: hidden;
  background: #dce5e9;
}

.fleet-progress span {
  height: 100%;
  background: #16806e;
}

.fleet-issue {
  margin-top: 4px;
  color: #9a5310;
  font-size: 11px;
  font-style: normal;
}

.fleet-check {
  display: inline-block !important;
  width: max-content;
  margin: 0 3px 3px 0;
  padding: 2px 6px;
  color: #7b2f34;
  border: 1px solid #e4b9bd;
  background: #fff4f5;
  font-size: 11px;
}

.fleet-check.ok {
  color: #0b6b43;
  border-color: #9bd0b5;
  background: #effaf4;
}

.fleet-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fleet-record {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border, #d8e0e8);
  border-radius: 6px;
  background: #fff;
}

.fleet-record > div,
.fleet-program-row > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fleet-record > div span,
.fleet-program-row > div span {
  color: var(--muted, #5d6b79);
  font-size: 12px;
  text-align: right;
}

.fleet-record p,
.fleet-program-row p {
  color: #3e5366;
}

.fleet-record dl {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 5px 8px;
  font-size: 12px;
}

.fleet-record dt {
  color: var(--muted, #5d6b79);
}

.fleet-record dd {
  margin: 0;
}

.fleet-program-row {
  margin-bottom: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, #d8e0e8);
}

.fleet-program-row > a {
  display: inline-block;
  margin-bottom: 8px;
}

.fleet-subheading {
  margin: 24px 0 8px;
  font-size: 16px;
}

.fleet-status-risk {
  color: #a11d27 !important;
  border-color: #e4b9bd !important;
  background: #fff1f1 !important;
}

.fleet-lifecycle-actions {
  min-width: 190px;
  align-items: flex-start;
}

.fleet-lifecycle-actions form {
  margin: 0;
}

.fleet-lifecycle-actions details {
  width: 100%;
}

.fleet-lifecycle-actions summary {
  color: #0e5f5a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.fleet-inline-form {
  display: grid;
  gap: 6px;
  margin-top: 6px !important;
  padding: 8px;
  border: 1px solid var(--border, #d8e0e8);
  background: #f7f9fa;
}

@media (max-width: 1100px) {
  .fleet-metric-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fleet-metric-band > div:nth-child(3n) {
    border-right: 0;
  }

  .fleet-metric-band > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--border, #d8e0e8);
  }

  .fleet-form-grid,
  .fleet-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fleet-process-strip {
    grid-template-columns: 1fr;
  }

  .fleet-process-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--border, #d8e0e8);
  }

  .fleet-process-strip > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .fleet-page-head,
  .fleet-detail-head {
    align-items: stretch;
  }

  .fleet-head-actions,
  .fleet-agreement-state {
    width: 100%;
  }

  .fleet-section-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
    padding: 0;
  }

  .fleet-section-nav a {
    min-width: 0;
    border-right: 1px solid var(--border, #d8e0e8);
    border-bottom: 1px solid var(--border, #d8e0e8);
    white-space: normal;
  }

  .fleet-search-form,
  .fleet-form-grid,
  .fleet-form-grid.compact,
  .fleet-form-pair,
  .fleet-record-grid {
    grid-template-columns: 1fr;
  }

  .fleet-search-form button,
  .fleet-search-form .link-button,
  .fleet-form-actions button,
  .fleet-form-actions .link-button {
    width: 100%;
  }

  .fleet-metric-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fleet-metric-band > div,
  .fleet-metric-band > div:nth-child(3n) {
    border-right: 1px solid var(--border, #d8e0e8);
    border-bottom: 1px solid var(--border, #d8e0e8);
  }

  .fleet-metric-band > div:nth-child(2n) {
    border-right: 0;
  }

  .fleet-metric-band > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .fleet-table,
  .fleet-table tbody,
  .fleet-table tr,
  .fleet-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .fleet-table thead {
    display: none;
  }

  .fleet-table tr {
    margin-bottom: 10px;
    padding: 5px 0;
    border: 1px solid var(--border, #d8e0e8);
    background: #fff;
  }

  .fleet-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf1f4;
    overflow-wrap: anywhere;
  }

  .fleet-table td:last-child {
    border-bottom: 0;
  }

  .fleet-progress {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .fleet-metric-band {
    grid-template-columns: 1fr;
  }

  .fleet-metric-band > div,
  .fleet-metric-band > div:nth-child(2n),
  .fleet-metric-band > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border, #d8e0e8);
  }

  .fleet-metric-band > div:last-child {
    border-bottom: 0;
  }
}

@media print {
  .onboarding-print-hide,
  .side-drawer,
  .topbar,
  .app-topbar,
  .toast-stack,
  .messages {
    display: none !important;
  }

  .app-shell,
  .app-main,
  main {
    display: block !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .onboarding-page-head {
    border-bottom: 2px solid #000;
    margin-bottom: 8px;
  }

  .onboarding-summary-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .onboarding-next-step,
  .onboarding-checklist-head {
    break-inside: avoid;
  }

  .onboarding-phase {
    break-inside: auto;
  }

  .onboarding-phase > summary {
    background: #fff !important;
    border-bottom: 2px solid #000;
  }

  .onboarding-phase-chevron,
  .onboarding-task-controls {
    display: none !important;
  }

  .onboarding-task-row {
    break-inside: avoid;
    display: block;
    padding: 10px 8px;
  }

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

  .onboarding-print-status {
    border-top: 1px dotted #777;
    display: flex;
    font-size: 11px;
    gap: 8px;
    margin-top: 8px;
    padding-top: 5px;
  }
}

button,
.link-button {
  border-radius: 6px;
  display: inline-flex;
  font-weight: 700;
  min-height: 40px;
  padding: 10px 14px;
}

.primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.danger {
  background: #fff1f1;
  border: 1px solid #b42318;
  color: #8a1f16;
}

.danger-button {
  background: #fff1f1;
  border: 1px solid #b42318;
  color: #8a1f16;
}

.note-box {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: 13px/1.5 Consolas, "Courier New", monospace;
  max-height: 360px;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 12px;
  white-space: pre-wrap;
}

.narrow {
  max-width: 720px;
}

.inspection-form {
  display: grid;
  gap: 18px;
}

.wagon-type-editor {
  display: grid;
  gap: 18px;
}

.evsaf-editor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inspection-table {
  min-width: 1200px;
}

.center {
  text-align: center;
}

.check-result {
  white-space: nowrap;
}

.checklist-table {
  min-width: 1180px;
}

.check-photo-cell {
  min-width: 180px;
}

.check-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.check-photo-strip img {
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 44px;
  object-fit: cover;
  width: 58px;
}

.v0-work-order-banner {
  align-items: center;
  border-left: 4px solid #0f766e;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.v0-inspection-banner {
  background: #edf6f4;
  border-left: 4px solid #0f766e;
}

.v0-inspection-banner h2 {
  margin: 4px 0 6px;
}

.v0-inspection-banner p {
  color: #48616a;
  margin: 0;
  max-width: 980px;
}

.heavy-damage-wps-panel {
  border-left: 4px solid #c5d0d5;
}

.heavy-damage-wps-panel:has(input:checked),
.heavy-damage-wps-panel.is-active {
  border-left-color: #b9473d;
  background: #fff9f7;
}

.heavy-damage-wps-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.heavy-damage-wps-toggle input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.heavy-damage-wps-toggle span {
  display: grid;
  gap: 4px;
}

.heavy-damage-wps-toggle small {
  color: #596973;
}

.v0-work-order-banner h2 {
  margin: 4px 0 6px;
}

.v0-assigned-departments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.v0-assigned-departments span {
  background: #e8f3f1;
  border: 1px solid #8fbeb7;
  border-radius: 4px;
  color: #0f5149;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.v0-source-finding {
  border-left: 3px solid #be4c35;
  margin-top: 8px;
  padding-left: 8px;
}

.v0-source-finding span,
.required-photo-label,
.v0-source-marker > span {
  color: #8f3d2a;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 3px;
}

.v0-source-finding p {
  margin: 0;
}

.v0-source-marker {
  margin-top: 8px;
}

.v0-marker-track {
  background: linear-gradient(90deg, #eef3f2 0 48%, #d9e5e3 48% 52%, #eef3f2 52% 100%);
  border: 1px solid #9caaae;
  height: 58px;
  overflow: hidden;
  position: relative;
}

.v0-marker-track::before,
.v0-marker-track::after {
  background: #60777d;
  content: "";
  left: 8%;
  position: absolute;
  right: 8%;
}

.v0-marker-track::before { height: 1px; top: 22%; }
.v0-marker-track::after { bottom: 22%; height: 1px; }

.v0-marker-track i {
  align-items: center;
  background: #b42318;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 20px;
  z-index: 2;
}

.source-photo-strip {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .v0-work-order-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .v0-assigned-departments {
    justify-content: flex-start;
  }
}

.locked-document-panel {
  border-color: #2563eb;
}

.status-pill {
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.signature-declaration-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.signature-declaration-panel h3 {
  margin-bottom: 6px;
}

.completion-sign-panel {
  border-left: 4px solid var(--primary);
  margin-top: 18px;
}

.completion-sign-panel .panel-title-row {
  align-items: flex-start;
}

.completion-sign-panel .panel-title-row p {
  color: var(--muted);
  margin: 4px 0 0;
}

.completion-sign-button {
  margin-top: 12px;
  min-height: 44px;
  width: 100%;
}

.reopen-record-form {
  max-width: 720px;
}

.checkbox-line {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.checkbox-line input {
  margin-top: 4px;
}

.technical-checklist th:nth-child(2),
.technical-checklist td:nth-child(2) {
  min-width: 360px;
}

.technical-checklist th:nth-child(5),
.technical-checklist td:nth-child(5) {
  min-width: 180px;
}

.technical-checklist th:nth-child(6),
.technical-checklist td:nth-child(6) {
  min-width: 220px;
}

.measurement-table {
  min-width: 1120px;
}

.measurement-table th,
.measurement-table td {
  vertical-align: middle;
}

.measurement-table input[type="text"],
.measurement-table select {
  min-width: 120px;
}

.measurement-table textarea {
  min-width: 180px;
}

.wheel-measurement-table {
  min-width: 980px;
}

.wheel-measurement-table th:first-child,
.wheel-measurement-table td:first-child {
  min-width: 145px;
}

.inline-measurement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px;
  min-width: 520px;
}

.inline-measurement-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.inline-measurement-grid .wide {
  grid-column: span 3;
}

.inline-measurement-grid .checkline {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.inline-measurement-grid input[type="text"],
.inline-measurement-grid input[type="date"],
.inline-measurement-grid input[type="file"],
.inline-measurement-grid textarea {
  min-width: 0;
  width: 100%;
}

.measurement-table input[type="checkbox"] {
  min-height: 22px;
  width: 22px;
}

.brake-kind-form {
  align-items: end;
  grid-template-columns: minmax(220px, 320px) auto;
  margin: 12px 0 6px;
}

.range-error td {
  background: #fff1f1;
}

.range-error-input {
  border-color: #c84646;
  background: #fff8f8;
  color: #9b1c1c;
}

.component-form-intro {
  align-items: center;
  background: #f5f8fa;
  border: 1px solid #d7e0e5;
  border-radius: 6px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 10px 0;
  padding: 10px 12px;
}

.replacement-legend {
  color: #8a2a25;
  font-size: 13px;
  font-weight: 700;
}

.component-measurement-table tbody tr:nth-child(even):not(.range-error) td {
  background: #f8fafb;
}

.component-measurement-table input,
.component-measurement-table textarea {
  min-width: 92px;
}

.replacement-required {
  background: #b52c27;
  border-radius: 4px;
  color: #fff;
  display: none;
  font-size: 10px;
  margin-top: 5px;
  padding: 4px 6px;
  white-space: nowrap;
}

.replacement-required.is-visible {
  display: inline-flex;
}

.coupler-technical-card {
  background: #f5f8fa;
  border: 1px solid #cbd8de;
  border-left: 4px solid #277083;
  border-radius: 6px;
  display: grid;
  gap: 7px 18px;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  margin: 10px 0 14px;
  padding: 12px;
}

.coupler-technical-card strong,
.coupler-technical-card small {
  grid-column: 1 / -1;
}

.coupler-technical-card small {
  color: #52636b;
}

@media (max-width: 850px) {
  .coupler-technical-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.status-badge {
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  white-space: nowrap;
}

.status-badge.good {
  background: #e8f6ee;
  color: #1d6f43;
}

.status-badge.bad {
  background: #fdecec;
  color: #a62c2c;
}

.status-badge.idle {
  background: #eef2f5;
  color: var(--muted);
}

.check-section-row td {
  background: #eef4f1;
  color: #27443a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 12px 10px;
}

.muted-cell {
  color: var(--muted);
  display: inline-flex;
  min-height: 40px;
  align-items: center;
}

.mark-option {
  display: inline-grid;
  margin-right: 6px;
  vertical-align: top;
}

.mark-option input {
  height: 1px;
  min-height: 0;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.mark-option span {
  align-items: center;
  border: 1px solid #cbd3dc;
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.mark-option.ok input:checked + span {
  background: #e8f6ee;
  border-color: #2f8f5b;
  color: #1d6f43;
}

.mark-option.reject input:checked + span {
  background: #fdecec;
  border-color: #c84646;
  color: #a62c2c;
}

@media (max-width: 800px) {
  .work-order-summary,
  .wheelset-assign-form {
    grid-template-columns: 1fr;
  }
}

.details {
  display: grid;
  gap: 10px;
  grid-template-columns: 160px 1fr;
}

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

.details dd {
  margin: 0;
}

.section-gap {
  margin-top: 18px;
}

.process-rule-note {
  align-items: start;
  background: #f3f7f6;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.process-rule-note span {
  color: var(--muted);
  line-height: 1.45;
}

.scan-progress {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  margin-top: 14px;
}

.scan-progress-track {
  background: #e3e9ed;
  border-radius: 5px;
  height: 10px;
  overflow: hidden;
}

.scan-progress-track span {
  background: var(--primary);
  display: block;
  height: 100%;
}

.scan-checklist-row.is-missing td {
  background: #fff9f5;
}

.scan-document-meta {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 3px;
  margin-top: 5px;
}

.scan-upload-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, .8fr) minmax(135px, .7fr) minmax(210px, 1.3fr) minmax(180px, 1fr) auto;
  min-width: 760px;
}

.scan-upload-form label,
.scan-upload-form button {
  margin: 0;
}

.scan-hash {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .scan-upload-form {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .scan-upload-form label:nth-of-type(3),
  .scan-upload-form label:nth-of-type(4),
  .scan-upload-form button {
    grid-column: 1 / -1;
  }

  .scan-progress {
    grid-template-columns: auto 1fr;
  }

  .scan-progress-track {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .scan-checklist-table,
  .scan-checklist-table tbody,
  .scan-checklist-table tr,
  .scan-checklist-table td {
    display: block;
    width: 100%;
  }

  .scan-checklist-table thead {
    display: none;
  }

  .scan-checklist-table tr {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }

  .scan-checklist-table td {
    border: 0;
    padding: 6px 10px;
  }

  .scan-upload-form {
    grid-template-columns: 1fr;
  }

  .scan-upload-form label:nth-of-type(3),
  .scan-upload-form label:nth-of-type(4),
  .scan-upload-form button {
    grid-column: auto;
  }
}

.calendar-shell {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
}

.calendar-notifications {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 18px;
}

.notification-count {
  align-items: center;
  background: #eef7f5;
  border: 1px solid #cce1dd;
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 9px;
}

.notification-stack,
.mini-status-list,
.dialog-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-left: 5px solid #8aa0b6;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

.notification-card:hover,
.notification-card:focus-visible {
  border-color: var(--primary);
  color: var(--primary-dark);
  outline: none;
}

.notification-card.needs-signature {
  border-left-color: var(--accent);
}

.notification-card span,
.mini-status em,
.dialog-list em,
.dialog-list span span,
.dialog-list a span {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.calendar-side-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.delegation-leave-context {
  background: #eef7f5;
  border: 1px solid #bdd9d4;
  border-left: 4px solid var(--primary);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.delegation-leave-context > div {
  border-right: 1px solid #cfe2df;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
}

.delegation-leave-context > div:last-child {
  border-right: 0;
}

.delegation-leave-context span {
  color: var(--muted);
  font-size: 12px;
}

.delegation-leave-context strong {
  font-size: 14px;
}

.calendar-side-section h3,
.calendar-dialog h3 {
  font-size: 15px;
  margin: 0;
}

.mini-status {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.mini-status.approved {
  border-left: 5px solid #15803d;
}

.mini-status.pending {
  border-left: 5px solid var(--accent);
}

.mini-status.rejected {
  border-left: 5px solid #b42318;
}

.calendar-main {
  min-width: 0;
}

.calendar-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.calendar-kicker {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.calendar-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
}

.calendar-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.legend-work {
  background: var(--primary);
}

.legend-leave {
  background: var(--accent);
}

.legend-note {
  background: #52677a;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px 8px;
  text-align: center;
}

.calendar-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.calendar-day {
  align-items: start;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  border-right: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 9px;
  text-align: left;
}

.calendar-day:hover,
.calendar-day:focus-visible {
  background: #eef7f5;
  outline: 2px solid rgba(23, 106, 99, .22);
  outline-offset: -2px;
}

.calendar-day.muted-day {
  background: #f7f9fb;
  color: #8a97a6;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.day-number {
  font-weight: 800;
}

.day-lines {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.day-pill {
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px;
}

.day-pill.work {
  background: var(--primary);
}

.day-pill.leave {
  background: var(--accent);
}

.day-pill.note {
  background: #52677a;
}

.calendar-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(17, 24, 32, .25);
  max-height: min(760px, 92vh);
  max-width: min(920px, calc(100vw - 28px));
  padding: 22px;
  width: 920px;
}

.calendar-dialog::backdrop {
  background: rgba(17, 24, 32, .46);
}

.dialog-close-form {
  float: right;
  margin: -8px -8px 8px 16px;
}

.dialog-close-form button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

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

.calendar-dialog-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dialog-list a,
.dialog-list span {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  padding: 10px;
}

.compact-calendar-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.approval-dialog {
  width: 640px;
}

.section-note {
  background: #f4f7f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  margin: 0 0 14px;
  padding: 10px 12px;
}

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

.evsaf-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.evsaf-block h3 {
  font-size: 15px;
  margin: 0 0 12px;
}

.evsaf-list {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) minmax(80px, 1fr);
  margin: 0;
}

.evsaf-list dt {
  color: var(--muted);
  font-size: 12px;
}

.evsaf-list dd {
  font-size: 13px;
  margin: 0;
}

.messages {
  margin-bottom: 18px;
}

.message {
  background: #e8f4ef;
  border: 1px solid #bddfd3;
  border-radius: 8px;
  color: #17483c;
  padding: 12px 14px;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.inline-actions {
  flex-wrap: wrap;
}

.import-form {
  max-width: 920px;
}

.warning-panel {
  border-color: #e0b27d;
}

.warning-panel p {
  color: #74420e;
}

.replacement-toggle {
  align-items: center;
  border: 1px solid #d7a556;
  border-radius: 6px;
  color: #70400b;
  display: inline-flex;
  gap: 6px;
  padding: 6px 8px;
  white-space: nowrap;
}

.replacement-measurement-panel {
  border-color: #d7a556;
}

.failed-component-panel {
  border-color: #d7a556;
  margin-top: 18px;
}

.failed-reference-table {
  margin-top: 12px;
  max-height: 280px;
  overflow: auto;
}

.failed-material-card-cell {
  min-width: 280px;
}

.failed-material-card-cell select {
  min-width: 260px;
  width: 100%;
}

.failed-material-card-missing {
  color: #9a3412;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  max-width: 260px;
}

.bogie-reference-panel {
  margin-bottom: 18px;
  text-align: center;
}

.bogie-reference-image {
  display: block;
  height: auto;
  margin: 14px auto 0;
  max-height: 720px;
  max-width: min(100%, 620px);
  object-fit: contain;
}

.check-inline {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  margin-top: 8px;
}

.candidate-check {
  height: 18px;
  width: 18px;
}

@media (max-width: 900px) {
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats,
  .split,
  .split.three,
  .form-grid,
  .evsaf-grid,
  .evsaf-editor-grid {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 18px;
  }

  .nav-menu {
    align-self: flex-start;
    display: block;
  }

  .nav-submenu {
    position: static;
  }
}
.quality-form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-form-links .link-button {
  white-space: normal;
}

.quality-shortcuts {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 22px;
}

.quality-card,
.quality-form-card {
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.quality-card:hover,
.quality-card:focus-visible,
.quality-form-card:hover,
.quality-form-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(17, 24, 32, 0.1);
  transform: translateY(-2px);
}

.quality-card {
  display: flex;
  flex-direction: column;
  min-height: 138px;
  padding: 18px;
}

.quality-card-label {
  font-weight: 700;
}

.quality-card strong {
  color: var(--primary);
  font-size: 25px;
  margin-top: 14px;
}

.quality-card-help {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.quality-wagons {
  display: grid;
  gap: 18px;
}

.quality-wagon-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.quality-wagon-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.quality-wagon-head h2 {
  margin-bottom: 0;
}

.quality-counts {
  display: flex;
  gap: 8px;
}

.quality-counts span {
  background: #eef3f7;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  padding: 7px 9px;
}

.quality-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quality-form-card {
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 16px;
}

.quality-form-card > span {
  font-weight: 700;
}

.quality-form-card small {
  color: var(--muted);
  margin-top: 7px;
}

.quality-form-card strong {
  color: var(--primary);
  font-size: 13px;
  margin-top: auto;
  padding-top: 12px;
}

.quality-empty {
  color: var(--muted);
  padding: 16px 0;
}

.direction-note {
  background: #eaf5f3;
  border: 1px solid #b9d9d4;
  border-radius: 8px;
  color: #214b47;
  padding: 12px 14px;
}

.component-reference-panel {
  margin-top: 18px;
}

.component-reference {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0 20px;
  overflow: hidden;
  padding: 14px;
}

.component-reference img {
  display: block;
  margin: 0 auto;
  max-height: 430px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.component-reference img.form-source-drawing {
  height: auto;
  width: auto;
}

.component-reference-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.component-reference-grid .component-reference {
  height: calc(100% - 36px);
}

.component-reference figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

.spring-nominal-strip {
  align-items: center;
  background: #eef5f3;
  border: 1px solid #c8ddd8;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 16px 0;
  padding: 11px 13px;
}

.spring-nominal-strip strong {
  color: var(--primary-dark);
}

.spring-nominal-strip span {
  color: var(--text);
  font-size: 13px;
}

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

.spring-matrix-panel {
  min-width: 0;
}

.spring-matrix-panel h3 {
  color: var(--primary-dark);
  font-size: 16px;
  margin: 0 0 8px;
}

.spring-matrix {
  table-layout: fixed;
  width: 100%;
}

.spring-matrix th:first-child {
  min-width: 138px;
  text-align: left;
  width: 138px;
}

.spring-matrix td,
.spring-matrix th {
  padding: 7px 6px;
  text-align: center;
  vertical-align: middle;
}

.spring-measure-cell {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(58px, 1fr) minmax(72px, .8fr);
  min-width: 140px;
}

.spring-measure-cell input,
.spring-measure-cell select {
  height: 34px;
  min-width: 0;
  padding: 5px 6px;
  width: 100%;
}

.spring-measure-cell select {
  padding: 3px;
}

.spring-auto-result {
  align-items: center;
  background: #eef3f7;
  border-radius: 4px;
  display: flex;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  font-size: 10px;
  padding: 0 4px;
}

.spring-auto-result.ok {
  background: #dff4e7;
  color: #176437;
}

.spring-auto-result.reject {
  background: #fde3e1;
  color: #a2241d;
}

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

.registry-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.registry-group h2 {
  border-bottom: 1px solid var(--line);
  color: var(--primary-dark);
  padding-bottom: 12px;
}

.registry-fields {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.registry-fields > div {
  border-bottom: 1px solid #edf1f4;
  min-width: 0;
  padding: 10px 8px;
}

.registry-fields dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.registry-fields dd {
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

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

.wagon-photo-section {
  margin-bottom: 18px;
}

.photo-upload-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(210px, 1.2fr) minmax(180px, 1fr) auto auto;
  margin: 14px 0 18px;
}

.photo-upload-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 6px;
  min-width: 0;
}

.photo-upload-form input {
  max-width: 100%;
}

.wagon-photo-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, 72px);
}

.wagon-photo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  height: 72px;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  width: 72px;
}

.wagon-photo-card img {
  display: block;
  font-size: 0;
  height: 72px;
  max-height: 72px;
  max-width: 72px;
  min-height: 72px;
  min-width: 72px;
  object-fit: cover;
  overflow: hidden;
  width: 72px;
}

.inspection-photo-cell {
  min-width: 118px;
}

.inspection-photo-rule {
  margin: 0 0 12px;
  color: #7f1d1d;
  font-weight: 700;
}

.inspection-table tr.inspection-photo-missing > td {
  background: #fff1f2;
  border-top-color: #e11d48;
  border-bottom-color: #e11d48;
}

.inspection-table tr.inspection-photo-missing .inspection-photo-cell {
  box-shadow: inset 0 0 0 2px #e11d48;
}

.inspection-photo-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.inspection-photo-add {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.inspection-photo-actions button {
  min-height: 32px;
  padding: 5px 9px;
}

.inspection-item-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.inspection-item-photo-grid .wagon-photo-card,
.inspection-item-photo-grid .wagon-photo-card img {
  height: 42px;
  min-height: 42px;
  min-width: 42px;
  width: 42px;
}

.inspection-source-notes {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.inspection-source-notes > div {
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.photo-selection-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.photo-selection-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 54px;
  overflow: hidden;
  width: 54px;
}

.photo-selection-item img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.photo-viewer {
  background: #111;
  border: 0;
  border-radius: 8px;
  height: min(88vh, 900px);
  margin: auto;
  max-height: 88vh;
  max-width: 94vw;
  padding: 42px 12px 12px;
  width: min(94vw, 1200px);
}

.photo-viewer::backdrop {
  background: rgba(0, 0, 0, .82);
}

.photo-viewer img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.photo-viewer-close {
  background: #fff;
  border: 0;
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  font-size: 24px;
  height: 32px;
  line-height: 28px;
  position: absolute;
  right: 10px;
  top: 8px;
  width: 32px;
}

.photo-viewer-nav {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 0;
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  display: flex;
  font-size: 34px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 4px;
  position: absolute;
  top: calc(50% - 21px);
  width: 42px;
  z-index: 2;
}

.photo-viewer-prev {
  left: 12px;
}

.photo-viewer-next {
  right: 12px;
}

@media (max-width: 600px) {
  .photo-viewer-nav {
    height: 36px;
    opacity: .82;
    width: 36px;
  }

  .photo-viewer-prev {
    left: 6px;
  }

  .photo-viewer-next {
    right: 6px;
  }
}

.wagon-photo-card span,
.wagon-photo-card small {
  display: none;
}

.download-progress-overlay {
  align-items: center;
  background: rgba(12, 18, 28, .62);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 0;
  padding: 18px;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  transition: opacity .18s ease;
  z-index: 1000;
}

.download-progress-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.download-progress-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(10, 16, 24, .28);
  color: var(--text);
  display: grid;
  gap: 12px;
  max-width: 420px;
  padding: 24px;
  text-align: center;
  width: min(100%, 420px);
}

.download-progress-card h2 {
  font-size: 20px;
  margin: 0;
}

.download-progress-card p,
.download-progress-card small {
  color: var(--muted);
  margin: 0;
}

.download-progress-spinner {
  animation: download-spin .9s linear infinite;
  border: 3px solid #dce4ed;
  border-top-color: var(--primary);
  border-radius: 50%;
  height: 38px;
  justify-self: center;
  width: 38px;
}

.download-progress-bar {
  background: #e9eef4;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.download-progress-bar span {
  background: linear-gradient(90deg, var(--primary), #39a477);
  display: block;
  height: 100%;
  transition: width .28s ease;
  width: 0;
}

.download-progress-percent {
  font-size: 22px;
}

.file-upload-native[type="file"] {
  display: none !important;
}

.file-upload-control {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  vertical-align: middle;
}

.file-upload-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
}

.file-upload-button:hover,
.file-upload-control:focus-within .file-upload-button {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 111, 174, .12);
  color: var(--primary);
}

.file-upload-button svg {
  flex: 0 0 18px;
  display: block;
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.file-upload-button span {
  line-height: 1.1;
}

.file-upload-name {
  color: var(--muted);
  display: inline-block;
  font-size: 12px;
  max-width: min(240px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

@keyframes download-spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.4fr);
  margin-bottom: 18px;
}

.record-photo {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9fb;
  margin-bottom: 14px;
}

.record-photo.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.personnel-avatar {
  align-content: center;
  background: linear-gradient(135deg, #eef7f5, #f6f8fb);
  border-color: #bfd6d2;
  color: #173b36;
  gap: 8px;
  justify-items: center;
  overflow: hidden;
  padding: 16px;
  text-align: center;
}

.personnel-avatar strong {
  align-items: center;
  background: #0f766e;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 38px;
  height: 82px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  width: 82px;
}

.personnel-avatar span {
  color: #49645f;
  display: block;
  font-size: 12px;
  line-height: 1.3;
  max-width: 120px;
}

.sensitive-personnel-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.sensitive-personnel-note span {
  color: #9a3412;
  font-size: 13px;
}

.personnel-legal-panel {
  margin-top: 18px;
}

.personnel-legal-warning {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 4px solid #b86c24;
  background: #fff7ed;
  color: #713f12;
}

.personnel-legal-warning strong {
  font-size: 0.82rem;
}

.personnel-legal-warning span {
  font-size: 0.74rem;
  line-height: 1.45;
}

.personnel-legal-list {
  border-top: 1px solid #dce5e9;
}

.personnel-legal-list article {
  display: grid;
  grid-template-columns: 128px minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #dce5e9;
}

.personnel-legal-code {
  color: #126b68;
  font-size: 0.72rem;
  font-weight: 800;
}

.personnel-legal-list article > div:nth-child(2) strong,
.personnel-legal-list article > div:nth-child(2) small {
  display: block;
}

.personnel-legal-list article > div:nth-child(2) strong {
  color: #173542;
  font-size: 0.82rem;
}

.personnel-legal-list article > div:nth-child(2) small {
  margin-top: 3px;
  color: #6b7f89;
  font-size: 0.7rem;
}

.personnel-legal-list .actions {
  flex-wrap: nowrap;
}

.personnel-legal-list .link-button {
  min-height: 36px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .personnel-legal-list article {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .personnel-legal-code,
  .personnel-legal-list article > div:nth-child(2) {
    grid-column: 1;
  }

  .personnel-legal-list article > .status-badge {
    grid-column: 2;
    grid-row: 1;
  }

  .personnel-legal-list article > .actions {
    grid-column: 1 / -1;
  }
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 9px;
}

.summary-list dt {
  color: var(--muted);
  font-weight: 700;
}

.summary-list dd {
  margin: 0;
}

.warehouse-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.warehouse-head {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 20px;
}

.warehouse-eyebrow {
  color: var(--primary-dark);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.warehouse-tabs {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 8px;
  min-width: 0;
}

.warehouse-tabs a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 9px;
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 46px;
  padding: 7px 9px;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.warehouse-tabs a:hover,
.warehouse-tabs a:focus-visible {
  background: #f3f7fa;
  border-color: #cfdae3;
  box-shadow: 0 8px 18px rgba(15, 42, 68, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.warehouse-tabs a.is-active {
  background: #eef7f5;
  border-color: #b9d8d3;
  color: var(--primary-dark);
}

.warehouse-tabs span,
.warehouse-code {
  align-items: center;
  background: #e7edf3;
  border: 1px solid #d4dde7;
  border-radius: 6px;
  color: #425466;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: center;
  min-height: 28px;
  min-width: 36px;
  padding: 0 7px;
  box-shadow: inset 0 -1px 0 rgba(15, 42, 68, 0.08);
  white-space: nowrap;
}

.warehouse-tabs a.is-active span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.warehouse-tabs strong {
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}

.warehouse-stats {
  margin-bottom: 0;
}

.warehouse-stat-card {
  display: grid;
  gap: 10px;
  min-height: 118px;
}

.warehouse-stat-card strong {
  font-size: 30px;
}

.warehouse-stat-card .warehouse-code {
  justify-self: start;
}

.warehouse-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  min-width: 0;
}

.warehouse-layout > *,
.warehouse-form-grid > *,
.warehouse-tabs > *,
.warehouse-page .panel {
  min-width: 0;
}

.warehouse-page input,
.warehouse-page select,
.warehouse-page textarea {
  min-width: 0;
}

.warehouse-layout.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.warehouse-panel-highlight {
  border-left: 4px solid var(--primary);
}

.warehouse-panel-muted {
  background: #f9fbfc;
}

.warehouse-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.warehouse-form-grid button,
.warehouse-form-grid .link-button {
  align-self: end;
}

.warehouse-search-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1fr) auto auto;
}

.warehouse-search-row label {
  display: grid;
  gap: 6px;
}

.warehouse-material-dialog {
  background: #f7f9fb;
  border: 1px solid #b9c7d5;
  border-radius: 8px;
  color: var(--text);
  max-height: min(92vh, 980px);
  max-width: 1180px;
  overflow: auto;
  padding: 0;
  width: calc(100% - 32px);
}

.warehouse-material-dialog::backdrop {
  background: rgba(13, 28, 42, 0.58);
}

.warehouse-material-dialog-head {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.warehouse-material-dialog-head div {
  display: grid;
  gap: 3px;
}

.warehouse-material-dialog-head small {
  color: #496273;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.warehouse-material-dialog-head h2 {
  font-size: 21px;
  margin: 0;
}

.warehouse-material-dialog-head > button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: #415463;
  display: inline-flex;
  font-size: 28px;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}

.warehouse-material-card-form {
  background: #fff;
  margin: 18px;
  padding: 18px;
}

.warehouse-material-card-form > .wide {
  grid-column: 1 / -1;
}

.warehouse-material-card-form > label,
.warehouse-material-card-form > section,
.material-type-picker-head > * {
  min-width: 0;
}

.material-type-picker {
  background: #f4f7f8;
  border: 1px solid #c9d5df;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.material-type-picker-head {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, .45fr) minmax(260px, 1fr);
}

.material-type-picker-head > div {
  display: grid;
  gap: 4px;
}

.material-type-picker-head span {
  color: #496273;
  font-size: 13px;
}

.material-type-picker-head input {
  background: #fff;
}

.material-type-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 290px;
  overflow: auto;
  padding-right: 3px;
}

.material-type-option {
  align-items: start;
  background: #fff;
  border: 1px solid #c9d5df;
  color: #172b3a;
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 62px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.material-type-option[hidden] {
  display: none !important;
}

.material-type-option:hover,
.material-type-option:focus-visible {
  border-color: #2a6f8f;
  box-shadow: 0 0 0 2px rgba(42, 111, 143, 0.12);
}

.material-type-option.is-selected {
  background: #eaf6f1;
  border-color: #18755f;
  box-shadow: inset 4px 0 0 #18755f;
}

.material-type-option small {
  color: #5d6e7b;
  font-size: 11px;
}

.material-type-empty {
  color: #7a3f12;
  margin: 0;
}

.material-type-add-toggle {
  background: #fff8e7;
  border: 1px dashed #b78025;
  color: #72500f;
  justify-self: stretch;
}

.warehouse-new-type-panel {
  background: #fff8e7;
  border: 1px solid #d7b267;
  border-radius: 6px;
  margin: 0 18px 18px;
  padding: 16px;
}

.warehouse-new-type-panel > div {
  margin-bottom: 12px;
}

.warehouse-new-type-panel p {
  color: #6c5b38;
  margin: 4px 0 0;
}

.warehouse-new-type-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, .85fr) minmax(260px, 1.35fr) minmax(170px, .75fr) auto;
}

.warehouse-new-type-form > label,
.warehouse-new-type-form > label > * {
  min-width: 0;
}

.warehouse-new-type-form input,
.warehouse-new-type-form select {
  background: #fff;
  display: block;
  opacity: 1;
  visibility: visible;
  width: 100%;
}

.warehouse-new-type-form .errorlist,
.warehouse-material-card-form .errorlist {
  color: #9b2c20;
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 18px;
}

.warehouse-new-type-form > button {
  min-height: 40px;
  white-space: nowrap;
}

.warehouse-material-dialog-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .warehouse-material-card-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-type-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-new-type-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-new-type-form > button {
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .warehouse-search-row,
  .material-type-picker-head,
  .warehouse-material-card-form,
  .warehouse-new-type-form {
    grid-template-columns: 1fr;
  }

  .warehouse-material-dialog {
    max-height: 96vh;
    width: calc(100% - 16px);
  }

  .warehouse-material-card-form {
    margin: 10px;
    padding: 12px;
  }

  .material-type-options {
    grid-template-columns: 1fr;
    max-height: 260px;
  }

  .warehouse-new-type-panel {
    margin: 0 10px 10px;
  }

  .warehouse-new-type-form > button {
    justify-self: stretch;
    width: 100%;
  }

  .warehouse-material-dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .warehouse-material-dialog-actions button {
    width: 100%;
  }
}

.warehouse-flow {
  display: grid;
  gap: 10px;
}

.warehouse-flow-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.warehouse-flow-item strong {
  color: var(--text);
}

.warehouse-flow-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.warehouse-table th {
  white-space: nowrap;
}

.warehouse-table td {
  font-size: 14px;
}

.warehouse-table tbody tr:hover td {
  background: #f8fbfc;
}

.warehouse-clickable-row {
  cursor: pointer;
}

.warehouse-clickable-row:focus-visible td {
  outline: 2px solid #0f766e;
  outline-offset: -2px;
}

.warehouse-number {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.warehouse-pill {
  background: #eef3f7;
  border: 1px solid #d6e0ea;
  border-radius: 999px;
  color: #425466;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
  box-shadow: inset 0 -1px 0 rgba(15, 42, 68, 0.08);
  white-space: nowrap;
}

.warehouse-pill.good {
  background: #ecfdf3;
  border-color: #b7e3c7;
  color: #166534;
}

.warehouse-pill.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.warehouse-pill.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.measurement-tool-usage {
  background: #f8fbfc;
  border: 1px dashed #bfd0df;
  border-radius: 8px;
  padding: 14px;
}

.measurement-tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.measurement-tool-chips span {
  background: #fff;
  border: 1px solid #cbd8e5;
  border-radius: 999px;
  color: #25435f;
  font-size: 12px;
  padding: 5px 9px;
}

.measurement-tool-check-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  min-width: 0;
}

.measurement-tool-check {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd8e5;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 54px;
  padding: 8px 10px;
  position: relative;
}

.measurement-tool-check:hover,
.measurement-tool-check:has(input:focus-visible) {
  border-color: #0f766e;
}

.measurement-tool-check.is-selected,
.measurement-tool-check:has(input:checked) {
  background: #effaf6;
  border-color: #4aa784;
}

.measurement-tool-check > input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.measurement-tool-check-mark {
  align-items: center;
  background: #fff;
  border: 1px solid #9fb2c4;
  border-radius: 4px;
  color: transparent;
  display: flex;
  font-size: 18px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.measurement-tool-check input:checked + .measurement-tool-check-mark {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.measurement-tool-check strong,
.measurement-tool-check small {
  display: block;
  overflow-wrap: anywhere;
}

.measurement-tool-check small {
  color: #5f7182;
  margin-top: 2px;
}

.bogie-tool-groups {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bogie-tool-groups h3 {
  font-size: 14px;
  margin: 0 0 7px;
}

.bearing-work-checklist,
.wheel-bearing-card,
.lathe-measurement-card {
  border: 1px solid #cbd8e5;
  border-radius: 6px;
}

.bearing-work-checklist {
  overflow: hidden;
}

.bearing-work-checklist > h3 {
  background: #edf4f5;
  font-size: 15px;
  margin: 0;
  padding: 10px 12px;
}

.bearing-check-row {
  align-items: center;
  border-top: 1px solid #d8e1e8;
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(180px, 1.3fr) 76px minmax(220px, 1fr);
  padding: 8px 10px;
}

.bearing-check-sequence {
  color: #5f7182;
  font-weight: 700;
  text-align: center;
}

.bearing-check-row textarea,
.wheel-condition-row textarea,
.wheel-final-checks textarea {
  min-height: 42px;
  resize: vertical;
}

.bearing-check-row textarea:disabled,
.wheel-condition-row textarea:disabled,
.wheel-final-checks textarea:disabled {
  background: #f3f6f8;
  color: #728191;
}

.bearing-check-row textarea.is-required,
.wheel-condition-row textarea.is-required,
.wheel-final-checks textarea.is-required {
  background: #fffdf2;
  border-color: #c78215;
}

.wheel-bearing-grid,
.lathe-measurement-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lathe-measurement-cards--paired {
  align-items: stretch;
  grid-auto-flow: row;
}

.lathe-stage-heading {
  background: #173f3d;
  border-bottom: 4px solid #2e8a80;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  padding: 11px 14px;
  text-align: center;
}

.lathe-stage-heading--before {
  grid-column: 1;
  grid-row: 1;
}

.lathe-stage-heading--after {
  grid-column: 2;
  grid-row: 1;
}

.lathe-measurement-card--before_lathe {
  border-left: 4px solid #39766f;
  grid-column: 1;
}

.lathe-measurement-card--after_lathe {
  border-left: 4px solid #b45b28;
  grid-column: 2;
}

.lathe-mobile-stage-divider {
  display: none;
}

.wheel-bearing-card,
.lathe-measurement-card {
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.wheel-bearing-card > header,
.lathe-measurement-card > header {
  align-items: center;
  background: #edf4f5;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.wheel-bearing-card > header span,
.wheel-bearing-card > header strong,
.lathe-measurement-card > header span,
.lathe-measurement-card > header strong {
  display: block;
}

.wheel-bearing-card > header small,
.lathe-measurement-card > header small {
  color: #52687a;
  text-align: right;
}

.wheel-condition-list {
  display: grid;
}

.wheel-condition-row {
  align-items: center;
  border-top: 1px solid #e1e7ec;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, 0.55fr) 76px minmax(150px, 1fr);
  padding: 8px 10px;
}

.wheel-bearing-measurements {
  border-top: 1px solid #cbd8e5;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
}

.wheel-bearing-measurements label,
.lathe-side-measurements label {
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}

.wheel-final-checks {
  border-top: 1px solid #cbd8e5;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
}

.wheel-final-checks > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.wheel-final-checks textarea {
  grid-column: 1 / -1;
}

.lathe-side-measurements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lathe-side-measurements > section {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.lathe-side-measurements > section + section {
  border-left: 1px solid #d8e1e8;
}

.ulm-report-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ulm-report-meta label,
.ulm-axle-card > header label,
.ulm-component-row label {
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  min-width: 0;
}

.ulm-checklist,
.ulm-axle-card,
.ulm-calibration {
  border: 1px solid #cbd8e5;
  border-radius: 6px;
  overflow: hidden;
}

.ulm-checklist > h3,
.ulm-calibration > summary {
  background: #edf4f5;
  font-size: 15px;
  margin: 0;
  padding: 10px 12px;
}

.ulm-calibration > summary {
  cursor: pointer;
  font-weight: 800;
}

.ulm-check-row {
  align-items: center;
  border-top: 1px solid #d8e1e8;
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(180px, 1fr) 76px minmax(220px, 1fr);
  padding: 8px 10px;
}

.ulm-check-row > span:first-child {
  color: #5f7182;
  font-weight: 800;
  text-align: center;
}

.ulm-result-groups {
  display: grid;
  gap: 12px;
}

.ulm-axle-card {
  background: #fff;
}

.ulm-axle-card > header {
  align-items: end;
  background: #edf4f5;
  display: grid;
  gap: 10px;
  grid-template-columns: 90px minmax(180px, 1fr) minmax(150px, 0.65fr);
  padding: 10px 12px;
}

.ulm-axle-card > header span,
.ulm-axle-card > header strong {
  display: block;
}

.ulm-component-head,
.ulm-component-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(110px, 0.7fr) 90px 80px 64px 64px 110px minmax(190px, 1.25fr);
  padding: 8px 10px;
}

.ulm-component-head {
  background: #f7f9fb;
  border-bottom: 1px solid #d8e1e8;
  color: #52687a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ulm-component-row + .ulm-component-row {
  border-top: 1px solid #e1e7ec;
}

.ulm-component-row label > span {
  display: none;
}

.ulm-component-row input,
.ulm-component-row select,
.ulm-component-row textarea {
  min-width: 0;
  width: 100%;
}

.ulm-component-row textarea {
  min-height: 42px;
  resize: vertical;
}

@media (max-width: 760px) {
  .bogie-tool-groups,
  .wheel-bearing-grid,
  .lathe-measurement-cards,
  .ulm-report-meta {
    grid-template-columns: 1fr;
  }

  .bearing-check-row {
    grid-template-columns: 28px minmax(0, 1fr) 76px;
  }

  .bearing-check-row textarea {
    grid-column: 2 / -1;
  }

  .ulm-check-row {
    grid-template-columns: 28px minmax(0, 1fr) 76px;
  }

  .ulm-check-row textarea {
    grid-column: 2 / -1;
  }

  .ulm-axle-card > header {
    grid-template-columns: 1fr;
  }

  .ulm-component-head {
    display: none;
  }

  .ulm-component-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .ulm-component-row > strong,
  .ulm-component-row label:last-child {
    grid-column: 1 / -1;
  }

  .ulm-component-row label > span {
    display: block;
  }

  .wheel-condition-row {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .wheel-condition-row textarea {
    grid-column: 1 / -1;
  }

  .wheel-bearing-card > header,
  .lathe-measurement-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .wheel-bearing-card > header small,
  .lathe-measurement-card > header small {
    text-align: left;
  }

  .lathe-measurement-cards--paired > .lathe-stage-heading--before {
    display: block;
    grid-column: 1;
    grid-row: auto;
  }

  .lathe-measurement-cards--paired > .lathe-stage-heading--after {
    display: none;
  }

  .lathe-measurement-cards--paired > .lathe-measurement-card {
    grid-column: 1;
    grid-row: auto !important;
  }

  .lathe-mobile-stage-divider {
    background: #edf4f3;
    border-bottom: 2px solid #173f3d;
    border-top: 6px solid #173f3d;
    display: block;
    font-size: 16px;
    font-weight: 900;
    grid-column: 1;
    margin-top: 10px;
    padding: 13px 12px 11px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .measurement-tool-check-grid,
  .wheel-bearing-measurements,
  .wheel-final-checks,
  .lathe-side-measurements {
    grid-template-columns: 1fr;
  }

  .lathe-side-measurements > section + section {
    border-left: 0;
    border-top: 1px solid #d8e1e8;
  }

  .wheel-final-checks textarea {
    grid-column: auto;
  }
}

.warehouse-inline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 260px;
}

.warehouse-inline-actions .inline-form {
  flex-wrap: nowrap;
}

.warehouse-inline-actions select {
  min-width: 180px;
}

.warehouse-fulfillment-form {
  align-items: end;
  display: grid !important;
  gap: 7px;
  grid-template-columns: minmax(250px, 1fr) minmax(170px, auto) auto auto;
  width: min(720px, 100%);
}

.warehouse-fulfillment-form label {
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

.warehouse-fulfillment-form select {
  min-width: 0;
  width: 100%;
}

.warehouse-head-actions {
  align-items: center;
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-location-qr-preview {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.warehouse-location-qr-preview > img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 92px;
  padding: 4px;
  width: 92px;
}

.warehouse-location-qr-preview > div {
  display: grid;
  gap: 4px;
}

.warehouse-location-qr-preview span {
  color: var(--muted);
  font-size: 12px;
}

.warehouse-location-qr-preview .warehouse-head-actions {
  margin-top: 4px;
}

.warehouse-expected-panel {
  border-left: 4px solid #176a63;
}

.equipment-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.equipment-head {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 20px;
}

.equipment-head h1,
.equipment-section-head h2 {
  margin-bottom: 4px;
}

.equipment-head p,
.equipment-section-head p {
  color: var(--muted);
  margin: 0;
}

.equipment-eyebrow {
  color: #176a63;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.equipment-head-actions {
  flex: 0 0 auto;
}

.equipment-tabs {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px;
}

.equipment-tabs a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 3px 10px;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 58px;
  padding: 8px 10px;
}

.equipment-tabs a:hover,
.equipment-tabs a:focus-visible {
  background: #f5f8fa;
  border-color: #ced9e2;
  outline: none;
}

.equipment-tabs a.is-active {
  background: #eef7f5;
  border-color: #acd2cc;
}

.equipment-tabs span,
.equipment-class-code {
  align-items: center;
  background: #e8eef3;
  border: 1px solid #d3dde5;
  border-radius: 6px;
  color: #405468;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  grid-row: 1 / 3;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.equipment-tabs a.is-active span {
  background: #176a63;
  border-color: #176a63;
  color: #fff;
}

.equipment-tabs strong,
.equipment-tabs small {
  overflow-wrap: anywhere;
}

.equipment-tabs small {
  color: var(--muted);
  font-size: 11px;
}

.equipment-class-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.equipment-class-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 104px;
  padding: 14px;
  position: relative;
}

.equipment-class-card::before {
  background: #68798a;
  content: "";
  height: 4px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}

.equipment-class-card.category-machine::before { background: #176a63; }
.equipment-class-card.category-equipment::before { background: #2b6cb0; }
.equipment-class-card.category-hand_tool::before { background: #a15c12; }
.equipment-class-card.category-measurement::before { background: #a43c45; }

.equipment-class-card:hover,
.equipment-class-card:focus-visible,
.equipment-class-card.is-active {
  border-color: #90a4b5;
  box-shadow: 0 7px 18px rgba(15, 42, 68, .09);
  outline: none;
}

.equipment-class-card.is-active {
  background: #f8fbfc;
}

.equipment-class-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.equipment-class-copy strong {
  font-size: 16px;
}

.equipment-class-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.equipment-class-card em {
  color: #22384b;
  font-size: 28px;
  font-style: normal;
  font-weight: 800;
}

.equipment-section-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 4px 2px 12px;
}

.equipment-section-head > div {
  align-items: center;
  display: flex;
  gap: 12px;
}

.equipment-section-head > div > span {
  align-items: center;
  background: #22384b;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 42px;
}

.equipment-section-head > a {
  color: #176a63;
  font-size: 13px;
  font-weight: 800;
}

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

.equipment-form-layout > *,
.equipment-form-grid > *,
.equipment-page .panel {
  min-width: 0;
}

.equipment-form-panel:first-child {
  border-left: 4px solid #176a63;
}

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

.equipment-form-grid button {
  align-self: end;
}

.equipment-code-preview {
  color: #176a63;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-top: 5px;
}

.equipment-list-panel {
  overflow: hidden;
}

.equipment-active-panel {
  border-left: 4px solid #2b6cb0;
  overflow: hidden;
}

.equipment-table-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.equipment-history {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.equipment-history > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 16px;
}

.equipment-history[open] > summary {
  background: #f7fafb;
  border-bottom: 1px solid var(--line);
}

.equipment-history > summary strong {
  color: var(--muted);
  font-size: 12px;
}

.equipment-history-subtitle {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  margin: 0;
  padding: 14px 16px 10px;
}

.equipment-row-menu {
  min-width: 210px;
}

.equipment-row-menu > summary {
  background: #fff;
  border: 1px solid #bcc9d3;
  border-radius: 6px;
  color: #22384b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  text-align: center;
}

.equipment-row-menu[open] > summary {
  background: #eef7f5;
  border-color: #8fbfb8;
}

.equipment-row-menu-body {
  background: #f8fafb;
  border: 1px solid #cbd6df;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  margin-top: 7px;
  min-width: 270px;
  padding: 10px;
}

.equipment-fault-form {
  display: grid;
  gap: 8px;
}

.equipment-fault-form label {
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

.equipment-fault-form textarea {
  min-height: 64px;
}

.equipment-row-menu-body form:last-child,
.equipment-row-menu-body form:last-child button {
  width: 100%;
}

.equipment-return-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 390px;
}

.equipment-return-actions input,
.equipment-return-actions select {
  flex: 1 1 130px;
  min-width: 0;
}

.equipment-purchase-actions {
  align-items: stretch;
  display: grid;
  gap: 6px;
  min-width: 210px;
}

.equipment-alert-list {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
}

.equipment-alert-list a {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #7c3b0b;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 10px;
}

.equipment-alert-list span {
  font-size: 12px;
}

@media (max-width: 1050px) {
  .equipment-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .equipment-head,
  .equipment-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .equipment-head-actions,
  .equipment-tabs,
  .equipment-class-grid,
  .equipment-form-layout,
  .equipment-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .equipment-tabs a {
    min-height: 52px;
  }

  .equipment-class-card {
    min-height: 88px;
  }

  .equipment-section-head {
    gap: 10px;
  }

  .equipment-section-head > a {
    padding-left: 54px;
  }

  .equipment-history > summary {
    gap: 10px;
  }

  .equipment-row-menu,
  .equipment-row-menu-body,
  .equipment-return-actions {
    min-width: 0;
    width: 100%;
  }

  .equipment-return-actions {
    align-items: stretch;
    display: grid;
  }
}

.procurement-page .warehouse-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.procurement-stack {
  display: grid;
  gap: 14px;
}

.procurement-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.procurement-section summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(180px, .5fr) minmax(0, 1fr) 20px;
  list-style: none;
  min-height: 64px;
  padding: 12px 16px;
}

.procurement-section summary::-webkit-details-marker {
  display: none;
}

.procurement-section summary::after {
  color: var(--primary-dark);
  content: "+";
  font-size: 22px;
  font-weight: 800;
  text-align: right;
}

.procurement-section[open] summary {
  background: #f8fbfc;
  border-bottom: 1px solid var(--line);
}

.procurement-section[open] summary::after {
  content: "-";
}

.procurement-section summary:hover,
.procurement-section summary:focus-visible {
  background: #f3f7fa;
  outline: none;
}

.procurement-summary-title {
  color: var(--text);
  font-weight: 800;
}

.procurement-summary-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.procurement-section-body {
  padding: 16px;
}

.procurement-two-column {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.procurement-form-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.procurement-rule-panel {
  background: #f9fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

@media (max-width: 900px) {
  .warehouse-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .warehouse-layout,
  .warehouse-layout.equal,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-form-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-inline-actions,
  .warehouse-inline-actions .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .warehouse-inline-actions select {
    min-width: 0;
  }

  .warehouse-head-actions {
    align-self: stretch;
    width: 100%;
  }

  .warehouse-head-actions .link-button {
    justify-content: center;
    width: 100%;
  }

  .warehouse-location-qr-preview {
    align-items: flex-start;
    width: 100%;
  }

  .warehouse-location-qr-preview > div {
    flex: 1;
  }

  .procurement-section summary {
    grid-template-columns: 44px minmax(0, 1fr) 20px;
  }

  .procurement-summary-meta {
    grid-column: 2 / 4;
  }

  .procurement-two-column,
  .procurement-form-wide {
    grid-template-columns: 1fr;
  }

  .summary-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.wagon-photo-card span {
  font-weight: 700;
}

.wagon-photo-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .dashboard-hero,
  .dashboard-shell,
  .split,
  .calendar-shell,
  .calendar-dialog-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 12px;
    padding: 0 14px;
  }

  .topbar-icon-button strong {
    display: none;
  }

  .topbar-popover-panel {
    position: fixed;
    right: 12px;
    top: 70px;
  }

  .calendar-notifications {
    position: static;
  }

  .delegation-leave-context {
    grid-template-columns: 1fr;
  }

  .delegation-leave-context > div {
    border-bottom: 1px solid #cfe2df;
    border-right: 0;
  }

  .delegation-leave-context > div:last-child {
    border-bottom: 0;
  }

  .calendar-day {
    min-height: 92px;
    padding: 7px;
  }

  .calendar-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero {
    padding: 18px;
  }

  .dashboard-hero-main {
    min-height: 0;
  }

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

  .dashboard-side-panel {
    position: static;
  }

  .quality-shortcuts,
  .quality-form-grid {
    grid-template-columns: 1fr;
  }

  .quality-wagon-head {
    gap: 14px;
    flex-direction: column;
  }

  .registry-groups,
  .registry-fields,
  .wagon-photo-columns,
  .photo-upload-form {
    grid-template-columns: 1fr;
  }

  .spring-table-grid {
    grid-template-columns: 1fr;
  }

  .spring-matrix {
    min-width: 600px;
  }

  .expiry-alert {
    grid-template-columns: 1fr;
  }

  .expiry-alert em {
    text-align: left;
  }
}
.table-search { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.table-search input { min-width: 220px; margin: 0; }
.org-chart { display: grid; gap: 18px; }
.org-level { position: relative; padding: 20px 0 0 46px; border-top: 1px solid #cbd5e1; }
.org-level::before { content: ""; position: absolute; left: 19px; top: 0; bottom: -18px; border-left: 1px solid #cbd5e1; }
.org-level:last-child::before { bottom: 50%; }
.org-level-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.org-level-title > span { position: absolute; left: 0; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #0f766e; background: #fff; color: #0f766e; font-weight: 800; }
.org-level-title h2 { margin: 0; font-size: 18px; }
.org-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.org-person { display: grid; grid-template-columns: 64px 1fr; align-items: center; min-height: 84px; border: 1px solid #d7dee8; border-radius: 6px; padding: 10px; background: #fff; color: inherit; text-decoration: none; }
.org-person:hover { border-color: #0f766e; box-shadow: 0 4px 14px rgba(15, 118, 110, .09); }
.org-photo { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #e2e8f0; color: #334155; font-size: 18px; }
.org-photo img { width: 100%; height: 100%; object-fit: cover; }
.org-person-copy { min-width: 0; display: grid; gap: 3px; }
.org-person-copy strong, .org-person-copy em, .org-person-copy small { overflow-wrap: anywhere; }
.org-person-copy em { color: #0f766e; font-style: normal; font-weight: 700; }
.org-person-copy small { color: #64748b; line-height: 1.35; }
@media (max-width: 720px) {
  .panel-title-row { align-items: stretch; }
  .table-search { width: 100%; }
  .table-search input { min-width: 0; width: 100%; }
  .org-level { padding-left: 0; padding-top: 56px; }
  .org-level::before { display: none; }
  .org-level-title > span { top: 10px; left: 0; }
}
.organization-editor-form {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(190px, 1fr) minmax(220px, 1.2fr) minmax(180px, 1fr) 120px;
  gap: 12px;
  align-items: end;
}
.organization-editor-form label { min-width: 0; }
.organization-editor-form select,
.organization-editor-form input { width: 100%; min-width: 0; }
.organization-editor-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.organization-editor-actions .danger-text { color: #b42318; border-color: #f0b4ae; }
.organization-editor-actions button:disabled { opacity: .45; cursor: not-allowed; }
.organization-tree { margin-top: 28px; }
.organization-root-wrap { position: relative; display: grid; justify-items: center; gap: 12px; padding-bottom: 42px; }
.organization-root-wrap::after { content: ""; position: absolute; left: 50%; bottom: 0; height: 34px; border-left: 2px solid #9aa7b8; }
.organization-root-label { display: flex; align-items: center; gap: 10px; }
.organization-root-label span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #123f3b; color: #fff; font-weight: 800; }
.organization-root-label strong { font-size: 22px; }
.organization-root-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; gap: 10px; width: min(100%, 720px); }
.organization-function-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-top: 22px; }
.organization-function-grid::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 0; border-top: 2px solid #9aa7b8; }
.organization-function { --org-accent: #16756b; position: relative; min-width: 0; padding-top: 14px; border-top: 4px solid var(--org-accent); }
.organization-function:nth-child(2) { --org-accent: #2463a7; }
.organization-function:nth-child(3) { --org-accent: #8a4b74; }
.organization-function:nth-child(4) { --org-accent: #a25b13; }
.organization-function::before { content: ""; position: absolute; left: 50%; top: -38px; height: 34px; border-left: 2px solid #9aa7b8; }
.organization-function-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 70px; padding-bottom: 12px; border-bottom: 1px solid #d5dde7; }
.organization-function-head > span { display: grid; place-items: center; width: 36px; height: 36px; background: var(--org-accent); color: #fff; font-weight: 800; }
.organization-function-head h2 { margin: 0; font-size: 16px; line-height: 1.25; }
.organization-function-head small { display: block; margin-top: 4px; color: #64748b; line-height: 1.3; }
.organization-function-head > b { padding: 4px 7px; border: 1px solid currentColor; border-radius: 4px; font-size: 11px; }
.organization-function-head > b.is-ready { color: #167047; background: #edf9f2; }
.organization-function-head > b.is-missing { color: #a23b31; background: #fff3f1; }
.organization-node-list,
.organization-node-list ul { margin: 0; padding: 0; list-style: none; }
.organization-node-list { padding-top: 14px; }
.organization-node-list li { position: relative; min-width: 0; }
.organization-node-list li + li { margin-top: 10px; }
.organization-node-list li > ul { position: relative; margin: 10px 0 0 22px; padding-left: 18px; border-left: 1px solid #b8c4d2; }
.organization-node-list li > ul > li::before { content: ""; position: absolute; left: -18px; top: 38px; width: 18px; border-top: 1px solid #b8c4d2; }
.organization-person-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 78px; border: 1px solid #d5dde7; border-radius: 6px; background: #fff; }
.organization-person-card.is-manager { border-color: var(--org-accent, #16756b); box-shadow: inset 4px 0 0 var(--org-accent, #16756b); }
.organization-person-card > a { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; padding: 9px; color: inherit; text-decoration: none; }
.organization-person-card > button { align-self: stretch; width: 62px; padding: 0 6px; border: 0; border-left: 1px solid #e0e6ed; border-radius: 0; background: transparent; color: #425466; font-size: 11px; font-weight: 700; }
.organization-person-card > button:hover { background: #eef5f4; }
.organization-person-photo { display: grid; place-items: center; width: 50px; height: 50px; overflow: hidden; border-radius: 50%; background: #e7edf3; color: #334155; }
.organization-person-photo img { width: 100%; height: 100%; object-fit: cover; }
.organization-person-copy { display: grid; gap: 2px; min-width: 0; }
.organization-person-copy strong,
.organization-person-copy em,
.organization-person-copy small { overflow-wrap: anywhere; }
.organization-person-copy em { color: var(--org-accent, #12665f); font-size: 12px; font-style: normal; font-weight: 700; }
.organization-person-copy small { color: #68768a; font-size: 11px; line-height: 1.25; }
.organization-person-copy .organization-subcontractor { color: #91510e; font-weight: 700; }
.organization-missing,
.organization-empty-branch { padding: 14px; border: 1px dashed #c5cfdb; color: #68768a; text-align: center; }
.organization-unassigned-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.organization-unassigned-list button { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; border: 1px solid #d5dde7; border-radius: 5px; background: #fff; color: #172235; text-align: left; }
.organization-unassigned-list button:hover { border-color: #16756b; background: #f3f9f8; }
.organization-unassigned-list span { color: #68768a; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 1250px) {
  .organization-editor-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .organization-function-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .organization-function-grid::before,
  .organization-function::before { display: none; }
}
@media (max-width: 700px) {
  .organization-editor-form,
  .organization-function-grid { grid-template-columns: 1fr; }
  .organization-root-wrap { padding-bottom: 18px; }
  .organization-root-wrap::after { display: none; }
  .organization-function-head { grid-template-columns: 38px minmax(0, 1fr); }
  .organization-function-head > b { grid-column: 2; justify-self: start; }
  .organization-node-list li > ul { margin-left: 12px; padding-left: 12px; }
  .organization-node-list li > ul > li::before { left: -12px; width: 12px; }
}
.avbk-form-sheet { max-width: 1100px; margin: 0 auto; background: #fff; border: 1px solid #111827; color: #111827; }
.avbk-form-head { display: grid; grid-template-columns: 170px 1fr 260px; min-height: 120px; border-bottom: 1px solid #111827; }
.avbk-form-head > * { padding: 12px; border-right: 1px solid #111827; }
.avbk-form-head > *:last-child { border-right: 0; }
.avbk-logo { display: grid; place-items: center; }
.avbk-logo img { max-width: 140px; max-height: 86px; object-fit: contain; }
.avbk-form-head h1 { margin: 8px 0 0; text-align: center; font-size: 17px; line-height: 1.25; }
.avbk-form-head strong { display: block; text-align: center; }
.avbk-form-head dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; }
.avbk-form-head dt, .avbk-form-head dd { margin: 0; padding: 6px; border-bottom: 1px solid #111827; font-size: 12px; }
.avbk-form-head dt { font-weight: 700; }
.avbk-identity { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #111827; }
.avbk-identity > * { min-height: 40px; padding: 9px 12px; border-right: 1px solid #111827; border-bottom: 1px solid #111827; }
.avbk-identity input { display: inline-block; width: auto; margin-left: 8px; }
.avbk-drawing { display: grid; place-items: center; min-height: 350px; padding: 14px; border-bottom: 1px solid #111827; }
.avbk-drawing img { width: min(100%, 650px); max-height: 390px; object-fit: contain; }
.avbk-drawing.two-axle-reference-crop { display: block; height: 430px; min-height: 430px; padding: 0; overflow: hidden; text-align: center; }
.avbk-drawing.two-axle-reference-crop img { width: min(100%, 650px); max-height: none; transform: translateY(-45px); }
.avbk-rule { margin: 0; padding: 8px 12px; border-bottom: 1px solid #111827; font-weight: 700; text-align: center; }
.avbk-measure-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.avbk-measure-grid label { display: grid; grid-template-columns: 70px 1fr 1fr; align-items: center; gap: 6px; padding: 5px 8px; border-right: 1px solid #111827; border-bottom: 1px solid #111827; }
.avbk-measure-grid input { margin: 0; min-width: 0; padding: 7px; }
.avbk-bottom { display: grid; grid-template-columns: 1fr 1fr; }
.avbk-bottom > div { padding: 12px; border-right: 1px solid #111827; }
.avbk-bottom textarea { width: 100%; }
.tool-choice { display: block; padding: 4px 0; }
.tool-choice input { width: auto; margin-right: 6px; }
.avbk-signatures { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #111827; }
.avbk-signatures > div { min-height: 70px; padding: 12px; border-right: 1px solid #111827; }
.avbk-signatures span { display: block; margin-top: 7px; }
@media (max-width: 800px) {
  .avbk-form-head { grid-template-columns: 1fr; }
  .avbk-form-head > * { border-right: 0; border-bottom: 1px solid #111827; }
  .avbk-measure-grid { grid-template-columns: 1fr; }
  .avbk-bottom, .avbk-signatures { grid-template-columns: 1fr; }
}
@media print {
  .no-print, .app-header, .app-drawer, .toast-stack { display: none !important; }
  .app-main { padding: 0 !important; }
  .avbk-form-sheet { max-width: none; border: 0; }
}

/* Shared phone layout: application tables become labelled records instead of
   forcing the whole page into horizontal scrolling. Print documents keep their
   fixed page geometry through the print rules above. */
@media screen and (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body,
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .page {
    max-width: 100%;
    padding: 14px;
    width: 100%;
  }

  .page > *,
  .panel > *,
  form > *,
  fieldset > *,
  .split > *,
  .form-grid > * {
    min-width: 0;
  }

  img,
  video,
  svg,
  canvas {
    max-width: 100%;
  }

  h1 {
    font-size: 24px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  .page-head,
  .panel-title-row,
  .component-form-intro,
  .warehouse-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-head {
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-head > .primary,
  .page-head > .secondary,
  .page-head > .link-button,
  .page-head .page-actions,
  .page-actions,
  .button-row {
    width: 100%;
  }

  .page-actions,
  .button-row {
    justify-content: stretch;
  }

  .page-actions > *,
  .button-row > * {
    flex: 1 1 140px;
    justify-content: center;
  }

  .panel,
  .auth-panel,
  .module-section,
  .procurement-section-body {
    max-width: 100%;
    padding: 14px;
  }

  .company-module-picker > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .company-module-picker label {
    font-size: 15px;
    min-height: 48px;
  }

  .panel,
  .module-section,
  .procurement-section,
  details,
  dialog {
    overflow-wrap: anywhere;
  }

  .split,
  .split.three,
  .form-grid,
  .evsaf-editor-grid,
  .calendar-shell,
  .dashboard-shell,
  .dashboard-hero,
  .dashboard-records,
  .warehouse-layout,
  .warehouse-layout.equal,
  .warehouse-form-grid,
  .procurement-two-column,
  .procurement-form-wide,
  .quality-form-grid,
  .marker-dialog-fields,
  .focused-repair-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats,
  .status-grid,
  .module-grid,
  .workshop-module-grid,
  .annual-form-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .inline-form,
  .actions,
  .table-actions,
  .warehouse-inline-actions,
  .focused-repair-actions,
  .focused-repair-link-list {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .inline-form > *,
  .actions > *,
  .table-actions > *,
  .warehouse-inline-actions > * {
    flex: 1 1 120px;
    min-width: 0;
  }

  .inline-form select,
  .warehouse-inline-actions select {
    min-width: 0;
  }

  button,
  .link-button,
  .inline-action {
    max-width: 100%;
    min-width: 0;
    text-align: center;
    white-space: normal;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    min-width: 0;
  }

  .details {
    grid-template-columns: minmax(0, 1fr);
  }

  .details dt {
    font-size: 12px;
    font-weight: 800;
  }

  .details dd + dt {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 10px;
  }

  .table-wrap,
  .annual-document-sheet {
    max-width: 100%;
    overflow-x: visible;
    width: 100%;
  }

  table.mobile-card-table,
  table.mobile-card-table tbody {
    display: block;
    min-width: 0 !important;
    width: 100%;
  }

  table.mobile-card-table thead {
    display: none;
  }

  table.mobile-card-table tbody {
    display: grid;
    gap: 10px;
  }

  table.mobile-card-table tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  table.mobile-card-table tbody tr:hover td {
    background: transparent;
  }

  table.mobile-card-table tbody td,
  table.mobile-card-table tbody th {
    align-items: start;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #e7ebef;
    display: grid;
    font-size: 14px;
    gap: 10px;
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
    min-width: 0 !important;
    padding: 9px 10px;
    text-align: left;
    white-space: normal;
    width: 100%;
  }

  table.mobile-card-table tbody td:last-child,
  table.mobile-card-table tbody th:last-child {
    border-bottom: 0;
  }

  table.mobile-card-table tbody td::before,
  table.mobile-card-table tbody th::before {
    color: var(--muted);
    content: attr(data-mobile-label);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-transform: uppercase;
  }

  table.mobile-card-table tbody td[data-mobile-label=""],
  table.mobile-card-table tbody td[colspan] {
    display: block;
  }

  table.mobile-card-table tbody td[data-mobile-label=""]::before,
  table.mobile-card-table tbody td[colspan]::before {
    content: none;
  }

  table.mobile-card-table tbody td > *,
  table.mobile-card-table tbody th > * {
    min-width: 0;
    max-width: 100%;
  }

  table.mobile-card-table .actions,
  table.mobile-card-table .table-actions,
  table.mobile-card-table .inline-form {
    grid-column: 2;
  }

  .checklist-table.mobile-card-table tbody tr:not(.check-section-row) {
    display: grid;
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 10px;
  }

  .checklist-table.mobile-card-table tbody tr:not(.check-section-row) > td {
    border: 0;
    display: block;
    min-width: 0;
    padding: 0;
  }

  .checklist-table.mobile-card-table tbody tr:not(.check-section-row) > td::before {
    content: none;
  }

  .checklist-table .check-sequence-cell {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    grid-column: 1;
    grid-row: 1;
    padding-top: 3px !important;
  }

  .checklist-table .check-text-cell {
    display: -webkit-box !important;
    font-size: 13px !important;
    font-weight: 800;
    grid-column: 2;
    grid-row: 1;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .checklist-table .check-result {
    align-items: center;
    display: flex !important;
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
  }

  .checklist-table .mark-option {
    margin-right: 4px;
  }

  .checklist-table .mark-option span {
    height: 32px;
    width: 32px;
  }

  .checklist-table .check-control-cell {
    align-self: center;
    color: var(--muted);
    font-size: 11px !important;
    font-weight: 800;
    grid-column: 1;
    grid-row: 2;
    overflow-wrap: anywhere;
  }

  .checklist-table .check-note-cell {
    grid-column: 2;
    grid-row: 2;
  }

  .checklist-table .check-note-cell textarea {
    height: 38px;
    min-height: 38px;
    padding: 7px 8px;
    resize: none;
  }

  .checklist-table .check-photo-cell {
    align-self: stretch;
    grid-column: 3;
    grid-row: 2;
    width: 68px !important;
  }

  .checklist-table .check-photo-cell input[type="file"] {
    color: transparent;
    font-size: 0;
    height: 38px;
    min-height: 38px;
    overflow: hidden;
    padding: 3px;
    width: 68px;
  }

  .checklist-table .check-photo-cell input[type="file"]::file-selector-button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    height: 30px;
    margin: 0;
    padding: 4px 7px;
    width: 60px;
  }

  .checklist-table .check-photo-cell .file-upload-control {
    display: grid;
    gap: 2px;
    width: 68px;
  }

  .checklist-table .check-photo-cell .file-upload-button {
    gap: 0;
    justify-content: center;
    min-height: 38px;
    padding: 6px;
    width: 68px;
  }

  .checklist-table .check-photo-cell .file-upload-button span {
    display: none;
  }

  .checklist-table .check-photo-cell .file-upload-name {
    font-size: 9px;
    max-width: 68px;
    text-align: center;
    width: 68px;
  }

  .checklist-table .check-symbol-cell {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .marking-checklist-table .check-symbol-cell {
    min-width: 0;
  }

  .marking-checklist-table .gcu-work-order-symbol {
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
  }

  .marking-checklist-table .gcu-work-order-symbol img {
    height: 88px;
    width: 100%;
  }

  .checklist-table .check-symbol-cell ~ .check-control-cell,
  .checklist-table .check-symbol-cell ~ .check-note-cell,
  .checklist-table .check-symbol-cell ~ .check-photo-cell {
    grid-row: 3;
  }

  .checklist-table .check-section-row {
    border: 0;
  }

  .checklist-table .check-section-row td {
    background: #eef4f1;
    border: 0;
    color: #27443a;
    font-size: 13px;
    font-weight: 900;
    padding: 9px 10px;
  }

  .inspection-table,
  .checklist-table,
  .measurement-table,
  .wheel-measurement-table,
  .spring-matrix,
  .annual-document-table {
    min-width: 0 !important;
  }

  .technical-checklist th:nth-child(2),
  .technical-checklist td:nth-child(2),
  .technical-checklist th:nth-child(5),
  .technical-checklist td:nth-child(5),
  .technical-checklist th:nth-child(6),
  .technical-checklist td:nth-child(6),
  .check-photo-cell,
  .measurement-table input[type="text"],
  .measurement-table select,
  .measurement-table textarea,
  .component-measurement-table input,
  .component-measurement-table textarea {
    min-width: 0;
  }

  .inline-measurement-grid,
  .coupler-technical-card,
  .brake-kind-form,
  .scan-upload-form,
  .quick-material-form,
  .gcu-upload-strip {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .inline-measurement-grid .wide {
    grid-column: auto;
  }

  .procurement-section summary {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    padding: 10px;
  }

  .procurement-summary-meta {
    display: none;
  }

  .topbar {
    gap: 8px;
    min-width: 0;
    padding: 0 10px;
  }

  .brand,
  .brand-text {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .brand-text small,
  .topbar-icon-button strong {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-icon-button {
    min-height: 38px;
    padding: 5px;
  }

  .topbar-popover-panel,
  .topbar-calendar-panel {
    max-width: calc(100vw - 16px);
    right: -4px;
    width: calc(100vw - 16px);
  }

  .gcu-catalog-dialog,
  .inspection-marker-dialog {
    max-height: calc(100dvh - 12px);
    max-width: calc(100vw - 12px);
    width: calc(100vw - 12px);
  }

  .file-upload-control,
  .file-upload-button,
  .file-upload-name {
    max-width: 100%;
    min-width: 0;
  }

  .file-upload-button {
    white-space: normal;
  }
}

/* RayOP operational dashboard */
.field-wagon-status {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr));
  border: 1px solid #cbd8df;
  border-left: 4px solid #126b68;
  background: #fff;
  margin-bottom: 18px;
  min-width: 0;
}

.field-wagon-status > div {
  min-width: 0;
  padding: 14px 16px;
  border-left: 1px solid #dbe4e8;
}

.field-wagon-status > div:first-child {
  border-left: 0;
  background: #edf7f5;
}

.field-wagon-status span,
.field-wagon-status small {
  display: block;
}

.field-wagon-status span {
  color: #405866;
  font-size: 0.78rem;
  font-weight: 700;
}

.field-wagon-status strong {
  display: block;
  color: #102b3a;
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 3px 0;
}

.field-wagon-status small {
  color: #687d88;
  font-size: 0.7rem;
}

.field-wagon-status .status-registered { border-top: 3px solid #4f7185; }
.field-wagon-status .status-inspected { border-top: 3px solid #237a73; }
.field-wagon-status .status-processing { border-top: 3px solid #c28a28; }
.field-wagon-status .status-ready { border-top: 3px solid #2d8a55; }

.annual-dispatch-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #405866;
  font-size: 0.78rem;
  font-weight: 700;
}

.annual-dispatch-date input {
  width: auto;
  min-width: 148px;
}

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

  .field-wagon-status-heading {
    grid-column: 1 / -1;
  }

  .field-wagon-status > div:nth-child(2n) {
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .field-wagon-status > div {
    padding: 11px 12px;
  }

  .field-wagon-status strong {
    font-size: 1.45rem;
  }

  .field-wagon-status span {
    font-size: 0.72rem;
  }
}

.dashboard-layout > [data-dashboard-widget],
.module-section[data-dashboard-section] {
  position: relative;
}

.dashboard-customizer {
  align-items: center;
  background: #eef5f3;
  border: 1px solid #b9d5cf;
  border-left: 5px solid #176a63;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto;
  margin-bottom: 14px;
  padding: 12px 14px;
}

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

.dashboard-customizer > div:first-child {
  display: grid;
  gap: 2px;
}

.dashboard-customizer strong {
  color: #173b37;
  font-size: 14px;
}

.dashboard-customizer span,
.dashboard-customizer p {
  color: #58706c;
  font-size: 11px;
  margin: 0;
}

.dashboard-customizer-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

.dashboard-customizer-actions button {
  min-height: 38px;
}

.dashboard-shortcuts {
  background: #fff;
  border: 1px solid #d5dde0;
  border-left: 5px solid #2c6a88;
  border-radius: 8px;
  padding: 14px;
  position: relative;
}

.dashboard-shortcut-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-shortcut-card {
  background: #f8fafb;
  border: 1px solid #d8e0e3;
  border-radius: 7px;
  min-width: 0;
  position: relative;
}

.dashboard-shortcut-card > a {
  align-items: center;
  color: #1c2930;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  min-height: 68px;
  padding: 10px;
}

.dashboard-shortcut-card > a:hover,
.dashboard-shortcut-card > a:focus-visible {
  background: #eef5f6;
  outline: none;
}

.dashboard-shortcut-code {
  align-items: center;
  background: #e7eff4;
  border: 1px solid #ccdae3;
  border-radius: 6px;
  color: #2c6079;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 38px;
}

.dashboard-shortcut-card > a > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-shortcut-card strong {
  font-size: 13px;
}

.dashboard-shortcut-card small {
  color: #6b787f;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-shortcut-card > button {
  display: none;
  height: 30px;
  min-width: 30px;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 13;
}

.dashboard-editing .dashboard-shortcut-card > button {
  display: inline-flex;
}

.dashboard-shortcut-dialog {
  border: 1px solid #b9c8cd;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(20, 37, 45, .28);
  max-height: min(720px, 86vh);
  padding: 0;
  width: min(720px, calc(100vw - 28px));
}

.dashboard-shortcut-dialog::backdrop {
  background: rgba(18, 31, 37, .48);
}

.dashboard-shortcut-dialog-head {
  align-items: center;
  border-bottom: 1px solid #dce3e5;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.dashboard-shortcut-dialog-head > div {
  display: grid;
  gap: 3px;
}

.dashboard-shortcut-dialog-head span {
  color: #66757c;
  font-size: 11px;
}

.dashboard-shortcut-search {
  display: grid;
  font-size: 11px;
  gap: 5px;
  padding: 12px 16px 8px;
}

.dashboard-shortcut-options {
  display: grid;
  gap: 6px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 4px 16px 16px;
}

.dashboard-shortcut-option {
  align-items: center;
  background: #fff;
  border: 1px solid #d7e0e2;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
}

.dashboard-shortcut-option > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.dashboard-shortcut-option small {
  color: #69777d;
  font-size: 10px;
}

.dashboard-shortcut-option.is-added {
  background: #edf5f2;
  border-color: #b9d7ce;
}

@media (max-width: 850px) {
  .dashboard-shortcut-list {
    grid-template-columns: 1fr;
  }
}

.dashboard-edit-button[aria-pressed="true"] {
  background: #e7f1ef;
  border-color: #176a63;
  color: #14564f;
}

.dashboard-item-controls {
  align-items: center;
  display: none;
  gap: 5px;
  position: absolute;
  right: 9px;
  top: 8px;
  z-index: 12;
}

.dashboard-editing .dashboard-item-controls {
  display: flex;
}

.dashboard-layout-control {
  align-items: center;
  background: #fff;
  border: 1px solid #9eb1b7;
  border-radius: 6px;
  color: #31474f;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 31px;
  justify-content: center;
  min-width: 38px;
  padding: 0 9px;
}

.dashboard-layout-drag {
  cursor: grab;
  font-size: 15px;
  letter-spacing: 1px;
  touch-action: none;
  width: 38px;
}

.dashboard-layout-drag:active {
  cursor: grabbing;
}

.dashboard-layout-visibility.is-off {
  background: #f7eae6;
  border-color: #d9aa9d;
  color: #843a28;
}

.dashboard-editing [data-dashboard-widget] {
  outline: 2px dashed #9dbab5;
  outline-offset: 3px;
}

.dashboard-editing .module-section[data-dashboard-section] {
  outline: 1px dashed #aebdc1;
  outline-offset: -4px;
}

.dashboard-editing .module-section-summary {
  padding-right: 145px;
}

.dashboard-user-hidden {
  display: none !important;
}

.dashboard-edit-hidden {
  opacity: .42;
}

.dashboard-is-dragging {
  box-shadow: 0 16px 34px rgba(25, 48, 56, .2);
  opacity: .76;
  z-index: 20;
}

.post-sandblasting-source-panel {
  display: grid;
  gap: 14px;
}

.post-sandblasting-source-card {
  background: #f8faf9;
  border: 1px solid #d7e1df;
  border-left: 4px solid #a9452f;
  border-radius: 6px;
  padding: 13px;
}

.post-sandblasting-source-card h3 {
  font-size: 15px;
  margin: 0;
}

.work-order-drawing-source {
  margin-top: 12px;
  min-height: 190px;
}

.work-order-drawing-source svg {
  height: 100%;
  width: 100%;
}

.post-sandblasting-drawing-note {
  margin: 10px 0 0;
}

/* ECM function workspaces */
.ecm-workspace-head .eyebrow,
.page-head .eyebrow {
  color: #176a63;
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 4px;
}

.ecm-workspace-nav {
  background: #fff;
  border: 1px solid #d6dfe2;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
}

.ecm-workspace-nav a {
  align-items: center;
  border-right: 1px solid #e0e6e8;
  color: #273941;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 9px;
  min-height: 54px;
  padding: 9px 12px;
}

.ecm-workspace-nav a:last-child { border-right: 0; }
.ecm-workspace-nav a:hover,
.ecm-workspace-nav a:focus-visible { background: #f3f7f6; outline: none; }
.ecm-workspace-nav a.is-active { background: #e8f2f0; box-shadow: inset 0 -3px #176a63; color: #14564f; }

.ecm-workspace-nav span {
  align-items: center;
  background: #edf2f2;
  border: 1px solid #cad7d9;
  border-radius: 5px;
  display: inline-flex;
  font-size: 10px;
  height: 30px;
  justify-content: center;
  width: 34px;
}

.ecm-workspace-metrics {
  background: #fff;
  border: 1px solid #d6dfe2;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
}

.ecm-workspace-metrics > div {
  border-right: 1px solid #e0e6e8;
  display: grid;
  gap: 3px;
  min-height: 75px;
  padding: 13px 15px;
}

.ecm-workspace-metrics > div:last-child { border-right: 0; }
.ecm-workspace-metrics span { color: #63747a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ecm-workspace-metrics strong { color: #176a63; font-size: 25px; }
.ecm-workspace-metrics .metric-alert strong { color: #a9452f; }

.ecm-filter-band {
  background: #eef2f3;
  border: 1px solid #d4dde0;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 10px;
}

.ecm-filter-band form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.ecm-filter-band input[type="search"] { flex: 1 1 320px; }
.ecm-filter-band select { max-width: 300px; }

.ecm-entry-panel {
  margin-bottom: 14px;
  padding: 0;
}

.ecm-entry-panel > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 60px;
  padding: 12px 15px;
}

.ecm-entry-panel > summary::-webkit-details-marker { display: none; }
.ecm-entry-panel > summary span { color: #68777d; font-size: 11px; }
.ecm-entry-panel[open] > summary { border-bottom: 1px solid #dce3e5; }
.ecm-record-form { padding: 15px; }
.ecm-record-form .actions { align-self: end; }

.ecm-record-table td { vertical-align: top; }
.ecm-record-table td strong,
.ecm-record-table td small { display: block; }
.ecm-record-table td small { color: #6b797f; font-size: 11px; margin-top: 3px; }
.ecm-record-table tr.is-overdue td { background: #fff4f0; }

.subcontractor-registry {
  padding: 0;
}

.subcontractor-registry > .panel-title-row,
.subcontractor-registry > .table-wrap {
  margin-left: 15px;
  margin-right: 15px;
}

.subcontractor-registry > .panel-title-row { padding-top: 15px; }
.subcontractor-registry td strong,
.subcontractor-registry td small { display: block; }
.subcontractor-registry td small { color: #68777d; font-size: 11px; margin-top: 3px; }

.subcontractor-create {
  border-top: 1px solid #dce3e5;
  margin-top: 14px;
}

.subcontractor-create > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 54px;
  padding: 11px 15px;
}

.subcontractor-create > summary::-webkit-details-marker { display: none; }
.subcontractor-create > summary::after {
  content: "+";
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}
.subcontractor-create[open] > summary::after { content: "−"; }
.subcontractor-create > summary span { color: #68777d; font-size: 11px; }
.subcontractor-create[open] > summary { background: #f4f7f7; border-bottom: 1px solid #dce3e5; }

.subcontractor-contract-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subcontractor-contract-form > label {
  min-width: 0;
}

.subcontractor-contract-form .service-scope-field {
  background: #f4f7f7;
  border: 1px solid #d5dfe1;
  border-radius: 6px;
  grid-column: 1 / -1;
  padding: 12px;
}

.service-scope-field > div {
  display: grid;
  gap: 7px 15px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.service-scope-field > div label {
  align-items: center;
  display: flex;
  font-size: 12px;
  font-weight: 650;
  gap: 7px;
  min-height: 30px;
}

.service-scope-field input[type="checkbox"] {
  flex: 0 0 auto;
  height: 17px;
  margin: 0;
  width: 17px;
}

.ecm-function-matrix {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.ecm-function-matrix a {
  background: #fff;
  border: 1px solid #d5dfe1;
  border-left: 4px solid #2c6a88;
  border-radius: 7px;
  color: #24363e;
  display: grid;
  gap: 4px;
  min-height: 90px;
  padding: 12px;
}

.ecm-function-matrix strong { font-size: 13px; }
.ecm-function-matrix span { color: #6b797f; font-size: 11px; }
.ecm-function-matrix em { color: #a9452f; font-size: 11px; font-style: normal; font-weight: 900; }
.risk-score { align-items: center; background: #eaf2ef; border-radius: 5px; display: inline-flex !important; height: 30px; justify-content: center; min-width: 34px; padding: 0 7px; }

.ecm-document-create { max-width: 900px; }

.quality-editor-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 285px minmax(0, 1fr);
}

.quality-editor-meta {
  display: grid;
  gap: 10px;
  padding: 14px;
  position: sticky;
  top: 76px;
}

.quality-editor-meta h2 { font-size: 16px; margin: 0 0 3px; }
.quality-editor-meta label { display: grid; gap: 4px; font-size: 11px; font-weight: 800; }
.quality-editor-meta hr { border: 0; border-top: 1px solid #dce3e5; margin: 3px 0; width: 100%; }

.quality-editor-stage {
  background: #cfd6d8;
  border: 1px solid #bcc8cc;
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.quality-editor-toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5d8;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  padding: 7px;
  position: sticky;
  top: 64px;
  z-index: 5;
}

.quality-editor-toolbar button,
.quality-editor-toolbar select {
  background: #fff;
  border: 1px solid #cbd5d8;
  border-radius: 4px;
  color: #22353d;
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
}

.quality-editor-toolbar > span { border-left: 1px solid #cbd5d8; height: 25px; margin: 0 3px; }

.quality-document-canvas {
  background: #fff;
  box-shadow: 0 5px 18px rgba(26, 45, 53, .18);
  color: #111;
  margin: 0 auto;
  min-height: 1120px;
  outline: none;
  padding: 70px 72px;
  width: min(100%, 794px);
}

.quality-document-canvas h1 { border-bottom: 2px solid #176a63; font-size: 24px; padding-bottom: 10px; }
.quality-document-canvas h2 { color: #176a63; font-size: 18px; margin-top: 25px; }
.quality-document-canvas h3 { font-size: 15px; margin-top: 20px; }
.quality-document-canvas p,
.quality-document-canvas li { font-size: 13px; line-height: 1.6; }
.quality-document-canvas table { border-collapse: collapse; margin: 16px 0; width: 100%; }
.quality-document-canvas th,
.quality-document-canvas td { border: 1px solid #25363e; min-width: 70px; padding: 7px; }
.quality-document-canvas th { background: #e8f0ef; }

.quality-editor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .ecm-workspace-nav,
  .ecm-function-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality-editor-layout { grid-template-columns: 1fr; }
  .quality-editor-meta { position: static; }
  .quality-document-canvas { min-height: 900px; padding: 45px 35px; }
  .subcontractor-contract-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-scope-field > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ecm-workspace-nav,
  .ecm-workspace-metrics,
  .ecm-function-matrix { grid-template-columns: 1fr; }
  .ecm-workspace-nav a,
  .ecm-workspace-metrics > div { border-bottom: 1px solid #e0e6e8; border-right: 0; }
  .ecm-filter-band form { align-items: stretch; flex-direction: column; }
  .ecm-filter-band input[type="search"] { flex: 0 0 auto; width: 100%; }
  .ecm-filter-band select { max-width: none; }
  .ecm-entry-panel > summary { align-items: flex-start; flex-direction: column; gap: 4px; }
  .subcontractor-create > summary { align-items: flex-start; flex-direction: column; gap: 3px; padding-right: 42px; position: relative; }
  .subcontractor-create > summary::after { position: absolute; right: 15px; top: 15px; }
  .subcontractor-contract-form { grid-template-columns: 1fr; }
  .service-scope-field > div { grid-template-columns: 1fr; }
  .quality-editor-stage { padding: 7px; }
  .quality-document-canvas { min-height: 700px; padding: 28px 20px; }
}

@media print {
  .quality-editor-meta,
  .quality-editor-toolbar,
  .quality-editor-actions,
  .quality-editor-layout ~ *,
  .page-head .button-row { display: none !important; }
  .quality-editor-layout { display: block; }
  .quality-editor-stage { background: #fff; border: 0; padding: 0; }
  .quality-document-canvas { box-shadow: none; min-height: 0; padding: 0; width: 100%; }
}

.dashboard-command-band {
  align-items: center;
  background: #fff;
  border: 1px solid #d5dde0;
  border-left: 6px solid #a9452f;
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 118px;
  padding: 20px 22px;
}

.dashboard-command-copy {
  min-width: 0;
}

.dashboard-command-copy h1 {
  color: #17252c;
  font-size: 28px;
  margin-top: 4px;
}

.dashboard-command-copy p {
  font-size: 14px;
  margin-top: 5px;
}

.dashboard-kicker {
  color: #176a63;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
}

.dashboard-actions .link-button {
  background: #fff;
  border-color: #cbd5d9;
  color: #263841;
}

.dashboard-actions .link-button.primary {
  background: #176a63;
  border-color: #176a63;
  color: #fff;
}

.dashboard-new-wagon span {
  color: #a9452f;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  margin-right: 4px;
}

.dashboard-metrics {
  background: #fff;
  border: 1px solid #d5dde0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
}

.dashboard-metric {
  --metric-color: #176a63;
  border-left: 4px solid var(--metric-color);
  border-right: 1px solid #dfe5e7;
  color: #1c2930;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 88px;
  padding: 14px 16px;
}

.dashboard-metric:last-child {
  border-right: 0;
}

.dashboard-metric:hover,
.dashboard-metric:focus-visible {
  background: #f4f7f7;
  outline: none;
}

.dashboard-metric span {
  align-self: end;
  color: #586970;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-metric strong {
  color: var(--metric-color);
  font-size: 28px;
  grid-row: 1 / 3;
  line-height: 1;
}

.dashboard-metric small {
  color: #728087;
  font-size: 11px;
  margin: 3px 0 0;
}

.metric-inspection { --metric-color: #a9452f; }
.metric-orders { --metric-color: #2c6a88; }
.metric-ready { --metric-color: #4e7550; }

.dashboard-workspace {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 342px;
  margin-bottom: 18px;
}

.dashboard-work-panel,
.dashboard-focus-panel {
  background: #fff;
  border: 1px solid #d5dde0;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.dashboard-panel-heading {
  align-items: center;
  border-bottom: 1px solid #dfe5e7;
  display: flex;
  justify-content: space-between;
  min-height: 67px;
  padding: 12px 16px;
}

.dashboard-panel-heading > div {
  display: grid;
  gap: 3px;
}

.dashboard-panel-heading span,
.module-directory-head > div > span {
  color: #a9452f;
  font-size: 10px;
  font-weight: 900;
}

.dashboard-panel-heading h2,
.module-directory-head h2 {
  font-size: 18px;
  margin: 0;
}

.dashboard-panel-heading > a {
  font-size: 12px;
  font-weight: 800;
}

.dashboard-compact-table table {
  border: 0;
}

.dashboard-compact-table th,
.dashboard-compact-table td {
  border-bottom: 1px solid #e1e6e8;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  padding: 11px 13px;
}

.dashboard-compact-table th {
  background: #f1f4f4;
  color: #59686f;
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

.dashboard-compact-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-compact-table td small {
  font-size: 11px;
  margin-top: 2px;
}

.dashboard-status-label {
  background: #e9f2f0;
  border: 1px solid #c5dcd7;
  border-radius: 999px;
  color: #14564f;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.dashboard-row-action {
  align-items: center;
  border: 1px solid #cbd5d9;
  border-radius: 6px;
  display: inline-flex;
  font-size: 17px;
  height: 30px;
  justify-content: center;
  width: 32px;
}

.dashboard-empty {
  color: #66747b;
  padding: 14px 4px;
  text-align: center;
}

.dashboard-focus-list {
  display: grid;
}

.focus-item {
  color: #1c2930;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 66px;
  padding: 11px 14px;
}

.focus-item + .focus-item {
  border-top: 1px solid #e1e6e8;
}

a.focus-item:hover,
a.focus-item:focus-visible {
  background: #f4f7f7;
  outline: none;
}

.focus-item > span {
  align-items: center;
  align-self: center;
  background: #e8eff1;
  border: 1px solid #cbd8dc;
  border-radius: 6px;
  color: #34515e;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  grid-row: 1 / 3;
  height: 32px;
  justify-content: center;
  width: 38px;
}

.focus-item strong {
  align-self: end;
  font-size: 13px;
}

.focus-item small {
  color: #6a777e;
  font-size: 11px;
  margin: 0;
}

.focus-warning > span {
  background: #f8ebe7;
  border-color: #e4c0b5;
  color: #8d3825;
}

.focus-ok > span {
  background: #e7f2eb;
  border-color: #bfdbc8;
  color: #2d6a43;
}

.focus-item.is-disabled {
  opacity: .62;
}

.module-directory {
  margin-bottom: 18px;
}

.module-directory-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}

.module-directory-head p {
  font-size: 12px;
  margin-top: 3px;
}

.module-sections {
  display: grid;
  gap: 8px;
  margin: 0;
}

.module-section {
  --section-color: #176a63;
  background: #fff;
  border: 1px solid #d5dde0;
  border-left: 5px solid var(--section-color);
  border-radius: 8px;
  display: block;
  overflow: hidden;
  padding: 0;
}

.module-section-ecm { --section-color: #176a63; }
.module-section-maintenance { --section-color: #a9452f; }
.module-section-support { --section-color: #2c6a88; }
.module-section-commercial { --section-color: #8a682a; }
.module-section-admin { --section-color: #556771; }

.module-section-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  list-style: none;
  min-height: 68px;
  padding: 10px 15px 10px 12px;
}

.module-section-summary::-webkit-details-marker {
  display: none;
}

.module-section-summary:hover,
.module-section-summary:focus-visible {
  background: #f5f7f7;
  outline: none;
}

.module-section-marker {
  align-items: center;
  border: 1px solid var(--section-color);
  border-radius: 6px;
  color: var(--section-color);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 40px;
}

.module-section-summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.module-section-summary strong {
  color: #1c2930;
  font-size: 15px;
}

.module-section-summary small {
  color: #6b787f;
  font-size: 11px;
  margin: 0;
}

.module-section-summary em {
  color: #66747b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.module-section-summary > i {
  border-bottom: 2px solid #6f7d84;
  border-right: 2px solid #6f7d84;
  height: 8px;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 150ms ease;
  width: 8px;
}

.module-section[open] > .module-section-summary {
  border-bottom: 1px solid #dfe5e7;
}

.module-section[open] > .module-section-summary > i {
  transform: rotate(225deg) translate(-1px, -1px);
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-row {
  align-items: center;
  color: #1c2930;
  display: grid;
  gap: 11px;
  grid-template-columns: 42px minmax(0, 1fr) auto 20px;
  min-height: 68px;
  padding: 10px 14px;
}

.module-row:nth-child(even) {
  border-left: 1px solid #e1e6e8;
}

.module-row:nth-child(n+3) {
  border-top: 1px solid #e1e6e8;
}

.module-row:hover,
.module-row:focus-visible {
  background: #f3f6f6;
  outline: none;
}

.module-card-icon {
  align-items: center;
  background: #edf2f2;
  border: 1px solid #d1dcde;
  border-radius: 6px;
  color: var(--section-color);
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 40px;
}

.module-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.module-row-copy strong {
  font-size: 13px;
}

.module-row-copy small {
  color: #6b787f;
  font-size: 11px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-row > em {
  background: #edf2f2;
  border-radius: 999px;
  color: #50636b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  min-width: 28px;
  padding: 4px 7px;
  text-align: center;
}

.module-row > i {
  color: var(--section-color);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-records {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
}

.dashboard-principles {
  display: grid;
}

.dashboard-principles a {
  color: #1c2930;
  display: grid;
  gap: 4px;
  padding: 15px 17px;
}

.dashboard-principles a + a {
  border-top: 1px solid #e1e6e8;
}

.dashboard-principles a:hover,
.dashboard-principles a:focus-visible {
  background: #f4f7f7;
  outline: none;
}

.dashboard-principles strong {
  font-size: 13px;
}

.dashboard-principles span {
  color: #6a777e;
  font-size: 11px;
}

@media (max-width: 980px) {
  .dashboard-workspace,
  .dashboard-records {
    grid-template-columns: 1fr;
  }

  .module-list {
    grid-template-columns: 1fr;
  }

  .module-row:nth-child(even) {
    border-left: 0;
  }

  .module-row:nth-child(n+2) {
    border-top: 1px solid #e1e6e8;
  }
}

@media (max-width: 720px) {
  .dashboard-customizer {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .dashboard-customizer-actions {
    justify-content: stretch;
  }

  .dashboard-customizer-actions button {
    flex: 1 1 0;
  }

  .dashboard-editing .module-section-summary {
    padding-right: 112px;
  }

  .module-section .dashboard-item-controls {
    right: 6px;
    top: 7px;
  }

  .module-section .dashboard-layout-control {
    min-width: 34px;
    padding: 0 6px;
  }

  .dashboard-command-band {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .dashboard-command-copy h1 {
    font-size: 24px;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

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

  .dashboard-metric:nth-child(2) {
    border-right: 0;
  }

  .dashboard-metric:nth-child(n+3) {
    border-top: 1px solid #dfe5e7;
  }

  .module-section-summary {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
  }

  .module-section-summary em {
    display: none;
  }

  .module-section-summary small,
  .module-row-copy small {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .dashboard-actions .link-button {
    flex: 1 1 44%;
    justify-content: center;
    min-width: 0;
  }

  .dashboard-actions .link-button.primary {
    flex-basis: 100%;
  }

  .dashboard-metric {
    min-height: 82px;
    padding: 12px;
  }

  .dashboard-metric strong {
    font-size: 24px;
  }

  .module-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .module-row > i {
    display: none;
  }

  .dashboard-orders-panel th:nth-child(3),
  .dashboard-orders-panel td:nth-child(3) {
    display: none;
  }

  .dashboard-orders-panel .dashboard-compact-table th,
  .dashboard-orders-panel .dashboard-compact-table td {
    padding: 9px 7px;
  }

  .dashboard-orders-panel .dashboard-compact-table th:nth-child(2),
  .dashboard-orders-panel .dashboard-compact-table td:nth-child(2),
  .dashboard-wagons-panel .dashboard-compact-table th:first-child,
  .dashboard-wagons-panel .dashboard-compact-table td:first-child {
    font-size: 11px;
    white-space: nowrap;
  }

  .dashboard-orders-panel .dashboard-compact-table td:first-child {
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .dashboard-orders-panel .dashboard-status-label {
    font-size: 10px;
    padding: 3px 6px;
  }

  .dashboard-orders-panel .dashboard-row-action {
    height: 28px;
    width: 28px;
  }
}

.workshop-module-grid,
.annual-form-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.workshop-module-card,
.annual-form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 18px;
  text-decoration: none;
}

.workshop-module-card.is-active,
.annual-form-card:hover,
.annual-form-card:focus-visible {
  border-color: #176a63;
  box-shadow: 0 8px 20px rgba(23, 106, 99, .09);
}

.workshop-module-card.is-planned {
  background: #f8fafb;
  border-style: dashed;
}

.workshop-module-card > strong,
.annual-form-card > strong {
  font-size: 17px;
}

.workshop-module-card p,
.annual-form-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.workshop-module-card small,
.annual-form-card small {
  align-self: end;
  color: #52606d;
}

.workshop-module-head,
.annual-form-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.workshop-module-code,
.annual-form-card-head span {
  align-items: center;
  background: #e4efed;
  border: 1px solid #c8dcda;
  border-radius: 6px;
  color: #0f4f4a;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 42px;
}

.annual-form-card-head em {
  color: #2b62a3;
  font-size: 24px;
  font-style: normal;
  font-weight: 800;
}

.workshop-support-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.annual-year-form,
.annual-form-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
}

.annual-year-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.annual-year-form select {
  min-width: 100px;
}

.annual-form-toolbar {
  justify-content: flex-end;
  margin-bottom: 14px;
}

.annual-form-toolbar > :first-child {
  margin-right: auto;
}

.annual-document-sheet {
  background: #fff;
  border: 1px solid #aeb8c2;
  color: #101820;
  margin: 0 auto;
  max-width: 1380px;
  min-width: 0;
  padding: 12px;
  page: annual-landscape;
}

.annual-document-header {
  border: 1.5px solid #17212b;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 265px;
  min-height: 104px;
}

.annual-document-logo,
.annual-document-title,
.annual-document-meta {
  min-width: 0;
}

.annual-document-logo {
  align-content: center;
  border-right: 1px solid #17212b;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 10px;
  text-align: center;
}

.annual-document-logo img {
  height: 48px;
  max-width: 150px;
  object-fit: contain;
}

.annual-document-logo strong {
  font-size: 11px;
}

.annual-document-title {
  align-content: center;
  border-right: 1px solid #17212b;
  display: grid;
  gap: 5px;
  padding: 10px 18px;
  text-align: center;
}

.annual-document-title span,
.annual-document-title p {
  font-size: 11px;
  font-weight: 700;
  margin: 0;
}

.annual-document-title h1 {
  font-size: 17px;
  line-height: 1.25;
  margin: 0;
}

.annual-document-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.annual-document-meta dt,
.annual-document-meta dd {
  align-content: center;
  border-bottom: 1px solid #17212b;
  font-size: 10px;
  margin: 0;
  padding: 5px 7px;
}

.annual-document-meta dt {
  border-right: 1px solid #17212b;
  font-weight: 800;
}

.annual-document-meta > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.annual-document-summary {
  border-left: 1.5px solid #17212b;
  border-right: 1.5px solid #17212b;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
}

.annual-document-summary span {
  border-right: 1px solid #17212b;
  font-size: 10px;
  padding: 7px 9px;
}

.annual-document-summary span:last-child {
  border-right: 0;
}

.annual-document-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.annual-document-table th,
.annual-document-table td {
  border: 1px solid #17212b;
  font-size: 9px;
  overflow-wrap: anywhere;
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
}

.annual-document-table th {
  background: #dce9e7;
  font-weight: 800;
}

.annual-document-table tbody tr {
  height: 31px;
}

.annual-document-table .annual-empty-row td {
  color: #52606d;
  font-style: italic;
  text-align: left;
}

.annual-document-table .annual-blank-row td {
  height: 28px;
}

.annual-axle-table th,
.annual-axle-table td {
  font-size: 7.5px;
  padding: 4px 2px;
}

.annual-document-footer {
  border-bottom: 1.5px solid #17212b;
  border-left: 1.5px solid #17212b;
  border-right: 1.5px solid #17212b;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.annual-document-footer > div {
  border-right: 1px solid #17212b;
  min-height: 64px;
  padding: 8px 10px;
}

.annual-document-footer > div:last-child {
  border-right: 0;
}

.annual-document-footer strong,
.annual-document-footer span {
  display: block;
  font-size: 9px;
}

.annual-document-footer span {
  margin-top: 23px;
}

.gcu-selection-panel .panel-title-row {
  align-items: center;
}

.gcu-selection-panel h2,
.gcu-selection-panel p {
  margin-bottom: 0;
}

.gcu-selection-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.gcu-selection-summary strong {
  color: var(--primary-dark);
}

.gcu-preview-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.gcu-preview-strip span {
  display: grid;
  grid-template-rows: 54px auto;
  gap: 5px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.gcu-preview-strip img {
  width: 100%;
  height: 54px;
  object-fit: contain;
}

.gcu-preview-strip small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcu-preview-strip > strong {
  align-self: center;
  padding: 10px;
  color: var(--primary-dark);
  white-space: nowrap;
}

.evsaf-gcu-panel {
  border-top: 4px solid #176a63;
}

.gcu-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.gcu-recommendation-actions .status-pill {
  background: #eef5f4;
  color: #164f4b;
}

.evsaf-gcu-card {
  cursor: pointer;
}

.evsaf-gcu-card:has(input:checked) {
  border-color: #16836f;
  box-shadow: inset 0 0 0 1px #16836f;
  background: #f0faf6;
}

.evsaf-gcu-card.is-gcu-recommended:not(:has(input:checked)) {
  border-style: dashed;
  border-color: #6f8784;
}

.evsaf-gcu-card .gcu-card-copy {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.gcu-recommendation-reason {
  display: block;
  padding: 7px 8px;
  border-left: 3px solid #176a63;
  background: #eef5f4;
  color: #254b49 !important;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .gcu-preview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gcu-preview-strip > strong {
    grid-column: 1 / -1;
  }

  .gcu-recommendation-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.gcu-catalog-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid #8b98a5;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.gcu-catalog-dialog::backdrop {
  background: rgba(23, 33, 43, 0.68);
}

.inspection-marker-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0 18px 18px;
  border: 1px solid #87949f;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  overflow: auto;
}

.inspection-marker-dialog::backdrop {
  background: rgba(23, 33, 43, .68);
}

.inspection-marker-dialog > .gcu-dialog-head {
  margin: 0 -18px 14px;
}

.marker-dialog-views {
  margin: 14px 0;
}

.marker-dialog-fields {
  grid-template-columns: minmax(220px, .55fr) minmax(300px, 1.45fr);
}

.inspection-marker-trigger {
  display: block;
  margin-top: 8px;
  width: 100%;
  white-space: normal;
}

.inspection-marker-trigger.is-marked {
  border-color: #16836f;
  background: #e9f7f2;
  color: #0b6657;
}

.focused-repair-link-list,
.focused-repair-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focused-repair-link-list a {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf9;
}

.focused-repair-actions {
  min-width: 190px;
}

.focused-repair-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(240px, .6fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 16px;
}

.focused-repair-form label {
  display: grid;
  gap: 6px;
}

@media (max-width: 900px) {
  .marker-dialog-views,
  .marker-dialog-fields,
  .focused-repair-form {
    grid-template-columns: 1fr;
  }
}

.gcu-dialog-head,
.gcu-dialog-actions {
  position: sticky;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
}

.gcu-dialog-head {
  top: 0;
  border-bottom: 1px solid var(--line);
}

.gcu-dialog-head h2,
.gcu-dialog-head p {
  margin: 0;
}

.gcu-dialog-head p {
  margin-top: 4px;
  color: var(--muted);
}

.gcu-dialog-actions {
  bottom: 0;
  border-top: 1px solid var(--line);
}

.gcu-catalog-groups {
  padding: 12px 18px 80px;
}

.gcu-catalog-group {
  border-bottom: 1px solid var(--line);
}

.gcu-catalog-group > summary {
  padding: 14px 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.gcu-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 16px;
}

.gcu-catalog-card {
  display: grid;
  grid-template-rows: 150px auto auto auto;
  min-width: 0;
  border: 1px solid #b8c3cd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.gcu-source-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 8px;
  background: #fff;
  border-bottom: 1px solid #b8c3cd;
}

.gcu-source-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gcu-upload-strip {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr 1fr .9fr auto;
  align-items: end;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #d5dde5;
  background: #f7faf9;
}

.gcu-upload-strip strong,
.gcu-upload-strip span {
  display: block;
}

.gcu-upload-strip label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.gcu-upload-strip input,
.gcu-upload-strip select {
  width: 100%;
}

.gcu-symbol-cue {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 70px;
  padding: 5px 7px;
  border: 1px solid #17212b;
  background: rgba(255, 255, 255, 0.94);
  color: #17212b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.gcu-card-copy {
  padding: 11px 12px 8px;
}

.gcu-clause {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.gcu-card-copy h3 {
  margin: 5px 0;
  font-size: 14px;
  line-height: 1.25;
}

.gcu-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.gcu-present-check,
.gcu-card-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid #e2e7ec;
}

.gcu-present-check {
  color: var(--primary-dark);
  font-weight: 800;
}

.gcu-card-note {
  display: grid;
  color: var(--muted);
  font-size: 11px;
}

.gcu-card-note input {
  width: 100%;
}

.gcu-work-order-symbol {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.gcu-work-order-symbol img {
  width: 140px;
  height: 90px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.gcu-work-order-symbol strong,
.gcu-work-order-symbol span,
.gcu-work-order-symbol small {
  display: block;
}

.gcu-work-order-symbol span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.gcu-work-order-symbol small {
  margin-top: 7px;
  color: var(--text);
  line-height: 1.35;
}

.gcu-work-order-symbol--legacy {
  grid-template-columns: 76px minmax(0, 1fr);
}

.gcu-legacy-badge {
  display: grid;
  width: 76px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.marking-checklist-table th:nth-child(1) {
  width: 54px;
}

.marking-checklist-table th:nth-child(2) {
  width: 46%;
}

.marking-checklist-table .check-symbol-cell {
  min-width: 360px;
}

.quick-material-request h2,
.quick-material-request p {
  margin-bottom: 0;
}

.quick-material-form {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) 86px minmax(130px, .8fr) 120px minmax(210px, 1.4fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.quick-material-form label {
  min-width: 0;
  margin: 0;
}

.quick-material-form select,
.quick-material-form input,
.quick-material-form button {
  min-height: 42px;
  width: 100%;
}

.quick-material-history {
  margin-top: 14px;
}

.quick-material-history th,
.quick-material-history td {
  font-size: 12px;
  padding: 7px 8px;
}

.checklist-consumables {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.checklist-consumables-title {
  align-items: flex-start;
  gap: 16px;
}

.checklist-consumables-title h3,
.checklist-consumables-title p {
  margin: 0;
}

.checklist-consumables-title p {
  margin-top: 4px;
}

.checklist-consumable-depots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.checklist-consumable-depots span {
  background: #edf6f4;
  border: 1px solid #aed1ca;
  border-radius: 4px;
  color: #0f5149;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.checklist-consumable-rows {
  margin-top: 12px;
}

.checklist-consumable-row {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 2fr) 90px minmax(130px, .8fr) minmax(190px, 1.2fr) auto;
  padding: 10px 0;
}

.checklist-consumable-row:first-child {
  padding-top: 0;
}

.checklist-consumable-row label,
.checklist-consumable-row label > span {
  margin: 0;
  min-width: 0;
}

.checklist-consumable-row label > span {
  display: block;
  margin-bottom: 5px;
}

.checklist-consumable-row input,
.checklist-consumable-row select,
.checklist-consumable-row button {
  min-height: 42px;
  width: 100%;
}

.checklist-consumable-remove {
  width: auto;
}

.checklist-consumable-add {
  margin-top: 10px;
}

.checklist-consumable-empty {
  border-left: 3px solid #d2a24c;
  color: var(--muted);
  margin: 14px 0 0;
  padding: 8px 10px;
}

.checklist-consumable-history {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.checklist-consumable-history ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.checklist-consumable-history li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: minmax(220px, 2fr) minmax(90px, .6fr) minmax(140px, 1fr) minmax(100px, .7fr);
  padding: 8px 0;
}

.checklist-consumable-history li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bogie-consumables {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.bogie-consumable-table-wrap {
  margin-top: 12px;
}

.bogie-consumable-table {
  table-layout: fixed;
}

.bogie-consumable-table th:nth-child(1) { width: 17%; }
.bogie-consumable-table th:nth-child(2) { width: 34%; }
.bogie-consumable-table th:nth-child(3) { width: 16%; }
.bogie-consumable-table th:nth-child(4) { width: 19%; }
.bogie-consumable-table th:nth-child(5) { width: 14%; }

.bogie-consumable-table tbody th {
  background: #f2f6f5;
  color: var(--ink);
  vertical-align: middle;
}

.bogie-consumable-table td strong,
.bogie-consumable-table td small {
  display: block;
}

.bogie-consumable-table td small {
  color: var(--muted);
  margin-top: 3px;
}

.bogie-consumable-quantity {
  min-height: 40px;
  min-width: 74px;
  text-align: center;
  width: 100%;
}

.stock-quantity.empty {
  color: #9a5b00;
  font-weight: 800;
}

.request-pending {
  color: #8b5a00;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .bogie-consumable-table-wrap {
    overflow: visible;
  }

  .bogie-consumable-table,
  .bogie-consumable-table tbody {
    display: block;
    width: 100%;
  }

  .bogie-consumable-table thead {
    display: none;
  }

  .bogie-consumable-table tr {
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    margin-bottom: 8px;
  }

  .bogie-consumable-table tbody th,
  .bogie-consumable-table td {
    border: 0;
    display: block;
    min-width: 0;
    width: auto;
  }

  .bogie-consumable-table tbody th {
    grid-column: 1 / -1;
  }

  .bogie-consumable-table td:nth-last-child(1) {
    grid-column: 2;
    grid-row: 2 / span 3;
  }
}

.topbar-actions > a.topbar-icon-button {
  text-decoration: none;
}

.desktop-chat-launcher {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  position: fixed;
  right: 22px;
  bottom: 18px;
  width: max-content;
  max-width: calc(100vw - 32px);
  z-index: 95;
}

.desktop-chat-launcher:not([open]) .desktop-chat-panel {
  display: none;
}

body:has(.desktop-chat-launcher) .page {
  padding-bottom: 168px;
}

.desktop-chat-launcher > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #0c615d;
  border-radius: 6px;
  background: #126b68;
  color: #fff;
  box-shadow: 0 10px 28px rgba(16, 43, 58, 0.24);
  cursor: pointer;
  list-style: none;
}

.desktop-chat-launcher > summary::-webkit-details-marker {
  display: none;
}

.desktop-chat-launcher > summary:hover,
.desktop-chat-launcher > summary:focus-visible,
.desktop-chat-launcher[open] > summary {
  background: #0d5754;
}

.desktop-chat-launcher > summary > strong {
  font-size: 0.84rem;
}

.desktop-chat-launcher > summary > em,
.desktop-chat-panel header > span,
.desktop-chat-recent > a > em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #c94f38;
  color: #fff;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.desktop-chat-icon {
  position: relative;
  width: 21px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.desktop-chat-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: -6px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  transform: skewY(-35deg);
}

.desktop-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(370px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #cbd8df;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 43, 58, 0.25);
}

.desktop-chat-panel header,
.desktop-chat-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.desktop-chat-panel header {
  border-bottom: 1px solid #dce5e9;
  background: #f4f8f9;
}

.desktop-chat-panel header > div {
  min-width: 0;
}

.desktop-chat-panel header strong,
.desktop-chat-panel header small {
  display: block;
}

.desktop-chat-panel header strong {
  color: #102b3a;
  font-size: 0.96rem;
}

.desktop-chat-panel header small {
  margin-top: 2px;
  color: #647985;
  font-size: 0.7rem;
}

.desktop-chat-panel header > span {
  width: auto;
  white-space: nowrap;
}

.desktop-chat-recent {
  max-height: 340px;
  overflow-y: auto;
}

.desktop-chat-recent > a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f3;
  color: inherit;
  text-decoration: none;
}

.desktop-chat-recent > a:hover,
.desktop-chat-recent > a:focus-visible,
.desktop-chat-recent > a.is-unread {
  background: #edf7f5;
}

.desktop-chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dfecef;
  color: #174d59;
  font-size: 0.7rem;
  font-weight: 800;
}

.desktop-chat-copy,
.desktop-chat-copy > span,
.desktop-chat-copy > small {
  min-width: 0;
}

.desktop-chat-copy > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.desktop-chat-copy strong {
  overflow: hidden;
  color: #173542;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-chat-copy time {
  flex: 0 0 auto;
  color: #7b8c94;
  font-size: 0.63rem;
}

.desktop-chat-copy > small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #667b86;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-chat-recent > a > em {
  min-width: 20px;
  height: 20px;
}

.desktop-chat-empty {
  padding: 28px 18px;
  text-align: center;
}

.desktop-chat-empty strong,
.desktop-chat-empty span {
  display: block;
}

.desktop-chat-empty strong {
  color: #173542;
  font-size: 0.84rem;
}

.desktop-chat-empty span {
  margin-top: 5px;
  color: #71848e;
  font-size: 0.72rem;
}

.desktop-chat-panel footer {
  border-top: 1px solid #dce5e9;
  background: #f8fafb;
}

.desktop-chat-panel footer .link-button {
  flex: 1 1 0;
  justify-content: center;
  min-height: 38px;
  font-size: 0.72rem;
}

@media (max-width: 760px), print {
  .desktop-chat-launcher {
    display: none;
  }
}

.communication-filter {
  padding: 14px 16px;
}

.communication-search {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.communication-search label,
.communication-compose-form label,
.message-composer label {
  margin: 0;
}

.communication-list {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.conversation-row {
  align-items: center;
  color: var(--text);
  display: grid;
  gap: 14px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 14px 16px;
  text-decoration: none;
}

.conversation-row + .conversation-row {
  border-top: 1px solid var(--border);
}

.conversation-row:hover,
.conversation-row:focus-visible {
  background: #f4f8f7;
  outline: none;
}

.conversation-row.is-unread {
  background: #eef7f5;
  box-shadow: inset 4px 0 0 var(--primary);
}

.conversation-avatar {
  align-items: center;
  background: #dcebe8;
  border: 1px solid #b8ceca;
  border-radius: 8px;
  color: #125a55;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.conversation-main,
.conversation-title-line,
.conversation-people,
.conversation-preview {
  min-width: 0;
}

.conversation-main {
  display: grid;
  gap: 4px;
}

.conversation-title-line {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.conversation-title-line strong {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-title-line time,
.conversation-people {
  color: var(--muted);
  font-size: 12px;
}

.conversation-preview {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-unread {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  min-width: 26px;
  padding: 0 7px;
}

.communication-empty {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: center;
  min-height: 180px;
}

.communication-compose-panel {
  margin: 0 auto;
  max-width: 900px;
}

.communication-compose-form {
  display: grid;
  gap: 16px;
}

.communication-compose-form small,
.support-ticket-table small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.communication-compose-form select[multiple] {
  min-height: 190px;
}

.communication-back-link {
  color: var(--primary);
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
  max-width: 980px;
  min-height: 220px;
}

.message-bubble {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: min(76%, 720px);
  min-width: 280px;
  padding: 12px 14px;
}

.message-bubble.is-own {
  align-self: flex-end;
  background: #e8f3f1;
  border-color: #b7d1cc;
}

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

.message-bubble header strong {
  font-size: 13px;
}

.message-bubble header time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.message-body {
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.message-attachment {
  align-items: center;
  background: rgba(255, 255, 255, .7);
  border: 1px solid #b9c9c7;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 10px;
  text-decoration: none;
}

.message-attachment span {
  align-items: center;
  background: var(--primary);
  border-radius: 5px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 27px;
  justify-content: center;
  width: 32px;
}

.message-attachment strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.message-composer {
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
}

.message-composer form {
  display: grid;
  gap: 12px;
}

.message-composer-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.support-meta-band {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
}

.support-meta-band > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.support-meta-band > div + div {
  border-left: 1px solid var(--border);
}

.support-meta-band span {
  color: var(--muted);
  font-size: 11px;
}

.support-detail-state {
  align-items: center;
  display: flex;
  gap: 8px;
}

.priority-badge {
  border-radius: 6px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 8px;
  white-space: nowrap;
}

.priority-low { background: #eef2f5; color: #52636b; }
.priority-normal { background: #e7f2ef; color: #176a63; }
.priority-high { background: #fff2d8; color: #8a5a00; }
.priority-critical { background: #fde8e5; color: #a12f22; }

.status-open { background: #e7f2ef; color: #176a63; }
.status-in_progress { background: #e7eef8; color: #315e91; }
.status-waiting_customer { background: #fff2d8; color: #8a5a00; }
.status-resolved { background: #e8f6ee; color: #1d6f43; }
.status-closed { background: #eef2f5; color: #52636b; }

.support-admin-strip {
  padding: 12px 14px;
}

.support-filter-form {
  align-items: end;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 310px) auto;
}

.support-filter-form button {
  min-width: 110px;
  width: auto;
}

.support-status-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 360px) auto;
  justify-content: start;
}

.support-status-form label {
  margin: 0;
}

.support-close-row {
  display: flex;
  justify-content: flex-end;
}

.two-col-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 850px) {
  .communication-search,
  .message-composer-actions,
  .support-filter-form,
  .support-status-form,
  .two-col-form {
    grid-template-columns: 1fr;
  }

  .communication-empty {
    align-content: center;
    display: grid;
    justify-items: center;
    padding: 24px 14px;
    text-align: center;
  }

  .communication-empty .link-button {
    max-width: 100%;
    white-space: normal;
  }

  .support-filter-form button {
    width: 100%;
  }

  .conversation-row {
    gap: 10px;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .conversation-avatar {
    height: 40px;
    width: 40px;
  }

  .conversation-title-line {
    align-items: flex-start;
    display: grid;
    gap: 2px;
  }

  .conversation-title-line time {
    grid-row: 2;
  }

  .conversation-preview {
    white-space: normal;
  }

  .message-bubble {
    max-width: 92%;
    min-width: 0;
  }

  .support-meta-band {
    grid-template-columns: 1fr;
  }

  .support-meta-band > div + div {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .support-detail-head {
    align-items: flex-start;
  }

  .support-ticket-table,
  .support-ticket-table tbody,
  .support-ticket-table tr,
  .support-ticket-table td {
    display: block;
    width: 100%;
  }

  .support-ticket-table thead {
    display: none;
  }

  .support-ticket-table tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .support-ticket-table td {
    border: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
    padding: 7px 0;
  }

  .support-ticket-table td[data-label]::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
  }

  .annual-document-sheet {
    overflow-x: auto;
  }

  .annual-document-header,
  .annual-document-summary,
  .annual-document-footer {
    min-width: 980px;
  }

  .annual-document-table {
    min-width: 980px;
  }

  .annual-form-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .gcu-upload-strip {
    grid-template-columns: 1fr;
  }

  .gcu-catalog-grid {
    grid-template-columns: 1fr;
  }

  .gcu-selection-summary {
    display: grid;
  }

  .quick-material-form {
    grid-template-columns: 1fr;
  }

  .checklist-consumables-title {
    display: block;
  }

  .checklist-consumable-depots {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .checklist-consumable-row {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .checklist-consumable-item,
  .checklist-consumable-row label:nth-of-type(4) {
    grid-column: 1 / -1;
  }

  .checklist-consumable-remove {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
  }

  .checklist-consumable-history li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .checklist-consumable-history li span:nth-child(n+3) {
    color: var(--muted);
    font-size: 11px;
  }
}

@page annual-landscape {
  size: A4 landscape;
  margin: 7mm;
}

@media print {
  .topbar,
  .drawer-toggle,
  .drawer-overlay,
  .side-drawer,
  .messages,
  .no-print {
    display: none !important;
  }

  body,
  .page {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .annual-document-sheet {
    border: 0;
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .annual-document-table thead {
    display: table-header-group;
  }

  .annual-document-table tr {
    break-inside: avoid;
  }
}
/* Sales and contract workspace */
.compact-stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.section-gap-sm {
  margin-top: 10px;
}

.operational-disclosure > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--ink, #122033);
  padding: 12px 14px;
  border: 1px solid #cbd6e1;
  border-radius: 6px;
  background: #f6f9fb;
}

.operational-disclosure > summary::-webkit-details-marker {
  display: none;
}

.operational-disclosure > summary::after {
  content: "+";
  float: right;
  color: #0f6b66;
  font-size: 18px;
}

.operational-disclosure[open] > summary::after {
  content: "−";
}

.disclosure-body {
  margin-top: 14px;
}

.quote-line-table input,
.quote-line-table select {
  width: 100%;
  min-width: 78px;
}

.quote-line-table td:nth-child(2) input {
  min-width: 260px;
}

.sticky-form-actions {
  position: sticky;
  bottom: 12px;
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  margin-top: 14px;
  border: 1px solid #cbd6e1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  z-index: 5;
}

.sales-quote-terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
}

.sales-quote-terms article {
  min-width: 0;
}

.sales-quote-terms h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

@media (max-width: 820px) {
  .compact-stat-grid,
  .sales-quote-terms {
    grid-template-columns: 1fr 1fr;
  }

  .quote-line-table {
    min-width: 720px;
  }
}

@media (max-width: 520px) {
  .compact-stat-grid,
  .sales-quote-terms {
    grid-template-columns: 1fr;
  }
}

/* Company owner personnel performance */
.personnel-performance-head .eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.performance-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(150px, .7fr) minmax(170px, .9fr) minmax(220px, 1.3fr) minmax(150px, .8fr) auto 38px;
  margin-bottom: 18px;
  padding: 16px;
}

.performance-filter label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.performance-filter input,
.performance-filter select {
  min-width: 0;
  width: 100%;
}

.performance-month-button {
  align-self: end;
  font-size: 25px;
  line-height: 1;
}

.performance-stats > div {
  border-top: 3px solid var(--primary);
}

.performance-stats small {
  font-size: 11px;
}

.performance-note {
  align-items: start;
  background: #eef7f5;
  border-left: 4px solid var(--primary);
  display: grid;
  gap: 4px 18px;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 4px 0 20px;
  padding: 13px 16px;
}

.performance-note strong {
  color: var(--primary-dark);
  white-space: nowrap;
}

.performance-note p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.performance-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 3fr) minmax(250px, .8fr);
}

.performance-table-panel,
.performance-departments {
  min-width: 0;
}

.performance-table {
  font-size: 13px;
  table-layout: auto;
  width: 100%;
}

.performance-table th {
  font-size: 11px;
  white-space: normal;
}

.performance-table td:not(:first-child) {
  text-align: center;
}

.performance-person {
  align-items: center;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 40px minmax(130px, 1fr);
  text-decoration: none;
}

.performance-person:hover strong,
.performance-person:focus-visible strong {
  color: var(--primary);
}

.performance-avatar {
  align-items: center;
  aspect-ratio: 1;
  background: #e6eef1;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary-dark);
  display: flex;
  font-size: 12px;
  justify-content: center;
  overflow: hidden;
  width: 40px;
}

.performance-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.performance-person small,
.performance-table td small {
  font-size: 10px;
  line-height: 1.3;
}

.metric-value {
  font-size: 17px;
}

.metric-warn {
  color: #a04e16;
}

.performance-bars {
  display: grid;
  gap: 15px;
  margin-top: 18px;
}

.performance-bar-row {
  display: grid;
  gap: 7px;
}

.performance-bar-row > span {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.performance-bar-row strong {
  font-size: 13px;
}

.performance-bar-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.performance-bar-row > i {
  background: #e6ecef;
  display: block;
  height: 7px;
  overflow: hidden;
}

.performance-bar-row > i > b {
  background: var(--primary);
  display: block;
  height: 100%;
}

@media (max-width: 1120px) {
  .performance-filter {
    grid-template-columns: 38px repeat(2, minmax(0, 1fr)) 38px;
  }

  .performance-search-field {
    grid-column: span 2;
  }

  .performance-filter .primary {
    width: 100%;
  }

  .performance-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 760px) {
  .performance-filter {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .performance-filter label,
  .performance-filter .primary,
  .performance-search-field {
    grid-column: 1 / -1;
  }

  .performance-filter .performance-month-button:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .performance-filter .performance-month-button:last-child {
    grid-column: 3;
    grid-row: 1;
  }

  .performance-filter label:first-of-type {
    grid-column: 2;
    grid-row: 1;
  }

  .performance-note {
    grid-template-columns: 1fr;
  }

  .performance-table,
  .performance-table tbody,
  .performance-table tr,
  .performance-table td {
    display: block;
    width: 100%;
  }

  .performance-table thead {
    display: none;
  }

  .performance-table tbody {
    display: grid;
    gap: 10px;
  }

  .performance-table tr {
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
  }

  .performance-table td,
  .performance-table td:not(:first-child) {
    border: 0;
    display: grid;
    gap: 3px;
    padding: 8px 4px;
    text-align: left;
  }

  .performance-table td:first-child {
    border-bottom: 1px solid var(--line);
    grid-column: 1 / -1;
    margin-bottom: 4px;
    padding-bottom: 12px;
  }

  .performance-table td[data-label]:not(:first-child)::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .performance-person {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .performance-avatar {
    width: 44px;
  }

.performance-bars {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Guided help assistant */
.help-assistant-launcher {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 175;
}

.help-assistant-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #0d5d57;
  border-radius: 50%;
  background: #126f67;
  color: #fff;
  box-shadow: 0 8px 24px rgb(18 55 67 / 22%);
  cursor: pointer;
}

.help-assistant-button span {
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.help-assistant-button:hover,
.help-assistant-button:focus-visible,
.help-assistant-button[aria-expanded="true"] {
  background: #0b514d;
  transform: translateY(-1px);
}

.help-assistant-panel {
  position: fixed;
  right: 22px;
  bottom: 144px;
  width: min(410px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 170px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #becbd1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 54px rgb(27 45 56 / 24%);
}

.help-assistant-panel[hidden],
.help-assistant-progress[hidden] {
  display: none;
}

.help-assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid #d6e0e4;
  background: #123f48;
  color: #fff;
}

.help-assistant-head div,
.help-assistant-head small,
.help-assistant-head strong {
  display: block;
}

.help-assistant-head small {
  margin-bottom: 3px;
  color: #c6e5df;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.help-assistant-head strong {
  font-size: 18px;
  line-height: 1.3;
}

.help-assistant-head > button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 23px;
  line-height: 1;
}

.help-assistant-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 12px;
  border-bottom: 1px solid #e0e7ea;
  background: #f5f8f8;
}

.help-assistant-progress button {
  padding: 6px 7px;
  border: 0;
  background: transparent;
  color: #126f67;
  font-size: 12px;
  font-weight: 700;
}

.help-assistant-progress span {
  min-width: 0;
  overflow: hidden;
  color: #4c5f68;
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-assistant-content {
  min-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.help-assistant-loading,
.help-assistant-empty {
  padding: 34px 14px;
  color: #60717a;
  text-align: center;
}

.help-assistant-intro {
  margin: 0 0 12px;
  color: #52656e;
  font-size: 14px;
  line-height: 1.5;
}

.help-assistant-context-label {
  display: block;
  margin: 14px 0 7px;
  color: #9a4e17;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.help-guide-list,
.help-choice-list {
  display: grid;
  gap: 8px;
}

.help-guide-button,
.help-choice-button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid #cfdbdf;
  border-radius: 6px;
  background: #fff;
  color: #18323b;
  text-align: left;
  cursor: pointer;
}

.help-guide-button:hover,
.help-guide-button:focus-visible,
.help-choice-button:hover,
.help-choice-button:focus-visible {
  border-color: #4c978f;
  background: #f0f8f6;
}

.help-guide-button > span,
.help-guide-button strong,
.help-guide-button small {
  min-width: 0;
  display: block;
}

.help-guide-button strong {
  font-size: 14px;
  line-height: 1.3;
}

.help-guide-button small {
  margin-top: 4px;
  color: #63747c;
  font-size: 12px;
  line-height: 1.4;
}

.help-guide-button > em {
  color: #126f67;
  font-size: 19px;
  font-style: normal;
}

.help-node-type {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #e6f1ef;
  color: #0f625c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.help-node-title {
  margin: 0;
  color: #152f38;
  font-size: 20px;
  line-height: 1.3;
}

.help-node-body {
  margin: 10px 0 16px;
  color: #465b64;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-line;
}

.help-choice-button {
  font-size: 14px;
  font-weight: 700;
}

.help-choice-button::after {
  content: "›";
  color: #126f67;
  font-size: 20px;
}

.help-node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e1e8ea;
}

.help-node-actions a {
  flex: 1 1 150px;
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #126f67;
  border-radius: 5px;
  color: #126f67;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.help-node-actions a.is-primary {
  background: #126f67;
  color: #fff;
}

.help-assistant-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid #dce5e8;
  background: #f7f9fa;
  font-size: 12px;
}

.help-assistant-footer a {
  color: #126f67;
  font-weight: 800;
}

.help-assistant-footer span {
  color: #75848b;
}

.help-center-group + .help-center-group {
  margin-top: 24px;
}

.help-center-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 10px;
}

.help-center-guide {
  display: block;
  padding: 15px 16px;
  border: 1px solid #d1dde1;
  border-radius: 6px;
  color: #1d3842;
  text-decoration: none;
}

.help-center-guide:hover,
.help-center-guide:focus-visible {
  border-color: #4c978f;
  background: #f3f8f7;
}

.help-center-guide strong,
.help-center-guide span {
  display: block;
}

.help-center-guide span {
  margin-top: 5px;
  color: #60727a;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .help-assistant-launcher {
    right: 12px;
    bottom: 14px;
  }

  .help-assistant-button {
    width: 46px;
    height: 46px;
  }

  .help-assistant-panel {
    right: 8px;
    bottom: 68px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 84px);
  }

  .help-assistant-content {
    min-height: 180px;
    padding: 13px;
  }

  .help-assistant-footer span {
    display: none;
  }
}

@media print {
  .help-assistant-launcher {
    display: none;
  }
}

/* Training library */
.training-page-header {
  align-items: flex-end;
}

.training-summary-band {
  align-items: center;
  background: #173f4a;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, auto) minmax(180px, 1fr) auto;
  margin: 18px 0 12px;
  padding: 16px 20px;
}

.training-summary-band div:first-child {
  display: flex;
  flex-direction: column;
}

.training-summary-band strong {
  font-size: 22px;
}

.training-summary-band span {
  color: #dce9ec;
  font-size: 13px;
}

.training-summary-band > b {
  font-size: 20px;
}

.training-progress {
  background: #dce5e8;
  border-radius: 2px;
  height: 7px;
  overflow: hidden;
  width: 100%;
}

.training-progress > span {
  background: #2f9a73;
  display: block;
  height: 100%;
  min-width: 0;
}

.training-role-line {
  color: #596b73;
  font-size: 13px;
  margin: 12px 0 20px;
}

.training-role-line strong {
  color: #263f48;
}

.training-document-list {
  display: grid;
  gap: 12px;
}

.training-document-card {
  align-items: center;
  background: #fff;
  border: 1px solid #cedadd;
  border-left: 4px solid #25756d;
  border-radius: 6px;
  display: grid;
  gap: 18px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.training-document-mark {
  align-items: center;
  background: #edf4f3;
  color: #1d665f;
  display: flex;
  font-size: 18px;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.training-document-copy h2 {
  color: #18323b;
  font-size: 19px;
  margin: 5px 0 0;
}

.training-document-copy p {
  line-height: 1.55;
  margin-top: 5px;
}

.training-document-meta {
  color: #687b82;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 7px 16px;
}

.training-document-progress {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(100px, 240px);
  margin-top: 12px;
}

.training-document-progress > span {
  color: #50666e;
  font-size: 12px;
  font-weight: 700;
}

.training-governance-note {
  border-left: 4px solid #c58b22;
  background: #fff8e8;
  margin: 18px 0;
  padding: 14px 18px;
}

.training-governance-note strong {
  color: #684810;
}

.training-governance-note p {
  color: #5f563f;
  line-height: 1.55;
  margin-top: 5px;
}

.training-document-toolbar {
  align-items: end;
  border-bottom: 1px solid #cfdadd;
  border-top: 1px solid #cfdadd;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 14px 0;
}

.training-search-form {
  flex: 1;
  max-width: 680px;
}

.training-search-form > label {
  color: #415860;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.training-search-form > div {
  align-items: center;
  display: flex;
  gap: 8px;
}

.training-search-form input {
  min-width: 0;
  width: 100%;
}

.training-search-form a {
  color: #246f68;
  font-size: 13px;
  font-weight: 700;
}

.training-document-score {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
}

.training-document-score strong {
  color: #1b665f;
  font-size: 24px;
}

.training-document-score span {
  color: #6b7b81;
  font-size: 12px;
}

.training-reader-layout {
  align-items: start;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
}

.training-contents {
  border-right: 1px solid #d3dde0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 16px;
  position: sticky;
  top: 86px;
}

.training-contents > strong {
  color: #233e47;
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.training-contents nav {
  display: grid;
  gap: 2px;
}

.training-contents a {
  align-items: start;
  border-left: 3px solid transparent;
  color: #4c626a;
  display: grid;
  font-size: 13px;
  gap: 9px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 8px 9px;
  text-decoration: none;
}

.training-contents a:hover,
.training-contents a:focus-visible {
  background: #f1f6f6;
  border-left-color: #347f78;
}

.training-contents a.is-read span {
  color: #23805d;
}

.training-contents a b {
  font-weight: 700;
  line-height: 1.35;
}

.training-chapters {
  min-width: 0;
}

.training-chapter {
  border-bottom: 2px solid #bfcdd1;
  margin-bottom: 34px;
  padding: 4px 0 34px;
  scroll-margin-top: 86px;
}

.training-chapter > header {
  align-items: start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.training-chapter-number {
  color: #33776f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.training-chapter h2 {
  color: #142f39;
  font-size: 25px;
  margin: 5px 0 0;
}

.training-chapter h3 {
  color: #28434c;
  font-size: 15px;
  margin: 0 0 9px;
}

.training-chapter > section {
  margin-top: 22px;
}

.training-chapter p,
.training-chapter li {
  color: #41565e;
  line-height: 1.65;
}

.training-chapter ul,
.training-chapter ol {
  margin: 0;
  padding-left: 24px;
}

.training-chapter li + li {
  margin-top: 7px;
}

.training-chapter-state {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
  white-space: nowrap;
}

.training-chapter-state strong {
  color: #a33b35;
  font-size: 12px;
}

.training-chapter-state span {
  color: #247755;
  font-size: 12px;
  font-weight: 800;
}

.training-field-checklist {
  border-left: 4px solid #31766f;
  padding-left: 17px;
}

.training-warning-list {
  background: #fff4ee;
  border-left: 4px solid #bd5b3c;
  padding: 14px 18px;
}

.training-warning-list li {
  color: #633c31;
}

.training-references {
  background: #f4f6f7;
  padding: 14px 18px;
}

.training-references li {
  color: #53666d;
  font-size: 13px;
}

.training-chapter > footer {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  min-height: 40px;
}

.training-chapter > footer > span {
  color: #247755;
  font-size: 13px;
  font-weight: 800;
}

.training-source-register {
  border-top: 3px solid #193f49;
  margin-top: 42px;
  padding-top: 20px;
}

.training-source-register h2 {
  margin-bottom: 4px;
}

.training-source-register > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
}

.training-source-register a {
  color: #176d65;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .training-summary-band,
  .training-document-card,
  .training-reader-layout {
    grid-template-columns: 1fr;
  }

  .training-document-mark {
    display: none;
  }

  .training-document-card > .link-button {
    justify-self: stretch;
    text-align: center;
  }

  .training-document-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .training-document-score {
    align-items: flex-start;
  }

  .training-contents {
    border-bottom: 1px solid #d3dde0;
    border-right: 0;
    max-height: 240px;
    padding: 0 0 12px;
    position: static;
  }
}

@media (max-width: 560px) {
  .training-summary-band {
    gap: 10px;
    padding: 14px;
  }

  .training-document-card {
    gap: 12px;
    padding: 15px;
  }

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

  .training-search-form > div {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .training-search-form input {
    flex-basis: 100%;
  }

  .training-chapter > header {
    flex-direction: column;
  }

  .training-chapter h2 {
    font-size: 21px;
  }

  .training-chapter-state {
    align-items: flex-start;
  }
}

.mobile-field-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.45fr);
}

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

.form-grid-2 .span-2 {
  grid-column: 1 / -1;
}

.form-grid-2 label {
  min-width: 0;
}

.form-grid-2 label > input,
.form-grid-2 label > select,
.form-grid-2 label > textarea {
  width: 100%;
}

.welding-work-control {
  border-left: 4px solid #1b6d66;
}

.welding-control-form {
  margin-top: 16px;
}

.welding-checkbox-field {
  align-items: center;
  align-self: end;
  border: 1px solid var(--line);
  display: flex;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
}

.welding-checkbox-field input {
  min-height: 18px;
  width: 18px;
}

.welding-method-field {
  border: 1px solid var(--line);
  margin: 0;
  padding: 10px 12px;
}

.welding-method-field ul {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.welding-method-field label {
  align-items: center;
  display: flex;
  gap: 7px;
}

.welding-method-field input {
  min-height: 18px;
  width: 18px;
}

.welding-control-summary {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.welding-control-summary > div {
  background: var(--surface-subtle, #f3f6f7);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
}

.welding-control-summary span,
.welding-evidence-list span {
  color: var(--muted);
  font-size: 12px;
}

.welding-evidence-list {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
}

.welding-evidence-list a {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

@media (max-width: 760px) {
  .welding-control-summary {
    grid-template-columns: 1fr;
  }

  .welding-method-field ul {
    grid-template-columns: 1fr;
  }
}

.table-subline {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
}

.link-button.compact {
  min-height: 34px;
  padding: 7px 10px;
}

@media (max-width: 980px) {
  .mobile-field-layout {
    grid-template-columns: 1fr;
  }
}

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

  .form-grid-2 .span-2 {
    grid-column: auto;
  }
}

.chassis-measurement-editor {
  overflow: hidden;
}

.chassis-measurement-reference {
  margin: 14px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.chassis-measurement-reference img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.chassis-measurement-reference figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.chassis-measurement-groups {
  display: grid;
  gap: 12px;
}

.chassis-measurement-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.chassis-measurement-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  background: #e7f2ef;
  border-bottom: 1px solid var(--line);
}

.chassis-measurement-group > header span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.chassis-measurement-point {
  display: grid;
  grid-template-columns: 92px minmax(120px, .8fr) minmax(120px, .7fr) 100px minmax(180px, 1.2fr);
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.chassis-measurement-point:last-child {
  border-bottom: 0;
}

.chassis-measurement-point label {
  min-width: 0;
}

.chassis-measurement-point label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.chassis-measurement-point input {
  width: 100%;
}

.chassis-code,
.chassis-position,
.chassis-result {
  min-width: 0;
  padding-bottom: 10px;
}

.chassis-code {
  color: #0f4f4a;
}

.chassis-result {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chassis-measurement-point.is-ok .chassis-result {
  color: #087443;
}

.chassis-measurement-point.is-reject {
  background: #fff1f2;
}

.chassis-measurement-point.is-reject .chassis-result {
  color: #a2192f;
}

@media (max-width: 760px) {
  .chassis-measurement-group > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .chassis-measurement-group > header span {
    text-align: left;
  }

  .chassis-measurement-point {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .chassis-code,
  .chassis-position,
  .chassis-result {
    padding-bottom: 0;
  }

  .chassis-measurement-point label,
  .chassis-note {
    grid-column: 1 / -1;
  }
}
.paint-material-workflow .panel {
  padding: 0;
  overflow: hidden;
}

.paint-material-workflow > .panel > .panel-title-row {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line, #d6dee5);
}

.paint-material-workflow .panel-title-row h2,
.paint-workflow-band h3 {
  margin: 0;
}

.paint-material-workflow .panel-title-row .help {
  margin: 5px 0 0;
}

.paint-workflow-band {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line, #d6dee5);
}

.paint-workflow-band:last-of-type {
  border-bottom: 0;
}

.paint-workflow-band h3 {
  margin-bottom: 14px;
  font-size: 16px;
}

.paint-material-form,
.paint-delivery-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
}

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

.paint-field > span {
  color: var(--muted, #536575);
  font-size: 12px;
  font-weight: 700;
}

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

.paint-form-action {
  display: flex;
  justify-content: flex-end;
}

.paint-form-action .primary {
  min-height: 42px;
  width: 100%;
}

.paint-delivery-list {
  display: grid;
  gap: 12px;
}

.paint-delivery-row {
  padding: 14px;
  border: 1px solid var(--line, #d6dee5);
  background: var(--surface-subtle, #f7f9fa);
}

.paint-delivery-item {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line, #d6dee5);
}

.paint-delivery-item span {
  color: var(--muted, #536575);
}

.paint-usage-table th,
.paint-usage-table td {
  white-space: normal;
  vertical-align: top;
}

.paint-request-history {
  margin: 16px 20px 20px;
  border: 1px solid var(--line, #d6dee5);
}

.paint-request-history summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
}

.paint-request-history .table-wrap {
  border-top: 1px solid var(--line, #d6dee5);
}

@media (max-width: 900px) {
  .paint-material-form,
  .paint-delivery-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .paint-material-workflow > .panel > .panel-title-row,
  .paint-workflow-band {
    padding: 14px;
  }

  .paint-material-form,
  .paint-delivery-row {
    grid-template-columns: 1fr;
  }

  .paint-field-wide,
  .paint-delivery-item {
    grid-column: 1;
  }

  .paint-delivery-item {
    display: grid;
  }

  .paint-request-history {
    margin: 14px;
  }
}
.axle-dispatch-form .table-wrap {
  max-height: 430px;
}

.axle-dispatch-fields {
  margin-top: 18px;
  align-items: end;
}

.axle-dispatch-fields label,
.dispatch-document-upload label {
  display: grid;
  gap: 6px;
}

.dispatch-batch-list {
  display: grid;
  gap: 18px;
}

.dispatch-batch {
  border: 1px solid #cbd5e1;
  border-left: 4px solid #176a63;
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.dispatch-batch.documents-overdue {
  border-left-color: #b42318;
  background: #fffafa;
}

.dispatch-batch > header,
.dispatch-document-state,
.dispatch-document-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dispatch-batch > header > div:first-child {
  display: grid;
  gap: 4px;
}

.dispatch-batch > header > div:first-child > strong {
  font-size: 17px;
}

.dispatch-batch > header span {
  color: #526274;
}

.dispatch-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dispatch-group-card {
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  padding: 13px;
  background: #f8fafc;
}

.dispatch-axle-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 12px;
}

.dispatch-axle-slots > a,
.dispatch-axle-slots > span {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #b9c7d3;
  border-radius: 4px;
  padding: 8px;
  background: #fff;
  color: #102235;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.dispatch-axle-slots > a:hover {
  border-color: #176a63;
  background: #eef8f6;
}

.dispatch-axle-slots small {
  color: #68798a;
}

.dispatch-axle-slots .empty {
  border-style: dashed;
  background: #f4f6f8;
  color: #8996a3;
}

.dispatch-document-upload {
  margin-top: 14px;
  border-top: 1px solid #d7e0e8;
  padding-top: 14px;
}

.status-badge.ready {
  color: #0b6b3a;
  background: #e9f8ef;
  border-color: #a9dfbd;
}

.status-badge.danger {
  color: #9f1d16;
  background: #fff0ef;
  border-color: #efb5b0;
}

@media (max-width: 760px) {
  .dispatch-axle-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dispatch-document-upload {
    align-items: stretch;
  }

  .dispatch-document-upload label,
  .dispatch-document-upload button {
    width: 100%;
  }
}

/* Depo kontrol merkezi */
.warehouse-command-head {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  justify-content: stretch;
}

.warehouse-depot-switcher {
  background: #f5f8fa;
  border: 1px solid #d7e0e7;
  border-radius: 6px;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.warehouse-depot-switcher label,
.warehouse-section-kicker {
  color: #526271;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.warehouse-depot-switcher select {
  background: #fff;
  font-weight: 700;
  min-height: 42px;
  width: 100%;
}

.warehouse-command-title {
  min-width: 0;
}

.warehouse-command-title p {
  align-items: center;
  display: flex;
  gap: 8px;
}

.warehouse-control-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.warehouse-stat-alert {
  border-color: #e3b341;
  box-shadow: inset 0 3px 0 #e3b341;
}

.warehouse-request-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
}

.warehouse-depot-request-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.warehouse-rule-panel {
  align-items: flex-start;
  background: #fff9e9;
  border-color: #ebcf81;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.warehouse-rule-panel h2 {
  font-size: 17px;
  margin: 0 0 6px;
}

.warehouse-rule-panel p {
  color: #62552f;
  line-height: 1.45;
  margin: 0;
}

.warehouse-rule-icon {
  align-items: center;
  background: #7b5c10;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.warehouse-inventory-title {
  align-items: end;
}

.warehouse-inventory-title h2,
.warehouse-request-layout h2,
.warehouse-page .panel-title-row h2 {
  margin-top: 3px;
}

.warehouse-stock-filters {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) auto;
  max-width: 680px;
  width: 100%;
}

.warehouse-inventory-table td strong,
.warehouse-request-table td strong {
  display: block;
}

.warehouse-inventory-table td small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.warehouse-quantity {
  font-size: 17px !important;
}

.warehouse-dispatch {
  min-width: 96px;
  position: relative;
}

.warehouse-dispatch summary {
  align-items: center;
  background: #fff;
  border: 1px solid #9fb2c3;
  border-radius: 6px;
  color: #183b56;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 6px 10px;
}

.warehouse-dispatch[open] summary {
  background: #eaf4f2;
  border-color: #77a9a2;
}

.warehouse-dispatch-form {
  background: #fff;
  border: 1px solid #aebdca;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(23, 43, 58, .18);
  display: grid;
  gap: 10px;
  min-width: 300px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
}

.warehouse-dispatch-form label {
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}

.warehouse-dispatch-form input,
.warehouse-dispatch-form select {
  width: 100%;
}

@media (max-width: 900px) {
  .warehouse-command-head,
  .warehouse-request-layout,
  .warehouse-depot-request-form,
  .warehouse-control-stats,
  .warehouse-stock-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .warehouse-dispatch-form {
    left: 0;
    min-width: min(300px, calc(100vw - 64px));
    right: auto;
  }
}

@media (max-width: 760px) {
  .warehouse-fulfillment-form {
    grid-template-columns: 1fr;
  }

  .warehouse-inventory-wrap,
  .warehouse-request-wrap,
  .warehouse-movement-wrap {
    overflow: visible;
  }

  .warehouse-inventory-table,
  .warehouse-inventory-table tbody,
  .warehouse-inventory-table tr,
  .warehouse-inventory-table td,
  .warehouse-request-table,
  .warehouse-request-table tbody,
  .warehouse-request-table tr,
  .warehouse-request-table td,
  .warehouse-movement-table,
  .warehouse-movement-table tbody,
  .warehouse-movement-table tr,
  .warehouse-movement-table td {
    display: block;
    width: 100%;
  }

  .warehouse-inventory-table thead,
  .warehouse-request-table thead,
  .warehouse-movement-table thead {
    display: none;
  }

  .warehouse-inventory-table tr,
  .warehouse-request-table tr,
  .warehouse-movement-table tr {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: visible;
  }

  .warehouse-inventory-table td,
  .warehouse-request-table td,
  .warehouse-movement-table td {
    align-items: start;
    background: #fff;
    border-bottom: 1px solid #e5ebf0;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    min-height: 42px;
    text-align: left;
  }

  .warehouse-inventory-table td::before,
  .warehouse-request-table td::before,
  .warehouse-movement-table td::before {
    color: #5c6c79;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .warehouse-inventory-table td:last-child,
  .warehouse-request-table td:last-child,
  .warehouse-movement-table td:last-child {
    border-bottom: 0;
  }

  .warehouse-inventory-table tr td[colspan],
  .warehouse-request-table tr td[colspan],
  .warehouse-movement-table tr td[colspan] {
    display: block;
  }

  .warehouse-inventory-table tr td[colspan]::before,
  .warehouse-request-table tr td[colspan]::before,
  .warehouse-movement-table tr td[colspan]::before {
    content: none;
  }

  .warehouse-number {
    text-align: left;
  }

  .warehouse-dispatch-form {
    box-shadow: none;
    margin-top: 8px;
    min-width: 0;
    position: static;
    width: 100%;
  }
}
.nominal-prefill-note {
  margin: 10px 0 14px;
  padding: 9px 12px;
  border-left: 3px solid #16756f;
  background: #eef8f6;
  color: #234b48;
  font-size: 0.88rem;
  line-height: 1.4;
}

.company-user-add-trigger svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.company-user-create-dialog {
  background: var(--panel);
  border: 1px solid #b9c8cd;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(20, 37, 45, .28);
  max-height: min(780px, 90vh);
  padding: 0;
  width: min(760px, calc(100vw - 28px));
}

.company-user-create-dialog::backdrop {
  background: rgba(18, 31, 37, .48);
}

.company-user-create-dialog-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.company-user-create-dialog-head h2 {
  margin: 0;
}

.company-user-create-dialog-head button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.company-user-create-dialog-head button:hover,
.company-user-create-dialog-head button:focus-visible {
  background: #eef3f4;
  color: var(--text);
  outline: none;
}

.company-user-create-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  max-height: calc(90vh - 66px);
  overflow-y: auto;
  padding: 16px;
}

.company-user-create-form > .errorlist,
.company-user-create-actions {
  grid-column: 1 / -1;
}

.company-user-create-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 14px;
}

@media (max-width: 680px) {
  .company-user-create-dialog {
    max-height: calc(100vh - 20px);
    width: calc(100vw - 20px);
  }

  .company-user-create-form {
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100vh - 86px);
  }

  .company-user-create-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .company-user-create-actions button {
    width: 100%;
  }
}

.lathe-intake-add-trigger svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.lathe-intake-dialog {
  background: var(--panel);
  border: 1px solid #b9c8cd;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(20, 37, 45, .3);
  max-height: min(880px, 94vh);
  padding: 0;
  width: min(1180px, calc(100vw - 32px));
}

.lathe-intake-dialog::backdrop {
  background: rgba(18, 31, 37, .5);
}

.lathe-intake-dialog-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
}

.lathe-intake-dialog-head h2 {
  font-size: 1.25rem;
  margin: 2px 0 0;
}

.lathe-intake-dialog-head > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.lathe-intake-dialog-head > button:hover,
.lathe-intake-dialog-head > button:focus-visible {
  background: #eef3f4;
  color: var(--text);
  outline: none;
}

.lathe-intake-form {
  margin: 0;
  max-height: calc(94vh - 68px);
  overflow-y: auto;
  padding: 16px 18px 18px;
}

.lathe-intake-form > .errorlist {
  margin: 0 0 12px;
}

.lathe-intake-count-panel {
  align-items: center;
  background: #eef7f5;
  border: 1px solid #b9d8d2;
  border-radius: 7px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.lathe-intake-count-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.lathe-intake-count-panel span {
  color: var(--muted);
  font-size: .82rem;
}

.lathe-axle-stepper {
  align-items: stretch;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 38px 72px 38px;
  height: 40px;
}

.lathe-axle-stepper button,
.lathe-axle-stepper input {
  border: 1px solid #a9bec2;
  border-radius: 0;
  font-weight: 700;
  height: 40px;
  margin: 0;
  min-width: 0;
  text-align: center;
  width: 100%;
}

.lathe-axle-stepper button {
  background: var(--panel);
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 1.15rem;
  padding: 0;
}

.lathe-axle-stepper button:first-child {
  border-radius: 6px 0 0 6px;
}

.lathe-axle-stepper button:last-child {
  border-radius: 0 6px 6px 0;
}

.lathe-axle-stepper input {
  border-left: 0;
  border-right: 0;
  padding: 4px;
}

.lathe-service-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lathe-service-fields label {
  min-width: 0;
}

.lathe-service-fields input:not([type="checkbox"]),
.lathe-service-fields select,
.lathe-service-fields textarea {
  width: 100%;
}

.lathe-default-toggle {
  align-items: center;
  display: flex;
  gap: 8px;
}

.lathe-default-toggle input {
  flex: 0 0 auto;
}

.lathe-default-toggle input[type="checkbox"],
.lathe-axle-entry-table input[type="checkbox"] {
  height: 20px;
  margin: 0;
  width: 20px;
}

.lathe-axle-entry-table-wrap {
  border: 1px solid var(--line);
  border-radius: 7px;
  max-height: 390px;
  overflow: auto;
}

.lathe-axle-entry-table {
  margin: 0;
  min-width: 980px;
}

.lathe-axle-entry-table thead th {
  background: #f5f7f8;
  position: sticky;
  top: 0;
  z-index: 1;
}

.lathe-axle-entry-table td {
  vertical-align: top;
}

.lathe-axle-entry-table input:not([type="checkbox"]),
.lathe-axle-entry-table select,
.lathe-axle-entry-table textarea {
  min-width: 0;
  width: 100%;
}

.lathe-axle-entry-table textarea {
  min-height: 42px;
  resize: vertical;
}

.lathe-axle-entry-table .errorlist {
  font-size: .72rem;
  margin: 0 0 4px;
}

.lathe-intake-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
}

.lathe-intake-actions > span {
  color: var(--muted);
  font-size: .86rem;
}

.lathe-intake-actions > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 760px) {
  .lathe-intake-dialog {
    max-height: calc(100vh - 16px);
    width: calc(100vw - 16px);
  }

  .lathe-intake-form {
    max-height: calc(100vh - 84px);
    padding: 12px;
  }

  .lathe-intake-count-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .lathe-axle-stepper {
    grid-template-columns: 44px minmax(72px, 1fr) 44px;
    width: 100%;
  }

  .lathe-service-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .lathe-axle-entry-table-wrap {
    border: 0;
    max-height: none;
    overflow: visible;
  }

  .lathe-axle-entry-table,
  .lathe-axle-entry-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .lathe-axle-entry-table thead {
    display: none;
  }

  .lathe-axle-entry-table tr {
    border: 1px solid var(--line);
    border-radius: 7px;
    display: grid;
    margin-bottom: 10px;
    overflow: hidden;
  }

  .lathe-axle-entry-table td {
    align-items: center;
    border: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(88px, .7fr) minmax(0, 1.3fr);
    min-width: 0;
    padding: 8px 10px;
    text-align: left;
  }

  .lathe-axle-entry-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: .74rem;
    font-weight: 700;
  }

  .lathe-axle-entry-table td:first-child {
    background: #f5f7f8;
    grid-template-columns: 1fr auto;
  }

  .lathe-axle-entry-table td:first-child::before {
    color: var(--text);
  }

  .lathe-axle-entry-table td:last-child {
    border-bottom: 0;
  }

  .lathe-axle-entry-table td.center input[type="checkbox"] {
    justify-self: start;
  }

  .lathe-intake-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .lathe-intake-actions > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lathe-intake-actions button {
    width: 100%;
  }
}
/* Firma bazli is emri ve vagon dosyasi sablon yonetimi */
.dossier-prefix-field,
.template-search-field {
  width: min(100%, 280px);
}

.compact-number-input {
  width: 72px;
}

.checklist-template-editor input[readonly] {
  border-style: dashed;
  background: var(--surface-muted, #f4f7f8);
  color: var(--muted, #52616b);
  cursor: not-allowed;
}

.dossier-settings-table td[data-label="Form içeriği"] small {
  display: block;
  margin-top: 8px;
  max-width: 220px;
}

.template-item-list {
  border-top: 1px solid var(--border, #d8e0e8);
}

.template-item-row {
  display: grid;
  grid-template-columns: 92px minmax(150px, .75fr) minmax(280px, 2fr) minmax(130px, .65fr) 118px 40px;
  gap: 12px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, #d8e0e8);
}

.template-item-row label,
.template-item-row label > span {
  min-width: 0;
}

.template-item-order {
  display: grid;
  grid-template-columns: 32px 28px 28px;
  gap: 2px;
  align-items: center;
}

.template-item-order strong {
  text-align: center;
}

.icon-action {
  width: 28px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--surface, #fff);
  color: inherit;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
}

.icon-action:disabled {
  opacity: .35;
  cursor: default;
}

.danger-action {
  color: #a11d27;
}

.template-item-active {
  align-self: center;
}

@media (max-width: 900px) {
  .template-item-row {
    grid-template-columns: 92px minmax(0, 1fr) minmax(130px, .55fr) 40px;
    align-items: end;
  }

  .template-item-text {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .template-item-row {
    grid-template-columns: 92px minmax(0, 1fr) 36px;
    gap: 9px;
  }

  .template-item-row > label:not(.template-item-active),
  .template-item-text {
    grid-column: 1 / -1;
  }

  .template-item-active {
    grid-column: 2;
  }

  .template-item-row > .danger-action {
    grid-column: 3;
  }
}

/* Yil kapanis uyum arsivi */
.compliance-process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compliance-process-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border, #d8e0e8);
  border-top: 4px solid #16756f;
  background: var(--surface, #fff);
  border-radius: 6px;
}

.compliance-process-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.compliance-process-head > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.compliance-process-head > div > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: #16756f;
  font-weight: 800;
  border-radius: 4px;
}

.compliance-process-head h2 {
  margin: 0;
  font-size: 18px;
}

.compliance-process-card > p,
.compliance-process-card ol {
  color: var(--muted, #5d6b79);
}

.compliance-process-card ol {
  padding-left: 22px;
  line-height: 1.7;
}

.compliance-process-record {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid #16756f;
  background: #f2f8f7;
}

.compliance-process-record strong,
.compliance-process-record span {
  display: block;
}

.compliance-process-record span {
  margin-top: 3px;
  color: var(--muted, #5d6b79);
  font-size: 13px;
}

.compliance-process-record.is-empty {
  border-left-color: #b7791f;
  background: #fff9e8;
}

@media (max-width: 800px) {
  .compliance-process-grid {
    grid-template-columns: 1fr;
  }
}

.annual-archive-alert {
  display: flex;
  gap: 10px 18px;
  align-items: baseline;
  border-left: 4px solid #b7791f;
  background: #fff9e8;
}

.annual-archive-create {
  margin-top: 16px;
}

.annual-archive-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.annual-archive-form label {
  width: min(100%, 260px);
}

.annual-archive-form select {
  width: 100%;
}

.annual-archive-privacy {
  margin: 14px 0 0;
  max-width: 960px;
}

.annual-archive-scope {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--border, #d8e0e8);
}

.annual-archive-scope > div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--border, #d8e0e8);
}

.annual-archive-scope > div:last-child {
  border-right: 0;
}

.annual-archive-scope strong,
.annual-archive-scope span,
.annual-archive-table td strong,
.annual-archive-table td small {
  display: block;
}

.annual-archive-scope span,
.annual-archive-table td small {
  margin-top: 4px;
  color: var(--muted, #5d6b79);
}

.annual-archive-hash {
  max-width: 230px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.annual-archive-status-ready {
  color: #0b6b43;
}

.annual-archive-status-failed {
  color: #a11d27;
}

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

  .annual-archive-scope > div:nth-child(2) {
    border-right: 0;
  }

  .annual-archive-scope > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border, #d8e0e8);
  }
}

@media (max-width: 600px) {
  .annual-archive-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .annual-archive-form,
  .annual-archive-form label,
  .annual-archive-form button {
    width: 100%;
  }

  .annual-archive-scope {
    grid-template-columns: 1fr;
  }

  .annual-archive-scope > div,
  .annual-archive-scope > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border, #d8e0e8);
  }

  .annual-archive-scope > div:last-child {
    border-bottom: 0;
  }
}
