:root {
  --burgundy: #912044;
  --burgundy-dark: #741733;
  --burgundy-soft: #f8edf1;
  --charcoal: #343638;
  --text: #434242;
  --muted: #74777a;
  --line: #dedfe1;
  --line-soft: #ebeced;
  --surface: #ffffff;
  --background: #f4f5f6;
  --success: #337357;
  --success-soft: #e9f4ee;
  --warning: #9a6717;
  --warning-soft: #fff4dc;
  --danger: #a33a3a;
  --danger-soft: #faeaea;
  --sidebar-width: 260px;
  color: var(--text);
  background: var(--background);
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--background);
  font-size: 15px;
  line-height: 1.45;
}

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

button,
a,
input,
select,
textarea {
  outline-color: var(--burgundy);
  outline-offset: 2px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar-toggle {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  min-height: 100vh;
  color: #fff;
  background: var(--charcoal);
  box-shadow: 8px 0 24px rgb(0 0 0 / 7%);
}

.brand-block {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.brand-link {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 4px;
  width: 4px;
  height: 52px;
  background: #b42a58;
  border-radius: 3px;
}

.brand-link strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.brand-link small {
  display: block;
  color: rgb(255 255 255 / 68%);
  font-size: 0.7rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.main-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 22px 14px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: rgb(255 255 255 / 75%);
  border-radius: 7px;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.nav-link:hover {
  color: #fff;
  background: rgb(255 255 255 / 7%);
}

.nav-link.is-active {
  color: #fff;
  background: var(--burgundy);
  box-shadow: inset 3px 0 #d66d91;
}

.nav-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.nav-link.is-active .nav-dot {
  background: currentColor;
}

.nav-section-label {
  margin: 14px 14px 2px;
  padding-top: 12px;
  color: rgb(255 255 255 / 52%);
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 18px 16px;
  background: rgb(0 0 0 / 14%);
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--burgundy);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
}

.user-copy {
  min-width: 0;
}

.sidebar-user .account-link,
.sidebar-user form { grid-column: 2; }

.user-copy strong,
.user-copy span {
  overflow-wrap: anywhere;
  display: block;
}

.user-copy strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy span {
  color: rgb(255 255 255 / 60%);
  font-size: 0.74rem;
}

.logout-button {
  padding: 6px;
  color: rgb(255 255 255 / 68%);
  background: transparent;
  border: 0;
  font-size: 0.76rem;
  cursor: pointer;
}

.logout-button:hover {
  color: #fff;
}

.app-surface {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 24px;
  align-items: center;
  min-height: 82px;
  padding: 13px clamp(20px, 3vw, 42px);
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 11px 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.menu-button > span:not(.visually-hidden) {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--charcoal);
}

.topbar-heading {
  min-width: 190px;
}

.prototype-label,
.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--burgundy);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-heading h1 {
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.15;
}

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

.plant-switcher {
  display: inline-flex;
  padding: 3px;
  background: #f0f1f2;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.plant-switcher button {
  min-height: 34px;
  padding: 6px 12px;
  color: #666;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
}

.plant-switcher button.is-active {
  color: var(--burgundy);
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 10%);
  font-weight: 700;
}

.topbar-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.topbar-user strong,
.topbar-user small {
  display: block;
  white-space: nowrap;
}

.topbar-user strong {
  color: var(--charcoal);
  font-size: 0.84rem;
}

.topbar-user small {
  color: var(--muted);
  font-size: 0.75rem;
}

.content-shell {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 30px clamp(20px, 3vw, 42px) 48px;
}

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

.metric-card {
  position: relative;
  min-height: 132px;
  padding: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgb(35 38 41 / 5%);
}

.metric-card--accent {
  border-top: 3px solid var(--burgundy);
}

.metric-label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-value {
  display: block;
  margin-bottom: 8px;
  color: var(--charcoal);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.metric-value em {
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
}

.metric-card small {
  color: var(--muted);
  font-size: 0.76rem;
}

.trend-positive {
  color: var(--success);
  font-weight: 700;
}

.panel {
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  box-shadow: 0 4px 18px rgb(35 38 41 / 5%);
}

.panel-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-header h2 {
  margin: 0 0 3px;
  color: var(--charcoal);
  font-size: 1.22rem;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.81rem;
}

.text-link,
.order-link,
.object-link {
  color: var(--burgundy);
  font-weight: 650;
  text-decoration: none;
}

.text-link {
  font-size: 0.82rem;
  white-space: nowrap;
}

.text-link:hover,
.order-link:hover,
.object-link:hover {
  text-decoration: underline;
}

/* Active orders registry: object text matches the neutral KMD style,
   while the project alias in parentheses keeps its burgundy emphasis. */
.orders-registry-table .object-link {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
}

.orders-registry-table .object-link .order-project-alias {
  color: var(--burgundy);
  font-weight: 650;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: #bbb transparent;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
  font-size: 0.82rem;
}

.data-table th {
  padding: 13px 12px;
  color: #636669;
  background: #f5f6f6;
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.data-table td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.clickable-row {
  transition: background-color 100ms ease;
}

.clickable-row:hover {
  background: #fcf8f9;
}

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

.orders-table th:first-child,
.orders-table td:first-child {
  padding-left: 22px;
}

.orders-table th:last-child,
.orders-table td:last-child {
  padding-right: 22px;
}

.number-cell {
  color: var(--charcoal);
  font-weight: 700;
  white-space: nowrap;
}

.stage-cell,
.readiness-cell {
  min-width: 78px;
}

.stage-cell strong,
.readiness-cell strong {
  display: block;
  margin-bottom: 6px;
  color: var(--charcoal);
  font-size: 0.78rem;
}

.readiness-cell strong {
  color: var(--burgundy);
  font-size: 0.9rem;
}

progress {
  display: block;
  width: 66px;
  height: 5px;
  overflow: hidden;
  appearance: none;
  background: #e3e4e5;
  border: 0;
  border-radius: 99px;
}

progress::-webkit-progress-bar {
  background: #e3e4e5;
  border-radius: 99px;
}

progress::-webkit-progress-value {
  background: var(--burgundy);
  border-radius: 99px;
}

progress::-moz-progress-bar {
  background: var(--burgundy);
  border-radius: 99px;
}

.readiness-cell progress {
  width: 76px;
  height: 7px;
}

.not-required {
  display: block;
  color: #a6a8aa;
  font-size: 1.1rem;
  font-weight: 700;
}

.stage-cell small {
  display: block;
  color: #9a9c9e;
  font-size: 0.65rem;
  white-space: nowrap;
}

.demo-note {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.demo-note > span {
  display: inline-grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid #aeb0b2;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
}

.page-toolbar {
  display: flex;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.filter-row {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

/* Native option text does not wrap consistently; keep the picker within the page
   and display the full selected order name in a separate wrapping line. */
.filter-row > .field.order-select-field {
  flex: 1 1 100%;
  grid-column: 1 / -1;
}

.field.order-select-field {
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

.order-select-field > select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.order-selected-name {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.orders-filters { margin-bottom: 24px; }
.orders-pagination { padding: 18px 22px; }

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

.field--wide {
  min-width: min(320px, 100%);
}

.field label {
  color: #676a6d;
  font-size: 0.72rem;
  font-weight: 650;
}

.field input,
.field select,
.quantity-input,
.comment-input {
  min-height: 40px;
  padding: 8px 11px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd1d3;
  border-radius: 6px;
}

.field input:focus,
.field select:focus,
.quantity-input:focus,
.comment-input:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgb(145 32 68 / 10%);
}

.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  color: #fff;
  background: var(--burgundy);
  border: 1px solid var(--burgundy);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button:hover {
  background: var(--burgundy-dark);
}

.button--secondary {
  color: var(--burgundy);
  background: #fff;
}

.button--secondary:hover {
  background: var(--burgundy-soft);
}

.button--ghost {
  color: var(--charcoal);
  background: #f5f6f6;
  border-color: #d9dbdc;
}

.button--ghost:hover {
  color: var(--burgundy);
  background: var(--burgundy-soft);
}

.button--success {
  background: var(--success);
  border-color: var(--success);
}

.button--danger-outline {
  color: var(--danger);
  background: #fff;
  border-color: #d5a3a3;
}

.button--small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.76rem;
}

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

.section-intro h2 {
  margin-bottom: 5px;
  color: var(--charcoal);
  font-size: 1.4rem;
}

.section-intro p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.order-heading {
  display: flex;
  gap: 22px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 22px;
  background: #fff;
  border-left: 4px solid var(--burgundy);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgb(35 38 41 / 5%);
}

.order-heading h2 {
  margin: 2px 0 5px;
  color: var(--charcoal);
  font-size: 1.5rem;
}

.order-heading p {
  margin: 0;
  color: var(--muted);
}

.order-heading .button {
  flex: 0 0 auto;
}

.order-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.order-metric {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

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

.order-metric span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.74rem;
}

.order-metric strong {
  color: var(--charcoal);
  font-size: 1.35rem;
}

.order-metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 18px;
}

.stage-card {
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.stage-card h3 {
  min-height: 38px;
  margin: 0 0 10px;
  color: var(--charcoal);
  font-size: 0.9rem;
}

.stage-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--burgundy);
  font-size: 1.25rem;
}

.stage-card p {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 0.76rem;
}

.stage-card progress {
  width: 100%;
  height: 7px;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 18px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 15px 14px 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.tab.is-active {
  color: var(--burgundy);
}

.tab.is-active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: "";
  background: var(--burgundy);
}

.quality-tabs {
  flex: 0 0 auto;
  padding: 0 8px;
  overflow: visible;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge--work {
  color: var(--burgundy);
  background: var(--burgundy-soft);
}

.status-badge--success {
  color: var(--success);
  background: var(--success-soft);
}

.status-badge--warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-badge--neutral {
  color: #666;
  background: #eceeef;
}

.work-grid,
.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.work-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--burgundy);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgb(35 38 41 / 4%);
}

.work-card-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.work-card h2,
.work-card h3 {
  margin: 0 0 3px;
  color: var(--charcoal);
  font-size: 1.2rem;
}

.work-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.work-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.work-stat {
  padding: 10px;
  background: #f6f7f7;
  border-radius: 6px;
}

.work-stat span,
.work-stat strong {
  display: block;
}

.work-stat span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.work-stat strong {
  color: var(--charcoal);
  font-size: 1rem;
}

.quick-action {
  display: flex;
  gap: 10px;
  align-items: end;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.quantity-field {
  display: grid;
  gap: 5px;
  width: 120px;
}

.quantity-field label {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 650;
}

.quantity-input {
  width: 100%;
  font-weight: 700;
}

.details-link {
  margin-left: auto;
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.details-link:hover {
  text-decoration: underline;
}

.quality-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(400px, 1.25fr);
  gap: 16px;
}

.queue-panel,
.inspection-panel {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgb(35 38 41 / 4%);
}

.queue-header,
.inspection-header {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.queue-header h2,
.inspection-header h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 1.05rem;
}

.queue-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}

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

.queue-item.is-selected {
  background: var(--burgundy-soft);
  box-shadow: inset 3px 0 var(--burgundy);
}

.queue-item strong {
  color: var(--charcoal);
}

.queue-item span,
.queue-item time {
  color: var(--muted);
  font-size: 0.72rem;
}

.queue-history-link {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
  color: var(--burgundy);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.queue-history-link:hover {
  text-decoration: underline;
}

.quality-history {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.quality-history-entry {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(260px, 1.4fr) minmax(220px, 1fr);
  gap: 18px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--burgundy);
  border-radius: 7px;
}

.quality-history-time strong,
.quality-history-time span {
  display: block;
}

.quality-history-time strong {
  margin-bottom: 5px;
  color: var(--charcoal);
}

.quality-history-time span {
  color: var(--muted);
  font-size: 0.74rem;
}

.quality-history-result p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 0.8rem;
}

.quality-history-entry dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.quality-history-entry dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.quality-history-entry dd {
  margin: 3px 0 0;
  color: var(--charcoal);
  font-size: 0.78rem;
  font-weight: 650;
}

.inspection-body {
  padding: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.detail-list div {
  padding: 11px 12px;
  background: #f6f7f7;
  border-radius: 6px;
}

.detail-list dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.detail-list dd {
  margin: 0;
  color: var(--charcoal);
  font-weight: 650;
}

.comment-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.comment-field label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.comment-input {
  width: 100%;
  min-height: 82px;
  resize: vertical;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.warehouse-card .work-card-header {
  margin-bottom: 14px;
}

.warehouse-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.warehouse-counts span {
  display: block;
  padding: 10px;
  color: var(--muted);
  background: #f6f7f7;
  border-radius: 6px;
  font-size: 0.69rem;
}

.warehouse-counts strong {
  display: block;
  margin-top: 3px;
  color: var(--charcoal);
  font-size: 1.05rem;
}

.registry-table {
  min-width: 900px;
}

.registry-table th:first-child,
.registry-table td:first-child {
  padding-left: 22px;
}

.registry-table th:last-child,
.registry-table td:last-child {
  padding-right: 22px;
}

.orders-table--summary {
  min-width: 1320px;
  table-layout: fixed;
}

.summary-order-column { width: 23%; }
.summary-weight-column { width: 6%; }
.summary-mtr-column { width: 13%; }
.summary-stage-column { width: 9%; }
.summary-action-column { width: 13%; }
.summary-documents { display: flex; flex-wrap: wrap; gap: 6px; }

.orders-table--summary th,
.orders-table--summary td {
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.orders-table--summary th,
.stage-table th {
  font-size: 0.75rem;
  letter-spacing: normal;
  white-space: normal;
}

.orders-table--summary progress {
  width: 100%;
}

.summary-total-label {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  text-transform: none;
}

.table-reference-text {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.bom-table {
  min-width: 1500px;
}

.bom-table th {
  white-space: normal;
}

.bom-table th:nth-child(2) {
  min-width: 200px;
}

.stage-table {
  min-width: 1050px;
  table-layout: fixed;
}

.ledger-mark-column { width: 24%; }
.ledger-plan-column { width: 7%; }
.ledger-completed-column { width: 10%; }
.ledger-remaining-column { width: 9%; }
.ledger-input-column { width: 18%; }
.ledger-actions-column { width: 15%; }
.ledger-reference-column { width: 17%; }

.preparation-stage-table {
  min-width: 1230px;
}

.preparation-stage-table .ledger-mark-column { width: 21%; }
.preparation-stage-table .ledger-post-column { width: 10%; }
.preparation-stage-table .ledger-plan-column { width: 6%; }
.preparation-stage-table .ledger-completed-column { width: 9%; }
.preparation-stage-table .ledger-remaining-column { width: 8%; }
.preparation-stage-table .ledger-input-column { width: 15%; }
.preparation-stage-table .ledger-actions-column { width: 15%; }
.preparation-stage-table .ledger-reference-column { width: 16%; }

.coating-stage-table {
  min-width: 1180px;
}

.coating-stage-table .ledger-mark-column { width: 21%; }
.coating-stage-table .ledger-plan-column { width: 7%; }
.coating-stage-table .ledger-completed-column { width: 9%; }
.coating-stage-table .ledger-remaining-column { width: 9%; }
.coating-stage-table .ledger-available-column { width: 9%; }
.coating-stage-table .ledger-input-column { width: 14%; }
.coating-stage-table .ledger-actions-column { width: 14%; }
.coating-stage-table .ledger-reference-column { width: 17%; }

.stage-table th,
.stage-table td {
  overflow-wrap: anywhere;
}

.stage-table .stage-preview {
  min-width: 0;
}

.stage-table .stage-input {
  max-width: 100%;
}

.stage-table .table-action-group {
  flex-direction: column;
  align-items: stretch;
  white-space: normal;
}

.stage-table .table-action-group .button {
  width: 100%;
  white-space: normal;
}

.stage-reference-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 6px 8px;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.stage-reference-values dt {
  color: var(--muted);
  font-weight: 400;
}

.stage-reference-values dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mark-route-table {
  min-width: 1120px;
}

.package-table,
.shipment-table {
  min-width: 900px;
}

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

.table-action-group {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.stage-input {
  width: 72px;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd1d3;
  border-radius: 6px;
  font: inherit;
}

.stage-input:focus {
  border-color: var(--burgundy);
  outline: none;
  box-shadow: 0 0 0 3px rgb(145 32 68 / 10%);
}

.workspace-tabs {
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  margin-bottom: 20px;
}

.workspace-tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.workspace-tab-label {
  position: relative;
  padding: 14px 22px 12px;
  color: var(--muted);
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.workspace-tab-label:nth-of-type(1) {
  border-radius: 8px 0 0 0;
}

.workspace-tab-label:nth-of-type(2) {
  border-radius: 0 8px 0 0;
}

.workspace-tab-input:focus-visible + .workspace-tab-label {
  outline: 2px solid var(--burgundy);
  outline-offset: -2px;
}

.workspace-tab-input:checked + .workspace-tab-label {
  color: var(--burgundy);
}

.workspace-tab-input:checked + .workspace-tab-label::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  content: "";
  background: var(--burgundy);
}

.workspace-tab-panel {
  display: none;
  grid-column: 1 / -1;
  padding-top: 14px;
}

#packages-tab:checked ~ .workspace-tab-panel--packages,
#shipping-tab:checked ~ .workspace-tab-panel--shipping {
  display: block;
}

.available-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.available-card {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.available-card strong,
.available-card span,
.available-card b,
.available-card small {
  display: block;
}

.available-card strong {
  margin-bottom: 4px;
  color: var(--burgundy);
  font-size: 1.05rem;
}

.available-card span,
.available-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.available-card p {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.available-card b {
  margin-bottom: 4px;
  color: var(--charcoal);
  font-size: 1rem;
}

.instance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.instance-summary article {
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

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

.instance-summary span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.instance-summary strong {
  color: var(--charcoal);
  font-size: 1.2rem;
}

.instance-list {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
}

.instance-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) max-content minmax(142px, max-content);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.instance-row.is-completed {
  background: #f4faf7;
  border-color: #d7e9df;
}

.instance-name strong,
.instance-name span {
  display: block;
}

.instance-name strong {
  margin-bottom: 3px;
  color: var(--charcoal);
}

.instance-name span {
  color: var(--muted);
  font-size: 0.7rem;
}

.package-form-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.package-form-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) minmax(90px, 0.65fr) 110px minmax(110px, 0.75fr) minmax(110px, 0.75fr) max-content;
  gap: 16px;
  align-items: end;
  padding: 15px 16px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.package-form-mark strong,
.package-form-mark span,
.package-form-value span,
.package-form-value strong {
  display: block;
}

.package-instances-link {
  align-self: end;
}

.package-form-mark strong {
  margin-bottom: 4px;
  color: var(--burgundy);
  font-size: 1.05rem;
}

.package-form-mark span,
.package-form-value span {
  color: var(--muted);
  font-size: 0.7rem;
}

.package-form-value strong {
  margin-top: 4px;
  color: var(--charcoal);
  font-size: 0.86rem;
}

.package-total {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 18px;
  background: #f5f6f6;
  border-top: 1px solid var(--line-soft);
}

.package-total span,
.package-total strong {
  display: block;
}

.package-total span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.package-total strong {
  color: var(--charcoal);
  font-size: 1.05rem;
}

.package-total-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.shipment-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 16px;
  padding: 22px;
}

.current-shipment {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.current-shipment article {
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.current-shipment span,
.current-shipment strong {
  display: block;
}

.current-shipment span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.current-shipment strong {
  color: var(--charcoal);
  font-size: 1.08rem;
}

.shipment-correction-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  padding: 22px;
}

.correction-reason {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.required-mark {
  margin-left: 4px;
  color: var(--danger);
  font-size: 0.68rem;
}

.history-notice {
  margin-bottom: 18px;
  padding: 17px 19px;
  color: var(--text);
  background: #f8f4ed;
  border: 1px solid #e6d9bf;
  border-left: 4px solid var(--warning);
  border-radius: 7px;
}

.history-notice strong,
.history-notice small {
  display: block;
}

.history-notice p {
  margin: 6px 0;
}

.history-notice small {
  color: var(--muted);
}

.package-instance-list {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.package-instance-row {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  cursor: pointer;
}

.package-instance-row:has(input:checked) {
  background: #f4faf7;
  border-color: #d7e9df;
}

.package-instance-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--burgundy);
}

.package-instance-row strong,
.package-instance-row small {
  display: block;
}

.package-instance-row strong {
  margin-bottom: 3px;
  color: var(--charcoal);
}

.package-instance-row small {
  color: var(--muted);
}

.package-instance-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 18px;
  background: #f5f6f6;
  border-top: 1px solid var(--line-soft);
}

.shipment-form-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 5px;
}

.vehicle-number {
  color: var(--charcoal);
  font-weight: 700;
  white-space: nowrap;
}

.warehouse-bom-table {
  min-width: 1060px;
}

.warehouse-bom-table .is-fully-shipped {
  background: #edf7f1;
}

.warehouse-bom-table .is-fully-shipped:hover {
  background: #e7f3ec;
}

.empty-state {
  display: grid;
  min-height: 390px;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.empty-state-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  color: var(--burgundy);
  background: var(--burgundy-soft);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
}

.empty-state h2 {
  margin-bottom: 8px;
  color: var(--charcoal);
}

.empty-state p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
}

.empty-state-action {
  margin-top: 20px;
}

.orders-registry-table,
.order-marks-table {
  min-width: 1050px;
}

.order-form {
  display: grid;
  gap: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
  gap: 18px;
  padding: 22px;
}

.validation-summary {
  margin-bottom: 18px;
  padding: 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 650;
}

.validation-summary:empty,
.validation-summary-valid {
  display: none;
}

.validation-summary ul {
  margin: 0;
  padding: 14px 18px 14px 36px;
  background: #fff4f4;
  border: 1px solid #e4bcbc;
  border-radius: 7px;
}

.validation-message {
  display: block;
  max-width: 190px;
  margin-top: 5px;
  color: var(--danger);
  font-size: 0.69rem;
  line-height: 1.3;
}

.validation-message:empty {
  display: none;
}

.input-validation-error {
  border-color: var(--danger) !important;
  background: #fffafa !important;
}

.bom-entry-table {
  min-width: 1420px;
}

.bom-entry-table td {
  vertical-align: top;
}

.table-input {
  width: 100%;
  min-width: 96px;
  min-height: 38px;
  padding: 7px 9px;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid #cfd1d3;
  border-radius: 6px;
  font: inherit;
}

.mark-code {
  min-width: 110px;
}

.mark-description {
  min-width: 230px;
}

.table-input:focus {
  border-color: var(--burgundy);
  outline: none;
  box-shadow: 0 0 0 3px rgb(145 32 68 / 10%);
}

.computed-value {
  color: var(--charcoal);
  font-weight: 700;
  white-space: nowrap;
}

.checkbox-cell {
  text-align: center;
}

.checkbox-cell input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 9px;
  accent-color: var(--burgundy);
}

.form-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: flex-end;
  padding: 16px 22px;
  color: var(--muted);
  background: #f5f6f6;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
}

.form-summary strong {
  color: var(--charcoal);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.import-file-error {
  max-width: none;
  padding: 0 22px 14px;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.import-summary article {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-top: 3px solid #8b8d8f;
  border-radius: 7px;
}

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

.import-summary span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.import-summary strong {
  color: var(--charcoal);
  font-size: 1.45rem;
}

.import-summary .import-summary--success {
  border-top-color: var(--success);
}

.import-summary .import-summary--error {
  border-top-color: var(--danger);
}

.import-file-errors {
  margin-bottom: 20px;
  padding: 18px 22px;
  color: #7a2929;
  background: #fff4f4;
  border: 1px solid #e4bcbc;
  border-radius: 8px;
}

.import-file-errors h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.import-file-errors ul {
  margin: 0;
  padding-left: 20px;
}

.import-preview-scroll {
  max-height: 560px;
  overflow: auto;
}

.import-preview-table {
  min-width: 1450px;
}

.import-preview-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.import-row-error {
  background: #fff6f6;
}

.import-result-cell {
  min-width: 260px;
  color: var(--danger);
}

.import-result-cell > span:not(.status-badge) {
  display: block;
  margin-bottom: 4px;
}

.button:disabled {
  color: #8c8e90;
  background: #e5e6e7;
  border-color: #d5d6d7;
  cursor: not-allowed;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 18px;
}

.page-message {
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 650;
}

.page-message--success {
  color: #28603c;
  background: #eef8f1;
  border-color: #b8d9c2;
}

.page-message--error {
  color: #7a2929;
  background: #fff4f4;
  border-color: #e4bcbc;
}

.page-message--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #e3c98f;
}

.stage-preview {
  display: block;
  min-width: 180px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.stage-table tr.is-completed,
.bom-table tr.is-completed,
.preparation-instance-row.is-completed {
  background: var(--success-soft);
}

.preparation-factory-field {
  min-width: 220px;
}

.preparation-page-message {
  margin: 0 22px 18px;
}

.preparation-instance-list {
  padding: 0 22px 22px;
}

.preparation-instance-row {
  grid-template-columns: auto minmax(180px, 1fr) minmax(180px, auto) auto;
  cursor: pointer;
}

.preparation-instance-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--burgundy);
}

.preparation-instance-row:has(input:checked) {
  border-color: var(--burgundy);
  background: var(--burgundy-soft);
}

.preparation-operation-details {
  display: grid;
  justify-items: end;
}

.preparation-operation-details small {
  color: var(--muted);
}

@media (max-width: 760px) {
  .preparation-instance-row {
    grid-template-columns: auto 1fr;
  }

  .preparation-operation-details,
  .preparation-instance-row .status-badge {
    grid-column: 2;
    justify-items: start;
  }
}

.edit-form-panel {
  max-width: 980px;
  margin-inline: auto;
}

.order-edit-form .history-notice,
.edit-history-notice {
  margin: 0 22px 22px;
}

.mark-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 18px;
  padding: 22px;
}

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

.calculated-field {
  justify-content: center;
  padding: 12px 14px;
  background: #f5f6f6;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.calculated-field span,
.calculated-field strong,
.calculated-field small {
  display: block;
}

.calculated-field span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.calculated-field strong {
  color: var(--charcoal);
  font-size: 1.15rem;
}

.calculated-field small,
.field-lock-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.field input[readonly] {
  color: #686b6d;
  background: #f0f1f1;
  cursor: not-allowed;
}

.coating-field > span {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.coating-field label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin: 7px 18px 0 0;
  font-size: 0.82rem;
  font-weight: 650;
}

.coating-field input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--burgundy);
}

.quantity-preview {
  display: none;
  margin: 0 22px 20px;
  padding: 13px 16px;
  color: #514b3c;
  background: #fffaf0;
  border: 1px solid #e4d7b5;
  border-radius: 7px;
  font-size: 0.78rem;
}

.quantity-preview.is-visible {
  display: block;
}

.danger-actions,
.danger-zone {
  margin-top: 22px;
  padding: 16px 20px;
  color: #6e3030;
  background: #fffafa;
  border: 1px solid #ead0d0;
  border-radius: 8px;
}

.danger-actions summary {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.danger-actions > div {
  padding-top: 14px;
}

.danger-actions h3,
.danger-zone h2 {
  margin: 0 0 7px;
  color: #6e3030;
  font-size: 1rem;
}

.danger-actions p,
.danger-zone p {
  margin: 0 0 13px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.item-card {
  padding: 16px;
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

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

.item-card span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.item-card strong {
  color: var(--charcoal);
  font-size: 1.05rem;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-card:nth-child(n + 4) {
    min-height: 116px;
  }

  .stage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {
  .topbar-user {
    display: none;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 244px;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .app-surface {
    margin-left: 0;
  }

  .menu-button {
    display: block;
  }

  .sidebar-toggle:checked + .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle:checked ~ .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    background: rgb(0 0 0 / 35%);
  }

  .quality-layout {
    grid-template-columns: 1fr;
  }

  .quality-history-entry {
    grid-template-columns: 1fr 1fr;
  }

  .quality-history-entry dl {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 16px;
  }

  .topbar-heading {
    flex: 1;
  }

  .topbar-tools {
    width: 100%;
    margin-left: 54px;
    overflow-x: auto;
  }

  .content-shell {
    padding: 20px 14px 38px;
  }

  .metric-grid,
  .order-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-card {
    min-height: 118px;
  }

  .work-grid,
  .warehouse-grid,
  .available-grid {
    grid-template-columns: 1fr;
  }

  .page-toolbar,
  .section-intro,
  .order-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

  .mark-edit-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .import-actions {
    justify-content: flex-start;
  }

  .field,
  .field--wide {
    min-width: 0;
  }

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

  .instance-row {
    grid-template-columns: 1fr max-content;
  }

  .instance-row .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .package-form-row {
    grid-template-columns: 1fr 1fr;
  }

  .package-form-mark {
    grid-column: 1 / -1;
  }

  .package-total {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .package-total-actions {
    width: 100%;
    margin-left: 0;
  }

  .shipment-correction-form {
    grid-template-columns: 1fr;
  }

  .correction-reason,
  .shipment-correction-form .shipment-form-actions {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .prototype-label {
    font-size: 0.6rem;
  }

  .topbar-tools {
    margin-left: 0;
  }

  .metric-grid,
  .order-metrics,
  .stage-grid,
  .import-summary,
  .mark-edit-grid,
  .filter-row,
  .detail-list,
  .instance-summary,
  .shipment-form,
  .current-shipment,
  .quality-history-entry {
    grid-template-columns: 1fr;
  }

  .mark-edit-grid .field--wide {
    grid-column: auto;
  }

  .metric-card {
    min-height: 108px;
  }

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

  .work-stats,
  .warehouse-counts {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .quick-action {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .details-link {
    display: flex;
    align-items: center;
    margin-left: 0;
  }

  .quantity-field {
    flex: 1;
    min-width: 90px;
  }

  .workspace-tab-label {
    padding-right: 16px;
    padding-left: 16px;
  }

  .table-action-group {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .instance-row {
    grid-template-columns: 1fr;
  }

  .package-form-row {
    grid-template-columns: 1fr;
  }

  .package-form-mark {
    grid-column: auto;
  }

  .package-total-actions,
  .shipment-form-actions,
  .package-instance-actions {
    flex-direction: column-reverse;
  }

  .quality-history-entry dl {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .package-instance-row {
    grid-template-columns: max-content 1fr;
  }

  .package-instance-row .status-badge {
    grid-column: 2;
    justify-self: start;
  }
}
/* Хронология производственных операций и проверок конкретного экземпляра. */
.history-list { display: grid; gap: 0.75rem; padding: 1rem; }

.page-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.page-tab {
  color: var(--color-text, #24323d);
  background: #eef2f4;
  border-radius: 0.55rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  font-weight: 700;
}

.page-tab.is-active {
  color: #fff;
  background: var(--color-primary, #8b1e24);
}

.history-entry {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  border: 1px solid #dfe5e8;
  border-radius: 0.6rem;
  background: #fff;
}

.history-entry div,
.history-entry span {
  display: grid;
  gap: 0.2rem;
}

.shipping-details-heading {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #dfe5e8;
}

.shipping-details-grid {
  align-items: start;
}

.packing-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.packing-status-grid article,
.packing-details-summary p {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid #dfe5e8;
  border-radius: 0.65rem;
  background: #fff;
}

.packing-status-grid span,
.packing-details-summary span {
  color: #66717a;
  font-size: 0.82rem;
}

.packing-details-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.packing-create-form {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.packing-list-state {
  display: inline-block;
  margin-top: 0.35rem;
  color: #9a5b0b;
}

.packing-list-state.is-current {
  color: #246b3c;
}

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

.signer-note {
  margin: 0;
  color: #66717a;
}

.table-total {
  background: #f4f6f7;
}

@media (max-width: 800px) {
  .packing-status-grid,
  .packing-details-summary {
    grid-template-columns: 1fr;
  }

  .packing-create-form {
    align-items: stretch;
    flex-direction: column;
  }
}
.history-item { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--border-color, #d9e0e7); border-radius: 0.75rem; background: #fff; }
.history-item h3 { margin: 0.2rem 0; }
.history-item p { margin: 0; color: #536273; }
.history-item time { white-space: nowrap; color: #536273; }
.history-item blockquote { margin: 0.75rem 0 0; padding: 0.65rem 0.8rem; border-left: 3px solid #c84b31; background: #fff5f2; }
.history-heading { align-items: end; }
.history-count { display: grid; min-width: 150px; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.history-count strong { font-size: 1.4rem; }
.history-count span { color: var(--muted); font-size: 0.82rem; }
.history-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 0.8rem; background: #fff; }
.history-filters label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.history-filters input, .history-filters select { width: 100%; }
.history-filter-actions { display: flex; align-items: end; gap: 0.5rem; }
.global-history-list { display: grid; gap: 0.55rem; }
.global-history-entry { display: grid; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.7rem; background: #fff; }
.global-history-entry header { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.global-history-entry time { color: var(--muted); font-variant-numeric: tabular-nums; }
.global-history-meta, .global-history-changes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.global-history-meta span, .global-history-changes p, .global-history-reason { display: grid; gap: 0.15rem; margin: 0; padding: 0.45rem 0.6rem; border-radius: 0.5rem; background: #f5f7f7; }
.global-history-entry small { color: var(--muted); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
.global-history-reason { border-left: 3px solid var(--color-primary); }
.history-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
@media (max-width: 900px) {
  .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .history-filters, .global-history-meta, .global-history-changes { grid-template-columns: 1fr; }
  .history-filter-actions, .history-pagination { align-items: stretch; flex-direction: column; }
}

/* Read-only management analytics contained within Archive Statistics. */
.archive-statistics {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 1rem;
}

.archive-statistics > *,
.archive-statistics .statistics-filters > *,
.archive-statistics .statistics-chart-grid,
.archive-statistics .statistics-chart__header > *,
.archive-statistics .statistics-chart__legend,
.archive-statistics .statistics-bars,
.archive-statistics .statistics-bar {
  min-width: 0;
}

.archive-statistics .statistics-filter-panel {
  margin: 0;
}

.archive-statistics .statistics-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 1fr)) auto;
  gap: 0.8rem;
  align-items: end;
}

.archive-statistics .statistics-filters .field {
  min-width: 0;
}

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

.archive-statistics .statistics-validation {
  grid-column: 1 / -1;
}

.archive-statistics .statistics-filter-actions,
.archive-statistics .statistics-toolbar,
.archive-statistics .statistics-metric-form,
.archive-statistics .statistics-chart__header,
.archive-statistics .statistics-chart__legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.archive-statistics .statistics-toolbar {
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--color-primary);
  border-radius: 0.75rem;
  background: #fff;
}

.archive-statistics .statistics-notice {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.archive-statistics .statistics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.archive-statistics .statistics-kpis article {
  display: grid;
  gap: 0.35rem;
  min-height: 118px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--color-primary);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 20px rgb(36 50 61 / 6%);
}

.archive-statistics .statistics-kpis span {
  min-height: 2.5em;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.archive-statistics .statistics-kpis strong {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.archive-statistics .statistics-kpis b {
  color: var(--color-primary);
  font-size: 1rem;
}

.archive-statistics .statistics-kpis small {
  color: var(--muted);
  font-size: 0.68em;
  font-weight: 700;
}

.archive-statistics .statistics-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.archive-statistics .statistics-chart {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 8px 20px rgb(36 50 61 / 5%);
}

.archive-statistics .statistics-chart__header {
  justify-content: space-between;
  min-height: 54px;
  margin-bottom: 0.6rem;
}

.archive-statistics .statistics-chart__header h3 {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 1.02rem;
  text-transform: uppercase;
}

.archive-statistics .statistics-chart__legend {
  justify-content: flex-end;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.72rem;
}

.archive-statistics .statistics-chart__legend span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 0.3rem;
  overflow-wrap: anywhere;
}

.archive-statistics .statistics-chart__legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.archive-statistics .statistics-line-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 230px;
}

.archive-statistics .statistics-chart__scale,
.archive-statistics .statistics-chart__period-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #66717a;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.archive-statistics .statistics-chart__scale {
  margin-top: -0.55rem;
}

.archive-statistics .statistics-chart__period-labels {
  margin-top: 0.3rem;
}

.archive-statistics .statistics-chart__gridline {
  stroke: #e2e6e8;
  stroke-width: 1;
}

.archive-statistics .statistics-chart__axis-label {
  fill: #66717a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.archive-statistics .statistics-chart__line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.archive-statistics .statistics-chart__point {
  cursor: help;
}

.archive-statistics .statistics-chart__point:focus {
  stroke: var(--burgundy-dark);
  stroke-width: 4;
}

.archive-statistics .statistics-chart__fallback {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.archive-statistics .statistics-chart__fallback summary {
  cursor: pointer;
  font-weight: 700;
}

.archive-statistics .statistics-metric-form {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.archive-statistics .statistics-metric-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.archive-statistics .statistics-metric-form select {
  min-width: 155px;
}

.archive-statistics .statistics-bars {
  display: grid;
  gap: 0.75rem;
  min-height: 230px;
  align-content: center;
  padding: 0.5rem 0;
}

.archive-statistics .statistics-bar {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(80px, 2fr) max-content;
  gap: 0.65rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.archive-statistics .statistics-bar > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.archive-statistics .statistics-bar__track {
  height: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f2;
}

.archive-statistics .statistics-bar__fill {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--burgundy);
}

.archive-statistics .statistics-bar strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.archive-statistics .statistics-summary {
  margin: 0;
}

@media (max-width: 1100px) {
  .archive-statistics .statistics-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-statistics .statistics-filter-actions {
    align-self: end;
  }
}

@media (max-width: 850px) {
  .archive-statistics .statistics-kpis,
  .archive-statistics .statistics-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-statistics .statistics-chart-grid {
    grid-template-columns: 1fr;
  }

  .archive-statistics .statistics-toolbar,
  .archive-statistics .statistics-chart__header,
  .archive-statistics .statistics-chart__header--factory {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-statistics .statistics-chart__legend {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .archive-statistics .statistics-filters,
  .archive-statistics .statistics-kpis {
    grid-template-columns: 1fr;
  }

  .archive-statistics .statistics-filter-actions,
  .archive-statistics .statistics-toolbar .button,
  .archive-statistics .statistics-metric-form {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-statistics .statistics-bar {
    grid-template-columns: 1fr auto;
  }

  .archive-statistics .statistics-bar__track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
.identity-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #eef3f1 0%, #f8faf9 55%, #e7efec 100%);
}

.identity-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.identity-card {
  width: min(100%, 520px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgb(23 53 46 / 10%);
}

.identity-card h2 { margin: 8px 0; }
.identity-card > p { color: var(--muted); }
.identity-form { display: grid; gap: 18px; margin-top: 24px; }
.identity-card .form-actions { flex-wrap: wrap; }

.password-assignment { min-width: 0; }
.password-manual-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 18px 0; }
.password-manual-fields[hidden] { display: none; }
.password-manual-fields .field { min-width: 0; }
.password-manual-fields input { width: 100%; min-width: 0; max-width: 100%; }
.password-manual-fields .form-note { margin: 0; }

.validation-banner {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #e9aaa4;
  border-radius: 9px;
  color: #8d2920;
  background: #fff3f1;
}

.validation-banner:empty { display: none; }
.field-validation-error { color: #9f2f27; font-size: .82rem; }
.form-note { color: var(--muted); font-size: .88rem; }

.check-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 5px 18px 5px 0;
  cursor: pointer;
}

.check-option input { width: 18px; height: 18px; accent-color: var(--accent); }

.factory-choice-list { display: grid; gap: 12px; margin-top: 22px; }
.factory-choice-list form { margin: 0; }
.factory-choice {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf9;
  color: var(--ink);
  text-align: left;
}
.factory-choice:hover { border-color: var(--accent); background: #eef6f3; }
.factory-choice span { color: var(--muted); font-size: .82rem; }

.current-factory {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 10px;
  align-items: baseline;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.current-factory > span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.current-factory > a { grid-column: 1 / -1; color: var(--accent); font-size: .76rem; }
.account-link { color: #dce9e5; font-size: .76rem; }
.sidebar-user form { margin: 0; }

.identity-table-wrap { overflow-x: auto; padding: 0; }
.identity-table { width: 100%; border-collapse: collapse; }
.identity-table th, .identity-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.identity-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.identity-table td small { display: block; margin-top: 4px; color: var(--muted); }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.user-account-table .table-actions { display: table-cell; width: 190px; }
.user-account-table .table-actions .button { white-space: normal; max-width: 100%; margin-bottom: 6px; }
.choice-group { margin: 22px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.choice-group legend { padding: 0 7px; font-weight: 700; }
.user-edit-form { padding: 24px; }
.factory-admin-table { min-width: 820px; }
.factory-admin-table form { margin: 0; }
.factory-row--inactive { color: var(--muted); background: #f5f6f6; }
.factory-admin-note { margin-top: 18px; padding: 20px 24px; border-left: 4px solid #8a9291; }
.factory-admin-note h3 { margin: 0 0 7px; }
.factory-admin-note p { margin: 0; color: var(--muted); }
.factory-edit-form .readonly-value {
  display: block;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f6f6;
}
.factory-system-data { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.factory-system-data div { min-width: 180px; padding: 12px 14px; border-radius: 8px; background: #f5f6f6; }
.factory-system-data dt { color: var(--muted); font-size: .74rem; }
.factory-system-data dd { margin: 4px 0 0; font-weight: 700; }
.inactive-assignments { margin: 22px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f8; }
.inactive-assignments h3 { margin: 0 0 6px; font-size: 1rem; }
.inactive-assignments p { margin: 0 0 12px; color: var(--muted); }
.inactive-assignments ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.inactive-assignments li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inactive-assignments li > span:not(.status-pill) { color: var(--muted); font-size: .82rem; }
.temporary-password { margin: 24px 0; padding: 24px; border: 1px solid #92c8b5; border-radius: 12px; background: #eff9f5; }
.temporary-password code, .temporary-password-value { display: block; width: fit-content; margin: 16px 0; padding: 12px 16px; border-radius: 7px; background: #153b32; color: #fff; font-size: 1.1rem; letter-spacing: .04em; }
.status-muted { background: #eef0f0; color: #606969; }

/* Informational monthly shipment planning, using the existing VZMK palette. */
.shipment-plan-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.shipment-plan-calendar { min-width: 0; overflow: hidden; }
.shipment-plan-controls, .shipment-plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shipment-plan-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.shipment-plan-weekday { padding: 12px 4px; text-align: center; font-size: .8rem; color: var(--muted); background: var(--background); }
.shipment-plan-day, .shipment-plan-blank { min-height: 110px; border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.shipment-plan-day { display: block; padding: 8px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.shipment-plan-day:hover { background: var(--background); }
.shipment-plan-day.is-selected { background: var(--burgundy-soft); box-shadow: inset 0 0 0 2px var(--burgundy); }
.shipment-plan-date { display: inline-block; margin-bottom: 5px; font-size: .85rem; }
.shipment-plan-day.is-today .shipment-plan-date { color: var(--burgundy); text-decoration: underline; }
.shipment-plan-mini { display: block; min-width: 0; max-width: 100%; overflow: hidden; margin: 4px 0; padding: 5px; border-left: 3px solid var(--burgundy); border-radius: 3px; background: var(--surface); font-size: .7rem; line-height: 1.4; }
.shipment-plan-mini > span, .shipment-plan-mini > strong { display: block; }
.shipment-plan-order { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipment-plan-entry { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.shipment-plan-factory { margin: 4px 0; color: var(--burgundy); font-size: .8rem; font-weight: 650; }
.shipment-plan-entry h3 { margin: 6px 0; font-size: 1rem; }
.shipment-plan-entry p { margin: 8px 0; font-size: .85rem; }
.shipment-plan-note { white-space: pre-wrap; }
.shipment-plan-weight-unknown { color: var(--muted); }
.shipment-plan-actions { margin-top: 14px; }
.shipment-plan-actions form { margin: 0; }
.shipment-plan-total { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.shipment-plan-total > div { text-align: right; }
.shipment-plan-total > div > span { display: block; color: var(--muted); }
.shipment-plan-empty { padding: 18px 22px; color: var(--muted); }
@media (max-width: 1100px) { .shipment-plan-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .shipment-plan-calendar .panel-header { flex-wrap: wrap; padding: 14px; }
  .shipment-plan-day { padding: 4px; }
  .shipment-plan-mini { padding: 3px; font-size: .6rem; border-left-width: 2px; }
  .shipment-plan-day, .shipment-plan-blank { min-height: 75px; }
}

@media (max-width: 900px) {
  .current-factory { display: none; }
  .identity-table { min-width: 980px; }
}

.order-project-alias { color: var(--burgundy); }
.sticky-table-header { position: fixed; z-index: 19; overflow: hidden; pointer-events: auto; touch-action: pan-y pinch-zoom; background: #fff; }
.sticky-table-header[hidden] { display: none; }
.sticky-table-header table { table-layout: fixed; margin: 0; }
.sticky-table-header th { box-sizing: border-box; }
@media print { .sticky-table-header { display: none; } }
