:root {
  --bg: #f5f8ff;
  --panel: #ffffff;
  --panel-border: rgba(84, 111, 255, 0.16);
  --text: #172033;
  --muted: #5d6b85;
  --line: #e3e9f7;
  --border: #e3e9f7;
  --border-strong: #d4deef;
  --border-light: #f0f2f5;
  --bg-subtle: #f8fafc;
  --surface-soft: #f3f6fc;
  --surface-muted: #edf2fb;
  --primary: #2f6bff;
  --primary-deep: #1f53d8;
  --primary-soft: rgba(47, 107, 255, 0.12);
  --primary-border: rgba(47, 107, 255, 0.24);
  --success: #15a05c;
  --success-soft: rgba(21, 160, 92, 0.12);
  --success-border: rgba(21, 160, 92, 0.22);
  --warning: #b78103;
  --warning-soft: rgba(183, 129, 3, 0.12);
  --warning-border: rgba(183, 129, 3, 0.24);
  --danger: #e54d4d;
  --danger-soft: rgba(229, 77, 77, 0.12);
  --danger-border: rgba(229, 77, 77, 0.22);
  --neutral-border: rgba(93, 107, 133, 0.18);
  --shadow: 0 22px 50px rgba(39, 65, 128, 0.12);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f0f2f5;
}

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

.page-shell {
  min-height: 100vh;
  display: flex;
}

.workspace {
  display: flex;
  flex: 1;
  min-height: 100vh;
}

.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.hidden {
  display: none !important;
}

.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f0f0f0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  margin-bottom: 8px;
  background: transparent;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.sidebar-brand-text {
  color: #1a1a2e;
  font-size: 20px;
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.nav-item:hover:not(:disabled) {
  background: #f5f5f5;
}

.nav-item.active {
  background: #e6f4ff;
}

.nav-item:disabled {
  opacity: 0.5;
  cursor: default;
}

.nav-icon {
  flex-shrink: 0;
  width: 24px;
  font-size: 20px;
  text-align: center;
}

.nav-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-title {
  color: #1a1a2e;
  font-size: 16px;
  font-weight: 600;
}

.nav-item.active .nav-title {
  color: #2563eb;
}

.nav-subtitle {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.nav-item.active .nav-subtitle {
  color: #2563eb;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
}

.modal-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.modal-header h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
}

.content-grid {
  margin-top: 24px;
}

.module-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toast.hidden {
  display: none;
}

.panel {
  background: #fff;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.edit-workspace-panel {
  min-height: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.edit-workspace-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.edit-workspace-empty-card {
  width: min(560px, 100%);
  padding: 36px 32px;
  border: 1px solid rgba(47, 107, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.edit-workspace-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 28px;
}

.edit-workspace-empty-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
}

.edit-workspace-empty-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.edit-workspace-empty-note {
  font-size: 13px;
}

.edit-workspace-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.edit-workspace-frame-shell {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.edit-workspace-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  background: #fff;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.toolbar-left {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(180px, 220px) 120px;
  gap: 16px;
  flex: 1;
}

.action-field {
  justify-content: end;
}

.action-label {
  opacity: 0;
  user-select: none;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-field {
  min-width: 160px;
}

.dropdown-shell {
  position: relative;
}

.hover-shell {
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  z-index: 30;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(84, 111, 255, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 36px rgba(24, 44, 92, 0.16);
}

.dropdown-item {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(47, 107, 255, 0.08);
}

.hover-shell:hover .dropdown-menu,
.hover-shell:focus-within .dropdown-menu {
  display: block;
}

.btn-ghost-outline {
  color: var(--primary);
  border: 1px solid var(--primary-border);
  background: #fff;
}

.btn-live {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: #fff;
  box-shadow: none;
}

.btn-pending {
  color: var(--danger);
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  box-shadow: none;
}

.online-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.collection-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.online-toolbar-left {
  display: grid;
  grid-template-columns: 220px 280px 120px;
  gap: 16px;
  flex: 1;
}

.online-toolbar-center {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 14px;
  flex: 0 0 auto;
}

.online-sync-field {
  min-width: 160px;
}

.online-sync-action {
  min-width: 134px;
}

.sync-group-label {
  visibility: hidden;
}

/* 上架记录页面工具栏 */
.records-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.records-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.records-toolbar-left .search-field {
  max-width: 180px;
}

.records-toolbar-left input[type="date"] {
  max-width: 140px;
}

.records-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.status-tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 14px 0 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.status-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.status-tab.feature-pending-text,
.status-tab.feature-pending-text span {
  color: var(--danger);
}

.status-tab.feature-pending-text span {
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.status-tab.feature-pending-text.active {
  color: var(--danger);
  border-bottom-color: var(--danger);
}

.status-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: inherit;
  font-size: 12px;
}

.status-tab.active span {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.product-table,
.move-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.product-table th,
.product-table td,
.move-table th,
.move-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
}

.product-table th,
.move-table th {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  background: #f9fafb;
}

.product-info-cell {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

.product-image-cell {
  width: 88px;
  vertical-align: middle !important;
}

/* WB线上商品 - 商品信息列垂直居中 */
.online-product-info-cell {
  vertical-align: middle !important;
  text-align: left !important;
}

.product-table th.online-info-col,
.product-table th.record-info-col {
  text-align: left;
}

.product-table td.online-product-info-cell,
.product-table td.record-info-cell {
  vertical-align: middle !important;
  text-align: left !important;
}

.product-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(180deg, #d8e4ff, #8baeff);
  color: rgba(23, 32, 51, 0.65);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb-image {
  flex: 0 0 56px;
  width: 56px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #eef2fb;
}

.muted-thumb {
  background: linear-gradient(180deg, #e5e9f2, #b9c6dd);
}

.accent-thumb {
  background: linear-gradient(180deg, #ffe1b5, #ffb650);
}

.product-copy {
  display: grid;
  gap: 8px;
  justify-items: start;
  text-align: left;
}

.product-copy strong {
  line-height: 1.6;
}

.product-store-cell,
.source-info-cell {
  display: grid;
  gap: 8px;
}

.vertical-actions {
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.move-modal-card {
  width: min(1400px, calc(100vw - 24px)) !important;
  max-width: 1400px;
}

.batch-stock-modal-card {
  width: min(1320px, calc(100vw - 24px)) !important;
  max-width: 1320px;
}

.batch-price-modal-card {
  width: min(1280px, calc(100vw - 24px)) !important;
  max-width: 1280px;
}

.move-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.move-toolbar > .field {
  min-width: 0;
}

.move-toolbar .btn {
  width: 100%;
  white-space: nowrap;
}

.move-confirm-inline {
  grid-column: span 3;
}

@media (max-width: 1280px) {
  .move-modal-card {
    width: min(1220px, calc(100vw - 24px)) !important;
  }

  .batch-stock-modal-card {
    width: min(1160px, calc(100vw - 24px)) !important;
  }

  .batch-price-modal-card {
    width: min(1120px, calc(100vw - 24px)) !important;
  }

  .move-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .move-modal-card {
    width: min(940px, calc(100vw - 20px)) !important;
  }

  .batch-stock-modal-card {
    width: min(940px, calc(100vw - 20px)) !important;
  }

  .batch-price-modal-card {
    width: min(920px, calc(100vw - 20px)) !important;
  }

  .move-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .move-confirm-inline {
    grid-column: span 2;
  }
}

.batch-stock-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(120px, auto);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.batch-price-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(120px, auto);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.batch-stock-toolbar > .field,
.batch-price-toolbar > .field {
  min-width: 0;
}

.batch-stock-toolbar .btn,
.batch-price-toolbar .btn {
  width: 100%;
  white-space: nowrap;
}

.batch-stock-summary {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(47, 107, 255, 0.14);
  border-radius: 14px;
  background: rgba(47, 107, 255, 0.06);
}

.batch-price-summary {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(47, 107, 255, 0.14);
  border-radius: 14px;
  background: rgba(47, 107, 255, 0.06);
}

.batch-stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.batch-price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.batch-stock-table th,
.batch-stock-table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.batch-price-table th,
.batch-price-table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.batch-stock-table th {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  background: rgba(240, 245, 255, 0.78);
}

.batch-price-table th {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  background: rgba(240, 245, 255, 0.78);
}

.batch-stock-table .product-copy {
  min-width: 260px;
}

.batch-stock-meta {
  display: grid;
  gap: 6px;
}

.batch-stock-amount-input {
  max-width: 140px;
}

.batch-stock-current {
  font-weight: 700;
}

.batch-price-current {
  font-weight: 700;
}

.batch-price-input {
  max-width: 150px;
}

.batch-stock-empty {
  color: var(--muted);
}

.inline-select-group {
  display: grid;
  grid-template-columns: 120px minmax(120px, 1fr) 48px;
  gap: 10px;
  align-items: center;
  position: relative;
}

.inline-select-trigger {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.inline-number-input,
.move-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.inline-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.move-confirm-inline {
  width: 100%;
}

.narrow-input {
  max-width: 120px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

#wbOnlineProductsView .online-toolbar .field-label {
  color: var(--muted);
}

.feature-live-text,
.live-text,
.dropdown-item.live-feature-text {
  color: inherit;
}

.feature-pending-text,
.pending-feature-text,
.dropdown-item.pending-feature-text,
.pending-placeholder {
  color: var(--danger);
}

.muted-text {
  color: var(--muted);
}

.pending-placeholder {
  font-weight: 600;
}

.field-label.required::before {
  content: "*";
  margin-right: 4px;
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
}

textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: none;
}

.btn:disabled,
.icon-button:disabled,
.link-button:disabled,
input:disabled,
select:disabled {
  opacity: 0.66;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  border-color: var(--primary-deep);
  background: var(--primary-deep);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-muted);
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(229, 77, 77, 0.18);
}

.btn-info {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.btn-info:hover:not(:disabled) {
  background: rgba(47, 107, 255, 0.18);
}

/* Publish Records View */
.records-summary-bar {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.pagination-info {
  font-size: 13px;
  color: var(--muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text);
}

.pagination-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pagination-meta {
  font-size: 13px;
  color: var(--text);
}

.online-pagination-meta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  text-align: center;
  font-weight: 600;
}

.pagination-bar.online-total-loading #onlineOfficialTotalText::after {
  content: "...";
  display: inline-block;
  width: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  animation: online-loading-dots 1s steps(4, end) infinite;
}

.online-total-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

@keyframes online-loading-dots {
  0% {
    width: 0;
  }
  100% {
    width: 1.2em;
  }
}

.pagination-page-text {
  min-width: 100px;
  text-align: center;
}

.pagination-jump input {
  width: 84px;
  min-width: 84px;
  text-align: center;
}

.pagination-size {
  flex-direction: row;
}

.pagination-size select {
  min-width: 72px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* 表格操作按钮颜色（继承基础按钮颜色） */
.btn-action-edit {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.btn-action-edit:hover:not(:disabled) {
  background: rgba(47, 107, 255, 0.18);
}

.btn-action-refresh {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.btn-action-refresh:hover:not(:disabled) {
  background: var(--surface-muted);
}

.btn-action-delete {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.btn-action-delete:hover:not(:disabled) {
  background: rgba(229, 77, 77, 0.18);
}

/* WB线上商品操作按钮 */
.online-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
}

.online-actions .btn {
  white-space: nowrap;
}

.record-status-success {
  color: var(--success);
}

.record-status-uploading {
  color: var(--warning);
}

.record-status-error {
  color: var(--danger);
}

.record-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--line);
  object-fit: cover;
  display: block;
}

.record-image-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.record-title-cell {
  max-width: 280px;
}

.record-title-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.record-title-cell .subline {
  font-size: 12px;
  color: var(--muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-new-nm {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

.record-error-detail {
  font-size: 11px;
  color: var(--danger);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.record-retry-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state-records {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

.empty-state-records h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state-records p {
  font-size: 13px;
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface-soft);
}

.table-shell {
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  padding: 0 24px;
  min-height: 0;
}

.table-shell > table {
  flex: 0 0 auto;
  position: relative;
  z-index: 0;
}

/* 店铺管理表格不应被拉伸撑满剩余高度，避免少量数据时视觉上落到中间 */
.table-shell > .shop-table {
  flex: 0 0 auto;
}

.table-shell > .pagination-bar {
  flex-shrink: 0;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.pagination-bar,
.pagination-controls,
.pagination-bar .btn,
.pagination-bar input {
  pointer-events: auto;
}

.shop-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.shop-table th,
.shop-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.shop-table th,
.shop-table td {
  font-size: 14px;
}

.shop-table th {
  color: var(--muted);
  font-weight: 600;
  background: #f9fafb;
}

.shop-table tbody tr:hover {
  background: #f9fafb;
}

/* 统一表格 hover 效果 */
.product-table tbody tr:hover,
.collection-table tbody tr:hover,
.records-table tbody tr:hover {
  background: #f9fafb;
}

.checkbox-col {
  width: 48px;
}

.shop-name {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.shop-name strong {
  font-size: 15px;
}

.subline {
  color: var(--muted);
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

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

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

.status-badge.frozen {
  color: var(--muted);
  border-color: var(--neutral-border);
  background: var(--surface-soft);
}

.status-badge.abnormal {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.link-button {
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.link-button:hover {
  color: var(--primary-deep);
  background: var(--primary-soft);
  text-decoration: none;
}

.link-button.delete-link {
  color: var(--danger);
}

.link-button.delete-link:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.link-button.pending-feature-text {
  color: var(--danger);
}

.empty-state {
  padding: 52px 16px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  min-width: 280px;
  max-width: min(420px, calc(100% - 48px));
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: toast-slide-in 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast::before {
  content: "";
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.toast.info {
  background: #2563eb;
}

.toast.info::before {
  content: "!";
  font-size: 18px;
  font-weight: bold;
}

.toast.success {
  background: #16a34a;
}

.toast.success::before {
  content: "✓";
  font-size: 16px;
}

.toast.error {
  background: #dc2626;
}

.toast.error::before {
  content: "✕";
  font-size: 16px;
}

.toast.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: toast-spin 0.8s linear infinite;
}

@keyframes toast-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-card {
  position: relative;
  width: min(480px, calc(100% - 32px));
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

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

.modal-close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.modal-form {
  display: grid;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: end;
  gap: 12px;
  margin-top: 8px;
}

.confirm-modal-card {
  width: min(400px, calc(100% - 32px));
}

.confirm-body {
  padding: 16px 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

#productMoveModal .modal-kicker {
  color: var(--primary);
}

#productMoveModal .modal-header h2 {
  color: var(--text);
}

#productMoveModal .field-label,
#productMoveModal th {
  color: var(--muted);
}

#productMoveModal .link-button {
  color: var(--danger);
}

#productMoveModal .btn-primary {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .sidebar {
    width: 80px;
    min-width: 80px;
  }

  .sidebar-brand-text,
  .nav-subtitle {
    display: none;
  }

  .nav-title {
    display: none;
  }

  .nav-icon {
    width: 100%;
    text-align: center;
    font-size: 20px;
  }

  .nav-item {
    justify-content: center;
    padding: 16px 12px;
  }

  .hero,
  .toolbar,
  .online-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .online-toolbar-left,
  .move-toolbar,
  .batch-stock-toolbar,
  .batch-price-toolbar,
  .store-crawl-layout,
  .store-crawl-form-grid,
  .store-crawl-stats,
  .store-crawl-status-panel__grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
  }

  .store-crawl-status-item--wide {
    grid-column: span 1;
  }

}

@media (max-width: 640px) {
  .hero,
  .panel,
  .modal-card {
    border-radius: 20px;
  }

  .hero,
  .toolbar,
  .modal-card {
    padding: 20px;
  }

  .batch-stock-summary {
    padding: 12px;
  }

  .batch-price-summary {
    padding: 12px;
  }

  .hero h1,
  .modal-header h2 {
    font-size: 28px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }

  .edit-workspace-empty-card {
    padding: 28px 20px;
  }
}

/* ========== 新增样式：上架记录表格优化 ========== */

/* 标题链接样式 */
.record-title-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.record-title-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.record-title-link:visited {
  color: var(--text);
}

/* 元数据行布局 */
.record-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 12px;
}

.record-meta-row .subline {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* 货号样式 */
.record-vendor-code {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

/* 复制按钮 */
.record-copy-btn {
  padding: 2px 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.record-copy-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.record-copy-btn.copied {
  color: var(--success);
  background: var(--success-soft);
}

.record-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* 图片容器 */
.record-image-cell {
  width: 80px;
  vertical-align: middle;
}

.record-info-cell {
  text-align: left;
  vertical-align: middle !important;
}

.image-cell {
  vertical-align: middle;
}

.record-image-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}

.record-image-wrapper:hover {
  transform: scale(1.05);
}

.record-image-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
  font-size: 12px;
}

.record-image-wrapper .record-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5f8ff;
}

/* 图片遮罩 */
.record-image-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.record-image-wrapper:hover .record-image-mask {
  opacity: 1;
}

.record-photo-count {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.record-image-mask span:last-child {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

/* 状态标签样式 */
.record-status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.record-status-tag.record-status-uploading {
  color: var(--warning);
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.record-status-tag.record-status-success {
  color: var(--success);
  border-color: var(--success-border);
  background: var(--success-soft);
}

.record-status-tag.record-status-error {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

/* 单元格样式优化 */
.record-shop-cell {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

.record-price-cell {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.record-brand-cell {
  font-size: 12px;
  color: var(--muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-time-cell {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.record-result-cell {
  max-width: 150px;
}

.record-actions-cell {
  width: 120px;
  vertical-align: middle;
}

.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
}

.record-actions .btn {
  white-space: nowrap;
}

/* 优化表格标题单元格 */
.record-title-cell {
  max-width: 320px;
  min-width: 200px;
}

/* 优化标题两行显示 */
.record-title-link.ellipsis2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
}

/* 图片预览弹窗 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-modal.hidden {
  display: none;
}

.image-preview-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.image-preview-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.image-preview-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* 上架方式列样式 */
.record-method-cell {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ============ 批量上架弹窗样式 ============ */

.modal-card--large {
  width: 95vw;
  max-width: 1200px;
  max-height: 90vh;
}

.batch-publish-toolbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 0;
}

/* 第一行：店铺、仓库、库存 - 左右对齐 */
.batch-publish-toolbar--row1 {
  justify-content: space-between;
}

/* 第二行：批量设置、货号前缀、品牌 - 左右对齐 */
.batch-publish-toolbar--row2 {
  justify-content: space-between;
}

.batch-publish-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-publish-field select {
  min-width: 140px;
}

.batch-publish-field input[type="text"],
.batch-publish-field input[type="number"] {
  min-width: 100px;
}

.batch-publish-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.batch-publish-field select,
.batch-publish-field input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
}

.batch-publish-field select:focus,
.batch-publish-field input:focus {
  border-color: var(--primary);
  outline: none;
}

.batch-publish-batch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-publish-batch .batch-publish-label {
  color: var(--muted);
}

.batch-publish-batch select {
  min-width: 120px;
}

.batch-publish-batch input {
  width: 130px;
  flex-shrink: 0;
}

.batch-publish-batch .btn {
  white-space: nowrap;
  min-width: 50px;
  flex-shrink: 0;
}

.store-crawl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 12px;
}

.store-crawl-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 20px;
}

.store-crawl-stat-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  display: grid;
  gap: 8px;
}

.store-crawl-stat-card__label {
  font-size: 12px;
  color: var(--muted);
}

.store-crawl-stat-card strong {
  font-size: 22px;
  line-height: 1;
  color: var(--text);
}

.store-crawl-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 0 24px 20px;
}

.store-crawl-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcff;
}

.store-crawl-section__header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.store-crawl-section__header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.store-crawl-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.store-crawl-field-full {
  grid-column: 1 / -1;
}

.store-crawl-inline-actions {
  align-self: end;
}

.store-crawl-directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-crawl-directory-shell {
  min-height: 280px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.store-crawl-directory-tree {
  display: grid;
  gap: 10px;
}

.store-crawl-directory-empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.store-crawl-directory-group {
  display: grid;
  gap: 8px;
}

.store-crawl-directory-group__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.store-crawl-directory-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fbfdff;
}

.store-crawl-directory-item.is-child {
  margin-left: 20px;
}

.store-crawl-directory-item input {
  width: auto;
  min-height: auto;
  margin-top: 2px;
  flex: 0 0 auto;
}

.store-crawl-directory-item__content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.store-crawl-directory-item__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.store-crawl-directory-item__meta {
  font-size: 12px;
  color: var(--muted);
}

.store-crawl-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.store-crawl-checkbox input {
  width: auto;
  min-height: auto;
}

.store-crawl-preview {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.store-crawl-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.store-crawl-preview__header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.store-crawl-preview__header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.store-crawl-preview__panel {
  min-height: 120px;
  display: grid;
  gap: 12px;
}

.store-crawl-preview__empty {
  padding: 18px 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
}

.store-crawl-preview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.store-crawl-preview__item {
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
}

.store-crawl-preview__label {
  font-size: 12px;
  color: var(--muted);
}

.store-crawl-preview__value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.store-crawl-preview__warnings {
  margin: 0;
  padding-left: 18px;
  color: #a84b00;
  font-size: 12px;
  line-height: 1.7;
}

.store-crawl-status-panel {
  margin: 0 24px 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
  display: grid;
  gap: 16px;
}

.store-crawl-status-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.store-crawl-status-item {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.store-crawl-status-item--wide {
  grid-column: span 2;
}

.store-crawl-status-item__label {
  font-size: 12px;
  color: var(--muted);
}

.store-crawl-status-item strong {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.bulk-txt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 12px;
}

.panel-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.panel-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.bulk-txt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 16px;
}

.bulk-txt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 24px 20px;
}

.bulk-txt-file-meta {
  min-height: 22px;
  color: var(--muted);
}

.bulk-txt-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 20px;
}

.bulk-txt-stat-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.bulk-txt-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.bulk-txt-stat-card strong {
  font-size: 22px;
  line-height: 1;
  color: var(--text);
}

.bulk-txt-result-shell {
  padding: 8px 0 24px;
}

.bulk-txt-result-header {
  padding: 0 24px 12px;
}

.bulk-txt-result-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
}

.bulk-txt-source-cell {
  max-width: 260px;
  text-align: left;
  word-break: break-all;
  color: var(--muted);
}

.bulk-txt-title-cell {
  text-align: left !important;
}

.bulk-txt-thumb {
  width: 44px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef2fb;
}

.bulk-txt-thumb-empty {
  width: 44px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(180deg, #e7eeff, #bfd0ff);
  color: rgba(23, 32, 51, 0.65);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bulk-txt-message {
  max-width: 260px;
  text-align: left;
  word-break: break-word;
  color: var(--muted);
}

.batch-publish-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.batch-publish-table th {
  padding: 12px 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.batch-publish-table th button {
  display: block;
  margin: 4px auto 0;
}

.required-mark {
  color: var(--danger);
  margin-right: 2px;
}

.batch-publish-table td {
  padding: 14px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

/* 表格列宽固定 */
.batch-publish-table th:nth-child(1),
.batch-publish-table td:nth-child(1) {
  width: 70px;
  text-align: center;
}

.batch-publish-table th:nth-child(2),
.batch-publish-table td:nth-child(2) {
  width: 160px;
  text-align: left;
}

.batch-publish-table th:nth-child(3),
.batch-publish-table td:nth-child(3) {
  width: 120px;
  text-align: center;
}

.batch-publish-table th:nth-child(4),
.batch-publish-table td:nth-child(4) {
  width: 200px;
  text-align: center;
}

.batch-publish-table th:nth-child(5),
.batch-publish-table td:nth-child(5) {
  width: 100px;
  text-align: center;
}

.batch-publish-table th:nth-child(6),
.batch-publish-table td:nth-child(6) {
  width: 80px;
  text-align: center;
}

.batch-publish-table th:nth-child(7),
.batch-publish-table td:nth-child(7) {
  width: 100px;
  text-align: center;
}

.batch-publish-table th:nth-child(8),
.batch-publish-table td:nth-child(8) {
  width: 70px;
  text-align: center;
}

.batch-publish-table .title-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}

.batch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.code-group,
.dimension-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-input {
  width: 65px;
  min-height: 36px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-align: center;
}

.mini-input--prefix {
  width: 55px;
}

.mini-input--suffix {
  width: 60px;
}

.mini-input--suffix {
  width: 65px;
}

.mini-input--weight {
  width: 70px;
}

.mini-input--price {
  width: 80px;
}

.dimension-group .mini-input {
  width: 45px;
}

.dimension-group span {
  color: var(--muted);
  font-size: 11px;
}

.header-link-btn {
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  cursor: pointer;
  display: block;
}

.header-link-btn:hover {
  background: rgba(47, 107, 255, 0.18);
}

.link-btn {
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
}

.link-btn:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

/* 批量上架表格删除按钮 */
.batch-delete-btn {
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
}

.batch-delete-btn:hover {
  background: var(--danger-soft);
  text-decoration: none;
}

.batch-publish-footer {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
}

.batch-publish-footer .batch-publish-field {
  flex: 1;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-success {
  background: #d4edda;
  color: #155724;
}

/* ============ 通用工具类 ============ */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--muted);
}

.text-danger {
  color: var(--danger);
}

.text-primary {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

/* 链接样式按钮 */
.btn-link {
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
