:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  /* 主色的两档浅色：soft=浅底（选中/高亮背景），line=浅线（边框/图表柱）。
     2026-09-23 加 —— 这些地方原来在各处写死了一串浅蓝（eff6ff / bfdbfe 之类），换主题跟不动。 */
  --primary-soft: #eff6ff;
  --primary-line: #bfdbfe;
  /* 菜单栏的渐变：侧栏和账号下拉头部共用这一份。
     分开写的话，侧栏有渐变而下拉头是纯色，两块同源的绿看着就不一样深。 */
  --sidebar-grad: linear-gradient(180deg, var(--sidebar-bg), rgba(0,0,0,.26));
  /* 页面底色用**中性冷灰**（和登录页 .login-right 同款 #f4f6f8），不用带绿的灰。
     原来是 #f2f8f6，绿分量最高，小面积看不出来，铺满整页就发腻、看久了眼睛累。
     登录页的做法就是大面积中性 + 绿色只做点缀 —— 越克制越高级。 */
  --bg: #f1f5f9;
  /* 页面底色的**渐变终点**（起点就是 --bg）。和 --bg 一样是换肤可调变量。
     默认这对值 = 登录页左侧 .login-brand 的两端，别乱动。 */
  --bg-end: #d6dde4;
  /* 下面这些是「界面风格」可调的变量（基础配置 → 风格设置）。
     这里的值 = 内置「经典蓝白」（= 后端 DEFAULT_KEY），登录后 theme.js 会按各人选的风格覆盖成同名变量。
     ⚠️ 必须和后端 DEFAULT_KEY / _BASE 保持一致：不一致的话每次进页面会先按这里的颜色画一帧、
        再被 theme.js 刷成真正的默认色，肉眼能看到闪色。
     ⚠️ 新增可调变量时，backend/app/routers/ui_themes.py 的 VARS 和每个 BUILTIN 也要同步补。 */
  --sidebar-bg: #1e293b;
  /* 未选中菜单文字：故意压暗。原来 #b7d4ca 太亮，和选中的白字只差 1.58，
     选中/未选中的层次出不来。压到 #8fb3a6 后差距 2.29，
     同时对底色仍有 4.84 的对比度（AA 需 4.5），不影响认读。 */
  --sidebar-text: #cbd5e1;
  --sidebar-hover: #334155;
  /* 选中底色压到接近侧栏底：靠**亮绿图标 + 左侧竖条**点睛，不靠背景块。
     底色越深，亮绿图标越突出：#15644c 时图标对比度只有 3.28，
     压到 #0f4a3a 后是 4.71。 */
  --sidebar-active: #2563eb;
  --sidebar-active-text: #ffffff;
  /* 选中项的左侧竖条 + 图标色。比 LOGO 绿 #00C896 再亮一档：
     原色在深底上对比度 4.71，提到 #28eab6 后是 6.57，明显更跳，
     但色相没变，还是同一个绿系。 */
  --sidebar-bar: #93c5fd;
  --topbar-bg: #ffffff;
  --topbar-text: #1e293b;
  --topbar-sub: #64748b;
  --topbar-border: #e2e8f0;
  --topbar-hover: #f1f5f9;
  /* LOGO 图形色。**不写 = 跟 topbar-text**（后端 _derive 会兜），这里显式写出来是为了
     和 DEFAULT_KEY/_BASE 对齐 —— 2026-09-25 加这个变量时漏了 :root，
     导致 theme.js 跑起来之前 LOGO 会先按旧行为画一帧。 */
  --brand-mark: #1e293b;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  /* 中性状态色：表示「进行中 / 中间态」。
     不能用品牌绿 —— 绿已经是「成功/完成」了，两者同色就分不出
     「审核中」和「审核通过」、「推了没上线」和「已上线」。
     ⚙ 这是**语义色**，和红涨绿跌一样不跟主题走。 */
  --st-neutral-bg: #eef2f7;
  --st-neutral-fg: #55657d;
  --st-neutral-line: #d4dde8;
  /* --text-muted：全站 12 处在用，却从来没定义过 —— 一直在继承父级的深色，
     「次要文字」实际和正文一样重（工作台排行里那个「54单」就是）。
     它不是可调变量（不进 ui_themes.py 的 VARS），直接派生自 --text-light 跟着主题走。
     也不能再调淡：--text-light 在每套皮肤里已经压到 AA 下限 4.6:1 了。 */
  --text-muted: var(--text-light);
  --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; display: inline-flex; align-items: center; gap: 8px; }
/* 顶栏 logo / 字标用遮罩上色：图片本身是白的，浅色页头下会看不见；
   改成 mask 后颜色跟着 --topbar-text 走，换风格自动适配（2026-09-20）*/
/* ⚠️ 2026-09-25：图形标记用**单独的 --brand-mark 变量**，各套皮肤自己定。
   原因：只有经典绿白的 topbar-text 恰好是品牌墨绿，LOGO 才是绿的；
   朱砂红白 / 群青蓝白 / 洋红白的 topbar-text 是黑灰，LOGO 就画成了黑色，品牌感全无。
   字标「脉流跨境」仍跟 topbar-text —— 图形上色、字标保持可读，是常规的品牌锁定做法。
   已逐套量过主色在各自顶栏上的对比度（图形件门槛 3:1）：
     经典绿白 3.21 / 经典蓝白 5.17 / 曜石玫 4.16 / 朱砂红白 4.52 / 群青蓝白 4.50 / 洋红白 4.56
   **以后新增皮肤记得补这一项校验**，主色太浅的话 LOGO 会糊在顶栏上。 */
/* 没有 --brand-mark（比如老的自定义风格）时回落到 currentColor = 老行为 */
.topbar .brand-logo-sm { background: var(--brand-mark, currentColor); }
.brand-logo-sm { height: 22px; width: 55px; display: block; background: currentColor;
  -webkit-mask: url("/assets/logo-white.png") no-repeat center/contain;
  mask: url("/assets/logo-white.png") no-repeat center/contain; }
.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; }

/* 账号菜单头部：原来写死亮绿渐变(#00C896→#007a66)，一大块跳出来很抢戏，
   换任何主题它都是绿的。改成跟菜单栏同色，融进整体配色（2026-09-23）。 */
.ud-head { display: flex; align-items: center; gap: 12px; padding: 16px;
  background-color: var(--sidebar-bg); background-image: var(--sidebar-grad); 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: var(--sidebar-text); cursor: pointer; font-size: 14px; border-left: 4px solid transparent;
}
.menu-item:hover { background: var(--sidebar-hover); color: var(--sidebar-active-text); }
.menu-item.active { background: var(--sidebar-active); color: var(--sidebar-active-text); border-left-color: var(--sidebar-bar); }
.menu-item .ico { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
/* 选中项：图标用亮绿（和左侧竖条同一个色）、文字保持纯白。
   图标不跟着文字走纯白 —— 三者都白的话没有层次，亮绿图标才是点睛。
   光晕用 currentColor：发光色 = 图标色，换任何主题都自动跟着变。 */
.menu-item.active .ico {
  color: var(--sidebar-bar);
  filter: drop-shadow(0 0 5px currentColor);
}
.menu-item .ico svg { width: 18px; height: 18px; display: block; }          /* 纯白线性图标（app.js MENU_SVG）*/
.menu-children .menu-item .ico, .menu-children .menu-item .ico svg { width: 16px; height: 16px; }
/* 二级菜单：分组头 + 缩进子项 */
.menu-parent .caret { margin-left: auto; font-size: 11px; color: var(--sidebar-text); opacity: .7; }
.menu-children .menu-item { padding-left: 40px; font-size: 13px; }
.menu-group-title { padding: 14px 20px 6px; color: var(--sidebar-text); opacity: .65; font-size: 12px; }

/* 内容区底色 = 登录页左侧品牌区 .login-brand 的**同一条渐变**（2026-09-25 用户要求）。
   三个色标原样抄过来，不要自己调：#f4f6f8 → #e7ebee(55%) → #d9dee3。
   改 .content 而不是 body / --bg 的原因：
     · --bg 还被 20 多个地方当**纯色**用（按钮 hover、表头、输入框禁用态…），
       换成渐变那些地方会直接坏掉；
     · body 的背景会传播到画布、连侧栏和顶栏底下也铺一层，没必要；
     · .content 正好就是「顶栏以下、侧栏以右」那块灰，范围跟用户圈的一致。
   ⚠️ .content 是滚动容器，`background-attachment` 保持默认 scroll：
      背景固定在元素自己的盒子上、**不随内容滚动**，所以长页面也不会把渐变拉长。 */
.content {
  flex: 1; overflow-y: auto; padding: 22px;
  /* 底色是一条**可换肤的渐变**：起点 var(--bg)、终点 var(--bg-end)，两个都是
     风格设置里能调的变量（2026-09-25 用户要求：「换肤底色也弄成可设置渐变色」）。
     形状照搬登录页左侧 .login-brand：150deg、中间色标在 55%。

     中间那一档不单独做成变量，用 color-mix 从两端算：**47% 这个比例是反解出来的**
     —— 默认皮肤 #f4f6f8 / #d9dee3 代进去正好得到登录页的 #e7ebee，一个像素不差。
     （登录页的渐变中段偏亮、不是线性插值，所以不能省掉这一档直接两点连线。）

     ⚠️ .content 是滚动容器，background-attachment 保持默认 scroll：
        背景固定在元素自己的盒子上、不随内容滚动，长页面不会把渐变拉长。 */
  background: linear-gradient(150deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg-end) 47%, var(--bg)) 55%,
      var(--bg-end) 100%);
}

/* 固定头 + 固定底、中间表体滚动的页面布局（产品管理等） */
.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; font-weight: 600; margin-bottom: 4px; }
.page-desc { color: var(--text-light); margin-bottom: 18px; }
.card {
  background: var(--card-bg); 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: var(--card-bg); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
/* 数字等宽：同一列的数字占同样宽度，翻页时不会左右跳动（2026-09-23） */
td { font-variant-numeric: tabular-nums; }
/* 工作台待办/统计里的数字用的是 <b>，会继承浏览器默认 bold(700) ——
   对数字来说太重了，而且不等宽。压到 600 并统一等宽。 */
#content b { font-weight: 600; font-variant-numeric: tabular-nums; }
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(15, 23, 42, .18); 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: var(--primary-soft);
  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: var(--primary-soft); color: var(--primary-dark); }
.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: var(--primary-soft);
}
.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: 600; }
.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: 500; color: var(--primary);
  font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.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: var(--st-neutral-bg); border-color: var(--st-neutral-line); color: var(--st-neutral-fg); }
.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: 6px; padding: 2px; }
.seg-b { border: none; background: transparent; padding: 5px 12px; font-size: 13px; border-radius: 4px;
  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: var(--st-neutral-bg); color: var(--st-neutral-fg); }
/* 进行中 / 流程在跑，不需要立刻处理（区别于橙色的「等人动手」） */
.tag-progress { background: var(--st-neutral-bg); color: var(--st-neutral-fg); }
.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 var(--primary-soft); 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: var(--primary-soft); }
.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: 600; 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: var(--primary-soft); }

/* 价格公式试算 */
.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: var(--primary-soft); color: var(--primary); }
/* 模型图标：官方 logo 文件（img）和内置占位（svg）共用这个类，
   写死尺寸免得各家 logo 画布比例不一致时大小参差不齐 */
.model-ic { flex-shrink: 0; display: block; width: 15px; height: 15px; object-fit: contain; }

/* 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: var(--primary-soft); 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: var(--primary-soft); 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: 600; 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: var(--primary-soft); 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: var(--primary-soft); }
.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: var(--primary-soft); }
.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: var(--primary-soft); 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: 6px; 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 var(--primary-soft); }
/* 原生下拉箭头在 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: 6px; 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: var(--primary-soft); }
.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 var(--primary-line); }
.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: 6px; 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 var(--primary-soft);
}
.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 var(--primary-soft); }
/* 富文本编辑器边框统一 */
.rk-editor .rich-ed { border-radius: 6px; }
/* 选择框清除按钮位置微调 */
.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 var(--primary-soft); }
.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 var(--primary-soft);
}
.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 var(--primary-soft); 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: var(--primary); 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; }
/* 商品池硬门槛行：启用时左侧亮一条蓝边，一眼看出「现在的数字是过了门槛的」 */
/* 商品池顶部照搬【产品管理】那套：几排 .toolbar，**全部左对齐**，按钮紧跟输入框。
   ⚠️ 别再用边框盒子 + spacer 把按钮顶到屏幕两端 —— 2026-09-26 试过一版，
      中间空出一大片，控件散着找不到边，用户直接打回。 */
.pl-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; flex: none; }
/* 商品池筛选栏：把 .cl-flbl 的"定宽右对齐"改掉。
   ⚠️ .cl-flbl 原本是给【库存管理】那种**竖排**筛选行用的（width:78px + text-align:right，
      让各行标签在一条竖线上对齐）。搬到横排工具栏里，每个标签都被塞进 78px 的框、
      文字还靠右 —— 结果就是首行整体缩进、标签和控件之间到处是大空隙。 */
.pl-bar .cl-flbl { width: auto; text-align: left; }
.pl-bar { gap: 8px; }


/* ==== 乐天数据分析 ==== */
.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: 500; color: #111827; margin: 4px 0 2px; line-height: 1.2;
  font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.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: var(--primary); 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: var(--primary); border-bottom-color: var(--primary); }

/* 数据分析页 —— 统一美化原生控件（与 rk-editor 同一套视觉规范） */
.an-block select:not(.pg-size), .an-block input[type="text"], .an-block input:not([type]),
.an-tblbar select:not(.pg-size), .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: 6px; 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 var(--primary-soft);
}
.an-block input::placeholder, .an-tblbar input::placeholder { color: #9aa7b8; }
/* 下拉框自绘箭头（去掉各浏览器原生样式差异） */
.an-block select:not(.pg-size), .an-tblbar select:not(.pg-size) {
  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: 6px; 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 var(--primary-soft); }
/* 筛选栏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: var(--primary-soft); 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: var(--primary-line); border-radius: 5px; }
.mk-band-med { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--primary); }
.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: var(--primary); 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: var(--primary-line); 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: var(--primary-line); background: var(--primary-soft); }
.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:6px;
  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: 600; }
/* 「标签 + 一排选项」的横排行，比塞进 .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:var(--primary); 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:6px; 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 var(--primary-soft); }
.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:6px; font-size:13px; outline:none; }
.ap-genre-check input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.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: var(--primary-soft); }
.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 var(--primary-line); 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: 6px; 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: 500; color: var(--text); margin: 4px 0 2px;
  font-variant-numeric: tabular-nums; letter-spacing: -.4px;
  line-height: 1.2; }
.dk-d { font-size: 12px; display: block; }
.dk-d em { font-style: normal; color: var(--text-muted); margin-left: 4px; }
/* 指标卡迷你趋势线（2026-09-23）：大数字和趋势线左右排，趋势线贴底对齐 */
.dk-k-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.dk-k-row .dk-k-v { margin-bottom: 0; }
.dk-sp { flex: none; opacity: .85; overflow: visible; }

.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: var(--border); stroke-width: 1; }
/* ⚠️ 这是 viewBox 内的字号，会跟着 SVG 一起缩放。
   并排后趋势图缩放约 0.76，写 10px 实际只渲染成 7.6px，根本看不清。
   这里按缩放比反算，保证落到屏幕上仍有 ~10px。 */
.dk-ax { fill: var(--text-light); font-size: 13px; }
.dk-ax2 { fill: var(--primary-dark); }   /* 右轴 = 销售额，与折线同色，一眼知道该读哪边 */
/* 柱和线都 pointer-events:none —— 上面盖着整列的悬停热区，
   它们不让路的话鼠标一移到柱子上，十字线就断了。 */
.dk-bar { fill: var(--primary-line); pointer-events: none; }
.dk-line { fill: none; stroke: var(--primary-dark); stroke-width: 1.8;
  stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.dk-dot { fill: var(--primary-dark); pointer-events: none; }
/* 折线下的渐变面积：同一个主色，18% 渐到全透明。原来线是孤零零一条，没有体量感 */
.dk-area { fill: url(#dkArea); pointer-events: none; }
.dk-area-t { stop-color: var(--primary); stop-opacity: .18; }
.dk-area-b { stop-color: var(--primary); stop-opacity: 0; }
/* 悬停：整列是热区，出十字线 + 顶部读数（日期 · 单量 · 销售额） */
.dk-hit rect { cursor: crosshair; }
.dk-cross { stroke: var(--primary); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.dk-hidot { fill: var(--primary-dark); stroke: var(--card-bg); stroke-width: 2; opacity: 0; }
.dk-tip { fill: var(--text); font-size: 12.5px; font-weight: 600; opacity: 0; pointer-events: none; }
.dk-hit:hover .dk-cross, .dk-hit:hover .dk-hidot, .dk-hit:hover .dk-tip { opacity: 1; }
.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: var(--primary-line); }
.dk-lg-line { width: 16px; height: 2px; background: var(--primary-dark); margin-bottom: 3px; }

/* 环形图 */
.dk-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dk-donut { width: 96px; height: 96px; flex: none;
  transform: rotate(-90deg); animation: dk-donut-in .5s cubic-bezier(.22, .9, .3, 1); }
/* ⚠️ 关键帧里必须重复写 rotate(-90deg)：transform 是整体替换不是叠加，
   只写 scale 的话动画一跑环就转回 0 度，起笔位置从 12 点跳到 3 点。 */
@keyframes dk-donut-in {
  from { opacity: 0; transform: rotate(-90deg) scale(.88); }
  to   { opacity: 1; transform: rotate(-90deg) scale(1); }
}
.dk-seg { fill: none; stroke-width: 16; transition: stroke-width .15s; }
.dk-seg:hover { stroke-width: 20; }
.dk-dn-n, .dk-dn-l { transform: rotate(90deg); transform-origin: 70px 70px;
  text-anchor: middle; pointer-events: none; }
.dk-dn-n { font-size: 30px; font-weight: 600; fill: var(--text); font-variant-numeric: tabular-nums; }
.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: 2px 0; font-size: 12px; }
.dk-lgi i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
/* 名称按内容宽、数值靠右：名称原来被 flex:1 挤成 42px，
   「待采购/发货」6 个字要 ~72px，直接折成两行，三条图例高矮不齐。
   金额那个写死的 60px 宽也去掉，让它自适应。 */
.dk-lgi span { flex: none; white-space: nowrap; color: var(--text-light); }
.dk-lgi b { font-variant-numeric: tabular-nums; flex: none; margin-left: auto; }
.dk-lgi em { font-style: normal; color: var(--text-muted); font-size: 10.5px; flex: none; margin-left: 6px; }

/* 横条排行：名称占一行、条占一行。挤在同一行时名称只剩 66px，
   「法国站主体」被截成「法国站主…」，而条还短得看不出差距。 */
.dk-bar-row { padding: 5px 0; font-size: 12px; }
.dk-bar-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.dk-rank { flex: none; width: 17px; height: 17px; border-radius: 5px; font-style: normal;
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center;
  justify-content: center; background: var(--st-neutral-bg); color: var(--st-neutral-fg);
  font-variant-numeric: tabular-nums; }
.dk-rank-1 { background: var(--primary); color: #fff; }
.dk-rank-2 { background: var(--primary-line); color: var(--primary-dark); }
.dk-rank-3 { background: var(--primary-soft); color: var(--primary-dark); }
.dk-bar-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text); }
.dk-bar-tr { height: 8px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.dk-bar-fl { height: 100%; border-radius: 5px; transform-origin: left center;
  animation: dk-bar-in .55s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes dk-bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dk-bar-v { flex: none; 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; }

/* 待办 / 家底 */
/* 待办排两列（2026-09-25）。改成按流程分档后有 6 行，比旁边两张卡高出一截，单列太瘦长。
   ⚠️ 两列之间那道发丝线**不能省**，也不是装饰。实测：
        同一行内「标签 → 它自己的数字」间距 131px（space-between 把数字推到最右）
        跨列「数字 → 下一列标签」间距只有 28px
      差 4.7 倍 —— 按接近性原则，眼睛会把「2 未采购」读成一组，念出来就是错的。
      而且光加 column-gap 治不了：要压过 131px 得留出巨大空白，得不偿失。
      画一道显式边界比堆间距有效得多。
   ⚠️ 这里写死 2 列、不用 auto-fit：卡片最窄也有 268px（.dk-3col 的 minmax），
      去掉内边距后每列 ~104px，最长的「待审核」42px + 数字 + padding 也就 76px，装得下。
      写死列数才能用 :nth-child(2n) 稳定地认出「右列」给它加线；auto-fit 下列数会变，
      1 列时 nth-child(2n) 会变成隔行加线，那就错了。 */
.dk-todo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 0; }
/* 跨整行的项：分隔线、以及不塞进半格的那几个（仓库异常 / 退款中） */
.dk-todo .dk-sep, .dk-todo .dk-todo-full { grid-column: 1 / -1; }
/* 右列：左侧发丝线 + 内缩，把列边界说清楚。
   :not(.dk-todo-full) 是必须的 —— 跨整行的项不占列位，不能跟着加线。 */
.dk-todo-i:nth-child(2n):not(.dk-todo-full) {
  box-shadow: inset 1px 0 0 var(--border); padding-left: 16px; }
.dk-todo-i { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  transition: background .15s; }
/* hover 底色原来写死 #f1f5f9，换皮肤跟不动（深色皮肤下尤其突兀）*/
.dk-todo-i:hover { background: var(--bg); }
.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: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-soft); }
.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: var(--primary-soft); }
.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: var(--st-neutral-fg); background: var(--st-neutral-bg); border-color: var(--st-neutral-line); }   /* 推了没上线：中间态，不能和 .on 的绿擞衣 */
.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: var(--primary-line); background: var(--primary-soft); color: var(--primary-dark); }
.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 var(--primary-soft); }
.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 var(--primary-soft); }
.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, var(--primary-soft), 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:not(.pg-size), .sc-block input[type="text"], .sc-block input[type="number"]:not(.pg-input),
.sc-block input:not([type]), .sc-block textarea,
.ck-dlg select:not(.pg-size), .ck-dlg input[type="text"], .ck-dlg input[type="number"]:not(.pg-input),
.ck-dlg input:not([type]), .ck-dlg textarea {
  height: 36px; box-sizing: border-box; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 6px; 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 var(--primary-soft);
}
.sc-block input::placeholder, .sc-block textarea::placeholder,
.ck-dlg input::placeholder, .ck-dlg textarea::placeholder { color: #9aa7b8; }
/* 下拉框自绘箭头（去掉各浏览器原生样式差异） */
.sc-block select:not(.pg-size), .ck-dlg select:not(.pg-size) {
  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: 6px;
  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: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--primary-line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .15s, border-color .15s; }
.pl-kwchip:hover { background: var(--primary-soft); border-color: var(--primary-line); }

/* ---------- 订单行「采购单」状态气泡：亚马逊邮件时间线 ---------- */
.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: 600; color: var(--pf-green, var(--primary)); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.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: var(--primary-soft); color: var(--primary-dark); 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; }
/* 2026-09-24 删掉「扫 ASIN」后只剩一个入口，不再两列并排 */
.ws-inputs { 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 var(--primary-soft); }
.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: var(--primary-soft); 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: var(--primary-soft); border-color: var(--primary-line); }
.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: var(--primary-soft); }
.pk-tbl tr.pk-grp td.pk-cell { background: var(--primary-soft); }
.pk-tbl tr.pk-grp:not(.pk-grp-first) td { border-top: 1px dashed var(--primary-line); }

/* 填运单：按箱（块状，和打包弹窗一致） */
.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 var(--primary-soft); }
.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: var(--primary-soft); color: var(--primary-dark); 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: var(--primary-soft); }

.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: 6px; 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); }

/* 仓库工作台·待收货：派送取件码单元格（2026-09-18） */
.mo-tbl .wb-otp-cell { vertical-align: top; }
.mo-tbl .wb-otp { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px; margin: 0 4px 6px 0;
  border: 1px dashed #f59e0b; border-radius: 8px; background: #fffbeb; }
.mo-tbl .wb-otp b { font-family: Consolas, "Courier New", monospace; font-size: 18px; letter-spacing: 2px; color: #b45309; line-height: 1.1; }
.mo-tbl .wb-otp small { font-size: 11px; color: #92400e; margin-top: 2px; }

/* 仓库管理·授权主体（2026-09-19） */
.wh-share-list { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.wh-share-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #f8fafc; }
.wh-share-item:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.wh-share-item input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }

/* 页头配色全部走变量（风格设置里可调），只作用于 .topbar 内部，不影响页面其它地方 */
/* 顶栏阴影跟卡片用同一套语言（2026-09-25）：双层 + 品牌色调 rgba(16,40,34)。
   原来是 `0 1px 3px rgba(0,0,0,.18)` —— 纯黑、单层、比卡片的 .05 重三倍多，
   看着像在顶栏下面画了条灰线，而不是顶栏浮在内容上面。
   ⚠️ 遵守上面那条「阴影必须淡」：新值总强度比原来更低，不是加重。 */
.topbar { border-bottom-color: var(--topbar-border);
  box-shadow: 0 1px 2px rgba(16,40,34,.05), 0 4px 12px rgba(16,40,34,.06); }
.topbar .brand { color: var(--topbar-text); font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; font-weight: 500; letter-spacing: 1px; }   /* 页头品牌字：中等字重的黑体，参照腾讯云页头的字形（2026-09-19）*/
.topbar .icon-btn { color: var(--topbar-text); }
.topbar .icon-btn:hover { background: var(--topbar-hover); }
.topbar .topbar-page { color: var(--topbar-sub); }
.topbar .btn-ghost { color: var(--topbar-text); border-color: var(--topbar-border); background: transparent; }
.topbar .btn-ghost:hover { background: var(--topbar-hover); border-color: var(--topbar-sub); }
.topbar .user-menu-btn { color: var(--topbar-text); }
.topbar .user-menu-btn:hover, .topbar .user-menu-btn.active { background: var(--topbar-hover); border-color: var(--topbar-border); }
.topbar .user-caret { color: var(--topbar-sub); }
/* 徽章颜色要在深色和浅色页头上都看得清：#4ade80 在白底上几乎看不见，改用 --success（两种底都够对比度）*/
.topbar .badge { background: rgba(22, 163, 74, .14); color: var(--success); border-color: rgba(22, 163, 74, .4); }

/* 页头品牌字标（2026-09-19）：中文用思源黑体（Noto Sans SC，OFL 授权）560 字重渲染成 4 倍透明 PNG，
   所有电脑显示一致（不依赖本机装了什么字体）；右侧细分隔线 + 拉开字距的英文小字。 */
/* 品牌区的间距分两档（2026-09-25）：LOGO 和字标是一体的品牌标识，贴紧；
   MILEO 是次要信息，和主体之间拉开。原来一律 10px，主次分不出来。 */
.topbar .brand { gap: 7px; }
.tb-sep, .tb-en { margin-left: 5px; }      /* 7 + 5 = 12px，比品牌主体内部宽 5px */
/* ⚠️ 2026-09-25：字标**带 30% 品牌色相**，不是纯 --topbar-text（用户提的
   「logo 边上的字呢」）。LOGO 图形上了主色之后，字标还是纯黑就和它脱节了。
   为什么不干脆也刷成纯主色：字标是 19px 的实心字，整块高饱和红/蓝在顶栏上太吵，
   而且对比度会掉到 3~5。混 30% 主色进 topbar-text，既带上色相又仍是深色，
   六套实测对比度 7.54~13.49，全部远高于门槛。
   ⚠️ 分隔线和「MILEO」**故意不动**：那是次要信息，跟 --topbar-sub 保持安静，
   三个部件都上色就没有主次了。 */
.topbar .brand-wordmark {
  background: color-mix(in srgb, var(--brand-mark, var(--topbar-text)) 30%, var(--topbar-text)); }
.brand-wordmark { height: 19px; width: 83px; display: block; background: currentColor;
  -webkit-mask: url("/assets/wordmark.png") no-repeat center/contain;
  mask: url("/assets/wordmark.png") no-repeat center/contain; }
/* ⚠️ 类名别用 .brand-en / .brand-sep：登录页已有同名样式（大字号 + 下边距），会把页头小字顶歪 */
/* 分隔线两端淡出，比一根齐头实线细腻；高度收到 14px，别比旁边的字还高 */
.tb-sep { width: 1px; height: 14px; display: block; flex: none; opacity: .55;
  background: linear-gradient(180deg, transparent, var(--topbar-sub) 22%,
    var(--topbar-sub) 78%, transparent); }
/* ⚠️ letter-spacing 会在**最后一个字母后面也留一份**，导致右边视觉上多出 3.2px 空白。
   用等量负 margin 抵消，MILEO 的右边界才和视觉边界对齐。 */
.tb-en { font: 500 11px/1 "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-style: normal;
  letter-spacing: 3.2px; color: var(--topbar-sub); margin: 0 -3.2px 0 5px; padding: 1px 0 0; display: block; }
@media (max-width: 900px) { .tb-sep, .tb-en { display: none; } }

/* ---------- 全站线性图标（icons.js，开发铁律 11）---------- */
/* .ic 是替换 emoji 生成的行内图标容器；.ic-t 存原 emoji 但不显示（老代码读 textContent 存文案时不丢） */
.ic { display: inline-flex; align-items: center; justify-content: center; vertical-align: -0.18em;
  width: 1.15em; height: 1.15em; flex: none; line-height: 0; }
/* .ic 里面的 svg 要撑满容器，所以是 block —— 它外层 .ic 本身才是 inline-flex。 */
.ic > svg { width: 100%; height: 100%; display: block; }
/* ⚠️ 单独用 ICON("xxx") 时是**光秃秃一个 svg**，没有 .ic 外壳。
   这种必须 inline-block，否则它自己占一行、图标跑到文字上面去
   （2026-09-27「解析国籍」按钮就是这么裂开的）。
   原来这条和上面那条写在一起共用 display:block，等于把独立用法一起坑了。 */
svg.ic-svg { width: 1.15em; height: 1.15em; display: inline-block;
             vertical-align: -0.18em; flex: none; }
.ic-t { display: none !important; }
.ic-ok { color: var(--success); }
.ic-bad { color: var(--danger); }
.ic-warn { color: #d97706; }
.ic-mute { color: var(--text-light); }
/* 实心按钮里的图标一律跟着按钮文字色走（2026-09-25）。
   语义色图标画在同色系的实心底上会糊没：
     「✓ 批量审核」= ic-ok 绿图标画在品牌绿的 .btn-primary 上（品牌绿改造后才撞的）；
     「🚫 淘汰」   = ic-bad 红图标画在红色的 .btn-danger 上（这个一直就看不清）。
   ⚠️ 只对**实心**按钮生效。.btn-ghost 是透明底白按钮，语义色在那儿是有意义的，别一起收了。 */
.btn-primary .ic, .btn-danger .ic, .btn-warn .ic, .btn-login .ic { color: inherit; }
.ic-fill svg { fill: currentColor; }
/* 按钮 / 页签里的图标和文字之间留一点空隙 */
button .ic, .btn-primary .ic, .btn-ghost .ic, .btn-danger .ic, .btn-warn .ic, .lnk .ic,
.status-tab .ic, .an-mtab .ic, .auth-rail-item .ic, .ud-btn .ic { margin-right: 4px; }
button .ic:last-child, .lnk .ic:last-child { margin-right: 0; margin-left: 4px; }
.page-title .ic, .modal-head h3 .ic, .section-title .ic { margin-right: 6px; }
/* 深色页头 / 菜单栏里的图标跟随文字色即可，不额外着色 */
.topbar .ic, .sidebar .ic { color: inherit; }

/* ---------- 基础配置 → 风格设置（2026-09-20）---------- */
.confirm-input { width: 100%; padding: 9px 12px; margin: 4px 0 2px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none; }
.confirm-input:focus { border-color: var(--primary); }
.th-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.th-grp { grid-column: 1 / -1; font-size: 12px; color: var(--text-light); margin: 2px 0 -2px; }
.th-list { display: grid; gap: 10px; }
.th-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px;
  background: var(--card-bg); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.th-card:hover { border-color: var(--primary); }
.th-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-line); }
.th-card-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.th-card-h b { font-size: 14px; }
.th-sw { display: flex; gap: 5px; margin: 8px 0 6px; }
.th-dot { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12); }
.th-desc { font-size: 12px; line-height: 1.5; }
.th-edit { padding: 16px 18px; }
.th-edit-h { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.th-edit-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.th-grp2 { font-size: 12px; color: var(--text-light); margin: 14px 0 8px; }
.th-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 18px; }
.th-var { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.th-var > span { flex: 1; min-width: 0; }
.th-var input[type=color] { width: 34px; height: 26px; padding: 0; border: 1px solid var(--border);
  border-radius: 6px; background: none; cursor: pointer; flex: none; }
.th-var input[type=range] { width: 92px; flex: none; accent-color: var(--primary); }
.th-var code { font-size: 11.5px; color: var(--text-light); width: 58px; text-align: right; flex: none; }
@media (max-width: 1100px) { .th-wrap { grid-template-columns: 1fr; } }

/* 产品库列表：三步审核的失败原因（2026-09-21）。红底细框，和发布失败的红字区分开 */
.rk-auditerr {
  margin: 4px 0 2px; padding: 4px 8px; border-radius: 6px; font-size: 12px; line-height: 1.6;
  color: #b91c1c; background: rgba(220, 38, 38, .07); border: 1px solid rgba(220, 38, 38, .25);
  word-break: break-all;
}



/* ==========================================================================
   工作台观感层（2026-09-23，对齐参考图）
   --------------------------------------------------------------------------
   ⚠️ 两条硬约束，改这里前先读：
     1) **阴影必须淡**。上一版用 0 16px 40px / 7.5% 被叫停，这里是 0 6px 18px / 5%。
     2) **不许出现任何 .btn-* 规则**。上一版在 .btn-primary 写死 padding，
        优先级压过 .btn-sm，工具条按钮被撑成 37px 高低不齐。按钮尺寸一律不碰。
   整段可删除回滚。
   ========================================================================== */
.card, .dk-card, .dk-block {
  border: none; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,40,34,.04), 0 6px 18px rgba(16,40,34,.05);
}
/* 指标卡：英文微标签 → 中文标签 → 大数字 → 涨跌 pill */
.dk-k-en {
  font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #a7bcb4; line-height: 1.6;
}
.dk-k-l { font-size: 12px; color: var(--text-light); }
/* 涨跌做成柔和小色块。⚠️ 红涨绿跌：语义色不变，只改外观 */
.dk-d {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 7px; border-radius: 20px; font-size: 11.5px;
}
.dk-d.is-up   { color: #c2410c; background: #fdeee5; }
.dk-d.is-down { color: #0f7a5c; background: #eafaf4; }
.dk-d.muted   { background: none; padding-left: 0; }
/* 「较上期 xx」在 pill 外，走次要色，别跟着涨跌变红绿 */
.dk-d-prev { font-style: normal; font-size: 11.5px; color: var(--text-light); margin-left: 6px; }
/* 排行条圆头（参考图那种） */
.dk-bar-tr, .an-bar-track { border-radius: 5px; }
.dk-bar-fl, .an-bar-fill, .ra-bar-fill { border-radius: 5px; }

/* —— 继续对齐参考图（2026-09-23 第二轮）—— */
/* 侧栏：微渐变 + 选中做成圆角高亮块（右侧留白，不再顶到边） */
.sidebar { background-image: var(--sidebar-grad); }
.menu-item { border-radius: 0 8px 8px 0; margin-right: 10px; }
/* 分组标题压成小号分区标签（参考图侧栏那个 MENU 的调子） */
.menu-group-title {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  opacity: .45; padding: 16px 20px 6px;
}
/* 卡片再圆一点，贴近参考图 */
.card, .dk-card, .dk-block { border-radius: 16px; }
/* 指标卡：我们有 5 个 KPI（参考图只有 4 个）。
   minmax 开到 240px 会在 1500px 宽度下排成 4+1，第五张孤零零占一行、右边大片空白。
   压到 215px 让 5 个能排在一行；窗口真窄了再自动换行。 */
.dk-kpis { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.dk-card { padding: 16px 18px; }
.dk-k-v { font-size: 28px; }

/* —— 工作台新增卡片（2026-09-23）：热销商品 / 库存预警 / 采购登记 —— */
/* 分隔线：把一张卡里的两组数据分开（库存 / 价格） */
.dk-sep { height: 1px; background: var(--border); margin: 7px 0; opacity: .7; }
.dk-bad { color: var(--danger); }
/* 采购覆盖率进度条 */
.dk-cov { height: 6px; border-radius: 4px; background: var(--primary-soft); margin-top: 10px; overflow: hidden; }
.dk-cov-fl { height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }
.dk-cov-t { margin-top: 6px; font-size: 12px; color: var(--text-light); }

/* 经营指标卡里的毛利率走势 */
.dk-mg { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.dk-mg-l { font-size: 11px; color: var(--text-light); white-space: nowrap; }

/* 表格里的**数据链接**（订单号/SKU 这类）用正文色，hover 才亮起来。
   原来全用主色：一列订单号 20 行全是绿，旁边紧挨着「净利润为正」也是绿，
   两列糊成一片，整张表泛绿；而且让人以为订单号的绿也有含义。
   绿色要留给**有语义的**地方（盈利/完成）。
   ⚠️ 用 `td > a.lnk` 这个直接子选择器：操作链接（推送/编辑/删除）包在
      .cl-acts 这类容器里，不会被这条命中，它们仍是主色。 */
td > a.lnk { color: var(--text); }
td > a.lnk:hover { color: var(--primary); }

/* ===== 账号下拉 · 换肤（2026-09-23）=====
   原来埋在「基础配置 → 风格设置」里，要点两层才换得了。挪到右上角账号下拉：
   一排色板方块直接点着换，调色/存为我的风格这些低频操作收进「更多」面板。
   每块三条竖色带 = 侧栏底色 / 主色 / 页面底色，一眼认得出是哪套。 */
.ud-section-title { display: flex; align-items: center; justify-content: space-between; }
.ud-more { border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--primary); }
.ud-more:hover { text-decoration: underline; }
/* 换肤色板（2026-09-25 重做）。每块是一个**界面缩影**：顶栏在上、侧栏在左、
   左侧那道选中竖条、右边一张卡片、右下一颗主色按钮 —— 位置和真实界面一一对应。
   上一版是三条不等宽色带，问题在于**浅色系皮肤整块几乎全白**（云母白 / 晨灰 / 暖砂），
   十块摆一起分不出谁是谁，只能靠悬停看 title。缩影哪怕全白也有结构，一眼可辨。
   ⚠️ 颜色由 JS 以 --sk-* 变量传入，这里不写死任何具体色值。 */
.ud-skins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 8px; }
.skin-chip { position: relative; padding: 0; border: none; background: none;
  cursor: pointer; display: block; font: inherit; text-align: center; }
.sk-pv { position: relative; display: block; height: 40px; border-radius: 7px; overflow: hidden;
  background: var(--sk-bg);
  /* 内描边而不是 border：border 会占掉 1px，缩影本来就只有 40px 高，占不起 */
  box-shadow: inset 0 0 0 1px rgba(16, 40, 34, .10);
  transition: transform .12s ease, box-shadow .12s ease; }
.sk-pv i { position: absolute; display: block; }
/* ⚠️ 这两道 inset 发丝线不能省：云母白 / 晨灰 / 暖砂 的顶栏和侧栏本身就是白的，
   不画分界线整块缩影就是一个空白框，左边的强调色条看着像杂点。 */
.sk-top { inset: 0 0 auto 0; height: 8px; background: var(--sk-top);
  box-shadow: inset 0 -1px 0 rgba(16, 40, 34, .10); }
.sk-side { left: 0; top: 8px; bottom: 0; width: 34%; background: var(--sk-side);
  box-shadow: inset -1px 0 0 rgba(16, 40, 34, .10); }
.sk-bar { left: 3px; top: 15px; width: 2px; height: 10px; border-radius: 1px; background: var(--sk-bar); }
.sk-card { left: calc(34% + 4px); top: 14px; right: 4px; height: 9px; border-radius: 2px;
  background: var(--sk-card); box-shadow: inset 0 0 0 1px rgba(16, 40, 34, .07); }
.sk-btn { right: 4px; bottom: 5px; width: 15px; height: 5px; border-radius: 3px; background: var(--sk-pri); }
/* 悬停的阴影要淡 —— 这是条定过的规矩，别再加重 */
.skin-chip:hover .sk-pv { transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(16, 40, 34, .10), 0 2px 6px rgba(16, 40, 34, .07); }
.skin-chip.on .sk-pv { box-shadow: inset 0 0 0 1px rgba(16, 40, 34, .10), 0 0 0 2px var(--primary); }
/* 选中角标放在缩影**外面**：.sk-pv 是 overflow:hidden，放里面会被切掉一角。
   白色描边让它从深色缩影上浮起来。 */
.sk-ok { position: absolute; right: -4px; top: -4px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--card-bg); }
.sk-ok .ic-svg { width: 9px; height: 9px; }
.sk-name { display: block; margin-top: 6px; font-size: 11px; font-style: normal; line-height: 1.3;
  color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin-chip.on .sk-name { color: var(--text); font-weight: 600; }
.skin-ph { height: 40px; border-radius: 7px; background: var(--bg); }
.skin-err { font-size: 12px; color: var(--text-light); }

/* 换肤面板：装的就是原「风格设置」那套 UI（.th-wrap 是 300px + 1fr，960 宽正好） */
.modal-skin { width: min(960px, 94vw); max-height: 86vh; display: flex; flex-direction: column; }
.modal-skin .modal-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -2px; padding: 0 2px; }
.modal-skin .page-desc { margin: 0 0 14px; }
/* 仓库运费矩阵（行=仓库，列=重量档） */
.dk-freight { margin-bottom: 14px; }
/* ⚠️ 单独用 separate：全局表是 collapse，collapse 下 td 的 border-radius 不生效，
   「本档最便宜」那格的圆角底就画不出来。这张表是新的，没有依赖折叠边框的样式。 */
.fr-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.fr-tbl th { background: transparent; padding: 3px 8px; font-size: 11.5px;
  color: var(--text-light); font-weight: 500; text-align: center; white-space: nowrap;
  border-bottom: 1px solid var(--border); }
.fr-tbl th:first-child, .fr-wh { text-align: left; }
.fr-tbl td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: center; }
.fr-tbl tbody tr:last-child td { border-bottom: none; }
.fr-wh { white-space: nowrap; font-weight: 600; }
.fr-wh i { display: block; font-style: normal; font-weight: 400; font-size: 11px;
  color: var(--text-muted); margin-top: 2px; }
.fr-c b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fr-c i { font-style: normal; font-size: 10.5px; color: var(--text-muted); margin-left: 4px; }
.fr-c em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-muted);
  margin-top: 1px; font-variant-numeric: tabular-nums; }
.fr-none { color: var(--text-muted); }
/* 同一重量档里最便宜的那家。⚠️ 这不是语义色，是「同行比较的赢家」，
   所以跟主题走用主色，不用固定的成功绿。 */
.fr-best { background: var(--primary-soft); border-radius: 6px; }
.fr-best b { color: var(--primary-dark); }
.fr-avg { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .fr-tbl { font-size: 11px; }
  .fr-tbl td, .fr-tbl th { padding: 6px 3px; }
}
/* 工作台下半部分：3(要行动) + 2(看经营) + 1(配置窄条) */
.dk-row2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; }
.dk-row2 > .dk-block { margin-bottom: 0; }
@media (max-width: 900px) { .dk-row2 { grid-template-columns: 1fr; } }
/* 三个最常看的指标做成块，和下面成本占比/毛利率的平铺列表拉开层次。
   ⚠️ 别叫 .dk-kpis —— 那是页面顶部那排大 KPI 卡片的类名，重名会把它们也压成三列。 */
.dk-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 10px; }
.dk-ops > div { background: var(--bg); border-radius: 8px; padding: 8px 11px; }
.dk-ops i { display: block; font-style: normal; font-size: 11px; color: var(--text-muted); }
.dk-ops b { display: block; font-size: 17px; font-weight: 600; margin-top: 2px;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.dk-ops b u { text-decoration: none; font-size: 11px; font-weight: 400;
  color: var(--text-muted); margin-left: 3px; }
/* 店铺授权：配置类信息，横着排一条，别占一整格 */
.dk-authbar .dk-h { margin-bottom: 8px; }
.dk-auth-t { display: flex; flex-wrap: wrap; gap: 9px; }
.dk-auth-i { display: flex; align-items: center; gap: 7px; padding: 7px 13px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px;
  background: var(--card-bg); transition: border-color .12s; }
.dk-auth-i:hover { border-color: var(--primary-line); }
.dk-auth-p { font-weight: 600; }
.dk-auth-i b { font-variant-numeric: tabular-nums; }
.dk-auth-u { font-size: 11px; color: var(--text-muted); margin-left: -3px; }
/* 订单状态卡片：平台 / ERP 流程两个视角切换 */
.dk-stcard .dk-h { justify-content: space-between; align-items: center; }
.dk-st-seg { flex: none; }
.dk-st-seg .seg-b { padding: 3px 9px; font-size: 11px; font-weight: 400; }
/* 仓库工作台的取件码挂在左侧栏（仓库账号那边侧栏只有一个菜单项，下面空着）。
   ⚠️ 颜色一律用侧栏自己的主题变量：有 4 套皮肤的侧栏是浅色的，
      写死白色叠加在那几套上会完全看不见。 */
.side-extra:empty { display: none; }
.side-extra { padding: 4px 10px 16px; margin-top: 6px;
  border-top: 1px solid var(--sidebar-hover); }
.se-otp-h { display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 3px 7px; font-size: 11.5px; color: var(--sidebar-text); }
.se-otp-h b { font-size: 13px; color: var(--sidebar-bar); font-variant-numeric: tabular-nums; }
/* 码多了给个上限，别把侧栏撑到出页面外 */
.se-otp-l { display: flex; flex-direction: column; gap: 6px;
  max-height: calc(100vh - 230px); overflow-y: auto; }
.se-otp { display: block; width: 100%; text-align: left; padding: 6px 9px; cursor: pointer;
  background: var(--sidebar-hover); border: 1px solid transparent; border-radius: 7px;
  font-family: inherit; transition: background .12s, border-color .12s; }
.se-otp:hover { background: var(--sidebar-active); border-color: var(--sidebar-bar); }
.se-otp b { display: block; font-size: 17px; font-weight: 700; letter-spacing: 1px;
  line-height: 1.2; color: var(--sidebar-active-text);
  font-family: Consolas, "Courier New", monospace; }
.se-otp small { display: block; margin-top: 1px; font-size: 10px; color: var(--sidebar-text); }
/* 侧栏折叠时整块藏起来 */
.sidebar.collapsed .side-extra { display: none; }
/* 产品管理工具栏里的「创建时间」：标签 + 区间输入作为一个整体换行，别被拆散 */
.p-crange-wrap { display: inline-flex; align-items: center; gap: 6px; flex: none; }