.page {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  max-width: none;
  margin: 0;
  padding: 0;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.header h1 {
  margin: 0;
  font-size: 1.25rem;
}
.actions {
  display: flex;
  gap: 0.5rem;
}
button {
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* —— 全站通用按钮 —— */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

button.btn {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  background-color: transparent;

  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

button.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

button.btn:active:not(:disabled) {
  transform: translateY(0);
}

button.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.btn.btn-primary {
  color: #fff;
  background-color: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

button.btn.btn-primary:hover:not(:disabled) {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

button.btn.btn-secondary {
  color: #374151;
  background-color: #fff;
  border-color: #d1d5db;
}

button.btn.btn-secondary:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

button.btn.btn-danger {
  color: #dc2626;
  background-color: #fff;
  border-color: #fecaca;
}

button.btn.btn-danger:hover:not(:disabled) {
  color: #fff;
  background-color: #dc2626;
  border-color: #dc2626;
}

button.btn.btn-sm {
  height: 28px;
  padding: 0 10px;
  gap: 4px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

button.btn.btn-sm.btn-primary {
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.action-buttons--compact {
  gap: 8px;
}

.actions .link-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #f8f8f8;
  color: inherit;
  text-decoration: none;
  font-size: inherit;
}
.actions .link-btn:hover {
  background: #eee;
}
.msg.ok {
  color: #0b6e45;
}
.msg.err {
  color: #b00020;
}
.hint {
  color: #666;
}
.table-wrap {
  overflow-x: auto;
}
.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.grid th,
.grid td {
  border: 1px solid #ddd;
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}
.grid th {
  background: #f5f5f5;
}
.grid tfoot .grid-totals-row td {
  background: #f0f4f8;
  font-weight: 600;
  border-top: 2px solid #bbb;
}
.grid-totals-row__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.grid input[type="number"]::-webkit-outer-spin-button,
.grid input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.grid input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.cell {
  width: 5.5rem;
  max-width: 100%;
  box-sizing: border-box;
}
.cell.wide {
  width: 10rem;
}

.form-section {
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem 1rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}
.form-field input {
  padding: 0.35rem 0.5rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
}
.modal-backdrop--nested {
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
}
.modal-panel--hzy-sync-confirm {
  max-width: min(92vw, 560px);
}
.hzy-sync-summary {
  margin: 0.75rem 0 1rem;
  max-height: 40vh;
  overflow: auto;
  font-size: 0.875rem;
}
.hzy-sync-summary__block + .hzy-sync-summary__block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}
.hzy-sync-summary ul {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}
.hzy-sync-summary__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
}
.hzy-sync-summary__table th,
.hzy-sync-summary__table td {
  border: 1px solid #e5e7eb;
  padding: 0.35rem 0.5rem;
  text-align: left;
  white-space: nowrap;
}
.hzy-sync-summary__table th {
  background: #f8fafc;
  font-weight: 600;
}
.modal-actions--hzy-sync {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.modal-panel {
  background: #fff;
  border-radius: 6px;
  max-width: min(96vw, 900px);
  max-height: 90vh;
  overflow: auto;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 快速录入：标题与渠道固定，仅表格区域滚动；表头 sticky */
.modal-panel--quick-entry {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-panel--quick-entry .modal-panel__scroll-fixed-top {
  flex-shrink: 0;
}
.modal-panel--quick-entry .table-wrap--sticky-head {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-panel--quick-entry .table-wrap--sticky-head .grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
}
.modal-panel--quick-entry .modal-actions {
  flex-shrink: 0;
  margin-top: 0.75rem;
}

.modal-panel h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
}
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

/* 生产进度：按单右键 / ⋮ 菜单 */
.context-menu {
  position: fixed;
  z-index: 1100;
  min-width: 8rem;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
}
.context-menu__item {
  display: block;
  width: 100%;
  padding: 0.4rem 0.75rem;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: #111;
  box-sizing: border-box;
}
.context-menu__item:hover {
  background: #f0f7ff;
}
.po-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: context-menu;
}
.po-cell__text {
  flex: 1;
  min-width: 0;
}
.po-cell__trigger {
  flex-shrink: 0;
  padding: 0.1rem 0.35rem;
  line-height: 1;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fafafa;
  color: #555;
  font-size: 1rem;
  cursor: pointer;
}
.po-cell__trigger:hover {
  background: #eee;
  border-color: #ccc;
}

/* 生产进度：整单编辑弹层（列多，加宽） */
.modal-panel--production-po-edit {
  max-width: min(96vw, 1400px);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-panel--production-po-edit .detail-po-title {
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}
.modal-panel--production-po-edit .detail-po-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}
.modal-panel--production-po-edit .detail-po-title__dh {
  font-weight: 400;
  font-size: 0.9em;
  color: #888;
}
.modal-panel--production-po-edit .btn-danger--inline {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  margin-left: 0.25rem;
}
.modal-panel--production-po-edit .production-po-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.modal-panel--production-po-edit .production-po-edit-actions .flex-spacer {
  flex: 1 1 auto;
}
.modal-panel__close--svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #666;
  flex-shrink: 0;
  border-radius: 4px;
}
.modal-panel__close--svg:hover {
  color: #111;
  background: #f0f0f0;
}
.modal-panel__close--svg:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.modal-panel--production-po-edit .table-wrap--detail-matrix {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(65vh, 720px);
  overflow: auto;
  position: relative;
  /* 给外框 shadow 留边，避免被裁切 */
  padding: 8px;
}
.grid--detail-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}
.grid--detail-matrix th,
.grid--detail-matrix td {
  white-space: nowrap;
  vertical-align: middle;
}
.grid--detail-matrix thead th:nth-child(-n+6) {
  text-align: center;
}
.grid--detail-matrix .detail-matrix-actions-head,
.grid--detail-matrix .detail-matrix-actions {
  text-align: center;
  vertical-align: middle;
  width: 3.5rem;
}
.grid--detail-matrix .detail-matrix-metric {
  font-weight: 600;
  color: #444;
  text-align: center;
  min-width: 3.2em;
}
.grid--detail-matrix .detail-matrix-meta {
  text-align: center;
  vertical-align: middle;
}
.grid--detail-matrix .detail-matrix-meta .cell {
  max-width: 7.5rem;
  text-align: center;
}
.grid--detail-matrix .detail-matrix-sku-cell {
  font-size: 0.82rem;
  color: #555;
  max-width: 10rem;
  text-align: center;
  white-space: normal;
  word-break: break-all;
}
.grid--detail-matrix .detail-matrix-sku-cell .cell {
  max-width: 9rem;
  text-align: center;
  margin: 0 auto;
}
.grid--detail-matrix .detail-matrix-row--sku td {
  background: #fafafa;
}
.grid--detail-matrix .detail-matrix-status-cell {
  text-align: center;
  vertical-align: middle;
}
.grid--detail-matrix .detail-matrix-status-cell .cell {
  max-width: 6.5rem;
  min-width: 5.5rem;
  margin: 0 auto;
  text-align: center;
}
.grid--detail-matrix .detail-matrix-row--status td {
  background: #f7f9fc;
}
.grid--detail-matrix .matrix-size-head {
  text-align: center;
  line-height: 1.2;
}
.grid--detail-matrix .matrix-size-head__letter,
.grid--detail-matrix .matrix-size-head__number,
.grid--detail-matrix .matrix-size-head__single {
  display: block;
}
.grid--detail-matrix .matrix-size-head__number {
  font-weight: 400;
  font-size: 0.8em;
  color: #888;
}
.grid--detail-matrix .matrix-qty-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.grid--detail-matrix .matrix-qty-cell .cell {
  width: 4.5rem;
  text-align: center;
  margin: 0 auto;
}
.grid--detail-matrix .matrix-qty-cell--negative {
  color: #c62828;
  font-weight: 600;
}
/*
 * 拆分对：原行+拆分行共用一个绝对定位大框（不在每个 td 上画 shadow）
 * border 0.5px + box-shadow 3px，淡蓝
 */
.detail-matrix-glow-frame {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  box-sizing: border-box;
  border: 0.5px solid #90caf9;
  box-shadow: 0 0 3px #90caf9;
  border-radius: 2px;
}
@keyframes detail-matrix-split-in {
  from {
    opacity: 0.2;
    transform: translateY(-5.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.grid--detail-matrix tr.detail-matrix-split-in {
  animation: detail-matrix-split-in 0.5s ease-out both;
}
.modal-panel--production-po-edit .modal-actions {
  flex-shrink: 0;
  margin-top: 0.75rem;
}
.modal-panel--inbound-detail {
  max-width: min(96vw, 900px);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.inbound-detail-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}
.inbound-detail-block:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}
.inbound-detail-block__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}
.inbound-detail-adjust {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.inbound-detail-adjust__label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #555;
}
.grid--compact th,
.grid--compact td {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}
.cell-error-msg {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a33;
  font-size: 0.85rem;
}
.production-po-edit-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
}
.production-po-edit-actions .flex-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.modal-panel--transfer-in-edit {
  max-width: min(96vw, 520px);
  width: 100%;
}

.exclude-panel {
  margin-top: 1rem;
}
.exclude-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.exclude-panel__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}
.exclude-panel__footer {
  margin-top: 0.75rem;
}
.exclude-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.exclude-panel__file-input {
  display: none;
}
.exclude-panel__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.exclude-panel__table-scroll {
  max-height: min(52vh, 420px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.exclude-panel__table-scroll .grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f5;
  box-shadow: 0 1px 0 #ddd;
}
.exclude-panel__count {
  margin: 0.5rem 0 0;
}
.exclude-panel--compact .exclude-panel__title {
  font-size: 1rem;
}
.modal-panel--exclude-add {
  max-width: min(96vw, 36rem);
  width: 100%;
}
.exclude-sku-input {
  width: 100%;
  min-height: 8rem;
  box-sizing: border-box;
  padding: 0.5rem;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}
.form-grid--exclude-add {
  grid-template-columns: 1fr;
  margin-bottom: 0.5rem;
}
.form-field--full {
  grid-column: 1 / -1;
}
.grid td.cell-remark {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-plan-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.order-plan-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-apply--secondary {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.order-plan-jobs {
  margin-top: 0.5rem;
}
.job-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
}
.job-status--pending {
  background: #f0f0f0;
  color: #555;
}
.job-status--running {
  background: #e3f2fd;
  color: #1565c0;
}
.job-status--success {
  background: #e8f5e9;
  color: #2e7d32;
}
.job-status--failure {
  background: #ffebee;
  color: #c62828;
}
.btn-link-action {
  padding: 0.2rem 0.4rem;
  margin-right: 0.5rem;
  font-size: 0.8125rem;
  border: none;
  background: none;
  color: #1565c0;
  cursor: pointer;
  text-decoration: underline;
}
.btn-link-action:hover {
  color: #0d47a1;
}
.modal-panel--exclude-modal {
  max-width: min(96vw, 920px);
  width: 100%;
  max-height: min(90vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-panel--exclude-modal .exclude-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 0;
}
.modal-panel--exclude-modal .exclude-panel__body {
  flex: 1 1 auto;
  min-height: 0;
}
.modal-panel--exclude-modal .exclude-panel__table-scroll {
  max-height: none;
  flex: 1 1 auto;
  min-height: 8rem;
}
.modal-panel--exclude-modal .modal-actions {
  flex-shrink: 0;
  margin-top: 0.75rem;
}
.modal-panel__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.modal-panel__head-row h3 {
  margin: 0;
}
.modal-panel__close {
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.grid td.col-actions {
  width: auto;
  min-width: 7rem;
  text-align: left;
}
.order-plan-jobs__error-cell {
  max-width: 22rem;
  white-space: normal;
  word-break: break-word;
  color: #666;
}
.order-plan-jobs__error-cell--failure {
  color: #c62828;
}
.order-plan-jobs__pending-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #888;
}
.form-grid--transfer-edit {
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}
.grid th.col-actions,
.grid td.col-actions {
  width: 4rem;
  white-space: nowrap;
  text-align: center;
}
.btn-danger-text {
  padding: 0.2rem 0.4rem;
  font-size: 0.8125rem;
  border: none;
  background: none;
  color: #b00020;
  cursor: pointer;
  text-decoration: underline;
}
.btn-danger-text:hover {
  color: #8a0018;
}
.btn-danger-text:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.suggest-wrap {
  position: relative;
}
.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 2px 0 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
  max-height: 12rem;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.8125rem;
}
.suggest-list li {
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}
.suggest-list li:hover {
  background: #f0f7ff;
}
.matrix-input {
  width: 4rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.25rem;
}

.filters {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 0.875rem;
}
.filters-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
}
.filters-inline .filter-label {
  min-width: auto;
  flex-shrink: 0;
}
.filters-inline .filter-apply {
  margin-left: 0;
}
.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.filter-dropdown {
  position: relative;
}
.filter-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 11rem;
  max-width: 20rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  background: #fff;
  font-size: inherit;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
}
.filter-dropdown__trigger:hover {
  border-color: #999;
}
.filter-dropdown__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-dropdown__caret {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.75;
  line-height: 1;
}
.filter-dropdown__panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 100;
  min-width: 100%;
  padding: 0.4rem 0.5rem;
  background: #fff;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.filter-dropdown__option {
  padding: 0.1rem 0;
}
.filter-input--narrow {
  min-width: 7rem;
  max-width: 11rem;
  width: 9rem;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}
.filter-row:last-child {
  margin-bottom: 0;
}
.filter-label {
  font-weight: 600;
  color: #444;
  min-width: 4rem;
}
.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.filter-input {
  padding: 0.35rem 0.5rem;
  min-width: 12rem;
}
.filter-apply {
  margin-left: auto;
}
.page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}
.page-footer .pagination {
  margin-bottom: 0;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.page-info {
  color: #555;
  font-size: 0.875rem;
}

.grid tbody tr.row-tip {
  cursor: help;
}

.view-mode-toggle {
  display: inline-flex;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.prod-vision-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.prod-vision-title .view-mode-toggle {
  margin-right: 0;
  font-weight: 400;
}
.view-mode-toggle__btn {
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: none;
  background: #fff;
  font-size: 0.875rem;
  font-family: inherit;
  color: #444;
  cursor: pointer;
  line-height: 1.25;
}
.view-mode-toggle__btn + .view-mode-toggle__btn {
  border-left: 1px solid #c5c5c5;
}
.view-mode-toggle__btn:hover {
  background: #f5f5f5;
}
.view-mode-toggle__btn.is-active {
  background: #e8eef5;
  color: #1a1a1f;
  font-weight: 600;
}
.table-wrap--matrix {
  overflow: auto;
  max-width: 100%;
}
.grid--matrix {
  width: max-content;
  min-width: 100%;
}
.grid--matrix th,
.grid--matrix td {
  white-space: nowrap;
  text-align: center;
}
.grid--matrix .grid--matrix__text {
  text-align: left;
}
.grid--matrix thead th {
  vertical-align: middle;
}
.grid--matrix th.grid--matrix__size {
  white-space: pre-line;
  line-height: 1.2;
  min-width: 2.75rem;
}
.matrix-edit-hint {
  margin: 0;
  color: #666;
  font-size: 0.8125rem;
}

/* —— 全站壳层（index.html） —— */
.site-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1f;
  background: #f0f2f7;
  position: relative;
}
.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      1200px 600px at 10% -10%,
      rgba(59, 130, 246, 0.09),
      transparent 55%
    ),
    radial-gradient(
      900px 500px at 100% 0%,
      rgba(14, 165, 233, 0.08),
      transparent 50%
    ),
    linear-gradient(180deg, #eef1f8 0%, #f0f2f7 40%, #e8ecf4 100%);
  pointer-events: none;
}
:root {
  --site-content-max: none;
  --site-gutter-x: 8rem;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.site-header__inner {
  box-sizing: border-box;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 0.75rem var(--site-gutter-x);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-user {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.site-user__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 12rem;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.site-user__trigger:hover,
.site-user.is-open .site-user__trigger {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.25);
}
.site-user__avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: #e2e8f0;
}
.site-user__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
}
.site-user__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.2;
}
.site-user__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 120;
  min-width: 8.5rem;
  padding: 0.35rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}
.site-user__menu-item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  color: #334155;
  text-decoration: none;
  font-size: 0.875rem;
}
.site-user__menu-item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}
@media (max-width: 520px) {
  .site-user__name {
    display: none;
  }
  .site-user__trigger {
    padding: 0.2rem;
  }
}

.site-menu-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.site-menu-btn:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.25);
}
.site-menu-btn__icon {
  width: 1.375rem;
  height: 1.375rem;
  display: block;
  pointer-events: none;
}
.site-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(15, 23, 42, 0.4);
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
body.site-drawer-open .site-drawer-scrim {
  opacity: 1;
  visibility: visible;
}
.site-drawer-scrim[hidden] {
  display: none !important;
}
.site-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  width: min(17.5rem, 86vw);
  max-width: 100%;
  background: #fff;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.site-drawer-open .site-drawer {
  transform: translateX(0);
}
.site-drawer__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.site-drawer__title {
  font-size: 0.9375rem;
  font-weight: 650;
}
.site-drawer__close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-drawer__close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #1a1a1f;
}
.site-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0 1rem;
}
.site-drawer-list,
.site-drawer-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-drawer-list > li {
  margin: 0;
}
.site-drawer-link {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-drawer-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}
.site-drawer-link--accent {
  color: #1d4ed8;
  font-weight: 600;
}
.site-drawer-group {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.site-drawer-group__label {
  display: block;
  padding: 0.35rem 1rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.site-drawer-sub .site-drawer-link {
  padding-left: 1.35rem;
  font-size: 0.8125rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.site-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}
.site-brand__title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-brand__subtitle {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 1.5rem var(--site-gutter-x) 2.5rem;
  box-sizing: border-box;
}
.site-hero {
  max-width: 900px;
}
.site-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-hero__lead {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.55;
}
.site-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.site-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.2rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
  border-color: rgba(37, 99, 235, 0.25);
}
.site-card--accent {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(
    160deg,
    #fff 0%,
    rgba(239, 246, 255, 0.85) 100%
  );
}
.site-card__title {
  font-size: 1rem;
  font-weight: 650;
}
.site-card__desc {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.55);
}
.site-footer__inner {
  box-sizing: border-box;
  max-width: var(--site-content-max);
  margin: 0 auto;
  padding: 0.85rem var(--site-gutter-x);
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}
.site-footer__sep {
  opacity: 0.5;
}

/* —— 钉钉免登登录页 —— */
.login-body {
  justify-content: center;
  align-items: center;
}
.login-panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100% - 2rem, 22rem);
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}
.login-panel__brand {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.login-panel__subtitle {
  margin: 0 0 1.25rem;
  color: #64748b;
  font-size: 0.95rem;
}
.login-panel__status {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
}
.login-panel__error {
  margin: 0.85rem 0 0;
  color: #b91c1c;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
}
.login-panel__retry {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.login-panel__retry:hover {
  background: #dbeafe;
}

/* —— 绩效考核收集表 —— */
.perf-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.perf-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.perf-title {
  margin: 0;
  font-size: 1.35rem;
}
.perf-link {
  color: #1d4ed8;
  font-size: 0.9rem;
}
.perf-alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  white-space: pre-wrap;
}
.perf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
}
.perf-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: #64748b;
}
.perf-toolbar input,
.perf-toolbar select {
  min-width: 10rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
}
.perf-btn {
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}
.perf-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.perf-btn--ghost {
  background: #fff;
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.35);
}
.perf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.perf-meta span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
}
.perf-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
}
.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.perf-table th,
.perf-table td {
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  text-align: center;
  vertical-align: middle;
}
.perf-table th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}
.perf-face {
  text-align: center;
  font-weight: 600;
  background: #f8fafc;
  white-space: nowrap;
}
.perf-std {
  max-width: 18rem;
  white-space: pre-wrap;
  line-height: 1.4;
  color: #475569;
  text-align: center;
}
.perf-table input[type="number"],
.perf-table input[type="text"] {
  width: 100%;
  min-width: 4.5rem;
  box-sizing: border-box;
  padding: 0.25rem 0.2rem;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0;
  background: transparent;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.perf-table input[type="number"]::-webkit-outer-spin-button,
.perf-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
  display: none;
}
.perf-table input[type="number"]:focus,
.perf-table input[type="text"]:focus {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: rgba(37, 99, 235, 0.06);
}
.perf-table input[readonly] {
  background: transparent;
  color: #64748b;
}
.perf-table tr.perf-row--locked td {
  color: #94a3b8;
  background: #f8fafc;
}
.perf-footer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 0 2rem;
}
.perf-totals {
  margin: 0;
  font-size: 0.95rem;
}
.perf-empty {
  padding: 1.25rem;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  color: #475569;
}
.perf-msg {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.perf-msg--ok {
  background: #ecfdf5;
  color: #047857;
}
.perf-msg--err {
  background: #fef2f2;
  color: #b91c1c;
  white-space: pre-wrap;
}

/* —— 表单通用结果页 —— */
.form-info-page {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}
.form-info {
  width: min(560px, 100%);
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}
.form-info--ok {
  border-color: #86efac;
  background: #f0fdf4;
}
.form-info--info {
  border-color: #93c5fd;
  background: #eff6ff;
}
.form-info--err {
  border-color: #fecaca;
  background: #fef2f2;
}
.form-info__title {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}
.form-info__body {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}
.form-info__detail {
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}
.form-info__actions {
  margin: 1.1rem 0 0;
}

/* ---- RPA 调度 ---- */
.rpa-page .rpa-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.rpa-card {
  padding: 0.85rem 1rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
}
.rpa-card__label {
  font-size: 0.8125rem;
  color: #666;
}
.rpa-card__value {
  margin-top: 0.25rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
}
.rpa-card__value--ok {
  color: #2e7d32;
}
.rpa-card__value--err {
  color: #c62828;
}
.rpa-card__value--run {
  color: #1565c0;
}
.rpa-card__meta {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #777;
}
.rpa-card__meta a {
  color: #1565c0;
}
.rpa-section {
  margin-bottom: 1.5rem;
}
.rpa-section__title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}
.rpa-section__hint {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #777;
}
.rpa-section__link {
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 400;
  color: #1565c0;
}
.rpa-task-name {
  font-weight: 500;
}
.rpa-task-code {
  font-size: 0.75rem;
  color: #888;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.rpa-row--warn {
  background: #fff8e1;
}
.rpa-row--clickable {
  cursor: pointer;
}
.rpa-row--clickable:hover {
  background: #f5f9ff;
}
.rpa-bar-cell {
  min-width: 8rem;
}
.rpa-bar {
  display: flex;
  height: 0.55rem;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}
.rpa-bar__seg {
  display: block;
  height: 100%;
}
.rpa-bar__seg--ok {
  background: #66bb6a;
}
.rpa-bar__seg--err {
  background: #ef5350;
}
.rpa-detail-panel {
  width: min(40rem, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.rpa-detail-body {
  overflow: auto;
  padding-right: 0.25rem;
}
.rpa-dl {
  display: grid;
  gap: 0.45rem 1rem;
  margin: 0;
}
.rpa-dl > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.rpa-dl dt {
  margin: 0;
  color: #666;
}
.rpa-dl dd {
  margin: 0;
  word-break: break-word;
}
.rpa-detail-sub {
  margin: 1rem 0 0.35rem;
  font-size: 0.875rem;
}
.rpa-pre {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow: auto;
}
.rpa-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
}
.rpa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
}
.rpa-banner,
.msg.warn {
  color: #8a6d00;
}
.msg.ok {
  color: #2e7d32;
}
.rpa-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #888;
  border: 1px dashed #ddd;
  border-radius: 8px;
  background: #fafafa;
}
.rpa-run-meta {
  margin-left: 0.35rem;
  font-size: 0.75rem;
  color: #777;
}
.rpa-run-err {
  margin-top: 0.2rem;
  max-width: 14rem;
  font-size: 0.75rem;
  color: #c62828;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rpa-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.rpa-toggle--on {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}
.rpa-toggle--off {
  background: #f5f5f5;
  color: #777;
  border-color: #e0e0e0;
}
.rpa-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.35rem;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
}
.rpa-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}
.rpa-switch__slider {
  position: absolute;
  inset: 0;
  background: #cfd4dc;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.rpa-switch__slider::before {
  content: "";
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  left: 0.15rem;
  top: 0.15rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.rpa-switch input:checked + .rpa-switch__slider {
  background: #2e7d32;
}
.rpa-switch input:checked + .rpa-switch__slider::before {
  transform: translateX(1.15rem);
}
.rpa-switch input:focus-visible + .rpa-switch__slider {
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
}
.rpa-switch input:disabled + .rpa-switch__slider {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 新建/编辑弹窗：遮罩与白色卡片分离 */
.rpa-popup-mask.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: none;
}
.rpa-popup.modal-panel,
.modal-backdrop .rpa-popup {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 33.333vw;
  height: 66.667vh;
  max-width: 33.333vw;
  max-height: 66.667vh;
  min-width: 18rem;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  isolation: isolate;
}
.rpa-popup__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  border-bottom: 1px solid #eee;
}
.rpa-popup__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}
.rpa-popup__close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #666;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.rpa-popup__close:hover {
  background: #f3f3f3;
  color: #222;
}
.rpa-popup__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
  overflow: auto;
  background: #ffffff;
  color: #1a1a1f;
}
.rpa-popup__foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.15rem;
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
}
.rpa-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
}
.rpa-field__label {
  color: #444;
  font-weight: 500;
}
.rpa-field__label em {
  color: #c62828;
  font-style: normal;
}
.rpa-field__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #888;
}
.rpa-field__control,
.rpa-field input[type="text"],
.rpa-field input[type="number"],
.rpa-field input[type="date"],
.rpa-field input[type="time"],
.rpa-field input[type="datetime-local"],
.rpa-field select,
.rpa-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.rpa-field__control:focus,
.rpa-field select:focus,
.rpa-field input:focus,
.rpa-field textarea:focus {
  outline: none;
  border-color: #90a4ae;
  box-shadow: 0 0 0 3px rgba(144, 164, 174, 0.2);
}
.rpa-field--inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rpa-time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.rpa-time-row__type {
  width: auto;
  min-width: 5.5rem;
  flex: 0 0 auto;
}
.rpa-time-row__dom {
  width: 4.5rem;
  flex: 0 0 auto;
}
.rpa-time-row__clock {
  flex: 1 1 7rem;
  min-width: 7rem;
}
.rpa-btn {
  min-width: 4.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.rpa-btn--ghost {
  background: #fff;
  border-color: #ddd;
  color: #444;
}
.rpa-btn--ghost:hover {
  background: #f7f7f7;
}
.rpa-btn--primary {
  background: #1f2937;
  color: #fff;
}
.rpa-btn--primary:hover {
  background: #111827;
}
.rpa-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.rpa-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.rpa-field-row .rpa-field {
  min-width: 5rem;
  flex: 1;
}
.rpa-subheading {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.rpa-sched-table {
  table-layout: auto;
  width: 100%;
}
.rpa-sched-table th:nth-child(3),
.rpa-sched-table td.rpa-param-cell {
  width: 12rem;
  max-width: 12rem;
}
.rpa-param-cell__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpa-sched-table th.rpa-sched-col--fit,
.rpa-sched-table td.rpa-sched-col--fit {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.rpa-sched-table td.rpa-sched-col--status {
  text-align: center;
}
.rpa-sched-actions {
  width: max-content;
  flex-wrap: nowrap;
}

.rpa-user-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rpa-user-picker__selected {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  min-height: 1.6rem;
}
.rpa-user-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 0.85rem;
}
.rpa-user-picker__chip-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0 0.15rem;
  color: #64748b;
}
.rpa-user-picker__chip-x:hover {
  color: #111827;
}
.rpa-user-picker__uid {
  color: #6b7280;
  font-size: 0.8rem;
  margin-left: 0.25rem;
}
.rpa-user-picker__crumbs {
  font-size: 0.85rem;
  line-height: 1.4;
}
.rpa-user-picker__list {
  max-height: 14rem;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.25rem;
  background: #fafafa;
}
.rpa-user-picker__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.4rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.rpa-user-picker__item:hover {
  background: #eef2ff;
}
.rpa-user-picker__item.is-selected {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 500;
}
.rpa-user-picker__item--dept {
  color: #1e3a8a;
  font-weight: 500;
}
.rpa-user-picker__item--user {
  color: #111827;
}

/* 生产进度 new_vision 矩阵表 */
.table-wrap--matrix {
  overflow: auto;
  max-width: 100%;
}
.grid--matrix {
  min-width: max-content;
  font-size: 0.8125rem;
}
.grid--matrix th,
.grid--matrix td {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.grid--matrix .matrix-sticky-col {
  position: sticky;
  z-index: 2;
  background: #fff;
  text-align: left;
}
.grid--matrix thead .matrix-sticky-col {
  z-index: 4;
  background: #f5f5f5;
}
.grid--matrix .matrix-sticky-col--1 {
  left: 0;
  min-width: 5.5rem;
}

.grid--matrix .matrix-po-link {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #0b57d0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font: inherit;
}

.grid--matrix .matrix-po-link:hover {
  color: #0842a0;
}

.grid--matrix .matrix-sticky-col--2 {
  left: 5.5rem;
  min-width: 4.5rem;
}
.grid--matrix .matrix-sticky-col--3 {
  left: 10rem;
  min-width: 4.5rem;
}
.grid--matrix .matrix-sticky-col--4 {
  left: 14.5rem;
  min-width: 6.5rem;
}
.grid--matrix .matrix-sticky-col--5 {
  left: 21rem;
  min-width: 4rem;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}
.grid--matrix .matrix-group-head {
  background: #eef2f7;
  font-weight: 600;
  border-bottom: 1px solid #d8dee6;
}
.grid--matrix .matrix-size-head {
  min-width: 2.5rem;
  padding: 0.25rem 0.35rem;
  line-height: 1.15;
  background: #fafbfc;
}
.grid--matrix .matrix-size-head__letter,
.grid--matrix .matrix-size-head__number,
.grid--matrix .matrix-size-head__single {
  display: block;
}
.grid--matrix .matrix-size-head__number {
  font-size: 0.75rem;
  color: #666;
}
.grid--matrix .matrix-total-head {
  min-width: 2.75rem;
  background: #f0f4f8;
  font-weight: 600;
}
.grid--matrix .matrix-qty-cell {
  min-width: 2.25rem;
}
.grid--matrix .matrix-total-cell {
  font-weight: 600;
  background: #fafbfc;
}
.grid--matrix tbody tr:nth-child(even) .matrix-sticky-col {
  background: #fafafa;
}
.grid--matrix tbody tr:nth-child(even) .matrix-total-cell {
  background: #f3f6f9;
}

/* 生产进度入库页 */
.inbound-batch-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #444;
  cursor: pointer;
  user-select: none;
}
.inbound-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
}
.inbound-submit-bar {
  margin-top: 0.75rem;
}
.inbound-submit-bar .flex-spacer {
  flex: 1 1 auto;
}
.filter-label .req {
  color: #c62828;
  font-weight: 700;
}
.filter-input.is-invalid {
  border-color: #e57373;
  background: #fff8f8;
}
.grid th.col-check,
.grid td.col-check {
  width: 2.25rem;
  text-align: center;
  vertical-align: middle;
}
.grid td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ok {
  color: #2e7d32;
}

/* —— 1688 经营看板 —— */
.dash1688-page .header {
  margin-bottom: 0.75rem;
}
.dash1688-banner {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  background: #fff8e6;
  border: 1px solid #f0e0b2;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: #6b5a1e;
  line-height: 1.45;
}
.dash1688-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 0.9rem;
  border-bottom: 1px solid #e5e7eb;
}
.dash1688-tabs__btn {
  margin: 0;
  padding: 0.5rem 0.9rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 0.875rem;
  font-family: inherit;
  color: #555;
  cursor: pointer;
  line-height: 1.25;
}
.dash1688-tabs__btn:hover {
  color: #1d4ed8;
  background: transparent;
}
.dash1688-tabs__btn.is-active {
  color: #1d4ed8;
  font-weight: 600;
  border-bottom-color: #2563eb;
}
.dash1688-filters {
  margin-bottom: 1rem;
}
.dash1688-filters .filter-input {
  min-width: 8.5rem;
}
.dash1688-unit {
  margin-left: 0.2rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #888;
}
.dash1688-area-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.dash1688-area-card {
  padding: 1rem 1.1rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
}
.dash1688-area-card--missing {
  background: #f0f0f0;
  color: #888;
}
.dash1688-area-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}
.dash1688-area-card__sub {
  margin-left: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #888;
}
.dash1688-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #888;
}
.dash1688-summary-meta {
  margin-top: 0.75rem;
}
.dash1688-cal {
  position: relative;
}
.dash1688-cal__trigger {
  min-width: 14rem;
}
.dash1688-cal__panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 120;
  width: 272px;
  padding: 0.55rem 0.6rem 0.7rem;
  background: #fff;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.dash1688-cal__grains {
  display: flex;
  margin-bottom: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.dash1688-cal__grain {
  flex: 1;
  margin: 0;
  padding: 0.3rem 0;
  border: none;
  background: #fff;
  font-size: 0.8125rem;
  font-family: inherit;
  color: #555;
  cursor: pointer;
}
.dash1688-cal__grain + .dash1688-cal__grain {
  border-left: 1px solid #e5e7eb;
}
.dash1688-cal__grain.is-active {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}
.dash1688-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.dash1688-cal__nav-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.dash1688-cal__nav-btn {
  margin: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  line-height: 1;
}
.dash1688-cal__weekdays,
.dash1688-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.dash1688-cal__weekdays {
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  color: #888;
}
.dash1688-cal__cell,
.dash1688-cal__month {
  margin: 0;
  padding: 0.28rem 0;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1.2;
}
.dash1688-cal__cell.is-other {
  color: #bbb;
}
.dash1688-cal__cell.is-in-week,
.dash1688-cal__cell.is-range {
  background: #dbeafe;
}
.dash1688-cal__cell.is-selected,
.dash1688-cal__month.is-selected {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}
.dash1688-cal__cell.is-disabled,
.dash1688-cal__month.is-disabled {
  color: #ccc;
  cursor: not-allowed;
  background: transparent;
}
.dash1688-cal__months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}
.dash1688-cal__month {
  padding: 0.45rem 0;
  border: 1px solid #eee;
}
.dash1688-cal__field {
  width: 18.5rem;
  min-width: 18.5rem;
  max-width: none;
  cursor: pointer;
  background: #fff;
}
.dash1688-cal__panel--range {
  width: 292px;
}
.dash1688-cal__weeks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash1688-cal__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  border-radius: 4px;
}
.dash1688-cal__week.is-week:hover {
  background: #f3f4f6;
}
.dash1688-cal__nav-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}
.dash1688-section__actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.dash1688-colpref,
.dash1688-export {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.dash1688-export__group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
}
.dash1688-export__group > button.btn,
.dash1688-export__group > button.btn:hover:not(:disabled),
.dash1688-export__group > button.btn:active:not(:disabled) {
  transform: none;
  border-radius: 0;
}
.dash1688-export__group > button.btn.btn-secondary {
  color: #fff;
  background-color: #16a34a;
  border-color: #16a34a;
  box-shadow: none;
}
.dash1688-export__group > button.btn.btn-secondary:hover:not(:disabled) {
  background-color: #15803d;
  border-color: #15803d;
}
.dash1688-export__main {
  padding-left: 12px;
  padding-right: 10px;
}
.dash1688-export__more {
  width: 12px;
  min-width: 12px;
  margin-left: -1px;
  padding: 0;
  border-left-color: rgba(255, 255, 255, 0.35);
  font-size: 8px;
  line-height: 1;
}
.dash1688-export__menu,
.dash1688-colpref__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.dash1688-export__menu {
  min-width: 11.5rem;
  padding: 0.4rem;
}
.dash1688-export__check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.45rem;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.dash1688-export__checks {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.dash1688-export__checks .dash1688-export__check {
  padding: 0.15rem 0;
}
.dash1688-export__menu button {
  display: block;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.dash1688-export__menu button:hover {
  background: #f3f4f6;
}
.dash1688-export__menu .dash1688-export__go {
  margin-top: 0.25rem;
  background: #16a34a;
  color: #fff;
  text-align: center;
}
.dash1688-export__menu .dash1688-export__go:hover {
  background: #15803d;
}
.dash1688-colpref__panel,
.dash1688-colpref__modal {
  width: 280px;
  padding: 0.75rem;
}
.dash1688-colpref__modal {
  width: min(92vw, 360px);
}
.dash1688-colpref__list {
  max-height: 320px;
  overflow: auto;
  margin: 0.25rem 0 0.5rem;
}
.colpref-move {
  transition: transform 0.18s ease;
}
.dash1688-colpref__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.2rem;
  border-radius: 4px;
  cursor: grab;
}
.dash1688-colpref__row.is-drag-over {
  background: #eff6ff;
}
.dash1688-colpref__grip {
  width: 10px;
  height: 14px;
  flex: none;
  background:
    radial-gradient(circle, #9ca3af 1.1px, transparent 1.2px) 0 0 / 5px 5px;
  cursor: grab;
}
.dash1688-colpref__label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 400;
}
.dash1688-switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
}
.dash1688-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.dash1688-switch input:disabled {
  cursor: not-allowed;
}
.dash1688-switch__track {
  display: block;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: #d1d5db;
  position: relative;
  transition: background-color 0.15s ease;
}
.dash1688-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.dash1688-switch input:checked + .dash1688-switch__track {
  background: #2563eb;
}
.dash1688-switch input:checked + .dash1688-switch__track::after {
  transform: translateX(14px);
}
.dash1688-switch input:disabled + .dash1688-switch__track {
  opacity: 0.55;
}
.dash1688-colpref__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.dash1688-colpref__error {
  margin: 0 0 0.5rem;
  color: #dc2626;
  font-size: 0.8125rem;
  font-weight: 400;
}
.dash1688-prod-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}
.dash1688-cell-wow {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  line-height: 1.2;
}
.dash1688-area-card__kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.dash1688-area-card__label {
  font-size: 0.8125rem;
  color: #666;
}
.dash1688-area-card__value {
  margin-top: 0.2rem;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.dash1688-area-card__note {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: #888;
}
.dash1688-shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.dash1688-shop-card {
  padding: 0.75rem 0.85rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
}
.dash1688-shop-card--missing {
  background: #e8e8e8;
  border-color: #ddd;
  color: #777;
}
.dash1688-shop-card__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.dash1688-shop-card__name {
  font-weight: 600;
  font-size: 0.9rem;
}
.dash1688-shop-card__area {
  margin-left: auto;
  font-size: 0.75rem;
  color: #888;
}
.dash1688-badge-miss {
  margin-left: auto;
  font-size: 0.75rem;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
}
.dash1688-shop-card__pay {
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.dash1688-shop-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.5rem;
  margin: 0;
}
.dash1688-shop-card__meta dt {
  font-size: 0.7rem;
  color: #888;
}
.dash1688-shop-card__meta dd {
  margin: 0;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.dash1688-section {
  margin-bottom: 1.25rem;
}
.dash1688-section__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}
.dash1688-section__hint {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #777;
}
.dash1688-chart {
  width: 100%;
  height: 280px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
}
.dash1688-chart--overview {
  height: 340px;
}
.dash1688-chart-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin: 0.35rem 0 0.65rem;
}
.dash1688-chart-bar .filter-group {
  margin: 0;
}
.dash1688-chart-bar .filter-dropdown__trigger {
  min-width: 9.5rem;
}
.dash1688-chart-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dash1688-chart-custom__sep {
  color: #777;
  font-size: 0.8125rem;
}
.dash1688-wow--up {
  color: #2e7d32;
}
.dash1688-wow--down {
  color: #c62828;
}
.dash1688-row--missing td {
  color: #888;
  background: #f3f3f3;
}
.dash1688-empty {
  padding: 1.25rem 0.25rem 2rem;
  max-width: 40rem;
}
.dash1688-empty h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
}
.dash1688-empty p {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #444;
}
.dash1688-prod-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.dash1688-th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.dash1688-prod-row {
  cursor: default;
}
.dash1688-prod-row:hover td {
  background: #f3f7fd;
}
.dash1688-prod-row.is-active td {
  background: #e8eef8;
}
.dash1688-id {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  max-width: 100%;
}
.dash1688-id-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #1565c0;
  font: inherit;
  cursor: default;
}
.dash1688-copy {
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}
.dash1688-id:hover .dash1688-copy,
.dash1688-copy:focus-visible {
  display: inline-flex;
}
.dash1688-copy:hover {
  color: #1565c0;
  background: #e8eef8;
}
.dash1688-chart--product {
  height: 320px;
}
.dash1688-freshness-bar {
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
  font-size: 0.8125rem;
  color: #666;
}
.dash1688-stock-toolbar {
  margin-bottom: 0.75rem;
}
.dash1688-stock-toolbar .filter-input {
  min-width: 12rem;
}
.dash1688-stock-table {
  min-width: 58rem;
}
.dash1688-stock-row.is-need td {
  background: #fff4f0;
}

@media (max-width: 720px) {
  .dash1688-area-cards {
    grid-template-columns: 1fr;
  }
  .dash1688-area-card__value {
    font-size: 1.35rem;
  }
  .dash1688-shop-cards {
    grid-template-columns: 1fr;
  }
  .dash1688-chart {
    height: 220px;
  }
  .dash1688-section--table .table-wrap {
    overflow-x: auto;
  }
  .dash1688-section--table .grid {
    min-width: 32rem;
  }
}

.design-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f4f6;
  display: block;
}
.design-thumb--empty {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.design-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}
.design-row.is-selected td {
  background: #eff6ff;
}
.design-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.modal-panel--design-style {
  max-width: min(96vw, 560px);
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.design-dialog-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.design-dialog-fields .filter-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.design-dialog-fields .filter-input {
  width: 100%;
  box-sizing: border-box;
}
.design-sku-box {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  background: #fafafa;
}
.design-sku-box__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.design-sku-list {
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.design-sku-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.design-sku-item:hover {
  background: #f1f5f9;
}
.design-sku-item__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}
/* 新款销量跟踪：区域内滚动，双行表头固定 */
.table-wrap--design-sales {
  max-height: calc(100vh - 10.5rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.design-sales-table {
  border-collapse: separate;
  border-spacing: 0;
}
.design-sales-table th,
.design-sales-table td {
  border: 0;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.design-sales-table tr > :first-child {
  border-left: 1px solid #ddd;
}
.design-sales-table thead th {
  text-align: center;
  vertical-align: middle;
  position: sticky;
  background: #f5f5f5;
  background-clip: padding-box;
  box-shadow: 0 1px 0 #ddd;
}
.design-sales-table thead tr:first-child th {
  top: 0;
  z-index: 5;
  border-top: 1px solid #ddd;
}
.design-sales-table thead tr:nth-child(2) th {
  top: 2.15rem;
  z-index: 4;
}
.design-row {
  cursor: pointer;
}
.design-trend-row td {
  padding: 0;
  background: #f8fafc;
}
.design-trend-clip {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease;
}
.design-trend-clip.is-open {
  grid-template-rows: 1fr;
}
.design-trend-inner {
  overflow: hidden;
  min-height: 0;
  padding: 8px 12px 12px;
}
.design-trend-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}
.design-trend-head__title {
  font-weight: 600;
}
.design-trend-head span {
  font-weight: 400;
  color: #6b7280;
  font-size: 12px;
}
.design-grain {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.design-grain__btn {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  cursor: pointer;
}
.design-grain__btn.is-active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

/* ---- 权限管理 ---- */
.access-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 4px 32px;
}
.access-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.access-title {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  color: #111827;
}
.access-tabs {
  display: flex;
  gap: 8px;
}
.access-tab {
  padding: 6px 12px;
  border-radius: 6px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
}
.access-tab:hover {
  background: #f3f4f6;
}
.access-tab--active {
  background: #111827;
  color: #fff;
}
.access-hint {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 13px;
}
.access-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}
.access-loading,
.access-empty {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}
.access-table-wrap {
  overflow-x: auto;
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.access-table th,
.access-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.access-table th {
  color: #6b7280;
  font-weight: 600;
  background: #f9fafb;
}
.access-dept-name {
  font-weight: 600;
  color: #111827;
}
.access-dept-id {
  font-size: 12px;
  color: #9ca3af;
}
.access-select,
.access-input {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.access-input {
  min-width: 220px;
}
.access-btn {
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.access-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.access-btn-save {
  background: #2563eb;
}
.access-status {
  margin: 12px 0 0;
  font-size: 13px;
}
.access-status--ok {
  color: #047857;
}
.access-status--err {
  color: #b91c1c;
}
.access-user-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .access-user-layout {
    grid-template-columns: 1fr;
  }
}
.access-search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.access-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 520px;
  overflow: auto;
}
.access-user-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.access-user-item:hover {
  background: #f3f4f6;
}
.access-user-item--active {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.access-user-item__name {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}
.access-user-item__meta {
  font-size: 12px;
  color: #6b7280;
}
.access-subtitle {
  margin: 0 0 8px;
  font-size: 18px;
}
.access-muted {
  color: #9ca3af;
  font-weight: 400;
  font-size: 14px;
}
.access-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
}
.access-btn-danger {
  background: #b91c1c;
  margin-left: 8px;
}
.access-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sales-mom--up { color: #dc2626; }
.sales-mom--down { color: #059669; }
.dash1688-filters select.sales-field {
  box-sizing: border-box;
  height: 32px;
  margin: 0;
  padding: 0 28px 0 8px;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23909399' d='M2.2 4.2 6 8l3.8-3.8-.9-.9L6 6.2 3.1 3.3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: #333;
  font-size: 13px;
  font-family: inherit;
  line-height: 30px;
  cursor: pointer;
  appearance: none;
}
.dash1688-filters select.sales-field:hover,
.dash1688-filters select.sales-field:focus {
  border-color: #2563eb;
  outline: none;
}
.dash1688-filters .sales-key-filter {
  box-sizing: border-box;
  min-width: 220px;
  max-width: 320px;
  min-height: 32px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.3;
  resize: vertical;
}
.dash1688-filters .sales-key-filter:focus {
  border-color: #2563eb;
  outline: none;
}
.grid--range-select {
  user-select: none;
  cursor: cell;
}
.grid--range-select td.is-range-selected {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 1px #93c5fd;
}
.grid--range-select:focus {
  outline: none;
}
.sales-range {
  position: relative;
}
.sales-range button {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
}
.sales-range button.sales-range__trigger,
.sales-range .sales-range__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-sizing: border-box;
  min-width: 236px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #c5c5c5;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 13px;
}
.sales-range button.sales-range__trigger.is-open,
.sales-range button.sales-range__trigger:hover:not(:disabled),
.sales-range .sales-range__trigger.is-open,
.sales-range .sales-range__trigger:focus-within {
  border-color: #2563eb;
}
.sales-range__input {
  width: 7.2em;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  padding: 0;
}
.sales-range__input:disabled {
  color: #999;
}
.sales-range button.sales-range__cal-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #909399;
}
.sales-range button.sales-range__cal-btn:hover:not(:disabled) {
  color: #2563eb;
}
.sales-range__icon {
  flex: 0 0 auto;
  color: #909399;
}
.sales-range__value {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.sales-range__sep {
  flex: 0 0 auto;
  color: #909399;
}
.sales-range__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.sales-range__shortcuts {
  display: flex;
  flex-direction: column;
  flex: 0 0 188px;
  width: 188px;
  padding: 6px 0;
  border-right: 1px solid #e4e7ed;
  overflow: auto;
}
.sales-range button.sales-range__shortcut {
  display: block;
  width: 100%;
  padding: 6px 12px;
  text-align: left;
  font-size: 12px;
  color: #606266;
  white-space: nowrap;
}
.sales-range button.sales-range__shortcut:hover,
.sales-range button.sales-range__shortcut.is-active {
  color: #2563eb;
  background: #f5f7fa;
}
.sales-range__calendars {
  display: flex;
}
.sales-range__month {
  width: 252px;
  padding: 8px 12px 12px;
}
.sales-range__month + .sales-range__month {
  border-left: 1px solid #e4e7ed;
}
.sales-range__nav {
  display: grid;
  grid-template-columns: 24px 24px 1fr 24px 24px;
  align-items: center;
  margin-bottom: 6px;
}
.sales-range__title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #303133;
}
.sales-range button.sales-range__nav-btn {
  width: 24px;
  height: 24px;
  font-size: 14px;
  color: #606266;
}
.sales-range button.sales-range__nav-btn:hover:not(:disabled) {
  color: #2563eb;
}
.sales-range button.sales-range__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.sales-range__weekdays,
.sales-range__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.sales-range__weekdays {
  margin-bottom: 4px;
  font-size: 12px;
  color: #909399;
}
.sales-range button.sales-range__day {
  height: 28px;
  font-size: 12px;
  color: #303133;
  border-radius: 0;
}
.sales-range button.sales-range__day.is-outside {
  color: #c0c4cc;
}
.sales-range button.sales-range__day.is-today:not(.is-start):not(.is-end) {
  color: #2563eb;
  font-weight: 600;
}
.sales-range button.sales-range__day.is-in {
  background: #e8f3ff;
}
.sales-range button.sales-range__day.is-start,
.sales-range button.sales-range__day.is-end {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}
.sales-range button.sales-range__day.is-start {
  border-radius: 14px 0 0 14px;
}
.sales-range button.sales-range__day.is-end {
  border-radius: 0 14px 14px 0;
}
.sales-range button.sales-range__day.is-start.is-end {
  border-radius: 14px;
}
.sales-range button.sales-range__day:hover:not(:disabled):not(.is-start):not(.is-end) {
  color: #2563eb;
}
.sales-range button.sales-range__day:disabled {
  opacity: 1;
  color: #c0c4cc;
  background: transparent;
  cursor: not-allowed;
}



/* ============================================
   1688 商品基础信息编辑功能样式
   ============================================ */

/* 新增按钮 */
.dash1688-add-btn {
  padding: 0.4rem 0.8rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}

.dash1688-add-btn:hover {
  background: #1d4ed8;
}

/* 编辑和删除按钮 */
.dash1688-edit-btn,
.dash1688-delete-btn {
  padding: 0.25rem 0.5rem;
  margin-right: 0.25rem;
  font-size: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.dash1688-edit-btn {
  color: #2563eb;
  border-color: #2563eb;
}

.dash1688-edit-btn:hover {
  background: #2563eb;
  color: #fff;
}

.dash1688-delete-btn {
  color: #dc2626;
  border-color: #dc2626;
}

.dash1688-delete-btn:hover {
  background: #dc2626;
  color: #fff;
}

/* 编辑弹窗 */
.modal-panel--edit-listing {
  max-width: 520px;
  width: 100%;
}

.modal-panel__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-panel__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-panel__close:hover {
  color: #333;
}

.modal-panel__body {
  max-height: 60vh;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:disabled {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.form-hint {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* 图片上传区域 */
.image-upload-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-preview {
  position: relative;
  width: 150px;
  height: 150px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-clear-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-clear-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.image-placeholder {
  width: 150px;
  height: 150px;
  border: 2px dashed #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

.btn-upload {
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* 弹窗操作按钮 */
.btn-cancel,
.btn-primary {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-cancel:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-primary:disabled,
.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================================
   商品基础信息管理页面样式
   ============================================================================ */

.listing-manage {
  padding: 24px;
  background: #f7f5f1;
  min-height: 100vh;
}

.listing-manage__header {
  margin-bottom: 24px;
}

.listing-manage__title {
  font-size: 24px;
  font-weight: 600;
  color: #1e2227;
  margin: 0 0 8px 0;
}

.listing-manage__subtitle {
  font-size: 14px;
  color: #6b7077;
  margin: 0;
}

.listing-manage__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e7e3da;
}

.listing-manage__search {
  display: flex;
  gap: 8px;
  flex: 1;
}

.listing-manage__search-input {
  flex: 1;
  max-width: 400px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e7e3da;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.listing-manage__search-input:focus {
  border-color: #3c5a78;
}

.listing-manage__search-btn {
  height: 36px;
  padding: 0 16px;
  background: #3c5a78;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.listing-manage__search-btn:hover {
  background: #2e4760;
}

.listing-shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0.5rem;
}
.listing-shop-tag {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.listing-shop-tag.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.listing-row {
  cursor: grab;
}
.listing-row:active {
  cursor: grabbing;
}
.listing-grip {
  width: 28px;
  color: #9ca3af;
  text-align: center;
  cursor: grab;
  user-select: none;
}
.listing-grip:active {
  cursor: grabbing;
}
tr.listing-row.is-drag-over td {
  background: #eff6ff;
}
.listing-row-move {
  transition: transform 0.18s ease;
}

.listing-manage__shop-select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e7e3da;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  background: #ffffff;
}

.listing-manage__add-btn {
  height: 36px;
  padding: 0 16px;
  background: #3c5a78;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.listing-manage__add-btn:hover {
  background: #2e4760;
}

.listing-manage__error {
  padding: 12px 16px;
  background: #fee;
  color: #c33;
  border-radius: 6px;
  margin-bottom: 16px;
}

.listing-manage__loading {
  padding: 40px;
  text-align: center;
  color: #6b7077;
}

.listing-manage__table-container {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e7e3da;
  overflow: hidden;
}

.listing-manage__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.listing-manage__table thead {
  background: #f7f5f1;
  border-bottom: 2px solid #e7e3da;
}

.listing-manage__table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #1e2227;
}

.listing-manage__table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e7e3da;
  vertical-align: middle;
}

.listing-manage__table tbody tr:last-child td {
  border-bottom: none;
}

.listing-manage__table tbody tr:hover {
  background: #fafafa;
}

.listing-manage__table-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.listing-manage__no-image {
  color: #999;
  font-size: 12px;
}

.listing-manage__badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  background: #e7f3ff;
  color: #3c5a78;
  white-space: nowrap;
}

.listing-manage__action-btn {
  padding: 4px 12px;
  margin-right: 6px;
  background: #ffffff;
  color: #3c5a78;
  border: 1px solid #3c5a78;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.listing-manage__action-btn:hover {
  background: #3c5a78;
  color: #ffffff;
}

.listing-manage__action-btn--danger {
  color: #dc2626;
  border-color: #dc2626;
}

.listing-manage__action-btn--danger:hover {
  background: #dc2626;
  color: #ffffff;
}

.listing-manage__action-btn--save {
  background: #3c5a78;
  color: #ffffff;
  border-color: #3c5a78;
}

.listing-manage__action-btn--save:hover {
  background: #2e4760;
}

.listing-manage__action-btn--cancel {
  color: #6b7077;
  border-color: #e7e3da;
}

.listing-manage__action-btn--cancel:hover {
  background: #f7f5f1;
}

.listing-manage__edit-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #e7e3da;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.listing-manage__edit-input:focus {
  border-color: #3c5a78;
}

.listing-manage__image-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.listing-manage__image-placeholder {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f5f1;
  border: 1px dashed #e7e3da;
  border-radius: 4px;
  font-size: 12px;
  color: #999;
}

.listing-manage__image-actions {
  display: flex;
  gap: 6px;
}

.listing-manage__image-btn {
  padding: 4px 10px;
  background: #ffffff;
  color: #3c5a78;
  border: 1px solid #3c5a78;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.listing-manage__image-btn:hover {
  background: #3c5a78;
  color: #ffffff;
}

.listing-manage__image-btn--remove {
  color: #dc2626;
  border-color: #dc2626;
}

.listing-manage__image-btn--remove:hover {
  background: #dc2626;
  color: #ffffff;
}

.listing-manage__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e7e3da;
}

.listing-manage__page-btn {
  padding: 6px 16px;
  background: #3c5a78;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.listing-manage__page-btn:hover:not(:disabled) {
  background: #2e4760;
}

.listing-manage__page-btn:disabled {
  background: #e7e3da;
  color: #999;
  cursor: not-allowed;
}

.listing-manage__page-info {
  color: #6b7077;
  font-size: 14px;
}

/* 添加弹窗样式 */
.listing-manage__modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.listing-manage__modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.listing-manage__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e7e3da;
}

.listing-manage__modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e2227;
}

.listing-manage__modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #6b7077;
  cursor: pointer;
  transition: color 0.2s;
}

.listing-manage__modal-close:hover {
  color: #1e2227;
}

.listing-manage__modal-body {
  padding: 24px;
}

.listing-manage__form-group {
  margin-bottom: 20px;
}

.listing-manage__form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1e2227;
}

.listing-manage__required {
  color: #dc2626;
}

.listing-manage__form-input,
.listing-manage__form-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e7e3da;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.listing-manage__form-input:focus,
.listing-manage__form-select:focus {
  border-color: #3c5a78;
}

.listing-manage__image-upload {
  margin-top: 8px;
}

.listing-manage__image-preview-wrap {
  position: relative;
  display: inline-block;
}

.listing-manage__image-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e7e3da;
  display: block;
}

.listing-manage__image-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  padding: 0;
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.listing-manage__image-remove:hover {
  background: #b91c1c;
}

.listing-manage__upload-btn {
  width: 100%;
  padding: 24px;
  background: #f7f5f1;
  border: 2px dashed #e7e3da;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: #6b7077;
}

.listing-manage__upload-btn:hover {
  background: #ffffff;
  border-color: #3c5a78;
  color: #3c5a78;
}

.listing-manage__modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e7e3da;
}

.listing-manage__modal-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.listing-manage__modal-btn--cancel {
  background: #f7f5f1;
  color: #6b7077;
}

.listing-manage__modal-btn--cancel:hover {
  background: #e7e3da;
}

.listing-manage__modal-btn--primary {
  background: #3c5a78;
  color: #ffffff;
}

.listing-manage__modal-btn--primary:hover {
  background: #2e4760;
}
