:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef5f3;
  --ink: #1c2422;
  --muted: #6d7975;
  --line: #dce4e1;
  --brand: #157a6e;
  --brand-strong: #0b5d54;
  --blue: #2f6fbb;
  --amber: #c57b1c;
  --red: #b94343;
  --green: #27835f;
  --sidebar: #172421;
  --shadow: 0 16px 38px rgba(28, 36, 34, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 31, 29, 0.46);
}

.login-overlay.hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  outline: 0;
}

.login-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

button {
  cursor: pointer;
}

button:disabled,
.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  color: #f5faf8;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2bb99c;
  color: #10201d;
  font-weight: 800;
}

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

.brand span,
.shift-panel span,
.shift-panel small {
  color: rgba(245, 250, 248, 0.68);
  font-size: 13px;
}

.nav-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-button {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(245, 250, 248, 0.74);
  background: transparent;
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #c8f4e8;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.shift-panel {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin: 0;
  font-size: 16px;
}

.topbar-actions,
.toolbar-band,
.scan-row,
.dialog-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.search-box.wide {
  min-width: min(520px, 100%);
}

.language-box {
  grid-template-columns: auto minmax(92px, 1fr);
}

.search-box input,
.search-box select,
.scan-row input,
.stack-form input,
.stack-form select,
.stack-form textarea,
.dialog-card input,
.dialog-card select,
.select-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.search-box input {
  border: 0;
  min-width: 0;
  padding: 9px 0;
}

.inline-select {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
  padding: 9px 0;
}

.scan-row input,
.stack-form input,
.stack-form select,
.stack-form textarea,
.dialog-card input,
.dialog-card select,
.select-input {
  min-height: 42px;
  padding: 9px 11px;
}

.scan-row input {
  flex: 1 1 280px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 9px 14px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--brand);
}

.primary-button:hover {
  background: var(--brand-strong);
}

.ghost-button {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.icon-button {
  width: 40px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  font-size: 22px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.metric-card,
.panel,
.equipment-card,
.inventory-card,
.interface-card,
.sync-card,
.user-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 120px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

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

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 30px;
  font-weight: 800;
}

.metric-value small {
  color: var(--muted);
  font-size: 14px;
}

.metric-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.work-band,
.toolbar-band,
.execution-layout,
.preassembly-layout,
.trace-layout,
.quality-layout,
.settings-layout,
.access-layout,
.people-layout,
.engineering-layout,
.data-layout {
  margin-top: 16px;
}

.two-column,
.execution-layout,
.preassembly-layout,
.trace-layout,
.quality-layout,
.settings-layout,
.access-layout,
.people-layout,
.engineering-layout,
.data-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

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

.status-pill,
.count-badge,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.good,
.tag.good {
  color: #0e5b3e;
  background: #dff4ea;
}

.status-pill.warn,
.tag.warn {
  color: #7a4706;
  background: #fff0d5;
}

.status-pill.danger,
.tag.danger {
  color: #872f2f;
  background: #ffe2e2;
}

.status-pill.info,
.tag.info {
  color: #24598d;
  background: #e2eefb;
}

.count-badge {
  color: var(--brand-strong);
  background: #dff4ea;
}

.line-visual {
  width: 100%;
  display: block;
  min-height: 140px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f8f6;
}

.station-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.station-tile {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.station-tile strong,
.station-tile span {
  display: block;
}

.station-tile span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.alert-list,
.order-progress-list,
.event-feed,
.quality-list,
.module-list,
.performance-list,
.database-list,
.api-list,
.sop-list,
.permission-matrix,
.exception-list {
  display: grid;
  gap: 10px;
}

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

.alert-item,
.event-item,
.quality-item,
.module-item,
.permission-row,
.database-row,
.api-row,
.route-mini,
.exception-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.alert-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
}

.alert-mark {
  width: 8px;
  min-height: 100%;
  border-radius: 999px;
}

.alert-mark.high {
  background: var(--red);
}

.alert-mark.medium {
  background: var(--amber);
}

.alert-mark.low {
  background: var(--blue);
}

.alert-item strong,
.event-item strong,
.quality-item strong {
  display: block;
  margin-bottom: 5px;
}

.alert-item p,
.event-item p,
.quality-item p,
.module-item p,
.permission-row p,
.database-row p,
.api-row p,
.route-mini p,
.user-card p,
.exception-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.order-progress {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 220px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-progress:last-child {
  border-bottom: 0;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeec;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.trend-chart,
.defect-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 220px;
  padding: 10px 4px 0;
}

.trend-bar-wrap,
.defect-bar-wrap {
  flex: 1 1 0;
  min-width: 42px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.trend-bar,
.defect-bar {
  width: 100%;
  max-width: 46px;
  min-height: 20px;
  border-radius: 8px 8px 2px 2px;
  background: var(--green);
}

.trend-bar.warn {
  background: var(--amber);
}

.trend-bar-wrap span,
.defect-bar-wrap span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toolbar-band {
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.segmented button.active {
  color: #fff;
  background: var(--brand);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.compact-table table {
  min-width: 660px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: #f7faf9;
}

td {
  font-size: 14px;
}

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

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.small-button.primary {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

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

.route-step {
  min-height: 150px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.route-step.current {
  border-color: rgba(21, 122, 110, 0.5);
  background: #eef8f5;
}

.step-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.step-meta {
  color: var(--muted);
  font-size: 13px;
}

.trace-layout {
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
}

.preassembly-layout {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
}

.cover-code-card {
  min-height: 178px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(21, 122, 110, 0.48);
  border-radius: 8px;
  background: #eef8f5;
  margin-bottom: 12px;
}

.cover-code-card strong {
  font-size: 28px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.cover-code-card span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.cover-code-card .tag {
  justify-self: start;
}

.exception-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.closure-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

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

.summary-cell {
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.summary-cell span,
.summary-cell strong {
  display: block;
}

.summary-cell span {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px #dff4ea;
}

.timeline-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.timeline-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stack-form,
.dialog-card {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.stack-form label,
.dialog-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.standard-preview {
  min-height: 58px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px;
  border: 1px dashed rgba(21, 122, 110, 0.45);
  border-radius: 8px;
  background: #eef8f5;
}

.standard-preview strong,
.standard-preview span {
  display: block;
}

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

.standard-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.standard-editor label {
  display: grid;
  gap: 4px;
  min-width: 112px;
  color: var(--muted);
  font-size: 12px;
}

.standard-editor input {
  width: 112px;
  min-height: 36px;
  padding: 7px 9px;
}

.standard-preview .standard-unit,
.standard-preview .standard-separator {
  display: inline-block;
  padding-bottom: 9px;
  color: var(--muted);
}

.standard-editor .small-button {
  min-height: 36px;
}

.check-line {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-line input {
  width: 18px;
  min-height: 18px;
}

.defect-chart {
  min-height: 180px;
  margin-bottom: 16px;
}

.defect-bar {
  background: var(--blue);
}

.equipment-grid,
.inventory-grid,
.interface-grid,
.sync-grid,
.user-grid,
.requirement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}

.equipment-card,
.inventory-card,
.interface-card,
.sync-card,
.user-card,
.requirement-card {
  min-height: 210px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.inventory-card {
  min-height: 245px;
}

.interface-card,
.sync-card,
.user-card,
.requirement-card {
  min-height: 150px;
}

.requirement-card {
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.requirement-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.requirement-card li + li {
  margin-top: 6px;
}

.user-card.selected {
  border-color: rgba(21, 122, 110, 0.5);
  background: #eef8f5;
}

.oee-ring {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(var(--brand) var(--value), #e8eeec 0);
  font-size: 24px;
  font-weight: 800;
}

.equipment-head,
.inventory-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.inventory-level {
  display: grid;
  gap: 7px;
}

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

.settings-layout {
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
}

.module-item,
.permission-row,
.database-row,
.api-row,
.route-mini {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.permission-row,
.database-row {
  grid-template-columns: minmax(180px, 1fr) auto auto;
}

.api-row {
  grid-template-columns: 70px minmax(0, 1fr);
}

.route-mini {
  grid-template-columns: 30px minmax(0, 1fr);
}

.branch-route {
  border-style: dashed;
  background: #eef8f5;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.permission-tags span,
.method {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 4px 8px;
  color: var(--brand-strong);
  background: #dff4ea;
  font-size: 12px;
  font-weight: 800;
}

.method {
  color: #24598d;
  background: #e2eefb;
}

.barcode-card {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(21, 122, 110, 0.45);
  border-radius: 8px;
  background: #eef8f5;
  margin-bottom: 12px;
}

.barcode-card strong {
  font-size: 28px;
  letter-spacing: 0;
}

.barcode-card span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.compact-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.compact-form button {
  min-height: 42px;
}

.route-editor {
  display: grid;
  gap: 10px;
}

.route-config-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.route-config-note p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.route-config-row {
  display: grid;
  grid-template-columns: 34px minmax(130px, 1fr) minmax(130px, 0.9fr) minmax(120px, 0.75fr) 88px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.route-config-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-config-row input,
.route-config-row select,
.route-config-row textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.route-config-row textarea {
  resize: vertical;
}

.route-wide {
  grid-column: 2 / -1;
}

.route-step-controls {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

dialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(16, 26, 24, 0.42);
}

.dialog-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 6px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #182421;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  z-index: 20;
}

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

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .brand div:last-child,
  .nav-label,
  .shift-panel span,
  .shift-panel strong {
    display: none;
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .nav-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 10px;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .two-column,
  .execution-layout,
  .preassembly-layout,
  .trace-layout,
  .quality-layout,
  .settings-layout,
  .access-layout,
  .people-layout,
  .engineering-layout,
  .data-layout {
    grid-template-columns: 1fr;
  }

  .equipment-grid,
  .inventory-grid,
  .interface-grid,
  .sync-grid,
  .user-grid,
  .requirement-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .brand div:last-child,
  .nav-label,
  .shift-panel span,
  .shift-panel strong {
    display: block;
  }

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

  .nav-button {
    grid-template-columns: 28px 1fr;
    justify-items: start;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .toolbar-band {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .metric-grid,
  .metric-grid.compact,
  .station-strip,
  .route-board,
  .equipment-grid,
  .inventory-grid,
  .interface-grid,
  .sync-grid,
  .user-grid,
  .requirement-grid,
  .route-config-row,
  .trace-summary {
    grid-template-columns: 1fr;
  }

  .permission-row,
  .database-row,
  .api-row,
  .route-mini,
  .exception-item,
  .form-grid.two,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .permission-tags {
    justify-content: flex-start;
  }

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

  .route-wide,
  .route-step-controls {
    grid-column: 1;
  }
}
