:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #2563eb;
  --topbar-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); }

/* ---------- 登录（脉流品牌风格：左品牌 + 右表单）---------- */
:root { --pf-green: #00C896; --pf-deep: #004C4C; }
.login-page {
  position: fixed; inset: 0; display: flex; background: #fff;
}
/* 左侧品牌区（灰色系底，绿色 logo）*/
.login-brand {
  flex: 1.1; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #f4f6f8 0%, #e7ebee 55%, #d9dee3 100%);
  display: flex; align-items: center; justify-content: center;
}
.brand-inner { position: relative; z-index: 2; text-align: center; padding: 40px; color: var(--pf-deep); }
.brand-logo {
  width: 420px; max-width: 78vw; height: auto; margin-bottom: 18px;
  filter: drop-shadow(0 12px 26px rgba(0,76,76,.18));
}
.brand-name {
  font-size: 34px; font-weight: 800; letter-spacing: 2px; margin-bottom: 6px;
  color: #073b35;
}
.brand-en {
  font-size: 19px; font-weight: 700; letter-spacing: 3px; margin-bottom: 20px;
  color: var(--pf-green);
}
.brand-tag { font-size: 14px; color: #6b7c79; letter-spacing: 1px; }
/* 背景装饰光斑（灰底用更淡的灰）*/
.brand-deco { position: absolute; inset: 0; z-index: 1; }
.brand-deco::before, .brand-deco::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.5);
}
.brand-deco::before { width: 420px; height: 420px; top: -140px; right: -120px; }
.brand-deco::after { width: 300px; height: 300px; bottom: -110px; left: -90px;
  background: rgba(0,76,76,.04); }

/* 右侧表单区（浅灰白底，白卡片）*/
.login-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #f4f6f8;
}
.login-card {
  background: #fff; padding: 46px 42px; border-radius: 16px; width: 360px;
  box-shadow: 0 20px 60px rgba(0,76,76,.12);
  display: flex; flex-direction: column;
}
.login-title { font-size: 26px; font-weight: 800; color: var(--pf-deep); }
.login-sub { color: var(--text-light); margin: 6px 0 26px; font-size: 14px; }
.login-label { font-size: 13px; color: var(--text-light); margin-bottom: 6px; font-weight: 500; }
.login-card input {
  padding: 12px 14px; border: 1px solid #dbe7e4; border-radius: 10px;
  outline: none; margin-bottom: 18px; transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus {
  border-color: var(--pf-green); box-shadow: 0 0 0 3px rgba(0,200,150,.15);
}
.btn-login {
  margin-top: 4px; padding: 13px; border: none; border-radius: 10px; color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: 4px; cursor: pointer;
  background: linear-gradient(135deg, #00C896, #007a66);
  box-shadow: 0 8px 20px rgba(0,200,150,.35); transition: filter .15s, transform .1s;
}
.btn-login:hover { filter: brightness(1.06); }
.btn-login:active { transform: translateY(1px); }
.login-error { color: var(--danger); font-size: 13px; min-height: 18px; text-align: center; margin-top: 12px; }
.login-hint { text-align: center; color: var(--text-light); font-size: 12px; margin-top: 14px; }

/* 窄屏：上下堆叠，品牌区收缩 */
@media (max-width: 760px) {
  .login-page { flex-direction: column; }
  .login-brand { flex: none; min-height: 230px; }
  .brand-logo { width: 110px; margin-bottom: 16px; }
  .brand-name { font-size: 26px; }
  .login-right { flex: 1; }
}

/* ---------- 布局 ---------- */
.app { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  height: 56px; background: var(--topbar-bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 700; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-page { color: var(--text-light); }
.user-info { font-size: 13px; }

/* ===== 右上角用户下拉菜单 ===== */
.user-menu { position: relative; }
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 6px; background: transparent;
  border: 1px solid transparent; border-radius: 8px; padding: 5px 10px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.user-menu-btn:hover, .user-menu-btn.active { background: var(--bg); border-color: var(--border); }
.user-avatar { font-size: 15px; }
.user-caret { font-size: 11px; color: var(--text-light); transition: transform .2s; }
.user-menu-btn.active .user-caret { transform: rotate(180deg); }

.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 380px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(15,23,42,.18); z-index: 300; overflow: hidden;
  transform-origin: top right; transform: translateY(-8px) scaleY(.96);
  opacity: 0; transition: transform .18s ease, opacity .18s ease;
}
.user-dropdown.open { transform: translateY(0) scaleY(1); opacity: 1; }

.ud-head { display: flex; align-items: center; gap: 12px; padding: 16px;
  background: linear-gradient(135deg, #00C896, #007a66); color: #fff; }
.ud-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.ud-name { font-weight: 700; font-size: 15px; }
.ud-sub { font-size: 12px; opacity: .9; margin-top: 2px; }

.ud-section { padding: 8px 12px 12px; border-bottom: 1px solid var(--border); }
.ud-section-title { font-size: 12px; color: var(--text-light); padding: 6px 0 8px; }
/* 授权目录：长方形平台磁贴，一行四个（预留，目前仅乐天）*/
.ud-platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.plat-tile {
  position: relative; border: 1px solid var(--border); border-radius: 6px;
  height: 48px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; cursor: pointer; overflow: hidden; background: #fff;
  transition: box-shadow .15s;
}
.plat-tile:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.plat-logo { max-width: 86%; max-height: 70%; object-fit: contain; }
.plat-name { font-weight: 800; font-size: 12px; color: #bf0000; line-height: 1.05; }
.plat-sub { font-size: 9px; color: var(--text-light); margin-top: 1px; }
.plat-hover {
  position: absolute; inset: 0; background: rgba(0,0,0,.6); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  font-weight: 600; opacity: 0; transition: opacity .15s;
}
.plat-tile:hover .plat-hover { opacity: 1; }

.ud-foot { display: flex; gap: 8px; padding: 10px 12px; }
.ud-btn {
  flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text);
}
.ud-btn:hover { background: var(--bg); }
.ud-logout { color: var(--danger); border-color: #fecaca; }
.ud-logout:hover { background: #fef2f2; }
.badge {
  background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0;
  padding: 2px 8px; border-radius: 12px; font-size: 12px;
}
.icon-btn {
  background: transparent; border: none; font-size: 18px; color: var(--text);
  width: 32px; height: 32px; border-radius: 6px;
}
.icon-btn:hover { background: var(--bg); }

.body { display: flex; flex: 1; overflow: hidden; }
.sidebar {
  width: 220px; background: var(--sidebar-bg); flex-shrink: 0;
  overflow-y: auto; transition: width .2s;
}
.sidebar.collapsed { width: 0; }
.menu-nav { padding: 10px 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  color: #cbd5e1; cursor: pointer; font-size: 14px; border-left: 3px solid transparent;
}
.menu-item:hover { background: var(--sidebar-hover); color: #fff; }
.menu-item.active { background: var(--sidebar-active); color: #fff; border-left-color: #93c5fd; }
.menu-item .ico { width: 18px; text-align: center; }
/* 二级菜单：分组头 + 缩进子项 */
.menu-parent .caret { margin-left: auto; font-size: 11px; color: #94a3b8; }
.menu-children .menu-item { padding-left: 40px; font-size: 13px; }
.menu-group-title { padding: 14px 20px 6px; color: #64748b; font-size: 12px; }

.content { flex: 1; overflow-y: auto; padding: 22px; }

/* 固定头 + 固定底、中间表体滚动的页面布局（产品管理等） */
.page-fixed { display: flex; flex-direction: column; height: 100%; }
.page-fixed-head { flex: none; }
.page-fixed-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.page-fixed-foot { flex: none; margin-top: 6px; }
.page-fixed-body table thead th { position: sticky; top: 0; z-index: 2; }

/* ---------- 通用组件 ---------- */
.page-title { font-size: 20px; margin-bottom: 4px; }
.page-desc { color: var(--text-light); margin-bottom: 18px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px;
}
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; outline: none;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--primary); }
.spacer { flex: 1; }

.btn-primary {
  background: var(--primary); color: #fff; border: none; padding: 9px 16px;
  border-radius: 6px; font-weight: 500;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); padding: 7px 14px;
  border-radius: 6px; color: var(--text);
}
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; border: none; padding: 6px 12px; border-radius: 6px; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; color: var(--text-light); font-weight: 600; font-size: 13px; }
tr:hover td { background: #f8fafc; }
.tag { padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-draft { background: #fef3c7; color: #b45309; }

/* 权限气泡：点亮=已授权 */
.perm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.perm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; line-height: 1;
  background: var(--bg); color: var(--text-light);
  border: 1px solid var(--border); cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.perm-chip:hover { border-color: var(--primary); color: var(--primary); }
.perm-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); transition: all .15s ease;
}
.perm-chip.on {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .35); font-weight: 600;
}
.perm-chip.on:hover { background: var(--primary-dark); color: #fff; }
.perm-chip.on::before { background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .9); }

/* 开关（toggle switch） */
.switch-field {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0;
}
.switch-field .switch-label { font-size: 14px; color: var(--text); }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: var(--border); transition: background .2s ease;
}
.switch .slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 单选选项块（避免 .field input{width:100%} 把圆圈拉宽错位） */
.radio-opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.radio-opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--text); font-weight: 400;
  transition: all .15s ease; user-select: none;
}
.radio-opt:hover { border-color: var(--primary); }
/* ⚠️ checkbox 也要带上：只写 radio 的话，选项块放进 .field 里就会被
   .field input{width:100%} 撑成整行宽的大蓝方块（踩过） */
.radio-opt input[type="radio"], .radio-opt input[type="checkbox"] {
  width: 16px !important; height: 16px; flex: none; margin: 0; accent-color: var(--primary); cursor: pointer;
}
/* .field label{display:block} 的优先级比 .radio-opt 高，会把横排的选项块
   打散成一行一个、还染成浅灰。放进 .field 里时把这些夺回来。 */
.field .radio-opt { display: inline-flex; margin-bottom: 0; color: var(--text); font-size: 13px; }
.field .radio-opt:has(input:checked) { color: var(--primary); }
/* .on 是给少数手写了 class="radio-opt on" 的地方兜底，行为和选中态一致 */
.radio-opt:has(input:checked), .radio-opt.on {
  border-color: var(--primary); background: rgba(37, 99, 235, .06);
  color: var(--primary); font-weight: 600;
}
.radio-opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.tag-published { background: #dcfce7; color: #15803d; }
/* 产品流水线阶段：待处理(灰) -> 审核中(琥珀) -> 已就绪(蓝) -> 已生成(绿)；拉黑独立拦截 */
.tag-pending { background: #f1f5f9; color: #64748b; }
.tag-reviewing { background: #fef3c7; color: #b45309; }
.tag-ready { background: #dbeafe; color: #1d4ed8; }
.tag-blacklisted { background: #111827; color: #fff; }
.p-stage-cell { position: relative; }
.p-stage-tag { cursor: pointer; user-select: none; }
.p-stage-tag:hover { filter: brightness(.92); }
.p-stage-menu { position: absolute; top: 115%; left: 0; z-index: 100; min-width: 112px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15,23,42,.12); }
.p-stage-menu .dropdown-item { padding: 7px 14px; font-size: 13px; cursor: pointer; }
.p-stage-menu .dropdown-item:hover { background: #f1f5f9; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 70px; }

.img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.img-grid img {
  width: 90px; height: 90px; object-fit: cover; border: 1px solid var(--border);
  border-radius: 6px; background: #f8fafc;
}

/* 模态框 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
/* 靠上定位：弹窗内有向下展开的树/下拉时，避免居中把下方空间挤没 */
.modal-mask.modal-top { align-items: flex-start; }
.modal-mask.modal-top > .modal { margin-top: 48px; }
.modal {
  background: #fff; border-radius: 12px; width: min(820px, 92vw);
  max-height: 88vh; overflow-y: auto; padding: 22px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 通用确认框：置于最高层，避免被任务抽屉(401)/加载遮罩等挡住 */
.confirm-mask { z-index: 600; }
.confirm-box {
  width: min(380px, 90vw); padding: 26px 24px 20px; text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  animation: confirm-pop .16s ease-out;
}
@keyframes confirm-pop {
  from { transform: translateY(8px) scale(.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.confirm-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: #eff6ff;
}
.confirm-icon.danger { background: #fee2e2; }
.confirm-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.confirm-msg { font-size: 14px; color: var(--text-light); line-height: 1.6; white-space: pre-line; }
.confirm-foot { display: flex; gap: 12px; margin-top: 22px; }
.confirm-foot button { flex: 1; padding: 10px 0; font-size: 14px; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 11px 22px; border-radius: 8px;
  z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

.empty { text-align: center; color: var(--text-light); padding: 40px; }

/* 加载遮罩 */
.loading-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center; z-index: 300;
}
.loading-box {
  background: #fff; padding: 28px 40px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.spinner {
  width: 42px; height: 42px; border: 4px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text); font-size: 14px; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* SKU 变体卡片 */
.sku-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.sku-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  background: #fff; display: flex; flex-direction: column; gap: 6px;
}
.sku-card img {
  width: 100%; height: 130px; object-fit: contain; background: #f8fafc;
  border-radius: 6px; border: 1px solid var(--border);
}
.sku-card .sku-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.sku-card .sku-price { color: var(--primary); font-weight: 700; }
.sku-card .sku-price.none { color: var(--text-light); font-weight: 400; font-size: 12px; }
.sku-card .sku-asin { font-size: 11px; color: var(--text-light); }
.pager {
  display: flex; gap: 5px; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; margin-top: 0; padding: 5px 2px;
  border-top: 1px solid var(--border);
}
.pager-total { color: var(--text-light); font-size: 12.5px; margin-right: auto; }
.pg-btn, .pg-num { min-width: 27px; height: 27px; padding: 0 8px;
  border: 1px solid var(--border); background: #fff; border-radius: 5px;
  font-size: 12.5px; cursor: pointer; color: var(--text); }
.pg-btn:hover:not(:disabled), .pg-num:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-num.active {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.pg-ellipsis { padding: 0 4px; color: var(--text-light); }
.pager-jump { font-size: 12.5px; color: var(--text-light); margin-left: 4px; }
/* ⚠️ 压高度时别把 appearance:none + 自绘箭头一起删了 —— 删了就露出系统原生三角，
   和全站其它下拉长得不一样（改这条时踩过一次）。箭头图案与 .toolbar select 保持同款。 */
.pg-size { height: 27px; padding: 0 26px 0 8px; border: 1px solid var(--border);
  border-radius: 5px; font-size: 12.5px; color: var(--text); background-color: #fff;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.pg-size:hover, .pg-size:focus { border-color: var(--primary); outline: none; }
.pg-input { width: 46px; height: 27px; padding: 0 6px; border: 1px solid var(--border);
  border-radius: 5px; font-size: 12.5px; text-align: center; }
.pg-input:focus { border-color: var(--primary); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-light); margin-top: 6px; }
.muted { color: var(--text-light); font-size: 13px; }

/* SKU 子表编辑 */
.sku-edit { width: 100%; border-collapse: collapse; font-size: 13px; }
.sku-edit th { background: #f8fafc; color: var(--text-light); font-weight: 600; padding: 6px 8px; text-align: left; white-space: nowrap; }
.sku-edit td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
.sku-edit input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; outline: none; }
.sku-edit input:focus { border-color: var(--primary); }

/* ===== 产品采集页 ===== */
.cl-srcrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 2px; }
.cl-lbl { color: var(--text-light); font-size: 13px; }
.cl-src {
  padding: 3px 10px; font-size: 13px; cursor: pointer; border-radius: 5px; color: var(--text);
}
.cl-src:hover { color: var(--primary); }
.cl-src.active { background: var(--primary); color: #fff; }
.cl-tbl { font-size: 13px; }
.cl-tbl th, .cl-tbl td { padding: 10px 12px; vertical-align: top; }
.cl-k { font-size: 12px; color: var(--text-light); line-height: 1.7; }
.cl-k b { color: var(--text); }
/* 标题后的审核小标签（后续按审核状态变色） */
.au-tag { display: inline-block; margin-left: 5px; padding: 1px 7px; font-size: 11px; line-height: 1.6;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text-light);
  vertical-align: middle; white-space: nowrap; cursor: default; }
/* 标题审核状态：蓝=审核中 绿=通过 红=未通过 橙=调用失败（有结果的可点击查看） */
.au-tag.au-ing { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.au-tag.au-pass { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; cursor: pointer; }
.au-tag.au-fail { background: #fef2f2; border-color: #fecaca; color: #dc2626; cursor: pointer; }
.au-tag.au-err { background: #fffbeb; border-color: #fde68a; color: #d97706; cursor: pointer; }
/* 图片审核对话框里逐图结果徽标 */
.ia-b { display: inline-block; max-width: 128px; padding: 1px 8px; font-size: 11px; line-height: 1.7;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.ia-b.ia-ok { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.ia-b.ia-bad { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.ia-b.ia-unk { background: #fffbeb; border-color: #fde68a; color: #d97706; }
/* 图片审核对话框：模式切换段控件 + 步骤序号 + 面板 */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.seg-b { border: none; background: transparent; padding: 5px 12px; font-size: 13px; border-radius: 6px;
  cursor: pointer; color: var(--text-light); display: inline-flex; align-items: center; gap: 5px; }
.seg-b svg { display: block; }
.seg-b.active { background: var(--primary); color: #fff; }
.ia-step { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; }
.ia-panel { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
/* 图片审核对话框：每张图上的人工快速审核按钮（悬浮才显现，圆形图标，简洁不挡图） */
.ia-cell .ia-acts { position: absolute; left: 0; right: 0; bottom: 0; display: flex;
  justify-content: center; gap: 5px; padding: 8px 0 7px; border-radius: 0 0 8px 8px;
  background: linear-gradient(to top, rgba(15, 23, 42, .82), rgba(15, 23, 42, 0));
  opacity: 0; transform: translateY(4px); transition: opacity .16s, transform .16s; pointer-events: none; }
.ia-cell:hover .ia-acts { opacity: 1; transform: none; pointer-events: auto; }
.ia-act { width: 26px; height: 26px; border: none; border-radius: 50%; cursor: pointer;
  line-height: 0; color: #fff; background: rgba(255, 255, 255, .22);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, transform .12s; }
.ia-act svg { display: block; }
.ia-act:hover { transform: scale(1.15); }
/* 图片审核：多选批量工具栏 + 复选框 + 编号角标 + 选中态 */
.ia-batchbar { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 13px; }
.ia-chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text); }
.ia-chk input, .ia-cellck input { cursor: pointer; margin: 0; accent-color: var(--primary); }
.ia-bbtn { display: inline-flex; align-items: center; gap: 5px; }
.ia-bbtn svg { display: block; }
.ia-idx { position: absolute; top: 4px; left: 4px; background: rgba(15, 23, 42, .72);
  color: #fff; font-size: 11px; padding: 0 6px; border-radius: 8px; }
.ia-cellck { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255, 255, 255, .9); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .22); }
.ia-cell.sel img { outline: 3px solid var(--primary); outline-offset: -1px; }
/* 图片审核：产品图 / SKU 图 分区标题（占满一行强制换行） */
.ia-group { flex-basis: 100%; width: 100%; font-size: 13px; font-weight: 600; color: var(--text);
  padding: 4px 2px; margin-top: 2px; border-left: 3px solid var(--primary); padding-left: 8px; }
.ia-group .ia-gcount { color: var(--primary); }
.ia-group:not(:first-child) { margin-top: 8px; }
.ia-act-view:hover { background: var(--primary); }
.ia-act-ok:hover { background: #16a34a; }
.ia-act-bad:hover { background: #dc2626; }
.ia-act-del:hover { background: #dc2626; }

/* 图片审核大图查看器：翻页 + 审核/删除 */
.ia-lb { position: fixed; inset: 0; z-index: 500; background: rgba(8, 12, 20, .9);
  display: flex; align-items: center; justify-content: center; }
.ia-lb-close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 26px;
  cursor: pointer; opacity: .85; line-height: 1; }
.ia-lb-close:hover { opacity: 1; }
.ia-lb-stage { max-width: 78vw; max-height: 78vh; display: flex; align-items: center; justify-content: center; }
.ia-lb-img { max-width: 78vw; max-height: 78vh; object-fit: contain; border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #fff; }
.ia-lb-nav { background: rgba(255, 255, 255, .12); color: #fff; border: none; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; margin: 0 22px;
  display: inline-flex; align-items: center; justify-content: center; transition: background .12s; flex: none; }
.ia-lb-nav:hover { background: rgba(255, 255, 255, .28); }
.ia-lb-bar { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; min-width: 480px; max-width: 90vw;
  background: rgba(20, 26, 38, .92); border: 1px solid rgba(255, 255, 255, .12);
  padding: 10px 16px; border-radius: 12px; color: #fff; }
.ia-lb-count { font-size: 13px; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.ia-lb-btn { border: none; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .14); transition: background .12s;
  display: inline-flex; align-items: center; gap: 6px; }
.ia-lb-btn svg { display: block; }
.ia-lb-btn:hover { background: rgba(255, 255, 255, .26); }
.ia-lb-pass:hover { background: #16a34a; }
.ia-lb-fail:hover { background: #dc2626; }
.ia-lb-del:hover { background: #b91c1c; }
.cl-title { font-size: 13px; line-height: 1.4; margin-bottom: 4px; }

/* ===== 我的授权页（左平台栏 + 右表格）===== */
.auth-wrap { display: flex; gap: 16px; align-items: flex-start; }
.auth-rail {
  width: 132px; flex-shrink: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.auth-rail-item {
  height: 56px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border); cursor: pointer; position: relative;
  border-left: 3px solid transparent;
}
.auth-rail-item img { max-width: 80%; max-height: 30px; object-fit: contain; }
.auth-rail-item span { font-size: 12px; color: var(--text-light); }
.auth-rail-item:hover { background: #f8fafc; }
.auth-rail-item.active { background: #eff8f5; border-left-color: var(--pf-green); }
.auth-rail-item.disabled { opacity: .5; }
.auth-rail-item.disabled:hover { background: #fff; }
.auth-main { flex: 1; min-width: 0; }
.auth-crumb { color: var(--text-light); font-size: 13px; margin-bottom: 12px; }
.auth-tbl { white-space: nowrap; font-size: 13px; }
.auth-tbl th, .auth-tbl td { padding: 9px 12px; }
.lnk { color: var(--primary); cursor: pointer; margin-right: 8px; font-size: 13px; }
.lnk:hover { text-decoration: underline; }
.lnk-del { color: var(--danger); }

/* 产品状态标签页 */
.status-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.status-tab {
  display: flex; align-items: center; gap: 6px; padding: 9px 16px; cursor: pointer;
  color: var(--text-light); border-bottom: 2px solid transparent; font-size: 14px;
  margin-bottom: -1px;
}
.status-tab:hover { color: var(--text); }
.status-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-count {
  background: #e2e8f0; color: var(--text-light); border-radius: 10px;
  padding: 0 8px; font-size: 12px; min-width: 20px; text-align: center;
}
.status-tab.active .tab-count { background: var(--primary); color: #fff; }

/* 新增状态标签配色 */
.tag-modified { background: #dbeafe; color: #1d4ed8; }
.tag-generated { background: #dcfce7; color: #15803d; }

/* AI 审核状态标签 */
.tag-ai-none { background: #f1f5f9; color: #64748b; }
.tag-ai-running { background: #fef3c7; color: #b45309; }
.tag-ai-ok { background: #dcfce7; color: #15803d; }
.tag-ai-fail { background: #fee2e2; color: #b91c1c; }
.tag-ai-unknown { background: #fef3c7; color: #b45309; }
/* 规格值超乐天32字节上限：规格表头旁的红色警示标 */
.rk-sku-long { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px;
  line-height: 16px; background: #fee2e2; color: #b91c1c; border-radius: 4px;
  font-weight: 600; white-space: nowrap; vertical-align: middle; }

/* ---------- 库存管理：行内编辑控件（统一系统风格） ---------- */
.inv-tbl td { vertical-align: middle; }
.inv-tbl .inv-edit {
  height: 32px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 10px; font-size: 13px; background: #fff; color: var(--text);
  outline: none; width: 100%; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.inv-tbl .inv-edit:hover { border-color: #b9c4d4; }
.inv-tbl .inv-edit:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); background: #fff;
}
.inv-tbl .inv-edit::placeholder { color: #c3cbd6; }
/* 数字输入去掉原生上下箭头 */
.inv-tbl input[type=number].inv-edit { -moz-appearance: textfield; appearance: textfield; }
.inv-tbl input[type=number].inv-edit::-webkit-outer-spin-button,
.inv-tbl input[type=number].inv-edit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* 状态椭圆标签（与产品管理同款 .tag）：可点击弹菜单改状态。
   字重跟随系统 .tag（不加粗），保持与产品管理列表一致 */
.inv-tbl .inv-st-tag { cursor: pointer; user-select: none; display: inline-block; }
.inv-tbl .inv-st-tag:hover { filter: brightness(.95); }
.inv-tbl .inv-st-menu .dropdown-item { padding: 7px 14px; font-size: 13px; cursor: pointer; }
.inv-tbl .inv-st-menu .dropdown-item:hover { background: #f1f5f9; }
/* 保存成功：控件绿色轻闪（替代每格弹 toast） */
.inv-tbl .inv-saved { border-color: #16a34a !important; box-shadow: 0 0 0 2px rgba(22, 163, 74, .18) !important; }
/* 价差（亚马逊现价 − 采集价）：涨=红 跌=绿，跟在价格状态标签下方 */
.inv-diff { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--text-light);
  white-space: nowrap; line-height: 1.3; }
.inv-diff.diff-up, b.diff-up { color: #b91c1c; }      /* 涨价：采购成本上升 */
.inv-diff.diff-down, b.diff-down { color: #15803d; }  /* 降价：采购成本下降 */
.inv-diff-pct { margin-left: 4px; font-weight: 400; opacity: .8; }
/* Keepa 查询守卫面板（在查询库存对话框的 Keepa 标签页里） */
.kg-box { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; }
.kg-head { display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.kg-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.kg-grid label { display: inline-flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--text-light); }
.kg-grid input { width: 96px; }
.kg-run { margin-top: 10px; font-size: 12px; line-height: 1.7;
  padding-top: 8px; border-top: 1px dashed var(--border); }
/* 全量 token 勾选块（同认领弹窗的 claim-opt 风格） */
.kg-full { display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.kg-full:hover { border-color: #b9c4d4; }
.kg-full:has(input:checked) { border-color: var(--primary); background: #eff6ff; }
.kg-full input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex: 0 0 auto; }
.kg-full > span { display: flex; flex-direction: column; line-height: 1.5; }
.kg-full b { font-size: 13px; color: var(--text); }
.kg-full i { font-size: 12px; color: var(--text-light); font-style: normal; }
/* 卖家/评分列：评分小字 */
.inv-rate { margin-top: 3px; font-size: 12px; color: var(--text-light); white-space: nowrap; }
/* 「行情」列的小标签：排名/出单/竞争/缺货率 */
.inv-chip { display: inline-block; padding: 1px 6px; margin: 1px 0; font-size: 11px;
  line-height: 16px; border-radius: 4px; background: #f1f5f9; color: #475569;
  white-space: nowrap; }
.inv-chip.chip-ok { background: #dcfce7; color: #15803d; }
.inv-chip.chip-warn { background: #fee2e2; color: #b91c1c; }
/* 详情弹窗里的字段表 */
.inv-dtl td { padding: 7px 10px; font-size: 13px; border-bottom: 1px solid #f1f5f9; }
.inv-dtl tr:last-child td { border-bottom: none; }
/* 无主图占位 */
.inv-noimg { width: 52px; height: 52px; border-radius: 8px; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center; color: #c3cbd6; font-size: 20px; }

/* 多选列 */
.col-check { width: 36px; text-align: center; }
.col-check input { width: 16px; height: 16px; cursor: pointer; }

/* 顶部 AI 审核进度徽标 */
.ai-badge {
  background: var(--primary); color: #fff; padding: 4px 12px; border-radius: 14px;
  font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  animation: ai-pulse 1.4s ease-in-out infinite; cursor: pointer;
}
@keyframes ai-pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* ===== 任务进度抽屉 ===== */
.task-drawer-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 400;
}
.task-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 400px; max-width: 92vw;
  background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.18); z-index: 401;
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.task-drawer.open { transform: translateX(0); }
.task-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 16px;
}
.task-head-actions { display: flex; align-items: center; gap: 8px; }
#task-clear-done { font-weight: 500; white-space: nowrap; }
.task-list { flex: 1; overflow-y: auto; padding: 14px 16px; }
.task-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.task-item-top { display: flex; align-items: center; gap: 8px; }
.task-item-top .task-title { flex: 1; }
.task-del {
  width: 22px; height: 22px; flex-shrink: 0; border: none; background: transparent;
  color: var(--text-light); border-radius: 5px; cursor: pointer; font-size: 13px; line-height: 1;
}
.task-del:hover { background: #fee2e2; color: var(--danger); }
.task-title { font-weight: 600; font-size: 14px; }
.task-status { font-size: 12px; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.task-status.ts-queue {
  background: #eef2f7; color: #64748b; border: 1px solid #cbd5e1;
  animation: queue-pulse 1.6s ease-in-out infinite;
}
@keyframes queue-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.task-status.ts-run { background: #fef3c7; color: #b45309; }
.task-progress-bar.bar-queued {
  background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 6px, #e2e8f0 6px, #e2e8f0 12px);
}
.task-status.ts-done { background: #dcfce7; color: #15803d; }
.task-status.ts-int { background: #f1f5f9; color: #64748b; }
.task-meta { font-size: 12px; color: var(--text-light); margin: 6px 0 8px; }
.task-progress { height: 8px; background: #eef2f7; border-radius: 5px; overflow: hidden; }
.task-progress-bar { height: 100%; border-radius: 5px; transition: width .4s; }
.task-progress-bar.bar-running { background: var(--primary); }
.task-progress-bar.bar-completed { background: var(--success); }
.task-progress-bar.bar-interrupted { background: #94a3b8; }
.task-nums { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.task-fail { color: var(--danger); }
.task-item { cursor: pointer; }
.task-item:hover { border-color: var(--primary); }
.task-toggle { float: right; color: var(--primary); }
.task-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.task-detail-row { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.task-errs { margin-top: 8px; }
.task-errs-title { font-size: 13px; font-weight: 600; color: var(--danger); margin-bottom: 6px; }
.task-err {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px;
  padding: 7px 10px; margin-bottom: 6px;
}
.task-err-head { font-size: 13px; color: var(--text); }
.task-err-id { color: var(--text-light); font-size: 12px; }
.task-err-reason { font-size: 12px; color: #b91c1c; margin-top: 3px; }

/* 表格内时间小字 */
.cell-time { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* 生成上传表：类目搜索下拉 */
.g-cat-list {
  border: 1px solid var(--border); border-radius: 6px; margin-top: 4px;
  max-height: 220px; overflow-y: auto; background: #fff;
}
.g-cat-item { padding: 8px 10px; cursor: pointer; font-size: 13px; }
.g-cat-item:hover { background: #eff6ff; }

/* 价格公式试算 */
.pf-preview {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.pf-preview input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }

/* 下拉菜单（一键AI审核选模型）*/
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 4px; z-index: 50;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); min-width: 150px; padding: 4px;
}
.dropdown-head { font-size: 12px; color: var(--text-light); padding: 6px 10px; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 6px; }
.dropdown-item {
  padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; gap: 9px;
}
.dropdown-item:hover { background: #eff6ff; color: var(--primary); }
.model-ic { flex-shrink: 0; display: block; }

/* AI 模型配置页 */
.cfg-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cfg-tab {
  display: flex; align-items: center; gap: 7px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 14px;
}
.cfg-tab:hover { border-color: var(--primary); }
.cfg-tab.active { border-color: var(--primary); background: #eff6ff; color: var(--primary); font-weight: 600; }
.cfg-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.cfg-dot.ok { background: var(--success); }
.cfg-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.cfg-tab.active .cfg-count { background: var(--primary-dark); }

/* 可排序表头 */
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--primary); }
.th-sort .sort-arrow { font-size: 11px; color: var(--primary); margin-left: 2px; }

/* 小按钮（标题旁 Gemini 等）*/
.btn-mini {
  font-size: 12px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: #fff; color: var(--primary); margin-left: 8px; vertical-align: middle;
}
.btn-mini:hover { background: #eff6ff; border-color: var(--primary); }
.btn-mini:disabled { opacity: .55; cursor: not-allowed; }

/* Gemini 结果面板 */
.gemini-box { margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.gemini-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-light);
}
.gemini-head .btn-mini { margin-left: 0; }
.gemini-box textarea {
  width: 100%; border: none; outline: none; padding: 12px; resize: vertical;
  font-family: "Consolas", "Microsoft YaHei", monospace; font-size: 13px; line-height: 1.6;
  box-sizing: border-box; display: block;
}

/* 编辑框审计信息条 */
.audit-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 16px; padding: 12px 14px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}

/* ===== 产品编辑弹窗（固定头尾 + 滚动主体）===== */
.modal-edit {
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  width: min(880px, 94vw); max-height: 90vh;
}
.modal-edit .modal-head {
  margin: 0; padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: #fff; flex-shrink: 0;
}
.modal-edit .modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.modal-edit .modal-foot {
  margin: 0; padding: 14px 24px; border-top: 1px solid var(--border);
  background: #fafbfc; flex-shrink: 0;
}
.form-section { margin-bottom: 22px; }
.section-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}
.section-title .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }

/* 图片管理器 */
.imgmgr { display: flex; flex-direction: column; gap: 8px; }
.imgmgr-body { display: flex; flex-direction: column; gap: 8px; }
.imgmgr-group-head {
  font-size: 13px; font-weight: 600; padding: 2px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.imgmgr-group-head .im-purge {
  background: var(--danger); color: #fff; border: none; border-radius: 5px;
  padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.imgmgr-group-head .im-purge:hover { background: #b91c1c; }
.imgmgr-group-head.bad { color: var(--danger); }
.imgmgr-group-head.good { color: var(--success); }
.imgmgr-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 10px; background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px;
  min-height: 70px;
}
.imgmgr-empty { color: var(--text-light); font-size: 13px; padding: 16px; align-self: center; }
.imgmgr-item {
  position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: #fff; cursor: grab;
  transition: transform .12s, box-shadow .12s;
}
.imgmgr-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,.18); transform: translateY(-2px); }
.imgmgr-item.dragging { opacity: .4; }
.imgmgr-item img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.imgmgr-item img.broken { opacity: .25; }
.imgmgr-item.img-bad { border: 2px solid var(--danger); }
.imgmgr-item.img-unknown { border: 2px solid #d97706; }
.img-warn {
  position: absolute; left: 0; bottom: 0; right: 0; background: rgba(220,38,38,.92);
  color: #fff; font-size: 11px; text-align: center; padding: 2px 0; cursor: help;
}
.img-warn-unknown { background: rgba(217,119,6,.92); }
.img-warn-manual { background: rgba(22,163,74,.92); }   /* 人工审核为正常 */

/* 口令配置文本域：铺满卡片、等宽字体便于看格式 */
#ai-prompts textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px; resize: vertical;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12px; line-height: 1.6; color: var(--text);
}
#ai-prompts textarea:focus { border-color: var(--primary); outline: none; }

/* 通用富文本编辑器（详情图/图文描述） */
.rich-ed { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.rich-ed-bar {
  display: flex; align-items: center; gap: 4px; padding: 6px 8px;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.rich-ed-bar button {
  border: 1px solid transparent; background: transparent; border-radius: 4px;
  padding: 4px 8px; cursor: pointer; font-size: 13px; color: var(--text);
}
.rich-ed-bar button:hover { background: #fff; border-color: var(--border); }
.rich-ed-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.rich-ed-count { font-size: 12px; }
.rich-ed-body {
  min-height: 240px; max-height: 480px; overflow: auto;
  padding: 12px 14px; outline: none; font-size: 13px; line-height: 1.7;
}
.rich-ed-body img { max-width: 100%; display: block; margin: 6px 0; border-radius: 4px; cursor: zoom-in; }

/* 禁用输入：灰底提示不可编辑 */
.field input:disabled { background: var(--bg); color: var(--text-light); cursor: not-allowed; }
/* 货源URL + 访问按钮 */
.url-row { display: flex; gap: 8px; align-items: center; }
.url-row input { flex: 1; }
.url-row button { flex: none; white-space: nowrap; }

/* SKU 行图片：缩略图 + 悬停放大/更换/删除 */
.sk-img-wrap { position: relative; width: 48px; height: 48px; }
.sk-img-wrap img {
  width: 48px; height: 48px; object-fit: cover; border-radius: 5px;
  border: 1px solid var(--border); cursor: zoom-in; display: block;
}
.sk-img-acts {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex;
  justify-content: center; gap: 5px; padding: 2px 0;
  background: rgba(15, 23, 42, .72); border-radius: 0 0 5px 5px;
  opacity: 0; transition: opacity .12s;
}
.sk-img-wrap:hover .sk-img-acts { opacity: 1; }
.sk-img-acts span { cursor: pointer; font-size: 11px; color: #fff; line-height: 1.2; }
.sk-img-acts span:hover { transform: scale(1.2); }
.sk-img-add {
  width: 48px; height: 48px; border: 1px dashed var(--border); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); cursor: pointer; font-size: 18px; background: var(--bg);
}
.sk-img-add:hover { border-color: var(--primary); color: var(--primary); }

/* 采集筛选区：标签行式布局 */
.cl-filter { padding: 14px 18px; }
.cl-filter .cl-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.cl-filter .cl-frow + .cl-frow { border-top: 1px dashed #f1f5f9; }
.cl-flbl { width: 78px; text-align: right; color: var(--text-light); font-size: 13px; flex: none; }
.cl-filter select, .cl-filter input:not([type="checkbox"]) {
  height: 34px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 10px; font-size: 13px; background: #fff; color: var(--text);
}
.cl-filter select {
  appearance: none; -webkit-appearance: none; padding-right: 30px;
  background: #fff 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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.cl-filter select:focus, .cl-filter input:focus { border-color: var(--primary); outline: none; }
.cl-selwrap { position: relative; display: inline-flex; align-items: center; }
.cl-selwrap select { min-width: 160px; padding-right: 32px; }
.cl-clear {
  position: absolute; right: 26px; cursor: pointer; display: none;
  color: var(--text-light); font-style: normal; font-weight: 400; font-size: 14px; line-height: 1;
}
.cl-selwrap.has .cl-clear { display: inline; }
.cl-clear:hover { color: var(--danger); }
.cl-drange { width: 220px; cursor: pointer; }
.cl-drange::placeholder { color: #9ca3af; }

/* 日期范围选择弹层（双月日历） */
.drp-pop {
  position: absolute; z-index: 3000; background: #fff; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
}
.drp-body { display: flex; gap: 18px; }
.drp-panel { width: 226px; }
.drp-head { display: flex; align-items: center; padding: 2px 2px 8px; font-size: 13px; }
.drp-head b { flex: 1; text-align: center; font-weight: 600; color: var(--text); }
.drp-nav { cursor: pointer; color: var(--text-light); padding: 0 5px; font-size: 14px; user-select: none; }
.drp-nav:hover { color: var(--primary); }
.drp-week, .drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.drp-week span { text-align: center; font-size: 12px; color: var(--text-light); padding: 4px 0 6px; }
.drp-day {
  text-align: center; font-size: 12px; padding: 7px 0; cursor: pointer;
  border-radius: 5px; color: var(--text); user-select: none;
}
.drp-day:hover { background: var(--bg); }
.drp-day.out { color: #cbd5e1; }
.drp-day.mid { background: #dbeafe; border-radius: 0; }
.drp-day.edge { background: var(--primary); color: #fff; font-weight: 600; }
.drp-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px;
}
.cl-quick { display: inline-flex; gap: 2px; flex-wrap: wrap; margin-left: 2px; }
.cl-quick a {
  color: var(--primary); cursor: pointer; font-size: 12px;
  padding: 4px 9px; border-radius: 999px; line-height: 1; transition: all .12s;
}
.cl-quick a:hover { background: rgba(37, 99, 235, .08); }
.cl-quick a.on { background: var(--primary); color: #fff; font-weight: 600; }

/* 价格策略：筛选胶囊 + 橙色按钮 */
.ps-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ps-pill {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 13px; color: var(--text); cursor: pointer; background: #fff;
  transition: all .12s;
}
.ps-pill:hover { border-color: var(--primary); color: var(--primary); }
.ps-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-warn {
  background: #ff7043; color: #fff; border: none; border-radius: 6px;
  padding: 7px 14px; cursor: pointer; font-size: 13px;
}
.btn-warn:hover { background: #f4511e; }
.btn-success {
  background: #22a54b; color: #fff; border: none; border-radius: 6px;
  padding: 8px 18px; cursor: pointer; font-size: 13px;
}
.btn-success:hover { background: #1b8a3e; }

/* 乐天平台类目树选择器 */
.gp-pop {
  position: fixed; z-index: 4000; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
  padding: 10px; max-height: 460px; display: flex; flex-direction: column;
}
.gp-q {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 10px; font-size: 13px; margin-bottom: 8px;
}
.gp-q:focus { border-color: var(--primary); outline: none; }
.gp-acts { display: flex; gap: 14px; padding: 0 2px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.gp-tree, .gp-res { overflow-y: auto; flex: 1 1 auto; min-height: 60px; padding-top: 6px; }
.gp-q, .gp-acts { flex: none; }
.gp-row { display: flex; align-items: center; gap: 7px; padding: 4px 6px; font-size: 13px; }
.gp-row:hover { background: #eff6ff; }
.gp-tg {
  width: 16px; height: 16px; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border-radius: 3px; font-size: 11px;
  cursor: pointer; line-height: 1; user-select: none;
}
.gp-tg.gp-leaf { background: transparent; color: var(--text-light); cursor: default; }
.gp-lb { cursor: pointer; color: var(--text); }
.gp-lb:hover { color: var(--primary); }
.gp-lb.gp-hit { background: #dbeafe; border-radius: 3px; }
.gp-flat { cursor: pointer; }
/* ManoMano 订单表：一行一张「信息卡」——采购要看的东西（图/SKU/ASIN/成本/地址/时效）
   一次给全，不用点进详情。参考斑马订单页的信息密度做法。 */
/* 必须锁死列宽：商品标题很长且不换行，自适应布局会被它撑爆，
   把右边的金额/时间列直接挤出视口 */
.mo-tbl { table-layout: fixed; }
.mo-tbl td { padding: 10px 8px; vertical-align: top; overflow: hidden; }
/* 表头与单元格必须同一个左内边距，否则整列表头与内容错开 */
.mo-tbl th { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
/* 左侧操作列：竖排链接 */
.mo-tbl .mo-ops { line-height: 1.9; }
.mo-tbl .mo-ops .lnk { display: block; white-space: nowrap; cursor: pointer; }
/* 「标签：值」成对排版。标签一律左对齐 + 全表统一定宽：
   左对齐才能和列表头文字起点重合，统一宽度才能让各列的值起点也在同一条竖线上。
   （曾用右对齐 + 每列不同 flex-basis，结果每列表头与内容错位量都不一样） */
.mo-tbl .mo-kv > div { display: flex; gap: 6px; line-height: 1.85; font-size: 12px;
  white-space: nowrap; }
.mo-tbl .mo-kv > div > span:first-child { color: var(--text-light); flex: 0 0 32px;
  text-align: left; }
.mo-tbl .mo-mini { font-size: 11px; font-style: normal; padding: 0 5px; margin-left: 4px; }
/* 商品行 */
.mo-tbl .mo-line { min-width: 0; }
.mo-tbl .mo-line + .mo-line { margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border); }
.mo-tbl .mo-ttl2 { font-size: 13px; color: var(--text); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-tbl .mo-kv2 { font-size: 12px; line-height: 1.75; white-space: normal; }  /* 数量后面挂邮件状态，窄屏允许折行 */
.mo-tbl .mo-kv2 > span { color: var(--text-light); margin-right: 4px; }
.mo-tbl .mo-qty2 { color: var(--primary); }
/* 已发货订单在明细区底部挂一条物流信息（平台不回传运单号，只能看我们自己存的） */
.mo-tbl .mo-track { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-tbl .mo-track > span { color: var(--text-light); margin-right: 4px; }

/* ---------- 发货弹窗 ---------- */
/* 顶部摘要：发货最该先看的三件事（等了多久 / 什么时候下的 / 多少钱） */
.sh-sum { display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; }
.sh-sum > span > i { color: var(--text-light); font-style: normal; margin-right: 5px; }
.sh-sum > span > b { font-size: 15px; }
.sh-sum > span > b.pos { color: #15803d; }
.sh-sum > span > b.neg { color: var(--danger); }
.sh-sum > span > em { color: var(--text-light); font-style: normal; font-size: 11px; margin-left: 6px; }
.mpl-num, .inv-tbl th.num, .inv-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mpl-tbl { min-width: 1320px; }
.mpl-status-cell { min-width: 122px; white-space: nowrap; }
.mpl-status-cell .tag { white-space: nowrap; }
.mpl-flags-cell { min-width: 168px; white-space: nowrap; }
.mpl-flags-cell .tag { white-space: nowrap; margin-right: 4px; }
/* 收货地址：发货前核对的依据，做成可一键复制 */
.sh-addr { font-size: 13px; line-height: 1.75; }
.sh-addr .sh-name { font-weight: 600; }
/* 商品标题用省略号收尾，不做硬截断——截断会把词砍成半个 */
.sh-ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.sh-req { color: var(--danger); margin-left: 2px; }
/* 下面这套 .sh-* 由「发货」「退款」两个弹窗共用 */
/* 左标签 + 右内容一行式排版：控件按需给宽，右边不留大片空白 */
.sh-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.sh-row + .sh-row { border-top: 1px dashed #f1f5f9; }
.sh-row > label { width: 60px; flex: none; text-align: right;
  color: var(--text-light); font-size: 13px; }
.sh-row.sh-top { align-items: flex-start; }
.sh-row.sh-top > label { padding-top: 9px; }
/* 收货地址压成一行，超长用省略号，完整内容看 title / 点复制 */
.sh-addr { flex: 1; min-width: 0; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-addr .sh-name { font-weight: 600; }
.sh-addr .sh-sep { color: var(--border); margin: 0 7px; }
/* 控件外观对齐 .rk-editor 那套（全站"好看的弹窗控件"标准） */
.sh-form input, .sh-form select {
  height: 34px; box-sizing: border-box; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
  font-size: 13px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.sh-form input:hover, .sh-form select:hover { border-color: #b9c4d4; }
.sh-form input:focus, .sh-form select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
/* 原生下拉箭头在 Windows 上又大又灰，换成自绘的细箭头 */
.sh-form select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8 9.5 4.5' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  background-size: 11px; }
.sh-form select::-ms-expand { display: none; }
/* 退款数量输入：窄框居中，跟表格里的数量列对齐 */
.sh-form .sh-qty { width: 62px; text-align: center; padding: 0 6px; }
/* 订单操作记录时间线：一条竖轴串起「同步创建 → 状态变更 → 人工操作」 */
.mo-log { position: relative; padding-left: 16px; font-size: 12px; line-height: 1.7; }
.mo-log::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border); }
.mo-log-i { position: relative; padding: 5px 0; }
.mo-log-i + .mo-log-i { border-top: 1px dashed #f4f6f9; }
/* 圆点按结果染色：绿=成功 红=失败 橙=被拦下 灰=系统事件 */
.mo-log-i::before { content: ""; position: absolute; left: -15px; top: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--border);
  box-shadow: 0 0 0 2px #fff; }
.mo-log-i.is-ok::before { background: #15803d; }
.mo-log-i.is-failed::before { background: var(--danger); }
.mo-log-i.is-skipped::before { background: #b45309; }
.mo-log-t { color: var(--text-light); margin-right: 8px; }
.mo-log-who { color: var(--primary); font-weight: 600; margin-right: 8px; }
.mo-log-sys { color: var(--text-light); margin-right: 8px; }
.mo-log-d { color: var(--text-light); margin-top: 2px; word-break: break-all; }
/* 弹窗内的分区标题：与全站 .sf-lbl 一致（标题在内容上方、13px 弱色），
   表格类内容用它，别塞进左标签的行式布局里——小标签配大表格很别扭 */
.pu-sec { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-light); margin: 16px 0 7px; }
.pu-sec > b { color: var(--text); font-weight: 600; }
.pu-sec .pu-sec-x { margin-left: auto; }
/* 分区里的表格拉满宽，不再被左标签挤掉 70px */
.pu-sec + table { width: 100%; }
/* 采购进度条：拆单采购最容易漏掉后半截，把"还差几件"做得显眼 */
.pu-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pu-prog .pu-bar { flex: 1; height: 8px; border-radius: 4px; background: #eef1f6;
  overflow: hidden; min-width: 90px; max-width: 220px; }
.pu-prog .pu-bar > i { display: block; height: 100%; background: #15803d; }
.pu-prog.is-left .pu-bar > i { background: #b45309; }
.pu-prog .pu-left { color: #b45309; font-weight: 600; }
.pu-prog .pu-done { color: #15803d; font-weight: 600; }
/* 采购勾选：整行可点，勾中高亮，比逐个填数量直观 */
.pu-pick { display: flex; align-items: center; gap: 8px; padding: 6px 9px;
  border: 1px solid var(--border); border-radius: 7px; margin-bottom: 6px;
  cursor: pointer; font-size: 13px; transition: border-color .15s, background .15s; }
.pu-pick:hover { border-color: #b9c4d4; }
.pu-pick input { width: 15px; height: 15px; flex: none; accent-color: var(--primary);
  cursor: pointer; }
.pu-pick:has(input:checked) { border-color: var(--primary);
  background: rgba(37, 99, 235, .06); }
.pu-pick .pu-sku { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.pu-pick .pu-qty { color: var(--text-light); font-size: 12px; flex: none; }
/* 已登记的采购明细行 */
.pu-list { width: 100%; font-size: 12.5px; }
.pu-list td, .pu-list th { padding: 6px 8px; }
.pu-list .pu-act { white-space: nowrap; }
.pu-list .pu-act .lnk { margin-right: 6px; }
/* 采购毛利条：赚钱绿、亏本红，一眼能看出来 */
.sh-profit b { font-size: 17px; }
.sh-profit.is-win b { color: #15803d; }
.sh-profit.is-loss b { color: var(--danger); }
.sh-profit .sh-warn { color: var(--danger); font-size: 12px; }
/* 退款金额预估条：钱要显眼，用危险色 */
.sh-money { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sh-money b { font-size: 17px; color: var(--danger); }

/* 中间类目：乐天不给它定义商品属性，选了必然发布失败，所以标灰 + 打标签，不让选 */
.gp-mid > .gp-row > .gp-lb, .gp-flat.gp-mid > .gp-lb { color: var(--text-light); cursor: not-allowed; }
.gp-mid > .gp-row > .gp-lb:hover, .gp-flat.gp-mid > .gp-lb:hover { color: var(--text-light); }
.gp-mid-tag { margin-left: 6px; font-size: 11px; color: #b45309; background: #fef3c7;
  border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.gp-suf { color: var(--text-light); font-size: 12px; margin-left: 6px; }

/* 图片信息板（乐天编辑页） */
.ib-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.ib-card {
  width: 168px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer; user-select: none; position: relative;
  transition: all .12s; overflow: hidden;
}
.ib-card:hover { border-color: var(--primary); }
.ib-card.sel { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
.ib-card.sel::after {
  content: "✓"; position: absolute; right: 6px; top: 6px; width: 20px; height: 20px;
  background: var(--primary); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.ib-imgbox { height: 150px; display: flex; align-items: center; justify-content: center; background: #fff; position: relative; }
.ib-imgbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ib-acts { position: absolute; top: 5px; right: 5px; display: flex; gap: 5px; z-index: 2; }
.ib-act { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); color: #fff; border-radius: 5px; cursor: pointer; font-size: 13px; line-height: 1; }
.ib-act:hover { background: rgba(0, 0, 0, .82); }
.ib-act-del:hover { background: var(--danger); }
.ib-cap {
  text-align: center; font-size: 12px; color: var(--text); padding: 6px 4px;
  border-top: 1px solid #f1f5f9; background: #fafbfc;
}
.ib-cap.main { color: var(--danger); font-weight: 600; }
.ib-dim { margin-left: 2px; }

/* 乐天产品编辑页 / 各类 .rk-editor 对话框 —— 统一美化原生控件 */
.rk-editor input[type="text"],
.rk-editor input[type="number"],
.rk-editor input[type="password"],
.rk-editor input[type="search"],
.rk-editor input[type="date"],
.rk-editor input:not([type]),
.rk-editor select,
.rk-editor textarea {
  height: 36px; box-sizing: border-box; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
  font-size: 13px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rk-editor textarea { height: auto; padding: 8px 12px; line-height: 1.6; }
/* 带字数统计的输入框：右侧给计数留位，避免长标题文字与字数重叠 */
.rk-editor .ed-wrap input:not([type]), .rk-editor .ed-wrap input[type="text"] { padding-right: 74px; }
.rk-editor input:hover, .rk-editor select:hover, .rk-editor textarea:hover { border-color: #b9c4d4; }
.rk-editor input:focus, .rk-editor select:focus, .rk-editor textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.rk-editor input::placeholder, .rk-editor textarea::placeholder { color: #9aa7b8; }
.rk-editor input:disabled, .rk-editor select:disabled {
  background: #f3f5f8; color: #94a3b8; cursor: not-allowed;
}
/* 下拉框自绘箭头 */
.rk-editor select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
/* 变种表 / 规格表内的输入更紧凑 */
.rk-editor .sku-edit input { height: 32px; padding: 0 8px; border-radius: 6px; }
.rk-editor .spec-name, .rk-editor .spec-tags { height: auto; }
.rk-editor .spec-val { height: 28px; border: none !important; box-shadow: none !important; padding: 0 4px; }
.rk-editor .spec-tags:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
/* 富文本编辑器边框统一 */
.rk-editor .rich-ed { border-radius: 7px; }
/* 选择框清除按钮位置微调 */
.rk-editor .cl-selwrap .cl-clear { right: 30px; }

/* 认领推送弹窗 */
.claim-sec { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.claim-sec-title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.claim-lbl { width: 74px; color: var(--text-light); font-size: 13px; }
.claim-plat + .claim-plat { margin-top: 12px; }
.claim-plat-title { font-size: 13px; color: var(--primary); margin-bottom: 8px; }
.claim-shops { display: flex; flex-wrap: wrap; gap: 8px; }

/* 批量运费弹窗 */
.sf-field { margin-bottom: 18px; }
.sf-field .sf-lbl { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.sf-unit {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 12px; pointer-events: none;
}

.th-gen { font-weight: normal; font-size: 12px; margin-top: 2px; }
.th-gen .lnk { font-weight: normal; }
/* SKU 快速生成气泡框 */
.gen-pop {
  position: absolute; z-index: 4000; width: 300px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}
.gen-tip { font-size: 12px; line-height: 1.5; margin-bottom: 10px; }
.gen-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gen-row label { width: 40px; text-align: right; font-size: 13px; color: var(--text); flex: none; }
.gen-row input {
  flex: 1; height: 32px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 13px; outline: none;
}
.gen-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.gen-row input:disabled { background: #f3f5f8; color: #94a3b8; }
.gen-foot { text-align: right; }

.ed-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.ed-lbl { width: 132px; text-align: right; color: var(--text); font-size: 13px; flex: none; }
.ed-lbl i { color: var(--danger); font-style: normal; margin-right: 2px; }
.ed-wrap { position: relative; flex: 1; max-width: 860px; display: flex; align-items: center; }
.ed-wrap input { width: 100%; padding-right: 66px; }
.ed-cnt {
  position: absolute; right: 10px; font-size: 12px; color: var(--text-light);
  pointer-events: none;
}
.ed-radio {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 20px;
  cursor: pointer; font-size: 13px; font-weight: 400; user-select: none;
}
.ed-radio input { display: none; }
.ed-radio i {
  width: 17px; height: 17px; border-radius: 50%; border: 1px solid #cbd5e1;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; color: #fff; transition: all .12s; flex: none;
}
.ed-radio input:checked + i { background: var(--primary); border-color: var(--primary); }
.ed-radio input:checked + i::before { content: "✓"; }
/* 带 是/否 文案的开关 */
.switch.sw-lab { width: 52px; }
.switch.sw-lab .slider::after {
  content: "否"; position: absolute; right: 8px; top: 4px;
  font-size: 11px; color: #64748b; line-height: 1.4;
}
.switch.sw-lab input:checked + .slider::before { transform: translateX(28px); }
.switch.sw-lab input:checked + .slider::after { content: "是"; left: 9px; right: auto; color: #fff; }

/* 乐天产品库：变种嵌套表 */
.rk-sku { width: 100%; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }
.rk-sku th, .rk-sku td {
  padding: 5px 8px; border-bottom: 1px solid #f1f5f9; text-align: left; white-space: nowrap;
}
.rk-sku thead th { background: var(--bg); color: var(--text-light); font-weight: 500; }
.rk-sku tbody tr:last-child td { border-bottom: none; }
/* 列表变种单元格：表头顶格无空隙，表格拉伸填满行高 */
.rk-vcell { padding: 0 !important; height: 1px; vertical-align: top; }
.rk-vwrap { height: 100%; display: flex; flex-direction: column; }
.rk-vwrap .rk-sku { flex: 1; width: 100%; border: none; border-radius: 0; border-bottom: 1px solid #f1f5f9; table-layout: fixed; }
.rk-vwrap .rk-sku th, .rk-vwrap .rk-sku td {
  padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rk-vlinks { padding: 6px 10px; }

/* 美化下拉框（自绘箭头） */
.sel-nice {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 28px 7px 10px; font-size: 12.5px; color: var(--text);
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.sel-nice:hover { border-color: var(--primary); }
.sel-nice:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.sel-nice:disabled { background-color: var(--bg); cursor: not-allowed; opacity: .7; }

/* 公式点选面板 */
.fpad {
  position: fixed; z-index: 4000; width: 460px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
}
.fpad-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.fpad-lbl { width: 58px; text-align: right; font-size: 13px; color: var(--text); flex: none; padding-top: 4px; }
.fpad-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.fpad-btn {
  background: #fff; border: 1px solid #8ab8f8; color: var(--text);
  border-radius: 4px; padding: 4px 9px; font-size: 12px; cursor: pointer;
  line-height: 1.4; transition: all .12s;
}
.fpad-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.fpad-tip { font-size: 12px; color: var(--text-light); border-top: 1px dashed var(--border); padding-top: 8px; }
.fpad-tip b { color: var(--text); }

/* 采集列表：操作竖排 + 图片缩略图 */
.cl-acts { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.cl-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); cursor: zoom-in; display: block;
}
.cl-noimg {
  width: 64px; height: 64px; border-radius: 6px; border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-light); background: var(--bg);
}

/* 产品库图片下的三个设置状态（图片目录/运费/交货日期） */
.rk-stwrap { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; width: 64px; }
.rk-st {
  display: inline-flex; align-items: center; gap: 2px; justify-content: center;
  font-size: 11px; line-height: 1.5; padding: 1px 4px; border-radius: 4px;
  border: 1px solid transparent; white-space: nowrap;
}
.rk-st.on { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.rk-st.off { color: #9ca3af; background: #f9fafb; border-color: var(--border); }

/* 规格编辑器（规格项 + 规格值标签） */
.spec-editor input { width: auto; box-sizing: border-box; }
.spec-head { font-size: 12px; color: var(--text-light); margin-bottom: 8px; display: flex; }
.spec-head .spec-hcol { width: 108px; }
.spec-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.spec-name {
  width: 100px; flex: none; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
}
.spec-name:focus { border-color: var(--primary); outline: none; }
.spec-colon { color: var(--text-light); }
.spec-tags {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 40px; padding: 5px 8px; background: #fff;
  border: 1px solid var(--border); border-radius: 6px;
}
.spec-tags:focus-within { border-color: var(--primary); }
.spec-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 8px; font-size: 12px; color: var(--text);
}
.spec-tag b { cursor: pointer; color: var(--text-light); font-weight: 400; font-size: 13px; }
.spec-tag b:hover { color: var(--danger); }
.spec-tag-edit { background: transparent; border: none; padding: 0; gap: 3px; }
.spec-vedit { border: 1px solid var(--border); border-radius: 4px; background: #fff; font-size: 13px; color: var(--text); padding: 4px 8px; }
.spec-vedit.over { border-color: var(--danger); background: #fff5f5; color: var(--danger); font-weight: 600; box-shadow: 0 0 0 2px rgba(239, 68, 68, .3); }
.spec-vedit.over:focus { box-shadow: 0 0 0 2px rgba(239, 68, 68, .45); }
.spec-stat { margin: 8px 0 2px; font-size: 13px; color: var(--text-light); }
.spec-stat.over { color: var(--danger); font-weight: 600; }
.spec-vedit:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); outline: none; }
.spec-val { flex: 1; min-width: 130px; border: none !important; outline: none; padding: 5px 4px; font-size: 13px; background: transparent; }
.spec-row .spec-clear, .spec-row .spec-remove { flex: none; font-size: 13px; }
.spec-actions { display: flex; align-items: center; gap: 12px; margin: 6px 0 8px; }
.spec-tip { font-size: 12px; line-height: 1.6; }
.imgmgr-badge {
  position: absolute; left: 4px; top: 4px; background: rgba(37,99,235,.9); color: #fff;
  font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 10px;
}
.imgmgr-acts {
  position: absolute; top: 4px; right: 4px; display: flex; gap: 4px;
  opacity: 0; transition: opacity .12s;
}
.imgmgr-item:hover .imgmgr-acts { opacity: 1; }
.imgmgr-acts button {
  width: 24px; height: 24px; border: none; border-radius: 5px; font-size: 12px;
  background: rgba(15,23,42,.78); color: #fff; display: flex; align-items: center; justify-content: center;
}
.imgmgr-acts button.im-del:hover { background: var(--danger); }
.imgmgr-acts button.im-zoom:hover { background: var(--primary); }
/* 违规图「审为正常」：悬停时从底部滑出的绿色横条，盖住「⚠违规」标 */
.imgmgr-item .im-approve {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  border: none; cursor: pointer; background: #16a34a; color: #fff;
  font-size: 12px; font-weight: 600; padding: 6px 0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  opacity: 0; transform: translateY(100%); transition: all .18s ease;
}
.imgmgr-item .im-approve span { font-size: 13px; }
.imgmgr-item.img-bad:hover .im-approve { opacity: 1; transform: translateY(0); }
.imgmgr-item .im-approve:hover { background: #15803d; }
.imgmgr-add input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
  outline: none; font-size: 13px;
}
.imgmgr-add input:focus { border-color: var(--primary); }

/* 图片大图灯箱 */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 500;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px; color: #fff; font-size: 30px;
  cursor: pointer; line-height: 1; opacity: .85;
}
.lightbox-close:hover { opacity: 1; }

/* 商品池看图选品：一张可拖动的卡 —— 左图右信息，翻页按钮贴在卡的两侧，不压黑背景 */
.pv-card { position: fixed; left: 0; top: 0; z-index: 500; display: flex; align-items: stretch;
  width: 860px; max-width: calc(100vw - 96px); box-sizing: border-box; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 14px; cursor: move;
  box-shadow: 0 18px 60px rgba(15,23,42,.26), 0 2px 8px rgba(15,23,42,.08); }
.pv-card.pv-dragging { user-select: none; box-shadow: 0 26px 72px rgba(15,23,42,.36), 0 2px 8px rgba(15,23,42,.1); }
.pv-card.pv-dragging * { cursor: move; }
/* 图区尺寸写死：换图时卡片不跳，翻页箭头位置也稳 */
.pv-stage { flex: 0 0 460px; height: 460px; min-width: 0; box-sizing: border-box; padding: 14px;
  display: flex; align-items: center; justify-content: center; background: #f8fafc;
  border-right: 1px solid #eef2f7; border-radius: 14px 0 0 14px; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff;
  -webkit-user-drag: none; }
.pv-noimg { color: #94a3b8; font-size: 15px; }
.pv-panel { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow: auto; }
.pv-head { display: flex; align-items: center; gap: 8px; user-select: none; }
.pv-head .pv-badge { margin-left: auto; }
.pv-head .pv-close { margin-left: 2px; }
.pv-grip { color: #cbd5e1; font-size: 14px; line-height: 1; }
.pv-card:hover .pv-grip { color: #94a3b8; }
.pv-counter { font-size: 12px; color: var(--text-muted); }
.pv-title { font-size: 14px; line-height: 1.5; font-weight: 600; word-break: break-word; }
.pv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12.5px; }
.pv-meta span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.pv-meta i { font-style: normal; font-size: 11px; color: var(--text-muted); }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pv-actions .pv-open { text-decoration: none; }
.pv-hint { font-size: 11.5px; color: var(--text-muted); margin-top: auto; }
/* 翻页按钮：圆形，一半探出卡片两侧 */
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border-radius: 50%; background: #fff; border: 1px solid #e5e7eb; color: #334155;
  box-shadow: 0 4px 14px rgba(15,23,42,.18); font-size: 28px; line-height: 1; padding-bottom: 3px;
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; z-index: 1; }
.pv-nav:hover { background: #f1f5f9; }
.pv-prev { left: -20px; }
.pv-next { right: -20px; }
.pv-nav.pv-off { opacity: .35; cursor: default; }
.pv-nav.pv-off:hover { background: #fff; }
/* 窄屏：上图下信息 */
@media (max-width: 900px) {
  .pv-card { flex-direction: column; width: calc(100vw - 96px); }
  .pv-stage { flex: 0 0 auto; height: 320px; border-right: 0; border-bottom: 1px solid #eef2f7;
    border-radius: 14px 14px 0 0; }
  .pv-panel { max-height: 50vh; }
}
.ci-thumb[data-pv], .pv-none { cursor: zoom-in; }
/* 商品池硬门槛行：启用时左侧亮一条蓝边，一眼看出「现在的数字是过了门槛的」 */
.pl-thr { margin-top: -6px; padding-left: 0; border-left: 3px solid transparent; }
.pl-thr.is-on { border-left-color: var(--primary); padding-left: 8px; }
.pl-thr .pl-thr-num { width: 92px; }
.pl-thr-lbl { color: var(--text-light); font-size: 13px; flex: none; }
.pl-thr-sep { color: var(--text-light); margin: 0 -4px; }

/* ==== 乐天数据分析 ==== */
.an-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1200px) { .an-cards { grid-template-columns: repeat(3, 1fr); } }
.an-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; }
.an-card-t { font-size: 13px; color: #6b7280; }
.an-card-v { font-size: 24px; font-weight: 700; color: #111827; margin: 4px 0 2px; line-height: 1.2; }
.an-card-s { font-size: 12px; color: #9ca3af; }
.an-block { padding: 14px 16px; margin-bottom: 14px; }
.an-h { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 12px; }
.an-dist { display: flex; height: 22px; border-radius: 6px; overflow: hidden; }
.an-dist > div { min-width: 2px; transition: opacity .15s; }
.an-dist > div:hover { opacity: .8; }
.an-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.an-lg { font-size: 13px; color: #4b5563; display: inline-flex; align-items: center; gap: 5px; }
.an-lg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.an-lg b { color: #111827; }
.an-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .an-2col { grid-template-columns: 1fr; } }
.an-bar { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.an-bar-lbl { width: 220px; flex: 0 0 220px; font-size: 12px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-bar-track { flex: 1; background: #f3f4f6; border-radius: 4px; height: 16px; overflow: hidden; }
.an-bar-fill { height: 100%; border-radius: 4px; min-width: 2px; }
.an-bar-val { width: 130px; flex: 0 0 130px; text-align: right; font-size: 12px; color: #6b7280; }
.an-tblbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.an-live { font-size: 13px; color: #4b5563; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.an-tbl th, .an-tbl td { padding: 8px 10px; }
.an-caption { font-size: 13px; color: #4b5563; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 9px 14px; margin-bottom: 12px; }
/* 采集库加载中提示 */
.cl-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: #6b7280; font-size: 14px; }
.cl-spinner { width: 26px; height: 26px; border: 3px solid #e5e7eb; border-top-color: #2563eb; border-radius: 50%; animation: cl-spin .8s linear infinite; }
@keyframes cl-spin { to { transform: rotate(360deg); } }
/* 数据分析主选项卡（乐天数据 / 选款建议） */
.an-maintabs { display: flex; gap: 6px; border-bottom: 2px solid #e5e7eb; margin: 4px 0 14px; }
.an-mtab { padding: 9px 20px; font-size: 14px; font-weight: 600; color: #6b7280; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s; }
.an-mtab:hover { color: #374151; }
.an-mtab.active { color: #2563eb; border-bottom-color: #2563eb; }

/* 数据分析页 —— 统一美化原生控件（与 rk-editor 同一套视觉规范） */
.an-block select, .an-block input[type="text"], .an-block input:not([type]),
.an-tblbar select, .an-tblbar input[type="text"], .an-tblbar input:not([type]) {
  height: 36px; box-sizing: border-box; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
  font-size: 13px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.an-block select:hover, .an-tblbar select:hover,
.an-block input:hover, .an-tblbar input:hover { border-color: #b9c4d4; }
.an-block select:focus, .an-tblbar select:focus,
.an-block input:focus, .an-tblbar input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.an-block input::placeholder, .an-tblbar input::placeholder { color: #9aa7b8; }
/* 下拉框自绘箭头（去掉各浏览器原生样式差异） */
.an-block select, .an-tblbar select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
/* 顶部工具栏的历史批次下拉也统一 */
.toolbar select { height: 36px; border-radius: 7px; appearance: none; -webkit-appearance: none;
  padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.toolbar select:hover { border-color: #b9c4d4; }
.toolbar select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
/* 筛选栏label与复选框对齐 */
.an-tblbar .cl-flbl { font-size: 13px; color: #4b5563; }
.an-live { user-select: none; }
.an-live input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

/* ==== 数据分析 / 选款建议 —— 区块标题与表格容器 ==== */
.an-block-h { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 12px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.an-block-title { font-size: 14px; font-weight: 600; color: #374151; margin: 18px 0 10px;
  display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.an-tblwrap { overflow-x: auto; }
.an-tblwrap .table { min-width: 100%; }

/* ==== 选款建议（乐天全站行情对照） ==== */
.mk-tbl th, .mk-tbl td { padding: 9px 10px; vertical-align: top; }
.mk-link { color: var(--primary); text-decoration: none; }
.mk-link:hover { text-decoration: underline; }
.mk-kw { display: inline-block; font-size: 12px; line-height: 1.6; color: #3730a3;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 5px;
  padding: 1px 7px; margin: 0 4px 4px 0; }
/* 价格带条：灰=全区间，蓝=市场主流(25%~75%)，深线=中位，橙点=我的定价 */
.mk-band { padding-top: 3px; }
.mk-band-track { position: relative; height: 10px; background: #f1f5f9;
  border: 1px solid #e5e7eb; border-radius: 5px; }
.mk-band-iqr { position: absolute; top: 0; bottom: 0; background: #bfdbfe; border-radius: 5px; }
.mk-band-med { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #2563eb; }
.mk-band-me { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  background: #f97316; border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 1px #f97316; }
.mk-band-lbl { display: flex; justify-content: space-between; font-size: 11px;
  color: #9ca3af; margin-top: 5px; }
.mk-band-lbl b { color: #4b5563; }
.mk-tbl .tag { white-space: nowrap; }

/* 数据分析 · 乐天分析 MVP */
.ra-advice { display: grid; gap: 8px; font-size: 13px; color: #374151; line-height: 1.6; }
.ra-bar { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 46px;
  gap: 8px; align-items: center; margin: 7px 0; }
.ra-bar-name { font-size: 12px; color: #374151; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ra-bar-track { height: 14px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.ra-bar-fill { height: 100%; background: #2563eb; border-radius: 4px; }
.ra-bar-val { font-size: 12px; color: #6b7280; text-align: right; }
.ra-mini { height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; min-width: 120px; }
.ra-mini span { display: block; height: 100%; background: #93c5fd; border-radius: 5px; }

/* 选款建议 —— 商品缩略图 */
.mk-item { display: flex; gap: 10px; align-items: flex-start; }
.mk-thumb { flex: 0 0 auto; border: 1px solid #e5e7eb; border-radius: 8px;
  object-fit: cover; background: #f8fafc; }
.mk-thumb-ph { display: inline-flex; align-items: center; justify-content: center;
  color: #cbd5e1; font-size: 18px; }
.mk-tops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mk-top { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  border: 1px solid #eef1f5; border-radius: 8px; padding: 4px 8px 4px 4px;
  background: #fafbfc; max-width: 230px; transition: border-color .15s, background .15s; }
.mk-top:hover { border-color: #bfdbfe; background: #f5f9ff; }
.mk-top .mk-thumb { border-radius: 6px; }
.mk-top-txt { font-size: 12px; color: #374151; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; }
.mk-top-txt i { display: block; font-style: normal; color: #9ca3af; font-size: 11px; }

/* ==== 审核守卫开关 ==== */
.guard-dot { display:inline-block; width:8px; height:8px; border-radius:50%;
  background:#cbd5e1; vertical-align:middle; margin:0 1px; }
.guard-dot.on { background:#16a34a; box-shadow:0 0 0 3px rgba(22,163,74,.18); }
/* 守卫开启时按钮变绿。选择器按 id 写的，新按钮要一个个加进来 */
#p-guard-btn.guard-on, #ro-guard.guard-on { color:#16a34a; border-color:#bbf7d0; background:#f0fdf4; }
#p-guard-menu { width:288px; padding:12px 14px; }
#p-guard-menu .dropdown-head { padding:0 0 10px; font-weight:600; }
.guard-switch { display:flex; align-items:center; gap:8px; cursor:pointer;
  font-size:13px; color:#374151; padding:4px 0 10px; user-select:none; }
.guard-switch input { width:16px; height:16px; accent-color:var(--primary); cursor:pointer; }
.guard-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; }
.guard-row span { font-size:13px; color:#4b5563; white-space:nowrap; }
.guard-row select { flex:1; height:34px; border:1px solid var(--border); border-radius:7px;
  padding:0 30px 0 10px; font-size:13px; color:var(--text); background:#fff;
  appearance:none; -webkit-appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; }
.guard-row select:disabled { background-color:#f3f4f6; color:#9ca3af; cursor:not-allowed; }
.guard-note { font-size:12px; line-height:1.6; margin:8px 0 10px; color:#6b7280; }
.modal-body > .guard-note:last-of-type { margin-bottom: 0; }

/* ── 同步守卫弹窗 ── */
.rg-sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 9px;
  font-size: 13px; font-weight: 600; color: var(--text); }
.rg-sec:first-child { margin-top: 0; }
.rg-sec::after { content: ""; flex: 1; height: 1px; background: #eef2f7; }
.rg-sec i { font-style: normal; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; }
/* 「标签 + 一排选项」的横排行，比塞进 .field 里干净 */
.rg-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.rg-line > span { flex: none; width: 84px; font-size: 13px; color: var(--text-light); }
.rg-line .radio-opts { margin-top: 0; }
.rg-tip { font-size: 12px; line-height: 1.65; color: #6b7280; margin: 8px 0 0; }
/* 上轮结果最长 255 字，四行就把弹窗顶到 max-height 上限；而 .modal-body 是
   overflow:visible，撞顶后内容会溢出、底部按钮被挤出屏幕。截成两行，
   完整内容鼠标悬停看（任务中心里本来也有一份）。 */
#rg-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; cursor: help; }
.rg-tip b { color: var(--text); }
.guard-foot { text-align:right; }

/* 任务中心：生成上传表下载按钮 */
.task-dl-row { margin-top: 8px; }
.task-dl { font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer;
  background: #16a34a; color: #fff; border: none; font-weight: 600;
  transition: background .15s; }
.task-dl:hover { background: #15803d; }
.task-dl:disabled { background: #9ca3af; cursor: default; }

/* 生成上传表：生成范围三个选项做成一排（分段控件样式） */
.radio-opts-row { flex-direction: row; gap: 8px; }
.radio-opts-row .radio-opt { flex: 1; justify-content: center; text-align: center;
  white-space: nowrap; padding: 9px 6px; }


/* ==== 乐天属性预设弹窗 ==== */
.ap-row { display:flex; align-items:center; gap:10px; padding:8px 2px;
  border-bottom:1px dashed #eef1f5; font-size:13px; }
.ap-row-name { flex:0 0 220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ap-zh { color:#6b7280; font-size:12px; margin-left:6px; }
.ap-val { flex:1; color:#2563eb; font-size:12px; background:#f8fafc;
  border:1px solid #eef1f5; border-radius:5px; padding:2px 8px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ap-add { display:flex; gap:8px; margin-top:12px; }
.ap-add input { flex:1; min-width:0; height:34px; box-sizing:border-box; padding:0 10px;
  border:1px solid var(--border); border-radius:7px; font-size:13px; outline:none;
  transition:border-color .15s, box-shadow .15s; }
.ap-add input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.ap-add .btn-primary { flex:0 0 auto; }
.ap-genre-check { display:flex; align-items:center; gap:8px; }
.ap-genre-check input { height:34px; box-sizing:border-box; padding:0 10px;
  border:1px solid var(--border); border-radius:7px; font-size:13px; outline:none; }
.ap-genre-check input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.ap-req { padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px; margin-bottom:6px;
  font-size:13px; background:#fafbfc; }
.ap-req.ap-miss { border-color:#fecaca; background:#fef7f7; }
.ap-meta { color:#9ca3af; font-size:12px; margin-left:8px; }
.ap-ok { color:#16a34a; font-size:12px; margin-left:8px; }
.ap-no { color:#dc2626; font-size:12px; margin-left:8px; font-weight:600; }
.ap-opts { color:#6b7280; font-size:12px; margin-top:4px; line-height:1.6; }

/* 产品库/草稿箱:审核标签独立一行(不再跟标题挤同一行错位) */
.rk-audits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 3px 0 2px; }
.rk-audits:empty { display: none; }

/* 采集认领弹窗:顺带处理选项(卡片式勾选) */
.claim-opts { display: flex; flex-direction: column; gap: 8px; }
.claim-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  transition: border-color .15s, background .15s; }
.claim-opt:hover { border-color: #b9c4d4; }
.claim-opt:has(input:checked) { border-color: var(--primary); background: #eff6ff; }
.claim-opt input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex: 0 0 auto; }
.claim-opt-i { font-size: 18px; flex: 0 0 auto; }
.claim-opt > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.claim-opt b { font-size: 13px; color: var(--text); font-weight: 600; }
.claim-opt i { font-size: 12px; color: var(--text-light); font-style: normal; }

/* 采购登记 →「同步」：站点选择、同步结果与商品数量核对 */
/* 下拉外观完全交给 .sh-form select（全站弹窗控件标准：34px、自绘箭头、聚焦光环），
   这里只管排版宽度——别再造一套，否则一行里控件高低不齐。 */
.sh-form select.pu-site { flex: none; width: 108px; font-size: 12.5px; }
/* 同步按钮与同一行的输入框/下拉等高，避免一行三种高度 */
.sh-form .btn-mini.pu-sync-btn { height: 34px; flex: none; }
/* 左边 70px = .sh-row label 的 60px 宽 + 10px gap，和上面的表单对齐 */
.pu-sync-out { margin: 0 0 8px 70px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: #f8fafc; color: var(--text-light);
  font-size: 12.5px; line-height: 1.75; }
.pu-sync-out.ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.pu-sync-out.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.pu-sync-out.bad { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.pu-sync-out code { padding: 0 5px; border-radius: 4px; font-size: 11.5px;
  background: rgba(15, 23, 42, .07); }
.pu-sync-x { color: var(--danger); }
.pu-sync-note { margin-top: 4px; }
.pu-cmp { margin-top: 5px; }
.pu-cmp > div { display: flex; align-items: center; gap: 7px; padding: 1px 0; }
.pu-cmp i { flex: none; width: 13px; text-align: center; font-style: normal; }
.pu-cmp code { flex: none; }
.pu-cmp span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-cmp .is-ok { color: #15803d; }
.pu-cmp .is-bad { color: #b45309; }
.pu-cmp .is-info { color: var(--text-light); }

/* 权限分配：按一级菜单分组，取代原来十几个气泡平铺 */
/* 不给这里单独设滚动：.modal 本身已是 max-height:88vh + overflow:auto，
   再套一层就变成嵌套滚动，鼠标滚到权限区外层就不动了，反而更难用。 */
.perm-box { border: 1px solid var(--border); border-radius: 9px;
  background: #fbfcfe; overflow: hidden; margin-top: 8px; }
.perm-top { display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: #fff; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-light); }
.perm-top .perm-sp { flex: 1; }
.perm-top b { color: var(--primary); font-size: 13px; }
/* 「不选=全部可见」这条反直觉的规则，用整条提示带出来 */
.perm-hint { padding: 7px 12px; font-size: 12px; line-height: 1.6;
  background: #fffbeb; color: #92400e; border-bottom: 1px solid var(--border); }
.perm-hint.is-limited { background: #f0fdf4; color: #15803d; }
.perm-grp { padding: 10px 12px 12px; }
.perm-grp + .perm-grp { border-top: 1px dashed #e6ebf3; }
.perm-grp-h { display: flex; align-items: center; gap: 8px; }
.perm-grp-ck { display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13px; color: var(--text); user-select: none; }
.perm-grp-ck input { width: 15px; height: 15px; flex: none;
  accent-color: var(--primary); cursor: pointer; }
.perm-grp-n { margin-left: auto; flex: none; font-size: 11.5px; color: var(--text-muted); }
.perm-grp-n.is-part { color: var(--primary); }
.perm-grp-n.is-all { color: #15803d; font-weight: 600; }
/* 分组内的气泡比原来紧凑一点，一屏能放下更多 */
.perm-grp .perm-chips { margin-top: 7px; gap: 6px; }
.perm-grp .perm-chip { padding: 5px 12px; font-size: 12.5px; }

/* 采购同步：外币折算行 */
/* 采购成本：欧元 / 人民币 两个金额框并排，币种符号做成框内前缀 */
.pu-amt { position: relative; flex: none; }
.pu-amt > i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-style: normal; color: var(--text-muted); font-size: 13px; pointer-events: none; }
.sh-form .pu-amt input { width: 132px; padding-left: 26px; }
.pu-eq { color: var(--text-muted); font-size: 13px; flex: none; }
.sh-form input.pu-rate { width: 104px; flex: none; }
/* 提示行紧跟金额行，不要再画一条分隔线 */
.sh-row.pu-cost-hint { border-top: none; padding-top: 0; }
.pu-fx input { width: 96px; height: 26px; box-sizing: border-box; padding: 0 7px;
  margin: 0 3px; border: 1px solid #bfdbfe; border-radius: 5px;
  background: #fff; font-size: 12.5px; }
.pu-fx input:focus { border-color: var(--primary); outline: none; }
.pu-fx .muted { font-size: 11.5px; }
/* 采购明细里的外币角标 */
.pu-fx-tag { margin-top: 2px; font-size: 11px; color: var(--text-muted); }

/* ═══════════ 工作台（经营驾驶舱）═══════════ */
/* 标题和控件同一行，副标题另起一行占满宽度——
   副标题很长（主体+区间+环比），挤在标题块里会折成四行，白白多出 40px。 */
.dk-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dk-head > .page-title { flex: 1; min-width: 90px; margin: 0; }
/* 加了「今日/昨日」后共 6 个快捷按钮，控件条会被挤到第二行、头部凭空高 50px。
   收紧间距和日期框宽度，让它和标题保持在同一行。 */
.dk-ctrl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.dk-ctrl select, .dk-ctrl input[type=date] {
  height: 32px; box-sizing: border-box; padding: 0 7px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); }
.dk-ctrl input[type=date] { width: 116px; }
.dk-ctrl select:focus, .dk-ctrl input[type=date]:focus { border-color: var(--primary); outline: none; }
.dk-ctrl select { cursor: pointer; min-width: 104px; }

/* KPI 卡片 */
.dk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px; margin: 16px 0; }
.dk-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; }
.dk-k-l { color: var(--text-light); font-size: 12.5px; }
.dk-k-v { font-size: 26px; font-weight: 700; color: var(--text); margin: 4px 0 2px;
  line-height: 1.2; }
.dk-d { font-size: 12px; display: block; }
.dk-d em { font-style: normal; color: var(--text-muted); margin-left: 4px; }
.dk-d.is-up { color: #dc2626; }
.dk-d.is-down { color: #15803d; }
.dk-k-n { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.dk-warn { color: #b45309; }

/* 区块 */
.dk-block { padding: 14px 16px; margin-bottom: 14px; }
.dk-h { font-size: 14px; font-weight: 600; margin-bottom: 10px;
  display: flex; align-items: baseline; gap: 10px; }
.dk-h .muted { font-size: 12px; font-weight: 400; }
.dk-empty { padding: 26px; text-align: center; }
.dk-2col { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1.15fr); gap: 14px; }
/* 趋势 / 状态 / 店铺三块并排。趋势图给稍宽一点，柱子才不至于挤成一团 */
.dk-row3 { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
/* 并排这三块要压矮：图表是概览用的，占半屏就喧宾夺主了 */
.dk-row3 > .dk-block { margin-bottom: 0; display: flex; flex-direction: column;
  padding: 11px 13px; }
.dk-row3 .dk-h { margin-bottom: 7px; }
.dk-row3 .dk-h { font-size: 13.5px; }
.dk-row3 .dk-h .muted { font-size: 11px; }
.dk-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; }

/* 趋势图 */
.dk-svg { width: 100%; height: auto; display: block; }
.dk-grid { stroke: #eef2f7; stroke-width: 1; }
/* ⚠️ 这是 viewBox 内的字号，会跟着 SVG 一起缩放。
   并排后趋势图缩放约 0.76，写 10px 实际只渲染成 7.6px，根本看不清。
   这里按缩放比反算，保证落到屏幕上仍有 ~10px。 */
.dk-ax { fill: #94a3b8; font-size: 13px; }
.dk-ax2 { fill: #b58a3a; }
.dk-bar { fill: #93c5fd; }
.dk-bar:hover { fill: #2563eb; }
.dk-line { fill: none; stroke: #d97706; stroke-width: 1.8; stroke-linejoin: round; }
.dk-dot { fill: #d97706; }
.dk-legend { display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 11px; color: var(--text-light); margin-top: 1px; }
.dk-legend i { display: inline-block; margin-left: 12px; }
.dk-lg-bar { width: 11px; height: 11px; border-radius: 2px; background: #93c5fd; }
.dk-lg-line { width: 16px; height: 2px; background: #d97706; margin-bottom: 3px; }

/* 环形图 */
.dk-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dk-donut { width: 104px; height: 104px; flex: none; transform: rotate(-90deg); }
.dk-seg { fill: none; stroke-width: 17; }
.dk-dn-n, .dk-dn-l { transform: rotate(90deg); transform-origin: 70px 70px;
  text-anchor: middle; }
.dk-dn-n { font-size: 26px; font-weight: 700; fill: var(--text); }
.dk-dn-l { font-size: 14px; fill: var(--text-muted); }   /* 同上：环形图缩放约 0.74 */
.dk-lg { flex: 1; min-width: 132px; }
.dk-lgi { display: flex; align-items: center; gap: 7px; padding: 1px 0; font-size: 12px; }
.dk-lgi i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.dk-lgi span { flex: 1; min-width: 0; color: var(--text-light); }
.dk-lgi b { font-variant-numeric: tabular-nums; }
.dk-lgi em { font-style: normal; color: var(--text-muted); font-size: 11px; width: 60px;
  text-align: right; }

/* 横条排行 */
.dk-bar-row { display: flex; align-items: center; gap: 9px; padding: 2px 0; font-size: 12px; }
.dk-bar-lbl { width: 66px; flex: none; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text-light); }
.dk-bar-tr { flex: 1; min-width: 0; height: 15px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.dk-bar-fl { height: 100%; border-radius: 4px; }
.dk-bar-v { width: 92px; flex: none; text-align: right; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.dk-bar-v em { font-style: normal; font-weight: 400; color: var(--text-muted);
  font-size: 11.5px; margin-left: 5px; }

/* 待办 / 家底 */
.dk-todo-i { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px;
  transition: background .15s; }
.dk-todo-i:hover { background: #f1f5f9; }
.dk-todo-i b { font-size: 19px; font-variant-numeric: tabular-nums; }
.dk-facts > div { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; }
.dk-facts > div > span { flex: 1; min-width: 0; color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-facts b { font-variant-numeric: tabular-nums; }
.dk-facts em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.dk-facts em.ok { background: #f0fdf4; color: #15803d; }
.dk-facts em.bad { background: #fef2f2; color: #dc2626; }
.dk-sep { border-top: 1px dashed var(--border); margin: 6px 0 !important; padding: 0 !important; }
@media (max-width: 1080px) { .dk-2col { grid-template-columns: 1fr; } }
/* 断点按**内容区**算：侧边栏 220px + 左右内边距 44px，内容宽 ≈ 视口-264。
   视口 1280 → 内容 1016，三列（趋势 380 / 其余各 304）刚好放得下。
   再窄就先让趋势图独占一行，最后退成单列。 */
@media (max-width: 1150px) {
  .dk-row3 { grid-template-columns: 1fr 1fr; }
  .dk-row3 > .dk-block:first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) { .dk-row3 { grid-template-columns: 1fr; } }

/* ── 乐天订单管理：行版式刻意对齐斑马订单页，用户看惯了那套排布 ── */
/* ⚠️ 必须 fixed：默认的 auto 布局下 table{width:100%} 会把富余宽度按各列内容宽
   「按比例」摊回去，给单元格设 width 只当**下限**用——想让明细列变窄，用 auto
   布局是做不到的（试过 340/400/460px 和给内容加 max-width，列宽纹丝不动）。
   fixed 下百分比就是最终列宽。min-width 兜底：低于 1220px 时容器横向滚动，
   而不是把单号裁掉（外层 #ro-table 已经是 overflow-x:auto）。 */
.ro-tbl { table-layout: fixed; min-width: 1220px; }
.ro-tbl td { vertical-align: top; padding: 10px 8px; font-size: 14px; }
.ro-tbl th { padding: 10px 8px; }
.ro-kv { display: flex; gap: 6px; line-height: 1.85; font-size: 12px; }
.ro-base .ro-kv, .ro-st .ro-kv, .ro-time .ro-kv { line-height: 1.85; font-size: 12px; }
/* 标签禁断行：中文默认可以逐字断，浏览器就按「一个字」算这一列的最小宽度，
   结果列宽算得比实际需要的小，nowrap 的单号反而戳出单元格 3px。*/
.ro-k { flex: none; color: #64748b; white-space: nowrap; }
.ro-em { color: var(--primary); }
.ro-wrap { word-break: break-all; white-space: normal; }
/* 列宽在 views.js 的 <th> 上（fixed 布局只认首行），这里不要再设 width。
   基本信息用**固定 275px**而不是百分比：它的内容宽度是封顶的（单号最长 26 位），
   给百分比的话屏幕一宽右边就空出一大块死区，那块地方应该留给订单明细。
   ⚠️ 其余四列的百分比合计 86%，是**故意大于**「100% 减去 355px」的：合计小了，
   剩下的余量会被摊回到 px 列上，基本信息的死区就又回来了（实测 79% 时 1900px 屏
   基本信息会涨到 309px）。合计大了浏览器会把百分比列等比压缩，px 列纹丝不动，
   正是要的效果。也别用 calc(% - px)：表格列宽上浏览器直接忽略，四列会变成平分。
   min-width 1220 是当前紧凑版下限，再窄状态列会盖到隔壁。
   单号 26 位、编号 19 位，一断行就像是两个号——只给这两行禁断行。
   实测单号行 = 标签 42 + 间距 5 + 值 193 = 240px，加内边距 262px，
   24% × 最小表宽 1150 = 276px，够。买家/邮箱照旧允许换行，它们本来就长。 */
.ro-nw { white-space: nowrap; }
.ro-st, .ro-amt, .ro-time { white-space: nowrap; }
/* ⚠️ 但**值**要允许换行：fixed 布局下列宽是定死的，nowrap 放不下不会自动加宽，
   而是直接戳到隔壁列上去。实测 1366 屏时间列只有 105px，而「下单：2026-08-18 02:25」
   要 135px —— 挤成两行（在日期和时间之间断）总比盖住隔壁列强。
   标签仍保持 nowrap（.ro-k），不会断成「下 / 单：」。 */
.ro-st .ro-kv > span:last-child,
.ro-time .ro-kv > span:last-child { white-space: normal; min-width: 0; }
/* 我方采购登记后会带一串采购单号，nowrap 会直接盖到隔壁列（fixed 布局不会自动加宽） */
.ro-pur, .ro-pur * { white-space: normal; }

/* 订单明细：一单多件时每件一块，图在左、字段在右（同斑马） */
/* 明细列收窄到 26%：SKU 最长 46 位且不含空格，必须允许断行，否则会戳出单元格。 */
.ro-det code { word-break: break-all; }
/* ⚠️ 只能限在明细列：min-width:0 会让这一列不再向表格「要」内容宽度。
   全局加上去，基本信息列就被压到 260px（单号需要 262px），nowrap 的单号直接戳出单元格。 */
.ro-det .ro-kv > span:last-child { min-width: 0; }

.ro-item { display: flex; gap: 8px; padding: 0; }
.ro-item + .ro-item { border-top: 1px dashed #eef2f7; margin-top: 8px; padding-top: 8px; }
.ro-item img, .ro-item .cl-noimg { width: 56px; height: 56px; flex: none;
  object-fit: contain; border: 1px solid #eef2f7; border-radius: 6px; background: #fff; }
.ro-ib { min-width: 0; flex: 1; }
/* 标题两行截断：全展开会把行撑得很高，一单多件时尤其明显 */
.ro-title { color: var(--text); font-size: 13px; line-height: 1.4; margin-bottom: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ro-pur { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #eef2f7; }
.ro-pur-tag { font-size: 12.5px !important; padding: 2px 8px !important;
  border-radius: 10px; line-height: 1.4; }
.rpl-tbl { width: max-content !important; min-width: 2460px; table-layout: auto; }
.rpl-tbl th, .rpl-tbl td { vertical-align: middle; text-align: left; padding: 10px 12px; }
.rpl-tbl th { white-space: nowrap; text-align: left; line-height: 1.25; }
.rpl-tbl td { line-height: 1.45; white-space: nowrap; overflow: visible; text-overflow: clip; }
.rpl-tbl .num { text-align: left; white-space: nowrap; }
.rpl-tbl .rpl-status { text-align: left; white-space: nowrap; }
.rpl-tbl .rpl-status .tag { display: inline-flex; align-items: center; white-space: nowrap; }
.rpl-tbl .rpl-logi { white-space: nowrap; overflow: visible; text-overflow: clip; line-height: 1.45; }
.rpl-tbl code { white-space: nowrap; }
.rpl-tbl tbody td:not(.rpl-status):not(.rpl-logi):not(:last-child) { font-size: 14px; }
.rpl-tbl tbody td:not(.rpl-status):not(.rpl-logi):not(:last-child) code { font-size: 14px; }
.rpl-tbl tbody td:not(.rpl-status):not(.rpl-logi):not(:last-child) .muted { font-size: 12px !important; }
.rpl-money-edit { cursor: text; }
.rpl-money-input { width: 92px; height: 28px; padding: 4px 7px; border: 1px solid var(--primary);
  border-radius: 6px; font-size: 14px; outline: none; }
.rpl-bill-form { display: grid; grid-template-columns: 96px 1fr; gap: 14px 16px; align-items: center; }
.rpl-bill-label { color: var(--muted); font-size: 13px; }
.rpl-provider-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rpl-provider-seg button { border: 1px solid var(--border); background: #fff; border-radius: 8px;
  padding: 10px 12px; text-align: left; color: var(--text); cursor: pointer; }
.rpl-provider-seg button b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.rpl-provider-seg button span { display: block; color: var(--muted); font-size: 11.5px; }
.rpl-provider-seg button.active { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .10); }
.rpl-file-picker { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rpl-file-picker button { flex: 0 0 auto; }
.rpl-file-picker span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 13px; }
.rpl-export-form { display: grid; grid-template-columns: 90px 1fr; gap: 12px 14px; align-items: center; }
.rpl-export-form label { color: var(--muted); font-size: 13px; }
.rpl-export-form .cl-drange { width: 220px; height: 34px; border: 1px solid var(--border);
  border-radius: 6px; padding: 0 10px; font-size: 13px; background: #fff; color: var(--text); }
.rpl-export-form .cl-drange:focus { border-color: var(--primary); outline: none; }

/* 订单备注（运营写给采购的注意事项，如"带电""带胶水 敏感"）——必须显眼 */
.ro-remark { margin-top: 5px; padding: 4px 7px; border-radius: 5px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  font-size: 12px; line-height: 1.7; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 买家指定送达：乐天上是硬约束，发早发晚都算违规 */
.ro-warn { margin-top: 5px; padding: 3px 7px; border-radius: 5px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: 12px; white-space: normal; }
.dr-form-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.dr-form-head label { color: var(--muted); font-size: 13px; }
.dr-form-head input:not(.cl-drange) { height: 34px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 10px; font-size: 13px; background: #fff; color: var(--text); width: 110px; }
.dr-form-head .cl-drange { height: 34px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 10px; font-size: 13px; background: #fff; color: var(--text); }
.dr-form-head input:focus { border-color: var(--primary); outline: none; }
.dr-table-wrap { margin-top: 14px; max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.dr-config-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.dr-config-tbl th { position: sticky; top: 0; background: #f8fafc; color: var(--text-light);
  font-weight: 600; border-bottom: 1px solid var(--border); padding: 9px 8px; text-align: left; }
.dr-config-tbl td { border-bottom: 1px solid #eef2f7; padding: 8px; }
.dr-config-tbl th:first-child, .dr-config-tbl td:first-child { min-width: 150px; white-space: nowrap; }
.dr-config-tbl input { width: 100%; height: 30px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 8px; font-size: 13px; }
.dr-config-tbl input:focus { border-color: var(--primary); outline: none; }
.dr-shop-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dr-shop-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dr-row-del { flex: none; height: 26px; border: 1px solid #fecaca; border-radius: 6px;
  background: #fff1f2; color: #dc2626; padding: 0 8px; font-size: 12px; cursor: pointer; }
.dr-row-del:hover { background: #ffe4e6; border-color: #fca5a5; }

/* 订单页字号整体抬一档：12px 看久了费眼（用户反馈）。只作用于本页，不动全站基准。 */
.ro-tbl thead th { font-size: 13px; }
.ro-tbl .tag { font-size: 11px; padding: 0 5px; }
.ro-tbl code { font-size: 12px; }
.ro-tbl .cl-acts { gap: 4px; }
.ro-tbl .cl-acts a { font-size: 12px; line-height: 1.9; }
.ro-dim2 { font-size: 12px; }

/* 采购台账：单号可点（去 1688 取实付金额校对）+ 校对结果标记 */
.rpl-pno { display: flex; align-items: center; gap: 6px; margin: 1px 0; flex-wrap: wrap; }
.rpl-fetch { cursor: pointer; border-bottom: 1px dashed var(--primary); color: var(--primary); }
.rpl-fetch:hover { background: rgba(37, 99, 235, .08); }
.rpl-fetch.busy { color: #94a3b8; border-bottom-color: #94a3b8; cursor: wait; }
.rpl-chk { cursor: pointer; padding: 0 6px; border-radius: 4px; font-size: 11.5px;
  white-space: nowrap; border: 1px solid transparent; }
.rpl-chk.ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.rpl-chk.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; font-weight: 600; }
.rpl-chk:hover { filter: brightness(.95); }

/* 时间列下面的国际物流块（仓库→买家那一程，不是采购的国内快递）。
   ⚠️ 物流订单是 19 位数字，时间列只有 ~180px 宽，必须 break-all 让它折行，
   否则 fixed 布局下会直接戳出单元格盖到隔壁列。 */
.ro-lg { margin-top: 6px; padding-top: 5px; border-top: 1px dashed #e2e8f0; }
.ro-lg-h { font-size: 12.5px; color: #475569; line-height: 1.5; margin-bottom: 3px;
  white-space: normal; word-break: break-all; }
.ro-lg-n { margin-left: 5px; padding: 0 5px; border-radius: 3px; font-size: 11.5px;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; white-space: nowrap; }
.ro-lg-r { display: flex; gap: 5px; align-items: baseline; line-height: 1.55; }
.ro-lg-r > span { flex: none; font-size: 12px; color: #94a3b8; }
.ro-lg-r > code { min-width: 0; font-size: 12.5px; word-break: break-all; white-space: normal; }

/* ---------- 产品库·推送到店铺（行内角标 + 覆盖统计条） ---------- */
/* 三态而不是两态：「推了草稿一直没上线」必须和「已上线」分开，
   否则最该被发现的那批款会被混进绿色里看不见。 */
.rp-pushrow { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.rp-pb {
  display: inline-flex; align-items: center; font-size: 11px; line-height: 1.5;
  padding: 1px 6px; border-radius: 4px; border: 1px solid transparent;
  white-space: nowrap; cursor: default;
}
.rp-pb.on    { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }   /* 已上线 */
.rp-pb.draft { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }   /* 推了没上线 */
.rp-pb.off   { color: #b8bec9; background: #fbfcfd; border-color: var(--border); } /* 该店还没有 */

.rp-cover { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.rp-cvgrp { display: inline-flex; align-items: center; gap: 4px; }
.rp-cover .rp-cv {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 12px; line-height: 1.6; padding: 3px 10px; border-radius: 14px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  transition: border-color .15s, background .15s;
}
.rp-cover .rp-cv b { font-weight: 600; }
.rp-cover .rp-cv:hover { border-color: var(--primary); color: var(--primary); }
.rp-cover .rp-cv.none { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.rp-cover .rp-cv.warn { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.rp-cover .rp-cv.on {
  border-color: var(--primary); background: var(--primary); color: #fff;
}
.rp-cover .rp-cv.on:hover { color: #fff; }

/* ---------- 发布守卫：额度进度条 ---------- */
.pg-bar {
  height: 6px; border-radius: 3px; background: var(--bg);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 3px;
}
.pg-bar i { display: block; height: 100%; background: var(--primary); transition: width .3s; }

/* ---------- 产品库·批量审图：每个款一段，视觉上必须分得清 ---------- */
.bia-sec { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.bia-sec.bia-running { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.bia-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.bia-head .spacer { flex: 1; }
.bia-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 12px; font-weight: 600; flex: none;
}
.bia-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bia-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }

/* ---------- 设置守卫：一店一张卡片 ---------- */
.sg-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
  margin-bottom: 12px; background: #fff;
}
.sg-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.08); }
.sg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sg-head .spacer { flex: 1; }
.sg-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 2px 0; }
.sg-alert {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 13px; line-height: 1.7;
}

/* ---------- 列表加载中的内联提示（不挡操作，区别于全屏遮罩） ---------- */
.list-busy {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--text-light);
  background: linear-gradient(90deg, rgba(37,99,235,.06), transparent);
  border-bottom: 1px solid var(--border);
}
.list-busy-dot {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}

/* ==== 亚马逊采集 · 关键词库 ==== */
/* 原生控件统一美化（与数据分析页 .an-block 同一套视觉规范，多覆盖 number 与 textarea） */
.sc-block select, .sc-block input[type="text"], .sc-block input[type="number"],
.sc-block input:not([type]), .sc-block textarea,
.ck-dlg select, .ck-dlg input[type="text"], .ck-dlg input[type="number"],
.ck-dlg input:not([type]), .ck-dlg textarea {
  height: 36px; box-sizing: border-box; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
  font-size: 13px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.sc-block textarea, .ck-dlg textarea {
  height: auto; padding: 9px 12px; line-height: 1.6; width: 100%;
  resize: vertical; font-family: inherit;
}
.sc-block select:hover, .sc-block input:hover, .sc-block textarea:hover,
.ck-dlg select:hover, .ck-dlg input:hover, .ck-dlg textarea:hover { border-color: #b9c4d4; }
.sc-block select:focus, .sc-block input:focus, .sc-block textarea:focus,
.ck-dlg select:focus, .ck-dlg input:focus, .ck-dlg textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.sc-block input::placeholder, .sc-block textarea::placeholder,
.ck-dlg input::placeholder, .ck-dlg textarea::placeholder { color: #9aa7b8; }
/* 下拉框自绘箭头（去掉各浏览器原生样式差异） */
.sc-block select, .ck-dlg select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.sc-block input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer;
}
/* 列表里的小标记 */
.ck-hit { color: #15803d; }
/* 总页数还没从搜索页读到 */
.ck-wait { display: inline-block; padding: 0 7px; font-size: 11px; line-height: 18px;
  border-radius: 9px; background: #f1f5f9; color: #64748b; border: 1px dashed #cbd5e1; }
.ck-why { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px;
  line-height: 17px; border-radius: 9px; background: #f1f5f9; color: #64748b; }
/* 弹窗里的一行表单 */
.ck-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ck-row > label { font-size: 13px; color: #4b5563; white-space: nowrap; }
.ck-sep { font-size: 13px; font-weight: 600; color: #374151;
  margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.ck-res { margin-top: 14px; padding: 10px 12px; border-radius: 7px;
  background: #f8fafc; border: 1px solid var(--border); font-size: 13px; }
.ck-res-h { margin-bottom: 4px; }
/* 商品明细页 */
.ck-head { font-size: 14px; margin-left: 4px; }
.ck-num { color: var(--primary); cursor: pointer; text-decoration: none; border-bottom: 1px dashed currentColor; }
.ck-num:hover { filter: brightness(.85); }
.ci-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 5px;
  border: 1px solid var(--border); background: #fff; }
.ci-asin { font-family: Consolas, "Courier New", monospace; color: var(--primary);
  text-decoration: none; }
.ci-asin:hover { text-decoration: underline; }
/* ASIN 旁边的解析状态 */
.pl-ps { display: inline-block; padding: 0 7px; font-size: 11px;
  line-height: 18px; border-radius: 9px; vertical-align: middle; white-space: nowrap; }
.pl-ps.wait { background: #f1f5f9; color: #64748b; border: 1px dashed #cbd5e1; }
.pl-ps.done { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pl-ps.fail { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
/* 已存在 = 产品管理里本来就有，既没重复建也没花额度。用蓝色区别于「已解析」的绿色 */
.pl-ps.exist { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
/* 已淘汰 = 人工筛掉，不再解析。灰底 + 整行压淡，一眼分得出「没看」和「看过不要」 */
.pl-ps.reject { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }
.pl-row-rejected td { opacity: .62; }
.pl-row-rejected td:first-child { opacity: 1; }
.ci-title { max-width: 340px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
/* 绑定关键词：做成可点的小标签，一眼看出这商品是哪个词搜出来的 */
.pl-kwchip { display: inline-block; max-width: 100%; padding: 2px 9px; cursor: pointer;
  font-size: 12px; line-height: 17px; border-radius: 11px; box-sizing: border-box;
  background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .15s, border-color .15s; }
.pl-kwchip:hover { background: #dbeafe; border-color: #93c5fd; }

/* ---------- 订单行「采购单」状态气泡：亚马逊邮件时间线 ---------- */
.mo-pop { position: absolute; z-index: 1200; width: 390px; max-width: calc(100vw - 16px);
  background: var(--card, #fff); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: 10px 12px 8px; font-size: 13px; }
.mo-pop-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.mo-pop-head .mo-pop-x { margin-left: auto; }
.mo-pop-body { max-height: 320px; overflow: auto; }
.mo-tl { position: relative; padding-left: 16px; }
.mo-tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.mo-tl-i { position: relative; padding: 2px 0 10px; }
.mo-tl-i:last-child { padding-bottom: 2px; }
.mo-tl-dot { position: absolute; left: -14px; top: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); border: 2px solid var(--card, #fff); box-sizing: content-box; margin-left: -1px; }
.mo-tl-i.is-cur .mo-tl-dot { background: var(--primary); }
.mo-tl-t { font-size: 12px; color: var(--text-light); }
.mo-tl-s { margin: 2px 0; }
.mo-tl-sub { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 仓库管理 / 仓库工作台（2026-09-11） ===== */
.wh-rail { width: 220px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.wh-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.wh-rail-grp { padding: 8px 12px 4px; font-size: 12px; color: var(--text-light); background: #f8fafc; }
.wh-rail-item { padding: 8px 12px; cursor: pointer; border-left: 3px solid transparent; border-bottom: 1px solid #f1f5f9; }
.wh-rail-item:hover { background: #f8fafc; }
.wh-rail-item.active { background: #eff8f5; border-left-color: var(--pf-green, var(--primary)); }
.wh-rail-item.off .wh-rail-name { color: var(--text-light); text-decoration: line-through; }
.wh-rail-name { font-size: 14px; font-weight: 600; }
.wh-rail-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.wh-rail-empty { padding: 8px 12px 12px; font-size: 12px; color: var(--text-light); }
.wh-info-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wh-title { font-size: 18px; font-weight: 600; margin-right: 8px; }
.wh-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 14px; }
.wh-info-grid .muted { display: inline-block; min-width: 64px; margin-right: 6px; }
.wh-span2 { grid-column: span 2; }
.wh-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 12px; }
.wh-wb { max-width: 900px; }
.wh-wb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wh-wb-pending { text-align: center; padding: 6px 18px; border-radius: 10px; background: #eff8f5; }
.wh-wb-pending b { display: block; font-size: 24px; color: var(--pf-green, var(--primary)); }
.wh-wb-pending span { font-size: 12px; color: var(--text-light); }
.wh-card { margin-bottom: 10px; }
@media (max-width: 760px) {
  .wh-wb .status-tabs { overflow-x: auto; }
  .wh-form, .wh-info-grid { grid-template-columns: 1fr; }
  .wh-span2 { grid-column: span 1; }
}

/* 仓库工作台订单卡片 */
.wh-card.is-exc { border-left: 4px solid #dc2626; }
.wh-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wh-ref { font-size: 16px; margin-right: 8px; }
.wh-note { background: #fffbeb; color: #92400e; border-radius: 8px; padding: 6px 10px; font-size: 13px; margin-bottom: 8px; }
.wh-note.is-exc { background: #fef2f2; color: #b91c1c; }
.wh-items { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.wh-item { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #e5e7eb; }
.wh-item:last-of-type { border-bottom: none; }
.wh-img { width: 72px; height: 72px; object-fit: contain; border-radius: 6px; background: #f8fafc; flex-shrink: 0; }
.wh-img-none { display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 12px; }
.wh-item-body { flex: 1; min-width: 0; }
.wh-item-title { font-size: 14px; line-height: 1.4; max-height: 2.8em; overflow: hidden; }
.wh-qty { font-size: 20px; font-weight: 700; color: var(--pf-green, var(--primary)); white-space: nowrap; }
.wh-addr { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; background: #f8fafc; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.wh-addr-text { font-size: 14px; line-height: 1.5; }
.wh-card-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.wh-card-foot .btn-primary { min-width: 120px; }
@media (max-width: 760px) {
  .wh-card-foot .btn-primary, .wh-card-foot .btn-ghost { flex: 1; padding: 10px; font-size: 15px; }
}

.wh-inbound { display: flex; align-items: center; gap: 8px; background: #eff6ff; color: #1e40af; border-radius: 8px; padding: 6px 10px; font-size: 14px; margin-bottom: 8px; }
.wh-inbound b { font-family: monospace; font-size: 15px; word-break: break-all; }

/* 仓库工作台（表格版） */
.mo-tbl .wb-line { display: flex; gap: 10px; align-items: flex-start; }
.wb-img { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #f8fafc; flex-shrink: 0; border: 1px solid var(--border); }
.wb-img-none { display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 11px; }
.mo-tbl .wb-addr { white-space: normal; line-height: 1.5; }
.mo-tbl tr.wb-exc td:first-child { box-shadow: inset 3px 0 0 #dc2626; }

/* 到仓运单号：多单号列表（派仓弹窗）与到达标记（仓库端） */
.dp-form .sh-row > label { width: 72px; white-space: nowrap; }
.dp-nolist { display: flex; flex-direction: column; gap: 6px; }
.dp-norow { display: flex; align-items: center; gap: 8px; }
.dp-noidx { flex: none; width: 44px; font-size: 12px; color: var(--text-light); text-align: right; white-space: nowrap; }
.dp-norow .dp-no { flex: 1; }
.dp-norow .dp-nodel { flex: none; width: 18px; text-align: center; }
.dp-nofoot { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 12px; white-space: nowrap; }
.dp-noadd { font-size: 13px; }
.wb-no { display: inline-block; font-family: monospace; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: #f1f5f9; color: #334155; margin: 2px 2px 2px 0; }
.wb-no.can { cursor: pointer; }
.wb-no.can:hover { filter: brightness(.95); }
.wb-no.is-ok { background: #dcfce7; color: #15803d; }
.mo-tbl code.wb-no-ok { background: #dcfce7; color: #15803d; }

/* 订单详情 → 仓库详情：进度条 */
.wd-steps { display: flex; gap: 0; }
.wd-step { flex: 1; text-align: center; position: relative; font-size: 12px; }
.wd-step::before { content: ""; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: #e5e7eb; z-index: 0; }
.wd-step:first-child::before { display: none; }
.wd-step.is-done::before { background: #86efac; }
.wd-dot { width: 14px; height: 14px; border-radius: 50%; background: #e5e7eb; margin: 0 auto 6px; position: relative; z-index: 1; border: 2px solid #fff; }
.wd-step.is-done .wd-dot { background: #16a34a; }
.wd-t { color: var(--text); }
.wd-step.is-done .wd-t { font-weight: 600; color: #15803d; }
.wd-time { color: var(--text-light); margin-top: 2px; }

/* 仓库工作台：ERP 备注气泡（浅黄，显眼但不刺眼） */
.mo-tbl .wb-erpnote { position: relative; margin-top: 10px; padding: 7px 10px 7px 12px; border-radius: 8px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; line-height: 1.5; white-space: normal; }
.mo-tbl .wb-erpnote::before { content: ""; position: absolute; top: -6px; left: 16px; width: 10px; height: 10px;
  background: #fffbeb; border-left: 1px solid #fde68a; border-top: 1px solid #fde68a; transform: rotate(45deg); }
.mo-tbl .wb-erpnote-lbl { font-weight: 600; margin-right: 8px; color: #b45309; }

/* 仓库工作台：表头随滚动固定（.page-fixed-body 的 sticky 规则要求表头在 thead 里） */
.page-fixed-body .mo-tbl thead th { background: #f8fafc; box-shadow: inset 0 -1px 0 var(--border); }

/* 仓库工作台：快速收货（扫码枪） */
.ws-modal .modal-head h3 { font-size: 17px; }
.ws-inputs { display: flex; align-items: stretch; gap: 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.ws-in { flex: 1; min-width: 0; }
.ws-in-cap { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.ws-in-no { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ws-in-box { position: relative; }
.ws-in-box input { width: 100%; box-sizing: border-box; height: 48px; font-size: 18px; letter-spacing: .5px; font-family: Consolas, "Courier New", monospace;
  padding: 0 14px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.ws-in-box input::placeholder { font-family: inherit; letter-spacing: 0; color: #b6c0cd; font-size: 15px; }
.ws-in-box input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.ws-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 5px; padding: 1px 6px; background: #fff; }
.ws-in-tip { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.ws-or { align-self: center; color: #94a3b8; font-size: 12px; }
.ws-msg { font-size: 14px; border-radius: 8px; margin: 10px 0 0; border-left: 3px solid transparent; padding: 0 12px; line-height: 0; overflow: hidden; }
.ws-msg.is-ok, .ws-msg.is-err, .ws-msg.is-warn, .ws-msg.is- { line-height: 1.5; padding: 8px 12px; }
.ws-msg.is-ok { background: #f0fdf4; color: #15803d; border-left-color: #22c55e; }
.ws-msg.is-err { background: #fef2f2; color: #b91c1c; border-left-color: #ef4444; }
.ws-msg.is-warn { background: #fffbeb; color: #b45309; border-left-color: #f59e0b; }
.ws-msg.is- { background: #f8fafc; color: var(--text-light); }
.ws-result { overflow: auto; flex: 1; min-height: 100px; margin-top: 10px; }
.ws-empty { text-align: center; color: var(--text-light); padding: 40px 0; }
.ws-card { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--border); box-shadow: none; }
.ws-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ws-nos { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.wb-no.is-hl { outline: 2px solid var(--primary); }
.ws-item.is-hl { background: #eff6ff; border-radius: 8px; padding-left: 6px; padding-right: 6px; }

/* 快速收货：按行收货进度 */
.ws-line-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ws-line-r .wh-qty { font-size: 18px; color: #b45309; }
.ws-line-r .wh-qty.is-full { color: #15803d; }
.ws-of { font-size: 12px; color: var(--text-light); font-weight: 400; margin-left: 2px; }
.ws-line-btns { display: flex; gap: 4px; }
.ws-line-btns .btn-sm { padding: 2px 8px; font-size: 12px; }

.ws-left { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #fef3c7; color: #b45309; }
.ws-left.is-ok { background: #dcfce7; color: #15803d; }

/* 打包弹窗：每箱一块 */
.pk-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.pk-box-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pk-skus { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.pk-sku { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 13px; }
.pk-sku:hover { background: #f8fafc; }
.pk-sku.on { background: #eff6ff; border-color: #bfdbfe; }
.pk-sku img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; background: #f8fafc; }
.pk-sku-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-dims { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.pk-dims input { width: 72px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; }
.pk-dims input:focus { border-color: var(--primary); outline: none; }

/* 打包表格：勾选 SKU 合并包裹，尺寸列跨行 */
.pk-tbl { table-layout: fixed; }
.pk-tbl th, .pk-tbl td { padding: 6px 6px; }
.pk-tbl td { vertical-align: middle; font-size: 13px; overflow: hidden; }
.pk-tbl .pk-prod { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pk-tbl .pk-prod img { width: 30px; height: 30px; object-fit: contain; border-radius: 4px; background: #f8fafc; flex-shrink: 0; }
.pk-tbl .pk-sku-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-tbl .pk-cell { background: #f8fafc; text-align: center; }
.pk-tbl .pk-cell input { width: 100%; box-sizing: border-box; height: 30px; padding: 0 4px; border: 1px solid var(--border); border-radius: 6px; text-align: center; }
.pk-tbl .pk-cell input:focus { border-color: var(--primary); outline: none; }
.pk-tbl .pk-box-no { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.pk-tbl tr.pk-grp td { background: #eff6ff; }
.pk-tbl tr.pk-grp td.pk-cell { background: #dbeafe; }
.pk-tbl tr.pk-grp:not(.pk-grp-first) td { border-top: 1px dashed #bfdbfe; }

/* 填运单：按箱（块状，和打包弹窗一致） */
.tk-box .pk-sku { cursor: default; }
.tk-row { display: flex; align-items: center; gap: 8px; }
.tk-lbl { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.tk-row select, .tk-row input { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; background: #fff; }
.tk-row select { width: 170px; }
.tk-row input.tk-no { flex: 1; min-width: 0; font-family: Consolas, monospace; font-size: 15px; letter-spacing: .3px; }
.tk-row select:focus, .tk-row input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.tk-note { margin-top: 10px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; }
.tk-note input { flex: 1; }

/* 工作台：退回上步（危险色气泡，放操作列最底下） */
.mo-tbl td.mo-ops:has(.wb-back) { position: relative; padding-bottom: 42px; }   /* 给沉底的气泡留位置 */
.mo-tbl .mo-ops .wb-back { position: absolute; left: 8px; bottom: 10px; display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; line-height: 1.6;
  background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; cursor: pointer; white-space: nowrap; }
.mo-tbl .mo-ops .wb-back:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

/* 派仓：邮件里的物流单号建议 */
.dp-mail { margin-top: 8px; padding: 8px 10px; background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; font-size: 12px; }
.dp-mail-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 600; }
.dp-mail-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; }
.dp-mail-t { display: inline-flex; flex-direction: column; padding: 2px 8px; border-radius: 8px; background: #eff6ff; color: #1d4ed8; cursor: pointer; font-family: Consolas, monospace; line-height: 1.3; }
.dp-mail-t i { font-style: normal; font-family: inherit; font-size: 11px; color: var(--text-light); }
.dp-mail-t:hover { background: #dbeafe; }

.dp-mail-ship { font-size: 12px; color: #92400e; background: #fffbeb; padding: 1px 8px; border-radius: 8px; }

/* 仓库：亚马逊收货地址 */
.wh-addr-title { font-weight: 600; margin: 4px 0 -4px; padding-top: 8px; border-top: 1px dashed var(--border); }
.wh-addr-title .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.wh-amz { display: flex; gap: 6px; align-items: flex-start; }
.wh-amz-box { display: flex; gap: 10px; align-items: flex-start; }
.wh-amz-box pre, .pu-wh-addr { margin: 0; font: 13px/1.5 Consolas, "Courier New", monospace; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; white-space: pre-wrap; }
.pu-wh-addr { flex: 1; font-size: 12px; }

.tk-total { margin-top: 6px; padding: 8px 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; }
.tk-total b { color: #b45309; font-size: 15px; margin-right: 8px; }
.tk-row input.tk-fee { font-family: Consolas, monospace; }
.wb-feesum { color: #b45309; }

.dp-amz-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
