/* 运营项目：在途 / 海外仓商品、物流公司分配与货号编辑 */
:root {
  --ops-purple: #6427d9;
  --ops-purple-dark: #40158f;
  --ops-magenta: #ad18bf;
  --ops-violet-wash: #f5f1fc;
  --ops-surface: #ffffff;
  --ops-surface-soft: #fbfafe;
  --ops-text: #272832;
  --ops-muted: #7c808b;
  --ops-border: #e6e3ec;
  --ops-green: #2d7e59;
  --ops-red: #c9485e;
  --ops-shadow: 0 12px 34px rgba(49, 17, 123, 0.07);
}

.shipment-page {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.operations-page-utility {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.shipment-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 4px 0 24px;
}

.shipment-page-heading > div:first-child { min-width: 0; }
.shipment-page-heading .back-button { margin-bottom: 18px; }

/* 在途与海外仓共用的紧凑工作台标题：返回、标题和操作保持在同一视觉行。 */
#project-view .shipment-page-heading {
  align-items: center;
  gap: 18px;
  margin: 0 0 12px;
}

#project-view .shipment-page-heading > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  min-height: 42px;
}

#project-view .shipment-page-heading .back-button {
  grid-column: 1;
  grid-row: 1 / 3;
  margin: 0;
  white-space: nowrap;
}

#project-view .shipment-page-heading .section-kicker {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-bottom: 3px;
  line-height: 1;
}

#project-view .shipment-page-heading h1 {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 0;
  font-size: clamp(24px, 2vw, 31px);
  line-height: 1.05;
}
.section-kicker {
  display: block;
  color: var(--ops-purple);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.shipment-page-heading h1 {
  margin: 8px 0 7px;
  font-size: clamp(25px, 2.5vw, 34px);
  letter-spacing: -0.045em;
}

.shipment-page-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--ops-muted);
  font-size: 10px;
  line-height: 1.7;
}

.shipment-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-bottom: 2px;
}

#project-view .shipment-actions { gap: 7px; padding-bottom: 0; }
#project-view .shipment-actions .secondary-button { min-height: 32px; padding-inline: 11px; }
#project-view .shipment-actions .primary-action { min-height: 34px; padding-inline: 14px; }

.primary-action,
.filter-button,
.batch-paste > button,
.save-store-button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(105deg, var(--ops-purple), var(--ops-magenta));
  color: #fff;
  padding: 0 16px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(100, 39, 217, 0.18);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}

.primary-action:hover,
.filter-button:hover,
.batch-paste > button:hover,
.save-store-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 25px rgba(100, 39, 217, 0.25);
}

.secondary-button {
  min-height: 36px;
  padding-inline: 13px;
  border-color: var(--ops-border);
  color: var(--ops-purple-dark);
  font-size: 8px;
  font-weight: 700;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(100, 39, 217, 0.3);
  background: var(--ops-violet-wash);
}

.primary-action:disabled,
.secondary-button:disabled,
.filter-button:disabled,
.batch-paste > button:disabled,
.save-store-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.development-notice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  border: 1px solid #eadcf7;
  border-radius: 11px;
  background: linear-gradient(100deg, #f7f2fd, #fdf8ff);
  padding: 12px 15px;
  color: #6f4e81;
  font-size: 9px;
}

.development-notice b {
  flex: 0 0 auto;
  border-radius: 99px;
  background: #e9def9;
  color: var(--ops-purple-dark);
  padding: 5px 9px;
  font-size: 8px;
}

.shipment-summary {
  display: grid;
  grid-template-columns: minmax(420px, 4fr) minmax(230px, 2fr) minmax(390px, 3fr);
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

#project-view .shipment-summary { gap: 10px; margin-bottom: 10px; }
#project-view .summary-group { padding: 7px; }
#project-view .summary-group > header { min-height: 19px; margin-bottom: 5px; }
#project-view .shipment-summary article { min-height: 52px; padding: 7px 8px; }

.summary-group {
  min-width: 0;
  border: 1px solid #e6e3ea;
  border-radius: 10px;
  background: #fbfbfc;
  padding: 8px;
}

.summary-group > header {
  display: flex;
  min-height: 22px;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  border-left: 3px solid #1597e5;
  padding: 0 0 0 7px;
}

.summary-group > header h2 {
  flex: 0 0 auto;
  margin: 0;
  color: #2e3038;
  font-size: 9px;
  font-weight: 800;
}

.summary-group > header p {
  overflow: hidden;
  margin: 0;
  color: #a0a1a8;
  font-size: 6.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-group-aging > header { border-left-color: #ff9b31; }
.summary-group-cost > header { border-left-color: #6d37c8; }

.summary-cards {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.summary-overview-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-aging-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.summary-cost-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.shipment-summary article {
  position: relative;
  min-width: 0;
  min-height: 57px;
  overflow: hidden;
  border: 1px solid #e5e5e8;
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  box-shadow: 0 2px 7px rgba(31, 34, 48, 0.035);
}

.shipment-summary article::after { display: none; }

.shipment-summary span {
  display: block;
  color: var(--ops-muted);
  overflow: hidden;
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-summary b {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #2d3038;
  font-size: 15px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-summary article > em { display: block; overflow: hidden; margin-top: 5px; color: #aaaab1; font-size: 5.8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.shipment-summary .summary-date b { color: #4b238b; font-size: 12px; line-height: 1.2; }
.shipment-summary .summary-aging b { display: flex; align-items: baseline; gap: 4px; }
.shipment-summary .summary-aging b strong { font-size: 16px; }
.shipment-summary .summary-aging b small { color: rgba(255, 255, 255, 0.86); font-size: 6px; font-weight: 700; }
.shipment-summary .summary-aging em { color: rgba(255, 255, 255, 0.84); }
.shipment-summary .summary-aging em strong { color: inherit; font-size: inherit; }
.shipment-summary .summary-aging-warning { border-color: #ff9b31; background: linear-gradient(135deg, #ffab3e, #ff7f35); box-shadow: 0 3px 9px rgba(255, 132, 42, 0.2); }
.shipment-summary .summary-aging-critical { border-color: #ed3346; background: linear-gradient(135deg, #ef334d, #d91629); box-shadow: 0 3px 9px rgba(216, 22, 42, 0.18); }
.shipment-summary .summary-aging span,
.shipment-summary .summary-aging b { color: #fff; }
.shipment-summary .summary-cost b { color: #342143; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.shipment-summary .summary-cost-total { border-color: #7138ce; background: linear-gradient(135deg, #7c45d2, #5d22bb); box-shadow: 0 3px 10px rgba(94, 35, 184, 0.2); }
.shipment-summary .summary-cost-total span,
.shipment-summary .summary-cost-total b,
.shipment-summary .summary-cost-total em { color: #fff; }

.shipment-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--ops-border);
  border-radius: 11px;
  background: var(--ops-surface);
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(31, 34, 48, 0.025);
}

.shipment-filters > label {
  flex: 1 1 112px;
  gap: 5px;
}

.shipment-filters > label:first-child { flex: 1.55 1 220px; }

.shipment-filters label,
.shipment-form-grid label,
.batch-paste label,
.sku-line label,
.sku-row label,
.store-editor label,
.store-admin-card label,
.store-card label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #474954;
  font-size: 8px;
  font-weight: 700;
}

.shipment-filters input,
.shipment-filters select,
.shipment-form-grid input,
.shipment-form-grid select,
.shipment-form-grid textarea,
.batch-paste textarea,
.sku-line input,
.sku-line select,
.sku-row input,
.sku-row select,
.store-editor input,
.store-editor select,
.store-admin-card input,
.store-card input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #dedce5;
  border-radius: 8px;
  outline: 0;
  background: var(--ops-surface-soft);
  color: var(--ops-text);
  padding: 0 11px;
  font-size: 9px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.shipment-filters input:focus,
.shipment-filters select:focus,
.shipment-form-grid input:focus,
.shipment-form-grid select:focus,
.shipment-form-grid textarea:focus,
.batch-paste textarea:focus,
.sku-line input:focus,
.sku-line select:focus,
.sku-row input:focus,
.sku-row select:focus,
.store-editor input:focus,
.store-editor select:focus,
.store-admin-card input:focus,
.store-card input:focus {
  border-color: #9252dd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(100, 39, 217, 0.09);
}

.shipment-filters input::placeholder,
.shipment-form-grid input::placeholder,
.shipment-form-grid textarea::placeholder,
.batch-paste textarea::placeholder,
.sku-line input::placeholder,
.sku-row input::placeholder { color: #aaaeb7; }

.filter-button,
.clear-filter-button { height: 34px; }

.shipment-filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.shipment-filter-actions .filter-button,
.shipment-filter-actions .clear-filter-button {
  min-width: 58px;
  padding-inline: 12px;
}

.shipment-filters input,
.shipment-filters select { height: 34px; border-radius: 7px; padding-inline: 9px; }

.clear-filter-button {
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  background: #fff;
  color: var(--ops-muted);
  padding: 0 13px;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.clear-filter-button:hover { background: #f7f5fa; color: var(--ops-purple-dark); }

.shipment-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
  scrollbar-color: #c9bddc #f5f3f8;
  scrollbar-width: thin;
}

.shipment-table {
  width: 1164px;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.shipment-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 35px;
  border-bottom: 1px solid var(--ops-border);
  background: #f7f4fb;
  color: #706b78;
  padding: 0 13px 0 8px;
  text-align: left;
  white-space: nowrap;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.shipment-table th:first-child { padding-left: 10px; }
.shipment-column-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 3;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}
.shipment-column-resizer::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 1px;
  background: #d9d3df;
  transition: width 0.12s, background 0.12s;
}
.shipment-column-resizer:hover::after,
.shipment-column-resizer:focus-visible::after {
  width: 2px;
  background: var(--ops-purple);
}
.shipment-column-resizer:focus-visible { outline: 0; }
.is-resizing-shipment-column,
.is-resizing-shipment-column * { cursor: col-resize !important; user-select: none !important; }
.shipment-table td {
  border-bottom: 1px solid #efedf2;
  padding: 6px 8px;
  color: #51535d;
  vertical-align: middle;
  font-size: 8px;
  line-height: 1.25;
}

.shipment-table td:first-child { padding-left: 10px; }
.shipment-table tbody tr:last-child td { border-bottom: 0; }
.shipment-table tbody tr { transition: background 0.16s; }
.shipment-table tbody tr:hover { background: #fcfaff; }
.shipment-detail-row:not(.is-last) td { border-bottom-color: #f4f1f7; }
.shipment-detail-row.is-last td { border-bottom-color: #ddd6e6; }
.shipment-detail-row.is-first:not(:first-child) td { border-top: 1px solid #eee9f3; }
.shipment-detail-row td { height: 34px; overflow: hidden; }
.shipment-detail-row.is-editing td {
  overflow: visible;
  background: #f5effd;
  box-shadow: inset 0 1px 0 #e8ddf5, inset 0 -1px 0 #e8ddf5;
}
.shipment-detail-row.is-inactive td:not(.table-actions) {
  position: relative;
  background: #f3f3f5;
  color: #94959c;
  opacity: 0.68;
  text-decoration: line-through;
}
.shipment-detail-row.is-inactive td:not(.table-actions)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(83, 84, 91, 0.58);
  pointer-events: none;
}
.shipment-detail-row.is-inactive:hover td:not(.table-actions) { background: #eeeeef; }
.shipment-detail-row.is-item-inactive td:not(.table-actions) {
  position: relative;
  background: #ececef;
  color: #898b93;
  opacity: 0.72;
  text-decoration: line-through;
}
.shipment-detail-row.is-item-inactive td:not(.table-actions)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(70, 71, 78, 0.68);
  pointer-events: none;
}
.shipment-detail-row.is-item-inactive:hover td:not(.table-actions) { background: #e5e5e8; }
.shipment-detail-row.is-inactive .inactive-reason {
  overflow: hidden;
  color: #8d4552;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-detail-row .sku-code-cell {
  min-width: 0;
  max-width: none;
}
.shipment-detail-row .sku-image-cell {
  padding: 3px 6px;
  text-align: center;
}
.sku-thumbnail {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border: 1px solid #e7e2ec;
  border-radius: 6px;
  background: #f7f5f9;
  object-fit: cover;
  cursor: zoom-in;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.sku-thumbnail:hover { border-color: #b99bdc; box-shadow: 0 3px 10px rgba(78, 43, 116, 0.16); transform: scale(1.04); }
.sku-thumbnail:focus-visible { border-color: var(--ops-purple); outline: 2px solid rgba(100, 39, 217, 0.2); outline-offset: 2px; }
.sku-image-placeholder {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d9d3df;
  border-radius: 6px;
  background: #f8f7f9;
  color: #a09ba7;
  font-size: 6px;
  font-weight: 700;
}
.shipment-detail-row .sku-code-cell strong {
  display: block;
  overflow: hidden;
  color: #251a33;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-code-content { display: flex; min-width: 0; align-items: center; gap: 4px; }
.sku-code-content strong { min-width: 0; flex: 1 1 auto; }
.delete-single-sku {
  min-height: 18px;
  flex: 0 0 auto;
  border: 1px solid #e7cbd1;
  border-radius: 5px;
  background: #fff;
  color: var(--ops-red);
  padding: 0 4px;
  font-size: 5.5px;
  line-height: 1;
  cursor: pointer;
}
.delete-single-sku:hover:not(:disabled) { border-color: #d8a8b2; background: #fff4f6; }
.delete-single-sku:disabled { opacity: 0.5; cursor: wait; }
.shipment-detail-row .sku-name-cell {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  color: #35303c;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-detail-row .logistics-company-cell {
  min-width: 0;
  max-width: none;
}
.shipment-detail-row .source-store-cell {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  color: #35303c;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-detail-row .cost-cell {
  overflow: hidden;
  color: #3f2d50;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-detail-row .cost-cell.cost-missing { color: #9b9da5; font-weight: 600; }
.shipment-detail-row .cost-cell.cost-conflict { color: var(--ops-red); font-size: 7px; }
.shipment-detail-row:not(.is-inactive):not(.is-item-inactive) .shipment-time-cell {
  color: var(--ops-text);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.shipment-detail-row:not(.is-inactive):not(.is-item-inactive) .shipment-time-cell.time-age-warning { color: #b57400; }
.shipment-detail-row:not(.is-inactive):not(.is-item-inactive) .shipment-time-cell.time-age-danger { color: #c82f49; }
.shipment-table td b,
.shipment-cell-title,
.cargo-number { color: var(--ops-text); font-size: 9px; font-weight: 700; }
.shipment-table td small,
.shipment-cell-meta { display: block; margin-top: 1px; color: #92959e; font-size: 6.5px; }

.shipment-skus,
.sku-summary,
.sku-tags {
  display: flex;
  min-width: 180px;
  flex-wrap: wrap;
  gap: 5px;
}

.shipment-skus span,
.sku-summary span,
.sku-tags span,
.sku-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e7dff3;
  border-radius: 6px;
  background: #f7f3fc;
  color: #5b3889;
  padding: 4px 6px;
  white-space: nowrap;
  font-size: 7px;
}

.status-badge,
.shipment-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  background: #eaf7f0;
  color: var(--ops-green);
  padding: 3px 6px;
  white-space: nowrap;
  font-size: 6.5px;
  font-weight: 700;
}

.status-badge::before,
.shipment-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.shipment-status.status-inactive { background: #e8e8eb; color: #65676f; }
.state-cell { overflow: visible !important; }
.shipment-clear-to-recycle,
.item-inactive-actions {
  position: relative;
  z-index: 3;
  text-decoration: none !important;
}
.shipment-clear-to-recycle {
  display: block;
  min-height: 22px;
  margin: 0 auto;
  border: 1px solid #c87f8e;
  border-radius: 6px;
  background: #fff7f8;
  color: #922c41;
  padding: 0 5px;
  font-size: 5.5px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}
.shipment-clear-to-recycle:hover:not(:disabled) { border-color: #a94e61; background: #ffecef; }
.shipment-clear-to-recycle:disabled { opacity: 0.55; cursor: wait; }
.item-inactive-actions {
  display: grid;
  gap: 2px;
}
.item-inactive-actions button {
  min-height: 14px;
  border: 1px solid #c7c9ce;
  border-radius: 4px;
  background: #fff;
  padding: 0 3px;
  font-size: 5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.item-inactive-actions .item-reactivate { border-color: #9cc7ae; color: #227146; }
.item-inactive-actions .item-recycle { border-color: #d5a5ae; color: #9a3045; }
.item-inactive-actions button:hover:not(:disabled) { background: #f8f5fc; }
.item-inactive-actions button:disabled { opacity: 0.5; cursor: wait; }
.shipment-detail-row.is-inactive .shipment-clear-to-recycle,
.shipment-detail-row.is-item-inactive .item-inactive-actions,
.shipment-detail-row.is-item-inactive .item-inactive-actions button {
  opacity: 1;
  text-decoration: none !important;
}

.row-actions,
.shipment-row-actions,
.table-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table-actions {
  vertical-align: middle !important;
  border-bottom-color: #ddd6e6 !important;
}

.row-actions button,
.shipment-row-actions button,
.table-actions button,
.edit-shipment,
.delete-shipment {
  min-height: 24px;
  border: 1px solid #e1dce8;
  border-radius: 7px;
  background: #fff;
  color: var(--ops-purple-dark);
  padding: 0 6px;
  font-size: 6.5px;
  cursor: pointer;
}

.row-actions button:hover,
.shipment-row-actions button:hover,
.table-actions button:hover,
.edit-shipment:hover { border-color: #bba6da; background: var(--ops-violet-wash); }
.row-actions .danger,
.shipment-row-actions .danger,
.table-actions .danger,
.delete-shipment { color: var(--ops-red); }
.table-action-group.inactive-actions { align-items: stretch; flex-direction: column; gap: 4px; }
.table-actions .reactivate { border-color: #c6dfd2; color: var(--ops-green); }
.table-actions .reactivate:hover:not(:disabled) { border-color: #87b79d; background: #eef8f2; }
.table-actions .recycle-now { border-color: #ebc9d0; }
.table-actions button:disabled { opacity: 0.5; cursor: wait; }

.shipment-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  padding: 36px;
  text-align: center;
  color: var(--ops-muted);
}

.shipment-empty::before {
  content: "▤";
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 14px;
  background: var(--ops-violet-wash);
  color: var(--ops-purple);
  font-size: 19px;
}

.shipment-empty b { color: #555761; font-size: 12px; }
.shipment-empty p { margin: 7px 0 0; font-size: 8px; }

.shipment-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

.shipment-pagination button {
  height: 32px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ops-purple-dark);
  padding: 0 11px;
  font-size: 8px;
  cursor: pointer;
}

.shipment-pagination button:hover:not(:disabled) { border-color: #baa4da; background: var(--ops-violet-wash); }
.shipment-pagination button:disabled { opacity: 0.45; cursor: not-allowed; }
.shipment-pagination span { color: var(--ops-muted); font-size: 8px; }

/* 同页回收站：保留作废记录，只允许恢复，不提供永久删除。 */
.showing-recycle-bin .shipment-actions > :not(#shipment-recycle-bin) { display: none; }
.showing-recycle-bin #shipment-recycle-bin {
  border-color: rgba(100, 39, 217, 0.3);
  background: var(--ops-violet-wash);
  color: var(--ops-purple-dark);
  cursor: default;
}

.recycle-bin-panel { min-width: 0; }
.recycle-bin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 14px;
}
.recycle-bin-heading h2 { margin: 6px 0 4px; color: var(--ops-text); font-size: 20px; letter-spacing: -0.025em; }
.recycle-bin-heading p { max-width: 720px; margin: 0; color: var(--ops-muted); font-size: 8px; line-height: 1.6; }
.recycle-bin-summary {
  display: flex;
  align-items: center;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: var(--ops-border);
}
.recycle-bin-summary span {
  flex: 0 1 220px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  color: var(--ops-muted);
  padding: 8px 12px;
  font-size: 8px;
}
.recycle-bin-summary b { color: var(--ops-purple-dark); font-size: 16px; font-variant-numeric: tabular-nums; }
.recycle-bin-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--ops-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--ops-shadow);
  scrollbar-color: #c9bddc #f5f3f8;
  scrollbar-width: thin;
}
.recycle-bin-table { width: 100%; min-width: 940px; border-collapse: collapse; table-layout: fixed; }
.recycle-bin-table th {
  height: 35px;
  border-bottom: 1px solid var(--ops-border);
  background: #f7f4fb;
  color: #706b78;
  padding: 0 9px;
  text-align: left;
  white-space: nowrap;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.035em;
}
.recycle-bin-table th:nth-child(1) { width: 122px; }
.recycle-bin-table th:nth-child(2) { width: 124px; }
.recycle-bin-table th:nth-child(3) { width: 280px; }
.recycle-bin-table th:nth-child(4) { width: 70px; }
.recycle-bin-table th:nth-child(5) { width: 112px; }
.recycle-bin-table th:nth-child(6) { width: 92px; }
.recycle-bin-table th:nth-child(7) { width: 150px; }
.recycle-bin-table th:nth-child(8) { width: 70px; }
.recycle-bin-table td {
  border-bottom: 1px solid #efedf2;
  padding: 8px 9px;
  color: #51535d;
  vertical-align: middle;
  font-size: 8px;
  line-height: 1.35;
}
.recycle-bin-table tbody tr:last-child td { border-bottom: 0; }
.recycle-bin-table tbody tr:hover { background: #fcfaff; }
.recycle-deleted-at,
.recycle-quantity { font-variant-numeric: tabular-nums; }
.recycle-cargo strong { display: block; overflow-wrap: anywhere; color: var(--ops-text); font-size: 9px; }
.recycle-cargo small { display: block; margin-top: 2px; color: var(--ops-muted); font-size: 6.5px; }
.recycle-quantity { color: var(--ops-text) !important; font-weight: 750; }
.recycle-sku-list { display: grid; gap: 4px; }
.recycle-sku-line {
  display: grid;
  grid-template-columns: minmax(90px, 1.15fr) minmax(70px, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  border-radius: 6px;
  background: #f8f5fc;
  padding: 4px 6px;
}
.recycle-sku-line strong,
.recycle-sku-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recycle-sku-line strong { color: #3f255f; font-size: 7.5px; }
.recycle-sku-line span { color: #77717f; font-size: 7px; }
.recycle-sku-line b { color: var(--ops-purple-dark); font-size: 7px; white-space: nowrap; }
.recycle-sku-empty { color: var(--ops-muted); }
.recycle-reason { overflow-wrap: anywhere; color: #6d4a53 !important; }
.recycle-restore-button {
  min-height: 26px;
  border: 1px solid #cdbce4;
  border-radius: 7px;
  background: #fff;
  color: var(--ops-purple-dark);
  padding: 0 9px;
  font-size: 7px;
  font-weight: 750;
  cursor: pointer;
}
.recycle-restore-button:hover:not(:disabled) { border-color: #a282ce; background: var(--ops-violet-wash); }
.recycle-restore-button:disabled { opacity: 0.5; cursor: wait; }
.recycle-bin-empty::before { content: "♻"; }
.recycle-bin-pagination { padding-bottom: 2px; }
.recycle-item-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ops-border); }
.recycle-item-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.recycle-item-heading h3 { margin: 0 0 4px; color: var(--ops-text); font-size: 14px; }
.recycle-item-heading p { margin: 0; color: var(--ops-muted); font-size: 7.5px; }
.recycle-item-summary { display: flex; align-items: center; gap: 14px; color: var(--ops-muted); font-size: 7.5px; white-space: nowrap; }
.recycle-item-summary b { color: var(--ops-purple-dark); font-size: 13px; }
.recycle-item-table { min-width: 1010px; }
.recycle-item-table th:nth-child(1) { width: 122px; }
.recycle-item-table th:nth-child(2) { width: 120px; }
.recycle-item-table th:nth-child(3) { width: 135px; }
.recycle-item-table th:nth-child(4) { width: 140px; }
.recycle-item-table th:nth-child(5) { width: 64px; }
.recycle-item-table th:nth-child(6) { width: 108px; }
.recycle-item-table th:nth-child(7) { width: 90px; }
.recycle-item-table th:nth-child(8) { width: 150px; }
.recycle-item-table th:nth-child(9) { width: 70px; }
.recycle-item-sku { overflow-wrap: anywhere; color: #3f255f !important; font-weight: 800; }
.recycle-item-name { overflow-wrap: anywhere; }

/* 物流公司与运营分配 */
.store-admin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.store-admin-list[aria-busy="true"] { min-height: 110px; opacity: 0.55; }
.store-admin-card,
.store-card {
  min-width: 0;
  border: 1px solid var(--ops-border);
  border-radius: 13px;
  background: var(--ops-surface-soft);
  padding: 17px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.store-admin-card:hover,
.store-card:hover { border-color: #d7c9e9; box-shadow: 0 8px 22px rgba(49, 17, 123, 0.055); }
.store-admin-card.inactive,
.store-card.inactive { opacity: 0.68; background: #f7f7f9; }
.store-card-header,
.store-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.store-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.store-avatar,
.store-icon {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #e7ddfb, #f4def7);
  color: var(--ops-purple);
  font-size: 13px;
  font-weight: 800;
}

.store-identity h3,
.store-card-header h3,
.store-admin-header h3 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.store-identity p,
.store-card-header p,
.store-admin-header p { margin: 4px 0 0; color: #8d9099; font-size: 8px; }
.store-badge,
.store-platform {
  flex: 0 0 auto;
  border-radius: 99px;
  background: #eee7fb;
  color: var(--ops-purple-dark);
  padding: 5px 8px;
  font-size: 7px;
  font-weight: 700;
}

.store-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding-top: 14px;
  border-top: 1px solid #eeebf1;
}

.store-editor .wide,
.store-operator-block,
.store-operators { grid-column: 1 / -1; }
.store-operator-block > b,
.store-operators > b { display: block; margin-bottom: 8px; color: #474954; font-size: 8px; }
.store-card-actions,
.store-editor-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.store-save-status,
.store-status { margin-left: auto; color: var(--ops-green); font-size: 8px; }
.store-save-status.error,
.store-status.error { color: var(--ops-red); }

/* 新增 / 编辑货号弹窗 */
.shipment-dialog {
  width: min(940px, calc(100vw - 40px));
  max-height: min(90vh, 880px);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 0;
  color: var(--ops-text);
  box-shadow: 0 32px 80px rgba(29, 12, 58, 0.3);
}

.shipment-dialog::backdrop {
  background: rgba(24, 13, 43, 0.56);
  backdrop-filter: blur(4px);
}

.shipment-dialog[open] { animation: dialog-in 0.2s ease-out; }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.shipment-dialog > form {
  display: flex;
  max-height: inherit;
  flex-direction: column;
}

.shipment-dialog header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--ops-border);
  background: linear-gradient(110deg, #fff, #faf6ff);
  padding: 21px 24px 18px;
}

.shipment-dialog header h2 { margin: 7px 0 4px; font-size: 21px; letter-spacing: -0.03em; }
.shipment-dialog header p { margin: 0; color: var(--ops-muted); font-size: 8px; }
.dialog-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  background: #fff;
  color: #797c85;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover { border-color: #c9b6e3; background: var(--ops-violet-wash); color: var(--ops-purple); }
.shipment-form-grid {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 20px 24px;
}

.shipment-form-grid .wide-field { grid-column: 1 / -1; }
.shipment-form-grid textarea { height: auto; min-height: 62px; resize: vertical; padding-block: 10px; line-height: 1.5; }

.sku-editor {
  min-height: 0;
  overflow-y: auto;
  margin: 0 24px;
  border: 1px solid var(--ops-border);
  border-radius: 13px;
  background: #fbfafe;
  padding: 16px;
  scrollbar-color: #c9bddc #f5f3f8;
  scrollbar-width: thin;
}

.sku-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.sku-editor-heading h3 { margin: 0; font-size: 12px; }
.sku-editor-heading p { margin: 4px 0 0; color: var(--ops-muted); font-size: 8px; }
.batch-paste {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border-radius: 10px;
  background: #f3eefb;
  padding: 12px;
}

.batch-paste textarea { height: auto; min-height: 76px; resize: vertical; padding: 9px 11px; line-height: 1.5; }
.batch-paste > button { min-height: 40px; }
.sku-lines { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sku-lines:empty::after {
  content: "尚未添加 SKU 明细";
  display: block;
  border: 1px dashed #d8d1e2;
  border-radius: 9px;
  padding: 18px;
  color: #92959f;
  text-align: center;
  font-size: 8px;
}

.sku-line,
.sku-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(190px, 1.4fr) minmax(90px, 0.55fr) auto;
  align-items: end;
  gap: 9px;
  border: 1px solid #e8e3ed;
  border-radius: 10px;
  background: #fff;
  padding: 11px;
}

.sku-line > button,
.sku-row > button,
.remove-sku-row {
  width: 38px;
  height: 40px;
  border: 1px solid #f0dce1;
  border-radius: 8px;
  background: #fff8fa;
  color: var(--ops-red);
  font-size: 15px;
  cursor: pointer;
}

.sku-line > button:hover,
.sku-row > button:hover,
.remove-sku-row:hover { border-color: #e6b9c4; background: #fff0f3; }
.shipment-dialog footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--ops-border);
  background: #fff;
  padding: 15px 24px;
}

.shipment-dialog footer p { margin: 0 auto 0 0; color: var(--ops-green); font-size: 8px; }
.shipment-dialog footer p.error { color: var(--ops-red); }

/* 修改货号时直接把原表格单元格切换为输入框。 */
.shipment-table-input,
.shipment-table-select {
  width: 100%;
  min-width: 0;
  height: 27px;
  box-sizing: border-box;
  border: 1px solid #cbb9e2;
  border-radius: 6px;
  background: #fff;
  color: #30253c;
  padding: 3px 5px;
  font: inherit;
  font-size: 8px;
}
.shipment-table-input:focus,
.shipment-table-select:focus {
  outline: 0;
  border-color: var(--ops-purple);
  box-shadow: 0 0 0 2px rgba(100, 39, 217, 0.12);
}
.table-edit-sku-editor {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}
.table-edit-sku-editor .shipment-table-input { flex: 1 1 auto; }
.table-edit-remove-item {
  width: 25px;
  height: 27px;
  flex: 0 0 25px;
  border: 1px solid #efc8d1;
  border-radius: 6px;
  background: #fff7f9;
  color: var(--ops-red);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.table-edit-remove-item:hover:not(:disabled) {
  border-color: #df9faf;
  background: #ffedf1;
}
.table-edit-remove-item:disabled { opacity: 0.35; cursor: not-allowed; }
.table-edit-quantity { text-align: center; }
.table-edit-actions {
  flex-wrap: wrap;
  gap: 4px;
}
.table-edit-actions .table-edit-save {
  border-color: #a987d5;
  background: var(--ops-purple);
  color: #fff;
}
.table-edit-actions .table-edit-save:hover:not(:disabled) {
  border-color: var(--ops-purple-dark);
  background: var(--ops-purple-dark);
}
.table-edit-message {
  display: block;
  margin-top: 5px !important;
  color: var(--ops-green) !important;
  font-size: 6.5px !important;
  line-height: 1.25;
  white-space: normal;
}
.table-edit-message.error { color: var(--ops-red) !important; }

/* 六列完整批量录入 */
.batch-import-dialog { width: min(1120px, calc(100vw - 40px)); }
.batch-import-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-color: #c9bddc #f5f3f8;
  scrollbar-width: thin;
}
.batch-target-store-label {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 7px 14px;
  margin-bottom: 13px;
  color: #37313f;
  font-size: 9px;
  font-weight: 800;
}
.batch-target-store-label select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ops-text);
  font: inherit;
}
.batch-target-store-label select:focus { outline: 0; border-color: #9b64df; box-shadow: 0 0 0 3px rgba(105, 40, 217, 0.1); }
.batch-target-store-label small { grid-column: 2; color: var(--ops-muted); font-size: 8px; font-weight: 500; line-height: 1.55; }
.batch-format-guide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  border: 1px solid #e5d9f5;
  border-radius: 11px;
  background: #f8f3ff;
  padding: 13px 15px;
}
.batch-format-guide b { color: var(--ops-purple); font-size: 10px; }
.batch-format-guide code { color: #4a3a5e; font-family: inherit; font-size: 10px; font-weight: 800; }
.batch-format-guide span { grid-column: 1 / -1; color: var(--ops-muted); font-size: 8px; }
.batch-source-label { display: block; margin-top: 15px; color: #37313f; font-size: 9px; font-weight: 800; }
.batch-source-label textarea {
  width: 100%;
  min-height: 180px;
  margin-top: 8px;
  resize: vertical;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  color: var(--ops-text);
  font: 10px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  tab-size: 4;
}
.batch-source-label textarea:focus { outline: 0; border-color: #9b64df; box-shadow: 0 0 0 3px rgba(105, 40, 217, 0.1); }
.batch-parse-row { display: flex; align-items: center; gap: 14px; margin-top: 11px; }
.batch-parse-row p { margin: 0; color: var(--ops-green); font-size: 9px; }
.batch-parse-row p.error { color: var(--ops-red); }
.batch-preview { margin-top: 16px; }
.batch-preview-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.batch-preview-summary article { border: 1px solid #e8e1f1; border-radius: 10px; background: #fcfaff; padding: 11px 13px; }
.batch-preview-summary span,
.batch-preview-summary b { display: block; }
.batch-preview-summary span { color: var(--ops-muted); font-size: 8px; }
.batch-preview-summary b { margin-top: 4px; color: var(--ops-purple); font-size: 18px; }
.batch-preview-table-wrap { overflow-x: auto; margin-top: 11px; border: 1px solid var(--ops-border); border-radius: 11px; }
.batch-preview-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 8px; }
.batch-preview-table th { background: #f6f2fa; padding: 8px; color: #777180; text-align: left; white-space: nowrap; }
.batch-preview-table td { border-top: 1px solid #eee9f2; padding: 8px; vertical-align: middle; }
.batch-preview-table strong,
.batch-preview-table small { display: block; }
.batch-preview-table small { margin-top: 3px; color: var(--ops-muted); font-size: 7px; }
.batch-owner-select { width: 100%; min-width: 170px; border: 1px solid var(--ops-border); border-radius: 8px; background: #fff; padding: 9px; color: var(--ops-text); font-size: 8px; }

@media (max-width: 1180px) {
  .shipment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-group-overview { grid-column: 1 / -1; }
}

@media (max-width: 930px) {
  .shipment-page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .shipment-actions { width: 100%; justify-content: flex-start; }
  .shipment-summary { grid-template-columns: 1fr; }
  .summary-group-overview { grid-column: 1; }
  .store-admin-list { grid-template-columns: 1fr; }
  .shipment-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recycle-bin-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 680px) {
  #project-view .shipment-page-heading { align-items: stretch; margin-top: 0; }
  #project-view .shipment-page-heading > div:first-child { width: 100%; }
  #project-view .shipment-page-heading .back-button { margin-bottom: 0; }
  .shipment-page-heading p { font-size: 9px; }
  .shipment-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .shipment-actions .primary-action { grid-column: 1 / -1; grid-row: 1; }
  .shipment-actions button { width: 100%; }
  .development-notice { align-items: flex-start; flex-direction: column; }
  .shipment-summary { grid-template-columns: 1fr; gap: 10px; }
  .summary-group { padding: 8px; }
  .summary-group > header { align-items: flex-start; flex-direction: column; gap: 2px; min-height: 30px; }
  .summary-overview-cards,
  .summary-aging-cards,
  .summary-cost-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-cost-total { grid-column: 1 / -1; }
  .shipment-summary article { min-height: 57px; padding: 8px 9px; }
  .shipment-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; }
  .shipment-filters label:first-child { grid-column: 1 / -1; }
  .shipment-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .shipment-table { min-width: 0; }
  .shipment-table-wrap { margin-inline: -2px; }
  .shipment-pagination { justify-content: center; }
  .store-editor { grid-template-columns: 1fr; }
  .store-editor .wide,
  .store-operator-block,
  .store-operators,
  .store-card-actions,
  .store-editor-footer { grid-column: 1; }
  .shipment-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 14px;
  }
  .shipment-dialog header { padding: 17px; }
  .shipment-form-grid { grid-template-columns: 1fr; overflow-y: auto; padding: 17px; }
  .shipment-form-grid .wide-field { grid-column: 1; }
  .sku-editor { overflow: visible; margin: 0 17px; padding: 13px; }
  .batch-paste { grid-template-columns: 1fr; }
  .batch-paste > button { width: 100%; }
  .sku-line,
  .sku-row { grid-template-columns: 1fr 1fr; }
  .sku-line label:nth-child(2),
  .sku-row label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .sku-line > button,
  .sku-row > button,
  .remove-sku-row { width: 100%; }
  .shipment-dialog footer { flex-wrap: wrap; padding: 13px 17px; }
  .shipment-dialog footer p { width: 100%; margin: 0; }
  .batch-import-body { padding: 15px 17px; }
  .batch-target-store-label { grid-template-columns: 1fr; }
  .batch-target-store-label small { grid-column: 1; }
  .batch-format-guide { grid-template-columns: 1fr; }
  .batch-format-guide span { grid-column: 1; }
  .batch-source-label textarea { min-height: 210px; font-size: 9px; }
  .batch-parse-row { align-items: stretch; flex-direction: column; }
  .batch-parse-row .secondary-button { width: 100%; }
  .batch-preview-table-wrap { overflow: visible; border: 0; }
  .batch-preview-table,
  .batch-preview-table tbody { display: block; }
  .batch-preview-table thead { display: none; }
  .batch-preview-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; border: 1px solid var(--ops-border); border-radius: 11px; background: #fff; padding: 12px; }
  .batch-preview-table td { display: block; min-width: 0; border: 0; padding: 0; }
  .batch-preview-table td::before { display: block; margin-bottom: 4px; color: var(--ops-muted); font-size: 7px; }
  .batch-preview-table td:nth-child(1)::before { content: "物流公司"; }
  .batch-preview-table td:nth-child(2)::before { content: "店铺名"; }
  .batch-preview-table td:nth-child(3)::before { content: "原表备注"; }
  .batch-preview-table td:nth-child(4)::before { content: "货号"; }
  .batch-preview-table td:nth-child(5)::before { content: "时间"; }
  .batch-preview-table td:nth-child(6)::before { content: "SKU"; }
  .batch-preview-table td:nth-child(7)::before { content: "数量"; }
  .batch-preview-table td:nth-child(8)::before { content: "负责运营"; }
  .batch-owner-cell { grid-column: 1 / -1; }
  .batch-owner-select { min-width: 0; }
  .recycle-bin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recycle-bin-summary span { min-width: 0; min-height: 48px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .recycle-bin-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .recycle-bin-table,
  .recycle-bin-table tbody { display: block; min-width: 0; }
  .recycle-bin-table thead { display: none; }
  .recycle-bin-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; margin-bottom: 10px; border: 1px solid var(--ops-border); border-radius: 11px; background: #fff; padding: 12px; box-shadow: 0 5px 16px rgba(49, 17, 123, 0.04); }
  .recycle-bin-table td { display: block; min-width: 0; border: 0; padding: 0; }
  .recycle-bin-table td::before { display: block; margin-bottom: 4px; color: var(--ops-muted); font-size: 6.5px; font-weight: 750; }
  .recycle-bin-table td:nth-child(1)::before { content: "删除时间"; }
  .recycle-bin-table td:nth-child(2)::before { content: "货号"; }
  .recycle-bin-table td:nth-child(3)::before { content: "SKU 明细"; }
  .recycle-bin-table td:nth-child(4)::before { content: "总数量"; }
  .recycle-bin-table td:nth-child(5)::before { content: "物流公司"; }
  .recycle-bin-table td:nth-child(6)::before { content: "删除人"; }
  .recycle-bin-table td:nth-child(7)::before { content: "删除原因"; }
  .recycle-bin-table td:nth-child(8)::before { content: "操作"; }
  .recycle-skus,
  .recycle-reason { grid-column: 1 / -1; }
  .recycle-sku-line { grid-template-columns: minmax(85px, 1fr) minmax(65px, 1fr) auto; }
  .recycle-actions { display: flex !important; align-items: flex-end; justify-content: flex-end; }
}

@media (max-width: 430px) {
  .summary-overview-cards,
  .summary-aging-cards,
  .summary-cost-cards { grid-template-columns: 1fr 1fr; }
  .shipment-filters { grid-template-columns: 1fr; }
  .shipment-filters label:first-child { grid-column: 1; }
  .shipment-filter-actions { grid-column: 1; }
  .shipment-filter-actions .filter-button,
  .shipment-filter-actions .clear-filter-button { flex: 1; width: 100%; }
  .shipment-actions { gap: 7px; }
  .store-card-header,
  .store-admin-header { flex-direction: column; }
  .sku-editor-heading { align-items: flex-start; flex-direction: column; }
  .sku-editor-heading .secondary-button { width: 100%; }
  .sku-line,
  .sku-row { grid-template-columns: 1fr; }
  .sku-line label:nth-child(2),
  .sku-row label:nth-child(2) { grid-column: 1; grid-row: auto; }
  .shipment-dialog footer .secondary-button,
  .shipment-dialog footer .primary-action { flex: 1; }
  .recycle-bin-summary { grid-template-columns: 1fr; }
  .recycle-bin-summary span { min-height: 40px; flex-direction: row; align-items: center; justify-content: space-between; }
  .recycle-bin-heading .secondary-button { width: 100%; }
  .recycle-bin-table tr { grid-template-columns: 1fr; }
  .recycle-skus,
  .recycle-reason { grid-column: 1; }
  .recycle-actions { justify-content: stretch; }
  .recycle-restore-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .shipment-dialog[open] { animation: none; }
  .primary-action,
  .filter-button,
  .batch-paste > button,
  .save-store-button { transition: none; }
}

/* 考核指标：全部店铺经营、质量与海外仓数据 */
.performance-page { padding-bottom: 28px; }
.performance-heading { align-items: flex-end; }
.performance-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}
.performance-actions > span { color: var(--ops-muted); font-size: 8px; white-space: nowrap; }
.performance-export-button:not(:disabled) { border-color: #8d5bd2; background: #6f35bd; color: #fff; }
.performance-export-button:not(:disabled):hover { border-color: #5f28aa; background: #5f28aa; }
.performance-export-button:disabled { cursor: not-allowed; opacity: 0.55; }
.performance-notice { border-color: #f1d7dc; background: #fff7f8; color: #8e4a57; }
.performance-notice b { background: #f8e1e5; color: #a23d51; }

.performance-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}
.performance-summary article {
  min-width: 0;
  min-height: 108px;
  border: 1px solid var(--ops-border);
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(100, 39, 217, 0.07), transparent 42%),
    #fff;
  padding: 17px;
  box-shadow: 0 5px 18px rgba(49, 17, 123, 0.035);
}
.performance-summary span,
.performance-summary b,
.performance-summary small { display: block; }
.performance-summary span { color: var(--ops-muted); font-size: 8px; font-weight: 700; }
.performance-summary b {
  overflow: hidden;
  margin-top: 12px;
  color: #2f2539;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.performance-summary small { margin-top: 8px; overflow: hidden; color: #a19ba7; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }

.performance-table-card {
  overflow: hidden;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ops-shadow);
}
.performance-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--ops-border);
  padding: 17px 19px;
}
.performance-toolbar > div { display: flex; align-items: center; gap: 10px; }
.performance-toolbar h2 { margin: 0; font-size: 14px; letter-spacing: -0.02em; }
.performance-toolbar > div > span { border-radius: 99px; background: var(--ops-violet-wash); color: var(--ops-purple); padding: 5px 8px; font-size: 7px; font-weight: 750; }
.performance-toolbar label {
  display: flex;
  width: min(320px, 42vw);
  height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ops-border);
  border-radius: 9px;
  background: #fbfafe;
  padding: 0 11px;
  color: #9a93a1;
}
.performance-toolbar label:focus-within { border-color: #a87cdb; background: #fff; box-shadow: 0 0 0 3px rgba(100, 39, 217, 0.08); }
.performance-toolbar input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ops-text); font: inherit; font-size: 9px; }
.performance-toolbar input::placeholder { color: #aaa4ae; }

.performance-table-wrap { position: relative; overflow-x: auto; scrollbar-color: #c8bdd6 #f5f2f8; scrollbar-width: thin; }
.performance-table { width: 4200px; min-width: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 8px; }
.performance-table th {
  position: relative;
  border-bottom: 1px solid var(--ops-border);
  background: #f8f6fa;
  padding: 0;
  text-align: right;
  white-space: nowrap;
}
.performance-table th:first-child { position: sticky; left: 0; z-index: 3; text-align: left; }
.performance-table th > button[data-performance-sort] {
  width: 100%;
  min-height: 35px;
  border: 0;
  background: transparent;
  color: #77717d;
  padding: 0 25px 0 8px;
  text-align: inherit;
  font: inherit;
  font-size: 7px;
  font-weight: 750;
  cursor: grab;
  white-space: nowrap;
}
.performance-table th > button[data-performance-sort]:active { cursor: grabbing; }
.performance-table th > button[data-performance-sort]:hover { color: var(--ops-purple); background: #f3eef9; }
.performance-table th[aria-sort="ascending"] > button[data-performance-sort],
.performance-table th[aria-sort="descending"] > button[data-performance-sort] { color: var(--ops-purple); background: #f2ebfa; }
.performance-table th[aria-sort="ascending"] > button[data-performance-sort]::after { content: "  ↑"; }
.performance-table th[aria-sort="descending"] > button[data-performance-sort]::after { content: "  ↓"; }
.performance-column-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 5;
  width: 11px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}
.performance-column-resizer::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 1px;
  background: #d8d1df;
  transition: width 0.12s, background 0.12s;
}
.performance-column-resizer:hover::after,
.performance-column-resizer:focus-visible::after {
  width: 2px;
  background: var(--ops-purple);
}
.performance-column-resizer:focus-visible { outline: 0; }
.performance-table th .performance-rule-button {
  position: absolute;
  top: 10px;
  right: 11px;
  z-index: 4;
  display: inline-flex;
  width: 14px;
  height: 14px;
  min-height: 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfc6d8;
  border-radius: 50%;
  background: #fff;
  padding: 0;
  color: #786886;
  font-size: 8px;
  font-weight: 850;
  font-family: Georgia, serif;
  line-height: 1;
  cursor: pointer;
}
.performance-table th .performance-rule-button:hover,
.performance-table th .performance-rule-button:focus-visible {
  border-color: var(--ops-purple);
  background: var(--ops-violet-wash);
  color: var(--ops-purple);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(100, 39, 217, 0.1);
}
.is-resizing-performance-column,
.is-resizing-performance-column * { cursor: col-resize !important; user-select: none !important; }
.is-reordering-performance-column,
.is-reordering-performance-column * { cursor: grabbing !important; user-select: none !important; }
.performance-table th.performance-column-dragging { opacity: 0.42; }
.performance-table th.performance-column-drop-before::before,
.performance-table th.performance-column-drop-after::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  z-index: 7;
  width: 3px;
  border-radius: 4px;
  background: var(--ops-purple);
  box-shadow: 0 0 0 2px rgba(100, 39, 217, 0.12);
}
.performance-table th.performance-column-drop-before::before { left: -1px; }
.performance-table th.performance-column-drop-after::after { right: -1px; }
.performance-table td {
  height: 34px;
  border-bottom: 1px solid #efecf2;
  background: #fff;
  padding: 3px 8px;
  color: #4a4650;
  font-size: 8px;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}
.performance-table tbody tr:nth-child(even) td { background: #fdfcfe; }
.performance-table tbody tr:hover td { background: #faf7fd; }
.performance-table tbody tr:last-child td { border-bottom: 0; }
.performance-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 #ece8f0, 8px 0 14px rgba(37, 25, 48, 0.025);
}
.performance-table .performance-store-cell {
  text-align: left;
  white-space: normal;
}
.performance-store { min-width: 0; }
.performance-store b,
.performance-store small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.performance-store b { color: #302a35; font-size: 9px; line-height: 1.12; }
.performance-store small { margin-top: 1px; color: #8f8994; font-size: 6.5px; line-height: 1.1; }
.performance-site-cell { color: #625b68 !important; font-weight: 680; }
.performance-number { font-variant-numeric: tabular-nums; font-weight: 680; }
.performance-number.positive { color: #2e6e54; }
.performance-number.negative { color: var(--ops-red); }
.performance-number.attention { color: #b06d16; }
.metric-data-warning {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border: 1px solid #efd29e;
  border-radius: 99px;
  background: #fff7e8;
  padding: 2px 5px;
  color: #a9650d;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
  cursor: help;
}
.metric-data-warning.metric-source-missing {
  border-color: #ddd8e2;
  background: #f4f2f6;
  color: #77717d;
}
.metric-data-warning.metric-data-warning-copyable { cursor: pointer; }
.metric-data-warning.metric-data-warning-copyable:hover,
.metric-data-warning.metric-data-warning-copyable:focus-visible {
  border-color: #d99e42;
  background: #fff1d5;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(217, 158, 66, 0.12);
}
.performance-number.has-data-warning { color: #8a5d20; }
.performance-number.has-data-warning:has(.metric-source-missing) { color: #77717d; }
.performance-legend-item {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  padding: 4px 7px !important;
  font-size: 8px !important;
  font-weight: 750 !important;
}
.performance-legend-item.partial { border-color: #efd29e !important; background: #fff7e8 !important; color: #a9650d !important; }
.performance-legend-item.missing { border-color: #ddd8e2 !important; background: #f4f2f6 !important; color: #77717d !important; }
.performance-quality-cell { min-width: 78px; }
.metric-quality,
.metric-missing { display: inline-flex; min-width: 48px; justify-content: center; border-radius: 99px; padding: 3px 7px; font-size: 8px; }
.metric-quality { background: #e9f5ef; color: #267354; font-weight: 800; }
.metric-missing { background: #f2eff4; color: #8d8691; font-weight: 650; }
.performance-sync-cell { color: #716a76 !important; font-size: 8px; font-variant-numeric: tabular-nums; }
.performance-empty { padding: 55px 20px; color: #85808a; text-align: center; }
.performance-empty b { color: #4a424f; font-size: 11px; }
.performance-empty p { margin: 7px 0 0; font-size: 8px; }
.performance-footnote { margin: 0; border-top: 1px solid var(--ops-border); background: #fbf9fd; padding: 9px 18px; color: #817a86; font-size: 8.5px; line-height: 1.5; }

.image-hover-preview {
  position: fixed;
  z-index: 10000;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #d8c9e8;
  border-radius: 12px;
  background: #fff;
  padding: 7px;
  pointer-events: none;
  box-shadow: 0 18px 52px rgba(41, 23, 66, 0.28);
}
.image-hover-preview[hidden] { display: none; }
.image-hover-preview img {
  display: block;
  width: 100%;
  max-height: min(320px, calc(100vh - 92px));
  border-radius: 8px;
  background: #f8f7fa;
  object-fit: contain;
}
.image-hover-preview span {
  overflow: hidden;
  padding: 7px 4px 1px;
  color: #554b5f;
  font-size: 8px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (hover: none), (pointer: coarse) {
  .sku-thumbnail { cursor: default; }
  .image-hover-preview { display: none !important; }
}

.performance-cost-popover {
  position: fixed;
  z-index: 80;
  width: min(390px, calc(100vw - 24px));
  max-height: min(480px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid #e8c889;
  border-radius: 13px;
  background: #fffdf8;
  color: #4e4030;
  box-shadow: 0 18px 48px rgba(77, 53, 21, 0.2);
}
.performance-cost-popover-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #f0dfbd;
  background: #fff8e9;
  padding: 13px 14px 11px;
}
.performance-cost-popover-heading div { min-width: 0; }
.performance-cost-popover-heading span,
.performance-cost-popover-heading b { display: block; }
.performance-cost-popover-heading span { color: #a9650d; font-size: 8px; font-weight: 800; }
.performance-cost-popover-heading b { overflow-wrap: anywhere; margin-top: 4px; color: #6f480f; font-size: 12px; }
.performance-cost-popover-heading button {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5cb98;
  border-radius: 50%;
  background: #fff;
  padding: 0;
  color: #9a6b22;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.performance-cost-popover > p { margin: 0; border-bottom: 1px solid #f1e6cf; padding: 10px 14px; color: #7d6848; font-size: 9.5px; line-height: 1.55; }
.performance-cost-popover ul {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  scrollbar-color: #ddc394 #fff8e9;
  scrollbar-width: thin;
}
.performance-cost-popover li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #f4ead7;
  padding: 7px 14px;
  font-size: 10.5px;
  line-height: 1.35;
}
.performance-cost-popover li:last-child { border-bottom: 0; }
.performance-cost-popover li span { min-width: 0; overflow-wrap: anywhere; color: #493a27; font-family: Consolas, "Microsoft YaHei", monospace; user-select: text; }
.performance-cost-popover li small { color: #a46a12; font-size: 9px; font-weight: 750; white-space: nowrap; user-select: text; }
.performance-cost-popover li.performance-cost-popover-empty { display: block; color: #8c806e; font-family: inherit; text-align: center; }
.performance-cost-popover-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #ead7b2;
  background: #fff8e9;
  padding: 10px 12px;
}
.performance-cost-popover-actions span { color: #8b7654; font-size: 8px; line-height: 1.4; }
.performance-cost-popover-actions button {
  flex: 0 0 auto;
  border: 1px solid #d89a39;
  border-radius: 7px;
  background: #a9650d;
  padding: 6px 9px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.performance-cost-popover-actions button:disabled { cursor: not-allowed; opacity: 0.5; }

.performance-rule-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: #fff;
  padding: 0;
  color: var(--ops-text);
  box-shadow: 0 28px 80px rgba(35, 20, 50, 0.28);
}
.performance-rule-dialog::backdrop { background: rgba(28, 20, 34, 0.48); backdrop-filter: blur(3px); }
.performance-rule-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--ops-border);
  padding: 22px 24px 18px;
}
.performance-rule-heading span { color: var(--ops-purple); font-size: 8px; font-weight: 850; letter-spacing: 0.12em; }
.performance-rule-heading h2 { margin: 7px 0 0; color: #302638; font-size: 21px; letter-spacing: -0.025em; }
.performance-rule-heading button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ops-border);
  border-radius: 50%;
  background: #faf8fc;
  color: #766d7c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.performance-rule-heading button:hover,
.performance-rule-heading button:focus-visible { border-color: #a87cdb; color: var(--ops-purple); outline: 0; }
.performance-rule-kind {
  display: inline-flex;
  margin: 18px 24px 0;
  border-radius: 99px;
  background: var(--ops-violet-wash);
  padding: 5px 9px;
  color: var(--ops-purple);
  font-size: 9px;
  font-weight: 800;
}
.performance-rule-content { display: grid; gap: 0; margin: 12px 24px 0; }
.performance-rule-content > div { border-top: 1px solid #eeeaf1; padding: 14px 0; }
.performance-rule-content dt { color: #887f8d; font-size: 9px; font-weight: 800; }
.performance-rule-content dd { margin: 6px 0 0; color: #403945; font-size: 12px; font-weight: 620; line-height: 1.7; }
.performance-rule-note { margin: 0; background: #faf8fc; padding: 13px 24px 17px; color: #81788a; font-size: 9px; line-height: 1.6; }

@media (max-width: 1180px) {
  .performance-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .performance-heading { align-items: flex-start; }
  .performance-actions { width: 100%; justify-content: space-between; }
  .performance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .performance-summary article { min-height: 98px; padding: 14px; }
  .performance-toolbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .performance-toolbar label { width: 100%; }
  .performance-table-wrap { margin: 0; }
}

@media (max-width: 430px) {
  .performance-actions { align-items: stretch; flex-direction: column; }
  .performance-actions .secondary-button { width: 100%; }
  .performance-summary b { font-size: 18px; }
  .performance-rule-heading { padding: 18px 18px 15px; }
  .performance-rule-kind { margin-left: 18px; }
  .performance-rule-content { margin-right: 18px; margin-left: 18px; }
  .performance-rule-note { padding-right: 18px; padding-left: 18px; }
}
