:root {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #1d3563;
  background: #dce5f5;
  font-synthesis: none;
  --primary: #2354ba;
  --border: #9caccc;
  --muted: #4a6390;
  --success: #188344;
  --danger: #c3293b;
  --surface: #e4ebf8;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  min-height: 32px;
  padding: 5px 13px;
  border: 1px solid #91a7c9;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #2a63c9;
  outline-offset: 2px;
}
input,
select,
textarea {
  min-width: 0;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #a5b6d0;
  border-radius: 0;
  background: white;
  color: #243958;
}
input,
select {
  height: 34px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 21px;
  font-weight: 600;
}
h2,
h3 {
  font-size: 14px;
  font-weight: 600;
}
small,
.muted {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.primary {
  background: #d8e6fb;
  border-color: #7395c8;
  color: #153f88;
}
.primary:hover:enabled {
  background: #c8dcfb;
}
.secondary {
  background: #e7edf6;
  border-color: #a0b0c9;
  color: #2c466c;
}
.secondary:hover:enabled {
  background: #dbe5f4;
}
.text-button {
  padding-inline: 7px;
  color: #234d91;
  background: transparent;
  border-color: transparent;
}
.text-link,
.login-demo-link {
  color: #2354ba;
  text-decoration: none;
}
.text-link:hover,
.login-demo-link:hover {
  text-decoration: underline;
}
.danger {
  color: #a81f31;
  border-color: #cf7c86;
  background: #fbe5e7;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.top {
  display: flex;
  flex: 0 0 28px;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  border-bottom: 1px solid #173f82;
  color: white;
  background: #345f9e;
}
.brand {
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  margin-left: 12px;
  color: #e4edfc;
  font-size: 12px;
  font-weight: 400;
}
.top-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.top-right .text-button,
.top-right .text-link {
  min-height: 22px;
  padding-block: 1px;
  color: white;
  font-size: 11px;
}
.mock-label {
  padding: 1px 5px;
  border: 1px solid #d9e6fa;
  background: #e9f0fc;
  color: #6e4200;
  font-size: 11px;
  line-height: 17px;
  white-space: nowrap;
}
.network {
  color: #e4edfc;
  white-space: nowrap;
}
.network.offline {
  padding: 1px 4px;
  background: #fff0f0;
  color: #ab1830;
}
main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  overflow: hidden;
}
#station-panel,
.station-content {
  height: 100%;
  min-width: 0;
  min-height: 0;
}
#station-panel {
  position: relative;
}
.active-workspace {
  display: grid;
  grid-template-columns: 9.2% minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.panel {
  min-width: 0;
  min-height: 0;
}
.weight-panel {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0 4px;
  border-right: 1px solid var(--border);
  background: #dde6f6;
}
.scale-target {
  position: absolute;
  top: 22%;
  right: 3px;
  left: 3px;
  min-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.scale-target strong {
  display: block;
  overflow: hidden;
  color: #29467d;
  font-size: 13px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.weight-gauge {
  position: absolute;
  top: 27%;
  left: 25%;
  width: 50%;
  height: 30%;
  min-height: 0;
}
.recipe-bar {
  position: absolute;
  overflow: hidden;
  border: 1px solid #879ab8;
  background: #d6deeb;
}
.recipe-segments {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.recipe-segment {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.recipe-segment::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: #fff;
  opacity: 0.85;
  pointer-events: none;
}
.segment-fill {
  position: absolute;
  inset: 0;
  background: #e9c423;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.12s linear;
}
.segment-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #5a4d19;
  font-size: 10px;
  line-height: 1;
}
.scale-value {
  position: absolute;
  top: 60%;
  right: 2px;
  left: 2px;
  min-width: 0;
  text-align: center;
}
.scale-value > small {
  display: block;
  margin-bottom: 4px;
  color: #37558c;
  font-size: 12px;
  line-height: 18px;
}
.weight-number {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #b84967;
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#weight {
  max-width: 100%;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -1.5px;
}
.weight-number small {
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}
.ready-badge {
  position: absolute;
  top: 75%;
  right: 3px;
  left: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 5px;
  max-width: 100%;
  min-height: 28px;
  color: #5c6d86;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
.ready-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}
.weight-panel.ready .weight-number,
.weight-panel.ready .ready-badge {
  color: var(--success);
}
.weight-panel.error .weight-number,
.weight-panel.error .ready-badge {
  color: var(--danger);
}
.weight-panel.offline .weight-number,
.weight-panel.offline .ready-badge {
  color: #7a8799;
}
.weight-panel.ready .recipe-segment.current .segment-fill {
  background: #25a34f;
}
.weight-panel.error .recipe-segment.current .segment-fill {
  background: #d8384a;
}
.weight-panel.offline .segment-fill {
  background: #98a4b7;
}
.pass-indicator {
  position: absolute;
  z-index: 3;
  top: 40%;
  right: 3px;
  left: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 3px;
  border: 1px solid #136631;
  background: #188344;
  color: white;
  pointer-events: none;
}
.pass-indicator strong {
  font-size: 32px;
  line-height: 1;
}
.pass-indicator span {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
}
.task-area {
  display: grid;
  grid-template-rows: 164px 142px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}
.workspace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  min-width: 0;
  border-bottom: 1px solid var(--border);
}
.production-dossier {
  position: relative;
  min-width: 0;
  padding: 0 10px 5px;
}
.section-caption {
  display: inline-block;
  padding: 0 4px;
  color: #3b5d9d;
  background: #e4ebf8;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.production-dossier > .section-caption {
  display: none;
}
.instrument-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 23px;
  color: #405e97;
  font-size: 12px;
  line-height: 23px;
  white-space: nowrap;
}
.instrument-strip > span:first-child {
  margin-right: 1px;
}
.dossier-body {
  display: block;
  min-width: 0;
}
.dossier-top-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  height: 34px;
}
.batch-entry {
  display: flex;
  flex: 0 1 58%;
  min-width: 0;
  align-items: center;
  gap: 5px;
}
.batch-entry button {
  flex: 0 0 75px;
  min-height: 26px;
  height: 26px;
  padding: 2px 6px;
  font-size: 12px;
}
.batch-entry input {
  height: 25px;
  min-width: 0;
  padding: 2px 6px;
  border-color: #9eb1d2;
  background: #e2e9f8;
  color: #36568d;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
}
.task-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.task-field {
  display: flex;
  min-width: 0;
  min-height: 29px;
  align-items: baseline;
  gap: 12px;
  line-height: 29px;
}
.task-field > span {
  flex: 0 0 66px;
  color: #4a6390;
  font-size: 13px;
}
.task-field strong,
.task-field b {
  min-width: 0;
  overflow: hidden;
  color: #294b85;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-count {
  min-width: 0;
  color: #294b85;
  font-variant-numeric: tabular-nums;
}
.plan-total {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.plan-total > span {
  color: #31548e;
  font-size: 20px;
}
.plan-total strong {
  color: #2c4c91;
  font-size: 23px;
  font-weight: 600;
  line-height: 30px;
}
.plan-total small {
  margin-left: 3px;
  color: #526784;
  font-size: 12px;
}
.current-cycle {
  margin-top: 0;
  color: #6c7fa2;
  font-size: 11px;
  line-height: 18px;
}
.current-cycle b {
  color: #45639b;
  font-size: 12px;
  font-weight: 500;
}
.dossier-note {
  display: none;
}
.terminal-actions,
.feed-actions {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: transparent;
}
.terminal-actions > button,
.terminal-actions > a,
.feed-actions > button,
.feed-actions > a,
.batch-entry > button,
.terminal-actions > .text-button {
  display: flex;
  min-height: 33px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #7c9ac9;
  border-radius: 1px;
  box-shadow:
    inset 0 1px #f4f8ff,
    inset 0 -1px #bdd2f3;
  background: linear-gradient(
    180deg,
    #edf4ff 0%,
    #b9d2f5 44%,
    #8fb4e9 52%,
    #c4dcfb 100%
  );
  color: #19477e;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
}
.batch-entry > button {
  min-height: 26px;
  height: 26px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 20px;
}
.terminal-actions > button:hover:enabled,
.feed-actions > button:hover:enabled,
.feed-actions > a:hover,
.batch-entry > button:hover:enabled {
  border-color: #4c76b5;
  background: linear-gradient(
    180deg,
    #f6faff 0%,
    #bfd8fb 44%,
    #99c0f5 52%,
    #d7e8ff 100%
  );
}
.terminal-actions > button:active:enabled,
.feed-actions > button:active:enabled,
.feed-actions > a:active,
.batch-entry > button:active:enabled {
  box-shadow: inset 0 1px 3px #3e65a24d;
  background: #a9c6ed;
}
.terminal-actions > button:disabled,
.feed-actions > button:disabled {
  opacity: 0.62;
}
.feed-actions > .exit-button {
  color: #b76076;
}
.scan-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-top: 0;
  background: #e4ebf8;
}
.scan-workspace > legend.section-caption {
  position: absolute;
  top: -9px;
  left: 7px;
}
.scan-entry {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px 9px;
}
.scan-entry > .section-caption {
  position: absolute;
  top: -9px;
  left: 6px;
}
.scan-bar {
  display: flex;
  width: 70%;
  max-width: 560px;
  min-width: 320px;
  height: 28px;
  align-items: center;
  gap: 6px;
}
.scan-mark {
  flex: 0 0 66px;
  color: #4a6390;
  font-size: 13px;
  white-space: nowrap;
}
.scan-bar input {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 2px 6px;
  border-color: #9aafcf;
  background: #ecf1fc;
  color: #2c4c87;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
.scan-bar button {
  min-height: 27px;
  height: 27px;
  padding: 2px 7px;
  border-color: #8ea8cf;
  background: #c8dbf5;
  font-size: 12px;
}
.current-material-line {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}
.material-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
.material-code {
  max-width: 25%;
  flex: 0 1 auto;
  overflow: hidden;
  color: #294f91;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.current-material-line h1 {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #294f91;
  font-size: 14px;
  font-weight: 500;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-amounts {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 20px;
}
.weight-target,
.weight-remaining {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}
.weight-target > span,
.weight-remaining > span {
  color: #526b99;
  font-size: 13px;
}
.weight-target strong,
.weight-remaining strong {
  color: #315796;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 28px;
}
.weight-remaining strong {
  color: #bc3e5c;
  font-size: 27px;
}
.scale-marker,
.instrument-label,
.scale-source {
  flex: 0 0 auto;
  padding: 0 4px;
  border: 1px solid #bd728e;
  background: #eadfea;
  color: #ac5475;
  font-size: 16px;
  line-height: 25px;
  text-align: center;
  white-space: nowrap;
}
.feed-actions .muted,
.feed-actions > small,
.feed-actions > p,
.feed-policy {
  color: #536988;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.feed-policy {
  white-space: pre-line;
  word-break: keep-all;
}
.pending-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: #e4ebf8;
}
.panel-title {
  display: flex;
  min-height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 7px;
  color: #ab4e78;
  background: #e4ebf8;
}
.panel-title h2 {
  color: #ab4e78;
  font-size: 13px;
  font-weight: 500;
}
.count {
  margin-left: 5px;
  color: #45649b;
  font-size: 12px;
  font-weight: 500;
}
.panel-title button {
  min-height: 20px;
  padding-block: 0;
  font-size: 12px;
}
.completed-summary,
.list-note {
  color: #637ba3;
  font-size: 11px;
}
.completed-summary b {
  font-weight: 500;
}
.list-heading,
.step {
  display: grid;
  grid-template-columns:
    40px minmax(84px, 0.9fr) minmax(130px, 1.5fr) repeat(3, minmax(64px, 0.7fr))
    minmax(96px, 1fr) minmax(150px, 1.8fr);
  align-items: center;
  gap: 0;
}
.list-heading {
  height: 24px;
  flex: 0 0 24px;
  border-top: 1px solid #9cafd0;
  border-bottom: 1px solid #9cafd0;
  background: #d7e1f3;
  color: #44649a;
  font-size: 12px;
  line-height: 22px;
}
.list-heading > span,
.step > * {
  min-width: 0;
  overflow: hidden;
  padding: 0 4px;
  border-right: 1px solid #b7c6e1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-heading > :last-child,
.step > :last-child {
  border-right: 0;
}
.list-heading > :first-child {
  text-align: center;
}
.list-heading > :nth-child(n + 4):nth-child(-n + 6) {
  text-align: right;
}
.steps .step-status {
  display: none;
}
.steps {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.step {
  height: 24px;
  min-height: 24px;
  border-bottom: 1px solid #b8c7e1;
  color: #34558c;
  background: #e4ebf8;
  font-size: 13px;
  line-height: 23px;
}
.step:nth-child(even) {
  background: #e1e9f7;
}
.step-index {
  color: #526b90;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.step-code {
  color: #405d86;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}
.step-name {
  font-weight: 400;
}
.step-location,
.step-english {
  color: #47669d;
  font-size: 12px;
}
.step-english {
  font-family: Arial, sans-serif;
}
.step-target,
.step-net,
.step-remaining {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.step-status {
  color: #5f7191;
  font-size: 11px;
  text-align: right;
}
.step.active {
  color: white;
  background: #0745c8;
}
.step.active > * {
  color: white;
  border-right-color: #426bb3;
  font-weight: 500;
}
.step.done .step-status,
.step.done .step-index {
  color: var(--success);
}
.empty-steps {
  display: grid;
  min-height: 80px;
  height: 100%;
  padding: 16px;
  place-content: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.completed-items {
  max-height: 60dvh;
  overflow: auto;
}
.completed-items .step {
  grid-template-columns: 38px minmax(80px, 1fr) minmax(0, 1.6fr);
}
.completed-items .step-target,
.completed-items .step-net,
.completed-items .step-remaining,
.completed-items .step-status,
.completed-items .step-location,
.completed-items .step-english {
  display: none;
}
.completion-panel {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.completion-check {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: var(--success);
  font-size: 56px;
  line-height: 1;
}
.completion-panel h1 {
  color: #254570;
  font-size: 28px;
}
.completion-panel p {
  color: var(--muted);
  font-size: 15px;
}
.completion-panel button {
  min-height: 40px;
  margin-top: 8px;
  padding-inline: 24px;
}
.notice {
  position: absolute;
  z-index: 4;
  right: 6px;
  bottom: 6px;
  left: 120px;
  max-height: 74px;
  overflow: auto;
  padding: 8px 12px;
  border: 1px solid #d1af6a;
  background: #fff6d9;
  color: #7c501c;
  font-size: 13px;
  line-height: 1.5;
}
.notice.error {
  color: #a12136;
  border-color: #d98f99;
  background: #fce9ec;
}
.login-panel {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.login-form {
  display: flex;
  width: min(420px, 100%);
  flex-direction: column;
  gap: 14px;
  padding: 25px 30px;
  border: 1px solid var(--border);
  background: #f3f6fb;
}
.login-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-content: center;
  color: #fff;
  background: #345f9e;
  font-size: 20px;
}
.login-form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.login-form input,
.login-form button {
  min-height: 40px;
}
.captcha-row {
  display: flex;
  gap: 10px;
}
.captcha-row input {
  flex: 1;
}
#refresh-captcha {
  width: 124px;
  height: 40px;
  padding: 0;
  border-color: var(--border);
  background: white;
}
#captcha {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.form-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
}
.login-demo-link {
  font-size: 13px;
  text-align: center;
}
dialog {
  width: min(660px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #8599ba;
  border-radius: 0;
  box-shadow: 0 8px 30px #22395a2b;
  background: #f3f6fb;
  color: #27374f;
}
dialog::backdrop {
  background: #20365166;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.dialog-title h2 {
  font-size: 17px;
}
.station-select {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.station-select label {
  flex: 0 0 80px;
  color: var(--muted);
  font-size: 13px;
}
.station-select select {
  flex: 1;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin: 0;
}
.detail-facts > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #d0d9e7;
}
.detail-facts dt {
  flex: 0 0 86px;
  color: var(--muted);
  font-size: 12px;
}
.detail-facts dd {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.detail-feedback {
  margin-top: 16px;
}
.detail-feedback h3 {
  font-size: 14px;
  font-weight: 600;
}
.detail-feedback p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.detail-actions button {
  font-size: 13px;
}
.detail-boundary {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.exception-button {
  color: #9e3e28;
  border-color: #c99884;
  background: #f8e9e1;
}
#exception-form > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
#exception-form > .muted {
  margin-top: 8px;
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.cycle-setting {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.cycle-setting input {
  width: 120px;
}

.action-feedback {
  max-width: 240px;
  overflow: hidden;
  color: #e7f2ff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.records-dialog {
  width: min(980px, calc(100% - 32px));
}
.record-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.record-pagination button {
  font-size: 12px;
  min-height: 30px;
}
.records-summary {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}
.records-table-wrap {
  max-height: 54dvh;
  overflow: auto;
  border: 1px solid var(--border);
}
.records-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  color: #29446e;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.records-table th,
.records-table td {
  padding: 8px 10px;
  border-right: 1px solid #c4d0e4;
  border-bottom: 1px solid #c4d0e4;
  text-align: left;
  vertical-align: top;
}
.records-table th {
  position: sticky;
  top: 0;
  background: #dce6f6;
  font-weight: 500;
  white-space: nowrap;
}
.records-table td {
  background: #f7faff;
  overflow-wrap: anywhere;
}
.records-table tr:nth-child(even) td {
  background: #edf3fc;
}
.records-table td b,
.records-table td small {
  display: block;
}
.records-table td b {
  margin-bottom: 3px;
  font-weight: 500;
}
.records-table .records-empty {
  padding: 30px 12px;
  text-align: center;
  color: var(--muted);
}
#completed-retry {
  margin-top: 12px;
}
.report-context {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}
.report-context > :first-child {
  color: #234d91;
}
.report-field {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 32px;
}
.report-field textarea {
  line-height: 1.6;
}
.report-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-quantity input {
  flex: 1;
}
.report-quantity span {
  min-width: 26px;
}
.report-feedback {
  margin-top: 14px;
  padding: 9px 12px;
  background: #e4f4e9;
  color: #176238;
  font-size: 13px;
  line-height: 1.6;
}
.report-feedback.error {
  background: #fce9ec;
  color: #a12136;
}
.report-history {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.report-history h3 {
  margin-bottom: 8px;
}
#demo-report-history {
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
  color: #465e82;
}
#demo-report-history > * {
  padding: 9px 0;
  border-bottom: 1px solid #d5dfef;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.exit-copy {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (min-width: 1600px) and (min-height: 900px) {
  .task-area {
    grid-template-rows: 200px 170px minmax(0, 1fr);
  }
  .workspace-head,
  .scan-workspace {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
  .production-dossier {
    padding-inline: 16px;
  }
  .instrument-strip {
    min-height: 28px;
    line-height: 28px;
    font-size: 15px;
  }
  .dossier-top-row {
    height: 42px;
  }
  .batch-entry > button,
  .batch-entry input {
    height: 31px;
    min-height: 31px;
    font-size: 15px;
  }
  .task-field {
    min-height: 37px;
    line-height: 37px;
  }
  .task-field > span {
    flex-basis: 80px;
    font-size: 15px;
  }
  .task-field strong,
  .task-field b {
    font-size: 17px;
  }
  .plan-total > span,
  .plan-total strong {
    font-size: 28px;
  }
  .current-cycle {
    font-size: 13px;
  }
  .terminal-actions > button,
  .feed-actions > button,
  .feed-actions > a {
    min-height: 40px;
    font-size: 17px;
  }
  .section-caption {
    font-size: 15px;
  }
  .scan-entry {
    padding-inline: 16px;
    gap: 10px;
  }
  .scan-bar input {
    height: 32px;
    font-size: 17px;
  }
  .scan-mark {
    flex-basis: 80px;
    font-size: 15px;
  }
  .material-code,
  .current-material-line h1 {
    font-size: 17px;
  }
  .weight-remaining strong {
    font-size: 32px;
  }
  #weight {
    font-size: 36px;
  }
  .scale-value > small,
  .scale-target strong {
    font-size: 15px;
  }
  .step {
    height: 30px;
    min-height: 30px;
    line-height: 29px;
    font-size: 16px;
  }
  .step-code,
  .step-target,
  .step-net,
  .step-remaining,
  .step-location,
  .step-english {
    font-size: 15px;
  }
  .list-heading {
    height: 29px;
    flex-basis: 29px;
    font-size: 15px;
    line-height: 27px;
  }
  .notice {
    left: calc(9.2% + 8px);
  }
}
@media (max-width: 900px) {
  .active-workspace {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .workspace-head,
  .scan-workspace {
    grid-template-columns: minmax(0, 1fr) 124px;
  }
  .terminal-actions,
  .feed-actions {
    padding-inline: 7px;
  }
  .terminal-actions > button,
  .feed-actions > button,
  .feed-actions > a {
    font-size: 12px;
  }
  .production-dossier,
  .scan-entry {
    padding-inline: 7px;
  }
  .instrument-strip {
    gap: 10px;
    font-size: 11px;
  }
  .dossier-top-row {
    gap: 7px;
  }
  .batch-entry {
    flex-basis: 55%;
  }
  .batch-entry button {
    flex-basis: 57px;
  }
  .plan-total > span,
  .plan-total strong {
    font-size: 18px;
  }
  .task-field {
    gap: 6px;
  }
  .task-field > span {
    flex-basis: 60px;
    font-size: 12px;
  }
  .task-field strong,
  .task-field b {
    font-size: 13px;
  }
  .scan-bar {
    min-width: 270px;
    width: 80%;
  }
  .scan-mark {
    flex-basis: 60px;
    font-size: 12px;
  }
  .scan-bar input {
    font-size: 13px;
  }
  .material-code,
  .current-material-line h1 {
    font-size: 12px;
  }
  .scale-source {
    font-size: 13px;
    line-height: 21px;
  }
  .list-heading,
  .steps {
    min-width: 790px;
  }
  .pending-panel {
    overflow-x: auto;
  }
  #weight {
    font-size: 24px;
  }
  .notice {
    left: 90px;
  }
}
@media (max-width: 600px) {
  .brand span {
    display: none;
  }
  .top-right {
    gap: 6px;
  }
  .top-right > .muted {
    display: none;
  }
  .detail-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .dossier-top-row {
    flex-wrap: wrap;
    height: 54px;
    gap: 2px;
  }
  .batch-entry {
    flex-basis: 100%;
  }
  .plan-total > span,
  .plan-total strong {
    font-size: 14px;
    line-height: 18px;
  }
  .current-cycle {
    display: none;
  }
  .task-field {
    min-height: 24px;
    line-height: 24px;
  }
  .material-code {
    display: none;
  }
  .scan-bar {
    min-width: 0;
    width: 100%;
  }
  .scan-mark {
    flex-basis: 48px;
    font-size: 11px;
  }
  .material-identity {
    flex-wrap: wrap;
    gap: 2px;
  }
}
@media (max-height: 620px) {
  .task-area {
    grid-template-rows: 148px 132px minmax(0, 1fr);
  }
  .task-field {
    min-height: 26px;
    line-height: 26px;
  }
  .login-panel {
    align-items: flex-start;
  }
  .login-form {
    gap: 10px;
    padding-block: 18px;
  }
  .login-mark {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .segment-fill {
    transition: none;
  }
}

/* 退出二次确认：第一次点击后按钮变为醒目的确认态 */
.exit-button.confirming {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 700;
}
