/**
 * 采集商品管理 — 在 Bootstrap 5 基础上贴近参考页（紫色 primary、bootstrap-table 观感）
 */

.wb-global-page-size-bar {
  width: 100%;
  box-sizing: border-box;
}

:root {
  --wb-purple: #7b61ff;
  --wb-purple-hover: #6848e8;
  --wb-purple-soft: rgba(123, 97, 255, 0.08);
  --wb-purple-light: #f3f0ff;
  --wb-border-color: #e4e0ed;
  --wb-radius: 8px;
  --wb-shadow-sm: 0 1px 3px rgba(111, 66, 193, 0.06);
  --wb-shadow-md: 0 2px 8px rgba(111, 66, 193, 0.1);
  --wb-transition: 0.2s ease;
}

/* 覆盖 Bootstrap primary 为参考紫色 */
.btn-outline-primary {
  --bs-btn-color: var(--wb-purple);
  --bs-btn-border-color: var(--wb-purple);
  --bs-btn-hover-bg: var(--wb-purple);
  --bs-btn-hover-border-color: var(--wb-purple);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--wb-purple-hover);
  --bs-btn-active-border-color: var(--wb-purple-hover);
  --bs-btn-disabled-color: var(--wb-purple);
  --bs-btn-disabled-border-color: var(--wb-purple);
  opacity: 1;
}

.btn-check:checked + .btn,
.btn-check:active + .btn {
  background-color: var(--wb-purple);
  border-color: var(--wb-purple);
  color: #fff;
}

.btn-check + .btn.btn-outline-secondary {
  --bs-btn-color: #333;
  --bs-btn-border-color: #dee2e6;
  --bs-btn-hover-bg: #f8f9fa;
  --bs-btn-hover-border-color: #dee2e6;
  --bs-btn-hover-color: #333;
}

.btn-check:checked + .btn.btn-outline-secondary {
  background-color: var(--wb-purple);
  border-color: var(--wb-purple);
  color: #fff;
}

/* Qt WebEngine 下 radio :checked 偶发渲染异常，状态 Tab 改为 JS 控制单选高亮 */
.btn-group[aria-label="采集状态"] .btn.btn-outline-secondary {
  background-color: #fff;
  border-color: #dee2e6;
  color: #333;
}

.btn-group[aria-label="采集状态"] .btn.btn-outline-secondary.wb-status-active {
  background-color: var(--wb-purple);
  border-color: var(--wb-purple);
  color: #fff;
}

.text-primary {
  color: var(--wb-purple) !important;
}

/* ---------- 全局辅助样式 ---------- */
.text-wb-gradient {
  background: linear-gradient(135deg, #5b2ea6 0%, #7b61ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #7b61ff;
  font-weight: 800 !important;
}

/* 登录注册页面的包裹层 */
.wb-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #f3f0ff 0%, #f4f3f8 60%);
  position: relative;
  overflow: hidden;
}

/* 装饰性背景球 */
.wb-auth-wrapper::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.wb-auth-card {
  position: relative;
  border: 0 !important;
  box-shadow: 0 16px 48px rgba(111, 66, 193, 0.15) !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.wb-auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7b61ff 0%, #a894ff 100%);
}

.wb-auth-card .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
}

/* ---------- 应用布局：左侧导航 + 主内容 ---------- */
.wb-app-body {
  margin: 0;
  background: #f4f3f8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wb-sidebar {
  width: 165px;
  flex-shrink: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #fefefe 0%, #f9f8fd 100%) !important;
  border-right: 1px solid var(--wb-border-color) !important;
  box-shadow: 1px 0 8px rgba(111, 66, 193, 0.04);
}

.wb-sidebar-brand {
  font-size: 15px;
  letter-spacing: 0.03em;
  font-weight: 700;
  color: #3d3566;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 0.75rem !important;
  border-bottom: 1px solid var(--wb-border-color);
  margin-bottom: 0.5rem;
}

/* 添加一个纯 CSS 的装饰圆点模拟 Logo */
.wb-sidebar-brand::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b61ff 0%, #aa96ff 100%);
  box-shadow: 0 2px 4px rgba(123, 97, 255, 0.4);
}

/* 共享侧栏：#wb-sidebar-nav-mount 内注入 brand+nav，与底部 wb-nav-auth-host 形成纵向 flex */
#wb-sidebar-nav-mount {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* 侧栏「当前店铺」：两字段纵向排列；内嵌顶栏时改为横向（见 html.wb-embed-shell .wb-embed-global-shop-host） */
.wb-sidebar-global-shop {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wb-sidebar-global-shop .wb-simple-select,
.wb-sidebar-global-shop .wb-shop-single-static {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wb-sidebar-global-shop .wb-simple-select {
  min-width: 0;
}

/* 美化侧栏店铺下拉选择器 */
.wb-sidebar-global-shop .wb-simple-select > .btn {
  border-color: #ddd6f0;
  color: #4a4a5a;
  background-color: #fff;
  transition: all var(--wb-transition);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}
.wb-sidebar-global-shop .wb-simple-select > .btn:hover {
  background-color: var(--wb-purple-light);
  border-color: #c4b8e4;
}
.wb-sidebar-global-shop label {
  color: #5d5a77;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.wb-sidebar-global-shop label::before {
  font-family: "FontAwesome";
  color: #9b7ea6;
  font-size: 0.85em;
  opacity: 0.7;
}
.wb-sidebar-global-shop label[for="wb-global-shop-btn"]::before { content: "\f015"; }
.wb-sidebar-global-shop label[for="wb-global-warehouse-btn"]::before { content: "\f1b2"; }

.wb-sidebar-global-shop #wb-global-shop-btn,
.wb-sidebar-global-shop #wb-global-warehouse-btn,
.wb-sidebar-global-shop .wb-shop-single-static {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-nav-link {
  color: #4a4a5a;
  border-radius: var(--wb-radius);
  margin: 2px 0;
  padding: 0.6rem 0.85rem;
  font-size: 13.5px;
  transition: all var(--wb-transition);
  position: relative;
}

.wb-nav-link:hover {
  background: var(--wb-purple-light);
  color: var(--wb-purple);
  transform: translateX(2px);
}

.wb-nav-link.active {
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.15) 0%, rgba(111, 66, 193, 0.12) 100%);
  color: var(--wb-purple);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--wb-purple);
}

.wb-main {
  background: #fff;
  min-height: 100vh;
  /* 与 flex 子项配合，避免宽表把主区挤出视口导致与侧栏叠层 */
  min-width: 0;
  border-radius: 12px 0 0 0;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.02);
}

/* ── 全局页面标题 ── */
.wb-main .h4,
.wb-main h1.h4 {
  font-weight: 700;
  color: #2d2b3d;
  letter-spacing: 0.01em;
  font-size: 1.35rem;
}

/* ── 全局表格美化 ── */
.wb-main .table {
  border-collapse: separate;
  border-spacing: 0;
}
.wb-main .table-responsive.border {
  border-color: var(--wb-border-color) !important;
  border-radius: var(--wb-radius) !important;
  overflow: hidden;
  box-shadow: var(--wb-shadow-sm);
}
.wb-main .table thead.table-light th {
  background: linear-gradient(180deg, #faf9ff 0%, #f3f1fa 100%) !important;
  border-bottom: 2px solid #e0daf0 !important;
  color: #4a4660;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.wb-main .table-hover tbody tr {
  transition: background-color var(--wb-transition);
}
.wb-main .table-hover tbody tr:hover {
  background-color: var(--wb-purple-light) !important;
}

/* ── 全局按钮打磨 ── */
.wb-main .btn {
  transition: all var(--wb-transition);
  border-radius: 6px;
}
.wb-main .btn-primary {
  box-shadow: 0 2px 6px rgba(123, 97, 255, 0.2);
}
.wb-main .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
  transform: translateY(-1px);
}
.wb-main .btn-primary:active {
  transform: translateY(0);
}
.wb-main .btn-outline-secondary {
  border-color: #ddd6f0;
}
.wb-main .btn-outline-secondary:hover {
  background: var(--wb-purple-light);
  border-color: #c4b8e4;
}

/* ── 全局表单输入 ── */
.wb-main .form-control,
.wb-main .form-select {
  border-color: #ddd6f0;
  border-radius: 6px;
  transition: border-color var(--wb-transition), box-shadow var(--wb-transition);
}
.wb-main .form-control:focus,
.wb-main .form-select:focus {
  border-color: #9b7fea;
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

/* ── 全局卡片 ── */
.wb-main .card {
  border-color: var(--wb-border-color);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow-sm);
}
.wb-main .card-header {
  background: linear-gradient(180deg, #faf9ff 0%, #f5f3fc 100%);
  border-bottom-color: var(--wb-border-color);
}

/*
 * Qt 内嵌（wb_embed=1）：侧栏 DOM 拉成整页顶部一条横栏。
 * aside 上 Bootstrap .flex-column 带 !important，此处必须 row !important；
 * 原先 align-items:flex-end + 侧栏仍为 column 时会把整块挤到右上角呈纵向堆叠。
 */
html.wb-embed-shell .wb-app.d-flex {
  flex-direction: column !important;
  min-height: 100vh;
}

html.wb-embed-shell .wb-app > aside.wb-sidebar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0;
  max-height: none;
  position: relative;
  z-index: 2000;
  top: auto;
  align-self: stretch;
  border-right: none !important;
  border-bottom: 1px solid var(--wb-border-color) !important;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.06);
  padding: 0.35rem 0.5rem !important;
  gap: 0.5rem 0.75rem;
  overflow: visible !important;
}

/* 后兄弟 iframe 默认会盖住顶栏溢出区域，压低其层叠使下拉菜单浮在业务区之上 */
html.wb-embed-shell iframe.wb-shell-content-frame,
html.wb-embed-shell iframe.wb-spa-legacy-frame {
  position: relative;
  z-index: 0;
}

html.wb-embed-shell #wb-sidebar-nav-mount {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  gap: 0.5rem 0.65rem;
  overflow: visible !important;
}

/* 内嵌顶栏：不显示「WB 采集台」标题块，与桌面左侧大标题去重 */
html.wb-embed-shell .wb-sidebar-brand {
  display: none !important;
}

html.wb-embed-shell .wb-sidebar-global-shop {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.5rem 0.75rem !important;
  padding: 0 !important;
  border: none !important;
  flex: 0 0 auto;
  overflow: visible !important;
}

/* 标签「当前店铺/当前仓库」与下拉按钮同一行（不再标签在上、控件在下） */
html.wb-embed-shell .wb-sidebar-global-shop .wb-global-shop-field {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.35rem !important;
  flex: 0 0 auto;
  max-width: 22rem;
  min-width: 0;
}

html.wb-embed-shell .wb-sidebar-global-shop .wb-global-shop-field .small {
  margin-bottom: 0 !important;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.2;
}

html.wb-embed-shell .wb-sidebar-global-shop .wb-global-shop-field .wb-simple-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 16rem;
  position: relative;
  z-index: 1;
}

/* 内嵌顶栏：仅「当前店铺」选择框加宽约三分之一（首个字段） */
html.wb-embed-shell .wb-sidebar-global-shop .wb-global-shop-field:first-child {
  max-width: calc(22rem * 4 / 3);
}

html.wb-embed-shell .wb-sidebar-global-shop .wb-global-shop-field:first-child .wb-simple-select {
  max-width: calc(16rem * 4 / 3);
}

html.wb-embed-shell .wb-sidebar-global-shop .wb-simple-select-menu {
  z-index: 5000 !important;
}

html.wb-embed-shell .wb-sidebar-global-shop .wb-global-shop-field .wb-simple-select > .btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.wb-embed-shell .wb-sidebar-page-nav.nav.flex-column,
html.wb-embed-shell .wb-sidebar-page-nav {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  justify-content: flex-start !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0.15rem !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

html.wb-embed-shell .wb-sidebar-page-nav .wb-nav-link {
  padding: 0.28rem 0.5rem !important;
  border-radius: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}

html.wb-embed-shell .wb-sidebar-auth {
  margin-top: 0 !important;
  border-top: none !important;
  padding: 0.15rem 0.35rem !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  align-self: center !important;
}

/* SPA 壳内 iframe 子页：勿与父页顶栏叠双层（旧缓存若仍带 wb-embed-shell 也压掉） */
html.wb-in-iframe.wb-embed-shell .wb-app > aside.wb-sidebar {
  display: none !important;
}

/* 历史：#wb-embed-global-shop-host 内联店铺区（已不再由 JS 迁入，规则保留无害） */
html.wb-embed-shell .wb-embed-global-shop-host .wb-sidebar-global-shop {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.5rem;
  padding: 0 !important;
  border: none !important;
  margin: 0;
}

html.wb-embed-shell .wb-embed-global-shop-host .wb-global-shop-field {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.35rem !important;
  flex: 1 1 auto;
  max-width: 22rem;
  min-width: 0;
}

html.wb-embed-shell .wb-embed-global-shop-host .wb-global-shop-field .small {
  margin-bottom: 0 !important;
  flex: 0 0 auto;
  white-space: nowrap;
}

html.wb-embed-shell .wb-embed-global-shop-host .wb-global-shop-field .wb-simple-select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 16rem;
}

html.wb-embed-shell .wb-embed-global-shop-host .wb-global-shop-field:first-child {
  max-width: calc(22rem * 4 / 3);
}

html.wb-embed-shell .wb-embed-global-shop-host .wb-global-shop-field:first-child .wb-simple-select {
  max-width: calc(16rem * 4 / 3);
}

.wb-collect-page {
  max-width: 100%;
  margin: 0 auto;
}

/* 表格：参考 table-center / table-vcenter */
.table-center th,
.table-center td {
  vertical-align: middle;
}

.table-vcenter th,
.table-vcenter td {
  vertical-align: middle;
}

/* 表格行分割线柔化 */
.wb-main .table > :not(caption) > * > * {
  border-bottom-color: #eee8f8;
}

.text-transform-none {
  text-transform: none;
}

/* 表头排序样式（采集时间 desc） */
.th-inner.sortable.both.desc {
  color: var(--wb-purple);
  cursor: pointer;
  user-select: none;
}

/* 采集价格旁 ?：帮助提示（非乱码）；与文案同一行，避免在 thead 里撑高/错位 */
.help-tips.form-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #ccc;
  font-size: 11px;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  color: #666;
  flex-shrink: 0;
}

/* 仿 bootstrap-table 表头：无官方 th-inner 定位样式时，与 tbody 垂直对齐一致 */
.bootstrap-table.bootstrap5 thead th {
  vertical-align: middle;
  white-space: nowrap;
}
.bootstrap-table.bootstrap5 thead th .th-inner {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}

/* bootstrap-table 风格复选框列 */
.bs-checkbox label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.bs-checkbox input[type="checkbox"] {
  margin: 0;
  accent-color: var(--wb-purple);
}

.bs-checkbox label span {
  display: none;
}

/* 已编辑列表：表头全选仅双击切换，主复选框不抢单击 */
.wb-claimed-select-all-th {
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
}

.wb-claimed-master-check-label {
  pointer-events: none;
}

/* 商品头像：参考 .avatar.product-avatar */
.avatar.avatar-md.product-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 4px;
  background-color: #f5f5f5;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* 公用：列表商品缩略图（与商品管理一致，WB 主图常见竖版 3:4） */
.wb-product-thumb-wrap {
  flex-shrink: 0;
  align-self: flex-start;
  width: 80px;
  height: auto;
  aspect-ratio: 3 / 4;
  max-width: 80px;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}
.wb-product-thumb-wrap:not(.wb-product-thumb-wrap--empty) {
  cursor: zoom-in;
}
.wb-product-thumb-wrap--empty {
  background: #eee;
}
.wb-product-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  background-color: #f5f5f5;
}

/* 悬停放大浮层（wb-product-thumb-hover.js） */
#wb-product-thumb-hover-preview {
  position: fixed;
  z-index: 1080;
  margin: 0;
  padding: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  box-sizing: border-box;
}
#wb-product-thumb-hover-preview.is-visible {
  opacity: 1;
  visibility: visible;
}
#wb-product-thumb-hover-preview img {
  display: block;
  max-width: min(360px, calc(100vw - 32px));
  max-height: min(480px, calc(100vh - 32px));
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
#wb-product-thumb-hover-preview .wb-thumb-hover-url-fallback {
  display: block;
  max-width: min(360px, calc(100vw - 32px));
  max-height: min(160px, 36vh);
  overflow: auto;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
  color: #333;
  margin: 0;
}
#wb-product-thumb-hover-preview .wb-thumb-hover-url-fallback[hidden] {
  display: none !important;
}

/* 触屏点击大图（无 Bootstrap 弹窗页共用） */
.wb-product-touch-img-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}
.wb-product-touch-img-overlay.is-visible {
  display: flex;
}
.wb-product-touch-img-overlay .wb-product-touch-img-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.wb-product-touch-img-overlay .wb-product-touch-img-panel {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  max-height: 90vh;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.wb-product-touch-img-overlay .wb-product-touch-img-panel img {
  display: block;
  max-width: min(920px, 92vw);
  max-height: min(85vh, 920px);
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
.wb-product-touch-img-overlay .wb-product-touch-img-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: #333;
}

/* 与数据分析「区间」一致：原生 date，商品管理时间筛选复用 */
.wb-toolbar-date-range {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.wb-toolbar-date-range .form-control[type="date"] {
  width: auto;
  min-width: 10.25rem;
  max-width: 11rem;
}

/* 商品管理：行内「保存」仅占文字宽度，避免在 td 里被拉满 */
#wb-all-products-table .wb-all-row-inline-save {
  display: inline-block;
  width: auto;
  max-width: 100%;
  min-width: unset;
  flex: 0 0 auto;
  align-self: flex-start;
  box-sizing: border-box;
}

/* 所在仓库列：保存按钮约为默认窄按钮两倍宽 */
#wb-all-products-table .wb-all-wh-inline .wb-all-row-inline-save {
  min-width: 6rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

/* 标题多行截断（简化版） */
.multi-text-truncate.collect-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-width: 300px;
  line-height: 1.35;
  margin-bottom: 0.25rem !important;
}

/* 操作链接 */
.action-menu.claim-product,
.action-menu.del-product {
  text-decoration: none;
}

.action-menu.claim-product:hover,
.action-menu.del-product:hover {
  opacity: 0.85;
}

/* 全局设置：当前登录用户 */
.wb-settings-user-fieldset {
  background: #f8f9fa;
}

.wb-settings-user-fieldset > legend {
  font-size: 0.95rem;
}

/* 分页 */
.fixed-table-pagination .pagination .page-item.active .page-link {
  background-color: var(--wb-purple);
  border-color: var(--wb-purple);
  color: #fff;
}

.fixed-table-pagination .page-link {
  color: var(--wb-purple);
}

.action-btn.disabled,
.action-btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* 采集/已编辑工具栏：细边框圆角透明底，各功能用色区分（与批量删除、刷新同一结构） */
.wb-collect-batch-outline {
  --wb-cb-border: var(--wb-purple);
  --wb-cb-color: var(--wb-purple);
  --wb-cb-hover-bg: rgba(123, 97, 255, 0.1);
  background-color: transparent !important;
  border: 1px solid var(--wb-cb-border) !important;
  color: var(--wb-cb-color) !important;
  box-shadow: none !important;
}

.wb-collect-batch-outline:hover:not(:disabled):not(.disabled) {
  background-color: var(--wb-cb-hover-bg) !important;
  border-color: var(--wb-cb-border) !important;
  color: var(--wb-cb-color) !important;
}

.wb-collect-batch-outline:focus-visible {
  outline: 2px solid var(--wb-cb-border);
  outline-offset: 2px;
}

.wb-collect-batch-outline:disabled,
.wb-collect-batch-outline.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.wb-collect-batch--price {
  --wb-cb-border: #7b61ff;
  --wb-cb-color: #6b4fe6;
  --wb-cb-hover-bg: rgba(123, 97, 255, 0.12);
}

.wb-collect-batch--draft-edit {
  --wb-cb-border: #ea580c;
  --wb-cb-color: #c2410c;
  --wb-cb-hover-bg: rgba(234, 88, 12, 0.12);
}

.wb-collect-batch--del {
  --wb-cb-border: #dc2626;
  --wb-cb-color: #b91c1c;
  --wb-cb-hover-bg: rgba(220, 38, 38, 0.1);
}

.wb-collect-batch--clear {
  --wb-cb-border: #d97706;
  --wb-cb-color: #b45309;
  --wb-cb-hover-bg: rgba(217, 119, 6, 0.12);
}

.wb-collect-batch--refresh {
  --wb-cb-border: #7b61ff;
  --wb-cb-color: #6b4fe6;
  --wb-cb-hover-bg: rgba(123, 97, 255, 0.12);
}

.wb-collect-batch--merge {
  --wb-cb-border: #2563eb;
  --wb-cb-color: #1d4ed8;
  --wb-cb-hover-bg: rgba(37, 99, 235, 0.1);
}

.wb-collect-batch--publish {
  --wb-cb-border: #16a34a;
  --wb-cb-color: #15803d;
  --wb-cb-hover-bg: rgba(22, 163, 74, 0.1);
}

.bootstrap-table.bootstrap5 .fixed-table-container {
  background: #fff;
}

/* 批量编辑弹窗：全局 modal-footer 为 flex-end+wrap 时，首颗「导出内衣Excel」易在窄屏换行到不易见区域；两端对齐固定左右区。 */
#wb-batch-price-stock-modal .modal-footer.wb-batch-price-stock-footer {
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* 批量改价四格 2×2：不用 .row，避免 wb-bootstrap-shim 里 body.wb-app-body .row > * { width:100% } 盖掉 .col-6 */
#wb-batch-price-stock-modal .wb-batch-psp-price-grid,
#wb-all-batch-edit-modal .wb-batch-psp-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  align-items: start;
  box-sizing: border-box;
}

#wb-batch-price-stock-modal .wb-batch-psp-price-field,
#wb-all-batch-edit-modal .wb-batch-psp-price-field {
  min-width: 0;
}

#wb-batch-price-stock-modal .wb-batch-psp-price-field .form-control,
#wb-all-batch-edit-modal .wb-batch-psp-price-field .form-control {
  width: 100%;
  max-width: 100%;
}

#wb-batch-price-stock-modal .wb-batch-psp-lbl,
#wb-all-batch-edit-modal .wb-batch-psp-lbl {
  font-weight: 700;
  letter-spacing: 0.01em;
}

#wb-batch-price-stock-modal .wb-batch-psp-lbl--percent,
#wb-all-batch-edit-modal .wb-batch-psp-lbl--percent {
  color: #2563eb;
}

#wb-batch-price-stock-modal .wb-batch-psp-lbl--fixed,
#wb-all-batch-edit-modal .wb-batch-psp-lbl--fixed {
  color: #059669;
}

#wb-batch-price-stock-modal .wb-batch-psp-lbl--discount,
#wb-all-batch-edit-modal .wb-batch-psp-lbl--discount {
  color: #d97706;
}

#wb-batch-price-stock-modal .wb-batch-psp-lbl--final,
#wb-all-batch-edit-modal .wb-batch-psp-lbl--final {
  color: #7c3aed;
}

/* 商品管理「批量编辑」：整体收窄，避免字段在宽屏上被拉得过散 */
#wb-all-batch-edit-modal .modal-dialog {
  max-width: min(96vw, 520px);
}

#wb-all-batch-edit-modal .modal-footer {
  flex-wrap: wrap;
  gap: 0.5rem;
  row-gap: 0.5rem;
}

/* 仅商品管理：两列固定上限，左对齐，避免 1fr 撑满整窗 */
#wb-all-batch-edit-modal .wb-batch-psp-price-grid {
  grid-template-columns: repeat(2, minmax(0, 10.5rem));
  justify-content: start;
  gap: 0.65rem 1rem;
}

/* 百分比 / 固定加减：输入框限定宽度，不再用 50% 相对列宽（列本身已收窄） */
#wb-all-batch-edit-modal .wb-batch-psp-price-field > .form-control {
  width: 100%;
  max-width: 10rem;
}

/* 设置折扣：占满价格区整行，标签+勾选+输入同一横排；极窄时该行内横向滚动 */
#wb-all-batch-edit-modal .wb-batch-psp-price-field.wb-all-be-discount-fullrow {
  grid-column: 1 / -1;
}

#wb-all-batch-edit-modal .wb-batch-psp-price-field.wb-all-be-final-fullrow {
  grid-column: 1 / -1;
}

#wb-all-batch-edit-modal .wb-all-be-discount-one-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  row-gap: 0.45rem;
  min-width: 0;
  box-sizing: border-box;
}

#wb-all-batch-edit-modal .wb-all-be-discount-one-row > * {
  flex-shrink: 0;
}

#wb-all-batch-edit-modal .wb-all-be-discount-main-lbl {
  white-space: nowrap;
}

#wb-all-batch-edit-modal .wb-all-be-discount-one-row .wb-all-be-discount-modes {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 0.65rem;
}

body.wb-app-body #wb-all-batch-edit-modal .wb-all-be-discount-one-row .form-check-inline {
  margin-right: 0;
}

#wb-all-batch-edit-modal .wb-all-be-discount-one-row .wb-all-be-discount-input.form-control {
  width: 5.5rem;
  max-width: 5.5rem;
  flex: 0 0 5.5rem;
}

/* 折后一口价与「合并 SKU」同一行；合并目标 imt 仍在下方整行 */
#wb-all-batch-edit-modal .wb-all-be-final-merge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 1rem;
  row-gap: 0.5rem;
  min-width: 0;
}

#wb-all-batch-edit-modal .wb-all-be-final-col {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, 12rem);
}

#wb-all-batch-edit-modal .wb-all-be-final-col .form-control {
  width: 100%;
  max-width: 10rem;
  box-sizing: border-box;
}

#wb-all-batch-edit-modal .wb-all-be-merge-sku-col {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

/* 批量编辑：库存区 — 标题单独一行，其余可换行，避免一行撑得过宽 */
#wb-all-batch-edit-modal .wb-all-be-stock-one-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  row-gap: 0.5rem;
  min-width: 0;
}

#wb-all-batch-edit-modal .wb-all-be-stock-one-row .wb-all-be-stock-title {
  flex: 1 1 100%;
  margin-bottom: 0;
}

#wb-all-batch-edit-modal .wb-all-be-stock-one-row > * {
  flex-shrink: 0;
}

#wb-all-batch-edit-modal .wb-all-be-stock-one-row .form-select {
  flex: 1 1 6rem;
  min-width: 4.5rem;
  max-width: 11rem;
  width: auto;
}

#wb-all-batch-edit-modal .wb-all-be-stock-one-row .wb-all-be-stock-amt-input {
  width: 5rem;
  max-width: 5rem;
  flex: 0 0 5rem;
}

#wb-batch-price-stock-modal .wb-batch-psp-brand-disabled-reason {
  color: #2563eb;
  font-weight: 500;
}

/* 发布弹窗容器约束 */
#wb-publish-preset-modal .modal-content {
  max-height: 82vh;
}

#wb-publish-preset-modal .modal-body {
  overflow-y: auto;
}

#wb-publish-preset-modal .modal-dialog {
  align-items: flex-start;
}

/* Qt 兼容：发布弹窗自绘下拉（不走原生 select / bootstrap dropdown） */
.wb-simple-select {
  position: relative;
}

.wb-simple-select-menu {
  position: absolute;
  z-index: 1080;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--wb-border-color);
  border-radius: var(--wb-radius);
  box-shadow: 0 8px 24px rgba(111, 66, 193, 0.12);
  max-height: 220px;
  overflow-y: auto;
}

.wb-simple-select-menu .wb-simple-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  transition: background var(--wb-transition);
  cursor: pointer;
}

.wb-simple-select-menu .wb-simple-option:hover {
  background: var(--wb-purple-light);
}

/* 店铺商品：按仓库筛选下拉（md 及以上再限制最大宽度，约原 col-md-3 内全宽的 2/3） */
.wb-all-wh-filter-select {
  width: 100%;
}
@media (min-width: 768px) {
  .wb-all-wh-filter-select {
    max-width: 12rem;
  }
}

/* 数据分析：本页合计行 — 快捷区间（圆角 outline，与主题色呼应） */
#da-table .da-quick-range {
  max-width: 100%;
}
#da-table .da-quick-range-btn {
  font-size: 0.75rem;
  padding: 0.12rem 0.55rem;
  line-height: 1.35;
  border-color: var(--wb-border-color);
  color: var(--wb-text-secondary);
  background: var(--wb-bg-card);
  transition: color var(--wb-transition), border-color var(--wb-transition), background var(--wb-transition),
    box-shadow var(--wb-transition);
}
#da-table .da-quick-range-btn:hover,
#da-table .da-quick-range-btn:focus-visible {
  border-color: var(--wb-purple);
  color: var(--wb-purple);
  background: var(--wb-purple-soft);
  box-shadow: var(--wb-shadow-sm);
}
#da-table .da-quick-range-btn:focus-visible {
  outline: 0;
}

/* 商品管理：主区收紧标题上下留白（相对原 py-4 + mb-3） */
.wb-all-products-main {
  padding-top: 0.375rem !important;
  padding-bottom: 0.75rem !important;
}

/* 商品管理：左侧工具条单独横向滚动；分页在滚动区外，避免 overflow-x:auto 连带出竖向滚动条 */
.wb-all-toolbar-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.wb-all-toolbar-actions {
  align-items: center;
}

/* 商品管理：工具行右侧分页条 + 每页条数 */
.wb-all-pager-bar {
  max-width: none;
}

/* 商品管理：表头排序按钮禁用态（勿 pointer-events:none，部分环境下与 disabled 叠加会导致无法点击） */
button.wb-all-sort-price:disabled,
button.wb-all-sort-time:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 商品管理：批量设置标签弹窗内标签列表 */
.wb-all-batch-tag-checkboxes {
  max-height: 14rem;
  overflow-y: auto;
}

/* 商品管理：列表搜索 — 单行（避免 .input-group 默认 flex-wrap 折行） */
.wb-all-list-search-bar {
  flex-wrap: nowrap;
}
/* 表头「商品信息」列：搜索条紧随合并 SKU，允许占满剩余宽度 */
#wb-all-products-table thead .wb-all-th-search {
  min-width: 0;
}
.wb-all-list-search-input-wrap {
  width: 11.5rem;
  min-width: 7rem;
  max-width: min(11.5rem, 52vw);
}

/* 商品管理：标题链到 WB 前台商品卡 */
.collect-product-title .wb-all-title-link {
  color: inherit;
  font-weight: 600;
}
.collect-product-title .wb-all-title-link:hover {
  color: var(--wb-purple, #7b61ff);
  text-decoration: underline !important;
}

@media (max-width: 767.98px) {
  .wb-app {
    flex-direction: column;
  }

  .wb-sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
    max-height: none;
  }

  .wb-sidebar .nav {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 4px;
  }

  .wb-nav-link {
    flex: 1 1 auto;
    text-align: center;
    min-width: 100px;
  }
}

/* 商品管理：WB 标签列 */
.wb-all-tags-cell .wb-all-tag-chip {
  font-weight: 500;
  font-size: 0.7rem;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-all-tags-td {
  vertical-align: middle;
}

/* ---------- 商品管理：贴近 WB 卖家的标签单元格 / 浮层 ---------- */
.wb-all-tag-cell-trigger {
  cursor: pointer;
  border-radius: 10px;
  padding: 4px 6px;
  margin: -4px -6px;
  outline: none;
  transition: background 0.12s ease;
  min-height: 2rem;
}
.wb-all-tag-cell-trigger:hover,
.wb-all-tag-cell-trigger:focus-visible {
  background: rgba(123, 97, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(123, 97, 255, 0.35);
}
.wb-official-tag-cell {
  min-height: 28px;
}
.wb-official-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.wb-official-tag-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: #2e2e33;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.wb-official-tag-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-official-tag-plus {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #ebebed;
  color: #6c6c72;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wb-official-tag-plus:hover {
  background: #e0e1e6;
  color: #4e4e53;
}

#wb-all-tag-layers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1080;
}
#wb-all-tag-layers > * {
  pointer-events: auto;
}
.wb-official-tag-popover-main {
  position: fixed;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15, 18, 42, 0.12), 0 0 1px rgba(15, 18, 42, 0.08);
  min-width: 300px;
  max-width: min(380px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  padding: 12px;
  font-size: 0.8125rem;
  color: #2e2e33;
}
.wb-official-tag-search-wrap {
  border: 1px solid #e2e2e6;
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
}
.wb-official-tag-multiselect-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  row-gap: 6px;
}
.wb-official-tag-selected-host {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
.wb-official-tag-pill--removable {
  padding: 2px 4px 2px 8px;
  gap: 0;
  align-items: center;
}
.wb-official-tag-pill-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #4e4e53;
  cursor: pointer;
  line-height: 0;
}
.wb-official-tag-pill-remove:hover {
  background: rgba(0, 0, 0, 0.08);
}
.wb-official-tag-pill-remove:focus-visible {
  outline: 2px solid var(--wb-purple, #7b61ff);
  outline-offset: 1px;
}
.wb-official-tag-search-wrap input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.8125rem;
  padding: 0;
  background: transparent;
  color: #2e2e33;
}
.wb-official-tag-multiselect-wrap input {
  width: auto;
  flex: 1 1 48px;
  min-width: 48px;
  max-width: 100%;
}
.wb-official-tag-hint {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 6px;
  color: #8b8b93;
  font-size: 0.75rem;
  line-height: 1.3;
}
.wb-official-tag-fallback-warn {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff4e0;
  color: #8a5a00;
  font-size: 0.72rem;
  line-height: 1.35;
}
.wb-official-tag-options {
  margin-top: 4px;
  border-radius: 10px;
  border: 1px solid #efeff2;
  max-height: 220px;
  overflow-y: auto;
  background: #fafafb;
}
.wb-official-tag-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  background: #fafafb;
  border-bottom: 1px solid #efeff2;
}
.wb-official-tag-option:last-child {
  border-bottom: none;
}
.wb-official-tag-option:hover {
  background: #f3f2f7;
}
.wb-official-tag-option--on {
  box-shadow: inset 3px 0 0 var(--wb-purple, #7b61ff);
}
.wb-official-tag-option .wb-official-tag-pill {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: auto;
}
.wb-official-tag-option-more {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #4e4e53;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wb-official-tag-option-more:hover {
  background: rgba(0, 0, 0, 0.05);
}
.wb-official-tag-create-row {
  padding: 10px;
  text-align: center;
  color: var(--wb-purple, #7b61ff);
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  border-bottom: 1px solid #efeff2;
}
.wb-official-tag-create-row:hover {
  background: #f8f7ff;
}
.wb-official-tag-popover-edit {
  position: fixed;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15, 18, 42, 0.14), 0 0 1px rgba(15, 18, 42, 0.1);
  padding: 12px;
  min-width: 232px;
  z-index: 1090;
}
.wb-official-tag-form-input {
  width: 100%;
  border: 1px solid #e2e2e6;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8125rem;
  margin-bottom: 10px;
  outline: none;
}
.wb-official-tag-form-input:focus {
  border-color: var(--wb-purple, #7b61ff);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.15);
}
.wb-official-tag-form-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.wb-official-tag-form-color {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
}
.wb-official-tag-form-color--active {
  border-color: #4e4e53;
  position: relative;
}
.wb-official-tag-form-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.wb-official-tag-form-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #d92d20;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}
.wb-official-tag-form-remove:hover {
  background: rgba(217, 45, 32, 0.06);
}

/* 批量列队：部分成功 / 库存提示 / 补发 — 不用默认黄字黄底（刺眼），改为中性灰蓝 */
#wb-excel-tasks-content .text-warning {
  color: #4a5568 !important;
}
#wb-excel-tasks-content .badge.bg-warning {
  background-color: #e2e6ec !important;
  color: #2d3340 !important;
  border: 1px solid #c5ccd6;
  font-weight: 600;
}
#wb-excel-tasks-content .btn-outline-warning {
  --bs-btn-color: #3d4451;
  --bs-btn-border-color: #9aa3b0;
  --bs-btn-hover-bg: #eef1f4;
  --bs-btn-hover-border-color: #7a8494;
  --bs-btn-hover-color: #1a1d24;
  --bs-btn-active-bg: #e3e7ed;
  --bs-btn-active-border-color: #6b7585;
  --bs-btn-active-color: #111318;
  --bs-btn-focus-shadow-rgb: 122, 132, 148;
}

/* 批量列队发布：实时日志（发布过程中滚动展示） */
#wb-excel-publish-log.wb-excel-publish-log {
  max-height: 6rem;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.5rem;
  min-height: 2.25rem;
  color: #212529;
}

/* ---------- 自动空状态追加 ---------- */
.wb-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem !important;
  color: #908d9e !important;
  text-align: center;
  font-size: 0.85rem;
}
.wb-empty-state::before {
  content: "\f07c"; /* folder-open */
  font-family: "FontAwesome";
  font-size: 2.5rem;
  color: #d8d4e5;
  margin-bottom: 0.75rem;
}
.wb-empty-state-loading::before {
  content: "\f110"; /* spinner */
  animation: fa-spin 2s infinite linear;
}

/* ---------- 统一下拉与分类面板等的 Pagination ---------- */
.wb-pagination-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #555;
  flex-wrap: wrap;
}
.wb-pagination-container .btn-group .btn {
  border-color: #ddd6f0;
  color: #555;
}
.wb-pagination-container .btn-group .btn:hover {
  background-color: var(--wb-purple-light);
  color: var(--wb-purple);
  border-color: #c4b8e4;
  z-index: 2;
}

/* -- Checkbox Accent Color -- */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--wb-purple);
}

/* -- 自定义滚动条 (Webkit) -- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d4d0e0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a894ff;
}

/* -- 商品缩略图圆角 -- */
.wb-product-thumb-wrap {
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.wb-product-thumb-img {
  border-radius: 6px !important;
}

/* -- 进度条美化 -- */
.progress {
  border-radius: 10px;
  background-color: #eee8f8;
}
.progress-bar {
  background: linear-gradient(90deg, #7b61ff 0%, #a894ff 100%);
}

/* -- 全局代码块美化 -- */
pre, code {
  color: #4a4660;
}
pre.font-monospace {
  background-color: #faf9ff !important;
  border-color: #e0daf0 !important;
}

/* -- Sidebar 最底部退出区域美化 -- */
.wb-sidebar-auth {
  border-top: 1px solid var(--wb-border-color) !important;
  background: linear-gradient(180deg, #fefefe 0%, #f9f8fd 100%) !important;
}

/* ── 采集wb tab：列队 + 日志面板 ───────────────────────────────────── */
.wb-cwb-panel {
  background: #fff;
  border: 1px solid var(--wb-border-color);
  border-radius: 6px;
  padding: 12px;
}
.wb-cwb-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.wb-cwb-label {
  font-size: 13px;
  color: #333;
  margin: 0;
}
.wb-cwb-input {
  flex: 1 1 320px;
  min-width: 240px;
}
.wb-cwb-pages {
  width: 80px;
}
.wb-cwb-table-wrap {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--wb-border-color);
  border-radius: 4px;
  background: #fcfbff;
}
.wb-cwb-table {
  margin-bottom: 0;
  font-size: 12.5px;
}
.wb-cwb-table th {
  background: #f4f1fa;
  position: sticky;
  top: 0;
  z-index: 1;
}
.wb-cwb-table td {
  vertical-align: middle;
}
.wb-cwb-table .url-cell {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-cwb-status-queued { color: #6c757d; }
.wb-cwb-status-running { color: #0d6efd; font-weight: 600; }
.wb-cwb-status-done { color: #198754; }
.wb-cwb-status-error { color: #dc3545; }
.wb-cwb-status-cancelled { color: #6c757d; text-decoration: line-through; }
.wb-cwb-log {
  height: 220px;
  overflow: auto;
  background: #1e1e1e;
  color: #e6e6e6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  margin: 0;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}
.wb-cwb-cookie-ok { color: #198754; }
.wb-cwb-cookie-warn { color: #b45309; }
.wb-cwb-cookie-bad { color: #dc3545; }
.wb-cwb-cookie-textarea {
  height: 200px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}
