:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --sidebar: #fbfcff;
  --text: #1f2329;
  --muted: #646a73;
  --subtle: #8f959e;
  --line: #dee0e3;
  --line-soft: #eff0f1;
  --accent: #1677ff;
  --accent-hover: #0f63d8;
  --accent-soft: #e8f2ff;
  --accent-faint: #f4f8ff;
  --danger: #d14343;
  --success: #2e8f5b;
  --warning: #d47a10;
  --shadow: 0 12px 28px rgba(31, 35, 41, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 14px;
}

#app {
  height: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  overflow: hidden;
}

.rail {
  height: 100vh;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 24px rgba(31, 35, 41, 0.03);
}

.app-mark {
  padding: 10px 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.app-mark strong,
.app-mark span {
  display: block;
}

.app-mark img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(36, 72, 184, 0.18);
}

.app-mark-text {
  min-width: 0;
}

.app-mark strong {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.app-mark span {
  margin-top: 2px;
  color: var(--subtle);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 3px;
}

.nav-section {
  margin: 12px 12px 4px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}

.nav-button {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
}

.nav-button:hover,
.nav-button:focus-visible {
  color: var(--text);
  background: #f1f5ff;
  outline: none;
}

.nav-button.is-active {
  color: var(--accent);
  background: linear-gradient(90deg, #e7f1ff 0%, #f6f9ff 100%);
  border-left-color: var(--accent);
}

.nav-label {
  font-size: 14px;
  font-weight: 600;
}

.printer-state {
  margin-top: auto;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.printer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.printer-state.is-online .printer-dot {
  background: var(--success);
}

.main-column {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-column .main {
  flex: 1;
  min-height: 0;
  height: auto;
}

.main {
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 26px 30px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.page-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(31, 35, 41, 0.04);
}

.section-label {
  margin: 0 0 6px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 500;
}

.page-bar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0;
}

.page-bar p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.metric-strip {
  min-width: 252px;
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
}

.metric {
  padding: 9px 10px;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.metric span,
.metric small {
  display: block;
}

.metric span {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 600;
}

.metric small {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 12px;
}

.banner {
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.45;
}

.banner.info {
  color: #245b33;
  background: #edf8f0;
  border-color: #cdeed5;
}

.banner.error {
  color: var(--danger);
  background: #fff0f0;
  border-color: #ffd4d4;
}

.workspace {
  display: grid;
  gap: 16px;
}

.workspace.two-up {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
  align-items: start;
}

.surface {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.surface-header {
  min-height: 64px;
  padding: 15px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-bottom: 1px solid var(--line-soft);
}

.surface-header-row {
  align-items: center;
}

.surface-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.surface-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
}

.surface-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.surface-body {
  padding: 20px;
}

.import-hint {
  margin-bottom: 12px;
}

.print-surface {
  max-width: 1200px;
}

.print-surface .form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.print-surface .form-section {
  padding: 20px;
}

.print-surface .form-section-grid {
  gap: 16px 20px;
}

.print-surface .form-section-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.print-surface .form-section-grid.three-up .field.span-2 {
  grid-column: 1 / -1;
}

.print-surface .form-section-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid.one {
  grid-template-columns: minmax(0, 1fr);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #c9cdd4;
  border-radius: 6px;
}

.static-field {
  min-height: 40px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid #d9dde4;
  border-radius: 6px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fbfcff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-section-head > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.form-section-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.form-section-head p {
  margin: 3px 0 0;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.4;
}

.form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.search-option {
  width: 100%;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  background: #ffffff;
  border-top: 1px solid var(--line-soft);
}

.search-option:first-child {
  border-top: 0;
}

.search-option:hover,
.search-option.is-active {
  background: var(--accent-faint);
}

.search-option strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.search-option span,
.search-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-empty {
  padding: 12px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #aeb4bd;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.action-button:focus-visible,
.ghost-button:focus-visible,
.danger-button:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.2);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field.span-2 {
  grid-column: span 2;
}

.span-2 {
  grid-column: span 2;
}

.tiny {
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.4;
}

.barcode-option-field {
  gap: 8px;
}

.range-field {
  grid-column: span 2;
}

.barcode-option-card {
  min-height: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid #d7e0ee;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.barcode-option-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.barcode-option-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.barcode-option-copy p {
  margin: 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.35;
}

.barcode-option-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.barcode-option-meta code {
  padding: 3px 7px;
  color: #0f3e82;
  background: rgba(43, 108, 217, 0.08);
  border: 1px solid rgba(43, 108, 217, 0.14);
  border-radius: 999px;
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 11px;
}

.barcode-option-meta.is-empty {
  color: #8a94a6;
}

.barcode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  flex: 0 0 auto;
}

.barcode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.barcode-toggle-track {
  width: 42px;
  height: 24px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  background: #d7deea;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  transition: background 140ms ease, box-shadow 140ms ease;
}

.barcode-toggle-knob {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transition: transform 140ms ease;
}

.barcode-toggle input:checked + .barcode-toggle-track {
  background: linear-gradient(135deg, #1f6fe5 0%, #4c93ff 100%);
}

.barcode-toggle input:checked + .barcode-toggle-track .barcode-toggle-knob {
  transform: translateX(18px);
}

.barcode-toggle input:focus-visible + .barcode-toggle-track {
  outline: 2px solid rgba(22, 119, 255, 0.22);
  outline-offset: 2px;
}

.barcode-toggle-text {
  min-width: 36px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.action-button,
.ghost-button,
.danger-button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 6px;
  font-weight: 500;
}

.action-button {
  color: #ffffff;
  background: var(--accent);
}

.action-button:hover {
  background: var(--accent-hover);
}

.ghost-button {
  color: var(--text);
  background: #ffffff;
  border: 1px solid #c9cdd4;
}

.ghost-button:hover {
  background: #f7f8fa;
}

.danger-button {
  color: var(--danger);
  background: #ffffff;
  border: 1px solid #f0b8b8;
}

.danger-button:hover {
  background: #fff5f5;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.records-table {
  min-width: 1380px;
}

.products-table {
  min-width: 1480px;
}

.records-table .time-cell {
  min-width: 170px;
  white-space: nowrap;
}

.records-table .factory-cell {
  min-width: 110px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.data-table th {
  padding: 11px 12px;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  font-size: 14px;
}

.data-table tbody tr:hover {
  background: #f7fbff;
}

.data-table tr.is-selected {
  background: var(--accent-soft);
}

.code {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
}

.print-range-cell {
  min-width: 250px;
  white-space: normal;
  word-break: break-all;
  line-height: 1.45;
}

.product-desc-cell {
  min-width: 360px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.spec-cell {
  min-width: 150px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.products-table .sku-cell {
  min-width: 170px;
  white-space: nowrap;
}

.products-table .brand-cell {
  min-width: 110px;
  white-space: nowrap;
}

.products-table .barcode69-cell {
  min-width: 150px;
  white-space: nowrap;
}

.products-table .carton-spec-cell {
  min-width: 120px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
}

.products-table .product-time-cell {
  min-width: 160px;
  white-space: nowrap;
}

.table-empty {
  padding: 28px 18px;
  color: var(--subtle);
  text-align: center;
  background: #fafbfc;
  border: 1px dashed #c9cdd4;
  border-radius: 6px;
}

.status-chip {
  min-height: 22px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.status-chip.pending {
  color: #ad6800;
  background: #fff7e6;
}

.status-chip.success {
  color: var(--success);
  background: #edf8f0;
}

.status-chip.failed {
  color: var(--danger);
  background: #fff0f0;
}

@media (max-width: 1180px) {
  html,
  body,
  #app {
    height: auto;
    overflow: auto;
  }

  .shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .rail {
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .printer-state {
    margin-top: 0;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .workspace.two-up {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .rail,
  .main {
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-bar,
  .surface-header {
    flex-direction: column;
  }

  .metric-strip {
    width: 100%;
    min-width: 0;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-2,
  .field.span-2,
  .range-field {
    grid-column: span 1;
  }

  .barcode-option-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .barcode-toggle {
    width: 100%;
    justify-content: space-between;
  }

}

/* ── Toast 通知 ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--accent); }
.toast-warning { background: var(--warning); }

/* ── 导航图标 ── */
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-right: 8px;
  vertical-align: middle;
}

/* ── 按钮 Loading 态 ── */
.is-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}

.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ── 表格列优先级（窄屏隐藏低优先级列） ── */

/* ── 打印记录筛选栏 ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--accent-faint);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: flex-end;
}

.filter-bar .field {
  min-width: 0;
}

.filter-bar .field label {
  font-size: 12px;
  color: var(--muted);
}

.filter-bar .field select,
.filter-bar .field input {
  min-width: 120px;
}

.filter-action {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* ── 分页控件 ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.pagination-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pagination-page {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.pagination-page:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pagination-page.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--subtle);
  font-size: 13px;
}

.pagination-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.pagination-right select {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
}

.pagination button:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.col-priority-low {
  /* 默认显示，窄屏隐藏 */
}

@media (max-width: 800px) {
  .col-priority-low {
    display: none;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar .field select,
  .filter-bar .field input {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── Modal 弹框 ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(31, 35, 41, 0.45);
  animation: modal-fade-in 0.2s ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(31, 35, 41, 0.18);
  animation: modal-slide-in 0.25s ease;
  overflow: hidden;
}

.modal-header {
  min-height: 56px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-bottom: 1px solid var(--line-soft);
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  background: #f2f3f5;
  border-color: var(--line);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  background: #fafbfc;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ── 登录页 ── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f4f6fb 0%, #e8f2ff 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.login-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
}

.login-brand strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.login-brand span {
  display: block;
  color: var(--subtle);
  font-size: 12px;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.login-card > p {
  margin: 0 0 24px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-button {
  width: 100%;
  justify-content: center;
}

.login-banner {
  margin-bottom: 0;
}

.login-hint {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.6;
}

/* ── 当前登录用户信息 ── */
.user-info {
  padding: 0 12px;
}

.user-card {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  color: var(--subtle);
  font-size: 12px;
  margin-top: 2px;
}

.logout-button {
  padding: 5px 10px;
  color: var(--muted);
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
}

.logout-button:hover {
  color: var(--text);
  background: #eff0f1;
}

/* ── 自定义确认弹框 ── */
.confirm-overlay {
  z-index: 10000;
}

.confirm-modal {
  max-width: 440px;
}

.confirm-message {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ── 打印任务进度条（固定在主区域底部，不随页面重绘消失） ── */
.print-job-dock {
  flex-shrink: 0;
  margin: 0 18px 18px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(22, 119, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(22, 119, 255, 0.08), rgba(15, 23, 42, 0.02)),
    #ffffff;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: print-job-enter 0.28s ease-out;
}

.print-job-dock.is-success {
  border-color: rgba(46, 143, 91, 0.35);
  background:
    linear-gradient(135deg, rgba(46, 143, 91, 0.08), rgba(15, 23, 42, 0.02)),
    #ffffff;
}

.print-job-dock.is-failed {
  border-color: rgba(209, 67, 67, 0.35);
  background:
    linear-gradient(135deg, rgba(209, 67, 67, 0.08), rgba(15, 23, 42, 0.02)),
    #ffffff;
}

.print-job-inner {
  padding: 14px 16px 13px;
  border-left: 4px solid var(--accent);
}

.print-job-dock.is-success .print-job-inner {
  border-left-color: var(--success);
}

.print-job-dock.is-failed .print-job-inner {
  border-left-color: var(--danger);
}

.print-job-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.print-job-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.print-job-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.print-job-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Cascadia Mono", "Consolas", "SF Mono", "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.print-job-current {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.print-job-dock.is-success .print-job-current {
  color: var(--success);
}

.print-job-dock.is-failed .print-job-current {
  color: var(--danger);
}

.print-job-divider,
.print-job-total {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.print-job-bar {
  position: relative;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8ebf0;
}

.print-job-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d8bfd, var(--accent));
  transition: width 0.35s ease;
}

.print-job-dock.is-success .print-job-bar-fill {
  background: linear-gradient(90deg, #49b37d, var(--success));
}

.print-job-dock.is-failed .print-job-bar-fill {
  background: linear-gradient(90deg, #e57373, var(--danger));
}

.print-job-meta {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.print-job-batches {
  display: flex;
  gap: 3px;
  align-items: stretch;
  min-height: 8px;
}

.print-job-segment {
  flex: 1;
  min-width: 0;
  border-radius: 2px;
  background: #d8dde6;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.print-job-segment.is-filled {
  background: rgba(22, 119, 255, 0.55);
}

.print-job-segment.is-active {
  background: var(--accent);
  transform: scaleY(1.35);
  box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.2);
}

.print-job-dock.is-success .print-job-segment.is-filled,
.print-job-dock.is-success .print-job-segment.is-active {
  background: rgba(46, 143, 91, 0.72);
}

.print-job-detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@keyframes print-job-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .print-job-dock,
  .print-job-bar-fill,
  .print-job-segment {
    animation: none;
    transition: none;
  }
}
