/* Shopee TW uploader — flagship SaaS UI (visual only; IDs preserved) */
:root {
  --color-brand: #165dff;
  --color-brand-hover: #0e4ed4;
  --color-brand-active: #0a3eb8;
  --color-text: #1d2129;
  --color-text-secondary: #4e5969;
  --color-text-muted: #86909c;
  --color-border: #e5e6eb;
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-danger: #f53f3f;
  --color-danger-hover: #cb2634;
  --color-success: #00b42a;
  --color-warning: #ff7d00;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-modal: 16px;
  --shadow-card: 8px 8px 24px rgba(15, 23, 42, 0.06), -4px -4px 16px rgba(255, 255, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-modal: 0 24px 64px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --focus-ring: 0 0 0 3px rgba(22, 93, 255, 0.22);
  --font-h1: 700 1.125rem/1.35 'Inter', system-ui, sans-serif;
  --font-h2: 600 1rem/1.4 'Inter', system-ui, sans-serif;
  --font-body: 400 0.875rem/1.55 'Inter', system-ui, sans-serif;
  --font-caption: 400 0.75rem/1.45 'Inter', system-ui, sans-serif;
  font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
}

html[data-theme='dark'] {
  --color-text: #e5e6eb;
  --color-text-secondary: #a9aeb8;
  --color-text-muted: #86909c;
  --color-border: #3a3f4a;
  --color-bg: #17181c;
  --color-surface: #23252b;
  --shadow-card: 8px 8px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-modal: 0 28px 80px rgba(0, 0, 0, 0.55);
  --focus-ring: 0 0 0 3px rgba(22, 93, 255, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}

body {
  font: var(--font-body);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

html {
  overflow-x: clip;
}

body:not(.app-ui-ready) .app-shell {
  opacity: 0;
  transform: translateY(8px);
}

body .app-shell {
  transition: opacity 0.38s ease, transform 0.38s ease;
}

body.app-ui-ready .app-shell {
  opacity: 1;
  transform: none;
}

body.app-ui-ready #page-skeleton {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#page-skeleton {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.page-skeleton-inner {
  width: min(960px, 92vw);
  display: grid;
  grid-template-columns: 336px 1fr;
  grid-template-rows: 56px 1fr;
  gap: 16px;
  min-height: 40vh;
}

.sk {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-surface) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: sk-shine 1.2s ease-in-out infinite;
}

.sk-nav {
  grid-column: 1 / -1;
  height: 56px;
}

.sk-side {
  grid-row: 2;
}

.sk-main {
  grid-row: 2;
}

@keyframes sk-shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* —— SaaS shell —— */
.saas-app {
  box-sizing: border-box;
  width: 100%;
  max-width: min(1920px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  min-width: 0;
  padding-bottom: 96px;
}

.saas-topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.saas-topnav-inner {
  max-width: min(1920px, 100%);
  margin: 0 auto;
  padding: 0 clamp(12px, 2.5vw, 24px);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.saas-topnav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saas-logo {
  color: var(--color-brand);
  display: flex;
}

.saas-topnav-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.saas-topnav-title {
  font: var(--font-h2);
  color: var(--color-brand);
}

.saas-topnav-sub {
  font: var(--font-caption);
  color: var(--color-text-muted);
}

.saas-body {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: min(1920px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 56px);
  min-width: 0;
}

.saas-sidebar {
  flex: 0 1 clamp(280px, 34vw, 440px);
  width: min(100%, 440px);
  max-width: 100%;
  padding: 24px 16px 24px 24px;
  border-right: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 92%, var(--color-surface));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  box-sizing: border-box;
}

.saas-multi-account.ui-card {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  padding: 16px 14px 14px;
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
}

html[data-theme='dark'] .saas-multi-account.ui-card {
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.multi-account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.multi-account-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.multi-account-toolbar .ui-card-title {
  margin: 0;
  font-size: 0.9375rem;
}

.multi-account-current-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f8f9fb;
  border: 1px solid #e8eaed;
}

html[data-theme='dark'] .multi-account-current-banner {
  background: color-mix(in srgb, var(--color-bg) 65%, var(--color-surface));
  border-color: var(--color-border);
}

.multi-account-current-label {
  font: var(--font-caption);
  color: #86909c;
}

.multi-account-current-main.mac-banner-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.multi-account-banner-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.multi-account-banner-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d2129;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

html[data-theme='dark'] .multi-account-banner-title {
  color: var(--color-text);
}

.multi-account-current-main .session-badge {
  flex-shrink: 0;
  align-self: center;
}

.multi-account-batch-all {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.multi-account-batch-all input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

.multi-account-table-wrap {
  --multi-account-visible-rows: 3;
  /* 与列表行 .mac-row-grid min-height:52px 对齐，约等于 3 条账号行高 */
  --multi-account-list-max-h: calc(var(--multi-account-visible-rows) * 52px);
  border: 1px solid #dde0e3;
  border-radius: 12px;
  overflow-x: hidden;
  overflow-y: hidden;
  background: #ffffff;
  margin-bottom: 2px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

html[data-theme='dark'] .multi-account-table-wrap {
  border-color: var(--color-border);
}

.multi-account-list-head {
  padding: 0;
  background: #f0f2f5;
  border-bottom: 1px solid #dde0e3;
  font-size: 11px;
  font-weight: 600;
  color: #86909c;
}

.mac-row-grid {
  display: grid;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* 勾选 | 单选+登录账号 | 状态 | 操作 — 四列与表头严格对齐 */
  grid-template-columns: 28px minmax(0, 1fr) 72px 124px;
  align-items: center;
  column-gap: 6px;
  padding: 8px 10px;
  min-height: 44px;
}

.multi-account-list-head.mac-row-grid {
  min-height: 40px;
}

.mac-g {
  min-width: 0;
}

/* 勾选列共用列宽；表头与列表行分开写，改一处不会连带另一处 */
.mac-g-pick {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  margin: 0;
  box-sizing: border-box;
}

.multi-account-list-head .mac-g-pick {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* 相对列表行略向左微调全选框（不改变列表行） */
  padding: 0 9px 0 0;
}

.multi-account-list .mac-g-pick {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.multi-account-table-wrap .mac-g-pick input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

.mac-g-account-col {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.mac-g-account-col--head {
  gap: 4px;
}

.mac-account-radio-spacer {
  display: block;
  width: 18px;
  flex-shrink: 0;
}

.mac-g-shop {
  padding: 0;
  min-width: 0;
  flex: 1;
}

.multi-account-list-head .mac-g-shop,
.mac-g-account-col--head .mac-g-shop {
  white-space: nowrap;
  writing-mode: horizontal-tb;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mac-g-status-head {
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0 0 0 10px;
  box-sizing: border-box;
}

.mac-g-actions-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  box-sizing: border-box;
  padding-left: 4px;
}

html[data-theme='dark'] .multi-account-list-head {
  background: color-mix(in srgb, var(--color-bg) 70%, var(--color-surface));
  border-bottom-color: var(--color-border);
}

.mac-h-left {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.mac-h-left .mac-h-pick {
  flex: 0 0 26px;
  min-width: 26px;
}

.mac-h-left .mac-h-radio {
  flex: 0 0 24px;
  min-width: 24px;
}

.mac-h-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mac-h {
  min-width: 0;
}

.mac-h-shop {
  font-variant-numeric: tabular-nums;
  flex: 1;
  min-width: 0;
}

.mac-h-status {
  width: 52px;
  text-align: center;
  flex-shrink: 0;
}

.mac-h-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 120px;
}

.mac-h-op {
  color: #86909c;
  flex-shrink: 0;
}

.btn-text-danger {
  background: transparent;
  color: var(--color-danger);
  border: none;
  width: auto;
  margin: 0;
  padding: 4px 8px;
  font-size: 12px;
}

.btn-text-danger:hover:not(:disabled) {
  background: rgba(245, 63, 63, 0.08);
}

.multi-account-list {
  max-height: var(--multi-account-list-max-h, calc(3 * 52px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
}

.multi-account-row.multi-account-item {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #e8eaed;
  background: #ffffff;
  padding: 0;
  margin: 0;
  transition: background 0.15s ease;
}

html[data-theme='dark'] .multi-account-row.multi-account-item {
  border-bottom-color: var(--color-border);
  background: var(--color-surface);
}

.multi-account-row.multi-account-item:last-child {
  border-bottom: none;
}

.multi-account-row.multi-account-item:hover {
  background: #f5f8ff;
}

html[data-theme='dark'] .multi-account-row.multi-account-item:hover {
  background: color-mix(in srgb, var(--color-brand) 6%, var(--color-surface));
}

.multi-account-row.multi-account-item.is-active {
  background: #eef4ff;
}

html[data-theme='dark'] .multi-account-row.multi-account-item.is-active {
  background: color-mix(in srgb, var(--color-brand) 14%, var(--color-surface));
}

.multi-account-row.multi-account-item.is-invalid {
  opacity: 0.95;
}

.multi-account-list .multi-account-row.multi-account-item.mac-row-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  align-items: center;
}

.multi-account-shop-line1 .multi-account-radio-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.multi-account-status-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.multi-account-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  box-sizing: border-box;
}

.multi-account-shop-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  padding: 2px 0;
}

.multi-account-shop-line1 {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.multi-account-shop-title {
  font-weight: 700;
  font-size: 13px;
  color: #1d2129;
  min-width: 0;
  flex: 1;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.4;
}

html[data-theme='dark'] .multi-account-shop-title {
  color: var(--color-text);
}

.multi-account-shop-idline {
  font-size: 11px;
  color: #86909c;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.btn-icon-tiny--inline {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
}

.multi-account-col-left {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.multi-account-col-left .multi-account-pick {
  flex: 0 0 26px;
  min-width: 26px;
  text-align: center;
}

.multi-account-col-left .multi-account-radio-wrap {
  flex: 0 0 24px;
  min-width: 24px;
  justify-content: center;
}

.multi-account-col-right {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-shrink: 0;
}

.multi-account-radio-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.multi-account-radio-wrap input:disabled {
  cursor: not-allowed;
}

.multi-account-shop-id {
  font-weight: 600;
  font-size: 13px;
  color: #1d2129;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* 旧版单列布局兼容（若仍有引用） */
.multi-account-item-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 10px 12px;
  min-height: 44px;
}

.multi-account-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.multi-account-badge--ok {
  background: rgba(0, 180, 42, 0.12);
  color: #00b42a;
  border: 1px solid rgba(0, 180, 42, 0.28);
}

.multi-account-badge--bad {
  background: rgba(245, 63, 63, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(245, 63, 63, 0.22);
}

.multi-account-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.multi-account-pick {
  width: auto;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-icon-tiny {
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-icon-tiny:hover:not(:disabled) {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.btn-icon-tiny--danger:hover:not(:disabled) {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background: rgba(245, 63, 63, 0.06);
}

.multi-account-empty {
  text-align: center;
  padding: 20px 12px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-bg) 80%, transparent);
}

.multi-account-empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.75;
}

.multi-account-empty-text {
  margin: 0;
  font: var(--font-caption);
  color: var(--color-text-secondary);
}

.multi-account-add-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.multi-account-add-panel textarea {
  width: 100%;
  margin-top: 6px;
  min-height: 88px;
}

.multi-account-add-panel #multi-account-spc-cds-extra {
  margin-top: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.multi-account-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.multi-account-add-actions .btn {
  width: auto;
  margin: 0;
}

.section-icon {
  color: var(--color-brand);
  display: flex;
  flex-shrink: 0;
}

.label-compact {
  font: var(--font-caption);
  color: var(--color-text-secondary);
  margin-top: 8px;
}

.saas-auth-meta {
  margin: 0 0 16px;
  padding: 0;
}

.saas-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font: var(--font-caption);
}

.saas-meta-row dt {
  color: var(--color-text-muted);
  margin: 0;
}

.saas-meta-row dd {
  margin: 0;
  text-align: right;
}

.saas-meta-value {
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font: var(--font-caption);
  font-weight: 600;
  max-width: 100%;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}

.session-status--ok {
  background: rgba(0, 180, 42, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(0, 180, 42, 0.35);
}

.session-status--warn {
  background: rgba(255, 125, 0, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(255, 125, 0, 0.35);
}

.session-status--bad {
  background: rgba(245, 63, 63, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(245, 63, 63, 0.35);
}

.session-status--neutral {
  background: var(--color-border);
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.saas-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  padding: 24px 16px 32px 16px;
  box-sizing: border-box;
}

.page-title {
  font: var(--font-h1);
  color: var(--color-brand);
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

.editor-toolbar {
  align-items: flex-start;
}

.editor-panel-head.editor-toolbar {
  align-items: center;
}

/* 商品列表卡片：顶行左侧标题、右侧导入 */
.editor-panel-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
}

.editor-panel-card-heading .editor-toolbar-title {
  flex-shrink: 0;
  min-width: 0;
}

.editor-panel-card-heading .import-bar--card-head {
  margin-top: 0;
  width: auto;
  max-width: min(100%, 520px);
  flex: 1 1 auto;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.editor-panel-card-heading .import-bar--card-head .import-bar-actions {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.editor-panel-card-heading .import-file-name {
  text-align: right;
}

.editor-toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-toolbar-title h2 {
  margin: 0;
  font: var(--font-h2);
  color: var(--color-text);
}

.editor-panel-lead {
  margin-top: 0 !important;
  font: var(--font-body);
  color: var(--color-text-secondary);
}

.log-card {
  margin: 16px 24px 24px;
  max-width: min(1920px, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* 左侧栏：多店铺下方的操作日志 */
.log-card--sidebar.ui-card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
}

.log-card--sidebar {
  margin: 0;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 14px 16px;
}

.log-card--sidebar .log-card-head {
  flex-shrink: 0;
  margin-bottom: 10px;
  gap: 8px;
}

.log-card--sidebar .log-card-head .ui-card-title {
  font-size: 0.875rem;
  line-height: 1.35;
  color: #1d2129;
}

.log-card--sidebar .log-panel-body {
  flex: 1 1 auto;
  min-height: 100px;
  max-height: min(38vh, 340px);
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 12px 14px;
}

.log-card--sidebar .log-line-msg {
  font-size: 13px;
}

.log-card--sidebar .log-line-time {
  font-size: 10px;
}

.log-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.log-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-card-head .ui-card-title {
  margin: 0;
}

/* —— 操作日志区域（仅展示样式）—— */
#log.log-panel-body,
.log-panel-body {
  box-sizing: border-box;
  min-height: 100px;
  max-height: min(42vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 8px 12px 10px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--color-text-muted) 38%, transparent) transparent;
}

.log-panel-body::-webkit-scrollbar {
  width: 5px;
}

.log-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.log-panel-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--color-text-muted) 42%, transparent);
  border-radius: 100px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  margin-top: 0;
  width: auto;
}

.btn-icon-ghost {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-icon-ghost:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  transform: translateY(-1px);
}

html[data-theme='light'] .icon-moon {
  display: none;
}

html[data-theme='dark'] .icon-sun {
  display: none;
}

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.img-lightbox[hidden] {
  display: none !important;
}

.img-lightbox-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.12s ease;
}

.img-lightbox-close-btn:hover {
  background: rgba(0, 0, 0, 0.62);
  transform: scale(1.05);
}

.img-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
}

.img-lightbox-figure img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
}

.field-descimg-preview-img {
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.field-descimg-preview-img:hover {
  box-shadow: 0 12px 40px rgba(22, 93, 255, 0.15);
}

.log-line {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 12px 8px;
  margin: 0;
  border-radius: var(--radius);
  font-size: inherit;
  line-height: 1.5;
}

/* DOM 顺序为 time → msg，用 order 让正文在上、时间落在卡片右下角 */
.log-line-msg {
  order: 1;
  min-width: 0;
  width: 100%;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
}

.log-line-time {
  order: 2;
  align-self: flex-end;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  line-height: 1.35;
  color: var(--color-text-muted);
  white-space: nowrap;
  opacity: 0.88;
}

.log-line--ok .log-line-msg {
  color: color-mix(in srgb, var(--color-success) 88%, var(--color-text) 12%);
  font-weight: 500;
}

.log-line--err .log-line-msg {
  color: color-mix(in srgb, var(--color-danger) 88%, var(--color-text) 12%);
  font-weight: 500;
}

.log-line--warn .log-line-msg {
  color: color-mix(in srgb, var(--color-warning) 82%, var(--color-text) 18%);
  font-weight: 500;
}

.log-line--muted .log-line-msg {
  color: var(--color-text-secondary);
  font-weight: 400;
}

.log-line--latest {
  box-shadow: inset 3px 0 0 0 color-mix(in srgb, var(--color-brand) 55%, var(--color-border) 45%);
}

.log-line--ok {
  background: rgba(0, 180, 42, 0.055);
  border: 1px solid rgba(0, 180, 42, 0.11);
}

.log-line--err {
  background: rgba(245, 63, 63, 0.055);
  border: 1px solid rgba(245, 63, 63, 0.12);
}

.log-line--warn {
  background: rgba(255, 125, 0, 0.055);
  border: 1px solid rgba(255, 125, 0, 0.12);
}

.log-line--muted {
  background: color-mix(in srgb, var(--color-surface) 55%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-border) 90%, transparent);
}

@media (max-width: 1100px) {
  .saas-body {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .saas-sidebar {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
  }
}

.ui-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.ui-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.cookie-card label[for='cookie'] {
  margin-top: 0;
}

.warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  transition: padding 0.25s ease, border-color 0.2s ease;
}

.warn.compact {
  padding: 10px 14px;
  margin-bottom: 12px;
}

.warn.compact .help-body {
  display: none;
}

.help-expand-line {
  display: none;
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px 0;
  line-height: 1.45;
  transition: color 0.15s ease;
}

.help-expand-line:hover {
  color: var(--color-brand);
}

.warn.compact .help-expand-line {
  display: block;
}

.help-collapse-row {
  margin-top: 12px;
  margin-bottom: 0;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-brand);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.btn-text:hover {
  color: var(--color-brand-hover);
}

label {
  display: block;
  font-size: 13px;
  color: var(--color-text);
  margin-top: 12px;
}

textarea,
input[type='text'],
input[type='number'] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d1d6;
  border-radius: var(--radius);
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 100px;
  font-family: ui-monospace, monospace;
}

textarea:focus,
input[type='text']:focus,
input[type='number']:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: var(--focus-ring);
}

textarea:invalid:not(:placeholder-shown),
input:invalid:not(:placeholder-shown) {
  border-color: var(--color-danger);
}

.import-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.editor-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.editor-panel-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.editor-head-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
}

.editor-head-right .import-bar-actions {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* 商品列表 · 批量操作工具栏（与 .table-wrap-product 圆角/边框轻量一致） */
.batch-ops-toolbar {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-bg) 35%, var(--color-surface));
  border: 1px solid #dde0e3;
  box-shadow: none;
  box-sizing: border-box;
}

html[data-theme='dark'] .batch-ops-toolbar {
  background: color-mix(in srgb, var(--color-bg) 28%, var(--color-surface));
  border-color: var(--color-border);
}

.batch-ops-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  width: 100%;
}

.btn-batch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  font: 600 0.75rem/1.35 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease,
    filter 0.15s ease;
  width: auto;
  margin: 0;
}

.btn-batch svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

.btn-batch:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.btn-batch:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.btn-batch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-batch--primary {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}

.btn-batch--primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 2px 10px rgba(22, 93, 255, 0.28);
}

.btn-batch--secondary {
  background: var(--color-surface);
  color: var(--color-brand);
  border-color: color-mix(in srgb, var(--color-brand) 45%, var(--color-border));
}

.btn-batch--secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-brand) 10%, var(--color-surface));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-batch--danger {
  background: var(--color-surface);
  color: var(--color-danger);
  border-color: color-mix(in srgb, var(--color-danger) 45%, var(--color-border));
}

.btn-batch--danger:hover:not(:disabled) {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
  box-shadow: 0 2px 10px rgba(245, 63, 63, 0.22);
}

html[data-theme='dark'] .btn-batch:hover:not(:disabled) {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

html[data-theme='dark'] .btn-batch--primary:hover:not(:disabled) {
  box-shadow: 0 2px 14px rgba(22, 93, 255, 0.35);
}

html[data-theme='dark'] .btn-batch--danger:hover:not(:disabled) {
  box-shadow: 0 2px 12px rgba(245, 63, 63, 0.35);
}

.btn-batch--secondary.is-loading::after {
  border: 2px solid color-mix(in srgb, var(--color-brand) 28%, transparent);
  border-top-color: var(--color-brand);
}

.batch-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.batch-modal-overlay[hidden] {
  display: none !important;
}

.batch-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.batch-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(580px, calc(100vw - 32px));
  max-width: 100%;
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.batch-modal-dialog.batch-modal-dialog--preorder-wide {
  width: min(900px, calc(100vw - 32px));
  max-width: 100%;
}

.batch-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.batch-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.batch-modal-close {
  border: none;
  background: transparent;
  padding: 6px;
  margin: 0;
  cursor: pointer;
  color: var(--color-text-secondary);
  border-radius: 8px;
  width: auto;
  line-height: 0;
}

.batch-modal-close:hover {
  background: color-mix(in srgb, var(--color-border) 60%, transparent);
  color: var(--color-text);
}

.batch-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

.batch-modal-body .batch-field {
  margin-bottom: 16px;
}

.batch-modal-body label.batch-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.batch-modal-body select,
.batch-modal-body input[type='text'],
.batch-modal-body input[type='search'],
.batch-modal-body input[type='number'],
.batch-modal-body textarea {
  width: 100%;
  margin-top: 0;
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}

.batch-modal-body .tip-compact {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 10px 0 0;
}

.batch-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 35%, var(--color-surface));
  flex-shrink: 0;
}

.batch-modal-footer .btn {
  width: auto;
  margin: 0;
  min-width: 100px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
}

/* 店八方风格批量弹窗（batch-dbf-ui.js） */
.batch-modal-overlay--dbf-full {
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}

.batch-modal-dialog--dbf-full {
  width: min(1320px, 96vw);
  max-width: 100%;
  height: min(92vh, 920px);
  max-height: calc(100vh - 32px);
}

.batch-modal-dialog--dbf-full .batch-modal-body {
  padding: 22px 26px 26px;
}

/* 批量类目 + 属性：与编辑器共用 .editor-card，主体可滚动 */
.batch-modal-body .batch-cat-attr-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.batch-modal-body .batch-cat-attr-modal-body #batch-cat-attr-root {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.batch-modal-body .batch-cat-attr-card {
  max-width: 920px;
  margin: 0 auto;
}

.batch-modal-body .dbf-muted {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.45;
}

.batch-modal-body .dbf-subtabs__save {
  margin-left: auto;
}

.batch-modal-body .dbf-input-narrow {
  width: 88px;
  max-width: 100%;
}

.batch-modal-body .dbf-check-line {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--color-text);
}

.batch-modal-body .dbf-site-cat-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  /* 勿 hidden：会裁掉绝对定位的下拉面 */
  overflow: visible;
  margin-bottom: 16px;
}

.batch-modal-body .dbf-site-cat-head {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--color-bg) 50%, var(--color-surface));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  border-radius: 10px 10px 0 0;
}

/* start：左侧「站点」格高度不随右侧类目下拉展开而拉高（Grid 默认 stretch 会等高） */
.batch-modal-body .dbf-site-cat-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
}

.batch-modal-body .dbf-site-cat-row:last-of-type {
  border-radius: 0 0 10px 10px;
}

.batch-modal-body .dbf-site-pill {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
}

.batch-modal-body .dbf-cat-dd-wrap {
  position: relative;
}

.batch-modal-body .dbf-cat-dd-btn {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-brand, #1890ff);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  box-shadow: none;
  transform: none;
}

.batch-modal-body .dbf-cat-dd-btn:hover:not(:disabled) {
  border-color: var(--color-brand, #1890ff);
  background: color-mix(in srgb, var(--color-brand, #1890ff) 6%, var(--color-surface));
  transform: none;
  box-shadow: none;
}

.batch-modal-body .dbf-cat-panel[hidden] {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.batch-modal-body .dbf-cat-panel {
  position: absolute;
  z-index: 5000;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 14px;
  max-height: min(380px, 52vh);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 全屏批量类目：下拉铺在触发器下方整宽，不占 fixed 层 */
.batch-modal-dialog--dbf-full .dbf-cat-dd-wrap .dbf-cat-panel:not([hidden]) {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  max-height: min(58vh, 620px);
  z-index: 2;
}

.batch-modal-dialog--dbf-full .dbf-cat-cascade-wrap {
  min-height: 260px;
  max-height: min(46vh, 520px);
}

.batch-modal-body .dbf-cat-search {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
}

.batch-modal-body .dbf-hist-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.batch-modal-body .dbf-hist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.batch-modal-body .dbf-chip {
  width: auto;
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  transform: none;
  box-shadow: none;
}

.batch-modal-body .dbf-chip:hover:not(:disabled) {
  border-color: var(--color-brand, #1890ff);
  color: var(--color-brand, #1890ff);
  transform: none;
  box-shadow: none;
}

.batch-modal-body .dbf-cat-cascade-wrap {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: min(340px, 48vh);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-bg) 55%, var(--color-surface));
}

.batch-modal-body .dbf-cat-cascade {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 220px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.batch-modal-body .dbf-cat-col {
  flex: 0 0 196px;
  min-width: 176px;
  max-width: 240px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-surface);
  padding: 4px 0;
}

.batch-modal-body .dbf-cat-col-divider {
  flex: 0 0 1px;
  width: 1px;
  min-width: 1px;
  background: var(--color-border);
  align-self: stretch;
}

.batch-modal-body .dbf-cat-row {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  color: var(--color-text);
  cursor: pointer;
  font-weight: 500;
  transform: none;
  box-shadow: none;
}

.batch-modal-body .dbf-cat-row:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-bg) 65%, var(--color-surface));
  color: var(--color-text);
}

.batch-modal-body .dbf-cat-row.is-picked {
  background: color-mix(in srgb, var(--color-brand, #1890ff) 14%, #fff);
  color: var(--color-brand, #1890ff);
  font-weight: 700;
}

.batch-modal-body .dbf-cat-row-txt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-modal-body .dbf-cat-arr {
  color: var(--color-text-secondary);
  font-size: 14px;
}

.batch-modal-body .dbf-cat-empty {
  padding: 20px;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.batch-modal-body .dbf-cat-bc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  padding-top: 10px;
  border-top: 1px dashed var(--color-border);
}

.batch-modal-body .dbf-cat-bc strong {
  color: var(--color-brand, #1890ff);
  font-weight: 700;
}

/* ---------- 批量设置售价（店八方式紧凑排版） ---------- */
.batch-modal-body .dbf-price-modes select,
.batch-modal-body .dbf-price-modes input[type='number'] {
  width: auto;
  max-width: 100%;
  margin-top: 0;
}

.batch-modal-body .dbf-price-modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
}

.batch-modal-body .dbf-price-mode-line {
  display: grid;
  grid-template-columns: 18px 6.75rem minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
}

.batch-modal-body .dbf-price-mode-radio {
  width: auto;
  margin: 0;
  justify-self: start;
  align-self: center;
}

.batch-modal-body .dbf-price-mode-line__l {
  margin: 0;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
  justify-self: start;
}

.batch-modal-body .dbf-price-mode-line__ctrl {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.batch-modal-body .dbf-price-formula-head {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
}

.batch-modal-body .dbf-price-formula-head__l {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.batch-modal-body .dbf-price-formula-head .dbf-price-mode-radio {
  margin: 0;
  flex-shrink: 0;
}

.batch-modal-body .dbf-price-tpl-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.batch-modal-body .dbf-price-help-btn {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fafafa;
  color: #8c8c8c;
  font-size: 12px;
  line-height: 1;
  cursor: default;
}

.batch-modal-body .dbf-inline-select {
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  font-size: 13px;
  line-height: 1.35;
  color: #333;
  background: #fff;
  box-sizing: border-box;
}

.batch-modal-body .dbf-twd {
  font-size: 12px;
  font-weight: 400;
  color: #666;
}

.batch-modal-body .dbf-formula-box .dbf-twd {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.batch-modal-body .dbf-price-uni-field {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.batch-modal-body .dbf-price-uni-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 400;
  color: #666;
  background: #fafafa;
  border-right: 1px solid #d9d9d9;
  white-space: nowrap;
}

.batch-modal-body .dbf-price-uni-input.dbf-price-input {
  flex: 1 1 auto;
  min-width: 120px;
  margin: 0;
  padding: 5px 8px;
  border: none;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.35;
  box-sizing: border-box;
}

.batch-modal-body .dbf-price-input {
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
}

/* 使用公式：无独立卡片，公式与文案同一视觉流 */
.batch-modal-body .dbf-formula-box {
  display: none;
  padding: 4px 0 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--color-text);
  box-sizing: border-box;
}

/* 单行公式：弹性收缩、不出现横向滚动条 */
.batch-modal-body .dbf-formula-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: visible;
}

.batch-modal-body .dbf-formula-line .dbf-formula-base-text {
  flex: 0 1 auto;
  margin: 0;
  padding: 0 2px 0 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  user-select: none;
}

.batch-modal-body .dbf-formula-line .dbf-formula-pct-inp {
  flex: 0 1 3rem;
  width: 3rem;
  min-width: 2.25rem;
  max-width: 3.5rem;
  padding: 4px 4px;
  text-align: center;
}

.batch-modal-body .dbf-formula-line .dbf-formula-twd-inp {
  flex: 0 1 3.25rem;
  width: 3.25rem;
  min-width: 2.25rem;
  max-width: 4rem;
  padding: 4px 5px;
}

.batch-modal-body .dbf-formula-line .dbf-mini {
  margin: 0;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
}

.batch-modal-body .dbf-formula-line .dbf-formula-currency {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 12px;
}

.batch-modal-body .dbf-formula-line .dbf-formula-op {
  color: var(--color-text-secondary);
  font-weight: 700;
  user-select: none;
  flex-shrink: 0;
}

.batch-modal-body .dbf-formula-line .dbf-formula-pct {
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-left: -2px;
  flex-shrink: 0;
}

.batch-modal-body .dbf-price-meta-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
  margin-left: 0;
  padding: 8px 0 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

/* [hidden] 须压过本块的 display:flex，否则选统一价时仍可见 */
.batch-modal-body .dbf-price-meta-bar[hidden] {
  display: none !important;
  margin: 0;
  padding: 0;
}

/* 店八方式：取整 → 尾数 → 保留小数 — 五选一互斥（name=pfin），纵向排列 */
.batch-modal-body .dbf-price-fin-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.batch-modal-body .dbf-price-fin-block--stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
}

.batch-modal-body .dbf-price-fin-caption {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  color: #666;
  white-space: nowrap;
}

.batch-modal-body .dbf-price-fin-row--radios {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  width: auto;
  max-width: 100%;
}

.batch-modal-body .dbf-price-fin-caption--pdec {
  margin-top: 4px;
}

.batch-modal-body .dbf-price-fin-mantline {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
}

.batch-modal-body .dbf-price-fin-mant-txt {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
}

.batch-modal-body .dbf-price-fin-mantline .dbf-mant-input.dbf-mini {
  margin-top: 0;
  width: 64px;
  padding: 3px 8px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 4px;
  min-height: 0;
}

.batch-modal-body .dbf-price-fin-mantline[hidden] {
  display: none !important;
}

.batch-modal-body .dbf-meta-radio-label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
}

.batch-modal-body .dbf-meta-radio-label input[type='radio'] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

.batch-modal-body .dbf-meta-label {
  flex-shrink: 0;
  font-weight: 400;
  color: #666;
  white-space: nowrap;
}

.batch-modal-body .dbf-mini {
  width: 84px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  box-sizing: border-box;
}

.batch-modal-body .dbf-mant-input.dbf-mini {
  width: 72px;
}

.batch-modal-body .dbf-tpl-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 12px;
}

.batch-modal-body .dbf-del-price-tpl {
  color: #d32f2f;
}

.batch-modal-body .dbf-del-price-tpl:hover:not(:disabled) {
  color: #b71c1c;
}

.batch-modal-body .dbf-del-price-tpl:focus-visible {
  outline: 2px solid color-mix(in srgb, #d32f2f 45%, transparent);
  outline-offset: 2px;
}

.batch-modal-body .dbf-del-price-tpl[hidden] {
  display: none !important;
}

.batch-modal-body .dbf-toolbar-mini {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.batch-modal-body .dbf-toolbar-mini .btn-text {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--color-brand, #1890ff);
  border: none;
  font-size: 14px;
  font-weight: 600;
  transform: none;
  box-shadow: none;
}

.batch-modal-body .dbf-preview-wrap {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--color-surface);
}

.batch-modal-body .dbf-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.batch-modal-body .dbf-preview-table th,
.batch-modal-body .dbf-preview-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  text-align: left;
}

.batch-modal-body .dbf-preview-table th {
  background: color-mix(in srgb, var(--color-bg) 45%, var(--color-surface));
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text);
  white-space: nowrap;
}

.batch-modal-body .dbf-preview-table tr:last-child td {
  border-bottom: none;
}

.batch-modal-body .dbf-pagebar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
}

.batch-modal-body .dbf-pagebar button {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  transform: none;
  box-shadow: none;
}

.batch-modal-body .dbf-sec-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 6px 0 14px;
  color: var(--color-text);
}

.batch-modal-body .dbf-subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border);
}

.batch-modal-body .dbf-subtab {
  padding: 10px 2px 12px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.batch-modal-body .dbf-subtab.active {
  color: var(--color-brand, #1890ff);
  border-bottom-color: var(--color-brand, #1890ff);
}

.batch-modal-body .dbf-subtab.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.batch-modal-body .dbf-grid-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.batch-modal-body .dbf-grid-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.batch-modal-body .dbf-grid-form input.full,
.batch-modal-body .dbf-grid-form input[type='text'],
.batch-modal-body .dbf-grid-form textarea {
  width: 100%;
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}

.batch-modal-body .dbf-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .batch-modal-body .dbf-two {
    grid-template-columns: 1fr;
  }
}

.batch-modal-body .dbf-opt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--color-text);
}

.batch-modal-body .dbf-opt-row select {
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

/* ---------- 批量编辑标题（排版专用） ---------- */
.batch-modal-body .dbf-title-modal {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}

.batch-modal-body .dbf-title-modal__preview {
  margin-bottom: 20px;
}

.batch-modal-body .dbf-title-modal__preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 38%, var(--color-surface));
}

.batch-modal-body .dbf-title-modal__page-info {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--color-text-secondary);
  flex: 1 1 auto;
  min-width: 0;
}

.batch-modal-body .dbf-title-modal__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  flex: 0 0 auto;
  margin: 0;
}

.batch-modal-body .dbf-title-modal__pager .btn-text {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.batch-modal-body .dbf-title-modal__tbl th {
  text-align: center;
  vertical-align: middle;
}

.batch-modal-body .dbf-title-modal__tbl td {
  text-align: left;
  vertical-align: top;
}

.batch-modal-body .dbf-title-modal__tbl th:first-child,
.batch-modal-body .dbf-title-modal__tbl td:first-child {
  text-align: center;
  width: 3rem;
}

.batch-modal-body .dbf-title-modal__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 4px;
  padding: 6px 4px 12px;
  max-width: min(920px, 100%);
}

.batch-modal-body .dbf-title-modal__group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.batch-modal-body .dbf-title-modal__label {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.batch-modal-body .dbf-title-modal__input,
.batch-modal-body .dbf-title-modal__select {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  background: var(--color-surface);
  box-sizing: border-box;
}

.batch-modal-body .dbf-title-modal__input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.85;
}

.batch-modal-body .dbf-title-modal__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  align-items: start;
}

@media (max-width: 640px) {
  .batch-modal-body .dbf-title-modal__row2 {
    grid-template-columns: 1fr;
  }
}

.batch-modal-body .dbf-title-modal__group--half {
  min-width: 0;
}

.batch-modal-body .dbf-title-modal__opts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 2px;
}

.batch-modal-body .dbf-title-modal__check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
  cursor: pointer;
}

.batch-modal-body .dbf-title-modal__check input[type='checkbox'] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

.batch-modal-body .dbf-title-overlen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 4px 0 2px;
  margin-top: 2px;
}

.batch-modal-body .dbf-title-overlen-check {
  display: flex;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.batch-modal-body .dbf-title-overlen-check input[type='checkbox'] {
  width: auto;
  margin: 0;
}

.batch-modal-body .dbf-title-overlen-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  flex: 1 1 280px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
}

.batch-modal-body .dbf-title-overlen-txt {
  flex-shrink: 0;
  white-space: nowrap;
}

.batch-modal-body .dbf-title-overlen-sel {
  width: auto;
  min-width: 7.5rem;
  max-width: 100%;
  flex-shrink: 0;
  padding: 8px 10px;
}

.batch-modal-body .dbf-mini-title {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--color-text);
}

.batch-modal-body .dbf-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  color: var(--color-text);
}

/* 批量设置备货时间 — 排版与预购天数显隐 */
.batch-modal-body .dbf-preorder-shell {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--color-text);
  padding: 8px 6px 6px;
  margin: -6px -4px 0;
}

.batch-modal-body .dbf-preorder-sec {
  margin-bottom: 26px;
}

.batch-modal-body .dbf-preorder-sec--edit {
  margin-bottom: 22px;
}

.batch-modal-body .dbf-preorder-preview-wrap {
  margin-bottom: 0;
}

.batch-modal-body .dbf-preorder-preview-table th,
.batch-modal-body .dbf-preorder-preview-table td {
  padding: 14px 16px;
  text-align: center;
  vertical-align: middle;
}

.batch-modal-body .dbf-preorder-preview-table .dbf-preorder-name-cell {
  min-width: 14rem;
  max-width: min(52vw, 36rem);
  text-align: center;
  word-break: break-word;
  white-space: normal;
}

.batch-modal-body .dbf-preorder-sec-title.dbf-sec-title {
  margin: 0 0 18px;
}

.batch-modal-body .dbf-preorder-radios {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.batch-modal-body .dbf-preorder-radios-head {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
}

.batch-modal-body .dbf-preorder-radios-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

.batch-modal-body .dbf-preorder-opt {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
  cursor: pointer;
}

.batch-modal-body .dbf-preorder-opt input[type='radio'] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

.batch-modal-body .dbf-preorder-opt .dbf-muted {
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.batch-modal-body .dbf-preorder-days-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
  max-width: 220px;
}

.batch-modal-body .dbf-preorder-days-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
}

.batch-modal-body .dbf-preorder-days-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.batch-modal-body .dbf-preorder-days-inp.dbf-mini {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  max-width: 140px;
  margin: 0;
}

.batch-modal-body .dbf-preorder-days-suffix {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}

.batch-modal-body .dbf-preorder-footnote {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  color: #9e9e9e;
  margin: 0;
  max-width: 40rem;
}

.batch-modal-body .dbf-del-msg {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--color-text);
}

.batch-modal-body .dbf-tier-pane {
  margin-top: 12px;
}

.batch-modal-body .btn-sm {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
}

.import-bar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.import-file-name {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: min(100%, 520px);
  word-break: break-all;
}

/* Buttons — default full-width for legacy; prefer .btn utilities */
button {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

button:hover:not(:disabled) {
  background: var(--color-brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.28);
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

button:disabled {
  background: #a8c7ff;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-hover);
}

.btn-secondary {
  background: #f2f2f7;
  color: #3a3a3c;
  border: 1px solid #d1d1d6;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e5ea;
  color: #1c1c1e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid rgba(217, 45, 32, 0.35);
}

.btn-danger-ghost:hover:not(:disabled) {
  background: #fef3f2;
  box-shadow: none;
}

.btn-import-file {
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.25);
}

.btn-import-file:hover:not(:disabled) {
  background: var(--color-brand-hover);
}

.btn-clear-list.btn-secondary,
.btn-clear-list.btn-danger {
  margin-top: 0;
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border: none;
}

.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-hover);
  box-shadow: 0 4px 14px rgba(245, 63, 63, 0.35);
}

.btn-danger:disabled {
  background: color-mix(in srgb, var(--color-danger) 45%, #a8a8a8);
}

button.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button.is-loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: ui-spin 0.75s linear infinite;
}

.tip {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 6px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

.field-preorder-block {
  margin-top: 0;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.field-preorder-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.field-preorder-radios {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 13px;
}

.field-preorder-radios label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.field-preorder-days-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.field-preorder-days-row .f-preorder-days {
  width: 72px;
  padding: 6px 8px;
}

.editor-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(12px, 2vw, 20px);
  margin-top: 0;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.editor-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fafbfc;
}

.editor-card h3 {
  font-size: 15px;
  margin: 0 0 12px;
  font-weight: 600;
}

.editor-card .badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-brand);
  margin-left: 6px;
}

.editor-card .hint {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.ui-editor-section {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.editor-card h3 + .ui-editor-section {
  margin-top: 10px;
}

.ui-editor-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.ui-editor-section > label:first-of-type {
  margin-top: 0;
}

.attr-panel.ui-editor-section {
  margin-top: 14px;
  background: #f9fafb;
}

.field-main-gallery {
  margin-top: 0;
}

.gallery-field-title {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 600;
  margin-bottom: 8px;
}

.gallery-field-title--muted {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.f-gallery-wrap {
  position: relative;
}

.f-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  min-height: 24px;
}

.f-gallery-cell {
  position: relative;
  width: 104px;
  min-height: 96px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: visible;
  border: 1px solid var(--color-border);
  background: #f8f8fa;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.f-gallery-cell--listing {
  border: 2px solid var(--color-brand, #1890ff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-brand, #1890ff) 25%, transparent);
}

.f-gallery-cell:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.f-gallery-cell--listing:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-brand, #1890ff) 25%, transparent),
    0 4px 14px rgba(22, 101, 192, 0.12);
}

.f-gallery-cell-inner {
  position: relative;
  width: 100%;
  height: 92px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.f-gallery-cell-inner:active {
  cursor: grabbing;
}

.f-gallery-cell-inner--drag-touch {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
}

.f-gallery-cell-inner:hover .f-gallery-img {
  transform: scale(1.04);
}

.f-gallery-cell--drag {
  opacity: 0.88;
  outline: 2px dashed var(--color-brand);
  transform: scale(1.02);
}

.f-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.f-gallery-img--err {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #888;
  text-align: center;
  padding: 4px;
  box-sizing: border-box;
}

.f-gallery-cell-inner .f-gallery-del {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.f-gallery-cell-inner:hover .f-gallery-del {
  opacity: 1;
}

.f-gallery-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.f-gallery-del:hover {
  background: rgba(180, 30, 30, 0.92);
}

.f-gallery-empty {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.f-gallery-bulk {
  margin-top: 10px;
  font-size: 12px;
}

.f-gallery-bulk > summary {
  cursor: pointer;
  color: var(--color-brand);
  user-select: none;
}

.f-gallery-bulk-ta {
  width: 100%;
  min-height: 80px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  margin-top: 6px;
}

.field-descimg-outer {
  margin-top: 0;
}

.field-descimg-preview-scroll {
  max-height: min(72vh, 920px);
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafbfc;
  padding: 14px;
  box-sizing: border-box;
}

.field-descimg-preview-scroll::-webkit-scrollbar {
  width: 8px;
}

.field-descimg-preview-scroll::-webkit-scrollbar-thumb {
  background: #c7c7cc;
  border-radius: 8px;
}

.field-descimg-empty {
  margin: 0;
  font-size: 12px;
  color: #888;
  text-align: center;
  padding: 28px 12px;
  line-height: 1.5;
}

.field-descimg-slide {
  margin-bottom: 22px;
}

.field-descimg-slide:last-child {
  margin-bottom: 0;
}

.field-descimg-frame {
  position: relative;
  display: block;
}

.field-descimg-preview-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #eaeaea;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.field-descimg-frame:hover .field-descimg-preview-img {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.field-descimg-img-err {
  padding: 40px 12px;
  text-align: center;
  font-size: 12px;
  color: #c0392b;
  background: #fff5f5;
  border: 1px dashed #f0c0c0;
  border-radius: var(--radius);
}

.field-descimg-del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.field-descimg-frame:hover .field-descimg-del {
  opacity: 1;
}

.field-descimg-del:hover {
  background: rgba(180, 30, 30, 0.92);
  color: #fff;
}

.field-descimg-bulk {
  margin-top: 12px;
  font-size: 12px;
}

.field-descimg-bulk > summary {
  cursor: pointer;
  color: var(--color-brand);
  user-select: none;
  font-weight: 500;
}

.field-descimg-bulk-ta {
  width: 100%;
  min-height: 100px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  margin-top: 8px;
  box-sizing: border-box;
}

.tier-dim {
  font-size: 13px;
  margin: 10px 0;
}

.tier-dim h4 {
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--color-text);
  font-weight: 600;
}

.tier-dim ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.45;
}

.tier-var-shopee {
  margin: 12px 0 14px;
}

.tier-var-sec {
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.tier-var-sec-head {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-sec-drag {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px dashed #ccc;
  border-radius: 6px;
  background: #fafafa;
  color: #888;
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.tier-sec-drag:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background: #f0f7ff;
}

.tier-sec-drag:active {
  cursor: grabbing;
}

.tier-var-sec-title {
  font-size: 14px;
  margin: 0;
  font-weight: 600;
  color: #222;
  flex: 1;
  min-width: 0;
}

.tier-var-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tier-var-name-label {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

.f-tier-dim-name {
  flex: 1;
  min-width: 120px;
  max-width: 280px;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  box-sizing: border-box;
}

.tier-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

@media (max-width: 520px) {
  .tier-opt-grid {
    grid-template-columns: 1fr;
  }
}

.tier-opt-card {
  display: grid;
  grid-template-columns: 22px 56px 1fr 32px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #f7f8fa;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius);
  min-width: 0;
}

.tier-opt-drag {
  width: 22px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  font-size: 12px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-opt-drag:hover {
  color: var(--color-brand);
  background: rgba(0, 122, 255, 0.08);
}

.tier-opt-drag:active {
  cursor: grabbing;
}

.tier-opt-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #eee;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #999;
}

.tier-opt-thumb--empty {
  border: 1px dashed #ccc;
}

.tier-opt-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tier-opt-body {
  min-width: 0;
}

.f-tier-opt {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
}

.tier-opt-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-opt-del {
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-opt-del:hover {
  color: var(--color-danger);
  background: #fee;
}

.table-wrap {
  overflow-x: auto;
  margin: 0;
}

.table-wrap--sku {
  margin: 0;
}

.sku-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.sku-table th,
.sku-table td {
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.sku-table thead th {
  background: #eef1f6;
  font-weight: 600;
  white-space: nowrap;
}

.sku-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.sku-table tbody tr:hover {
  background: #eef5ff;
}

.sku-table input[type='number'],
.sku-table input[type='text'] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 12px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid #d1d1d6;
}

.sku-table input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: var(--focus-ring);
}

.sku-name {
  max-width: 200px;
  word-break: break-word;
}

.btn-secondary {
  background: #eef1f4;
  color: #3a3a3c;
  border: 1px solid #c7c7cc;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e5ea;
}

.btn-secondary:disabled {
  background: #e8e8ed;
  color: #aeaeb2;
}

.sku-th-price-col {
  vertical-align: top;
  min-width: 168px;
  max-width: 260px;
}

.sku-th-price-title {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.3;
}

.sku-bulk-price-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.sku-table .sku-bulk-price-row input.f-sku-bulk-price[type='number'] {
  width: 92px;
  max-width: 92px;
  flex: 0 0 auto;
  padding: 5px 6px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.sku-table .btn-sku-bulk-fill {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 10px;
  font-size: 12px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.sku-table .btn-sku-bulk-fill:hover:not(:disabled) {
  filter: brightness(1.05);
}

.field-cat-heading {
  display: block;
  font-size: 13px;
  color: var(--color-text);
  margin-top: 12px;
  margin-bottom: 0;
  font-weight: 600;
}

.cat-cascade {
  margin-top: 10px;
}

.cat-cascade-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cat-cascade-row .btn-cat {
  width: auto;
  padding: 6px 12px;
  margin: 0;
  font-size: 12px;
  background: var(--color-brand);
  font-weight: 600;
}

.cat-cascade-row .btn-cat:disabled {
  background: #a8c7ff;
}

.cat-cascade-row select.f-cat-sel {
  width: auto;
  min-width: 140px;
  max-width: 100%;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid #d1d1d6;
  background: #fff;
}

.cat-cascade-row select.f-cat-sel:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: var(--focus-ring);
}

.cat-cascade-row select.f-cat-sel.f-cat-sel--hidden {
  display: none !important;
}

.attr-panel {
  margin-top: 14px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.attr-panel-title {
  font-size: 14px;
  margin: 0 0 8px;
  color: #222;
}

.attr-placeholder .attr-muted {
  font-size: 12px;
  color: #888;
  margin: 6px 0;
  line-height: 1.45;
}

.attr-form-host {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 14px;
  align-items: start;
}

.attr-form-host > p.hint {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}

.attr-field {
  display: block;
  margin-top: 0;
  font-size: 13px;
  color: #333;
  min-width: 0;
}

.attr-field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #222;
}

.attr-field select.f-attr,
.attr-field select.f-attr-brand {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.3;
  color: #333;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius);
  cursor: pointer;
}

.attr-field select.f-attr:hover,
.attr-field select.f-attr-brand:hover {
  border-color: #bbb;
}

.attr-field select.f-attr:focus,
.attr-field select.f-attr-brand:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: var(--focus-ring);
}

@media (max-width: 720px) {
  .attr-form-host {
    grid-template-columns: 1fr;
  }
}

.attr-panel .cat-cascade-row {
  position: relative;
  z-index: 2;
}

.attr-panel .btn-load-attr {
  cursor: pointer;
  pointer-events: auto;
}

.attr-reload-row {
  margin-top: 4px;
}

.attr-panel .btn-attr-reload {
  background: #fff;
  color: var(--color-brand);
  border: 1px solid var(--color-brand);
  font-weight: 500;
}

.attr-panel .btn-attr-reload:hover {
  background: #f0f7ff;
}

.attr-panel .btn-attr-reload:disabled {
  background: #eee;
  color: #999;
  border-color: #ccc;
}

.product-list-hint {
  margin: 0 0 12px;
  font-size: 13px;
}

.product-list-th-cb {
  width: 48px;
  min-width: 48px;
  max-width: 52px;
  text-align: center;
  vertical-align: middle;
  padding: 8px 6px !important;
}

.product-list-th-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #1d2129;
  user-select: none;
  flex-direction: column;
  line-height: 1.2;
}

.product-list-th-all--head {
  width: 100%;
}

.product-list-th-all input[type='checkbox'] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.product-list-table tbody td:first-child {
  text-align: center;
  vertical-align: middle;
  width: 48px;
}

.product-list-th-title {
  font-weight: 700;
  font-size: 13px;
  color: #1d2129;
  letter-spacing: -0.01em;
}

.table-wrap-product {
  border: 1px solid #dde0e3;
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  background: var(--color-surface);
  box-shadow: none;
}

html[data-theme='dark'] .table-wrap-product {
  border-color: var(--color-border);
}

/* 商品列表：表格 + 底部分页（分页贴表格下、单行靠右） */
.editor-product-list-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

/* —— 列表底部分页（商品列表 / 发布记录共用；Element / Ant 式单行并排） —— */
.product-list-pagination {
  --pl-pager-ctrl-h: 28px;
  --pl-pager-radius: 4px;
  --pl-pager-line: #ebeef5;
  --pl-pager-border-input: #dcdfe6;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  background: transparent;
  border: none;
}

.product-list-pagination[hidden] {
  display: none !important;
}

.product-list-pagination--disabled {
  pointer-events: none;
  opacity: 0.45;
}

/* 商品列表：表格与分页之间细分隔线，分页条白底单行并排 */
.product-list-pagination--product-list {
  margin-top: 0;
  border-top: 1px solid var(--pl-pager-line, #ebeef5);
  padding-top: 0;
  background: #fff;
}

/* 发布记录底栏：与商品列表共用 pl-pager-*；顶部分隔由 .pr-footer--records 承担，此处不再画线 */
.product-list-pagination--pr {
  margin-top: 0;
  padding-top: 0;
  background: transparent;
}

.product-list-pagination-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 0 4px;
  margin: 0;
  font: var(--font-caption);
  color: rgba(0, 0, 0, 0.65);
  background: #fff;
  border: none;
}

/* 与图示一致：无灰底外框；页码区按内容宽度展开，不出现横向滚动条 */
.pl-pager-inner--antd {
  --pl-pager-ant-border: var(--pl-pager-border-input, #dcdfe6);
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 8px 0 4px;
  margin-top: 0;
  border-radius: 0;
  background: #fff;
  border: none;
  overflow: visible;
}

.product-list-pagination--product-list .product-list-pagination-inner {
  padding-top: 10px;
}

.product-list-pagination--product-list .product-list-pagination-inner.pl-pager-inner--antd {
  padding: 8px 0 4px;
  margin-top: 0;
}

/* 精简分页：上一页 / 下一页 + 摘要 + 每页条数 */
.pl-pager-inner--simple {
  --pl-pager-ant-border: var(--pl-pager-border-input, #dcdfe6);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
  margin-top: 0;
  border-radius: 0;
  background: #fff;
  border: none;
  overflow: visible;
}

.product-list-pagination--product-list .product-list-pagination-inner.pl-pager-inner--simple {
  padding: 8px 0 4px;
  margin-top: 0;
}

.pl-pager-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--pl-pager-ctrl-h);
  min-height: var(--pl-pager-ctrl-h);
  padding: 0 10px;
  border-radius: var(--pl-pager-radius);
  border: 1px solid var(--pl-pager-ant-border, #dcdfe6);
  background: #fff;
  color: rgba(0, 0, 0, 0.65);
  font: 600 0.75rem/1.2 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.pl-pager-nav:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--color-brand) 45%, var(--color-border));
  color: var(--color-brand);
  background: color-mix(in srgb, var(--color-brand) 6%, var(--color-surface));
}

.pl-pager-nav:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-bg));
  border-color: color-mix(in srgb, var(--color-border) 70%, transparent);
}

.pl-pager-summary {
  display: inline-block;
  max-width: min(100%, 20rem);
  margin: 0;
  padding: 0 2px;
  font: 400 0.75rem/1.35 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.pl-pager-inner--simple .pl-pager-size--only-select {
  margin-left: 0;
}

.pl-pager-size-hint {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  margin-right: 2px;
}

.pl-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--pl-pager-ctrl-h);
  min-height: var(--pl-pager-ctrl-h);
  padding: 0 12px;
  border-radius: var(--pl-pager-radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font: 600 0.75rem/1.2 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.pl-pager-btn--icon {
  width: var(--pl-pager-ctrl-h);
  min-width: var(--pl-pager-ctrl-h);
  padding: 0;
  border-radius: var(--pl-pager-radius, 4px);
  border-color: var(--pl-pager-ant-border, #dcdfe6);
  background: #fff;
  color: rgba(0, 0, 0, 0.45);
}

.pl-pager-inner--antd .pl-pager-btn--icon {
  border-color: var(--pl-pager-ant-border);
}

.pl-pager-ico {
  display: block;
  flex-shrink: 0;
}

.pl-pager-btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--color-brand) 45%, var(--color-border));
  color: var(--color-brand);
  background: color-mix(in srgb, var(--color-brand) 6%, var(--color-surface));
}

.pl-pager-btn--icon:hover:not(:disabled) {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background: #fff;
}

.pl-pager-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-bg));
  border-color: color-mix(in srgb, var(--color-border) 70%, transparent);
}

.pl-pager-btn--icon:disabled {
  opacity: 0.35;
  color: rgba(0, 0, 0, 0.25);
  background: #f5f5f5;
  border-color: #d9d9d9;
}

.pl-pager-btn--go {
  padding: 0 12px;
  min-width: 52px;
}

/* 发布记录等仍使用「当前/共」紧凑展示 */
.pl-pager-pageinfo {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--pl-pager-ctrl-h);
  padding: 0 10px;
  border-radius: var(--pl-pager-radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
  box-sizing: border-box;
}

.pl-pager-pageinfo-cur {
  min-width: 1.25rem;
  text-align: center;
  font: 700 0.8125rem/1 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  color: var(--color-brand);
}

.pl-pager-pageinfo-sep {
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0 1px;
}

.pl-pager-pageinfo-total {
  font: 600 0.75rem/1 'Inter', system-ui, sans-serif;
  color: var(--color-text-secondary);
}

/* 可点击页码：算法已折叠为少量数字 + 省略号，此处不再限制宽度、不启用横向滚动 */
.pl-pager-numstrip {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-height: var(--pl-pager-ctrl-h);
  margin: 0 2px;
  padding: 0;
  flex: 0 0 auto;
  max-width: none;
  min-width: max-content;
  overflow: visible;
}

.pl-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: var(--pl-pager-ctrl-h);
  padding: 0 3px;
  border-radius: var(--pl-pager-radius, 4px);
  border: 1px solid transparent;
  background: transparent;
  color: rgba(0, 0, 0, 0.65);
  font: 400 0.8125rem/1 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.pl-pager-inner--antd .pl-pager-num {
  border-color: transparent;
}

.pl-pager-num:hover:not(:disabled):not(.is-active) {
  color: var(--color-brand);
  background: transparent;
}

.pl-pager-num.is-active {
  border-color: transparent;
  background: transparent;
  color: var(--color-brand);
  font-weight: 600;
  cursor: default;
  box-shadow: none;
}

.pl-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: var(--pl-pager-ctrl-h);
  font: 400 0.8125rem/1 'Inter', system-ui, sans-serif;
  color: rgba(0, 0, 0, 0.35);
  letter-spacing: 0.06em;
  user-select: none;
  flex-shrink: 0;
}

.pl-pager-go-text {
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  flex-shrink: 0;
}

.pl-pager-go-text--inline {
  margin: 0;
}

.pl-pager-go-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 6px;
}

.pl-pager-go-suffix {
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.pl-pager-go-input {
  width: 44px;
  height: var(--pl-pager-ctrl-h);
  min-height: var(--pl-pager-ctrl-h);
  padding: 0 4px;
  border: 1px solid var(--pl-pager-border-input, #dcdfe6);
  border-radius: var(--pl-pager-radius, 4px);
  font: 400 0.8125rem/1 'Inter', system-ui, sans-serif;
  text-align: center;
  color: rgba(0, 0, 0, 0.88);
  background: #fff;
  flex-shrink: 0;
  box-sizing: border-box;
}

.pl-pager-go-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-brand) 35%, transparent);
}

.pl-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin: 0;
}

.pl-pager-inner--antd .pl-pager-go-wrap,
.pl-pager-inner--antd .pl-pager-size {
  flex-shrink: 0;
}

.pl-pager-size--only-select {
  gap: 0;
  margin-left: 8px;
}

.pl-pager-size-label {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.pl-pager-size-select {
  height: var(--pl-pager-ctrl-h);
  min-height: var(--pl-pager-ctrl-h);
  min-width: 96px;
  padding: 0 26px 0 10px;
  border-radius: var(--pl-pager-radius, 4px);
  border: 1px solid var(--pl-pager-border-input, #dcdfe6);
  background: #fff;
  color: rgba(0, 0, 0, 0.65);
  font: 400 0.8125rem/1 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  cursor: pointer;
  appearance: none;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23909399' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.pl-pager-size-select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: var(--focus-ring);
}

html[data-theme='dark'] .pl-pager-size-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a9aeb8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .product-list-pagination--product-list {
  background: var(--color-surface);
  border-top-color: var(--color-border);
}

html[data-theme='dark'] .product-list-pagination--pr {
  background: transparent;
}

html[data-theme='dark'] .product-list-pagination-inner,
html[data-theme='dark'] .pl-pager-inner--antd,
html[data-theme='dark'] .pl-pager-inner--simple {
  background: var(--color-surface);
  --pl-pager-ant-border: var(--color-border);
  --pl-pager-border-input: var(--color-border);
  --pl-pager-line: var(--color-border);
}

html[data-theme='dark'] .pl-pager-nav {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

html[data-theme='dark'] .pl-pager-nav:hover:not(:disabled) {
  color: var(--color-brand);
  background: color-mix(in srgb, var(--color-brand) 10%, var(--color-surface));
}

html[data-theme='dark'] .pl-pager-nav:disabled {
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface) 85%, var(--color-bg));
}

html[data-theme='dark'] .pl-pager-summary {
  color: var(--color-text-muted);
}

html[data-theme='dark'] .pl-pager-size-hint {
  color: var(--color-text-muted);
}

html[data-theme='dark'] .pl-pager-btn--icon {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

html[data-theme='dark'] .pl-pager-btn--icon:disabled {
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface) 85%, var(--color-bg));
}

html[data-theme='dark'] .pl-pager-num {
  color: var(--color-text-secondary);
}

html[data-theme='dark'] .pl-pager-num.is-active {
  color: var(--color-brand);
}

html[data-theme='dark'] .pl-pager-ellipsis {
  color: var(--color-text-muted);
}

html[data-theme='dark'] .pl-pager-go-text,
html[data-theme='dark'] .pl-pager-go-suffix {
  color: var(--color-text-secondary);
}

html[data-theme='dark'] .pl-pager-go-input {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--color-border);
}

@media (max-width: 640px) {
  .product-list-pagination-inner.pl-pager-inner--antd,
  .product-list-pagination-inner.pl-pager-inner--simple {
    justify-content: flex-start;
    padding-left: 2px;
    padding-right: 2px;
  }
}

.product-list-table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.product-list-th-cat {
  min-width: 0;
  width: 24%;
}

.product-list-th-price-num {
  min-width: 0;
  width: 6.25rem;
}

.product-list-th-actions {
  min-width: 5.25rem;
  width: 5.25rem;
  white-space: nowrap;
}

.product-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f0f2f5;
  font-weight: 700;
  font-size: 13px;
  color: #1d2129;
  padding: 11px 12px;
  border-bottom: 1px solid #dde0e3;
  box-shadow: none;
  vertical-align: middle;
}

.product-list-table thead th + th {
  border-left: 1px solid #dde0e3;
}

html[data-theme='dark'] .product-list-table thead th {
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-bg));
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

html[data-theme='dark'] .product-list-table thead th + th {
  border-left-color: var(--color-border);
}

html[data-theme='dark'] .product-list-th-all,
html[data-theme='dark'] .product-list-th-title {
  color: var(--color-text);
}

.product-list-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eaed;
  vertical-align: top;
}

.product-list-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

.product-list-table tbody tr:hover {
  background: #f0f3f7;
}

html[data-theme='dark'] .product-list-table tbody td {
  border-bottom-color: var(--color-border);
}

html[data-theme='dark'] .product-list-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-bg));
}

html[data-theme='dark'] .product-list-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-bg));
}

.product-list-table .pl-product-cell {
  vertical-align: top;
  min-width: 0;
  max-width: min(56vw, 560px);
}

.pl-product-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pl-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #f5f5f5;
}

.pl-thumb--placeholder,
.pl-thumb--err {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #999;
  box-sizing: border-box;
}

.pl-thumb--err {
  background: #fafafa;
}

.pl-title-stack {
  min-width: 0;
  flex: 1;
}

.pl-title-main {
  font-size: 13px;
  line-height: 1.45;
  color: #222;
  word-break: break-word;
}

.product-list-table td.pl-category {
  font-size: 12px;
  color: #333;
  line-height: 1.45;
  max-width: min(28vw, 280px);
  word-break: break-word;
  vertical-align: top;
}

.product-list-table td.pl-price {
  font-size: 13px;
  white-space: nowrap;
  vertical-align: top;
  color: #222;
}

/* 商品列表：标题 / 类目 / 售价列可点击提示（仅 .pl-col-action-link） */
.product-list-table .pl-title-main.pl-col-action-link,
.product-list-table td.pl-category.pl-col-action-link,
.product-list-table td.pl-price.pl-col-action-link {
  cursor: pointer;
  text-decoration: none;
  transition: color 0.12s ease;
}
.product-list-table .pl-title-main.pl-col-action-link:hover,
.product-list-table td.pl-category.pl-col-action-link:hover,
.product-list-table td.pl-price.pl-col-action-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.product-list-table .pl-title-main.pl-col-action-link:hover {
  color: #1565c0;
}
.product-list-table td.pl-category.pl-col-action-link:hover {
  color: #1565c0;
}
.product-list-table td.pl-price.pl-col-action-link:hover {
  color: #1565c0;
}

.product-list-empty {
  text-align: center;
  color: #888;
  padding: 22px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.product-list-table td.pl-actions-cell {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.product-list-table .btn-edit-one {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 6px 14px;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  background: var(--color-brand);
}

.editor-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  animation: ui-modal-in 0.22s ease;
}

@keyframes ui-modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.editor-modal-overlay[hidden] {
  display: none !important;
}

.editor-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.editor-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1100px, calc(100vw - 24px));
  max-height: min(92vh, 1600px);
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
  animation: ui-dialog-in 0.3s ease-in-out;
  border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
}

@keyframes ui-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.editor-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.editor-modal-header h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.editor-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: #555;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.editor-modal-close:hover {
  background: #f2f2f7;
  color: #111;
}

.editor-modal-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  background: #fafbfc;
}

.editor-modal-footer #btn-save-one {
  width: auto;
  min-width: 132px;
  margin: 0;
  padding: 10px 22px;
}

.editor-modal-dialog .editor-single-wrap {
  margin-top: 0;
  padding: 16px 18px 24px;
  border-top: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c7c7cc transparent;
}

.editor-modal-dialog .editor-single-wrap::-webkit-scrollbar {
  width: 9px;
}

.editor-modal-dialog .editor-single-wrap::-webkit-scrollbar-thumb {
  background: #c7c7cc;
  border-radius: 8px;
}

.editor-single-wrap .logistics-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.logistics-panel {
  margin-top: 16px;
  padding: 16px;
  background: #fafbfc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.logistics-panel.ui-editor-section {
  background: var(--color-surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.logistics-panel h2,
.logistics-panel .ui-editor-section-title {
  font-size: 15px;
  margin: 0 0 10px;
  padding-bottom: 0;
  border-bottom: none;
}

.logistics-list {
  margin-top: 10px;
  font-size: 12px;
}

.logistics-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 72px 72px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: #fafbfc;
}

.logistics-row:nth-child(even) {
  background: #f5f6f8;
}

.logistics-row:hover {
  background: #eef5ff;
}

.logistics-row .logistics-name {
  font-size: 12px;
  color: #222;
  word-break: break-word;
}

.logistics-cod {
  color: #c0392b;
  font-weight: 600;
  font-size: 11px;
}

.logistics-row input[type='text'] {
  width: 100%;
  padding: 6px;
  font-size: 12px;
  margin: 0;
  border-radius: 6px;
}

.logistics-row .logistics-free {
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .logistics-row {
    grid-template-columns: 26px 1fr;
  }

  .logistics-row .logistics-price-wrap {
    grid-column: 1 / -1;
  }
}

code {
  font-size: 0.92em;
  background: #f4f4f5;
  padding: 1px 5px;
  border-radius: 4px;
}

/* —— 顶栏视图切换（工作台 / 发布记录）+ 发布记录页 —— */
.saas-topnav-views {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}

.saas-nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border, #dde0e3);
  background: var(--color-surface, #fff);
  color: var(--color-text-secondary, #4e5969);
  font: 600 0.8125rem/1.2 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.saas-nav-tab:hover {
  border-color: color-mix(in srgb, var(--color-brand, #165dff) 35%, var(--color-border, #dde0e3));
  color: var(--color-brand, #165dff);
}

.saas-nav-tab.is-active {
  background: var(--color-brand, #165dff);
  border-color: var(--color-brand, #165dff);
  color: #fff;
}

.saas-view {
  width: 100%;
}

/* —— 发布记录页：与侧栏「多店铺管理 / 操作日志」卡片风格一致 —— */
#view-publish-records.saas-view--publish-records {
  box-sizing: border-box;
}

.page-title--publish-records {
  margin-bottom: 16px;
}

.pr-page-card.ui-card {
  margin-top: 0;
  margin-bottom: 0;
  padding: 16px 14px 14px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
}

html[data-theme='dark'] .pr-page-card.ui-card {
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.pr-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 4px;
}

.pr-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 20px;
}

.pr-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.pr-filter-fields--eq3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
  flex: 1 1 520px;
  min-width: min(100%, 520px);
}

@media (max-width: 1100px) {
  .pr-filter-fields--eq3 {
    grid-template-columns: 1fr 1fr;
  }
  .pr-filter-fields--eq3 .pr-field--time {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .pr-filter-fields--eq3 {
    grid-template-columns: 1fr;
  }
  .pr-filter-fields--eq3 .pr-field--time {
    grid-column: auto;
  }
}

.pr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pr-field--eq {
  min-width: 0;
}

.pr-field--time .pr-daterange {
  width: 100%;
}

.pr-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary, #4e5969);
}

.pr-input {
  min-height: 36px;
  width: 100%;
  box-sizing: border-box;
}

.pr-input--dt {
  min-width: 0;
  flex: 1 1 120px;
}

.pr-daterange {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pr-daterange-sep {
  color: var(--color-text-muted, #86909c);
  font-size: 12px;
  flex-shrink: 0;
}

.pr-filter-actions--bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/*
 * 全局 legacy：button { width:100%; margin-top:12px } 会让发布记录内所有按钮独占整行。
 * 本页按钮应随内容宽度并排（筛选 / 标签 / 表内操作 / 底栏）。
 */
#view-publish-records button {
  width: auto;
  min-width: 0;
  margin-top: 0;
}

.pr-filter-btn {
  min-height: 36px;
  padding: 0 18px;
  font-weight: 600;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pr-filter-post {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2px;
}

/* 状态标签与「删除选中记录」同一行、整体靠左 */
.pr-filter-post--tabs-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 10px 0 12px;
  padding-top: 0;
}

.pr-tabs-wrap {
  margin: 18px 0 12px;
}

.pr-tabs-wrap--inline {
  display: flex;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pr-tabs-wrap--center {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pr-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.pr-tabs--center {
  justify-content: center;
}

.pr-tab {
  border: 1px solid var(--color-border, #dde0e3);
  background: var(--color-surface, #fff);
  color: var(--color-text-secondary, #4e5969);
  font: 600 0.8125rem/1.35 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  padding: 8px 16px;
  min-width: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.pr-tab:hover:not(.is-active) {
  border-color: color-mix(in srgb, var(--color-brand, #165dff) 35%, var(--color-border, #dde0e3));
  color: var(--color-brand, #165dff);
}

.pr-tab.is-active {
  background: var(--color-brand, #165dff);
  border-color: var(--color-brand, #165dff);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-brand, #165dff) 35%, transparent);
}

.pr-table-wrap {
  max-height: min(62vh, 720px);
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--color-border) 88%, transparent);
  border-radius: 12px;
  background: var(--color-surface, #fff);
}

.pr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pr-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f4f7;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 90%, #c9cdd4);
  text-align: left;
  white-space: nowrap;
}

.pr-th-center {
  text-align: center !important;
}

.pr-th-cb {
  width: 48px;
}

.pr-th-actions {
  width: 128px;
}

.pr-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
  font-size: 13px;
}

.pr-table tbody tr:not(.pr-row-empty):hover td {
  background: color-mix(in srgb, var(--color-brand, #165dff) 4%, transparent);
}

.pr-td-cb {
  text-align: center;
  vertical-align: middle !important;
}

.pr-td-center {
  text-align: center;
  vertical-align: middle !important;
}

.pr-empty {
  text-align: center;
  vertical-align: middle !important;
  padding: 0 !important;
  border-bottom: none !important;
}

.pr-empty--soft {
  background: color-mix(in srgb, var(--color-bg, #f7f8fa) 55%, var(--color-surface, #fff));
}

.pr-empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px 52px;
  box-sizing: border-box;
}

.pr-empty-icon {
  font-size: 36px;
  line-height: 1;
  opacity: 0.35;
  filter: grayscale(0.2);
}

.pr-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary, #4e5969);
}

.pr-empty-hint {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted, #86909c);
  max-width: 320px;
  line-height: 1.5;
}

.pr-cell-product {
  min-width: 160px;
  max-width: min(420px, 38vw);
}

.pr-td-product {
  text-align: center;
}

.pr-product-row {
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  max-width: 100%;
}

.pr-product-text {
  min-width: 0;
  flex: 1 1 auto;
  max-width: min(280px, 34vw);
}

.pr-product-title,
.pr-product-sub,
.pr-product-cat {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
  flex-shrink: 0;
}

.pr-thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #86909c;
  background: #f7f8fa;
}

.pr-product-title {
  font-weight: 600;
  color: #1d2129;
  line-height: 1.35;
}

.pr-product-sub {
  font-size: 12px;
  color: #165dff;
  margin-top: 4px;
}

.pr-product-cat {
  font-size: 12px;
  color: #4e5969;
  margin-top: 4px;
  line-height: 1.35;
}

.pr-source-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff3e8;
  color: #ff6a00;
}

.pr-source-id {
  margin-top: 6px;
  font-size: 13px;
  color: #165dff;
  font-weight: 600;
}

.pr-status {
  font-weight: 600;
  font-size: 13px;
}

.pr-status--ok {
  color: #00b578;
}

.pr-status--fail {
  color: #f53f3f;
}

.pr-status--pending {
  color: #ff7d00;
}

.pr-status--muted {
  color: #86909c;
}

.pr-fail-reason {
  margin: 8px auto 0;
  font-size: 11px;
  color: #f53f3f;
  line-height: 1.35;
  word-break: break-word;
  text-align: left;
  max-width: min(280px, 85%);
}

.pr-cell-time .pr-time {
  font-size: 13px;
  color: #4e5969;
  white-space: nowrap;
}

.pr-cell-shop {
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-cell-actions {
  text-align: center;
  white-space: nowrap;
}

.pr-action + .pr-action {
  margin-left: 6px;
}

.pr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.pr-footer--records {
  margin-top: 0;
  padding-top: 10px;
  align-items: center;
  border-top: 1px solid #ebeef5;
  background: #fff;
}

.pr-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #4e5969;
}

.pr-footer-total {
  font-weight: 600;
  color: #1d2129;
}

.pr-footer-selected {
  font-size: 12px;
  color: #86909c;
}

.pr-footer--records .product-list-pagination {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
}

@media (max-width: 720px) {
  .pr-footer--records {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .pr-footer--records .product-list-pagination {
    margin-left: 0;
    width: 100%;
  }

  .pr-footer--records .product-list-pagination-inner {
    justify-content: center;
  }
}

html[data-theme='dark'] .pr-table thead th {
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-bg));
  border-bottom-color: var(--color-border);
}

html[data-theme='dark'] .pr-footer--records {
  border-top-color: var(--color-border);
  background: var(--color-surface);
}

html[data-theme='dark'] .pr-empty--soft {
  background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg));
}

html[data-theme='dark'] .pr-table tbody tr:not(.pr-row-empty):hover td {
  background: color-mix(in srgb, var(--color-brand) 10%, var(--color-surface));
}

html[data-theme='dark'] .pr-source-badge {
  background: color-mix(in srgb, #ff6a00 18%, var(--color-surface));
}
