:root {
  /* ==== 设计标准：对齐 TK极光 /tk 设计系统 ==== */
  --bg: #f4f6f8;
  --bg-subtle: #eef1f4;
  --panel: #ffffff;
  --border: rgba(15, 23, 42, .08);
  --border-strong: rgba(15, 23, 42, .16);
  --text: #111827;
  --text-2: #556070;
  --muted: #626d7d;
  --brand: #11836e;
  --brand-hover: #0f7361;
  --brand-text: #0f7663;
  --brand-soft: rgba(17, 131, 110, .1);
  --brand-soft-strong: rgba(17, 131, 110, .18);
  --brand-glow: rgba(17, 131, 110, .25);
  --hover: rgba(15, 23, 42, .04);
  --blue: #1d4ed8;
  --blue-soft: rgba(29, 78, 216, .1);
  --green: #047857;
  --green-soft: rgba(4, 120, 87, .1);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, .1);
  --red: #b91c1c;
  --red-soft: rgba(185, 28, 28, .1);
  --gray-soft: #f1f3f5;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, .07);
  --shadow: 0 16px 40px rgba(15, 23, 42, .1), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .14), 0 4px 12px rgba(15, 23, 42, .06);
  --radius: 10px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* 下拉框自绘箭头（全局唯一样式，禁止回退到系统 3D 箭头） */
  --sel-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23556070' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --sel-arrow-dim: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394a0b0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}
::selection { background: var(--brand-soft-strong); }
.app { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 220px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 18px 12px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex: none;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 15.5px; font-weight: 650; color: var(--text);
  margin: 2px 8px 24px; letter-spacing: .2px;
}
.brand .logo-dot {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.brand span.accent { color: var(--brand-text); }
.nav-group {
  margin: 14px 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px 9px 14px;
  border: none;
  background: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 2px;
  position: relative;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-ico {
  font-size: 17px;
  line-height: 1;
  width: 22px;
  flex: none;
  text-align: center;
  /* 每个模块一个本色相（--ico 由 shell 注入），未选中时压一点饱和度：
     图标是给眼睛认路用的，颜色要能分辨，但不能比文字更抢 */
  color: var(--ico, currentColor);
  filter: saturate(.95);
  opacity: 1;
  transition: filter .15s var(--ease), opacity .15s var(--ease), transform .15s var(--ease);
}
.nav-item:hover { color: var(--text); background: var(--hover); }
.nav-item:hover .nav-ico { filter: none; opacity: 1; transform: translateY(-1px); }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%;
  height: 60%;
  width: 3px;
  border-radius: 3px;
  background: var(--brand-text);
}
.nav-item.active .nav-ico { filter: none; opacity: 1; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 2px; border-top: 1px solid var(--border); }
.user-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.user-name { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; transition: color .15s; }
.btn-logout:hover { color: var(--red); }

/* ---------- main ---------- */
main { flex: 1; padding: 24px 30px; max-width: none; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.page-head h1 { font-size: 23px; font-weight: 650; letter-spacing: .1px; }
.sub-title { font-size: 15px; color: var(--muted); margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
/* ---------- 店铺授权（2026-11-19 按妙手「店铺授权」页复刻） ----------
   结构：页签 → 说明条 → KPI → 筛选条 → 批量条 → 双行表格 → 分页
   一家店两行（基础 API / 达人 API），前 7 列用 rowspan 合并，和平台页一致；
   不要合并成一行 —— 那会把「基础 API 能用」误读成「整店都授权了」 */
.sec-bad { font-style: normal; color: #b91c1c; font-weight: 600; }

/* 一级页签：胶囊式，和订单 / 售后页同一套观感 */
.sa-tabbar {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: var(--bg-subtle); border-radius: 11px;
  width: fit-content; max-width: 100%; overflow-x: auto;
}
.sa-tab {
  padding: 6.5px 16px; border: none; border-radius: 8px; background: none;
  font-size: 15.5px; color: var(--muted); font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: all .15s var(--ease);
}
.sa-tab:hover { color: var(--text); }
.sa-tab.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* 口径说明条 */
.sa-note {
  font-size: 14.5px; line-height: 1.7; color: var(--muted);
  background: rgba(17, 131, 110, .045);
  border: 1px solid rgba(17, 131, 110, .14);
  border-radius: 8px; padding: 9px 14px; margin-bottom: 14px;
}
.sa-note b { color: var(--brand); font-weight: 600; }
/* 私有应用限制：跟普通说明区分开，用琥珀色，别让人误以为是系统故障 */
.sa-note.sa-private {
  margin-top: -6px;
  color: #9a3412; background: rgba(234, 88, 12, .05); border-color: rgba(234, 88, 12, .22);
}
.sa-note.sa-private b { color: #b45309; }
.sa-link {
  border: 0; background: none; padding: 0; font: inherit; color: var(--brand);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.sa-link:hover { color: var(--brand-dark, #0d6553); }

/* ---------- 筛选条 ---------- */
.sa-filter {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 10px;
}
.sa-help {
  height: 32px; padding: 0 2px; border: none; background: none;
  color: var(--blue); font-size: 14.5px; font-family: inherit;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
}
/* 说明入口给一个小圆形 i，否则纯文字混在一排控件里像漏掉的标签 */
.sa-help::before {
  content: "i"; width: 14px; height: 14px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; font-style: italic;
  color: #fff; background: var(--blue); line-height: 1;
}
.sa-help:hover { text-decoration: underline; }
.sa-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sa-f i { font-style: normal; font-size: 13px; color: var(--muted); }
/* 筛选条控件规格（2026-11-19 统一）
 * 原写法只给了 height:30px，而全站 select 的 padding 是 8.5px、字号 13.5px，
 * 30px 高度装不下「8.5+18+8.5」，文字被挤得上下不居中、箭头也显得偏高。
 * 这里显式清零上下 padding、改成 32px 高 / 13px 字号 / 8px 圆角，
 * 箭头沿用全站那枚细线 chevron，只把位置收到 10px。 */
.sa-f select {
  height: 32px; min-width: 112px; font-size: 15px;
  padding: 0 30px 0 11px; border-radius: 8px;
  background-position: right 10px center !important;
}
.sa-f input {
  height: 32px; width: 100%; font-size: 15px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
.sa-f input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.sa-f.grow { flex: 1 1 190px; }
.sa-filter-act { margin-left: auto; display: flex; gap: 6px; }

/* ---------- 按钮（比 .btn 小一号，工具条用） ---------- */
.sa-btn {
  height: 30px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--panel);
  font-size: 14.5px; color: var(--text-2); font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: all .15s var(--ease);
}
.sa-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-text); }
.sa-btn:disabled { opacity: .45; cursor: default; }
.sa-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.sa-btn.primary:hover:not(:disabled) { background: var(--brand-hover); color: #fff; }

/* ---------- 批量条（全选 / 站点胶囊 / 批量动作） ---------- */
.sa-bulk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--panel);
  border: 1px solid var(--border); border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.sa-ckbox {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.sa-ckbox input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }
.sa-sel-cnt { font-size: 14px; color: var(--muted); white-space: nowrap; }
.sa-sel-cnt b { color: var(--brand); font-variant-numeric: tabular-nums; margin: 0 1px; }
.sa-chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.sa-chip {
  height: 26px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--panel);
  font-size: 14px; color: var(--text-2); font-family: inherit;
  cursor: pointer; white-space: nowrap;
}
.sa-chip i { font-style: normal; color: var(--muted); margin-left: 3px; }
.sa-chip:hover { border-color: var(--brand); color: var(--brand-text); }
.sa-chip.on {
  background: var(--brand-soft); border-color: rgba(17, 131, 110, .35);
  color: var(--brand-text); font-weight: 600;
}
.sa-bulk-act { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 表格 ---------- */
.sa-tbl-wrap {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; overflow-x: auto;
}
.sa-bulk + .sa-tbl-wrap { border-radius: 0 0 10px 10px; }
.sa-tbl { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.sa-tbl.mini { min-width: 760px; }
.sa-tbl th {
  height: 38px; padding: 0 10px; text-align: left;
  font-size: 14px; font-weight: 600; color: var(--muted);
  background: #fafbfa; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.sa-tbl th.c-num { text-align: right; }
.sa-tbl td {
  padding: 9px 10px; font-size: 14.5px; color: var(--text);
  border-bottom: 1px solid var(--bg-subtle); vertical-align: middle;
}
.sa-tbl tbody tr:last-child td { border-bottom: 0; }
.sa-tbl .sa-tr:hover td { background: #fafcfb; }
/* 两行一组，组之间用实线分隔，组内用浅线 —— 否则四行连成一片看不出是一家店 */
.sa-tbl .sa-subrow td { border-bottom: 1px solid var(--border); background: #fcfdfc; }
.sa-tbl .sa-tr.is-off { opacity: .6; }
.sa-tbl input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; vertical-align: -2px; }

.c-ck { text-align: center; }
.c-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.c-num { text-align: right; font-variant-numeric: tabular-nums; }
.c-act { text-align: right; white-space: nowrap; }
.sa-tnum { font-variant-numeric: tabular-nums; }
/* 授权时间必须一行：「2026-11-11 17:41」折成两行会把基础 API / 达人 API 两行错开 */
.sa-nowrap { white-space: nowrap; }
/* 令牌总览的「最近同步」是短相对时间：右对齐 + 与操作列留 12px，
   否则「0」和「9 分钟前」之间会拉出一大段空白，看起来像两列数据对不上 */
.c-sync { white-space: nowrap; text-align: right; padding-right: 16px; }

/* 店铺单元 */
.sa-shop { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sa-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #fff; background: var(--tone, #6b7280);
}
.sa-shoptxt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sa-nm {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sa-alias {
  flex: none; font-style: normal; font-size: 12px; line-height: 16px;
  padding: 0 5px; border-radius: 4px;
  color: var(--brand-text); background: var(--brand-soft);
  border: 1px solid rgba(17, 131, 110, .2);
}
.sa-id {
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 站点徽章：同名店只靠站点区分，必须有颜色 */
.sa-region {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 20px; padding: 0 6px; border-radius: 5px;
  font-size: 12.5px; font-weight: 600; color: #fff; background: var(--tone, #6b7280);
}
.sa-site-nm { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.sa-gtag {
  display: inline-block; padding: 1px 7px; border-radius: 5px;
  font-size: 13px; background: #eef2f7; color: #475569; white-space: nowrap;
}
.sa-mut { color: var(--muted); }

.sa-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 5px; vertical-align: 1px; background: #9ca3af;
}
.sa-dot.ok { background: #10b981; }
.sa-dot.bad { background: #dc2626; }
.sa-dot.off { background: #9ca3af; }

/* 授权类型标签：基础 API 品牌绿，达人 API 靛蓝，区分两套权限 */
.sa-kind {
  display: inline-block; height: 20px; line-height: 20px; padding: 0 8px;
  border-radius: 5px; font-size: 13px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-text); white-space: nowrap;
}
.sa-kind.alt { background: rgba(99, 102, 241, .1); color: #4338ca; }
.sa-kind.sm { height: 18px; line-height: 18px; font-size: 12.5px; padding: 0 6px; }

.sa-time-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sa-time-sub.warn { color: var(--amber); }
.sa-time-sub.bad { color: #b91c1c; }
.sa-time-sub.off { color: var(--muted); }
.sa-err {
  font-size: 12.5px; color: #b91c1c; margin-top: 2px;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sa-err.red { color: #dc2626; white-space: normal; line-height: 1.5; }
.sa-err a { color: #dc2626; text-decoration: underline; cursor: pointer; }

/* 操作列按钮（2026-11-19 重做）
 * 原来是裸文字链接，两个一叠既没有边界、宽度又不一致，右边缘参差不齐。
 * 现在改成有边框的小按钮，同一列统一 76px 宽、纵向等宽右对齐：
 * 行高只有 26px，比 .sa-btn 再小一号，塞进 62px 的行里不撑高表格。 */
.sa-op {
  height: 26px; min-width: 76px; padding: 0 10px; flex: none;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text-2);
  font-size: 14px; font-family: inherit; line-height: 24px;
  text-align: center; white-space: nowrap; cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.sa-op:hover { border-color: rgba(17, 131, 110, .45); color: var(--brand-text); background: var(--brand-soft); }
.sa-op.danger { color: #b91c1c; }
.sa-op.danger:hover { border-color: rgba(185, 28, 28, .35); background: rgba(185, 28, 28, .05); color: #b91c1c; }
.sa-op:disabled { opacity: .5; cursor: default; }
/* 纵向排：一行一个，右边缘对齐（见截图反馈：并排会被挤、也不齐）
   纵向时统一 80px 宽 —— 10.5% 的操作列在 998px 表宽下可用 85px，再宽就被裁了 */
.sa-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.sa-acts:not(.row) .sa-op { width: 80px; }
.sa-acts.row { flex-direction: row; justify-content: flex-end; gap: 6px; }

/* 别名单元格：别名是人工标注，列表里直接点开就能改，不用去弹窗里翻 */
.sa-alias-cell {
  display: inline-flex; align-items: center; max-width: 100%;
  padding: 2px 6px; margin: -2px 0 -2px -6px;
  border: 1px dashed transparent; border-radius: 5px;
  background: none; font-family: inherit; font-size: 14.5px; color: var(--text);
  cursor: pointer; overflow: hidden;
}
.sa-alias-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-alias-cell:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.sa-alias-cell.empty { color: var(--muted); font-size: 14px; }
.sa-alias-cell.empty:hover { color: var(--brand-text); border-color: rgba(17, 131, 110, .4); background: var(--brand-soft); }

/* 授权状态下方那行补充说明（达人 API 是「4/8 项接口可用」，不是一句未授权） */
.sa-auth-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.sa-auth-sub.warn { color: #b45309; }

/* ---------- 分页 ---------- */
.sa-pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 2px 0; }
.sa-pg-info { font-size: 14.5px; color: var(--muted); }
.sa-pg-info b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.sa-pg-right { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); }
.sa-pg-right select {
  height: 28px; min-width: 64px; font-size: 14.5px; border-radius: 6px;
  padding: 0 26px 0 9px; background-position: right 8px center !important;
}
.sa-pg-num { min-width: 48px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- 卡片（批量授权 / 常规授权） ---------- */
.sa-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 12px;
}
.sa-card-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; min-width: 0; }
.sa-card-hd h3 { font-size: 16px; font-weight: 650; margin: 0; flex: none; }
.sa-card-hd span {
  min-width: 0; font-size: 14px; color: var(--muted);
  padding-left: 10px; border-left: 1px solid var(--border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sa-card-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.sa-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 10px; }
.sa-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; background: #fafbfb;
  border: 1px solid var(--border); border-radius: 8px;
}
.sa-step b {
  width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; background: var(--brand-soft); color: var(--brand-text);
}
.sa-step strong { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.sa-step span { font-size: 13px; color: var(--muted); line-height: 1.6; }

.sa-perm { width: 100%; border-collapse: collapse; }
.sa-perm th {
  text-align: left; font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 0 0 8px; border-bottom: 1px solid var(--border);
}
.sa-perm td { padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid var(--bg-subtle); }
.sa-perm tr:last-child td { border-bottom: 0; }
.sa-perm td:first-child { width: 26%; font-weight: 500; }

.sa-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; }
.sa-kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sa-kv > div { min-width: 0; }
.sa-kv i { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.sa-kv b { font-size: 14.5px; font-weight: 500; word-break: break-all; }
.sa-kv b.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.sa-kv b.warn { color: var(--amber); }
/* 回调地址不是 HTTPS 时单独给一行提示；别用 ::after 挂在 URL 后面，
   否则长 URL 会被挤成「（非 HTT / PS）」这种断词 */
.sa-kv-tip { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--amber); }
.sa-ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sa-hintrow {
  margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--muted);
  background: #fafbfb; border: 1px dashed var(--border);
  border-radius: 7px; padding: 8px 11px;
}

/* ---------- 应用配置（店铺管理页直接填 AppKey） ----------
 * 一条应用一张卡，点卡片切换编辑对象；表单按 6 栏排，
 * 名称/Key/Secret 各占 2 栏，Service ID 2 栏 + 回调 3 栏 + 状态 1 栏。
 * 回调地址比较长，必须给它 3 栏，否则和「用当前域名」按钮挤在一起会截断。 */
.sa-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.sa-appc {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  min-width: 0; text-align: left; padding: 11px 13px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fbfcfa; font-family: inherit; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sa-appc:hover { border-color: rgba(17, 131, 110, .38); background: #fff; }
.sa-appc.on {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(17, 131, 110, .09);
}
.sa-appc b {
  font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sa-appc em {
  font-style: normal; font-size: 13px; color: var(--muted); line-height: 1.4;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sa-appc span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.sa-kpub {
  display: inline-block; font-style: normal; font-size: 12px; line-height: 1.6;
  padding: 0 5px; margin-right: 5px; border-radius: 4px;
  background: #e9f4f0; color: #0f6b5c; border: 1px solid rgba(17, 131, 110, .24);
  vertical-align: 1px;
}
.sa-kpub.warn { background: #fdf4e6; color: #8a5a12; border-color: rgba(176, 116, 22, .28); }
.sa-appc.add { justify-content: center; align-items: center; border-style: dashed; background: #fff; }
.sa-appc.add b { color: var(--brand-text); }
.sa-appc.add span { text-align: center; }

.sa-apps-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.sa-apps-hd b { font-size: 15px; font-weight: 650; }
.sa-apps-hd > span { font-size: 13px; color: var(--muted); }
.sa-apps-edit { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; margin-top: 10px; }
.sa-apps-edit label { min-width: 0; }
.sa-apps-edit .f-name, .sa-apps-edit .f-key, .sa-apps-edit .f-secret { grid-column: span 4; }
.sa-apps-edit .f-kind, .sa-apps-edit .f-region { grid-column: span 3; }
.sa-apps-edit .f-sid { grid-column: span 3; }
.sa-apps-edit .f-redirect { grid-column: span 12; }
.sa-apps-edit .f-status { grid-column: span 3; }
.sa-apps-edit label i { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.sa-apps-edit input, .sa-apps-edit select { width: 100%; height: 34px; font-size: 14.5px; border-radius: 8px; }
.sa-apps-edit input { padding: 0 11px; }
.sa-apps-edit select { padding: 0 32px 0 11px; background-position: right 11px center; }
.sa-apps-edit .hint { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.55; }
.sa-apps-edit .hint b { color: var(--text-2); font-weight: 600; }
.sa-req { color: #b91c1c; font-style: normal; }
.sa-redirect { display: flex; gap: 8px; align-items: center; }
.sa-redirect input { flex: 1 1 auto; min-width: 0; }
.sa-redirect .sa-btn { flex: none; height: 34px; }
.sa-btn.danger { color: #b91c1c; border-color: rgba(185, 28, 28, .28); }
.sa-btn.danger:hover:not(:disabled) { border-color: #b91c1c; color: #b91c1c; background: rgba(185, 28, 28, .04); }
@media (max-width: 1180px) {
  .sa-apps-edit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-apps-edit .f-name, .sa-apps-edit .f-key, .sa-apps-edit .f-secret,
  .sa-apps-edit .f-sid, .sa-apps-edit .f-status,
  .sa-apps-edit .f-kind, .sa-apps-edit .f-region { grid-column: span 2; }
  .sa-apps-edit .f-redirect { grid-column: span 2; }
}
@media (max-width: 760px) {
  .sa-apps-edit { grid-template-columns: 1fr; }
  .sa-apps-edit .f-redirect { grid-column: span 1; }
}

.sa-empty {
  text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.7;
  padding: 40px 16px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px;
}
.sa-empty.sm { padding: 22px 16px; }
.sa-td-empty { text-align: center !important; color: var(--muted); padding: 34px 16px !important; }
.sa-log-txt { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 弹窗（授权记录 / 说明 / 批量分组） ---------- */
.sa-modal { max-width: 660px; }
.sa-help-body p { font-size: 14.5px; line-height: 1.8; color: var(--text-2); margin: 0 0 9px; }
.sa-help-body p:last-child { margin-bottom: 0; }
.sa-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 2px; }
.sa-edit.one { grid-template-columns: 1fr; }
.sa-edit label i { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.sa-edit input, .sa-edit select { width: 100%; height: 32px; font-size: 14.5px; border-radius: 8px; }
.sa-modal h3 .sa-region { vertical-align: 2px; margin-left: 4px; }
.sa-modal h3 .sa-aff-n { color: var(--brand); font-size: 19.5px; font-variant-numeric: tabular-nums; }

/* 达人 API 能力清单：一眼分出「现在能用」和「还要申请」 */
.sa-cap-hd {
  margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted);
  letter-spacing: .02em;
}
.sa-cap-hd.warn { color: #b45309; }
.sa-cap {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-top: 1px solid var(--bg-subtle);
}
.sa-cap-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  margin-top: 5px; background: #10b981;
}
.sa-cap.off .sa-cap-dot { background: #d1d5db; }
.sa-cap-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sa-cap-txt b {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.sa-cap.off .sa-cap-txt b { color: var(--text-2); }
.sa-cap-txt span { font-size: 13px; line-height: 1.6; color: var(--muted); }
.sa-cap-tag {
  font-style: normal; font-size: 12px; font-weight: 600; line-height: 15px;
  padding: 0 5px; border-radius: 4px;
  color: #b45309; background: #fef3c7; border: 1px solid #fde68a;
}

/* 能力清单这类长弹窗：内容区自己滚，按钮钉在底部。
   否则 .modal 整体 overflow:auto 会把「知道了」滚出可视区，用户以为没有按钮。 */
.modal.sa-modal { display: flex; flex-direction: column; overflow: hidden; max-height: 90vh; }
.modal.sa-modal > * { flex: none; }
.modal.sa-modal > .sa-help-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding-right: 4px; margin-right: -4px;
}
.modal.sa-modal > .sa-help-body::-webkit-scrollbar { width: 6px; }
.modal.sa-modal > .sa-help-body::-webkit-scrollbar-thumb {
  background: #d6dae1; border-radius: 3px;
}
.modal.sa-modal > .sa-help-body::-webkit-scrollbar-thumb:hover { background: #c2c8d1; }

/* ---------- 授权诊断弹窗 ---------- */
.diag-grid {
  display: grid; grid-template-columns: 96px 1fr; gap: 8px 14px;
  margin: 6px 0 14px; align-items: baseline;
}
.diag-k { font-size: 14.5px; color: var(--muted); }
.diag-v {
  font-size: 14.5px; color: var(--text); word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.diag-v.warn { color: #c2410c; }
.modal .diag-label { font-size: 14.5px; color: var(--muted); margin: 2px 0 6px; display: block; }
.modal .diag-url {
  width: 100%; box-sizing: border-box; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.55; color: var(--text);
  background: #fafbfc; border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px;
}
.diag-tip {
  font-size: 14px; line-height: 1.75; color: var(--muted);
  margin-top: 10px; padding: 9px 12px; border-radius: 8px;
  background: rgba(17, 131, 110, .05); border: 1px solid rgba(17, 131, 110, .12);
}
.diag-tip b { color: var(--brand); font-weight: 600; }
.diag-tip.warn { color: #9a3412; background: rgba(234, 88, 12, .06); border-color: rgba(234, 88, 12, .2); }
/* 店铺列表里标明「这条由哪个应用授权」：多应用之后必须区分 */
.sa-app {
  display: inline-block; margin-top: 3px; max-width: 100%;
  font-size: 12.5px; line-height: 1.5; color: #6b7f92;
  padding: 0 6px; border-radius: 4px; background: #f0f4f8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 多应用：一张卡一条应用，点卡片切换编辑对象 */
.cs-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 10px; margin-top: 10px; }
.cs-app {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  text-align: left; padding: 11px 13px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid #e3e8ee; background: #fbfcfe; font-family: inherit;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.cs-app:hover { border-color: #c3d3e0; background: #fff; }
.cs-app.on {
  border-color: var(--brand); background: #f3fbf8;
  box-shadow: 0 0 0 2px rgba(17, 131, 110, .09);
}
.cs-app b { font-size: 15.5px; font-weight: 600; color: #17303f; line-height: 1.4; }
.cs-app em {
  font-style: normal; font-size: 13px; color: #8296a8; line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all; max-width: 100%;
}
.cs-app span { font-size: 13px; color: #94a6b6; line-height: 1.4; }

/* 换公开应用的分步说明：编号要抢眼，否则五步挤成一段没人看 */
.diag-tip .diag-note {
  margin: 6px 0 2px; padding: 7px 10px; border-radius: 7px;
  background: #fff; border: 1px dashed rgba(234, 88, 12, .32);
  font-size: 14px; line-height: 1.65; color: #7c2d12; font-weight: 400;
}
.diag-tip .diag-note b { color: #b45309; }
.diag-steps { margin: 8px 0 0; padding-left: 20px; }
.diag-steps li { margin-top: 7px; line-height: 1.72; }
.diag-steps li:first-child { margin-top: 2px; }
.diag-steps li::marker { color: #c2410c; font-weight: 700; }
.diag-steps b { color: #b45309; }
/* 品牌词整串不断行（否则会断成 TikTok / Shop） */
.diag-tip .nw, .diag-steps .nw { white-space: nowrap; }
.diag-paste { display: flex; gap: 8px; align-items: stretch; }
.modal .diag-paste input {
  flex: 1 1 auto; min-width: 0; font-size: 14.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.diag-paste .btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 14px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.stat-card .label { font-size: 14.5px; color: var(--muted); margin-bottom: 7px; }
.stat-card .value { font-size: 30px; font-weight: 650; letter-spacing: -.3px; line-height: 1.2; }
.stat-card .sub { font-size: 14px; color: var(--muted); margin-top: 7px; padding-top: 8px; border-top: 1px solid var(--border); }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.panel h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { width: 64px; padding: 16px 8px; }
  .brand { font-size: 0; gap: 0; justify-content: center; }
  .nav-group { visibility: hidden; height: 10px; margin: 8px 0 2px; }
  .nav-item { padding: 10px; justify-content: center; }
  .nav-label { display: none; }
  .nav-ico { width: auto; font-size: 19.5px; }
  main { padding: 20px; }
}

/* ---------- table ---------- */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 15.5px; }
th {
  color: var(--muted); font-weight: 500; font-size: 14.5px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
td { border-bottom: 1px solid var(--bg-subtle); vertical-align: middle; }
/* 妙手数据页用来标店铺名单元格（import.js），店名不折行、不撑两行行高。
   店铺管理页的台账表已移除，只剩这一处还在用 */
.shop-cell { white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s var(--ease); }
tbody tr:hover { background: var(--hover); }
.row-actions { display: flex; gap: 4px; opacity: .5; transition: opacity .15s; }
tbody tr:hover .row-actions { opacity: 1; }
.row-actions button {
  border: none; background: none; cursor: pointer; font-size: 14.5px;
  padding: 4px 9px; border-radius: 7px;
}
.row-actions .edit { color: var(--blue); }
.row-actions .del { color: var(--red); }
.row-actions button:hover { background: var(--blue-soft); }
.row-actions .del:hover { background: var(--red-soft); }

/* ---------- badges ---------- */
.badge {
  display: inline-block; padding: 2.5px 10px; border-radius: 999px;
  font-size: 14px; white-space: nowrap; line-height: 1.6;
}
.badge.gray { background: var(--gray-soft); color: var(--text-2); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.pink { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- buttons & inputs ---------- */
.btn {
  border: none; border-radius: var(--radius); cursor: pointer;
  padding: 9px 18px; font-size: 16px; font-weight: 500;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 10px var(--brand-glow);
  transition: background .15s var(--ease), transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: none;
}
.btn.ghost:hover { background: var(--hover); }
input, textarea {
  padding: 8.5px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 15.5px; background: var(--panel); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, textarea:hover { border-color: rgba(15, 23, 42, .28); }
input:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft-strong);
}

/* ---------- 下拉框（全站唯一规范） ----------
 * 原生的 3D 箭头又灰又土，这里一律自绘：去掉系统外观、右侧留 34px 画 chevron、
 * 白底细边 + 轻投影 + 品牌色焦点环。新建页面直接写 <select> 即可，无需额外 class。 */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding: 8.5px 34px 8.5px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 15.5px; font-family: inherit; line-height: 1.45;
  color: var(--text); background-color: var(--panel);
  background-image: var(--sel-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  cursor: pointer; outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  text-overflow: ellipsis;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s;
}
select:hover { border-color: rgba(15, 23, 42, .3); }
select:focus, select:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
select:disabled {
  background-color: var(--bg-subtle); color: var(--muted);
  background-image: var(--sel-arrow-dim);
  cursor: not-allowed; box-shadow: none; opacity: .85;
}
/* 展开的选项面板各浏览器可定制有限，至少统一底色与间距，避免深色系统主题下白字白底 */
select option { background: var(--panel); color: var(--text); padding: 7px 10px; font-size: 15.5px; }
select optgroup { background: var(--panel); color: var(--muted); font-size: 14px; }
select[multiple] {
  padding-right: 12px; background-image: none; cursor: default;
  box-shadow: none; min-height: 84px;
}

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(640px 420px at 12% 8%, var(--brand-soft-strong), transparent 62%),
    radial-gradient(560px 380px at 88% 92%, rgba(29, 78, 216, .07), transparent 60%),
    var(--bg);
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 400px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .logo-dot {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; font-size: 25.5px;
  box-shadow: 0 6px 20px var(--brand-glow);
}
.login-brand h1 { font-size: 23px; }
.login-brand .tip { color: var(--muted); font-size: 14.5px; }
.login-card label { display: block; font-size: 15px; color: var(--text-2); margin: 14px 0 6px; }
.login-card input { width: 100%; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; }
.login-card .btn { width: 100%; margin-top: 18px; padding: 11px; }
.divider { text-align: center; color: var(--muted); font-size: 14px; margin: 16px 0 4px; }
.login-error { color: var(--red); font-size: 15px; margin-top: 12px; min-height: 18px; }

/* ---------- modal & toast ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .4);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  animation: fadeIn .16s var(--ease);
}
.modal {
  background: var(--panel);
  border-radius: 14px;
  padding: 24px;
  width: 470px; max-width: 92vw; max-height: 86vh; overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 19px; margin-bottom: 16px; }
.modal label { display: block; font-size: 14.5px; color: var(--text-2); margin: 11px 0 5px; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 15.5px; font-family: inherit;
}
.modal textarea { resize: vertical; min-height: 64px; }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast-item {
  background: #151827; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 15px; box-shadow: var(--shadow);
  animation: slideUp .2s var(--ease);
}
.toast-item.err { background: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 44px 0; font-size: 15.5px; }
.muted { color: var(--muted); font-size: 14px; }
.link-cell a { color: var(--blue); text-decoration: none; }
.link-cell a:hover { text-decoration: underline; }

/* ---------- tabs & toolbar ---------- */
.tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-subtle); border-radius: 11px;
}
.tab {
  padding: 6.5px 16px; border-radius: 8px; cursor: pointer;
  border: none; background: none;
  font-size: 15.5px; color: var(--muted);
  transition: all .15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type="text"] { width: 240px; }

/* ---------- AI 助手 ---------- */
.ai-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ai-panel { display: flex; flex-direction: column; }
.ai-chat {
  min-height: 380px; max-height: 62vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; padding: 4px 2px;
}
.ai-msg { display: flex; }
.ai-msg.user { justify-content: flex-end; }
.ai-msg .bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 12px;
  font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.ai-msg.user .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.ai .bubble { background: var(--bg-subtle); color: var(--text); border-bottom-left-radius: 4px; }
.ai-actions { display: flex; gap: 8px; margin-top: 6px; }
.ai-actions .btn { padding: 5px 12px; font-size: 14.5px; }
.ai-input-row { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }
.ai-input-row textarea {
  flex: 1; min-height: 72px; resize: vertical;
  font-family: inherit; font-size: 15.5px;
}
.ai-btns { display: flex; gap: 8px; }
.ai-btns .btn { height: 40px; }

/* ---------- AI 助手：厂牌色块 ----------
   19 个模型的列表如果只有文字，扫一眼分不出谁是谁。左边放一枚厂牌首字母色块，
   每家的色相固定（--vc），眼睛先认颜色再读字，找 deepseek 不用逐行念。
   色块底色用 color-mix 从主色兑白，省得给 15 家各写一个浅色。 */
.cfg-av {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: .2px;
  background: color-mix(in srgb, var(--vc, #64748b) 12%, #fff);
  color: var(--vc, #64748b);
  border: 1px solid color-mix(in srgb, var(--vc, #64748b) 16%, #fff);
}
.cfg-av.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.v-deepseek { --vc: #2563eb; }
.v-ark { --vc: #7c3aed; }
.v-dashscope { --vc: #4f46e5; }
.v-moonshot { --vc: #475569; }
.v-zhipu { --vc: #0ea5e9; }
.v-siliconflow { --vc: #0d9488; }
.v-hunyuan { --vc: #1d4ed8; }
.v-qianfan { --vc: #c2410c; }
.v-minimax { --vc: #db2777; }
.v-stepfun { --vc: #9333ea; }
.v-spark { --vc: #0891b2; }
.v-baichuan { --vc: #65a30d; }
.v-openrouter { --vc: #059669; }
.v-openai { --vc: #111827; }
.v-custom { --vc: #64748b; }

/* 页签行：左边页签，右边模型下拉 + 重新检测 */
.ai-switch { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ai-switch-gap { flex: 1 1 auto; }
/* 下拉宽度必须显式给：选项是「深度求索 DeepSeek · DeepSeek-V3 对话版」这种长全名，
   交给浏览器算自动宽度会被右侧箭头净空挤成省略号 */
.ai-model-sel { min-width: 248px; max-width: 320px; }
.tab-warn {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 20px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 12px; font-weight: 600; line-height: 1.55; vertical-align: 1px;
}

/* ---------- AI 助手：候选模型对照表 ---------- */
.guide-sub {
  margin: 20px 0 10px; padding-left: 9px; line-height: 1.25;
  border-left: 3px solid var(--brand);
  font-size: 14.5px; font-weight: 650; color: var(--text-2);
}
.ai-cat-wrap { overflow-x: auto; }
.ai-cat { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14.5px; table-layout: fixed; }
.ai-cat th:nth-child(1), .ai-cat td:nth-child(1) { width: 170px; }
.ai-cat th:nth-child(2), .ai-cat td:nth-child(2) { width: 218px; }
.ai-cat th:nth-child(3), .ai-cat td:nth-child(3) { width: auto; }
.ai-cat th:nth-child(4), .ai-cat td:nth-child(4) { width: 332px; }
.ai-cat th {
  padding: 8px 11px; text-align: left; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--bg-subtle); border-bottom: 1px solid var(--border);
}
.ai-cat th:first-child { border-top-left-radius: 8px; }
.ai-cat th:last-child { border-top-right-radius: 8px; }
.ai-cat td { padding: 10px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ai-cat tr:last-child td { border-bottom: none; }
.ai-cat tr.on td { background: var(--brand-soft); }
.cat-vendor { font-weight: 550; }
.cat-mname .badge { margin-left: 7px; vertical-align: 1px; }
.cat-mname { font-weight: 600; margin-bottom: 3px; }
.cat-scene { color: var(--text-2); line-height: 1.6; }
.cat-scene .muted { font-size: 12.5px; margin-top: 2px; }
/* 不给 display:inline-block：长 URL 会按容器宽度 shrink-to-fit，
   结果灰色背景拉满整列像块色斑；保持 inline，背景只包住文字 */
.ai-cat td code {
  font-size: 13px; padding: 1px 6px; border-radius: 4px;
  background: var(--bg-subtle); color: var(--text-2);
}
.cat-url { word-break: break-all; }

/* ---------- AI 助手：模型配置（页面填 Key，脱敏展示） ---------- */
/* 全局没有 .grow 工具类（其它页面都是各自作用域里单独定义），
   这里补上本页需要的几个，否则「撑开」的 span 宽度为 0，按钮会挤在左边 */
.cfg-toolbar .grow, .ai-switch .grow, .cfg-sh .grow { flex: 1 1 auto; min-width: 0; }

/* 工具条：搜索框自带图标（原生 placeholder 太单薄），中间是范围分段，右侧是安全说明 */
.cfg-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cfg-search { position: relative; display: block; flex: none; }
.cfg-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: #97a2b0; pointer-events: none;
}
.cfg-search input {
  width: 268px; max-width: 100%; height: 34px;
  padding: 0 12px 0 32px; font-size: 15px; border-radius: 9px;
}
.cfg-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-subtle); border-radius: 9px; }
.cfg-seg button {
  height: 26px; padding: 0 11px; border: 0; border-radius: 7px;
  background: transparent; font: inherit; font-size: 14.5px; color: var(--text-2);
  cursor: pointer; transition: background .12s, color .12s, box-shadow .12s;
}
.cfg-seg button:hover { color: var(--text); }
.cfg-seg button.on {
  background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .1);
}
.cfg-safe {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted);
  padding: 5px 10px; border-radius: 20px; background: var(--bg-subtle);
}
.cfg-safe code {
  font-size: 12.5px; padding: 0 5px; border-radius: 4px;
  background: #fff; color: var(--text-2);
}

/* 分区标题：文本模型 / 图像模型 */
.cfg-sec + .cfg-sec { margin-top: 24px; }
.cfg-sh { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; padding: 0 2px; }
.cfg-sh-ico {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text);
}
.cfg-sh-ico svg { width: 15px; height: 15px; }
.cfg-sh-l { min-width: 0; }
.cfg-sh h3 { font-size: 16px; font-weight: 650; color: var(--text); line-height: 1.35; }
.cfg-sh-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }
.cfg-sh .cfg-cnt { margin-left: auto; }
.cfg-sh .btn { flex: none; }
.cfg-cnt {
  font-size: 13px; color: var(--muted); padding: 3px 10px; white-space: nowrap;
  border-radius: 20px; background: var(--bg-subtle); font-variant-numeric: tabular-nums;
}
.cfg-cnt b { color: var(--text); font-weight: 650; }
.cfg-cnt.on { background: var(--brand-soft); color: var(--brand-text); }
.cfg-cnt.on b { color: var(--brand-text); }

/* 厂商卡片：一家厂商一格，卡内排模型方块。
   原来的「一行一个模型」19 行长得一模一样，看不出谁和谁是同一家；
   分组之后 DeepSeek 两块在一起、火山方舟两块在一起，扫结构比读文字快。 */
.cfg-vgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px; align-items: stretch;
}
/* 同一行的卡片拉到一样高：卡片高度由「卡里有几个模型」决定，
   不拉齐的话一行里 1 个模型的卡挨着 4 个模型的卡，下边缘会锯齿状起伏。
   拉齐后底边成一条线，方块仍贴顶部排列，多出来的空白当留白。 */
.vcard {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .15s var(--ease);
}
.vcard.live { border-color: rgba(17, 131, 110, .24); }
.vcard-h { display: flex; align-items: center; gap: 10px; padding: 12px 13px 11px; border-bottom: 1px solid var(--border); }
.vcard-hl { flex: 1 1 auto; min-width: 0; }
.vcard-n {
  font-size: 15px; font-weight: 650; letter-spacing: -.1px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vcard-tip {
  margin-top: 1px; font-size: 12.5px; color: var(--muted); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vcard-cnt {
  flex: none; font-size: 12.5px; padding: 2px 8px; border-radius: 20px;
  background: var(--bg-subtle); color: var(--muted); font-variant-numeric: tabular-nums;
}
.vcard-cnt.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.vcard-b { flex: 1 1 auto; padding: 9px; display: flex; flex-direction: column; gap: 6px; }

/* 一个模型 = 一块方块。不再是一行表格：方块是可点的入口，点开是详情弹窗 */
.mtile {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; font: inherit;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.mtile:hover { border-color: var(--brand-soft-strong); background: #fbfdfc; box-shadow: 0 1px 4px rgba(15, 23, 42, .07); }
.mtile:active { transform: scale(.995); }
.mtile-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #cbd5e1; }
.mtile.ok .mtile-dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mtile.off .mtile-dot { background: #b8c2cf; }
.mtile.empty .mtile-dot { width: 8px; height: 8px; background: transparent; border: 1.5px dashed #c2ccd8; }
.mtile.bad .mtile-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.mtile.testbad .mtile-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.mtile-b { flex: 1 1 auto; min-width: 0; display: block; }
.mtile-n {
  display: block; font-size: 14.5px; font-weight: 600; color: var(--text);
  line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtile-id {
  display: block; margin-top: 1px; font-size: 12px; color: #98a3b1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtile-tag { flex: none; font-size: 11.5px; font-weight: 600; padding: 1.5px 6px; border-radius: 5px; }
.mtile.ok .mtile-tag { background: var(--brand-soft); color: var(--brand-text); }
.mtile.off .mtile-tag, .mtile.empty .mtile-tag { background: var(--gray-soft); color: #94a0b0; font-weight: 500; }
.mtile.bad .mtile-tag, .mtile.testbad .mtile-tag { background: var(--red-soft); color: var(--red); }

/* ---------- 配置弹窗（点方块打开） ---------- */
.ai-modal {
  width: 620px; max-width: 94vw; max-height: 88vh; overflow: auto;
  background: var(--panel); border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: slideUp .18s var(--ease);
}
.am-h { display: flex; align-items: center; gap: 11px; padding: 16px 18px 14px; border-bottom: 1px solid var(--border); }
.am-hl { flex: 1 1 auto; min-width: 0; }
.am-t { font-size: 17px; font-weight: 650; letter-spacing: -.2px; line-height: 1.35; word-break: break-word; }
.am-s { margin-top: 2px; font-size: 13px; color: var(--muted); }
.am-x {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: #97a2b0; cursor: pointer;
  transition: background .12s, color .12s;
}
.am-x:hover { background: var(--hover); color: var(--text); }
.am-x svg { width: 13px; height: 13px; }
.am-b { padding: 16px 18px 2px; }
.am-scene {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.am-scene code, .am-f code {
  font-size: 12px; padding: 0 4px; border-radius: 4px;
  background: var(--bg-subtle); color: var(--text-2);
}
.am-f {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px 16px; margin-top: 12px; border-top: 1px solid var(--border);
}
.am-f .grow { flex: 1 1 auto; min-width: 0; }
.am-f .btn { flex: none; }
.am-f .btn[data-act="test"] { color: var(--brand-text); border-color: var(--brand-soft-strong); }
.am-f .btn[data-act="test"]:hover { background: var(--brand-soft); }

/* 表单字段（弹窗内） */
.ce-field { min-width: 0; }
.ce-field label {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-bottom: 5px; font-size: 13px; font-weight: 500; color: var(--text-2);
}
.ce-field label .muted { font-weight: 400; font-size: 12.5px; }
.ce-field input { width: 100%; height: 34px; font-size: 15px; border-radius: 9px; }
.ce-keywrap { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ce-keybox { position: relative; flex: 1 1 auto; min-width: 0; }
.ce-keybox input { padding-right: 38px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3px; }
.ce-eye {
  position: absolute; right: 4px; top: 4px; width: 26px; height: 26px;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: transparent; color: #97a2b0; cursor: pointer;
}
.ce-eye:hover { background: var(--hover); color: var(--text-2); }
.ce-eye svg { width: 15px; height: 15px; }
.ce-eye.on { color: var(--brand); }
.ce-keywrap .btn { flex: none; white-space: nowrap; }
.ce-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px 14px; }
.am-add .ce-grid { grid-template-columns: 1fr 1fr; }

/* 测试结果就摆在弹窗里：toast 三秒就没了，用户回头想看「上次到底报什么错」得有痕迹 */
.ce-status {
  margin-top: 12px; padding: 8px 11px; border-radius: 8px;
  font-size: 14px; line-height: 1.6; word-break: break-word;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ce-status.wait { background: var(--bg-subtle); color: var(--text-2); }
.ce-status.ok { background: var(--green-soft); color: var(--green); }
.ce-status.bad { background: var(--red-soft); color: var(--red); }
.ce-status .sp {
  width: 13px; height: 13px; flex: none; border-radius: 50%;
  border: 2px solid var(--brand-soft-strong); border-top-color: var(--brand);
  animation: aiSpin .8s linear infinite;
}
.ce-tip { font-size: 12.5px; opacity: .8; }

.cfg-foot {
  margin-top: 6px; padding: 0 2px; font-size: 12.5px; color: var(--muted); line-height: 1.8;
}
.cfg-foot b { color: var(--text-2); font-weight: 600; }

.btn.ghost.danger { color: var(--red); }
.btn.ghost.danger:hover { background: var(--red-soft); border-color: rgba(185, 28, 28, .28); }

.ai-need { padding: 22px 24px; }
.ai-need-acts {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.ai-need-acts .hint { font-size: 13px; color: var(--muted); }
.empty.sm { padding: 22px 0; font-size: 14.5px; }

/* ---------- AI 助手：即梦生图 ---------- */
.ai-img-wrap { padding: 16px 18px 18px; }
.ai-img-form textarea {
  width: 100%; min-height: 80px; resize: vertical;
  font-family: inherit; font-size: 15.5px; line-height: 1.65;
}
.ai-img-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.ai-img-bar select { min-width: 176px; }
.ai-img-model { font-size: 14px; color: var(--muted); }
.ai-img-model b { color: var(--text); font-weight: 600; }
.ai-img-model code {
  font-size: 13px; padding: 1px 6px; border-radius: 4px;
  background: var(--bg-subtle); color: var(--text-2);
}
.ai-img-go { margin-left: auto; min-width: 108px; }
.ai-img-samples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ai-img-out { margin-top: 16px; }
.ai-img-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 38px 0; font-size: 15px; color: var(--text-2);
}
.ai-img-loading .sp {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid var(--brand-soft-strong); border-top-color: var(--brand);
  animation: aiSpin .8s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-img-batch + .ai-img-batch { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.ai-img-bh { margin-bottom: 10px; }
.bh-meta { font-size: 14px; color: var(--muted); }
.ai-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.ai-img-cell {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--bg-subtle); transition: box-shadow .15s var(--ease), border-color .15s;
}
.ai-img-cell:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.ai-img-cell img {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #fff;
}
.ai-img-cell figcaption {
  display: flex; gap: 6px; padding: 8px;
  background: var(--panel); border-top: 1px solid var(--border);
}
.ai-img-cell figcaption .btn {
  flex: 1 1 0; justify-content: center; text-align: center;
  text-decoration: none; display: inline-flex; align-items: center;
}
.ai-img-err {
  padding: 14px 16px; border-radius: 10px; font-size: 14.5px; line-height: 1.7;
  background: #fffafa; border: 1px solid rgba(185, 28, 28, .2); color: var(--red);
}
.ai-img-err b { display: block; margin-bottom: 4px; font-size: 15px; }
.ai-img-err .hint { color: var(--muted); margin-top: 6px; }
.ai-img-err code { background: var(--bg-subtle); color: var(--text-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- 灵感广场卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.p-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.p-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p-head b { font-size: 16px; }
.p-content {
  font-size: 14.5px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; flex: 1;
}
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ---------- 图片工具 ---------- */
.it-opts-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; background: var(--bg-subtle); border-radius: 10px; }
.it-opts-row input[type="range"] { vertical-align: middle; }
.it-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 800px) { .it-result-grid { grid-template-columns: 1fr; } }
.it-preview { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.panel label { display: block; font-size: 15px; color: var(--text-2); margin-bottom: 6px; }

/* ---------- 全局搜索 ---------- */
.search-box { position: relative; margin: 0 8px 14px; }
.search-box input { width: 100%; padding: 8px 11px; font-size: 13.5px; }
.search-box input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-panel {
  position: absolute; top: calc(100% + 6px); left: 0; width: 380px; max-height: 420px;
  overflow-y: auto; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: none;
}
.search-panel.open { display: block; }
.search-item {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  padding: 9px 10px; border: none; background: none; border-radius: 8px; cursor: pointer;
  transition: background .15s var(--ease);
}
.search-item:hover { background: var(--brand-soft); }
.si-mod {
  flex: none; font-size: 12px; line-height: 1.6; color: var(--brand-text);
  background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; margin-top: 1px;
}
.si-main { display: flex; flex-direction: column; min-width: 0; }
.si-title { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 16px 12px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- 页头操作区 / 筛选输入 / 日志表 ---------- */
.head-actions { display: flex; gap: 8px; align-items: center; }
.filter-input { min-width: 200px; }
.mono { font-variant-numeric: tabular-nums; font-size: 14.5px; }
.log-summary { font-size: 15px; color: var(--text-2); max-width: 460px; }
.list-foot { margin-top: 10px; }

/* ---------- AI 未配置引导 ---------- */
.guide { padding: 22px 24px; }
.guide-head {
  display: flex; gap: 14px; align-items: flex-start;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.guide-icon {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: var(--brand-soft); display: inline-flex; align-items: center; justify-content: center;
  font-size: 20.5px;
}
.guide-title { font-size: 18px; font-weight: 650; margin-bottom: 4px; }
.guide-desc { font-size: 15px; color: var(--text-2); line-height: 1.7; }
.guide-steps { padding: 4px 0 2px; }
.step { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.step:last-child { border-bottom: none; }
.step-no {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-size: 14.5px; font-weight: 600;
}
.step b { font-size: 15.5px; }
.step p { font-size: 15px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }
.step code, .guide-desc code, .guide-foot code {
  background: var(--bg-subtle); padding: 1px 6px; border-radius: 5px; font-size: 14.5px;
}
.code-block {
  margin-top: 8px; background: #0f172a; color: #e2e8f0; padding: 12px 14px;
  border-radius: 10px; font-size: 14.5px; line-height: 1.7; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.guide-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 14.5px; color: var(--muted);
}
@media (max-width: 900px) { .search-box { display: none; } }

/* 导航项较多（15 项）时允许滚动，避免小屏把底部用户区挤出视口 */
.sidebar nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-bottom: 8px; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ---------- 账号权限 ---------- */
.modal.modal-wide { width: 640px; }
.perm-row { display: flex; gap: 12px; flex-wrap: wrap; }
.perm-col { flex: 1 1 150px; min-width: 140px; }
.perm-col select, .perm-col input { width: 100%; }
.hint { font-size: 14px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.perm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px; margin-top: 8px; padding: 12px;
  background: var(--bg-subtle); border-radius: 10px;
}
.perm-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; cursor: pointer; transition: border-color .15s, background .15s;
}
.perm-item:hover { border-color: var(--brand); }
.perm-item input { padding: 0; margin: 0; width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.perm-item.disabled { opacity: .45; cursor: not-allowed; background: var(--bg); }
.perm-item.disabled:hover { border-color: var(--border); }
.perm-tag { font-style: normal; font-size: 12.5px; color: var(--brand-text); background: var(--brand-soft); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.perm-tools { display: flex; align-items: center; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.perm-tools .tab { padding: 4px 10px; font-size: 14.5px; border: 1px solid var(--border); background: var(--panel); }
.perm-tools .tab:hover { border-color: var(--brand); color: var(--brand-text); }
.perm-tools .hint { margin: 0 0 0 auto; }
.row-dim { opacity: .55; }
.text-red { color: var(--red); }

/* ---------- 财务核算 ---------- */
.fin-bar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 18px;
}
.fin-range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fin-range input[type="date"], .fin-range select { padding: 7px 10px; font-size: 15px; }
.fin-range select { min-width: 132px; }
#fin-body .stat-card .value { font-size: 26.5px; letter-spacing: -.5px; }

/* 预警条 */
.fin-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.fin-alert {
  display: flex; gap: 10px; padding: 12px 15px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel);
}
.fin-alert.red { background: #fcebeb; border-color: rgba(185, 28, 28, .18); }
.fin-alert.amber { background: #faeeda; border-color: rgba(180, 83, 9, .18); }
.fin-alert.info { background: var(--bg-subtle); }
.fa-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--muted); }
.fin-alert.red .fa-dot { background: var(--red); }
.fin-alert.amber .fa-dot { background: var(--amber); }
.fin-alert b { font-size: 15.5px; font-weight: 600; }
.fin-alert p { font-size: 14.5px; color: var(--text-2); margin-top: 4px; line-height: 1.65; }

/* 成本结构条形 */
.fin-struct { display: flex; flex-direction: column; gap: 9px; }
.fin-struct-row {
  /* 首列要放得下「平台及履约费用」六个字（13px × 6 ≈ 78px），72px 会溢到进度条上 */
  display: grid; grid-template-columns: 94px minmax(0, 1fr) 86px 56px;
  gap: 10px; align-items: center; font-size: 15px;
}
.fs-label { color: var(--text-2); white-space: nowrap; }
.fs-track { height: 8px; background: var(--bg-subtle); border-radius: 4px; overflow: hidden; }
.fs-fill { display: block; height: 100%; border-radius: 4px; transition: width .45s var(--ease); }
.fs-amount { text-align: right; font-variant-numeric: tabular-nums; }
.fs-rate { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.fin-struct-total { padding-top: 10px; border-top: 1px solid var(--border); }
.fin-struct-total .fs-fill.pos { background: var(--brand); opacity: .9; }
.fin-struct-total .fs-fill.neg { background: var(--red); }

/* 关键比率 */
.fin-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.fin-kv > div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 15px;
}
.fin-kv b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 费率卡片 */
.fin-param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 12px; max-height: 420px; overflow-y: auto; }
.fin-param-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 15px; background: var(--panel); }
.fin-param-card.off { opacity: .55; }
.fp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fp-head b { font-size: 15.5px; }
.fp-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; font-size: 14.5px; }
.fp-rows > div { display: flex; justify-content: space-between; }
.fp-rows span { color: var(--muted); }
.fp-rows b { font-variant-numeric: tabular-nums; font-weight: 600; }
.fp-foot {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
}
.fp-foot .muted { font-size: 13px; line-height: 1.45; }
.fp-btns { display: flex; gap: 4px; flex: none; }
.fp-btns .tab { padding: 3px 9px; font-size: 14px; border: 1px solid var(--border); }
.fp-btns .tab:hover { border-color: var(--brand); color: var(--brand-text); }
.fp-btns .tab.danger:hover { border-color: var(--red); color: var(--red); }

/* 费率表单 */
.fin-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin: 14px 0; }
.fin-form-grid > div { display: flex; flex-direction: column; gap: 4px; }
.fin-form-grid label { margin: 0; font-size: 14.5px; }
.fin-form-grid .hint { margin: 0; font-size: 13px; }

/* 试算结果 */
.fin-live { margin: 14px 0; padding: 13px 15px; background: var(--bg-subtle); border-radius: 10px; }
.fin-live-head { font-size: 14.5px; color: var(--text-2); margin-bottom: 11px; }
.fin-live-body { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14.5px; color: var(--text-2); }
.fin-live-body b { font-size: 16px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }

.text-green { color: var(--green); }

@media (max-width: 900px) {
  .fin-struct-row { grid-template-columns: 94px minmax(0, 1fr) 78px; }
  .fin-struct-row .fs-rate { display: none; }
  .fin-kv { grid-template-columns: 1fr; }
  .fin-bar { align-items: stretch; }
  .fin-range { width: 100%; }
}

/* 经营数据录入：实际成本折叠区 */
.mt-cost {
  margin: 4px 0 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-subtle);
}
.mt-cost summary { font-size: 14.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.mt-cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 6px; }
.mt-cost-grid > div { display: flex; flex-direction: column; gap: 3px; }
.mt-cost-grid label { margin: 0; font-size: 14px; }

/* =========================================================
 * 妙手导入（js/import.js）
 * ========================================================= */
.im-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.im-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  font-size: 15px; color: var(--muted);
}
.im-step-no {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  background: var(--bg-subtle); color: var(--muted);
}
.im-step.active { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); font-weight: 600; }
.im-step.active .im-step-no { background: var(--brand); color: #fff; }
.im-step.done .im-step-no { background: var(--brand-soft-strong); color: var(--brand-text); }
.im-step-line { flex: 1; min-width: 12px; height: 1px; background: var(--border-strong); max-width: 40px; }

.im-drop {
  border: 2px dashed var(--border-strong); border-radius: 14px;
  padding: 40px 20px; text-align: center; cursor: pointer;
  background: var(--bg-subtle); transition: all .18s var(--ease);
}
.im-drop:hover, .im-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.im-drop-icon { font-size: 39px; line-height: 1; margin-bottom: 10px; }
.im-drop-title { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; }
.im-drop-sub { font-size: 14.5px; color: var(--muted); }

.im-tip {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 14.5px; line-height: 1.85; color: var(--text-2);
}
.im-tip code {
  background: var(--panel); padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border); font-size: 14px;
}

.im-file-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.im-file-name { font-size: 15.5px; font-weight: 600; }
.im-sheet-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.im-mini { padding: 4px 10px !important; font-size: 14px !important; }

.im-map { display: flex; flex-direction: column; }
.im-map-row {
  display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(200px, 1.4fr) 68px;
  gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.im-map-row:last-child { border-bottom: none; }
.im-map-name { display: flex; flex-direction: column; gap: 2px; }
.im-map-name b { font-size: 15px; font-weight: 600; }
.im-map-hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.im-req { color: var(--red); margin-left: 3px; font-weight: 700; }
.im-map-sel { width: 100%; }
.im-map-hit { font-size: 13px; color: var(--muted); text-align: right; }

.im-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.im-opt { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--text-2); }
.im-opt select, .im-opt input { width: 100%; }
.im-check { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.im-check input { margin-top: 2px; flex: none; }

.im-scroll { max-height: 460px; overflow: auto; }
.im-foot { display: flex; justify-content: flex-end; gap: 10px; margin: 4px 0 20px; }

.im-plan {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 14.5px; color: var(--text-2);
}
.im-plan b { color: var(--text); }
.im-warn {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 14.5px; line-height: 1.85;
}
.im-details { margin: 0 0 20px; }
.im-details summary {
  cursor: pointer; font-size: 15px; color: var(--text-2);
  padding: 10px 14px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px;
}

.im-done { text-align: center; padding: 34px 20px; }
.im-done-icon { font-size: 46px; line-height: 1; margin-bottom: 12px; }
.im-done h2 { font-size: 20.5px; margin-bottom: 8px; }
.im-done-sub { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.im-done-kpi { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; font-size: 15px; color: var(--text-2); }
.im-done-kpi b { color: var(--text); font-size: 17px; }

.im-modal-wide { max-width: 960px; width: 92vw; }
.im-td-file { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-fx-form { display: grid; grid-template-columns: 90px 1fr 150px auto; gap: 8px; margin-bottom: 14px; }
@media (max-width: 720px) {
  .im-map-row { grid-template-columns: 1fr; }
  .im-opts { grid-template-columns: 1fr; }
  .im-fx-form { grid-template-columns: 1fr 1fr; }
}

/* ---------- 妙手 API 自动同步 ---------- */
.im-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.im-tab {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 15px;
  transition: all .15s;
}
.im-tab:hover { border-color: var(--brand); color: var(--brand-text); }
.im-tab.active { background: var(--brand-soft); border-color: transparent; color: var(--brand-text); font-weight: 600; }
.panel-title { font-size: 17px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
.panel-count { font-size: 14px; font-weight: 400; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.form-grid label { margin: 0; }
.form-grid input, .form-grid select { width: 100%; }
.form-grid .hint { margin-top: 4px; }
.cell-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.cell-strong { font-weight: 500; }
.stat-card .sub.err { color: var(--red); }

/* =========================================================
 * 客服消息工作台（TikTok Shop）
 * 三栏固定高度：列表 / 聊天 / 买家信息
 * ========================================================= */

/* ---------- 模块页签：买家消息 / 达人消息 ----------
   紧贴标题右侧的分段控件，和列表里的「全部/待回复/超2小时」区分开：
   一级页签切换的是两套完全不同的工作面，所以放在 h1 那一行而不是列表顶部 */
.cs-h1row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cs-mtabs {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; background: var(--gray-soft); border-radius: 9px;
}
.cs-mtabs button {
  height: 27px; padding: 0 13px; border: none; border-radius: 7px;
  background: transparent; color: var(--text-2);
  font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.cs-mtabs button:hover { background: rgba(255, 255, 255, .75); color: var(--text); }
.cs-mtabs button.on {
  background: #fff; color: var(--brand-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .1);
}
.cs-mtabs button:focus-visible { outline: 2px solid var(--brand-glow); outline-offset: 1px; }

/* 达人消息嵌在客服消息里：外层已有页头，纵向可用空间比建联中心高一截，
   沿用 100vh-400px 会在底部空出一大条；按实测 330px 收口，
   正好让「只能回复、不能主动发」那行说明也落在首屏内，不产生整页滚动 */
.cs-im-host .im-wrap { height: calc(100vh - 330px); min-height: 420px; }
/* 紧凑头部：胶囊与按钮排成一行（建联中心那边是标题右侧竖排） */
.im-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.im-hd .v2-chips { margin-top: 0; }
.im-hd > .grow { flex: 1 1 auto; }

.cs-wrap {
  display: grid;
  /* 行高锁成 1fr：默认 min-height:auto 时，内容会把整行撑到几千 px，
     内部滚动区跟着变高、scrollTop 永远是 0，滚轮就完全失效 */
  /* 左右两栏跟着视口走：窄屏不至于挤掉聊天区，宽屏也不留大片空白 */
  grid-template-columns: clamp(280px, 20vw, 340px) minmax(0, 1fr) clamp(280px, 19vw, 336px);
  grid-template-rows: minmax(0, 1fr);
  height: calc(100vh - 200px);
  min-height: 480px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
/* 客服工作台独占整屏：main 默认有 1240px 上限 + 26/32 内边距，
   宽屏上右侧会空出几百 px、底部因 calc(100vh-200px) 又固定漏掉一条。
   进控制台时给 main 加 .main-cs，改成「满宽 + 视口高 + 纵向 flex」，
   让三栏把剩余空间吃满，比例随窗口自适应 */
main.main-cs {
  max-width: none;
  height: 100vh;
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
main.main-cs > .page-head { flex: none; }
main.main-cs > .cs-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
/* min-height:0 让三栏能在 grid 行内收缩，滚动条才会落到列表/消息区上 */
.cs-col {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0; height: 100%;
  overflow: hidden;
}
.cs-list { border-right: 1px solid var(--border); background: #fff; }
.cs-side { border-left: 1px solid var(--border); background: #fff; overflow-y: auto; }

/* 统一细滚动条，避免三栏里出现粗黑滚动条；
   min-height:0 是关键——不写的话 flex 列里的滚动区会被内容撑高，滚轮无效 */
.cs-convs, .cs-msgs, .cs-side {
  min-height: 0;
  scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, .26) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; /* 滚到底不带着整页一起弹 */
}
.cs-convs::-webkit-scrollbar, .cs-msgs::-webkit-scrollbar, .cs-side::-webkit-scrollbar { width: 8px; }
.cs-convs::-webkit-scrollbar-track, .cs-msgs::-webkit-scrollbar-track, .cs-side::-webkit-scrollbar-track { background: transparent; }
.cs-convs::-webkit-scrollbar-thumb, .cs-msgs::-webkit-scrollbar-thumb, .cs-side::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, .22); border-radius: 999px;
}
.cs-convs::-webkit-scrollbar-thumb:hover, .cs-msgs::-webkit-scrollbar-thumb:hover, .cs-side::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, .42);
}

/* 顶部筛选：分段控件（全部 → 待回复 → 超2小时）
   三个选项等宽分段，选中项浮起为白底 + 品牌色，角标显示各自数量 */
.cs-filter {
  display: flex; gap: 2px;
  margin: 6px 12px 0; padding: 3px;
  background: var(--gray-soft);
  border-radius: 9px;
}
.cs-tab {
  flex: 1; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: none; background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 14.5px; line-height: 1;
  padding: 7px 4px; border-radius: 7px; cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.cs-tab:hover { background: rgba(255, 255, 255, .75); color: var(--text); }
.cs-tab.active {
  background: #fff; color: var(--brand-text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .10), 0 1px 6px rgba(15, 23, 42, .06);
}
.cs-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-tab-n {
  flex: none; min-width: 16px;
  font-size: 12px; font-weight: 600; line-height: 1;
  padding: 2px 5px; border-radius: 999px;
  background: rgba(15, 23, 42, .08); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.cs-tab-n:empty, .cs-tab-n.zero { display: none; }
.cs-tab-n.alert { background: var(--amber-soft); color: var(--amber); }
.cs-tab-n.danger { background: var(--red-soft); color: var(--red); }
/* 选中项自身的角标：跟随选中态配色，避免白底上再叠灰底 */
.cs-tab.active .cs-tab-n { background: var(--brand-soft); color: var(--brand-text); }
.cs-tab.active .cs-tab-n.alert { background: var(--amber-soft); color: var(--amber); }
.cs-tab.active .cs-tab-n.danger { background: var(--red-soft); color: var(--red); }

.cs-search { padding: 8px 12px 10px; }

/* 店铺筛选下拉：替换原生默认样式（自绘箭头 + 品牌色焦点环） */
.cs-shopselect {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 8px 34px 8px 14px; font-size: 15px; line-height: 1.4; font-family: inherit;
  color: var(--text); background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23556070' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.cs-shopselect:hover { border-color: var(--brand); }
.cs-shopselect:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
/* 展开后的选项列表各浏览器可定制程度不同，至少把行高与内边距调舒服 */
.cs-shopselect option { padding: 6px 10px; font-size: 15px; }
.cs-search input {
  width: 100%; padding: 7px 11px; font-size: 14.5px;
  border: 1px solid var(--border); border-radius: 6px; background: #f7f8fa; color: var(--text);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.cs-search input:focus { outline: none; border-color: var(--brand); background: #fff; }

/* 会话列表：官方为白底 + 选中浅绿 */
.cs-convs { flex: 1; overflow-y: auto; }
.cs-conv {
  padding: 10px 12px;
  cursor: pointer; border-left: 3px solid transparent;
  display: flex; gap: 10px; align-items: flex-start;
  transition: background .15s var(--ease);
}
.cs-conv-main { flex: 1; min-width: 0; }
.cs-conv:hover { background: #f6f8f7; }
.cs-conv.active { background: #e9fbf3; border-left-color: var(--brand); }
.cs-conv.active .cs-conv-name { color: var(--brand-text); }
.cs-conv.overdue { border-left-color: var(--red); }
.cs-conv.overdue.active { background: var(--red-soft); }
.cs-conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cs-conv-name { font-size: 16px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-conv:has(.cs-unread) .cs-conv-name { font-weight: 600; }
.cs-conv-time { font-size: 13px; color: var(--muted); flex: none; }
.cs-conv-preview {
  font-size: 15px; color: var(--text-2); margin-top: 2px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-me { color: var(--muted); }
.cs-conv-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  margin-top: 5px; font-size: 13px; color: var(--muted);
}
/* meta 左侧：来源标签紧贴说明文字，说明文字超长时省略，不把角标挤走 */
.cs-conv-meta-l { display: flex; align-items: center; gap: 5px; min-width: 0; }
.cs-conv-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-badge {
  display: inline-block; font-size: 12.5px; padding: 1px 7px; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber); flex: none;
  white-space: nowrap;
}
.cs-badge.red { background: var(--red-soft); color: var(--red); }
.cs-badge.ok { background: var(--green-soft); color: var(--green); }

.cs-chat { background: #fff; }
.cs-chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid var(--border); background: #fff;
}
.cs-chat-name { font-size: 18px; font-weight: 600; color: var(--text); }
.cs-chat-sub { font-size: 15px; color: var(--muted); margin-top: 3px; }
.cs-chat-actions { display: flex; gap: 6px; align-items: center; flex: none; }

.cs-msgs { flex: 1; overflow-y: auto; padding: 18px 16px; background: #f6f7f9; }
.cs-msg { display: flex; flex-direction: column; margin-bottom: 12px; }
.cs-msg.out { align-items: flex-end; }
.cs-msg.in { align-items: flex-start; }
.cs-bubble {
  max-width: 76%; padding: 9px 12px; border-radius: 10px;
  font-size: 16px; line-height: 1.65; word-break: break-word; white-space: pre-wrap;
}
/* 官方风格：对方白底，自己发的用浅薄荷绿（不是深绿实底） */
.cs-msg.in .cs-bubble {
  background: #fff; border: 1px solid #e7eaee; color: var(--text);
  border-top-left-radius: 4px;
}
.cs-msg.out .cs-bubble {
  background: #d7f5e7; border: 1px solid #bdeed6; color: #0b4d38;
  border-top-right-radius: 4px;
}
.cs-msg-time { font-size: 13px; color: var(--muted); margin-top: 4px; }
/* 买家消息的中文译文：浅青底小字挂在原气泡下，语言代码标在末尾 */
.cs-msg-tr {
  margin-top: 4px;
  max-width: 76%;
  padding: 5px 10px;
  font-size: 15px; line-height: 1.6; color: var(--text-2);
  background: var(--brand-soft);
  border-radius: 8px 10px 10px 4px;
  word-break: break-word;
}
.cs-msg-tr:empty { display: none; }
.cs-msg-tr.err { background: var(--red-soft); color: var(--red); font-size: 14px; }
.cs-tr-lang {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 11.5px; line-height: 15px; color: var(--brand-text);
  background: rgba(255, 255, 255, .7); border-radius: 4px; vertical-align: 1px;
}
/* 输入框上方的「译成买家语言」按钮 */
.cs-tr-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 8px; padding: 4px 10px; font-size: 14px; cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.cs-tr-btn:hover { border-color: var(--brand); color: var(--brand-text); }
.cs-tr-btn:disabled { opacity: .55; cursor: default; }
/* 新消息提醒开关：开启时带品牌色并微微呼吸 */
.cs-bell.on { color: var(--brand-text); border-color: var(--brand-soft-strong); }
/* 我方消息署名：昵称 + 小头像，右对齐贴在气泡上方（对齐卖家中心） */
.cs-msg-byline {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  margin: 8px 0 3px; font-size: 13px; color: var(--muted);
}
.cs-avatar.sm { width: 20px; height: 20px; font-size: 11.5px; }
/* 会话列表买家标签：灰色小圆角 pill（常客 / 近期客户 / 物流） */
.cs-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.cs-tag {
  padding: 1px 7px; font-size: 12px; line-height: 17px;
  color: var(--text-2); background: var(--gray-soft);
  border: 1px solid var(--border); border-radius: 999px;
}
/* 聊天里的商品/优惠券富卡片（对齐卖家中心样式） */
.cs-card {
  width: min(300px, 76%); padding: 10px 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
}
.cs-card-head { font-size: 15.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.cs-card-body { display: flex; gap: 10px; align-items: flex-start; }
.cs-card-thumb {
  width: 56px; height: 56px; flex: none; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: #f4f6f8;
}
.cs-card-thumb.ghost { display: flex; align-items: center; justify-content: center; font-size: 25.5px; }
.cs-card-info { flex: 1; min-width: 0; }
.cs-card-title {
  font-size: 15.5px; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-card-price { font-size: 16px; font-weight: 650; color: var(--brand-text); margin-top: 4px; }
.cs-card-sub { font-size: 14px; color: var(--muted); margin-top: 3px; }
/* 优惠券卡片：粉色券面 */
.cs-cpn-mini {
  background: #fdf2f1; border-radius: 8px; padding: 10px 12px;
  border: 1px dashed rgba(185, 28, 28, .18);
}
.cs-cpn-mini.pending { border-style: solid; }
.cs-cpn-mini-tag {
  display: inline-block; padding: 1px 8px; font-size: 12px; line-height: 17px;
  color: var(--red); background: #fff; border: 1px solid rgba(185, 28, 28, .25); border-radius: 999px;
}
.cs-cpn-mini-amt { font-size: 18.5px; font-weight: 650; color: var(--text); margin: 6px 0 4px; }
.cs-cpn-mini-row { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.cs-cpn-mini-scope {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(185, 28, 28, .18);
  font-size: 12.5px; color: var(--text-2);
}

.cs-compose { border-top: 1px solid var(--border); padding: 12px 18px 14px; background: #fff; }
.cs-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.cs-quick-btn {
  font-size: 14.5px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2); cursor: pointer;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.cs-quick-btn:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.cs-quick-btn.ghost { border-style: dashed; color: var(--muted); }
.cs-compose textarea {
  width: 100%; min-height: 72px; max-height: 150px; resize: vertical;
  padding: 10px 12px; font-size: 16px; line-height: 1.6;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
  font-family: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.cs-compose textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cs-compose textarea::placeholder { color: var(--muted); }
.cs-compose-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.cs-compose-bar .hint { font-variant-numeric: tabular-nums; }
.cs-compose-bar .btn { min-width: 78px; }

.cs-side-block { padding: 16px; border-bottom: 1px solid var(--border); }
/* 侧栏空态：插画居中 + 标题 + 补充说明 */
.cs-side-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 56px 14px 44px; text-align: center;
}
.cse-title { font-size: 15px; font-weight: 500; color: var(--text-2); }
.cse-sub { font-size: 12.5px; color: var(--muted); line-height: 1.8; max-width: 200px; }
.cs-side-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 10px;
}
.cs-side-title::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--brand); flex: none;
}
.cs-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; margin-bottom: 7px; color: var(--text-2); }
.cs-kv b { color: var(--text); font-weight: 500; text-align: right; }
/* 订单卡片：官方白底卡片 + 商品缩略图 */
.cs-order {
  padding: 10px; margin-bottom: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
}
.cs-order:last-of-type { margin-bottom: 0; }
.cs-order-body { display: flex; gap: 9px; align-items: flex-start; }
.cs-order-thumb {
  width: 46px; height: 46px; flex: none; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--border); background: #fff;
}
.cs-order-info { flex: 1; min-width: 0; }
.cs-order-sn { font-size: 13px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2px; }
.cs-order-meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.cs-order-item { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 买家头像（有图用图，无图回退首字母色块） */
.cs-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--brand-soft-strong); color: var(--brand-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; user-select: none;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}
.cs-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-avatar.sm { width: 30px; height: 30px; font-size: 14px; }
.cs-avatar.lg { width: 44px; height: 44px; font-size: 19.5px; }

/* ---------- 右侧栏三页签：订单 / 商品 / 优惠券 ---------- */
.cs-col.cs-side { overflow: hidden; } /* 覆盖 overflow-y:auto，滚动交给 .cs-side-scroll */
.cs-side-tabs {
  display: flex; flex: none; background: #fff;
  border-bottom: 1px solid var(--border); padding: 0 8px; gap: 2px;
}
.cs-side-tab {
  flex: 1; border: none; background: none; cursor: pointer;
  font-size: 15px; color: var(--text-2); padding: 11px 4px 9px;
  border-bottom: 2px solid transparent;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.cs-side-tab:hover { color: var(--text); }
.cs-side-tab.active { color: var(--brand-text); font-weight: 600; border-bottom-color: var(--brand); }
.cs-side-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.cs-side-buyer { border-bottom: none; padding-bottom: 6px; }

/* 达人会话的侧栏：档案键值 + 建联动作 */
.cs-side-sec {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .4px; text-transform: none;
  padding: 14px 14px 6px;
}
.cs-side-kv {
  display: flex; align-items: baseline; gap: 10px;
  padding: 5px 14px; font-size: 14.5px; line-height: 1.6;
}
.cs-side-kv .k { flex: none; width: 68px; color: var(--text-2); }
.cs-side-kv .v { flex: 1; min-width: 0; color: var(--text); word-break: break-all; }
.cs-copy {
  cursor: pointer; border-bottom: 1px dashed var(--border-strong);
  font-variant-numeric: tabular-nums;
}
.cs-copy:hover { color: var(--brand-text); border-bottom-color: var(--brand); }

/* 订单页签 */
.cs-side-filterbar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fff;
  position: sticky; top: 0; z-index: 1;
}
.cs-oc-filter { width: 108px; flex: none; padding: 7px 8px !important; font-size: 14.5px !important; }
.cs-search-inline {
  flex: 1; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.cs-search-inline:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cs-search-inline span { font-size: 14px; opacity: .6; }
.cs-search-inline input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-size: 14.5px; padding: 8px 0; color: var(--text);
}
.cs-side-status {
  font-size: 15.5px; font-weight: 700; color: var(--text);
  padding: 14px 14px 8px; background: #fff;
}
.cs-order-card {
  margin: 0 14px 10px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.cs-oc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cs-oc-sn {
  font-size: 14px; color: var(--text); cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-oc-sn:hover { color: var(--brand-text); }
.cs-oc-time { font-size: 12.5px; color: var(--muted); flex: none; }
.cs-oc-actions { margin-top: 8px; }
.cs-send-pill {
  border: none; cursor: pointer; border-radius: 7px;
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600; padding: 5px 12px;
  transition: filter .15s var(--ease), transform .05s var(--ease);
}
.cs-send-pill:hover { filter: brightness(1.08); }
.cs-send-pill:active { transform: scale(.97); }
.cs-send-pill:disabled { opacity: .6; cursor: default; }
.cs-oc-prod {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border);
}
.cs-oc-thumb {
  width: 44px; height: 44px; flex: none; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--border); background: #fff;
}
.cs-oc-pinfo { flex: 1; min-width: 0; }
.cs-oc-ptitle {
  font-size: 14px; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-oc-ptitle b { font-weight: 600; }
.cs-oc-price { font-size: 14px; color: var(--text-2); margin-top: 3px; }
.cs-oc-sum {
  margin-top: 8px; font-size: 14px; color: var(--text-2);
  text-align: right; padding-top: 7px; border-top: 1px solid var(--border);
}
.cs-oc-sum b { color: var(--text); }
.cs-oc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted); margin-top: 6px;
}
.cs-oc-row b { color: var(--text-2); font-weight: 500; }
.cs-refund-tag {
  color: #b42318; background: #fef3f2; border: 1px solid #fecdca;
  border-radius: 999px; padding: 1px 8px; font-size: 12px;
}

/* 商品页签 */
.cs-side-search { margin: 10px 14px 4px; }
.cs-prod {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 10px 14px 0; padding: 10px 0 4px;
  border-bottom: 1px solid var(--border);
}
.cs-prod:last-of-type { border-bottom: none; }
.cs-prod-thumb {
  width: 62px; height: 62px; flex: none; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: #fff;
}
.cs-prod-info { flex: 1; min-width: 0; }
.cs-prod-title {
  font-size: 14.5px; color: var(--text); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-prod-price { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 4px; }
.cs-prod-stock { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cs-prod-btns { display: flex; flex-direction: column; gap: 6px; flex: none; align-items: stretch; }
.cs-ghost-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 7px; font-size: 13px; padding: 4px 10px; cursor: pointer;
  white-space: nowrap; transition: border-color .15s var(--ease), color .15s var(--ease);
}
.cs-ghost-btn:hover { border-color: var(--brand); color: var(--brand-text); }

/* 优惠券页签 */
.cs-cpn-note { font-size: 13px; color: var(--muted); padding: 12px 14px 0; }
.cs-cpn {
  margin: 10px 14px 0; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.cs-cpn-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cs-cpn-tag {
  flex: none; font-size: 12px; color: #c01048;
  border: 1px solid #ffadc6; background: #fff0f4;
  border-radius: 6px; padding: 2px 7px;
}
.cs-cpn-title {
  font-size: 14px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-cpn-disc { font-size: 22px; font-weight: 700; color: var(--text); margin: 9px 0 8px; }
.cs-cpn-row { font-size: 13px; color: var(--muted); margin-top: 3px; }
.cs-cpn-row b { color: var(--text-2); font-weight: 500; }
.cs-cpn-btns { display: flex; justify-content: flex-end; margin-top: 8px; }

/* 未读角标：官方用品牌绿圆点计数 */
.cs-unread {
  flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; align-self: center;
}

/* 消息区：日期分隔 / 系统消息 / 图片 */
.cs-day {
  text-align: center; font-size: 12.5px; color: var(--text-2); font-weight: 500;
  margin: 16px 0 12px; position: relative;
}
.cs-day::before, .cs-day::after {
  content: ""; position: absolute; top: 50%; width: 48px; height: 1px; background: var(--border);
}
.cs-day::before { left: calc(50% - 84px); }
.cs-day::after { right: calc(50% - 84px); }
.cs-msg-sys {
  width: fit-content; max-width: 80%; margin: 6px auto 12px;
  padding: 4px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
  font-size: 13px; color: var(--muted); text-align: center;
}
.cs-msg-img {
  max-width: min(260px, 60vw); max-height: 220px; border-radius: 12px; cursor: zoom-in;
  display: block; border: 1px solid var(--border); background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}
.cs-older {
  display: block; margin: 0 auto 12px; font-size: 14px; padding: 4px 14px;
  border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text-2); cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.cs-older:hover { border-color: var(--brand); color: var(--brand-text); }
.cs-older:disabled { opacity: 0.55; cursor: default; }

/* 订单卡增强 */
.cs-order-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cs-ostat { font-size: 12.5px; padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--text-2); flex: none; }
.cs-ostat.paid { background: var(--amber-soft); color: var(--amber); }
.cs-ostat.done { background: var(--green-soft); color: var(--green); }
.cs-ostat.bad { background: var(--red-soft); color: var(--red); }
.cs-order-money { font-size: 13px; color: var(--text); margin-top: 3px; }
.cs-order-money b { font-weight: 600; }
.cs-order-refs { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cs-refund-tag { color: var(--red); }

@media (max-width: 1100px) {
  .cs-wrap { grid-template-columns: 300px minmax(0, 1fr); }
  .cs-side { display: none; }
}

/* ---------- 升级记录（时间线） ---------- */
.rel-timeline { position: relative; padding-left: 26px; }
.rel-timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border); border-radius: 2px;
}
.rel-item { position: relative; margin-bottom: 14px; }
.rel-dot {
  position: absolute; left: -24px; top: 18px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); border: 2.5px solid #fff;
  box-shadow: 0 0 0 1.5px var(--brand-soft-strong);
}
.rel-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.rel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rel-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14.5px; font-weight: 650; color: var(--brand-text);
  background: var(--brand-soft); border-radius: 6px; padding: 2px 8px;
}
.rel-title { font-size: 15.5px; font-weight: 600; color: var(--text); flex: 1; min-width: 160px; }
.rel-date { font-size: 14px; color: var(--muted); }
.rel-actions { display: flex; gap: 4px; }
.rel-lines { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14.5px; line-height: 1.9; }
.rel-lines li::marker { color: var(--brand-text); }

/* ---------- 达人建联工作台 ---------- */
.inf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .inf-layout { grid-template-columns: 1fr; } }
.inf-left { min-width: 0; }
.inf-compose { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.inf-compose label { display: block; font-size: 14px; color: var(--text-2); margin: 10px 0 5px; }
.inf-compose select, .inf-compose input, .inf-compose textarea {
  width: 100%; box-sizing: border-box;
}
.inf-vars { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.inf-name { font-size: 15.5px; font-weight: 600; color: var(--text); }
.inf-left .table-wrap { max-height: 640px; overflow: auto; }

/* ---------- 达人建联：TikTok 联盟集成（Tabs / 达人库 / 样品 / 商品 / 业绩） ---------- */
.aff-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.aff-shop { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.aff-shop .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.aff-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0 16px; padding: 4px; background: var(--bg-subtle); border-radius: 12px; width: fit-content; max-width: 100%; }
.aff-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-2); font-size: 15.5px; font-weight: 600; cursor: pointer;
  transition: all .18s var(--ease); font-family: inherit; white-space: nowrap;
}
.aff-tab:hover { background: rgba(255, 255, 255, .8); color: var(--text); }
.aff-tab.active { background: var(--panel); color: var(--brand-text); box-shadow: var(--shadow-sm); }
.aff-tab .n { font-size: 13px; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: var(--gray-soft); color: var(--muted); }
.aff-tab.active .n { background: var(--brand-soft); color: var(--brand-text); }
.aff-tab .n.alert { background: var(--amber-soft); color: var(--amber); }

.aff-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.aff-bar input[type="search"] { max-width: 240px; }
.aff-bar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.aff-bar .grow { flex: 1; }

.aff-sync { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px;
  border: 1px solid var(--brand-soft-strong); background: var(--brand-soft); border-radius: var(--radius);
  font-size: 14.5px; color: var(--brand-text); }
.aff-sync .spin { width: 13px; height: 13px; border: 2px solid var(--brand-soft-strong); border-top-color: var(--brand);
  border-radius: 50%; animation: affspin .8s linear infinite; }
@keyframes affspin { to { transform: rotate(360deg); } }

.aff-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 16px; }
.aff-kpi .k { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.aff-kpi .k .lb { font-size: 14px; color: var(--text-2); }
.aff-kpi .k .v { font-size: 25.5px; font-weight: 700; letter-spacing: -.4px; margin-top: 6px; }
.aff-kpi .k .sb { font-size: 13px; color: var(--muted); margin-top: 4px; }
.aff-kpi .k.hl .v { color: var(--brand-text); }

.aff-2col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1100px) { .aff-2col { grid-template-columns: 1fr; } }

.aff-cap { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.aff-cap:last-child { border-bottom: 0; }
.aff-cap .st { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; margin-top: 1px; }
.aff-cap .st.ok { background: var(--green-soft); color: var(--green); }
.aff-cap .st.no { background: var(--gray-soft); color: var(--muted); }
.aff-cap .nm { font-size: 15px; font-weight: 600; color: var(--text); }
.aff-cap .ds { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.aff-cap code { font-size: 12.5px; background: var(--bg-subtle); padding: 1px 5px; border-radius: 4px; color: var(--text-2); }

.aff-rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.aff-rank:last-child { border-bottom: 0; }
.aff-rank .no { width: 18px; font-size: 14px; font-weight: 700; color: var(--muted); }
.aff-rank .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg-subtle); flex: none; }
.aff-rank .info { flex: 1; min-width: 0; }
.aff-rank .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aff-rank .sb { font-size: 12.5px; color: var(--muted); }
.aff-rank .val { font-size: 15px; font-weight: 700; color: var(--brand-text); text-align: right; }

/* 达人库表格 */
.aff-cr { display: flex; align-items: center; gap: 9px; min-width: 0; }
.aff-cr .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--bg-subtle); flex: none; }
.aff-cr .tx { min-width: 0; }
.aff-cr .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.aff-cr .hd { font-size: 13px; color: var(--muted); }
.aff-lv { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; padding: 1px 6px;
  border-radius: 5px; background: var(--brand-soft); color: var(--brand-text); }
.aff-lv.l0 { background: var(--gray-soft); color: var(--muted); }
.aff-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0 2px; font-size: 14.5px; color: var(--text-2); }

/* 样品申请 */
.aff-smp { display: flex; gap: 10px; align-items: flex-start; }
.aff-smp img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--bg-subtle); flex: none; }
.aff-smp .t { font-size: 14.5px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.aff-smp .s { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* 合作商品卡 */
.aff-goods { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 12px; }
.aff-good { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel);
  display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.aff-good:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.aff-good .im { aspect-ratio: 1/1; background: var(--bg-subtle); overflow: hidden; }
.aff-good .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aff-good .bd { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.aff-good .tt { font-size: 14.5px; line-height: 1.5; font-weight: 600; height: 38px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.aff-good .mt { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.aff-good .rate { font-size: 17px; font-weight: 800; color: var(--pink, #c2185b); letter-spacing: -.3px; }
.aff-good .rate small { font-size: 11.5px; font-weight: 600; }

/* 达人详情抽屉 */
.aff-drawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(15, 23, 42, .32); }
.aff-drawer .box { width: min(760px, 100%); height: 100%; background: var(--panel); overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: affslide .26s var(--ease); }
@keyframes affslide { from { transform: translateX(28px); opacity: .6; } to { transform: none; opacity: 1; } }
.aff-drawer .hd { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 16px 20px;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.aff-drawer .hd .av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--bg-subtle); }
.aff-drawer .hd .nm { font-size: 18.5px; font-weight: 700; }
.aff-drawer .hd .hd2 { font-size: 14px; color: var(--muted); margin-top: 2px; }
.aff-drawer .bd { padding: 16px 20px 40px; }
.aff-sec { margin-bottom: 18px; }
.aff-sec h4 { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.aff-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.aff-cell { background: var(--bg-subtle); border-radius: 8px; padding: 9px 11px; }
.aff-cell .l { font-size: 12.5px; color: var(--muted); }
.aff-cell .v { font-size: 16px; font-weight: 700; margin-top: 3px; }
.aff-bars { display: flex; flex-direction: column; gap: 6px; }
.aff-bar-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.aff-bar-row .lb { width: 92px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aff-bar-row .tr { flex: 1; height: 7px; border-radius: 4px; background: var(--bg-subtle); overflow: hidden; }
.aff-bar-row .fl { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), #35b79c); }
.aff-bar-row .pc { width: 44px; text-align: right; color: var(--muted); }

/* 达人库操作按钮不换行（两个中文按钮挤在窄列会竖排） */
.row-actions button { white-space: nowrap; }
.aff-cr-table th:last-child, .aff-cr-table td:last-child { white-space: nowrap; }

/* 进度条填充：span 默认 inline，高度撑不起来 */
.aff-bar-row .fl { display: block; height: 100%; }

/* ---------- 订单管理 ---------- */
.nav-item { position: relative; }
.nav-badge {
  position: absolute; top: 6px; right: 10px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red, #e5484d); color: #fff; font-size: 12px;
  font-weight: 700; display: grid; place-items: center; line-height: 1;
  box-shadow: 0 1px 4px rgba(229, 72, 77, .4);
}
.ord-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.ord-item:last-child { border-bottom: 0; }
.ord-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bg-subtle); flex: none; }
.ord-item .t { flex: 1; min-width: 0; }
.ord-item .nm { font-size: 15px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ord-item .sku { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.ord-item .p { text-align: right; flex: none; }
.ord-msg { background: var(--bg-subtle); border-radius: var(--radius); padding: 12px 14px;
  font-size: 15px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.aff-bar input[type="search"] { max-width: 300px; }
.btn.sm { padding: 5px 11px; font-size: 14.5px; border-radius: 8px; }

/* ---------- 订单卡片（妙手风格） ---------- */
.ord-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden; transition: box-shadow .18s var(--ease);
}
.ord-card:hover { box-shadow: var(--shadow-sm); }
.ord-hd {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 14px; background: var(--bg-subtle); border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-2);
}
.ord-hd .ord-tag {
  font-size: 12.5px; font-weight: 700; color: var(--brand-text);
  background: var(--brand-soft); padding: 1px 7px; border-radius: 5px; flex: none;
}
.ord-hd b { color: var(--text); font-weight: 600; }
.ord-ck { display: flex; align-items: center; cursor: pointer; }
.ord-ck input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.ord-bd { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(180px, 1fr) minmax(230px, 1.1fr); gap: 0; }
@media (max-width: 1100px) { .ord-bd { grid-template-columns: 1fr; } }
.ordc-goods { padding: 10px 14px; border-right: 1px dashed var(--border); min-width: 0; }
.ordc-mid { padding: 10px 14px; border-right: 1px dashed var(--border); min-width: 0; }
.ordc-right { padding: 10px 14px; min-width: 0; }
.ord-gd { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.ord-gd:first-child { padding-top: 2px; }
.ord-gd:last-of-type { border-bottom: 0; }
.ord-gd img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--bg-subtle); flex: none; }
.ord-gd .t { flex: 1; min-width: 0; }
.ord-gd .nm { font-size: 14.5px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ord-gd .sku { font-size: 13px; color: var(--text-2); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-mtable { border-collapse: collapse; flex: none; font-size: 13px; }
.ord-mtable th { font-weight: 500; color: var(--muted); padding: 2px 8px; text-align: right; border-bottom: 1px solid var(--border); }
.ord-mtable td { padding: 3px 8px; text-align: right; white-space: nowrap; }
.ord-disc { color: var(--red, #e5484d); }
.ord-paid { font-weight: 700; color: var(--text); }
.ord-gd .ord-msg, .ordc-goods .ord-msg { margin-top: 8px; background: var(--amber-soft, #fff7e0); font-size: 14px; }
.ord-mrow { display: flex; gap: 8px; font-size: 14px; padding: 3px 0; line-height: 1.55; }
.ord-mrow .lb { flex: none; width: 64px; color: var(--muted); font-size: 13px; }
.ord-mrow > span:last-child { color: var(--text-2); min-width: 0; word-break: break-all; }
.ord-amount { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.ord-arow { display: flex; justify-content: space-between; font-size: 14px; padding: 2.5px 0; color: var(--text-2); }
.ord-arow.ord-total {
  border-top: 1px dashed var(--border); margin-top: 3px; padding-top: 6px;
  font-size: 16px; font-weight: 800; color: var(--text);
}
.ord-acts { display: flex; gap: 8px; margin-top: 8px; }
.aff-bar select { max-width: 180px; }

/* 订单卡列宽修正：商品列被金额表挤扁时标题会消失 */
.ord-bd { grid-template-columns: minmax(0, 2.1fr) minmax(175px, 1fr) minmax(248px, 1.12fr); }
.ord-gd .t { flex: 1 1 200px; min-width: 170px; }
.ord-mtable { font-size: 12.5px; }
.ord-mtable th { padding: 2px 5px; }
.ord-mtable td { padding: 3px 5px; }
.ordc-right { min-width: 236px; }

/* 订单卡：空间不足时金额表换行到标题下方，绝不横向溢出压住中列 */
.ord-gd { flex-wrap: wrap; row-gap: 6px; }
.ord-gd .t { flex: 1 1 230px; min-width: 210px; }
.ord-mtable { flex: 1 1 200px; max-width: 300px; margin-left: auto; }
.ordc-mid .ord-mrow > span:last-child { word-break: break-word; }

/* ---------- 订单批量条 / 申请运单号 / 代打包弹窗 ---------- */
.ord-bulkbar {
  display: none; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 10px; border-radius: var(--radius);
  background: var(--brand-soft); border: 1px solid var(--brand-soft-strong);
  font-size: 14.5px; color: var(--brand-text);
  position: sticky; top: 0; z-index: 8;
}
.ord-bulkbar.show { display: flex; }
.ord-bulkbar .n { font-weight: 600; }
.ord-bulkbar .n b { font-size: 16px; }
.ord-bulkbar .grow { flex: 1; }

.ord-modal {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgba(15, 23, 42, .38); padding: 24px;
}
.ord-modal .box {
  width: min(620px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: ordpop .2s var(--ease);
}
@keyframes ordpop { from { transform: translateY(10px) scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.ord-modal .hd {
  display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.ord-modal .hd .nm { font-size: 17px; font-weight: 700; }
.ord-modal .hd .hd2 { font-size: 14px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.ord-modal .bd { padding: 14px 18px 16px; overflow-y: auto; }
.ord-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 16px; padding: 12px 0 2px; border-top: 1px solid var(--border);
  position: sticky; bottom: -16px; background: var(--panel); z-index: 2;
}
.ord-kv { display: flex; align-items: center; justify-content: space-between; font-size: 15px; padding: 5px 0; }
.ord-kv .ok { color: var(--green); }
.ord-sub { font-size: 14px; font-weight: 700; color: var(--text-2); margin: 12px 0 6px; }
.ord-mini {
  max-height: 190px; overflow-y: auto; background: var(--bg-subtle); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; line-height: 1.85;
}
.ord-mini > div { display: flex; gap: 8px; align-items: baseline; }
.ord-mini .muted { font-size: 13px; }
.ord-prog { display: flex; align-items: center; gap: 9px; font-size: 15px; padding: 8px 0; }
.ord-prog.done { color: var(--green); font-weight: 600; }
.ord-prog .spin {
  width: 14px; height: 14px; border: 2px solid var(--brand-soft-strong);
  border-top-color: var(--brand); border-radius: 50%; animation: affspin .8s linear infinite;
}
.ord-field { display: block; margin-bottom: 12px; }
.ord-field > span { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 5px; }
.ord-field input, .ord-field textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: var(--panel); color: var(--text); resize: vertical;
}
.ord-field input:focus, .ord-field textarea:focus { outline: none; border-color: var(--brand); }

/* ---------- 提交代打包（对齐妙手 ERP 版式） ---------- */
.ord-modal.wide .box { width: min(940px, 100%); }
.ord-line { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.ord-line .btn { flex: none; margin-bottom: 1px; }
.ord-ffcard {
  border: 1px solid var(--border); background: var(--bg-subtle); border-radius: 10px;
  padding: 10px 12px; margin: 2px 0 4px; font-size: 14.5px; line-height: 1.7;
}
.ord-ffcard.empty { color: var(--muted); }
.ord-ffcard .ln1 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; flex-wrap: wrap; }
.ord-ffcard .ln1 .tag {
  font-size: 12.5px; color: var(--green); background: var(--green-soft);
  border-radius: 999px; padding: 1px 8px; font-weight: 600;
}
.ord-ffcard .ln2 { color: var(--text-2); margin-top: 3px; }
.ord-ffcard .ln3 { color: var(--muted); font-size: 14px; word-break: break-all; }
.ord-ffcard .ln4 { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ord-warn {
  font-size: 14px; color: var(--red); background: var(--red-soft);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 10px;
}
.ord-radios {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 15px; margin: 12px 0 6px;
}
.ord-radios .lbl { font-size: 14.5px; color: var(--text-2); min-width: 56px; }
.ord-radios label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ord-radios .muted { font-size: 13px; }
.ord-ptable { border: 1px solid var(--border); border-radius: 10px; overflow-y: auto; max-height: 320px; margin: 8px 0 6px; }
.ord-ptable .ph, .ord-ptable .pr {
  display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) minmax(0, .95fr) minmax(0, .85fr);
  gap: 10px; padding: 8px 12px; align-items: center;
}
.ord-ptable .ph { background: var(--bg-subtle); font-size: 14px; color: var(--text-2); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.ord-ptable .pb { max-height: none; overflow: visible; }
.ord-ptable .pr { border-top: 1px solid var(--border); }
.ord-ptable .pi { display: flex; gap: 9px; min-width: 0; }
.ord-ptable .pi img, .ord-ptable .noimg {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none;
  background: var(--bg-subtle); font-size: 11.5px; color: var(--muted);
  display: grid; place-items: center;
}
.ord-ptable .px { min-width: 0; }
.ord-ptable .nm {
  font-size: 14.5px; line-height: 1.4; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ord-ptable .sku { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ord-ptable .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ord-ptable .pc input {
  width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 14.5px; font-family: inherit; background: var(--panel); color: var(--text);
}
.ord-ptable .pc input:focus { outline: none; border-color: var(--brand); }
.ord-ptable .pc input[readonly] { background: var(--bg-subtle); color: var(--text-2); }
.ord-ptable .pc input.miss { border-color: var(--red); color: var(--red); }
.ord-ptable .pc input {
  width: 100%; height: 30px; padding: 0 9px; border: 1px solid #dfe3e8; border-radius: 5px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
.ord-ptable .pc input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(17,131,110,.1); }
.ord-ptable .pc input[readonly] { background: #f7f8fa; color: #6b7280; }
.ord-ptable .pc input.miss { border-color: #f0b4ae; background: #fffafa; }
/* 提交仓库弹窗：信息条 + 分区标题 + 录入方式卡片，对齐妙手 ERP 的版式 */
.ord-hintbar {
  display: flex; gap: 8px; align-items: flex-start;
  background: #f2f8f5; border: 1px solid #d8e8df; color: #2f6b57;
  border-radius: 8px; padding: 9px 11px; font-size: 14px; line-height: 1.65; margin-bottom: 6px;
}
.ord-hintbar b { color: #1c5a46; }
.ord-sec { margin: 14px 0 10px; }
.ord-sec > .t {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 700; color: #374151; margin-bottom: 8px;
}
.ord-sec > .t::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }
.ord-way { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.ord-way label {
  display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer;
}
.ord-way label:hover { border-color: #b9d8cd; }
.ord-way label.on { border-color: var(--brand); background: #f5fbf8; box-shadow: 0 0 0 2px rgba(17,131,110,.08); }
.ord-way input { margin-top: 2px; accent-color: var(--brand); flex: none; }
.ord-way .wt { font-size: 14.5px; font-weight: 600; color: #1f2937; }
.ord-way .wd { display: block; font-size: 13px; color: #9aa3af; margin-top: 2px; line-height: 1.5; }
.ord-way .wt { display: block; }
.ord-phint { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ord-check {
  display: flex; align-items: flex-start; gap: 7px; font-size: 14.5px;
  color: var(--text-2); margin: 12px 0 6px; cursor: pointer;
}
.ord-check input { margin-top: 2px; }
.ord-field select {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: var(--panel); color: var(--text);
}
.ord-field select:focus { outline: none; border-color: var(--brand); }

/* =========================================================
 * 订单列表（版式对齐妙手 ERP「订单处理」：工具条 + 六列订单行）
 * ========================================================= */
.ox-head, .ox-grid {
  /* 最小值要能塞进 1280 屏（内容区约 1000px）：六列最小和 984。
     出货列不能低于 138 —— 再窄「卖家自发货」会按字竖排，比横向滚动更难看 */
  /* 列宽比例对齐妙手（商品 33 / 出货 12.5 / 金额 12.7 / 收件 14.6 / 包裹 10.7 / 时间 16.5）。
     不能用 minmax(min, Nfr)：金额和包裹列被最小值顶住后不参与 fr 分配，
     剩余空间会全灌给商品列（实测过 42%，比原来更失衡）。纯百分比才稳定。 */
  --ox-cols: 33% 12.5% 12.7% 14.6% 10.7% 16.5%;
}
.ox-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 0;
}
.ox-tools .grow { flex: 1; }
/* 筛选行：与操作条同一张卡片的第二行（6 个下拉 + 总数），
   不塞进操作条是因为 1680 宽下第 7 个控件必被挤到下一行、只剩一个孤零零的搜索框 */
.ox-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 8px 8px; padding: 8px 14px 10px; margin: 0 0 12px;
}
.ox-filters .grow { flex: 1; }
.ox-btn {
  height: 30px; padding: 0 14px; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #d9dee5; background: #fff; color: #4a5059;
  font-size: 14.5px; border-radius: 4px; cursor: pointer; white-space: nowrap;
  font-family: inherit; line-height: 1;
}
.ox-btn:hover { border-color: var(--brand); color: var(--brand); }
.ox-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.ox-btn.primary:hover { background: var(--brand-hover); color: #fff; }
.ox-btn .car { font-style: normal; font-size: 11.5px; opacity: .65; }
.ox-input {
  height: 30px; padding: 0 10px; border: 1px solid #d9dee5; border-radius: 4px;
  background: #fff; color: var(--text); font-size: 14.5px; font-family: inherit;
  outline: none; max-width: 148px;
}
.ox-input:focus { border-color: var(--brand); }
.ox-q { width: 200px; max-width: 220px; }
.ox-sel { font-size: 14px; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.ox-sel b { color: var(--brand-text); font-size: 15px; }
.ox-total { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* 下拉菜单 */
.ox-menu { position: relative; }
.ox-drop {
  display: none; position: absolute; top: 100%; left: 0; z-index: 40; min-width: 132px;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 6px;
  box-shadow: var(--shadow); padding: 4px; margin-top: 5px;
}
.ox-drop.right { left: auto; right: 0; }
.ox-menu.open .ox-drop { display: block; }
.ox-drop button {
  display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none;
  font-size: 14px; color: var(--text-2); cursor: pointer; border-radius: 4px;
  font-family: inherit; white-space: nowrap;
}
.ox-drop button:hover { background: var(--hover); color: var(--brand-text); }

/* 列头 */
.ox-head {
  display: grid; grid-template-columns: var(--ox-cols);
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14.5px; color: #8d95a1; min-height: 40px; margin-bottom: 12px;
}
.ox-hcell {
  display: flex; align-items: center; gap: 8px; padding: 0 13px;
  border-right: 1px solid #f0f2f5; min-width: 0; overflow: hidden;
}
.ox-hcell:last-child { border-right: 0; }
.ox-hck { display: flex; align-items: center; gap: 6px; cursor: pointer; color: #8d95a1; }
.ox-hck input { accent-color: var(--brand); width: 13px; height: 13px; }
.ox-htool { font-size: 13px; color: var(--brand); cursor: pointer; }
.ox-hc1 { gap: 10px; }

/* 订单行卡片 */
.ox-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 12px; overflow: visible;
}
.ox-rtools {
  display: flex; align-items: center; gap: 8px; padding: 8px 13px;
  border-bottom: 1px solid #f2f4f7; min-height: 40px;
}
.ox-rtools .grow { flex: 1; }
.ox-ck input { accent-color: var(--brand); width: 13px; height: 13px; display: block; }
/* 单条操作按钮：纯文字在信息密度这么高的卡片里几乎看不见（用户反馈），改成妙手那种带边框的小按钮 */
.ox-tlink {
  height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #dfe3e8; border-radius: 4px; background: #fff;
  font-size: 14px; color: #374151; cursor: pointer; font-family: inherit;
  white-space: nowrap; line-height: 1; flex: none;
}
.ox-tlink:hover { border-color: var(--brand); color: var(--brand); background: #f7fbf9; }
.ox-tlink .car { font-style: normal; font-size: 11px; color: #9aa1ab; }
.ox-ico {
  border: 0; background: none; padding: 0 2px; font-size: 15px; color: #9aa1ab;
  cursor: pointer; line-height: 1; font-family: inherit;
}
.ox-ico:hover { color: var(--brand); }
.ox-ico.xs { font-size: 12.5px; }

.ox-grid { display: grid; grid-template-columns: var(--ox-cols); font-size: 15px; }
/* 1280~1500 屏：内容区只剩 1000~1220px，按大屏比例分会让出货列跌到 130px
   ——「自发货」立刻按字竖排（老坑，出货列不能低于 148）。这档单独配：
   商品 25 / 出货 15 / 金额 15 / 收件 15 / 包裹 12 / 时间 18 */
@media (max-width: 1500px) {
  .ox-head, .ox-grid { --ox-cols: 25% 15% 15% 15% 12% 18%; }
}
.ox-cell { padding: 12px 13px; border-right: 1px solid #f2f4f7; min-width: 0; }
.ox-cell:last-child { border-right: 0; }

/* 产品信息列：订单头 + 商品明细 */
.ox-ohead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; line-height: 1.5; }
.ox-st {
  font-size: 14px; padding: 2px 7px; border-radius: 4px; flex: none;
  background: var(--brand-soft); color: var(--brand-text);
}
.ox-st.blue { background: var(--blue-soft); color: var(--blue); }
.ox-st.green { background: var(--green-soft); color: var(--green); }
.ox-st.amber { background: var(--amber-soft); color: var(--amber); }
.ox-st.gray { background: var(--gray-soft); color: #6b7280; }
.ox-shop { font-weight: 600; color: #1f2329; font-size: 15px; }
.ox-oid { color: #8d95a1; font-size: 14.5px; }
.ox-vsep { width: 1px; height: 12px; background: #e5e8ee; display: inline-block; }
.ox-pay { color: #8d95a1; font-size: 14.5px; }
.ox-chip { font-size: 12.5px; padding: 0 5px; border-radius: 3px; background: #f1f3f5; color: #6b7280; flex: none; }
.ox-chip.blue { background: var(--blue-soft); color: var(--blue); }
.ox-chip.green { background: var(--green-soft); color: var(--green); }
.ox-chip.amber { background: var(--amber-soft); color: var(--amber); }
.ox-chip.red { background: var(--red-soft); color: var(--red); }
.ox-chip.gray { background: #f1f3f5; color: #6b7280; }
/* 19 位仓库单号：列宽只有 110px 左右，缩到 10.5px 才能露全，点一下复制整串 */
.ox-ffid { font-size: 12px; letter-spacing: -.2px; cursor: copy; }
.ox-ffid:hover { color: var(--brand-text); }
/* 仓库对接信息卡：两个回调地址要能一眼看全、一键复制 */
.ffi-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ffi-row:last-child { border-bottom: 0; }
.ffi-k { width: 120px; flex: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.ffi-v.muted { color: var(--muted); font-family: inherit; }
.ffi-v { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 14px;
  word-break: break-all; color: var(--ink); }
.ffi-row .btn { flex: none; }
.ffi-tip { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #f7f9f8;
  font-size: 14px; line-height: 1.75; color: #4b5563; }

.ox-gd { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #f2f4f7; }
.ox-gd:first-child { padding-top: 2px; }
.ox-gd:last-child { border-bottom: 0; }
.ox-gd img {
  width: 58px; height: 58px; object-fit: cover; flex: none;
  border: 1px solid #eef1f4; border-radius: 4px; background: var(--bg-subtle);
}
.ox-gd .t { flex: 1; min-width: 0; }
.ox-gd .nm {
  font-size: 15.5px; color: #1f2329; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ox-gd .kv { font-size: 14.5px; color: #5b6472; margin-top: 5px; display: flex; gap: 7px; line-height: 1.55; min-width: 0; }
.ox-gd .kv span:first-child { flex: none; color: #a4abb5; }
.ox-gd .kv i { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-qty { color: #d93025; font-weight: 600; font-size: 14.5px; flex: none; align-self: flex-start; }
.ox-more { font-size: 13px; color: var(--brand); padding-top: 4px; }

/* 右侧信息列 */
.ox-row { display: flex; gap: 8px; font-size: 14.5px; line-height: 1.95; }
.ox-row .k { flex: none; width: 60px; color: #9aa3af; font-size: 13px; }
.ox-row .v { color: #1f2937; word-break: break-word; min-width: 0; }
.ox-row .v.ok { color: var(--green); }
.ox-row .v.warn { color: var(--amber); }
.ox-row .v.sm { font-size: 14px; }
.ox-row .v.el { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-row .v.el2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.6;
}

.ox-amt .ox-arow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  font-size: 14.5px; line-height: 1.25; padding: 1.5px 0;
}
.ox-amt .ox-arow .k { color: #9aa3af; white-space: nowrap; font-size: 13px; }
.ox-amt .ox-arow b { color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 双币种：上面原币（主），下面人民币（灰小字），对齐妙手「MYR 155.70 / (CNY 254.73)」 */
.ox-amt .ox-arow .v { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.ox-amt .ox-arow .cny {
  font-style: normal; font-size: 11.5px; color: #9aa3af; font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.3;
}
.ox-amt .ox-arow b.neg { color: #d93025; font-weight: 500; }
.ox-amt .ox-arow.hi { background: #f5f7f9; margin: 1px -4px; padding: 1.5px 4px; border-radius: 3px; }
.ox-amt .ox-arow b.strong { color: #0f172a; font-weight: 700; font-size: 15.5px; }
.ox-detail {
  display: flex; align-items: center; gap: 4px;
  margin-top: 7px;
  border: 0; background: none; color: #8d95a1; white-space: nowrap;
  font-size: 13px; cursor: pointer; padding: 0; font-family: inherit;
}
/* 金额列右下角的「金额明细」，和妙手「查看」同侧；物流列的面单按钮仍靠左 */
.ox-amt .ox-detail { margin-left: auto; }
.ox-detail:hover { color: var(--brand); }
.ox-detail svg { width: 12px; height: 12px; flex: none; }
.ox-detail:after { content: none; }

.ox-msg {
  margin-top: 8px; background: #f7f9fb; border-radius: 5px; padding: 5px 8px;
  font-size: 14px; display: flex; gap: 7px; line-height: 1.65;
}
.ox-msg .k { color: #a4abb5; flex: none; }
.ox-msg .v { color: #6b7280; min-height: 15px; word-break: break-word; }

.ox-trow { display: flex; gap: 6px; font-size: 14.5px; line-height: 1.5; color: #1f2937; align-items: flex-start; padding: 2.5px 0; }
.ox-trow .k { color: #9aa3af; flex: none; width: 32px; font-size: 13px; padding-top: 1px; }
/* 截止时间上下两行：上面平台给的具体时间（灰），下面剩余（按紧迫度变色） */
.ox-due { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ox-due i { font-style: normal; font-size: 12.5px; color: #9aa3af; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 剩发/取消倒计时统一红色（用户要求显眼）：超时才转灰，6 小时内加粗压深 */
.ox-cd { color: #e5484d; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ox-cd.warn { color: #e5484d; }
.ox-cd.bad { color: #d93025; font-weight: 700; }
.ox-cd.over { color: #9aa1ab; font-weight: 500; }
.ox-htool.on { color: var(--brand-text); font-weight: 600; }
.ox-list.ox-orig .ox-gd .nm { display: block; -webkit-line-clamp: unset; overflow: visible; }
.ox-list.ox-compact .ox-gd .kv { display: none; }
.ox-list.ox-compact .ox-gd { padding: 4px 0; }

/* =========================================================
 * 金额明细（仿妙手三列：买家实付 / 商家承担 / 预估回款）
 * ========================================================= */
.ord-modal.amx .box { width: min(1180px, 100%); max-height: 90vh; }
.am-hd {
  display: flex; align-items: center; padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.am-hd .am-tt { font-size: 18.5px; font-weight: 700; letter-spacing: .3px; }
.am-hd .am-x {
  margin-left: auto; width: 28px; height: 28px; border: 0; background: transparent;
  font-size: 25.5px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 6px;
}
.am-hd .am-x:hover { background: var(--hover); color: var(--text); }
.am-bd { padding: 16px 22px 18px; overflow-y: auto; }

.am-tip {
  display: flex; align-items: flex-start; gap: 8px;
  background: #eff6ff; color: #1e40af; border: 1px solid #dbeafe;
  border-radius: 8px; padding: 10px 14px; font-size: 14.5px; line-height: 1.68;
}
.am-tip .ic {
  flex: none; width: 15px; height: 15px; border-radius: 50%; background: #3b82f6; color: #fff;
  font-size: 12.5px; font-weight: 700; font-style: italic; text-align: center; line-height: 15px;
  margin-top: 1px;
}
.am-tip em { font-style: normal; font-weight: 700; color: #b91c1c; }

.am-meta {
  display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
  padding: 16px 2px 14px;
}
.am-ml { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14.5px; color: var(--text-2); }
.am-shop b { color: var(--text); font-weight: 600; }
.am-no b { color: var(--text); font-weight: 600; }
.am-mr { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14.5px; color: var(--text-2); }
.am-cur { display: inline-flex; align-items: center; gap: 6px; }
.am-chip {
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 2px 10px; font-size: 14px; cursor: pointer;
}
.am-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.am-rate { display: inline-flex; align-items: baseline; gap: 6px; }
.am-rate b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.am-rate i { font-style: normal; color: var(--muted); font-size: 12.5px; }
.am-set {
  border: 0; background: transparent; color: var(--blue); font-size: 14px;
  cursor: pointer; padding: 0 2px; text-decoration: underline;
}
.am-setbar[hidden] { display: none; }
.am-setbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg-subtle); border-radius: 8px; padding: 8px 12px;
  font-size: 14.5px; color: var(--text-2); margin-bottom: 10px;
}
.am-setbar input { width: 130px; height: 28px; }
.am-setbar em { font-style: normal; color: var(--muted); font-size: 13px; }

.am-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; }
.am-col { padding: 0 24px; border-left: 1px solid var(--border); min-width: 0; }
.am-col.c1 { padding-left: 2px; border-left: 0; }
.am-col.c3 { padding-right: 2px; }
.am-chd {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 0 0 11px; margin-bottom: 7px; border-bottom: 1px solid var(--border-strong);
  font-size: 15px; font-weight: 700; color: var(--text);
}
.am-chd b { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.am-chd b.neg { color: var(--text); }

.am-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 34px; font-size: 15px; color: var(--text-2);
}
.am-row .k { display: inline-flex; align-items: center; gap: 2px; min-width: 0; white-space: nowrap; }
.am-row .k em { font-style: normal; color: #9aa1ab; font-weight: 700; line-height: 1; }
.am-row .v { display: inline-flex; align-items: baseline; gap: 10px; flex: none; white-space: nowrap; }
.am-row .v b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.am-row .v i { font-style: normal; color: #9aa1ab; font-size: 13px; font-variant-numeric: tabular-nums; margin-right: 2px; }
.am-row.disc .v b { color: var(--text-2); }
.am-row.cost .v b { color: var(--text); }
.am-row.na { color: #9aa1ab; }
.am-row .v i.zero { color: #9aa1ab; } /* 0 值与有值同色，避免看起来像没取到数 */
.am-row.na .v b.dash { color: #b6bcc6; font-weight: 400; }
.am-row.res { min-height: 32px; }
.am-row.res .k { color: var(--text); font-weight: 600; }
.am-row.res .v b { font-weight: 700; }
.am-row.res.total {
  margin-top: 7px; padding-top: 9px; border-top: 1px dashed var(--border-strong); min-height: 38px;
}
.am-row.res.total .v b { font-size: 18px; }
.am-row .v b.pos { color: #c2410c; }
.am-row .v b.negp { color: var(--green); }
.am-foot-note { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.65; }

.am-btm {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.am-legend { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.am-legend .dot { width: 5px; height: 5px; border-radius: 50%; background: #9aa1ab; display: inline-block; }
.am-legend .grow, .am-btm .grow { flex: 1; }

.am-loading, .am-err { padding: 70px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.am-err { color: var(--red); }

@media (max-width: 900px) {
  .am-cols { grid-template-columns: 1fr; }
  .am-col { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--border); margin-top: 12px; }
  .am-col.c1 { border-top: 0; margin-top: 0; padding-top: 0; }
}
.am-row .k em.warn {
  font-style: normal; color: var(--amber); background: var(--amber-soft);
  border-radius: 4px; padding: 0 5px; font-size: 12px; font-weight: 600; margin-left: 5px;
}
.am-costbtn {
  display: inline-block; margin-top: 4px; border: 0; background: transparent;
  color: var(--blue); font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline;
}
.am-ctable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.am-ctable th {
  text-align: left; font-weight: 600; color: var(--text-2); padding: 6px 8px;
  border-bottom: 1px solid var(--border-strong); font-size: 14px;
}
.am-ctable th.r, .am-ctable td.r { text-align: right; }
.am-ctable td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.am-ctable td .nm {
  font-size: 14.5px; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.am-ctable td .sp { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.am-ctable td .sp .mono { color: var(--text-2); }
.am-ctable { table-layout: fixed; }
.am-ctable th:nth-child(1) { width: auto; }
.am-ctable th:nth-child(2) { width: 140px; }

/* 金额明细：结算数据入口 */
.am-tip { align-items: flex-start; }
.am-fetch {
  flex: none; align-self: center; margin-left: 10px; height: 28px; padding: 0 12px;
  border: 1px solid #93c5fd; background: #fff; color: #1d4ed8;
  border-radius: 6px; font-size: 14.5px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.am-fetch:hover { background: #eff6ff; }
.am-fetch:disabled { opacity: .6; cursor: default; }

/* =========================================================
 * 售后追踪 / 违规记录（after.js）
 * 两张表共用一套骨架：.af-table > .af-th + .af-rows > .af-row
 * ========================================================= */
.af-note, .vf-note { margin: -6px 0 14px; }
.af-tip {
  padding: 10px 14px; border-radius: var(--radius); font-size: 14.5px;
  border: 1px solid var(--brand-soft-strong); background: var(--brand-soft); color: var(--brand-text);
}
.vf-tip {
  border-radius: var(--radius); font-size: 14.5px; line-height: 1.7;
  border: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text-2);
}
.vf-tip > summary {
  cursor: pointer; padding: 9px 14px; list-style: none; font-weight: 600; color: var(--text-2);
  display: flex; align-items: center; gap: 7px;
}
.vf-tip > summary::-webkit-details-marker { display: none; }
.vf-tip > summary::before { content: "▸"; font-size: 11.5px; color: var(--muted); transition: transform .15s; }
.vf-tip[open] > summary::before { transform: rotate(90deg); }
.vf-tip > summary:hover { color: var(--text); }
.vf-tip-bd { padding: 0 14px 12px 32px; }
.vf-tip b { color: var(--text); }
.vf-tip ul { margin: 6px 0 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.vf-tip li { display: flex; align-items: flex-start; gap: 7px; }
.vf-tip code { font-size: 13px; background: var(--panel); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 5px; color: var(--brand-text); text-decoration: none; font-style: normal; }
.vf-tip .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; }
.vf-tip .dot.api { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.vf-tip .dot.calc { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

/* 工具条 */
.af-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.af-bar .grow { flex: 1; }
.af-tabs { display: flex; gap: 3px; padding: 3px; background: var(--bg-subtle); border-radius: 10px; }
.af-tab {
  border: 0; background: transparent; color: var(--text-2); font-size: 15px; font-weight: 600;
  padding: 7px 13px; border-radius: 8px; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all .16s var(--ease);
}
.af-tab:hover { background: rgba(255, 255, 255, .8); color: var(--text); }
.af-tab.on { background: var(--panel); color: var(--brand-text); box-shadow: var(--shadow-sm); }
.af-input {
  padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14.5px; background: var(--panel); color: var(--text); font-family: inherit;
}
.af-input.af-q { min-width: 210px; }
.af-total { font-size: 14px; color: var(--muted); }

/* 表格骨架 */
.af-table {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; --af-cols: minmax(246px, 1.35fr) 116px minmax(168px, 1.15fr) 132px 137px 137px minmax(146px, 1fr);
}
.af-th, .af-row {
  display: grid; grid-template-columns: var(--af-cols);
  gap: 10px; align-items: center; padding: 0 14px;
}
.af-th {
  height: 38px; background: var(--bg-subtle); border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: .2px;
}
.af-th .af-hc.num { text-align: right; }
.af-row {
  min-height: 62px; padding-top: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); font-size: 14.5px; cursor: pointer;
  transition: background .14s;
}
.af-row:last-child { border-bottom: 0; }
.af-row:hover { background: var(--hover); }
.af-c { min-width: 0; }
.af-c.num { text-align: right; font-variant-numeric: tabular-nums; }
.af-empty { padding: 42px 0; text-align: center; color: var(--muted); font-size: 15px; }

/* 第一列：图 + 文字 */
.af-row .c1 { display: flex; align-items: center; gap: 9px; }
.af-img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: none; background: var(--bg-subtle); }
.af-img.ph { display: block; border: 1px dashed var(--border-strong); }
.af-row .af-txt { min-width: 0; }
.af-l1 { font-size: 14.5px; font-weight: 650; color: var(--text); }
.af-l2 { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.af-l3 {
  font-size: 12.5px; color: var(--text-2); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.af-c.c3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.af-c.c7 .mono { font-size: 14px; }
.af-none { color: var(--muted); }
.af-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.af-act { font-size: 12px; color: var(--amber); margin-top: 3px; font-weight: 600; }

/* 处理时限 */
.af-dl { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.af-dl.ok { background: var(--gray-soft); color: var(--text-2); }
.af-dl.warn { background: var(--amber-soft); color: var(--amber); }
.af-dl.bad { background: var(--red-soft); color: var(--red); }
.af-dl.none { background: transparent; color: var(--muted); padding: 0; }

/* 违规表 */
.vf-table { --af-cols: 132px 74px minmax(291px, 2.4fr) 116px 92px 116px 141px; }
.vf-table .af-row { cursor: default; }
.vf-title { font-size: 14.5px; font-weight: 650; color: var(--text); margin-bottom: 2px; }
.af-src-tag { font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: .2px; }
.vf-ack {
  display: block; margin-top: 5px; border: 1px solid var(--brand-soft-strong); background: var(--brand-soft);
  color: var(--brand-text); border-radius: 6px; font-size: 12.5px; padding: 2px 8px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.vf-ack:hover { background: var(--brand-soft-strong); }

/* KPI 变体 */
.aff-kpi .k.danger .v { color: var(--red); }
.aff-kpi .k .v.sm { font-size: 17px; letter-spacing: 0; }

/* 分页 */
.aff-pager .pg {
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2);
  border-radius: 8px; padding: 5px 12px; font-size: 14.5px; cursor: pointer; font-family: inherit;
}
.aff-pager .pg:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.aff-pager .pg:disabled { opacity: .45; cursor: default; }
.aff-pager .pg-info { font-variant-numeric: tabular-nums; }

/* 明细弹窗 */
.af-dlg { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.af-dlg .af-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.af-dlg .af-panel {
  position: relative; width: min(760px, 94vw); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: afpop .18s var(--ease);
}
@keyframes afpop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.af-dlg .af-hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border);
}
.af-dlg .af-hd-t { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.af-dlg .af-hd-s { font-size: 13px; color: var(--muted); margin-top: 5px; }
.af-dlg .af-x {
  border: 0; background: transparent; color: var(--muted); font-size: 18.5px; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; font-family: inherit;
}
.af-dlg .af-x:hover { background: var(--hover); color: var(--text); }
.af-dlg .af-bd { padding: 16px 18px; overflow: auto; }
.af-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px 16px; }
.af-kv > div { display: flex; flex-direction: column; gap: 3px; }
.af-kv span { font-size: 12.5px; color: var(--muted); }
.af-kv b { font-size: 15px; font-weight: 650; }
.af-reason {
  margin-top: 14px; padding: 10px 12px; background: var(--bg-subtle); border-radius: var(--radius);
  font-size: 14.5px; color: var(--text); line-height: 1.7;
}
.af-reason span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.af-reason i { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; font-style: normal; }
.af-items { margin-top: 16px; }
.af-items-h { font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.af-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.af-item:last-child { border-bottom: 0; }
.af-item img, .af-item .af-img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--bg-subtle); flex: none; }
.af-it-txt { flex: 1; min-width: 0; }
.af-it-n { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-it-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.af-it-q { font-size: 14px; color: var(--text-2); width: 46px; text-align: right; }
.af-it-a { font-size: 14.5px; font-weight: 650; width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.af-dlg .af-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--border); background: var(--bg-subtle);
}
.af-dlg .af-src { font-size: 12.5px; color: var(--muted); }

@media (max-width: 1280px) {
  .af-table { --af-cols: minmax(213px, 1.3fr) 108px minmax(134px, 1fr) 121px 125px 125px 132px; }
  .vf-table { --af-cols: 125px 67px minmax(224px, 2fr) 108px 81px 110px 130px; }
}

/* 弹窗里的长枚举值（平台状态码）允许折行，别挤压相邻列 */
.af-reason .af-code { font-size: 14px; font-weight: 600; word-break: break-all; letter-spacing: .2px; }
.af-kv > div { min-width: 0; }
/* 违规行右侧是「徽章 + 结案按钮」两行，给点上下留白 */
.vf-table .af-row { padding-top: 12px; padding-bottom: 12px; }

/* =========================================================
 * 下拉框收口
 * 各页面局部类（.af-input / .ord-field select / .fin-range select …）
 * 会把 padding 重置成 7px 10px，右侧箭头位就会被吃掉、文字压到箭头上。
 * 这里统一收口，保证任何位置的下拉框箭头都有固定净空。
 * ========================================================= */
select:not([multiple]) {
  padding-right: 30px !important;
  /* 局部类用 background 简写会连带清掉 background-image，这里强制放回自绘箭头 */
  background-image: var(--sel-arrow) !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 10px 6px !important;
}
select:disabled:not([multiple]) { background-image: var(--sel-arrow-dim) !important; }
select[multiple] { padding-right: 12px !important; background-image: none !important; }
/* 订单工具条那排紧凑下拉：圆角与箭头位置跟着 30px 高度收一点；
   max-width 比输入框宽 20px，抵掉箭头净空，避免「全部店铺 (9,647)」被截断 */
select.ox-input {
  border-radius: 6px; background-position: right 9px center !important;
  padding-right: 26px !important; /* 紧凑工具条留 26px 净空即可，多留会挤掉字符 */
  max-width: 172px; flex: none; /* 不被 flex 压窄，否则「下单时间 ↓」会被省略号吃掉 */
}
/* Chrome 算 select 自动宽度时不认 CSS padding，箭头占位会被算成负空间。
   短文案的下拉（如下单时间 ↓）必须显式给宽度，否则末尾字符被省略号吃掉。 */
#ord-sort { min-width: 114px; }
.af-input, .ox-input { font-family: inherit; }

/* =========================================================
 * 评价管理（reviews.js）
 * 复用 .af-table / .af-row / .af-dlg 骨架，这里补评价专有的
 * 评分大字、星级分布条、跟进面板
 * ========================================================= */
.rv-note { margin: -6px 0 14px; }

/* 列表列宽：商品名给足，分布条弹性，右侧三个窄列固定 */
.rv-table { --af-cols: minmax(235px, 1.85fr) minmax(130px, 1.0fr) 87px 83px minmax(166px, 1.2fr) 92px 96px 92px; }
/* 排序下拉：Chrome 算自动宽度不认 CSS padding，不显式给宽会把「差评率 ↓」吃掉 */
#rv-sort { min-width: 116px; flex: none; }
.rv-table .af-row { cursor: pointer; }
.rv-table .af-th .af-hc.num,
.rv-table .af-c.num { text-align: right; }

/* 评分 */
.rv-score {
  font-size: 19.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -.2px; line-height: 1.15;
}
.rv-score.good { color: var(--green); }
.rv-score.ok { color: var(--blue); }
.rv-score.warn { color: var(--amber); }
.rv-score.bad { color: var(--red); }
.rv-score.none { color: var(--muted); font-weight: 500; }
.rv-star { font-size: 12.5px; color: #e0a800; margin-left: 2px; }

/* 星级分布：一条 5 段堆叠条 */
.rv-bar {
  display: flex; height: 7px; border-radius: 4px; overflow: hidden;
  background: var(--bg-subtle); width: 100%;
}
.rv-bar i { display: block; height: 100%; }
.rv-bar i + i { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .5); }
.rv-nobar { font-size: 13px; color: var(--muted); }
.rv-legend { font-size: 12px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.rv-legend b { color: var(--text-2); }

.rv-bad { color: var(--red); }
.rv-btn {
  border: 1px solid var(--brand-soft-strong); background: var(--brand-soft); color: var(--brand-text);
  border-radius: 7px; padding: 5px 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .14s;
}
.rv-btn:hover { background: var(--brand-soft-strong); }

/* ---------- 详情弹窗 ---------- */
.rv-panel { width: min(720px, 94vw); }
.rv-hd-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.rv-hd-img {
  width: 46px; height: 46px; border-radius: 9px; object-fit: cover;
  flex: none; background: var(--bg-subtle);
}
.rv-hd-img.ph { display: block; border: 1px dashed var(--border-strong); }
/* 商品标题普遍很长（马来语），允许两行。
   两个坑都踩过：
   1) 基础样式 .af-dlg .af-hd-t 有 display:flex，同级选择器压不住 → 必须 .af-dlg .rv-panel 提高特异性
   2) 新版 Chrome 会把带 line-clamp 的元素 display 归一化成 flow-root，-webkit-box 组合失效，
      结果只渲染一行并把其余裁掉 → 不用 line-clamp，改成 block + 固定两行高度 */
.af-dlg .rv-panel .af-hd-t {
  display: block;
  font-size: 16px; line-height: 1.45;
  max-height: 3em;       /* 2 行 × 1.5 */
  overflow: hidden;
  word-break: break-word;
}
.af-dlg .rv-panel .rv-hd-main > div { min-width: 0; }

.rv-top {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.rv-big { flex: none; min-width: 132px; }
.rv-big-v { font-size: 46px; font-weight: 750; line-height: 1.05; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.rv-big-v.good { color: var(--green); }
.rv-big-v.ok { color: var(--blue); }
.rv-big-v.warn { color: var(--amber); }
.rv-big-v.bad { color: var(--red); }
.rv-big-v.none { color: var(--muted); }
.rv-big-l { font-size: 13px; color: var(--muted); margin-top: 6px; }
.rv-figs {
  flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px;
  min-width: 240px;
}
.rv-figs > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-figs span { font-size: 12.5px; color: var(--muted); }
.rv-figs b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }

.rv-dist { margin-top: 16px; }
.rv-dist-h, .rv-mng-h { font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 9px; }
.rv-drow {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 56px 52px;
  gap: 10px; align-items: center; min-height: 26px;
}
.rv-dstar { font-size: 13px; color: var(--text-2); }
.rv-dbar { height: 9px; border-radius: 5px; background: var(--bg-subtle); overflow: hidden; }
.rv-dbar i { display: block; height: 100%; border-radius: 5px; transition: width .3s var(--ease); }
.rv-dc { font-size: 14px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.rv-dp { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.rv-mng { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.rv-mng-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.rv-mng-bar .grow { flex: 1; }
.rv-mng-meta { font-size: 12.5px; color: var(--muted); }
.rv-st {
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2);
  border-radius: 8px; padding: 6px 13px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .14s var(--ease);
}
.rv-st:hover { background: var(--hover); color: var(--text); }
.rv-st.on {
  background: var(--brand-soft); border-color: var(--brand-soft-strong); color: var(--brand-text);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.rv-note-in {
  width: 100%; min-height: 76px; resize: vertical; line-height: 1.65;
  font-size: 14.5px; font-family: inherit;
}
.rv-ft-actions { display: flex; align-items: center; gap: 8px; flex: none; }

@media (max-width: 1280px) {
  .rv-table { --af-cols: minmax(206px, 1.9fr) minmax(112px, .92fr) 78px 76px minmax(148px, 1.15fr) 83px 87px 81px; }
  .rv-top { gap: 18px; }
  .rv-big-v { font-size: 39px; }
}

/* ---------- 达人档案（CRM 层）----------
   阶段 pills 只做「筛选」，不做「流程条」，避免和建联工作台的两栏布局抢视觉 */
.crm-stagebar { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 10px; }
.crm-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
  color: var(--text-2); font-size: 14.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .16s var(--ease); white-space: nowrap;
}
.crm-pill:hover { border-color: var(--border-strong); color: var(--text); }
.crm-pill.on { background: var(--brand-soft); border-color: var(--brand-soft-strong); color: var(--brand-text); }
.crm-pill b { font-weight: 700; font-size: 14px; opacity: .85; }

.crm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.crm-tools .sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.crm-ck { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.crm-ck input { width: auto; }

.crm-tag {
  display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 5px;
  background: var(--bg-subtle); color: var(--text-2); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
}
.crm-tag.more { background: transparent; color: var(--muted); border-style: dashed; }

.crm-form { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.crm-form label { font-size: 14.5px; color: var(--text-2); }
.crm-form input, .crm-form select { width: 100%; box-sizing: border-box; }
.crm-lb { display: block; font-size: 14.5px; color: var(--text-2); margin: 12px 0 6px; }
.crm-note { width: 100%; box-sizing: border-box; min-height: 76px; resize: vertical; line-height: 1.6; }
.crm-ell { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-link { color: var(--brand-text); font-weight: 600; cursor: pointer; text-decoration: none; }
.crm-link:hover { text-decoration: underline; }

.rel-del {
  margin-left: auto; width: 20px; height: 20px; line-height: 1; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; font-family: inherit;
}
.rel-del:hover { background: var(--red-soft); color: var(--red); }
.rel-sub { font-size: 14.5px; font-weight: 600; color: var(--text); margin-top: 6px; }
.rel-body { font-size: 14.5px; color: var(--text-2); line-height: 1.7; margin-top: 4px; white-space: pre-wrap; }
.crm-kpi { margin-bottom: 12px; }
.crm-kpi .k .v { font-size: 23px; }
.crm-kpi .k .sb .hint { font-size: 12.5px; }
/* 抽屉里的 5 格 KPI 只有 720px 宽，金额按 22px 会折行，单独压小 */
.aff-drawer .aff-kpi .k { padding: 11px 13px; }
.aff-drawer .aff-kpi .k .v { font-size: 18.5px; letter-spacing: -.2px; }
.aff-drawer .aff-kpi .k .sb { font-size: 12.5px; }

/* =========================================================
   建联中心（connect）：漏斗 / 待办 / 趋势 / 模板卡 / 圈子卡
   复用 aff-* 与 crm-* 的基础样式，这里只补本模块独有的块
   ========================================================= */
.ct-note {
  background: var(--brand-soft); border: 1px solid var(--brand-soft-strong);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14.5px;
  color: var(--brand-text); line-height: 1.65; margin-bottom: 12px;
}
.ct-note b { color: var(--brand-text); }

/* 漏斗行：标签 / 条 / 数值 / 转化率 四列对齐，避免数字跳动 */
.ct-fn { display: grid; grid-template-columns: 74px minmax(0, 1fr) 62px 108px; gap: 10px; align-items: center; padding: 6px 0; }
.ct-fn-lb { font-size: 14.5px; color: var(--text-2); }
.ct-fn-bar { height: 22px; background: var(--bg-subtle); border-radius: 6px; overflow: hidden; }
.ct-fn-fill { height: 100%; border-radius: 6px; transition: width .5s var(--ease); }
.ct-fn-fill.blue { background: var(--blue); opacity: .85; }
.ct-fn-fill.amber { background: var(--amber); opacity: .85; }
.ct-fn-fill.brand { background: var(--brand); }
.ct-fn-fill.green { background: var(--green); opacity: .9; }
.ct-fn-v { font-size: 16px; font-weight: 700; text-align: right; }
.ct-fn-rate { font-size: 13px; color: var(--muted); text-align: right; }

/* 待办卡：一列四个，点击跳页签 */
.ct-todo {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 2px 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 8px; cursor: pointer; transition: all .16s var(--ease); background: var(--panel);
}
.ct-todo:hover { border-color: var(--brand-soft-strong); background: var(--brand-soft); }
.ct-todo .lb { font-size: 14.5px; color: var(--text-2); font-weight: 600; }
.ct-todo .v { font-size: 22px; font-weight: 700; text-align: right; grid-row: span 2; align-self: center; }
.ct-todo .sb { font-size: 13px; color: var(--muted); }

/* 14 天趋势：每天两根柱，回复在内、发出在外 */
.ct-trend { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.ct-trend-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.ct-trend-col .bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.ct-trend-col .b { width: 45%; min-height: 2px; border-radius: 3px 3px 0 0; transition: height .4s var(--ease); }
.ct-trend-col .b.out { background: var(--brand); }
.ct-trend-col .b.in { background: var(--brand-soft-strong); border: 1px solid var(--brand-soft-strong); }
.ct-trend-col .d { font-size: 12px; color: var(--muted); text-align: center; margin-top: 5px; white-space: nowrap; }

/* 阶段分布 */
.ct-stage { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.ct-stage .badge { width: 62px; justify-content: center; flex: none; }
.ct-stage-bar { flex: 1; height: 8px; background: var(--bg-subtle); border-radius: 4px; overflow: hidden; }
.ct-stage-bar > div { height: 100%; background: var(--brand); border-radius: 4px; }
.ct-stage b { width: 52px; text-align: right; font-size: 14.5px; }

/* 任务进度条 */
.ct-prog { height: 6px; background: var(--bg-subtle); border-radius: 3px; overflow: hidden; }
.ct-prog > div { height: 100%; border-radius: 3px; transition: width .4s var(--ease); }

/* 分区小标题 */
.ct-sec {
  font-size: 14.5px; font-weight: 700; color: var(--text); margin: 18px 0 8px;
  padding-left: 8px; border-left: 3px solid var(--brand); line-height: 1.2;
}
.ct-body-preview {
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.75; color: var(--text-2);
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; max-height: 190px; overflow: auto;
}

/* 话术模板卡 */
.ct-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ct-tpl {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 15px; display: flex; flex-direction: column; gap: 7px;
}
.ct-tpl:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.ct-tpl .hd { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ct-tpl .nm { font-size: 15.5px; font-weight: 700; }
.ct-tpl .scene { font-size: 13px; color: var(--muted); }
.ct-tpl .sub { font-size: 13px; color: var(--text-2); }
.ct-tpl .body {
  font-size: 14.5px; color: var(--text-2); line-height: 1.7; white-space: pre-wrap;
  background: var(--bg-subtle); border-radius: 6px; padding: 8px 10px; min-height: 62px;
  max-height: 118px; overflow: hidden;
}
.ct-tpl .ft { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }

/* 圈子卡 */
.ct-circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ct-circle { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 15px; }
.ct-circle .hd { display: flex; align-items: center; gap: 8px; }
.ct-circle .nm { font-size: 15.5px; font-weight: 700; flex: 1; }
.ct-circle .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex: none; }
.ct-circle .dot.blue { background: var(--blue); }
.ct-circle .dot.amber { background: var(--amber); }
.ct-circle .dot.red { background: var(--red); }
.ct-circle .ds { font-size: 14px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.ct-circle .meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ct-circle .ft { display: flex; gap: 6px; margin-top: 10px; }

/* 搜索选人一行 */
.ct-pick {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px;
}
.ct-pick .nm { flex: 1; font-size: 14.5px; font-weight: 600; }

/* AI 建议回复 */
.ct-draft { margin-top: 10px; }
.ct-draft .lb { font-size: 14px; color: var(--muted); margin-bottom: 5px; }
.ct-draft .tx {
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.75; color: var(--text);
  background: var(--brand-soft); border: 1px solid var(--brand-soft-strong);
  border-radius: var(--radius-sm); padding: 10px 12px;
}

/* 找达人：四张名单卡 */
.ct-seg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ct-seg {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; cursor: pointer; transition: all .16s var(--ease);
}
.ct-seg:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.ct-seg.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft) inset; }
.ct-seg .lb { font-size: 14.5px; color: var(--text-2); font-weight: 600; }
.ct-seg .v { font-size: 27.5px; font-weight: 700; letter-spacing: -.5px; margin: 4px 0 2px; }
.ct-seg.on .v { color: var(--brand-text); }
.ct-seg .sb { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- 跟进待办（Connect · 页签 2）----------
   这一页是「每天上班第一眼」，所以头部做成一张横向条：
   总数在左、三个动作在右，下面七张分组卡负责筛选。 */
.fu-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.fu-total { font-size: 30px; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; }
.fu-total span { font-size: 14.5px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }

.fu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; }
.fu-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; transition: all .16s var(--ease);
}
.fu-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.fu-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft) inset; }
.fu-card.zero { opacity: .58; }
.fu-card .lb { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.fu-card .v { font-size: 25.5px; font-weight: 700; letter-spacing: -.4px; margin: 3px 0 2px; }
.fu-card .sb {
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
  /* 压到两行让卡片等高。不用 line-clamp：新版 Chrome 会把带 clamp 的元素
     display 归一化成 flow-root，-webkit-box 失效只剩一行（之前踩过）。 */
  display: block; max-height: 3.2em; overflow: hidden;
}

/* 对象列：头像 + 昵称/账号 上下排，宽度不够时昵称省略而不是把表格撑破 */
.fu-obj { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fu-obj .nm {
  font-weight: 600; font-size: 15px; max-width: 168px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fu-ph {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-subtle); color: var(--text-2); font-size: 14px; font-weight: 700;
}

/* ---------- 行操作区里的按钮收口 ----------
   .row-actions button 为了做「纯文字操作」把 border/background 都清成了 none，
   但 .btn 的文字色是白的 → 白字 + 透明底 = 按钮看起来是空的（踩过一次）。
   这里把 .btn 的底和边框还原，.btn.ghost 走描边样式。 */
.row-actions .btn {
  border: 1px solid transparent; background: var(--brand); color: #fff;
  font-weight: 600; padding: 4px 10px;
}
.row-actions .btn:hover { background: var(--brand); filter: brightness(.94); }
.row-actions .btn.ghost {
  background: var(--panel); border-color: var(--border); color: var(--text-2);
}
.row-actions .btn.ghost:hover {
  background: var(--bg-subtle); border-color: var(--border-strong); color: var(--text);
  filter: none;
}
/* 待办页的动作列是主操作，不该等 hover 才变清晰 */
#ct-body .row-actions { opacity: 1; }

/* ---------- 表单里的勾选框 ----------
   .crm-form input { width: 100% } 会把 checkbox 也撑成整行宽，
   Chrome 于是把方块画到格子最右边，看着像「文字在左、框在右」。
   checkbox/radio 必须显式收回固定尺寸。 */
.crm-form input[type="checkbox"],
.crm-form input[type="radio"] {
  width: 14px; height: 14px; flex: none; margin: 0; padding: 0;
}
.crm-form .crm-ck { justify-content: flex-start; }

/* =========================================================
 * 达人邀约（建联中心 · 邀约页签）
 * 结构照达秘：KPI 记分牌 → 邀约列表 → 两步向导 → 发送清单
 * ========================================================= */
.iv-kpi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.iv-kc {
  background: var(--panel); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 13px; display: flex; flex-direction: column; gap: 3px;
}
.iv-kc > span { font-size: 13px; color: var(--muted); }
.iv-kc > b { font-size: 22px; font-weight: 700; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
.iv-kc > b.warn { color: var(--amber); }
.iv-kc > b.ok { color: var(--green); }
.iv-kc > i { font-size: 12px; color: var(--muted); font-style: normal; }

.iv-tip {
  margin-top: 12px; padding: 10px 13px; border-radius: 10px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-2); line-height: 1.65;
}
.iv-tip b { color: var(--text); }

/* ---------- 两步向导 ---------- */
.iv-wiz { width: 880px; }
.iv-steps { display: flex; gap: 8px; margin-bottom: 16px; }
.iv-step {
  flex: 1; display: flex; align-items: center; gap: 7px; padding: 9px 12px;
  border-radius: 9px; background: var(--bg-subtle); color: var(--muted);
  font-size: 14.5px; font-weight: 600;
}
.iv-step > i {
  width: 18px; height: 18px; border-radius: 50%; background: var(--border);
  color: var(--panel); font-style: normal; font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center; flex: none;
}
.iv-step.on { background: var(--brand-soft); color: var(--brand-text); }
.iv-step.on > i { background: var(--brand); }

.iv-note {
  font-size: 14px; color: var(--text-2); background: var(--blue-soft);
  border-radius: 9px; padding: 9px 12px; margin-bottom: 12px; line-height: 1.6;
}
.iv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.iv-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-items: end; }
.iv-frow3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; align-items: end; }
.iv-frow > div, .iv-frow3 > div { min-width: 0; }
.iv-frow3 input, .iv-frow3 select, .iv-frow input, .iv-frow select { width: 100%; box-sizing: border-box; }

.iv-prev {
  margin-top: 8px; padding: 10px 12px; border-radius: 9px;
  background: #f8fafc; border: 1px dashed var(--border-strong);
  font-size: 14px; color: var(--text-2); white-space: pre-wrap; line-height: 1.7;
  max-height: 120px; overflow: auto;
}
.iv-sec {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 650; margin: 18px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.iv-sec .grow { flex: 1; }

/* ---------- 选达人：三种来源 ---------- */
.iv-src { display: flex; gap: 4px; padding: 3px; background: var(--bg-subtle); border-radius: 10px; margin-bottom: 12px; }
.iv-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 9px 12px; border-radius: 9px;
  background: var(--brand-soft); font-size: 14.5px; color: var(--brand-text);
}
.iv-summary b { font-size: 16px; }
.iv-est { margin-top: 10px; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.iv-est b { color: var(--brand-text); font-size: 15px; }
.iv-warn { margin-top: 6px; color: var(--amber); font-size: 13px; }
.iv-miss {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--amber-soft);
  font-size: 12.5px; color: var(--text-2); max-height: 110px; overflow: auto; line-height: 1.9;
}
.iv-miss code {
  background: rgba(255,255,255,.7); border-radius: 4px; padding: 1px 5px;
  margin-right: 4px; font-size: 12px;
}

.iv-picklist {
  margin-top: 10px; max-height: 300px; overflow: auto;
  border: 1px solid var(--border); border-radius: 9px;
}
.iv-pk {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px;
  border-bottom: 1px solid var(--border); cursor: pointer; font-size: 14.5px;
}
.iv-pk:last-child { border-bottom: 0; }
.iv-pk:hover { background: var(--hover); }
.iv-pk.on { background: var(--brand-soft); }
.iv-pk input { width: 14px; height: 14px; flex: none; margin: 0; }
.iv-pk img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--bg-subtle); flex: none; }
.iv-pk .l1 { font-weight: 600; }
.iv-pk .l2 { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* ---------- 详情抽屉 ---------- */
.iv-kv { margin-bottom: 4px; }
.iv-msgbox {
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.75; color: var(--text);
  background: var(--bg-subtle); border-radius: 9px; padding: 11px 13px;
}
.iv-mini { padding: 2px 9px; font-size: 13px; }
/* 批次卡片用 flex 而不是 3 列 grid：
   之前 grid 把进度条和「已发/待发」文字挤在同一列里互相压，切成窄条看不清。 */
.iv-batches { display: grid; gap: 8px; }
.iv-bt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel);
}
.iv-bt.done { opacity: .62; }
.iv-bt .no { font-size: 14.5px; font-weight: 650; width: 58px; flex: none; }
.iv-bt .tm { font-size: 13px; color: var(--muted); width: 104px; flex: none; }
.iv-bt .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.iv-bt .nm2 { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-bt .btn { flex: none; }

/* 弹窗里的单选/复选：.modal label 是 display:block，会把 radio 顶到文字上面单独一行 */
.modal .crm-ck {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 16px 0 0; font-size: 14.5px; color: var(--text-2); cursor: pointer;
}
.modal .crm-ck input[type="radio"],
.modal .crm-ck input[type="checkbox"] { width: 14px; height: 14px; margin: 0; flex: none; }

/* 抽屉里的 8 个指标固定 4 列，否则窄列会把「60 / 0」折成两行 */
.iv-kv { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.iv-kv b { white-space: nowrap; }

.iv-tbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.iv-tbar .grow { flex: 1; }
.iv-tbar .af-tab { font-size: 13px; padding: 4px 9px; }

/* ---------- 发送清单 ---------- */
.iv-qnote {
  font-size: 13px; color: var(--text-2); background: var(--amber-soft);
  border-radius: 9px; padding: 8px 11px; margin-bottom: 10px; line-height: 1.6;
}
.iv-qnote b { color: var(--red); }
.iv-qlist { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.iv-qrow {
  display: grid; grid-template-columns: 22px 180px 1fr auto; gap: 10px; align-items: start;
  padding: 9px 11px; border-bottom: 1px solid var(--border);
}
.iv-qrow:last-child { border-bottom: 0; }
.iv-qrow.sent { opacity: .45; }
.iv-qrow input { margin-top: 4px; width: 14px; height: 14px; }
.iv-qrow .who .l1 { font-size: 14.5px; font-weight: 650; }
.iv-qrow .who .l2 { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
/* 不用 -webkit-line-clamp：新版 Chrome 会把 display 归一成 flow-root，
   导致「两行截断」变成「完全展开」或「整块消失」。用 max-height 收更稳。 */
.iv-qrow .msg {
  font-size: 13px; color: var(--text-2); line-height: 1.7; cursor: pointer;
  display: block; max-height: 3.4em; overflow: hidden; white-space: pre-wrap;
}
.iv-qrow .msg.open { max-height: 220px; overflow: auto; }
.iv-qrow .ops { display: flex; gap: 5px; }

/* 达人清单 7 列：不定宽的话浏览器按内容抢宽度，
   「操作」列被压到 70px，两个按钮就竖着排了。 */
.iv-tt { table-layout: fixed; width: 100%; }
.iv-tt th, .iv-tt td { overflow: hidden; text-overflow: ellipsis; }
.iv-tt .row-actions { flex-wrap: nowrap; }
.iv-tt .row-actions button { padding: 1px 6px; font-size: 13px; }
/* 固定列宽之后，窄列里「第 1 批」「2026-11-10 09:30」会被折成两行；
   运营扫表时要一眼看完，宁可省略号也不要换行。 */
.iv-tt td, .iv-tt th { white-space: nowrap; }
.iv-tt td .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
 * 达人邀约 v2 —— 版面语言对齐达秘（DAMI）
 *   大字标题 + eyebrow / 编号分区 / 箭头步骤条 / 大留白卡片 / 表格去格线
 *   只作用于 .v2 作用域，不动其它页签
 * ========================================================= */
.v2 {
  --v2-line: #e9ebef; --v2-ink: #101828; --v2-sub: #6b7280; --v2-soft: #f7f8fa;
  color: var(--v2-ink); font-size: 15px;
}
.v2 .grow { flex: 1; }

/* ---------- 标题区 ---------- */
.v2-hd { display: flex; align-items: flex-start; gap: 20px; }
.v2-hd > div:first-child { min-width: 0; }
.v2-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); opacity: .9;
}
.v2-hd h2 {
  font-size: 25.5px; font-weight: 700; letter-spacing: -.45px;
  margin: 4px 0 6px; color: var(--v2-ink); line-height: 1.25;
}
.v2-hd .sub { font-size: 14.5px; color: var(--v2-sub); line-height: 1.7; max-width: 660px; }
.v2-hd .sub b { color: var(--v2-ink); font-weight: 650; }
.v2-hd .acts { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; padding-top: 4px; }
.v2-chips { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.v2-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--v2-line);
  font-size: 13px; color: var(--v2-sub); white-space: nowrap;
}
.v2-chip b { color: var(--v2-ink); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- KPI 记分牌 ---------- */
.v2-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.v2-kpi {
  position: relative; background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 14px; padding: 15px 16px 14px; transition: box-shadow .18s var(--ease), border-color .18s;
}
.v2-kpi:hover { border-color: rgba(15, 23, 42, .14); box-shadow: 0 6px 18px rgba(16, 24, 40, .05); }
.v2-kpi > span { display: block; font-size: 13px; color: var(--v2-sub); font-weight: 500; }
.v2-kpi > b {
  display: block; margin-top: 3px; font-size: 27.5px; font-weight: 700;
  letter-spacing: -.8px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.v2-kpi > b.warn { color: var(--amber); }
.v2-kpi > b.ok { color: var(--green); }
.v2-kpi > i { display: block; margin-top: 4px; font-size: 12.5px; color: var(--v2-sub); font-style: normal; }
.v2-kpi .dot {
  position: absolute; right: 15px; top: 16px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); opacity: .55;
}
.v2-kpi .dot.warn { background: var(--amber); }
.v2-kpi .dot.ok { background: var(--green); }

/* ---------- 卡片 ---------- */
.v2-card {
  background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 14px; overflow: hidden;
}
.v2-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--v2-line); background: #fcfcfd;
}

/* 分段控件（状态筛选） */
.v2-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-subtle); border-radius: 10px; }
.v2-seg button {
  border: 0; background: transparent; cursor: pointer; padding: 5px 12px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--text-2); font-family: inherit;
  transition: background .14s, color .14s, box-shadow .14s; white-space: nowrap;
}
.v2-seg button:hover { color: var(--v2-ink); }
.v2-seg button.on {
  background: var(--panel); color: var(--brand-text); font-weight: 650;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .09), 0 0 0 .5px rgba(16, 24, 40, .04);
}
.v2-seg button em { font-style: normal; font-size: 12.5px; color: var(--v2-sub); margin-left: 4px; font-weight: 600; }
.v2-seg button.on em { color: var(--brand-text); opacity: .75; }

.v2-search { position: relative; }
.v2-search input { padding-left: 32px !important; min-width: 200px; }
.v2-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- 表格（去格线版） ---------- */
.v2-tb { width: 100%; border-collapse: separate; border-spacing: 0; }
.v2-tb th {
  position: static; text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--v2-sub); background: var(--panel); padding: 10px 16px;
  border-bottom: 1px solid var(--v2-line); white-space: nowrap;
}
.v2-tb td { padding: 15px 16px; border-bottom: 1px solid #f1f2f5; font-size: 14.5px; vertical-align: middle; }
.v2-tb tbody tr:last-child td { border-bottom: 0; }
.v2-tb tbody tr:hover td { background: #fcfcfd; }
.v2-tb .t-name { font-size: 15px; font-weight: 650; color: var(--v2-ink); }
.v2-tb .t-meta { font-size: 12.5px; color: var(--v2-sub); margin-top: 3px; }
.v2-tb .t-cell2 { font-size: 14px; color: var(--text-2); }
.v2-tb .num { font-variant-numeric: tabular-nums; }
.v2-tb .row-actions { opacity: 1; }
.v2-tb .row-actions button { font-size: 14px; padding: 3px 8px; border-radius: 6px; }

/* 状态胶囊 */
.v2-bd {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.v2-bd::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.v2-bd.gray { background: var(--gray-soft); color: #5a6472; }
.v2-bd.blue { background: var(--blue-soft); color: var(--blue); }
.v2-bd.green { background: var(--green-soft); color: var(--green); }
.v2-bd.amber { background: var(--amber-soft); color: var(--amber); }
.v2-bd.red { background: var(--red-soft); color: var(--red); }

/* 细进度条 */
.v2-prog { height: 5px; border-radius: 3px; background: #eef0f3; overflow: hidden; margin-top: 6px; }
.v2-prog > div { height: 100%; border-radius: 3px; background: var(--brand); transition: width .4s var(--ease); }
.v2-prog > div.done { background: var(--green); }

.v2-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 11px 16px; border-top: 1px solid var(--v2-line); background: #fcfcfd;
  font-size: 14px; color: var(--v2-sub);
}
.v2-pager button {
  border: 1px solid var(--v2-line); background: var(--panel); border-radius: 8px;
  padding: 5px 12px; font-size: 14px; color: var(--text-2); cursor: pointer; font-family: inherit;
}
.v2-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* 页脚说明块 */
.v2-note {
  display: flex; gap: 10px; padding: 13px 16px; border-radius: 12px;
  background: #f8fafc; border: 1px solid var(--v2-line);
  font-size: 14px; color: var(--text-2); line-height: 1.75;
}
.v2-note b { color: var(--v2-ink); }
.v2-note .ic { flex: none; color: var(--brand); margin-top: 1px; }

/* 空态 */
.v2-empty { padding: 54px 24px; text-align: center; }
.v2-empty .big { font-size: 15.5px; font-weight: 650; color: var(--v2-ink); }
.v2-empty .sm { margin-top: 6px; font-size: 14px; color: var(--v2-sub); line-height: 1.75; }

/* ---------- 箭头步骤条 ---------- */
.v2-steps { display: flex; gap: 6px; }
.v2-step {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; background: #f2f4f7; color: #7c8595;
  font-size: 14.5px; font-weight: 600; padding-left: 14px;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%, 13px 50%);
}
.v2-step:first-child { clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%); padding-left: 0; }
.v2-step:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 13px 50%); }
.v2-step > i {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; font-style: normal;
  background: rgba(15, 23, 42, .1); color: #66707f;
}
.v2-step.on { background: linear-gradient(90deg, var(--brand), #15957c); color: #fff; }
.v2-step.on > i { background: rgba(255, 255, 255, .26); color: #fff; }

/* ---------- 编号分区 ---------- */
.v2-sec { padding: 22px 24px; border-bottom: 1px solid var(--v2-line); }
.v2-sec:last-of-type { border-bottom: 0; }
.v2-sec-hd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.v2-sec-no {
  width: 22px; height: 22px; border-radius: 7px; flex: none; margin-top: 1px;
  background: var(--brand-soft); color: var(--brand-text);
  font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
}
.v2-sec-t { font-size: 15.5px; font-weight: 650; color: var(--v2-ink); line-height: 1.5; }
.v2-sec-d { font-size: 13px; color: var(--v2-sub); line-height: 1.65; margin-top: 2px; }

/* ---------- 表单 ---------- */
.v2-grid { display: grid; gap: 15px 16px; }
.v2-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v2 .span2 { grid-column: span 2; }
.v2 .span3 { grid-column: span 3; }
.v2-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-f > label {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.v2-f > label em { color: var(--red); font-style: normal; font-weight: 700; }
.v2-f > label .tip { color: var(--muted); font-weight: 400; }
.v2-f .note { font-size: 12px; color: var(--muted); line-height: 1.55; }
.v2-f .cnt { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* 表单控件（v2 内覆盖全局，边框更浅、行高更松） */
.v2 input[type="text"], .v2 input[type="number"], .v2 input[type="search"],
.v2 input:not([type]), .v2 select, .v2 textarea {
  width: 100%; padding: 9px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid #e2e5ea; border-radius: 9px; background: var(--panel);
  color: var(--v2-ink); box-shadow: none;
}
.v2 select { padding-right: 32px; background-position: right 11px center; }
.v2 input::placeholder, .v2 textarea::placeholder { color: #9aa3b0; }
.v2 input:hover, .v2 select:hover, .v2 textarea:hover { border-color: #cfd4dc; }
.v2 input:focus, .v2 select:focus, .v2 textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.v2 textarea { resize: vertical; line-height: 1.75; }
.v2 input[type="checkbox"], .v2 input[type="radio"] { width: 14px; height: 14px; flex: none; padding: 0; }

/* 单选胶囊（自定义/模板） */
.v2-radio { display: inline-flex; gap: 4px; padding: 3px; background: var(--bg-subtle); border-radius: 9px; }
.v2-radio label {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 7px;
  font-size: 14.5px; color: var(--text-2); cursor: pointer; user-select: none;
}
.v2-radio input { display: none; }
.v2-radio label.on {
  background: var(--panel); color: var(--brand-text); font-weight: 650;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .09);
}

/* 来源选择卡 */
.v2-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v2-cc {
  position: relative; text-align: left; cursor: pointer; font-family: inherit;
  display: flex; gap: 11px; padding: 14px 15px; border-radius: 12px;
  border: 1px solid var(--v2-line); background: var(--panel);
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.v2-cc:hover { border-color: rgba(17, 131, 110, .4); }
.v2-cc.on {
  border-color: var(--brand); background: linear-gradient(180deg, rgba(17, 131, 110, .06), rgba(17, 131, 110, .02));
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.v2-cc-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text);
}
.v2-cc.on .v2-cc-ic { background: var(--brand); color: #fff; }
.v2-cc-tx { min-width: 0; }
.v2-cc-tx b { display: block; font-size: 14.5px; font-weight: 650; color: var(--v2-ink); }
.v2-cc-tx i { display: block; margin-top: 3px; font-size: 12.5px; color: var(--v2-sub); font-style: normal; line-height: 1.55; }
.v2-cc-dot {
  position: absolute; right: 12px; top: 12px; width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid #d5d9e0; background: var(--panel);
}
.v2-cc.on .v2-cc-dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px var(--panel); }

/* 变量芯片 */
.v2-vars { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.v2-vars button {
  border: 1px solid var(--v2-line); background: #fbfcfd; border-radius: 6px; cursor: pointer;
  padding: 2px 7px; font-size: 12.5px; color: #55637a; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.v2-vars button:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }

/* 聊天预览 */
.v2-chat { background: #f7f8fa; border: 1px solid var(--v2-line); border-radius: 12px; padding: 14px; }
.v2-chat-hd { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--v2-sub); margin-bottom: 10px; }
.v2-chat-hd .av {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #cbd5e1, #e2e8f0);
}
.v2-bub {
  position: relative; background: var(--panel); border-radius: 4px 12px 12px 12px;
  padding: 12px 14px; font-size: 14.5px; line-height: 1.8; color: #28303d;
  white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.v2-bub:empty::after { content: "文案预览会显示在这里"; color: #9aa3b0; }

/* 底部操作条 */
.v2-foot {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 24px; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px); border-top: 1px solid var(--v2-line);
}
.v2-foot .sum { font-size: 14px; color: var(--v2-sub); }
.v2-foot .sum b { color: var(--v2-ink); font-weight: 650; }

/* ---------- 向导：左右分栏 ---------- */
.v2-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.v2-rail {
  position: sticky; top: 16px; background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.v2-rail h5 { font-size: 14px; font-weight: 650; color: var(--v2-sub); letter-spacing: .02em; }
.v2-rail .kv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--v2-sub); }
.v2-rail .kv b { font-size: 15px; color: var(--v2-ink); font-variant-numeric: tabular-nums; }
.v2-rail .big { font-size: 30px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1; }
.v2-rail .big span { font-size: 14px; font-weight: 500; color: var(--v2-sub); margin-left: 3px; letter-spacing: 0; }
.v2-rail .hr { height: 1px; background: var(--v2-line); }
.v2-rail .warnbox {
  font-size: 13px; line-height: 1.7; color: #8a5a12; background: #fdf7e9;
  border: 1px solid #f7e6bd; border-radius: 9px; padding: 9px 11px;
}

/* 库内勾选列表 */
.v2-pick { max-height: 380px; overflow: auto; border: 1px solid var(--v2-line); border-radius: 10px; }
.v2-pk {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid #f2f3f6; font-size: 14.5px;
}
.v2-pk:last-child { border-bottom: 0; }
.v2-pk:hover { background: #fbfcfd; }
.v2-pk.on { background: var(--brand-soft); }
.v2-pk > img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg-subtle); flex: none; }
.v2-pk .l1 { font-weight: 600; color: var(--v2-ink); }
.v2-pk .l2 { font-size: 12.5px; color: var(--v2-sub); margin-top: 2px; }

/* 未入库名单 */
.v2-miss {
  margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #fdf7e9;
  border: 1px solid #f7e6bd; font-size: 12.5px; color: #7a5410; line-height: 2;
  max-height: 120px; overflow: auto;
}
.v2-miss code { background: rgba(255, 255, 255, .8); border-radius: 4px; padding: 1px 5px; margin-right: 4px; font-size: 12px; }

/* ---------- 详情抽屉（复用 aff-drawer 外壳） ---------- */
.v2-dhd { display: flex; align-items: flex-start; gap: 12px; }
.v2-dhd .nm { font-size: 19.5px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.v2-dhd .hd2 { font-size: 13px; color: var(--v2-sub); margin-top: 4px; }
.v2-kv8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.v2-kv8 > div { background: #fafbfc; border: 1px solid var(--v2-line); border-radius: 10px; padding: 9px 11px; }
.v2-kv8 span { display: block; font-size: 12px; color: var(--v2-sub); }
.v2-kv8 b { display: block; margin-top: 2px; font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-sub { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 650; color: var(--v2-ink); margin: 22px 0 10px; }
.v2-sub:first-child { margin-top: 0; }

/* 批次卡 */
.v2-bts { display: flex; flex-direction: column; gap: 8px; }
.v2-bt {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--v2-line); border-radius: 11px; background: var(--panel);
}
.v2-bt.done { opacity: .6; }
.v2-bt .no { font-size: 14px; font-weight: 650; width: 52px; flex: none; }
.v2-bt .tm { font-size: 13px; color: var(--v2-sub); width: 104px; flex: none; font-variant-numeric: tabular-nums; }
.v2-bt .mid { flex: 1; min-width: 0; }
.v2-bt .nm2 { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 发送清单 */
.v2-qlist { max-height: 46vh; overflow: auto; border: 1px solid var(--v2-line); border-radius: 11px; }
.v2-qrow {
  display: grid; grid-template-columns: 20px 190px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 11px 14px; border-bottom: 1px solid #f2f3f6;
}
.v2-qrow:last-child { border-bottom: 0; }
.v2-qrow:hover { background: #fcfcfd; }
.v2-qrow.sent { opacity: .42; }
.v2-qrow .who .l1 { font-size: 14.5px; font-weight: 650; }
.v2-qrow .who .l2 { font-size: 12.5px; color: var(--v2-sub); margin-top: 3px; line-height: 1.6; }
.v2-qrow .msg {
  font-size: 13px; color: var(--text-2); line-height: 1.65; cursor: pointer;
  display: block; max-height: 38px; overflow: hidden;
}
.v2-qrow .msg.open { display: block; max-height: 220px; overflow: auto; }
.v2-qrow .ops { display: flex; gap: 5px; }

/* v2 里的次级按钮统一尺寸 */
.v2 .btn { font-size: 15px; padding: 8px 16px; border-radius: 9px; box-shadow: none; }
.v2 .btn:not(.ghost) { box-shadow: 0 2px 8px var(--brand-glow); }
.v2 .btn.sm { font-size: 14px; padding: 6px 12px; }

/* 窄屏兜底 */
@media (max-width: 1280px) {
  .v2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-split { grid-template-columns: minmax(0, 1fr); }
  .v2-rail { position: static; }
}
@media (max-width: 1080px) {
  .v2-choice { grid-template-columns: 1fr; }
  .v2-g3, .v2-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 弹窗里的 v2 表单：.modal label 默认 display:block + 上下 margin，
   会把 .v2-f 的 gap 布局顶歪 */
.modal .v2-f > label { display: flex; margin: 0; font-size: 13px; }
.modal .v2 input, .modal .v2 select, .modal .v2 textarea { width: 100%; }
.modal.v2 { padding: 22px 24px; }

/* 建联中心的模块提示条只在数据概览里有内容，其它页签空着也会撑出一条绿底 */
.ct-note:empty { display: none; padding: 0; border: 0; }

/* =========================================================
 * 建联中心 · 页签分组条（一级分组 + 二级页签）
 * 19 个页签平铺一屏放不下，先选分组再选页签
 * ========================================================= */
.ct-bar { flex-direction: column; align-items: stretch; gap: 8px; }
.ct-groups { display: flex; gap: 4px; flex-wrap: wrap; padding-bottom: 2px; }
.ct-g {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  padding: 6px 13px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.ct-g:hover { background: var(--hover); color: var(--text); }
.ct-g.on { background: var(--brand-soft); color: var(--brand-text); }
.ct-g em {
  font-style: normal; font-size: 12px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 999px; padding: 0 4px;
  background: rgba(15, 23, 42, .06); color: var(--muted);
}
.ct-g.on em { background: var(--brand-soft-strong); color: var(--brand-text); }
.ct-bar .af-tabs { align-self: flex-start; }

/* =========================================================
 * 通用弹窗头（.mf-hd）—— 用在 .modal.v2 里替换 h3
 * ========================================================= */
.mf-hd {
  display: flex; align-items: flex-start; gap: 12px;
  margin: -4px 0 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--v2-line);
}
.mf-hd > div:first-child { flex: 1; min-width: 0; }
.mf-hd h3 { font-size: 18.5px; font-weight: 700; margin: 4px 0 0; letter-spacing: -.2px; }
.mf-hd .mf-sub { font-size: 13px; color: var(--v2-sub); margin-top: 4px; line-height: 1.6; }

/* =========================================================
 * 私信 / 邮件任务弹窗：头尾固定，中间滚动
 * ========================================================= */
.modal.dm-modal {
  width: min(1020px, 94vw); max-width: 94vw;
  max-height: 90vh; overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
}
.dm-fhd {
  flex: none; display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 24px 14px; border-bottom: 1px solid var(--v2-line);
  background: var(--panel);
}
.dm-fhd > div:first-child { flex: 1; min-width: 0; }
.dm-fhd h3 { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.dm-fbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dm-fbody .v2-sec:last-child { border-bottom: 0; }
.dm-modal .v2-foot { flex: none; }

/* =========================================================
 * 消息序列编辑器
 * ========================================================= */
/* 每一行自己就是 .dm-seq，容器是 #dmf-seq —— 别把容器写成列、行也写成列，
   那样「编号 / 类型 / 输入区 / 删除」会竖着摞起来 */
#dmf-seq, .dm-seq-list { display: flex; flex-direction: column; gap: 8px; }
.dm-seq {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--v2-line); border-radius: 11px;
  background: #fcfcfd; padding: 11px 12px;
}
.dm-seq-no {
  flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 6px; background: var(--brand-soft); color: var(--brand-text);
  font-size: 12.5px; font-weight: 700; margin-top: 1px;
}
.dm-seq-kind {
  flex: none; width: 84px; font-size: 13px; font-weight: 600; color: var(--text-2);
  display: flex; align-items: center; gap: 4px; padding-top: 6px; white-space: nowrap;
}
.dm-seq-body { flex: 1; min-width: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.dm-seq-body > * { min-width: 0; }
.dm-seq-text { width: 100%; font-size: 14.5px; line-height: 1.7; min-height: 58px; resize: vertical; }
.dm-seq-url { width: 100%; font-size: 14.5px; }
.dm-seq-prod { display: flex; gap: 6px; width: 100%; }
.dm-seq-prod input { font-size: 14.5px; }
.dm-seq-del { flex: none; margin-top: 4px; color: var(--muted); }
.dm-seq-del:hover { color: var(--red); background: var(--red-soft); }

/* 聊天气泡预览（消息序列右侧 / 详情抽屉） */
.dm-prev { display: flex; flex-direction: column; gap: 8px; }
.dm-bub {
  align-self: flex-end; max-width: 78%;
  background: var(--brand-soft); color: #123c33;
  border-radius: 12px 4px 12px 12px; padding: 9px 12px;
  font-size: 14.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
}
.dm-bub-img { padding: 5px; background: var(--panel); border: 1px solid var(--v2-line); }
.dm-bub-img img { display: block; border-radius: 8px; }
.dm-bub-card {
  align-self: flex-end; display: flex; align-items: center; gap: 9px;
  background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 12px 4px 12px 12px; padding: 8px 10px; max-width: 78%;
}
.dm-bub-card b { font-size: 14px; font-weight: 600; line-height: 1.5; display: block; }

/* 状态分布胶囊条 */
.dm-stats { display: flex; flex-wrap: wrap; gap: 6px; }

/* 批量操作条（勾选后从表格上方浮出） */
.dm-bulk {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px 7px 12px; border-radius: 10px;
  background: var(--brand-soft); border: 1px solid var(--brand-soft-strong);
  font-size: 14px; color: var(--brand-text);
  animation: fadeIn .14s var(--ease);
}
.dm-bulk b { color: var(--brand-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-bulk .btn { box-shadow: none; }

/* 变量选择浮层 */
.dm-vars-pop {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 90; width: 340px; max-width: 92vw;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; padding: 14px 16px 12px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .16s var(--ease);
}
.dm-vars-hd {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14.5px; font-weight: 650; color: var(--v2-ink); margin-bottom: 4px;
}
.dm-vars-tip { margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* =========================================================
 * 竞品竞店：商品池卡片
 * ========================================================= */
.rv-pool {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px;
}
.rv-item {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--v2-line); border-radius: 12px;
  background: var(--panel); cursor: pointer;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease);
}
.rv-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.rv-item.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.rv-item img, .rv-ph {
  flex: none; width: 44px; height: 44px; border-radius: 9px; object-fit: cover;
  background: var(--bg-subtle); border: 1px solid var(--v2-line);
}
.rv-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.rv-tx { flex: 1; min-width: 0; }
.rv-t {
  font-size: 14px; font-weight: 600; color: var(--v2-ink); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rv-s { margin-top: 4px; font-size: 12px; color: var(--v2-sub); line-height: 1.55; }
.rv-n {
  flex: none; min-width: 22px; height: 19px; line-height: 19px; text-align: center;
  padding: 0 5px; border-radius: 999px;
  background: var(--gray-soft); color: var(--text-2);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rv-item.on .rv-n { background: var(--brand); color: #fff; }
/* 卡片自己代表选中态，复选框只做语义，不占位 */
.rv-item > input[type="checkbox"] { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }

/* =========================================================
 * 定向计划批量运维卡
 * ========================================================= */
.ivp-ops { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.ivp-op {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 9px;
  align-items: center; text-align: left; cursor: pointer; font-family: inherit;
  padding: 12px 14px; border: 1px solid var(--v2-line); border-radius: 12px;
  background: var(--panel); transition: border-color .14s var(--ease), box-shadow .14s var(--ease), transform .14s var(--ease);
}
.ivp-op:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ivp-ico {
  grid-row: span 2; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-text); font-size: 16px;
}
.ivp-t { font-size: 14.5px; font-weight: 650; color: var(--v2-ink); line-height: 1.4; }
.ivp-d { font-size: 12px; color: var(--v2-sub); line-height: 1.5; }

/* =========================================================
 * 履约管理：店铺达人榜单名次
 * ========================================================= */
.fl-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 6px;
  background: var(--gray-soft); color: var(--text-2);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fl-rank.top { background: #fdf2df; color: #a05a00; }

/* =========================================================
 * v2 抽屉（私信详情 / 竞品达人）：头尾固定，中间滚动
 * 直接挂在 .aff-drawer.v2 下，没有 .box 包裹
 * ========================================================= */
.aff-drawer.v2 { flex-direction: column; align-items: stretch; justify-content: flex-start; }
.aff-drawer.v2 > .aff-drawer-hd,
.aff-drawer.v2 > .aff-drawer-bd,
.aff-drawer.v2 > .aff-drawer-ft { width: min(880px, 100%); margin-left: auto; }
.aff-drawer-hd {
  flex: none; display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px 14px; background: var(--panel);
  border-bottom: 1px solid var(--v2-line);
  box-shadow: var(--shadow-lg);
}
.aff-drawer-hd > div:first-child { flex: 1; min-width: 0; }
.aff-drawer-bd {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); padding: 16px 20px 24px;
}
.aff-drawer-ft {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; background: var(--panel);
  border-top: 1px solid var(--v2-line); box-shadow: 0 -8px 24px rgba(15, 23, 42, .05);
}
.aff-drawer-ft .sum { font-size: 13px; color: var(--v2-sub); }
.aff-drawer-ft .grow { flex: 1; }

@media (max-width: 900px) {
  .modal.dm-modal { width: 96vw; }
  .dm-seq-kind { width: 66px; }
  .rv-pool { grid-template-columns: 1fr; }
}

/* =========================================================
 * 达人消息中心（IM 收件箱）：左列表 + 右对话
 * 高度用 calc 撑满可视区，中间自己滚，别让整页跟着滚
 * ========================================================= */
.im-wrap {
  display: grid; grid-template-columns: 356px minmax(0, 1fr);
  gap: 12px; margin-top: 12px;
  /* 上方标题区 + 胶囊 + 工具条约占 370px，再留 30px 底部呼吸；
     写小了会把底部输入框顶出视口，写大了页面会出现双滚动条 */
  height: calc(100vh - 400px); min-height: 460px;
}
/* 达人消息的工具条搜索：本页直接把 v2-search 挂在 input 上（其他页是包一层 div），
   不给宽度就会撑满整行，把「识别达人」和会话计数挤到第二行去 */
#im-q { flex: 0 1 320px; min-width: 200px; max-width: 340px; }

.im-list {
  background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 14px; overflow-y: auto; overscroll-behavior: contain;
}
.im-empty { padding: 34px 16px; text-align: center; font-size: 14px; color: var(--v2-sub); line-height: 1.7; }

/* 首屏骨架：形状贴近真实行，加载时不跳版，也不会只剩一行「正在加载…」 */
.im-row.sk { cursor: default; pointer-events: none; min-height: 86px; align-items: center; }
.im-row.sk .av { background: var(--v2-line); }
.im-row.sk .tx { display: flex; flex-direction: column; gap: 9px; }
.im-row.sk .sk-l {
  display: block; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--v2-line) 25%, var(--hover) 37%, var(--v2-line) 63%);
  background-size: 400% 100%; animation: imShimmer 1.2s ease-in-out infinite;
}
.im-row.sk .sk-l.tag { height: 14px; border-radius: 7px; }
@keyframes imShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .im-row.sk .sk-l { animation: none; } }

.im-row {
  display: flex; gap: 10px; padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid var(--v2-line);
  transition: background .12s var(--ease);
}
.im-row:last-child { border-bottom: 0; }
.im-row:hover { background: var(--hover); }
.im-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.im-row .av { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
/* 没头像时的占位：色相按会话 ID 稳定派生，整列不至于灰成一片 */
.im-row .av.ph, .im-chd .av.ph, .im-sug .pcand .av.ph {
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--ph, 168) 44% 92%);
  color: hsl(var(--ph, 168) 40% 44%);
  font-size: 16px; font-weight: 700;
}
.im-row .av.ph.sil svg, .im-chd .av.ph.sil svg, .im-sug .pcand .av.ph.sil svg {
  width: 100%; height: 100%; display: block; opacity: .5;
}
.im-row .tx { flex: 1; min-width: 0; }
.im-row .l1 { display: flex; align-items: baseline; gap: 8px; }
.im-row .l1 b {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 650; color: var(--v2-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.im-row .l1 .tm { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.im-row .l2 {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  font-size: 13px; color: var(--v2-sub);
}
.im-row .l2 .pv {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.im-row .l2 .pv em { font-style: normal; color: var(--muted); }
.im-row .l2 .dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .12);
}
.im-row .l3 { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }

/* 小胶囊：已绑定 / 未回复 / 消息类型 */
.im-row .tg {
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 3px 6px; border-radius: 5px;
  background: var(--gray-soft); color: var(--text-2);
}
.im-row .tg.ok { background: var(--brand-soft); color: var(--brand-text); }
.im-row .tg.warn { background: rgba(217, 119, 6, .12); color: #a05a00; }
.im-row .tg.sm { background: transparent; color: var(--muted); padding-left: 0; }
.im-row .tg.cand { background: rgba(99, 102, 241, .13); color: #4f46e5; font-weight: 600; }

/* ---------- 右侧对话 ---------- */
.im-chat {
  display: flex; flex-direction: column; min-width: 0; position: relative;
  background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 14px; overflow: hidden;
}
.im-blank {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 40px 20px; text-align: center;
}
.im-blank .ic { font-size: 30px; opacity: .35; margin-bottom: 2px; }
.im-blank .t { font-size: 15px; font-weight: 600; color: var(--v2-ink); }
.im-blank .s { font-size: 13px; color: var(--v2-sub); line-height: 1.7; max-width: 360px; }
.im-blank.small { padding: 30px 16px; }

.im-chd {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--v2-line);
}
.im-chd .av { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.im-chd .tx { flex: 1; min-width: 0; }
.im-chd .tx b { display: block; font-size: 15px; font-weight: 650; color: var(--v2-ink); }
.im-chd .tx .s { font-size: 12.5px; color: var(--v2-sub); margin-top: 2px; }
.im-chd .tx .s .ok { color: var(--brand-text); font-weight: 600; }
.im-chd .tx .s .warn { color: #a05a00; font-weight: 600; }
.im-chd .acts { flex: none; display: flex; gap: 6px; }

/* 候选达人条：从定向邀约批次反推出来的人，点头像两下确认绑定 */
.im-sug {
  flex: none; margin: 10px 16px 0; padding: 10px 12px 11px;
  background: var(--panel); border: 1px solid var(--v2-line); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 40, 34, .04);
}
.im-sug .hd { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--v2-sub); margin-bottom: 9px; }
.im-sug .hd b { color: var(--brand-text); font-variant-numeric: tabular-nums; }
.im-sug .hd .tag { padding: 1px 6px; border-radius: 4px; font-size: 12px; background: #fff4e0; color: #a05a00; }
.im-sug .hd .gk { font-size: 12px; color: var(--muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-sug .who { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.im-sug .pcand {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px;
  background: #f7f9fb; border: 1px solid var(--v2-line); border-radius: 999px;
  cursor: pointer; font-family: inherit; color: var(--v2-ink); transition: all .13s;
}
.im-sug .pcand:hover { border-color: var(--brand); background: var(--brand-soft); }
.im-sug .pcand.armed { border-color: var(--brand); background: var(--brand); color: #fff; }
.im-sug .pcand .av { flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.im-sug .pcand .av.ph { font-size: 12.5px; }
.im-sug .pcand .nm { font-size: 14px; font-weight: 600; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-sug .pcand .fl { font-size: 12px; color: var(--v2-sub); white-space: nowrap; }
.im-sug .pcand.armed .fl { color: #d8f0e8; }
.im-sug .pcand .lib {
  font-size: 11.5px; font-weight: 700; padding: 0 4px; border-radius: 3px;
  background: var(--brand-soft-strong); color: var(--brand-text);
}
.im-sug .more { font-size: 12.5px; color: var(--v2-sub); }
.im-sug.hint-only { background: #fbfcfd; }
.im-sug.hint-only .lb { font-size: 13px; color: var(--v2-sub); line-height: 1.6; }

.im-msgs {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 18px; background: #fafbfc;
}
.im-line { display: flex; flex-direction: column; margin-bottom: 12px; }
.im-line.in { align-items: flex-start; }
.im-line.out { align-items: flex-end; }
.im-bub {
  max-width: 74%; padding: 9px 13px; font-size: 14.5px; line-height: 1.75;
  border: 1px solid var(--v2-line); background: var(--panel); color: var(--v2-ink);
  border-radius: 3px 12px 12px 12px; word-break: break-word;
}
.im-line.out .im-bub {
  background: var(--brand-soft); border-color: var(--brand-soft-strong);
  color: #123c33; border-radius: 12px 3px 12px 12px;
}
.im-bub .bub-tx { white-space: pre-wrap; }
.im-bub .bub-tp {
  margin-top: 5px; font-size: 11.5px; font-weight: 600; opacity: .65;
}
.im-line .tm { margin-top: 4px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- 系统通知：居中小胶囊，不伪装成一条对话 ---- */
.im-line.notice { align-items: center; margin-bottom: 14px; }
.im-line.notice .nt {
  max-width: 84%; padding: 3px 11px; border-radius: 999px;
  background: rgba(16, 24, 40, .045); color: var(--v2-sub);
  font-size: 12px; line-height: 1.7; text-align: center;
}

/* ---- 卡片消息（定向邀约 / 样品申请） ---- */
.im-card {
  width: 368px; max-width: 80%; overflow: hidden;
  background: var(--panel); border: 1px solid var(--v2-line);
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.im-card:hover { box-shadow: 0 3px 10px rgba(16, 24, 40, .08); }
.im-line.out .im-card { border-radius: 14px 4px 14px 14px; border-color: var(--brand-soft-strong); }

.im-card .ch { display: flex; align-items: center; gap: 6px; padding: 10px 12px 0; min-width: 0; }
.im-card .ch .tag {
  flex: none; padding: 2px 6px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--brand-text); background: var(--brand-soft);
}
.im-card .ch .tag.s { color: #8a5300; background: #fff3e0; }
.im-card .ch .nm {
  font-size: 14px; font-weight: 650; color: var(--v2-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.im-card .ch .pill {
  flex: none; margin-left: auto; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--v2-line); font-size: 11.5px; color: var(--v2-sub);
}

/* 商品图：等分铺满一整行，2 张就各占一半，视觉比固定 64px 小格子饱满 */
.im-card .ims { display: flex; gap: 6px; padding: 10px 12px 0; }
.im-card .tb {
  position: relative; flex: 1 1 0; min-width: 0; height: 86px;
  border-radius: 9px; overflow: hidden; background: #f2f4f7;
}
.im-card .tb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-card .tb .noimg { width: 100%; height: 100%; background: #f2f4f7; }
.im-card .tb.fail::after {
  content: "商品图"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; color: var(--muted); background: #f2f4f7;
}
.im-card .tb.more { flex: 0 0 62px; display: flex; align-items: center; justify-content: center;
  background: #f6f8fa; color: var(--v2-sub); font-size: 14.5px; font-weight: 650; }

.im-card .ttl {
  padding: 9px 12px 0; font-size: 14.5px; line-height: 1.65; color: var(--v2-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.im-card .kv {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  padding: 7px 12px 0; font-size: 12.5px; color: var(--v2-sub);
}
.im-card .kv b { color: var(--v2-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.im-card .kv .st { padding: 1px 6px; border-radius: 5px; background: #f2f4f7; }
.im-card .kv .st.ok { background: var(--brand-soft); color: var(--brand-text); }
.im-card .kv .st.bad { background: #fdecec; color: #b42318; }

.im-card .sb { display: flex; gap: 10px; padding: 10px 12px 0; }
.im-card .sb .tb { flex: none; width: 64px; height: 64px; }
.im-card .sb .tx { flex: 1; min-width: 0; }
.im-card .sb .ttl { padding: 0; }
.im-card .sb .kv { padding: 6px 0 0; }

.im-card .cf {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 12px;
  border-top: 1px solid var(--v2-line); background: #fafbfc;
  font-size: 12px; color: var(--v2-sub);
}
.im-card .cf .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-card .cf .go { margin-left: auto; flex: none; color: var(--brand-text); font-weight: 600; }

/* 卡片数据还没预热好（邀约组商品在后台拉取中） */
.im-card.pending .ph-line { display: flex; gap: 6px; padding: 10px 12px 0; }
.im-card.pending .ph-line i {
  display: block; flex: 1 1 0; height: 86px; border-radius: 9px;
  background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 37%, #eef1f5 63%);
  background-size: 400% 100%; animation: imShimmer 1.2s ease-in-out infinite;
}
.im-card.pending .hint { padding: 9px 12px 12px; font-size: 12px; color: var(--muted); }

/* 图片消息 */
.im-bub.img { padding: 4px; line-height: 0; }
.im-bub.img img { max-width: 236px; max-height: 236px; border-radius: 9px; display: block; object-fit: cover; }

.im-comp { flex: none; border-top: 1px solid var(--v2-line); padding: 10px 14px 12px; background: var(--panel); }
.im-comp textarea {
  width: 100%; min-height: 68px; max-height: 160px; resize: vertical;
  border: 1px solid var(--v2-line); border-radius: 10px; padding: 10px 12px;
  font-family: inherit; font-size: 14.5px; line-height: 1.7; color: var(--v2-ink);
  background: var(--panel); outline: none;
}
.im-comp textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.im-comp .ft { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.im-comp .hint { font-size: 12px; color: var(--muted); }

/* ---------------- AI 帮写 ----------------
 * 工具条比输入框矮一档（28px），跟右下角「发送」按钮区分主次：
 * 发送是执行动作，AI 只是起草。 */
.im-ai { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; flex-wrap: wrap; }
.im-ai .grow { flex: 1; }
.im-ai .sp { color: var(--brand); }
.im-ai .sp.spin { display: inline-block; animation: imSpin .9s linear infinite; }
@keyframes imSpin { to { transform: rotate(360deg); } }
/* 下拉高度压到 28：全局 select 是 36 高，放在这排按钮里会顶出来 */
.im-ai select { height: 28px; padding-top: 0; padding-bottom: 0; font-size: 13px; border-radius: 8px; }
/* 文案长的下拉必须显式给宽：Chrome 算自动宽度不认 padding，箭头净空会把末尾吃掉 */
.im-ai #im-ai-intent { min-width: 196px; max-width: 220px; }
.im-ai #im-ai-lang { min-width: 126px; max-width: 150px; }
.im-ai .im-ai-st {
  font-size: 12px; color: var(--muted); max-width: 300px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.im-ai .im-ai-st.bad { color: var(--red); }

/* 浮层而非排版元素：对话区本身只有 400 多像素高，
   面板一旦参与排版就会把消息区压成一条缝。bottom 由 imAiRender 按输入区实际高度算。 */
.im-ai-out {
  position: absolute; left: 14px; right: 14px; bottom: 150px; z-index: 8;
  border: 1px solid var(--v2-line); border-radius: 10px;
  background: var(--v2-soft); overflow: hidden; box-shadow: var(--shadow);
}
.im-ai-out .hd {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--v2-line); background: var(--panel);
}
.im-ai-out .hd .ttl { font-size: 13px; font-weight: 650; color: var(--v2-ink); }
.im-ai-out .hd .sub { font-size: 12px; color: var(--muted); }
.im-ai-out .hd .x {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 3px 5px; border-radius: 5px;
}
.im-ai-out .hd .x:hover { background: var(--hover); color: var(--text); }
.im-ai-out .list {
  /* 三条候选并排：运营要的是「比较三个方向」，竖排一次只看得到一条半，反而更难选。
     auto-fit 让窄屏自动降到 1~2 列，不写死媒体查询。 */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 7px; padding: 7px; max-height: min(250px, 40vh); overflow: auto;
}
.im-ai-out .opt {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--v2-line); border-radius: 9px; padding: 8px 10px;
}
.im-ai-out .opt .oh { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.im-ai-out .opt .oh .grow { flex: 1; }
.im-ai-out .stag {
  padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-text); flex: none;
}
.im-ai-out .opt .use { padding: 2px 9px; font-size: 13px; flex: none; }
/* 正文最多 5 行：外语长句全展开会把面板顶到半屏，剩下的交给「填入」后去输入框里看 */
.im-ai-out .tx {
  font-size: 14.5px; line-height: 1.62; color: var(--v2-ink); word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
}
.im-ai-out .zh {
  margin-top: 6px; padding-top: 5px; border-top: 1px dashed var(--v2-line);
  font-size: 12.5px; line-height: 1.55; color: var(--v2-sub); word-break: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.im-ai-out .note {
  margin-top: auto; padding-top: 5px; font-size: 12px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* ---------------- 客服消息：AI 帮写 ----------------
 * 候选面板直接复用上面 .im-ai-out 那一套（视觉跟达人消息一致），
 * 只改定位：im 那边按达人页输入区高度写死 bottom:150px，客服页输入区高度不同，
 * 改成贴在输入区正上方，窗口怎么缩放都不会错位。 */
.cs-compose { position: relative; }
.cs-ai { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; flex-wrap: wrap; }
.cs-ai .grow { flex: 1; }
.cs-ai .sp { color: var(--brand); }
.cs-ai .sp.spin { display: inline-block; animation: imSpin .9s linear infinite; }
/* 下拉压到 28 高，跟左边按钮齐平；全局 select 是 36 高，放这排会顶出来 */
.cs-ai select { height: 28px; padding-top: 0; padding-bottom: 0; font-size: 13px; border-radius: 8px; }
.cs-ai #cs-ai-scene { min-width: 176px; max-width: 210px; }
.cs-ai #cs-ai-lang { min-width: 126px; max-width: 150px; }
.cs-ai .cs-ai-st {
  font-size: 12px; color: var(--muted); max-width: 340px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-ai .cs-ai-st.bad { color: var(--red); }
/* 上面那套 .im-ai-out 用的是 --v2-* 变量，而它们只定义在 .v2 作用域（达人邀约页），
   客服页不在里面 → 变量取不到值，背景变透明、边框变 none，下面的聊天气泡会直接
   「透」到面板上。这里就地补一份变量，样式结构一行都不用改。 */
.im-ai-out.cs-ai-out {
  --v2-line: var(--border);
  --v2-ink: var(--text);
  --v2-sub: var(--muted);
  --v2-soft: #f7f8fa;
  background: #f7f8fa;
  left: 18px; right: 18px; bottom: 100%; margin-bottom: 9px;
}
/* 关闭按钮要贴最右：.im-ai-out .hd .x 是 0,3,0，只写 .cs-ai-out .hd .x 会被压住。
   sub 必须能截断，否则「读了 12 条消息 · 1 笔订单」这种长句会把 ✕ 挤出面板。 */
.im-ai-out.cs-ai-out .hd { overflow: hidden; }
.im-ai-out.cs-ai-out .hd .ttl { flex: none; }
.im-ai-out.cs-ai-out .hd .sub {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.im-ai-out.cs-ai-out .hd .x { margin-left: auto; flex: none; }

/* 绑定达人弹窗里的搜索结果行 */
.imb-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; border: 1px solid var(--v2-line); border-radius: 10px;
  margin-bottom: 6px; cursor: pointer; transition: border-color .12s var(--ease), background .12s var(--ease);
}
.imb-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.imb-row b { font-size: 14.5px; font-weight: 650; color: var(--v2-ink); }
.imb-row .s { font-size: 12.5px; color: var(--v2-sub); }

@media (max-width: 1180px) {
  .im-wrap { grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 380px); }
}
@media (max-width: 900px) {
  .im-wrap { grid-template-columns: 1fr; height: auto; }
  .im-list { max-height: 320px; }
  .im-chat { height: 520px; }
}

/* =========================================================
 * 运营驾驶舱（.dh-*）
 * 一屏四段：KPI → 趋势/站点 → 风险/成本/达人 → 商品/任务/活动
 * ========================================================= */
.dh { display: flex; flex-direction: column; gap: 14px; }

/* ---- 页头 ---- */
.dh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dh-title h1 { font-size: 23px; font-weight: 700; letter-spacing: -.2px; }
.dh-sub { margin-top: 5px; font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.dh-sub b { font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dh-sub-sep { width: 1px; height: 10px; background: var(--border-strong); margin: 0 5px; display: inline-block; }
.dh-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- 分段控件 ---- */
.dh-seg { display: inline-flex; background: var(--bg-subtle); border-radius: 9px; padding: 3px; gap: 2px; }
.dh-seg button {
  border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text-2);
  padding: 5px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: background .14s var(--ease), color .14s var(--ease), box-shadow .14s var(--ease);
}
.dh-seg button:hover { color: var(--text); }
.dh-seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.dh-seg.sm button { font-size: 13px; padding: 4px 9px; }

/* ---- 卡片 ---- */
.dh-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px 17px 14px; min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.dh-card:hover { border-color: var(--border-strong); box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.dh-card-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dh-card-hd h3 { font-size: 16px; font-weight: 650; letter-spacing: -.1px; }
.dh-card-sub { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.dh-card-more {
  border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--brand-text);
  cursor: pointer; padding: 2px 0; white-space: nowrap; flex: none;
}
.dh-card-more:hover { text-decoration: underline; }

/* ---- KPI ---- */
.dh-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 15px 12px; min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.kpi::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120px 80px at 100% 0%, rgba(17, 131, 110, .07), transparent 70%);
}
.kpi:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(15, 23, 42, .07); transform: translateY(-1px); }
.kpi-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 14px; color: var(--muted); font-weight: 500; cursor: help; }
.kpi-val {
  margin-top: 7px; font-size: 31px; font-weight: 700; letter-spacing: -.8px;
  line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text);
}
.kpi-val .dh-dec { font-size: 18.5px; font-weight: 650; letter-spacing: -.3px; color: var(--text-2); }
.kpi-foot {
  margin-top: 7px; font-size: 13px; color: var(--muted); line-height: 1.4;
  min-height: 33px; white-space: normal; word-break: break-word;
}
.kpi.bad .kpi-val { color: var(--red); }
.kpi.warn .kpi-label::after { content: " ⚠"; font-size: 12.5px; }
.kpi.alert .kpi-val { color: var(--amber); }

/* 环比胶囊：涨红跌绿（国内看盘习惯） */
.dh-dt {
  font-size: 12.5px; font-weight: 650; padding: 2px 7px; border-radius: 99px;
  font-variant-numeric: tabular-nums; white-space: nowrap; flex: none;
}
.dh-dt.up { background: var(--red-soft); color: var(--red); }
.dh-dt.down { background: var(--green-soft); color: var(--green); }
.dh-dt.flat { background: var(--gray-soft); color: var(--muted); }

/* KPI 底部迷你柱 */
.dh-spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; margin-top: 10px; }
.dh-spark > i { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; background: var(--brand-soft-strong); }
.dh-spark.brand > i { background: linear-gradient(180deg, rgba(17, 131, 110, .55), rgba(17, 131, 110, .22)); }
.dh-spark.blue > i { background: linear-gradient(180deg, rgba(29, 78, 216, .5), rgba(29, 78, 216, .18)); }
.dh-spark.green > i { background: linear-gradient(180deg, rgba(4, 120, 87, .5), rgba(4, 120, 87, .18)); }
.dh-spark.amber > i { background: linear-gradient(180deg, rgba(180, 83, 9, .48), rgba(180, 83, 9, .16)); }
.dh-spark.red > i { background: linear-gradient(180deg, rgba(185, 28, 28, .5), rgba(185, 28, 28, .18)); }
.dh-spark.teal > i { background: linear-gradient(180deg, rgba(13, 148, 136, .5), rgba(13, 148, 136, .18)); }
.dh-spark.gray > i { background: linear-gradient(180deg, rgba(148, 163, 184, .45), rgba(148, 163, 184, .16)); }

/* 「没有真值」的统一呈现：不许用一个 0 冒充，也不许留白 */
.dh-na, .kpi-val .dh-na {
  font-size: 19.5px; font-weight: 600; letter-spacing: 0;
  color: var(--text-3, #94a3b8);
}

/* ---- 行布局 ---- */
.dh-row { display: grid; gap: 14px; align-items: stretch; }
.dh-r2 { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.dh-r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dh-card { display: flex; flex-direction: column; }

/* ---- 趋势图 ---- */
.dh-trend-stat { display: flex; gap: 22px; padding: 2px 0 12px; flex-wrap: wrap; }
.dh-trend-stat > div { display: flex; flex-direction: column; gap: 1px; }
.dh-trend-stat span { font-size: 12.5px; color: var(--muted); }
.dh-trend-stat b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.dh-trend-stat b i { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.dh-trend-stat em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.dchart { display: flex; align-items: flex-end; gap: 2px; height: 158px; padding-top: 4px; }
/* 同一行里别的卡片更高时（比如店铺结构列了 6 行），趋势图跟着长高，
   别把下半张卡留成一片空白 */
.dh-trend #dh-chart { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dh-trend .dchart { flex: 1 1 auto; height: auto; min-height: 158px; }
.dcol { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.dcol-bar { height: calc(100% - 19px); display: flex; align-items: flex-end; }
.dcol-bar > i {
  display: block; width: 100%; max-width: 58px; margin: 0 auto; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #34b79b 0%, #11836e 100%);
  transition: filter .12s var(--ease), opacity .12s var(--ease);
}
.dcol.neg .dcol-bar > i { background: linear-gradient(180deg, #e57373 0%, #b91c1c 100%); }
.dcol:hover .dcol-bar > i { filter: brightness(1.1) saturate(1.1); }
.dchart:hover .dcol-bar > i { opacity: .55; }
.dchart .dcol:hover .dcol-bar > i { opacity: 1; }
.dcol-x {
  height: 19px; display: flex; align-items: flex-end; justify-content: center;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: visible;
}
.dcol-tip {
  position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: #111827; color: #fff; border-radius: 8px; padding: 6px 9px;
  display: flex; flex-direction: column; gap: 1px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .13s var(--ease), transform .13s var(--ease);
  z-index: 20; box-shadow: 0 8px 20px rgba(15, 23, 42, .22);
}
.dcol:hover .dcol-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.dcol-tip b { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.dcol-tip span { font-size: 12px; color: rgba(255, 255, 255, .65); }
.dcol-tip em { font-style: normal; font-size: 12px; color: rgba(255, 255, 255, .65); }
.dcol:first-child .dcol-tip { left: 0; transform: translateX(0) translateY(4px); }
.dcol:first-child:hover .dcol-tip { transform: translateX(0) translateY(0); }
.dcol:last-child .dcol-tip { left: auto; right: 0; transform: translateX(0) translateY(4px); }
.dcol:last-child:hover .dcol-tip { transform: translateX(0) translateY(0); }

/* ---- 站点结构 ---- */
.sitem-list { display: flex; flex-direction: column; flex: 1; justify-content: center; }
.sitem {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px;
  padding: 12px 0 11px; border-bottom: 1px dashed var(--border);
  flex: 1; align-content: center;
}
.sitem:last-of-type { border-bottom: 0; }
.sitem-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sitem-code {
  flex: none; width: 30px; height: 22px; border-radius: 6px; background: var(--brand-soft);
  color: var(--brand-text); font-size: 12px; font-weight: 700; letter-spacing: .3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sitem-name { min-width: 0; }
.sitem-name b { display: block; font-size: 14.5px; font-weight: 600; }
.sitem-name em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }
.sitem-r { text-align: right; }
.sitem-r b { display: block; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sitem-r em {
  display: flex; align-items: center; justify-content: flex-end; gap: 5px;
  font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px;
}
.sitem-r .dh-dt { padding: 1px 5px; font-size: 11.5px; }
.sitem-bar {
  grid-column: 1 / -1; height: 5px; border-radius: 99px; background: var(--bg-subtle);
  overflow: hidden; margin-top: 7px;
}
.sitem-bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #4cc4aa 0%, #11836e 100%);
  transition: width .5s var(--ease);
}
.sitem-idle-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sitem-more { margin-top: 8px; font-size: 12px; color: var(--muted); }
.sitem-idle-t { font-size: 12px; color: var(--muted); }
.sitem-idle {
  font-size: 12px; color: var(--muted); background: var(--gray-soft);
  border-radius: 99px; padding: 2px 8px;
}
.sitem-sum {
  display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 11px;
  border-top: 1px solid var(--border);
}
.sitem-sum span { font-size: 12.5px; color: var(--muted); }
.sitem-sum b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; margin-left: auto; }
.sitem-sum em { font-style: normal; font-size: 12.5px; color: var(--muted); }

/* ---- 风险待办 ---- */
.dh-pill {
  font-size: 12.5px; font-weight: 650; padding: 2px 8px; border-radius: 99px; white-space: nowrap; flex: none;
  font-variant-numeric: tabular-nums;
}
.dh-pill.bad { background: var(--red-soft); color: var(--red); }
.dh-pill.warn { background: var(--amber-soft); color: var(--amber); }
.dh-pill.ok { background: var(--green-soft); color: var(--green); }
.dh-pill.mute { background: var(--gray-soft); color: var(--muted); }
.risk-today {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  background: var(--bg-subtle); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px;
}
.risk-today > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.risk-today span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.risk-today b {
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.risk-today b.neg { color: var(--red); }
.risk-list { display: flex; flex-direction: column; gap: 2px; }
.risk {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px;
  cursor: pointer; transition: background .13s var(--ease);
}
.risk:hover { background: var(--hover); }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.risk.bad .risk-dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .13); }
.risk.warn .risk-dot { background: #d97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, .13); }
.risk.mute .risk-dot { background: #94a3b8; }
.risk.ok .risk-dot { background: #059669; box-shadow: 0 0 0 3px rgba(5, 150, 105, .13); }
.risk-mid { min-width: 0; flex: 1; }
.risk-mid b { display: block; font-size: 14.5px; font-weight: 600; }
.risk-mid em {
  display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.risk-n {
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none;
  color: var(--text-2); min-width: 20px; text-align: right;
}
.risk.bad .risk-n { color: var(--red); }
.risk-hint { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--muted); }
.risk-links { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.risk-links button {
  flex: 1; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 12.5px;
  color: var(--text-2); padding: 5px 4px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: border-color .13s var(--ease), color .13s var(--ease), background .13s var(--ease);
}
.risk-links button:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }

/* ---- 成本结构 ---- */
.cost-list { display: flex; flex-direction: column; gap: 7px; }
/* 标签列必须放得下「平台及履约费用」六个字，58px 会压到进度条上 */
.costrow { display: grid; grid-template-columns: 76px minmax(0, 1fr) 62px 50px; align-items: center; gap: 7px; }
.costrow-l { font-size: 13px; color: var(--text-2); white-space: nowrap; letter-spacing: -.2px; }
.costrow-bar { height: 6px; border-radius: 99px; background: var(--bg-subtle); overflow: hidden; }
.costrow-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7cc9b8 0%, #11836e 100%); }
.costrow-v { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.costrow-r { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
/* 口径明细：补上三行金额的来源与覆盖率，顺带填掉卡片下半部的空白 */
.cost-note {
  list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 9px;
}
.cost-note li { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.cost-note li b { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 1px; }
.cost-note li span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.cost-note .btn.sm { height: 21px; padding: 0 8px; font-size: 12.5px; line-height: 19px; }
.cost-foot {
  display: flex; align-items: baseline; gap: 7px; margin-top: auto; padding-top: 11px;
  border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}
.cost-foot b { margin-left: auto; font-size: 15px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.cost-foot em { font-style: normal; }

/* ---- 达人漏斗 ---- */
.fun-list { display: flex; flex-direction: column; gap: 11px; }
.fun-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fun-hd span { font-size: 13px; color: var(--text-2); }
.fun-hd b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.fun-bar { height: 7px; border-radius: 99px; background: var(--bg-subtle); overflow: hidden; margin: 5px 0 4px; }
.fun-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4cc4aa, #11836e); transition: width .5s var(--ease); }
.fun:nth-child(2) .fun-bar > i { background: linear-gradient(90deg, #86d3c3, #2a9d85); }
.fun:nth-child(3) .fun-bar > i { background: linear-gradient(90deg, #a7dfd3, #4cc4aa); }
.fun-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.fun-extra { display: flex; gap: 16px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--border); }
.fun-extra > div { display: flex; flex-direction: column; gap: 1px; }
.fun-extra span { font-size: 12px; color: var(--muted); }
.fun-extra b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.text-amber { color: var(--amber); }

/* ---- 热销商品 ---- */
.prod-list { display: flex; flex-direction: column; gap: 1px; }
.prod { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.prod:last-child { border-bottom: 0; }
.prod-i {
  flex: none; width: 18px; height: 18px; border-radius: 5px; background: var(--gray-soft);
  color: var(--muted); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.prod-i.hot { background: var(--brand-soft); color: var(--brand-text); }
.prod-mid { min-width: 0; flex: 1; }
/* 商品名是泰/越/马来语，行高必须给到 1.6 否则上下标会叠字；
   固定 2 行，超出部分交给 line-clamp（行高足够时它算得准，不会切边）。 */
.prod-mid b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  font-size: 14px; font-weight: 500; line-height: 1.6;
  overflow: hidden; word-break: break-word;
}
.prod-mid em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }
.prod-v { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; flex: none; }

/* ---- 任务 ---- */
.task-list { display: flex; flex-direction: column; gap: 1px; }
.task { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.task:last-child { border-bottom: 0; }
.task-p {
  flex: none; font-size: 11.5px; font-weight: 650; padding: 2px 6px; border-radius: 5px; white-space: nowrap;
}
.task-p.bad { background: var(--red-soft); color: var(--red); }
.task-p.mute { background: var(--gray-soft); color: var(--muted); }
.task-p.ok { background: var(--green-soft); color: var(--green); }
.task-mid { min-width: 0; flex: 1; }
.task-mid b {
  display: block; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-mid em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ---- 活动 ---- */
.camp-list { display: flex; flex-direction: column; gap: 1px; }
.camp { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.camp:last-child { border-bottom: 0; }
.camp-badge {
  flex: none; font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 5px; white-space: nowrap;
}
.camp-badge.ok { background: var(--green-soft); color: var(--green); }
.camp-badge.info { background: var(--blue-soft); color: var(--blue); }
.camp-badge.mute { background: var(--gray-soft); color: var(--muted); }
.camp-mid { min-width: 0; flex: 1; }
.camp-mid b {
  display: block; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.camp-mid em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ---- 空态 / 骨架 ---- */
.dh-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; color: var(--muted); font-size: 14.5px; padding: 26px 8px; line-height: 1.6;
}
.dh-empty-tip { font-size: 12.5px; color: var(--muted); opacity: .8; }
.dh-empty .btn.sm { margin-top: 4px; }
.dh-skel {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 320px; color: var(--muted); font-size: 15px;
}
.dh-skel.err { color: var(--red); }
.dh-spin {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid var(--border-strong); border-top-color: var(--brand);
  animation: dhspin .7s linear infinite;
}
@keyframes dhspin { to { transform: rotate(360deg); } }

/* ---- 响应式 ---- */
/* 4 张 KPI 在 1440 这类宽度下均分刚好；窄到 1100 以下再折成两行 */
@media (max-width: 1100px) {
  .dh-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-r2 { grid-template-columns: minmax(0, 1fr); }
  .dh-r3 { grid-template-columns: minmax(0, 1fr); }
  .dh-seg button { padding: 5px 9px; }
}

/* =========================================================
 * 财务核算 · 待补录采购价的商品（行内填价）
 * 这张表的 SKU 编码很短、商品名很长，所以只让商品名列收缩，
 * 其余列 nowrap，避免出现「$3,1…」这种被吃掉的钱。
 * ========================================================= */
.fin-gap { table-layout: fixed; }
.fin-gap th, .fin-gap td { font-size: 14.5px; }
/* 真实口径的站点/店铺表（.fin-tt）：六列挤在半宽面板里，
   通用 th/td 的 16px 内边距会把「待补录」「$160.81」压成两行，
   所以收窄内边距、数值列一律 nowrap，只让第一列（名称）可省略。 */
.fin-tt th, .fin-tt td { padding: 11px 10px; font-size: 14.5px; white-space: nowrap; }
.fin-tt th:first-child, .fin-tt td:first-child { padding-left: 14px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.fin-tt th:last-child, .fin-tt td:last-child { padding-right: 14px; }
.fin-gap .gp-title {
  width: auto; max-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fin-gap .gp-sku { width: 190px; }
.fin-gap .gp-sku code {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom;
  font-size: 13px; color: var(--text-2);
  background: var(--bg-soft, #f6f8f8); border-radius: 4px; padding: 2px 6px;
}
.fin-gap .gp-act { width: 92px; text-align: right; white-space: nowrap; }
.fin-gap td.num, .fin-gap th.num { white-space: nowrap; }

.btn.mini { height: 26px; padding: 0 10px; font-size: 14px; border-radius: 6px; }
.btn.primary.mini { background: var(--brand); color: #fff; border-color: transparent; }

.fin-gap .gp-act { position: relative; }
/* 编辑器绝对定位浮在单元格上：操作列只有 92px，塞进输入框+币种+两个按钮
   会把整列撑开、表格重排，第一行被压成「采购价」半截。浮层不参与表格布局。 */
.fin-gp-in {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 40, 36, .12);
}
.fin-gp-in .gp-price {
  width: 78px; height: 26px; padding: 0 7px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 14px; font-variant-numeric: tabular-nums;
  background: #fff; color: var(--text);
}
.fin-gp-in .gp-price:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fin-gp-in .gp-cur { height: 26px; padding: 0 4px; font-size: 13px; border-radius: 6px; }

/* =========================================================
 * 自绘下拉面板（core.js 的 nsel*）
 *
 * 原生 select 的选项面板是系统菜单（Windows 下灰底方块 + 系统蓝高亮），
 * CSS 完全改不了 —— 收起状态再怎么美化，一点开还是老样子。
 * 这里换成 body 级固定定位面板，视觉与全站的下拉收起态、弹窗一致：
 * 白底、细边、9px 圆角、轻投影；选中项品牌色 + 勾；悬停浅灰。
 * ========================================================= */
.nsel-pop {
  position: fixed; z-index: 900;
  padding: 5px; max-height: 288px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: 9px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .13), 0 2px 6px rgba(15, 23, 42, .06);
  font-size: 15px; color: var(--text);
  animation: nsel-in .12s var(--ease);
}
@keyframes nsel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nsel-opt {
  display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 9px 0 10px; border-radius: 6px;
  line-height: 30px; cursor: pointer; white-space: nowrap;
}
.nsel-opt > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nsel-opt.cur { background: var(--bg-subtle); }
/* 选中项：品牌色 + 右侧细线勾，不用字符 ✓（各系统字形粗细差别太大） */
.nsel-opt.on { color: var(--brand-text); font-weight: 600; }
.nsel-opt.on::after {
  content: ""; flex: none; width: 5px; height: 9px; margin-bottom: 2px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(42deg);
}
.nsel-opt.dis { color: var(--muted); cursor: not-allowed; }
.nsel-grp { padding: 7px 10px 3px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- 侧边栏模块排序（拖动） ----------
   标题行右侧一个 ⇅ 开关：进入编辑态后模块显示虚线框与拖动手柄，
   拖动过程中用等高的虚线占位块标示落点。
   注意：.nav-item 在文件别处声明过 position:relative，ghost 必须用
   .nav-item.nav-ghost 提权，否则 fixed 会被盖掉、跟着页面滚走。 */
.brand .nav-sort {
  margin-left: auto; flex: none;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 7px;
  background: none; color: var(--text-2);
  font-size: 16px; line-height: 1; cursor: pointer;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.brand .nav-sort:hover { color: var(--text); background: var(--hover); border-color: var(--border); }
.brand .nav-sort.on { color: var(--brand-text); background: var(--brand-soft); border-color: var(--brand-soft-strong); }

.nav-editbar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 8px 8px; padding: 5px 9px;
  border: 1px dashed var(--border-strong); border-radius: 8px;
  background: var(--bg-subtle);
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
}
.nav-editbar[hidden] { display: none; }
.nav-editbar > span { flex: 1 1 auto; }
.nav-editbar button {
  flex: none; padding: 0; border: none; background: none;
  color: var(--brand-text); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.nav-editbar button:hover { text-decoration: underline; }

/* 用 outline 而不是 border：border 会把每个模块撑高 2px，一进编辑态整列抖动 */
#nav.nav-editing .nav-item { cursor: grab; outline: 1px dashed var(--border-strong); outline-offset: -1px; }
/* hover / 聚焦 / 拿过焦点的都要压成品牌色，否则浏览器默认焦点环会在虚线框上再叠一圈别的颜色 */
#nav.nav-editing .nav-item:hover,
#nav.nav-editing .nav-item:focus,
#nav.nav-editing .nav-item:focus-visible { outline-color: var(--brand-text); }

.nav-item { user-select: none; }
.nav-grip {
  margin-left: auto; flex: none; width: 12px;
  font-size: 14px; letter-spacing: -1px; text-align: center;
  color: var(--muted); opacity: 0;
  transition: opacity .15s var(--ease);
}
#nav.nav-editing .nav-grip { opacity: .8; }

.nav-item.nav-ghost {
  position: fixed; z-index: 9999; margin: 0;
  pointer-events: none;
  border-radius: var(--radius);
  background: var(--panel) !important;
  color: var(--text) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
  opacity: .97;
}
.nav-ghost .nav-grip { opacity: 0; }

/* 拖动中的原件：只隐藏不删除。
   留在原位占着高度，整个列表在拖动期间一行都不动 —— 早前把原件摘掉、
   塞一个占位块进去，占位块和原模块差多少高度，落点就偏多少格。 */
.nav-item.nav-dragging { visibility: hidden; }

/* 落点线是 fixed 浮层，不进文档流，所以永远不会反过来影响落点计算 */
.nav-line {
  position: fixed; z-index: 9999;
  height: 3px; border-radius: 3px;
  background: var(--brand-text);
  box-shadow: 0 0 0 3px var(--brand-soft);
  pointer-events: none;
}

body.nav-dragging { user-select: none; cursor: grabbing; }
body.nav-dragging .nav-item { cursor: grabbing; }


/* ---------- 评价管理：商品档案（类目 / 库存） ----------
   类目只有商品详情接口给（列表接口不返回），所以这一列经常是「—」，
   属于「还没拉过」，不是「平台没有」，提示语要能区分这两件事。 */
.rv-cat { min-width: 0; }
.rv-cat-n {
  display: block;
  font-size: 14px; line-height: 1.4; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rv-cat-s {
  display: block;
  margin-top: 2px;
  font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rv-prof {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}
.rv-prof-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  margin-bottom: 10px;
}
.rv-prof-h .rv-mini {
  margin-left: auto;
  padding: 3px 9px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--panel); color: var(--text-2);
  font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.rv-prof-h .rv-mini:hover { border-color: var(--brand-text); color: var(--brand-text); }
.rv-prof-h .rv-mini:disabled { opacity: .55; cursor: default; }
.rv-prof-g {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
}
.rv-prof-g > div { min-width: 0; }
.rv-prof-g > div.rv-prof-w { grid-column: span 2; }
.rv-prof-g span {
  display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px;
}
.rv-prof-g b {
  display: block; font-size: 14.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rv-prof-s { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.rv-prof-empty { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ---------- 财务：平台账单（结算单 / 回款） ----------
   与利润表并列但互不影响：币种按平台原样显示（结算 MYR、打款 CNY 很常见），
   金额列右对齐 + tabular-nums，避免一列数字跳动。 */
.fin-bills-head { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 12px; }
.fin-bills-head b { font-size: 16px; color: var(--text); }
.fin-bills-sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.fin-bills-cur { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fin-bills-n { margin-left: 6px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.fin-bills-err {
  margin-bottom: 10px; padding: 8px 12px;
  border: 1px solid rgba(180, 83, 9, .25); border-radius: 8px;
  background: rgba(180, 83, 9, .07);
  font-size: 14px; color: #92400e; line-height: 1.6;
}
.fin-bills-foot { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.bill-list { max-height: 336px; overflow-y: auto; }
.bill-row {
  display: grid;
  grid-template-columns: 78px 150px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--bg-subtle);
  font-size: 14px;
}
.bill-row:last-child { border-bottom: none; }
.bill-d { color: var(--muted); font-variant-numeric: tabular-nums; }
.bill-m { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.bill-s { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.bill-ok { color: var(--brand-text); font-style: normal; font-weight: 600; }
.bill-wait { color: #b45309; font-style: normal; font-weight: 600; }

@media (max-width: 1280px) {
  .bill-row { grid-template-columns: 74px 128px minmax(0, 1fr); }
}

/* ---------- 评价管理：新鲜度提示（库存 / 类目字典） ----------
   放在工具条右侧、与「共 N 个商品」并列。两个都是可点的文字链，
   所以做轻量 hover 反馈，不抢工具条里下拉与搜索框的视觉重量。 */
.rv-fresh {
  display: flex; align-items: center;
  font-size: 12.5px; line-height: 1.4; color: var(--muted);
  white-space: nowrap;
}
.rv-fresh-i {
  padding: 2px 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: color .14s var(--ease), background .14s var(--ease);
}
.rv-fresh-i:hover { color: var(--brand-text); background: var(--brand-soft); }
.rv-fresh-i.warn { color: #b45309; }
.rv-fresh-sp {
  width: 1px; height: 10px;
  margin: 0 3px;
  background: var(--border);
}
@media (max-width: 1280px) {
  /* 1280 下工具条已经很挤，类目字典那条让位（点击入口在详情弹窗里还有） */
  .rv-fresh-i.warn { display: none; }
  .rv-fresh { max-width: 190px; overflow: hidden; }
}

/* 库存后面的「x 小时前」：比库存数字低一级，不能抢数字的注意力 */
.rv-prof-t {
  margin-left: 5px;
  font-style: normal; font-weight: 400;
  font-size: 12px; color: var(--muted);
}

/* =========================================================
 * 售后管理（2026-11-12 按妙手「售后管理」重构）
 *
 * 与旧版的区别：状态页签带数量、9 列（补买家 / 物流 / 时间 / 操作）、
 * 可导出、可写内部备注。列变多以后 1280 下必然放不下，
 * 所以外层给一个 .af-scroll 横向滚动容器 —— 宁可横向滚，也不要把列压到截字。
 * ========================================================= */

/* 状态页签：独立一行，比原来的「全部/退货退款/取消单」更贴运营的看单习惯 */
.af-stabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.af-stabs .af-tab {
  border: 1px solid var(--border); background: var(--panel);
  padding: 6px 12px; border-radius: 8px;
}
.af-stabs .af-tab:hover { border-color: var(--border-strong); background: var(--hover); }
.af-stabs .af-tab.on {
  border-color: var(--brand-text); background: var(--brand-soft);
  color: var(--brand-text); box-shadow: none;
}
/* 数量徽标：0 不显示（后端已过滤），所以这里不用处理空态 */
.af-stabs .af-tab .n {
  margin-left: 5px; padding: 0 5px;
  border-radius: 7px; background: var(--bg-subtle);
  font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.af-stabs .af-tab.on .n { background: var(--panel); color: var(--brand-text); }

/* 筛选条：下拉由数据动态生成，数量不定，允许换行 */
.af-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.af-filters .af-input { min-width: 118px; max-width: 190px; }

/* ---- 状态标签 + 快捷筛选：同一行（用户反馈：两行 pill 看起来重复） ---- */
.af-tabrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.af-tabrow .af-stabs { margin-bottom: 0; }
.af-tabsep { width: 1px; height: 20px; background: var(--border-strong); flex: none; opacity: .7; margin: 0 2px; }

/* 快捷维度（待办 / 已超时 / 有备注）：与状态标签**同一套 pill 观感**。
   用户反馈：原来做成轻量化的另一套 chip，看着像两组并排的筛选、像重复；
   现在统一尺寸与配色，只保留中间那条竖线做分隔，靠 title 说明口径。 */
.af-quick { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.af-chip {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 15px; font-weight: 600; padding: 6px 12px; border-radius: 8px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all .16s var(--ease);
}
.af-chip:hover { border-color: var(--border-strong); background: var(--hover); color: var(--text); }
.af-chip.on { border-color: var(--brand-text); background: var(--brand-soft); color: var(--brand-text); }
.af-chip .n {
  margin-left: 5px; padding: 0 5px; border-radius: 7px; background: var(--bg-subtle);
  font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.af-chip.on .n { background: var(--panel); color: var(--brand-text); }

/* 精确匹配勾选（搜索框旁）：小号不抢焦点 */
.af-exact {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.af-exact:hover { color: var(--text); }
.af-exact input { accent-color: var(--brand); width: 13px; height: 13px; margin: 0; cursor: pointer; }

/* 自定义日期区间：原生 date，与 .af-input 同一套观感（白底细边圆角） */
.af-filters .af-date { min-width: 134px; max-width: 142px; padding-right: 6px; color-scheme: light; }
.af-date-sep { font-size: 14px; color: var(--muted); }

/* =========================================================
 * 售后管理 2026-11-12 第二批：一级分类 / 标签条 / 筛选 / 批量 / 导出
 * ========================================================= */

/* ---- 一级分类：退款/退货 vs 取消订单（妙手顶部两个大页签） ---- */
.af-srcs { display: flex; gap: 8px; margin-bottom: 10px; }
.af-src {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 15.5px; font-weight: 650; padding: 8px 18px; border-radius: 10px;
  cursor: pointer; font-family: inherit; transition: all .15s var(--ease);
}
.af-src:hover { border-color: var(--border-strong); background: var(--hover); color: var(--text); }
.af-src.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.af-src .n {
  font-style: normal; font-size: 13px; font-weight: 700; padding: 0 6px; border-radius: 8px;
  background: var(--bg-subtle); color: var(--muted); font-variant-numeric: tabular-nums;
}
.af-src.on .n { background: rgba(255, 255, 255, .22); color: #fff; }

/* 详情弹窗底部的处理按钮：菜单向上展开（footer 贴底，向下会被 overflow 裁掉） */
.af-dd-up .af-dd-menu { bottom: calc(100% + 6px); top: auto; right: 0; left: auto; }
.af-btn-reject { background: var(--red, #b91c1c); border-color: var(--red, #b91c1c); color: #fff; }
.af-btn-reject:hover { filter: brightness(1.06); }
.af-noact { font-size: 13px; color: var(--muted); }
/* footer 里的说明文字要能缩（否则加了按钮会被挤出弹窗） */
.af-dlg .af-ft .af-src {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- 筛选区：三行流式（类型按钮组 / 下拉组 / 时间组） ---- */
/* align-items 必须显式 stretch：旧规则是 .af-filters{display:flex;align-items:center}，
   改成 column 后 center 会让每一行水平居中（交叉轴变成水平），看起来整块右飘 */
.af-filters { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 10px; }
.af-fr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.af-fl { font-size: 14px; font-weight: 600; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.af-filters .af-input { padding: 6px 10px; font-size: 14px; }
.af-filters .af-sel-sm { min-width: 128px; max-width: 168px; }
.af-filters .af-sel-md { min-width: 148px; max-width: 196px; }
.af-filters .af-sel-lg { min-width: 210px; max-width: 280px; }
.af-filters .af-date { min-width: 138px; max-width: 148px; padding-right: 6px; color-scheme: light; }
.af-fr-reason { display: inline-flex; }

/* 类型按钮组（带数量，替代下拉） */
.af-kchips { display: flex; gap: 5px; flex-wrap: wrap; }
.af-kchip {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 14px; font-weight: 600; padding: 4px 11px; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: all .15s var(--ease); white-space: nowrap;
}
.af-kchip:hover { border-color: var(--border-strong); background: var(--hover); color: var(--text); }
.af-kchip.on { border-color: var(--brand-text); background: var(--brand-soft); color: var(--brand-text); }
.af-kchip .n {
  margin-left: 4px; font-style: normal; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.af-kchip.on .n { color: var(--brand-text); }

/* 金额区间 */
.af-amt { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.af-amt-in { width: 80px; min-width: 80px !important; padding: 6px 8px; font-size: 14px; text-align: right; }

/* ---- 表格：复选框列（第 10 列） ----
   特异性要 .af-table.af-table10：文件后面还有一段 .af-table9 定义（9 列栅格），
   同特异性下后者会赢，加了复选框就会挤成 9 列 + 操作列掉到第二行 */
.af-table.af-table10 {
  min-width: 1280px;
  /* 除「商品」外一律固定 px（按内容实测得出），只让商品列吃剩余空间。
     原来全部用 minmax(x, .Nfr) 按比例拉伸，后果是：
       「买家」内容只有 78px 却被拉到 139px → 右侧 61px 白；
       它右边紧邻右对齐的「金额」，118px 的列里数字只占 60px → 左侧 58px 白；
       两处白连成一条 129px 的沟，看着像页面裂开了。
     买家 184 = 中文地址「马来西亚 / 吉隆坡 / Kuala Lumpur」实测 168px + 余量，
     金额 94 = "RM 1,299.99" 实测 82px + 余量，两列紧邻后间隙只剩格子间距。 */
  --af-cols: 30px 168px minmax(177px, 1fr) 206px 105px 132px 125px 119px 132px 137px;
}
.af-ck { display: flex; align-items: center; justify-content: center; }
/* 金额列：数字右对齐后紧贴列边界，会和右边的「退款原因」粘在一起；
   给 8px 右内边距让两侧都有呼吸。表头同步内移，右边缘仍与数字严格对齐。 */
.af-table.af-table10 .af-th > .af-hc:nth-child(5),
.af-table.af-table10 .af-row > .af-c:nth-child(5) { padding-right: 8px; overflow: hidden; }
.af-ck input {
  width: 14px; height: 14px; margin: 0; cursor: pointer;
  accent-color: var(--brand);
}
.af-row.on { background: var(--brand-soft); }
.af-row.on:hover { background: var(--brand-soft); }

/* 本地标签徽标 */
.af-tag {
  display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-text);
  font-size: 12px; font-weight: 600; max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}

/* ---- 批量操作条 ---- */
.af-bulk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 10px;
  background: var(--brand-soft); border: 1px solid rgba(17, 131, 110, .28); border-radius: 10px;
}
.af-bulk-n { font-size: 14.5px; color: var(--text); }
.af-bulk-n b { color: var(--brand-text); font-size: 16px; font-variant-numeric: tabular-nums; }
.af-bulk-btns { display: flex; align-items: center; gap: 8px; }
.af-bulk-tip { font-size: 13px; color: var(--muted); }
.af-dd { position: relative; }
.af-dd-btn { display: inline-flex; align-items: center; gap: 5px; }
.af-dd-btn.danger { background: var(--red, #b91c1c); border-color: var(--red, #b91c1c); color: #fff; }
.af-dd-btn.danger:hover { filter: brightness(1.06); }
.af-dd-menu { top: calc(100% + 6px); left: 0; min-width: 150px; }

/* ---- 下拉菜单（导出 / 批量） ---- */
.af-exp-wrap { position: relative; }
/* 下拉箭头：用 CSS 三角而不是 ▾ 字符（系统字体缺字时 ▾ 会渲染成方块） */
.af-caret {
  display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor; opacity: .75;
}
.af-menu {
  position: absolute; z-index: 220; min-width: 172px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 5px; animation: afpop .14s var(--ease);
}
.af-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; border: 0; background: transparent;
  font-size: 14.5px; color: var(--text); padding: 8px 10px; border-radius: 7px;
  cursor: pointer; font-family: inherit;
}
.af-menu button:hover { background: var(--hover); }
.af-menu-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.af-menu-n { font-size: 12.5px; color: var(--brand-text); font-weight: 700; }

/* ---- 弹窗尺寸扩展 ---- */
.af-dlg .af-ft { position: relative; z-index: 2; }
.af-dlg .af-ft .btn { white-space: nowrap; flex: none; }
.af-dlg .af-ft .af-src { min-width: 0; }
.af-dlg .af-panel.af-panel-l { width: min(980px, 96vw); }
.af-dlg .af-panel.af-panel-xl { width: min(1080px, 97vw); }
/* 模板弹窗：内容区弹性撑满（否则字段池只露半截、「收货信息」组被裁掉） */
.af-dlg .af-bd.af-tpl-bd { display: flex; gap: 14px; padding: 14px 16px; flex: 1; min-height: 420px; }
.af-grow { flex: 1; }

/* ---- 批量确认弹窗 ---- */
.af-warn {
  padding: 10px 12px; border-radius: 9px; margin-bottom: 12px;
  background: var(--amber-soft); border: 1px solid rgba(180, 83, 9, .25);
  font-size: 14px; line-height: 1.65; color: #7c4a07;
}
.af-bulk-list {
  max-height: 210px; overflow: auto; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg-subtle); padding: 4px 0;
}
.af-bl-row {
  display: grid; grid-template-columns: 1fr 96px 150px; gap: 10px; align-items: center;
  padding: 7px 12px; font-size: 14px; border-bottom: 1px solid var(--border);
}
.af-bl-row:last-child { border-bottom: 0; }
.af-bl-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.af-bl-st { font-size: 12.5px; color: var(--muted); text-align: right; }
.af-bulk-skip {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: var(--bg-subtle); font-size: 13px; color: var(--text-2); line-height: 1.7;
}
.af-field { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.af-field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.af-field .af-input { width: 100%; }
.af-ok-box {
  padding: 14px 12px; border-radius: 9px; background: var(--brand-soft);
  font-size: 14.5px; color: var(--brand-text);
}
.af-fail-row {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.af-fail-row:last-child { border-bottom: 0; }
.af-fail-row span:last-child { color: #b91c1c; }

/* ---- 标签编辑 ---- */
.af-tag-sug { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); align-items: center; }
.af-tag-btn {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 13px; padding: 3px 9px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.af-tag-btn:hover { border-color: var(--brand-text); color: var(--brand-text); }

/* ---- 导出记录 ---- */
.af-recs { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.af-rec-h, .af-rec {
  display: grid; grid-template-columns: 116px 88px 1fr 58px 50px 88px 76px 150px;
  gap: 8px; align-items: center; padding: 8px 12px; font-size: 14px;
}
.af-rec-h {
  background: var(--bg-subtle); border-bottom: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
}
.af-rec { border-bottom: 1px solid var(--border); }
.af-rec:last-child { border-bottom: 0; }
.af-rec:hover { background: var(--hover); }
.af-rec .num, .af-rec-h .num { text-align: right; font-variant-numeric: tabular-nums; }
.af-rec-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }

/* ---- 自定义模板 ---- */
.af-tpl-left { flex: 1.08; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.af-tpl-right { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); padding-left: 16px; }
.af-tpl-search { margin-bottom: 10px; }
.af-tpl-search .af-input { width: 100%; padding: 8px 11px; }
.af-tpl-pool {
  flex: 1; overflow: auto; border: 1px solid var(--border); border-radius: 9px;
  padding: 14px 16px 6px; background: var(--panel); min-height: 0;
}
/* 每组之间留足呼吸：字段按钮本身已经 28px 高，组间距再小就糊成一片（用户反馈「拥挤」） */
.af-tpl-g { margin-bottom: 16px; }
.af-tpl-gh {
  font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 9px;
  letter-spacing: .4px; padding-bottom: 6px; border-bottom: 1px solid var(--bg-subtle);
}
.af-tpl-gf { display: flex; flex-wrap: wrap; gap: 8px; }
.af-tpl-f {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 14px; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: inherit;
  line-height: 1.3; transition: all .12s var(--ease);
}
.af-tpl-f:hover { border-color: var(--brand-text); color: var(--brand-text); background: var(--hover); }
.af-tpl-f.on { background: var(--brand-soft); border-color: var(--brand-text); color: var(--brand-text); font-weight: 600; }
.af-tpl-rh {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 10px;
}
.af-tpl-rh b { color: var(--brand-text); font-variant-numeric: tabular-nums; }
.af-tpl-picked {
  flex: 1; overflow: auto; border: 1px dashed var(--border-strong); border-radius: 9px;
  padding: 8px; min-height: 0; background: var(--bg-subtle);
}
.af-tpl-pick {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; margin-bottom: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  font-size: 14.5px; cursor: grab;
}
.af-tpl-pick:last-child { margin-bottom: 0; }
.af-tpl-pick:hover { border-color: var(--border-strong); }
.af-tpl-pick:active { cursor: grabbing; }
.af-tpl-idx {
  width: 20px; height: 20px; border-radius: 6px; background: var(--bg-subtle);
  font-size: 12px; color: var(--muted); display: grid; place-items: center; flex: none;
  font-variant-numeric: tabular-nums;
}
.af-tpl-pn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-tpl-rm {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12.5px; padding: 2px 4px; border-radius: 5px; font-family: inherit;
}
.af-tpl-rm:hover { background: var(--red-soft); color: #b91c1c; }
.af-tpl-tpls { margin-top: 10px; }
.af-tpl-tpls-h { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
#af-tpl-list { display: flex; flex-wrap: wrap; gap: 6px; }
.af-tpl-item { display: inline-flex; align-items: center; gap: 2px; }
.af-tpl-load {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-2);
  font-size: 13px; padding: 3px 8px; border-radius: 7px 0 0 7px; cursor: pointer; font-family: inherit;
}
.af-tpl-load:hover { border-color: var(--brand-text); color: var(--brand-text); }
.af-tpl-load i { font-style: normal; color: var(--muted); font-size: 12px; }
.af-tpl-del {
  border: 1px solid var(--border); border-left: 0; background: var(--panel); color: var(--muted);
  font-size: 11.5px; padding: 3px 6px; border-radius: 0 7px 7px 0; cursor: pointer; font-family: inherit;
}
.af-tpl-del:hover { background: var(--red-soft); color: #b91c1c; }
.af-tpl-name { width: 220px; padding: 6px 10px; font-size: 14px; }

@media (max-width: 1400px) {
  .af-rec-h, .af-rec { grid-template-columns: 110px 80px 1fr 50px 46px 70px 62px 140px; }
}

/* 横向滚动容器：只在放不下时出现滚动条 */
.af-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.af-scroll::-webkit-scrollbar { height: 8px; }
.af-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* 9 列栅格：售后单 / 商品 / 买家 / 金额 / 原因 / 物流 / 时间 / 状态 / 操作 */
.af-table9 {
  min-width: 1300px;
  --af-cols: minmax(148px, 1.02fr) minmax(188px, 1.42fr) minmax(132px, .96fr)
             minmax(108px, .8fr) minmax(116px, .88fr) minmax(108px, .8fr)
             minmax(103px, .76fr) minmax(112px, .84fr) 86px;
}

/* 第四级小字：时间 / 备注 / 副标题用，比 .af-l3 还轻一档 */
.af-l4 { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.af-l4.af-act { color: var(--amber); font-weight: 600; }
.af-l4.af-hasnote {
  color: var(--brand-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 商品格：图 + 两行文字（长商品名截两行，单行截断信息太少） */
.af-prod { display: flex; align-items: center; gap: 8px; min-width: 0; }
.af-prod .af-txt { min-width: 0; flex: 1 1 auto; }
.af-prod .af-l2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 14px; color: var(--text); line-height: 1.45;
}

/* 买家电话：跟在姓名后面，比姓名小一号 */
.af-ph { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); }

/* 操作列：详情 / 备注 纵向排，列宽只有 76px */
.af-nbtn {
  margin-top: 4px; padding: 2px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel); color: var(--text-2);
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: color .14s var(--ease), border-color .14s var(--ease), background .14s var(--ease);
}
.af-nbtn:hover { border-color: var(--brand-text); color: var(--brand-text); }
.af-nbtn.on { border-color: var(--brand-text); color: var(--brand-text); background: var(--brand-soft); }

/* 备注小弹窗：比详情窄一半，只放一个 textarea。
   560px 是因为批量确认也用它：里面要放单据清单 + 拒绝原因 + 备注，
   468px 时底部「操作会记录到审计日志…」会把按钮挤到换行 */
.af-dlg .af-panel.af-panel-s { width: min(560px, 94vw); }
.af-note-in {
  width: 100%; box-sizing: border-box;
  padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--panel); color: var(--text);
  font-family: inherit; font-size: 14.5px; line-height: 1.75;
  resize: vertical; outline: none;
}
.af-note-in:focus { border-color: var(--brand-text); box-shadow: 0 0 0 3px var(--brand-soft); }
.af-note-s { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* 详情里的备注展示块 */
.af-note-view {
  padding: 9px 12px; border-radius: 8px; background: var(--bg-subtle);
  font-size: 14.5px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.af-note-view i {
  display: block; margin-top: 6px;
  font-style: normal; font-size: 12.5px; color: var(--muted);
}

/* 详情里的分组小节（买家 / 原订单 / 备注） */
.af-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bg-subtle); }
.af-sec-h {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 9px;
  font-size: 14px; font-weight: 650; color: var(--text-2);
}
.af-mini {
  margin-left: auto; padding: 2px 9px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--panel); color: var(--text-2);
  font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.af-mini:hover { border-color: var(--brand-text); color: var(--brand-text); }
/* 地址这类长字段占两列，否则被 auto-fit 挤成一列宽、每行都换行 */
.af-kv-w { grid-column: span 2; }

/* 退款原因：中文为主（12px 正文色），平台原文降为下面一行小字 ——
   两行都是灰色的话，扫列表时分不清哪个是结论哪个是原文 */
.af-rs {
  font-size: 14px; color: var(--text); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 说明性小字：隐私脱敏这类「不是缺陷、但必须解释」的提示。
   放在区块内、比正文再降一级，不抢字段的注意力 */
.af-sec-note {
  margin-top: 9px; padding: 7px 10px;
  border-radius: 7px; background: var(--bg-subtle);
  font-size: 12.5px; line-height: 1.7; color: var(--muted);
}
.af-sec-note .mono { color: var(--text-2); }

/* =========================================================
 * 通用分页条（core.js 的 pagerRender，2026-11-12）
 * 对齐妙手底部那套：‹ 1 2 3 … 19 › · 前往 x 页 · 20 条/页
 * ========================================================= */
.pg-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 2px 2px; font-size: 14.5px; color: var(--text-2);
}
.pg-nums { display: flex; align-items: center; gap: 4px; }
.pg-n {
  min-width: 30px; height: 28px; padding: 0 7px;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2);
  border-radius: 7px; font-size: 14.5px; font-family: inherit; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: all .14s var(--ease);
}
.pg-n:hover:not(:disabled):not(.on) { background: var(--hover); color: var(--text); }
.pg-n.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pg-n:disabled { opacity: .4; cursor: default; }
.pg-arrow { font-size: 17px; line-height: 1; padding: 0 6px; }
.pg-dots { padding: 0 3px; color: var(--muted); letter-spacing: 1px; }
.pg-jump { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.pg-jump-in {
  width: 50px; height: 28px; text-align: center; padding: 0 6px !important;
  font-size: 14.5px; border-radius: 7px; font-variant-numeric: tabular-nums;
}
.pg-jump-in::-webkit-inner-spin-button,
.pg-jump-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pg-jump-in { -moz-appearance: textfield; }
.pg-grow { flex: 1; }
.pg-total { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-total b { color: var(--text-2); font-weight: 650; }
.pg-size {
  height: 28px; min-width: 94px; font-size: 14.5px; border-radius: 7px;
  padding: 0 26px 0 9px; background-position: right 8px center !important;
}

/* =========================================================
 * 售后表格密度收敛（2026-11-12，按妙手：单行 + 省略 + 悬停看全文）
 *
 * 之前长 SKU / 物流商 / 备注会自动换行，把行高从 2 行撑到 4-5 行，
 * 列宽又有限，看着又挤又乱。统一成「一行，超出省略，title 看全文」。
 * ========================================================= */
.af-row .af-l2,
.af-row .af-l3,
.af-row .af-l4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 标签徽标在 150px 的售后单列里会挤掉订单号，收窄上限 */
.af-row .af-l4 .af-tag { max-width: 66px; }

/* 操作列：详情 / 备注 / 标签 横排（原来竖排占 3 行，是行高最大的来源） */
.af-row > .af-c.num:last-child {
  display: flex; align-items: center; gap: 5px; flex-wrap: nowrap;
  text-align: left;
}
.af-row > .af-c.num:last-child .rv-btn { padding: 3px 7px; font-size: 12.5px; }
.af-row > .af-c.num:last-child .af-nbtn { margin-top: 0; padding: 3px 6px; font-size: 12.5px; }

/* 商品名从 2 行截断改成 1 行：-webkit-line-clamp 是 -webkit-box 布局，
   外层的 white-space:nowrap 压不住它，商品列因此长期是 65px 高，把整行撑到 86px。
   1 行 + title 看全文，列高降到图片的 38px，行高跟着降到 76。 */
.af-prod .af-l2 {
  display: block; -webkit-line-clamp: unset; -webkit-box-orient: unset;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 操作列：详情/备注/标签 三个按钮高度对齐（rv-btn 有 font-weight，行高比 af-nbtn 高 7px） */
.af-row > .af-c.num:last-child .rv-btn,
.af-row > .af-c.num:last-child .af-nbtn {
  height: 24px; line-height: 22px; padding: 0 7px; display: inline-flex;
  align-items: center; justify-content: center;
}

/* 售后单号是 19 位抖音 ID，mono 12.5px 在 150px 列里正好换行，
   一换行这一列就 65px 高，把整行撑到 86 —— 是行高最大的真正来源（不是商品列）。
   缩到 11.8px + 单行省略，150px 刚好放得下 19 位；完整单号在 title 和详情里。 */
.af-row .af-l1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-row .c1 .af-l1.mono { font-size: 13.5px; letter-spacing: -.1px; }

/* 操作列的「备注 / 标签」在 114px 里被 flex 压到换行，两个字竖着排 ——
   加 nowrap + flex:none 让按钮保持本身宽度，列宽同步放宽到 122。 */
.af-row > .af-c.num:last-child .rv-btn,
.af-row > .af-c.num:last-child .af-nbtn { white-space: nowrap; flex: none; }
/* 批量操作条用 hidden 隐藏，但 .af-bulk{display:flex} 会盖掉 UA 的 [hidden]{display:none}，
   结果未选任何单时也留一条空白横条（用户截图里那条） */
.af-bulk[hidden] { display: none; }

/* =========================================================
 * 达人消息：勾选 + AI 批量回复 + 私信模板（2026-11-12）
 * ========================================================= */
/* 会话行前面的勾选框：flex:none 不参与压缩，点它不打开会话（JS 已 stopPropagation） */
.im-ck { display: flex; align-items: center; padding: 0 2px; flex: none; }
.im-ck input { width: 14px; height: 14px; margin: 0; cursor: pointer; accent-color: var(--brand, #11836e); }
.im-row.sel { background: var(--brand-soft); }
.im-row.sel:hover { background: var(--brand-soft); }

/* ---- 通用弹窗（im 模块自己一套，不复用售后的 .af-dlg） ---- */
.im-modal { position: fixed; inset: 0; z-index: 330; display: grid; place-items: center; }
.im-modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.im-modal-panel {
  position: relative; width: min(680px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.im-modal-lg { width: min(880px, 96vw); }
.im-modal-hd {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--border);
}
.im-modal-t { font-size: 17px; font-weight: 700; color: var(--text); }
.im-modal-s { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.im-modal-s b { color: var(--brand-text); font-variant-numeric: tabular-nums; }
.im-modal-x {
  margin-left: auto; flex: none; width: 26px; height: 26px; border: 0; background: transparent;
  color: var(--muted); font-size: 16px; cursor: pointer; border-radius: 6px; font-family: inherit;
}
.im-modal-x:hover { background: var(--hover); color: var(--text); }
.im-modal-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bg-subtle); border-bottom: 1px solid var(--border);
}
.im-modal-bar .lb { font-size: 14px; color: var(--muted); }
.im-modal-bar select { height: 28px; font-size: 14px; border-radius: 7px; padding: 0 26px 0 8px; background-position: right 7px center !important; }
.im-batch-prog { font-size: 13px; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.im-modal-bd { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; }
.im-modal-ft {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--border);
}
.im-modal-tip { font-size: 13px; color: var(--muted); }

/* ---- 批量建议卡片 ---- */
.im-bit {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.im-bit.on { border-color: rgba(17, 131, 110, .38); background: #fbfdfc; }
.im-bit.done { border-color: rgba(17, 131, 110, .5); }
.im-bit-h { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.im-bit-h b { font-weight: 650; }
.im-bit-ck input { width: 14px; height: 14px; margin: 0; accent-color: var(--brand, #11836e); cursor: pointer; }
.im-bit-stg { font-size: 12px; color: var(--brand-text); background: var(--brand-soft); padding: 1px 7px; border-radius: 6px; }
.im-bit-q {
  font-size: 13px; color: var(--muted); margin: 7px 0;
  padding: 6px 9px; background: var(--bg-subtle); border-radius: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.im-bit-a {
  width: 100%; box-sizing: border-box; font-size: 14.5px; line-height: 1.6;
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-family: inherit; resize: vertical; color: var(--text); background: var(--panel);
}
.im-bit-a:focus { outline: 2px solid var(--brand-soft-strong, rgba(17,131,110,.25)); border-color: var(--brand, #11836e); }
.im-bit-ops { display: flex; gap: 8px; margin-top: 6px; }
.im-bit-err { font-size: 13px; color: #b91c1c; margin: 4px 0; }
.im-bit-wait { font-size: 13px; color: var(--muted); }

/* ---- 模板弹窗 ---- */
.im-tpl-bd { display: flex; gap: 14px; padding: 14px 16px; }
.im-tpl-left { width: 236px; flex: none; display: flex; flex-direction: column; min-height: 0; }
.im-tpl-lh { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14.5px; }
.im-tpl-list { flex: 1; overflow: auto; border: 1px solid var(--border); border-radius: 9px; padding: 5px; min-height: 0; }
.im-tpl-it { padding: 8px 10px; border-radius: 7px; cursor: pointer; transition: background .12s; }
.im-tpl-it:hover { background: var(--hover); }
.im-tpl-it.on { background: var(--brand-soft); }
.im-tpl-it .n { font-size: 14.5px; font-weight: 650; color: var(--text); }
.im-tpl-it .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-tpl-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.im-field { display: flex; flex-direction: column; gap: 5px; }
.im-field > label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.im-in {
  width: 100%; box-sizing: border-box; font-size: 14.5px; padding: 7px 10px;
  border: 1px solid var(--border-strong); border-radius: 8px; font-family: inherit; color: var(--text); background: var(--panel);
}
textarea.im-in { line-height: 1.6; resize: vertical; }
.im-tpl-blocks { display: flex; flex-direction: column; gap: 8px; }
.im-tpl-blk { border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: var(--bg-subtle); }
.im-tpl-blk .bh { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.im-tpl-blk .tag { font-size: 12px; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); padding: 1px 7px; border-radius: 5px; }
.im-tpl-add { display: flex; gap: 8px; margin-top: 8px; }
.im-tpl-hint { font-size: 13px; color: var(--muted); line-height: 1.8; }
.im-tpl-hint code { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.im-mini {
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2);
  font-size: 13px; padding: 3px 9px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.im-mini:hover { border-color: var(--brand, #11836e); color: var(--brand-text); }
.im-mini.danger { color: #b91c1c; border-color: rgba(185, 28, 28, .3); }
.im-mini.danger:hover { background: rgba(185, 28, 28, .06); }

/* 输入区的模板下拉 */
.im-tpl-pick {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 6px; z-index: 60;
  min-width: 240px; max-height: 280px; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 5px;
}
.im-tpl-pick .it { padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.im-tpl-pick .it:hover { background: var(--hover); }
.im-tpl-pick .n { font-size: 14.5px; font-weight: 600; color: var(--text); }
.im-tpl-pick .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.im-comp { position: relative; }

/* 批量弹窗里「勾选的都已回复过」的提示条 */
.im-modal-warn {
  margin: 8px 0 0; padding: 7px 10px; border-radius: 8px;
  background: #fffbeb; border: 1px solid rgba(180, 120, 0, .25);
  font-size: 13px; line-height: 1.7; color: #8a5a00;
}
.im-modal-warn b { color: #6b4400; }

/* =========================================================
 * 达人消息：全选选择条 + 批量弹窗双语对照（2026-11-12）
 * ========================================================= */

/* 选择条：全选在左、计数居中偏左、批量按钮在右，和列表勾选框视线对齐 */
.im-selbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 12px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg-subtle);
}
.im-ckall {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none;
}
.im-ckall input {
  width: 15px; height: 15px; margin: 0; cursor: pointer;
  accent-color: var(--brand, #11836e);
}
.im-ckall:hover { color: var(--text); }
.im-sel-n { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.im-sel-n.on { color: var(--brand-text); font-weight: 650; }
.im-sel-tip { font-size: 13px; color: var(--muted); }

/* ---- 批量弹窗里的双语块 ---- */
.im-bi {
  border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 10px; margin: 8px 0 0; background: var(--bg-subtle);
}
.im-bi.out { background: var(--panel); border-color: var(--border-strong); }
.im-bi-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.im-bi-h .who {
  font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .2px;
}
.im-bi.out .im-bi-h .who { color: var(--brand-text); }
.im-bi-h .lg {
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--border);
  padding: 0 5px; border-radius: 5px; line-height: 15px; text-transform: uppercase;
}
.im-bi-h .lg.dim { color: var(--muted); font-weight: 600; text-transform: none; }
.im-bi-h .tm { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.im-bi-t {
  font-size: 14.5px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-word; max-height: 150px; overflow: auto;
}
/* 译文行：虚线分隔 + 小「中文」标签，和原文明确分层 */
.im-bi-tr {
  display: flex; gap: 6px; margin-top: 7px; padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: 14.5px; line-height: 1.7; color: var(--text-2);
}
.im-bi-tr .k {
  flex: none; font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: var(--bg-subtle); border-radius: 4px; padding: 0 5px;
  height: 16px; line-height: 16px; margin-top: 3px;
}
.im-bi.out .im-bi-tr .k { background: var(--bg-subtle); }
.im-bi-tr .v { flex: 1; min-width: 0; word-break: break-word; }
.im-bi-tr.err { color: #b91c1c; font-size: 13px; border-top-color: rgba(185, 28, 28, .2); }
.im-bi-tr.busy { color: var(--muted); font-size: 13px; border-top-style: dotted; }
.im-bi-a {
  width: 100%; box-sizing: border-box; font-size: 14.5px; line-height: 1.65;
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-family: inherit; resize: vertical; color: var(--text); background: var(--panel);
}
.im-bi-a:focus {
  outline: 2px solid var(--brand-soft-strong, rgba(17, 131, 110, .25));
  border-color: var(--brand, #11836e);
}
/* 卡片本身别太挤：双语块已经占高度，底部操作行贴紧 */
.im-bit-ops { margin-top: 8px; }

/* 译文行里的「重试」：翻译被限流时别只能干等，给一个可点的出口 */
.im-retr {
  margin-left: 6px; padding: 0 6px; height: 17px; line-height: 15px;
  border: 1px solid rgba(185, 28, 28, .35); border-radius: 5px;
  background: transparent; color: #b91c1c; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.im-retr:hover { background: rgba(185, 28, 28, .07); }
.im-bi-tr.busy { display: flex; }

/* =========================================================
 * 首页（未登录）—— 产品官网式落地页
 *
 * 设计语言（2026-11-12 重做）：
 *   深墨 + 纸白 + 单一强调绿。分层只靠「发丝线 + 留白 + 明暗对比」，
 *   不用彩色弥散渐变、不用 emoji 当图标、不给每个区块套投影卡片——
 *   这三样是廉价感的来源。
 *   版式节奏：亮首屏（登录卡）→ 深色产品实景 → 白底能力 → 白底模块
 *   → 白底生态 → 数字带 → 深色 CTA → 页脚。
 * ========================================================= */
.hm {
  --ink: #0a1512;
  --ink-2: #101e19;
  --ink-3: #172a23;
  --paper: #ffffff;
  --paper-2: #f7f9f8;
  --line: rgba(10, 21, 18, .09);
  --line-2: rgba(10, 21, 18, .15);
  --mut: #5c6964;
  --mut-2: #8b9793;
  --acc: #0f7a63;
  --acc-2: #12a183;
  --acc-soft: rgba(15, 122, 99, .07);
  --acc-lite: #3ddcb2;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
.hm-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.hm-svg { display: block; }

/* ---------------- 顶部导航 ---------------- */
.hm-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.hm-nav.on { border-bottom-color: var(--line); background: rgba(255, 255, 255, .94); }
.hm-nav-in { height: 68px; display: flex; align-items: center; gap: 34px; }

.hm-logo { display: flex; align-items: center; gap: 10px; }
.hm-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
}
.hm-logo-t { display: flex; flex-direction: column; line-height: 1.2; }
.hm-logo-t b { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.hm-logo-t i {
  font-size: 11.5px; font-style: normal; color: var(--mut-2);
  letter-spacing: .1em; text-transform: uppercase; margin-top: 1px;
}

.hm-menu { display: flex; gap: 26px; margin-left: auto; }
.hm-menu a {
  font-size: 15px; color: #44524d; text-decoration: none; font-weight: 500;
  transition: color .18s ease; white-space: nowrap;
}
.hm-menu a:hover { color: var(--ink); }

.hm-nav-btn {
  height: 34px; padding: 0 15px; border-radius: 8px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font-size: 14.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background .18s ease, transform .18s ease;
  white-space: nowrap;
}
.hm-nav-btn:hover { background: #050c0a; transform: translateY(-1px); }

/* ---------------- 通用小件 ---------------- */
.hm-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 650; letter-spacing: .16em;
  text-transform: uppercase; color: var(--acc);
}
.hm-eyebrow::before { content: ""; width: 16px; height: 1px; background: currentColor; opacity: .55; }

.hm-btn {
  height: 44px; padding: 0 20px; border-radius: 9px;
  font-size: 15.5px; font-weight: 600; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: transform .18s var(--ease), background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.hm-btn.solid { background: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(10, 21, 18, .18); }
.hm-btn.solid:hover { background: #050c0a; transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(10, 21, 18, .55); }
.hm-btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.hm-btn.ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.hm-btn .arw { transition: transform .18s ease; }
.hm-btn:hover .arw { transform: translateX(3px); }

/* ---------------- Hero ---------------- */
/* 首屏本身是白的，末尾 130px 渐变到下一段的浅灰，接缝就看不出来了 */
.hm-hero {
  position: relative; padding: 74px 0 86px; overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fff calc(100% - 130px), #ebf1ee 100%);
}
.hm-hero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: -520px; right: -180px; width: 1000px; height: 1000px;
  background: radial-gradient(circle, rgba(18, 161, 131, .11), rgba(18, 161, 131, 0) 62%);
}
.hm-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(10, 21, 18, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 21, 18, .045) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(circle at 26% 0%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 26% 0%, #000 0%, transparent 68%);
  opacity: .85;
}
.hm-hero-in {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 384px;
  gap: 80px; align-items: center;
}
.hm-hero h1 {
  margin-top: 18px;
  font-size: clamp(36px, 3.4vw, 50px);
  line-height: 1.14; letter-spacing: -1.6px; font-weight: 700;
}
.hm-hero h1 em { font-style: normal; color: var(--acc); }
.hm-lede {
  margin-top: 22px; max-width: 528px;
  font-size: 16.5px; line-height: 1.85; color: var(--mut);
}

/* 首屏轮播：四屏叠在一起，只有 .on 参与布局（其余 absolute），
   这样高度由当前屏决定，切换时不会把下面的 CTA 顶来顶去 */
.hm-slides { position: relative; min-height: 268px; }
.hm-slide {
  position: absolute; top: 0; left: 0; width: 100%;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s step-end;
}
.hm-slide.on {
  position: relative; opacity: 1; visibility: visible; transform: none;
  transition: opacity .5s var(--ease) .1s, transform .5s var(--ease) .1s, visibility 0s;
}
.hm-dots { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.hm-dot {
  width: 15px; height: 18px; padding: 0; border: 0; background: none;
  display: flex; align-items: center; cursor: pointer;
  transition: width .32s var(--ease);
}
/* 当前屏那根拉长成胶囊，其余保持短横：一眼能看出在第几屏，
   四根等长横排会被看成一条虚线分隔线 */
.hm-dot.on { width: 34px; }
.hm-dot i {
  display: block; width: 100%; height: 3px; border-radius: 2px;
  background: rgba(10, 21, 18, .13);
  transition: background .22s ease;
}
.hm-dot:hover i { background: rgba(10, 21, 18, .32); }
.hm-dot.on i { background: var(--ink); }
.hm-dot-n {
  margin-left: 10px; font-size: 12px; color: var(--mut-2);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.hm-dot-n b { color: var(--ink); font-weight: 600; }
.hm-lede b { color: #35433e; font-weight: 600; }
.hm-cta { display: flex; align-items: center; gap: 11px; margin-top: 30px; }

.hm-trust {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.hm-trust span {
  font-size: 13px; color: var(--mut-2); display: inline-flex; align-items: center; gap: 6px;
}
.hm-trust span svg { width: 13px; height: 13px; color: var(--acc); opacity: .8; }

/* ---------------- 登录卡 ---------------- */
.hm-card {
  position: relative; background: #fff;
  border: 1px solid var(--line-2); border-radius: 16px;
  padding: 26px 26px 20px;
  box-shadow: 0 1px 2px rgba(10, 21, 18, .04), 0 30px 64px -32px rgba(10, 21, 18, .45);
}
.hm-card::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 122, 99, .55), transparent);
}
.hm-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.hm-card-t { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.hm-card-badge {
  font-size: 11.5px; font-weight: 600; color: var(--acc);
  background: var(--acc-soft); border-radius: 20px; padding: 3px 8px; letter-spacing: .02em;
}
.hm-card-s { font-size: 13px; color: var(--mut-2); line-height: 1.6; margin-top: 5px; }
.hm-card label {
  display: block; font-size: 14px; font-weight: 600; color: #3f4d48;
  margin: 16px 0 7px;
}
.hm-card input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: #fbfcfc; color: var(--ink);
  font-size: 15.5px; font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.hm-card input::placeholder { color: #a9b3af; }
.hm-card input:focus {
  outline: none; background: #fff; border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(15, 122, 99, .12);
}
.hm-card #lg-submit {
  width: 100%; height: 44px; margin-top: 18px; padding: 0;
  border: 0; border-radius: 9px; background: var(--ink); color: #fff;
  font-size: 15.5px; font-weight: 600; font-family: inherit; letter-spacing: .08em;
  cursor: pointer; transition: background .18s ease, transform .18s ease;
}
.hm-card #lg-submit:hover:not(:disabled) { background: #050c0a; transform: translateY(-1px); }
.hm-card #lg-submit:disabled { opacity: .55; cursor: default; }
.hm-card .login-error {
  min-height: 16px; margin-top: 9px; font-size: 14px; color: #b42318; line-height: 1.4;
}
.hm-card-ft {
  margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--mut-2); line-height: 1.65;
}

/* ---------------- 深色产品实景 ---------------- */
.hm-show {
  position: relative; overflow: hidden;
  /* 整段深色会把页面劈成上下两块黑白，改成「白 → 极浅灰 → 白」的软过渡带：
     深色只留在产品窗口本身，页面主体始终是亮的 */
  background: #ebf1ee;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 78px 0 92px;
}
.hm-show::before {
  content: ""; position: absolute; inset: -30% -10% auto 35%; height: 620px;
  background: radial-gradient(ellipse at 50% 0%, rgba(18, 161, 131, .08), transparent 62%);
  pointer-events: none;
}
.hm-show-hd {
  position: relative;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; margin-bottom: 32px;
}
.hm-show-hd .hm-eyebrow { color: var(--acc); }
.hm-show-hd h2 {
  margin-top: 14px;
  font-size: clamp(26px, 2.4vw, 33px); line-height: 1.24;
  letter-spacing: -1px; font-weight: 700; color: var(--ink);
}
.hm-show-hd p { max-width: 330px; font-size: 15px; line-height: 1.8; color: var(--mut); }

.hm-tabs {
  display: inline-flex; gap: 3px; padding: 4px;
  background: #fff; border: 1px solid var(--line-2);
  border-radius: 11px; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(10, 21, 18, .04);
}
.hm-tab {
  padding: 7px 15px; border: 0; border-radius: 8px; background: transparent;
  font-size: 14.5px; font-family: inherit; font-weight: 500;
  color: var(--mut); cursor: pointer; transition: all .18s ease;
  white-space: nowrap;
}
.hm-tab:hover { color: var(--ink); background: rgba(10, 21, 18, .04); }
.hm-tab.on { background: var(--ink); color: #fff; font-weight: 600; }
.hm-tab.on:hover { background: var(--ink); }

/* 窗口外壳 */
.hm-win {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(10, 21, 18, .16);
  background: var(--ink-2);
  box-shadow: 0 50px 90px -46px rgba(10, 21, 18, .55), 0 2px 8px rgba(10, 21, 18, .07);
}
.hm-win-bar {
  height: 38px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: rgba(255, 255, 255, .025);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.hm-win-dots { display: flex; gap: 6px; }
.hm-win-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.hm-win-url {
  margin: 0 auto; padding: 3px 14px; border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: rgba(255, 255, 255, .42); letter-spacing: .02em;
}
.hm-win-live {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--acc-lite); letter-spacing: .02em;
}
.hm-win-live i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--acc-lite);
  box-shadow: 0 0 0 3px rgba(61, 220, 178, .16);
}

.hm-win-body { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 404px; }
.hm-win-sd {
  background: rgba(0, 0, 0, .22);
  border-right: 1px solid rgba(255, 255, 255, .06);
  padding: 14px 10px;
}
.hm-win-sd-logo {
  display: flex; align-items: center; gap: 8px; padding: 0 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06); margin-bottom: 10px;
}
.hm-win-sd-logo b {
  width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .1);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff;
}
.hm-win-sd-logo span { font-size: 12.5px; color: rgba(255, 255, 255, .72); font-weight: 600; }
.hm-win-nav { display: flex; flex-direction: column; gap: 1px; }
.hm-win-nav span {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 6px;
  font-size: 12.5px; color: rgba(255, 255, 255, .5);
}
.hm-win-nav span::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6;
}
.hm-win-nav span.on {
  background: rgba(61, 220, 178, .1); color: #fff; font-weight: 500;
}
.hm-win-nav span.on::before { background: var(--acc-lite); opacity: 1; box-shadow: 0 0 0 3px rgba(61, 220, 178, .12); }

.hm-win-main { padding: 16px 20px 18px; min-width: 0; min-height: 396px; }
.hm-win-hd { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.hm-win-hd b { font-size: 15px; font-weight: 650; color: #fff; letter-spacing: -.1px; }
.hm-win-hd span { font-size: 12px; color: rgba(255, 255, 255, .4); }
.hm-win-hd em {
  margin-left: auto; font-style: normal; font-size: 11.5px;
  color: rgba(255, 255, 255, .34);
}

.hm-wkpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.hm-wkpi > div {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 9px; padding: 10px 12px 11px;
}
.hm-wkpi i {
  display: block; font-style: normal; font-size: 11.5px;
  color: rgba(255, 255, 255, .42); letter-spacing: .04em;
}
.hm-wkpi b {
  display: block; margin-top: 5px;
  font-size: 20.5px; font-weight: 650; color: #fff;
  letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}
.hm-wkpi u {
  display: inline-block; margin-top: 4px; text-decoration: none;
  font-size: 11.5px; color: var(--acc-lite);
}
.hm-wkpi u.dim { color: rgba(255, 255, 255, .38); }

.hm-wchart {
  margin-top: 12px; padding: 12px 14px 8px;
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px;
  background: rgba(255, 255, 255, .02);
}
.hm-wchart-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hm-wchart-h b { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .78); }
.hm-wchart-h span { font-size: 11.5px; color: rgba(255, 255, 255, .38); }
.hm-wbars { display: flex; align-items: flex-end; gap: 10px; height: 96px; }
.hm-wbar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hm-wbar em {
  display: block; border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #3ee3b7, rgba(62, 227, 183, .28));
  transition: height .5s var(--ease);
}
.hm-wbar span {
  display: block; margin-top: 5px; text-align: center;
  font-size: 10.5px; color: rgba(255, 255, 255, .32);
  font-variant-numeric: tabular-nums;
}

.hm-wtb { margin-top: 12px; }
.hm-wtb-h {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.hm-wtb-h b { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .78); }
.hm-wtb-h span { font-size: 11.5px; color: rgba(255, 255, 255, .34); }
.hm-wtb table { width: 100%; border-collapse: collapse; }
.hm-wtb table.fixed { table-layout: fixed; }
.hm-wtb th {
  text-align: left; padding: 5px 16px 5px 0;
  font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255, 255, 255, .34);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  /* 全站 th 默认白底 + sticky，会在深色窗口里画出一条白杠，必须显式复位 */
  background: transparent; position: static; white-space: nowrap;
}
.hm-wtb td {
  padding: 7px 16px 7px 0; font-size: 12.5px; color: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  font-variant-numeric: tabular-nums;
}
.hm-wtb td:last-child, .hm-wtb th:last-child { padding-right: 0; }
.hm-wtb tr:last-child td { border-bottom: 0; }
.hm-wtb th.r, .hm-wtb td.r { text-align: right; }
.hm-wtb td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.hm-wtb td.sub { color: rgba(255, 255, 255, .4); font-size: 11.5px; }

.hm-wpill {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .01em;
  background: rgba(61, 220, 178, .13); color: #4fe6bf;
}
.hm-wpill.wa { background: rgba(240, 173, 78, .14); color: #f0ad4e; }
.hm-wpill.wr { background: rgba(255, 120, 120, .13); color: #ff9b9b; }
.hm-wpill.wg { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .55); }

/* 达人会话面板 */
.hm-wim { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 12px; min-height: 336px; }
.hm-wim-l { border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; overflow: hidden; }
.hm-wim-l > div {
  padding: 8px 9px; border-bottom: 1px solid rgba(255, 255, 255, .05);
  display: flex; align-items: center; gap: 7px;
}
.hm-wim-l > div:last-child { border-bottom: 0; }
.hm-wim-l > div.on { background: rgba(61, 220, 178, .08); }
.hm-wim-av {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .1); display: grid; place-items: center;
  font-size: 10px; color: rgba(255, 255, 255, .7);
}
.hm-wim-l b { display: block; font-size: 11.5px; font-weight: 500; color: rgba(255, 255, 255, .82); }
.hm-wim-l i {
  display: block; font-style: normal; font-size: 10.5px; color: rgba(255, 255, 255, .34);
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 118px;
}
.hm-wim-r { border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.hm-wbub {
  max-width: 78%; padding: 7px 10px; border-radius: 9px 9px 9px 3px;
  background: rgba(255, 255, 255, .07); font-size: 12px; line-height: 1.5;
  color: rgba(255, 255, 255, .82);
}
.hm-wbub.me {
  margin-left: auto; border-radius: 9px 9px 3px 9px;
  background: rgba(61, 220, 178, .16); color: #d8fff4;
}
.hm-wbub small { display: block; margin-top: 4px; font-size: 10.5px; color: rgba(255, 255, 255, .34); }
.hm-wai {
  margin-top: auto; padding: 9px 10px; border-radius: 9px;
  border: 1px dashed rgba(61, 220, 178, .3); background: rgba(61, 220, 178, .05);
}
.hm-wai h6 {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--acc-lite); margin-bottom: 5px;
}
.hm-wai p { font-size: 11.5px; line-height: 1.6; color: rgba(255, 255, 255, .72); }
.hm-wai p + p { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .45); }

/* ---------------- 白色区块 ---------------- */
.hm-sec { padding: 84px 0; border-bottom: 1px solid var(--line); }
.hm-sec.alt { background: #ebf1ee; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hm-sh {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 56px; margin-bottom: 44px;
}
.hm-sh h2 {
  margin-top: 12px;
  font-size: clamp(25px, 2.3vw, 32px); line-height: 1.26;
  letter-spacing: -1px; font-weight: 700;
}
.hm-sh p {
  max-width: 330px; flex: none; text-align: right;
  font-size: 15px; line-height: 1.8; color: var(--mut);
}

/* 站点 */
.hm-sites {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.hm-site {
  padding: 20px 18px 22px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .18s ease;
}
.hm-site:hover { background: var(--paper-2); }
.hm-site b {
  display: block; font-size: 11.5px; font-weight: 650; letter-spacing: .1em;
  color: var(--acc); text-transform: uppercase;
}
.hm-site span { display: block; margin-top: 7px; font-size: 16.5px; font-weight: 600; letter-spacing: -.2px; }
.hm-site i { display: block; margin-top: 3px; font-size: 11.5px; font-style: normal; color: var(--mut-2); }

/* 接口清单 */
.hm-apis {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px; margin-top: 34px;
}
.hm-api {
  display: flex; align-items: baseline; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.hm-api b { flex: none; width: 96px; font-size: 14.5px; font-weight: 600; }
.hm-api span { font-size: 14px; color: var(--mut); }

/* 模块网格（1px 缝隙当分割线） */
.hm-mods {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.hm-mod {
  position: relative; background: #fff; padding: 28px 26px 26px;
  transition: background .2s ease;
}
.hm-mod:hover { background: #fbfcfb; }
.hm-mod-n {
  position: absolute; top: 24px; right: 24px;
  font-size: 11.5px; color: #c3ccc9; letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.hm-mod-ico {
  width: 38px; height: 38px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line-2); color: var(--acc);
  display: grid; place-items: center;
}
.hm-mod-ico svg { width: 19px; height: 19px; }
.hm-mod h3 { margin-top: 16px; font-size: 18px; font-weight: 650; letter-spacing: -.2px; }
.hm-mod p { margin-top: 8px; font-size: 14.5px; line-height: 1.72; color: var(--mut); }
.hm-mod ul { margin-top: 16px; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hm-mod li {
  position: relative; padding-left: 12px;
  font-size: 13px; color: #6c7873; line-height: 1.55;
}
.hm-mod li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 4px; height: 4px; border-radius: 50%; background: rgba(15, 122, 99, .3);
}

/* 售后 8 档标签（窗口内） */
.hm-wtabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.hm-wtabs span {
  font-size: 11.5px; padding: 3px 8px; border-radius: 6px;
  color: rgba(255, 255, 255, .48);
  border: 1px solid rgba(255, 255, 255, .08);
  white-space: nowrap;
}
.hm-wtabs span.on {
  background: rgba(61, 220, 178, .12); color: #7ff0d2;
  border-color: rgba(61, 220, 178, .3);
}

/* 损益结构条 */
.hm-wcost { margin-top: 12px; }
.hm-wcost > div {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.hm-wcost > div:last-child { border-bottom: 0; }
.hm-wcost b { width: 84px; flex: none; font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .74); }
.hm-wcost i {
  flex: 1; height: 5px; border-radius: 3px; overflow: hidden;
  background: rgba(255, 255, 255, .07);
}
.hm-wcost i em { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2fbf9b, #3ee3b7); }
.hm-wcost u {
  text-decoration: none; font-size: 11.5px; color: rgba(255, 255, 255, .72);
  font-variant-numeric: tabular-nums; width: 62px; text-align: right;
}
.hm-wcost u.pct { width: 40px; color: rgba(255, 255, 255, .38); }

/* 生态集成 */
.hm-eco-wrap { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 64px; align-items: start; }
.hm-eco-l h2 {
  margin-top: 12px; font-size: clamp(25px, 2.3vw, 32px);
  line-height: 1.26; letter-spacing: -1px; font-weight: 700;
}
.hm-eco-l p { margin-top: 16px; font-size: 15px; line-height: 1.85; color: var(--mut); }
.hm-eco-l .hm-note {
  margin-top: 20px; padding: 12px 14px; border-radius: 9px;
  background: var(--paper-2); border: 1px solid var(--line);
  font-size: 13px; line-height: 1.7; color: var(--mut-2);
}
.hm-eco { border-top: 1px solid var(--line); }
.hm-eco-row {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding .18s ease;
}
.hm-eco-row:hover { padding-left: 6px; }
.hm-eco-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--paper-2); border: 1px solid var(--line); color: #46534e;
}
.hm-eco-ico svg { width: 17px; height: 17px; }
.hm-eco-t { min-width: 0; }
.hm-eco-t b { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.hm-eco-t span { display: block; margin-top: 3px; font-size: 14px; color: var(--mut); line-height: 1.6; }
.hm-st {
  margin-left: auto; flex: none;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  letter-spacing: .02em;
}
.hm-st.ok { background: var(--acc-soft); color: var(--acc); }
.hm-st.plan { background: rgba(10, 21, 18, .05); color: var(--mut-2); }
.hm-st.doing { background: rgba(180, 83, 9, .09); color: #96601a; }

/* 数字带 */
.hm-numbs { display: grid; grid-template-columns: repeat(4, 1fr); }
.hm-num { padding: 0 30px; border-left: 1px solid var(--line); }
.hm-num:first-child { padding-left: 0; border-left: 0; }
.hm-num b {
  display: block; font-size: 50.5px; font-weight: 650; letter-spacing: -2.2px;
  line-height: 1.05; font-variant-numeric: tabular-nums;
}
.hm-num b i { font-size: 15px; font-style: normal; font-weight: 500; color: var(--mut-2); letter-spacing: 0; margin-left: 5px; }
.hm-num span { display: block; margin-top: 10px; font-size: 13px; color: var(--mut); line-height: 1.6; }

/* CTA：从满幅黑条改成白色页面上的一块深色圆角卡 ——
   满幅黑条会和上面整段白形成「上白下黑」的硬切割，收窄成卡片就只是页面的一个元素 */
.hm-band { position: relative; background: #fff; padding: 20px 0 0; }
.hm-band-in {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 50px;
  background: var(--ink); color: #fff;
  border-radius: 20px; padding: 54px 54px;
}
.hm-band-in::before {
  content: ""; position: absolute; inset: -60% -14% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(18, 161, 131, .3), transparent 62%);
  pointer-events: none;
}
.hm-band h2 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.34; letter-spacing: -.9px; font-weight: 700; }
.hm-band p { margin-top: 10px; font-size: 15px; color: rgba(255, 255, 255, .52); }
.hm-band .hm-btn { background: #fff; color: var(--ink); border-color: #fff; flex: none; }
.hm-band .hm-btn:hover { background: #eef4f2; }

/* 页脚 */
.hm-foot { background: #fff; padding: 56px 0 28px; }
.hm-foot-in { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; }
.hm-foot-l p {
  margin-top: 14px; max-width: 300px;
  font-size: 13px; line-height: 1.8; color: var(--mut-2);
}
.hm-foot-c h4 {
  font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mut-2); margin-bottom: 14px;
}
.hm-foot-c span { display: block; font-size: 14px; color: var(--mut); line-height: 2.1; }
.hm-copy {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: #a3adaa;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}

/* 进场 */
.hm-reveal { opacity: 0; transform: translateY(14px); transition: opacity .62s var(--ease), transform .62s var(--ease); }
.hm-reveal.in { opacity: 1; transform: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .hm-hero-in { grid-template-columns: 1fr; gap: 44px; }
  .hm-hero { padding: 52px 0 64px; }
  .hm-card { max-width: 400px; margin: 0 auto; }
  .hm-slides { min-height: 0; }
  .hm-slide { position: relative; display: none; }
  .hm-slide.on { display: block; }
  .hm-eco-wrap { grid-template-columns: 1fr; gap: 36px; }
  .hm-sites { grid-template-columns: repeat(3, 1fr); }
  .hm-win-body { grid-template-columns: 148px minmax(0, 1fr); }
  .hm-wim { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hm-wrap { padding: 0 20px; }
  .hm-menu { display: none; }
  .hm-nav-in { gap: 16px; }
  .hm-nav-btn { margin-left: auto; }
  .hm-sec { padding: 58px 0; }
  .hm-sh { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 30px; }
  .hm-sh p { text-align: left; max-width: 100%; }
  .hm-mods { grid-template-columns: 1fr; }
  .hm-apis { grid-template-columns: 1fr; gap: 0; }
  .hm-sites { grid-template-columns: repeat(2, 1fr); }
  .hm-numbs { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .hm-num { padding: 0 20px; }
  .hm-num:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hm-band-in { flex-direction: column; align-items: flex-start; gap: 26px; padding: 34px 28px; border-radius: 16px; }
  .hm-show-hd { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hm-show-hd p { max-width: 100%; }
  .hm-foot-in { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hm-wkpi { grid-template-columns: repeat(2, 1fr); }
  .hm-win-body { grid-template-columns: 1fr; }
  .hm-win-sd { display: none; }
  .hm-wim { grid-template-columns: 1fr; }
  .hm-wim-l { display: none; }
  /* 手机上标签条横向滚动，不要换行后剩一个孤零零挂在下面 */
  .hm-tabs { display: flex; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hm-tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 520px) {
  /* 36px 时「TikTok Shop 的生意，」正好超宽，会把「意，」甩到下一行 */
  .hm-hero h1 { font-size: 34.5px; letter-spacing: -.8px; line-height: 1.2; }
  .hm-cta { flex-direction: column; align-items: stretch; }
  .hm-cta .hm-btn { width: 100%; }
  .hm-dots { margin: 8px 0 0; justify-content: flex-start; }
  .hm-trust { gap: 10px; }
  .hm-sites { grid-template-columns: 1fr; }
  .hm-numbs { grid-template-columns: 1fr; }
  .hm-num { padding: 0; border-left: 0; }
  .hm-wim-l { display: none; }
}

/* =========================================================
 * 应用外壳视觉统一（2026-11-12）
 * 只做「去廉价感」的四件事，不动任何布局与尺寸：
 *   1) 侧栏 emoji 换成同规格线性图标（改在 js/shell.js 的 NAV_ICO）
 *   2) logo 从彩色 emoji 换成墨色 TK 字标
 *   3) 去掉 KPI 卡片右上角的绿色弥散光斑（那是最像模板的一处）
 *   4) 迷你柱从半透明渐变改成实色，避免看成骨架屏
 * ========================================================= */
.brand .logo-dot {
  background: #0a1512;
  box-shadow: none;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #fff;
}
.nav-ico {
  width: 18px; height: 18px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 0; filter: saturate(.95); opacity: 1;
}
.nav-ico svg { display: block; }
.nav-item { border-radius: 9px; padding: 8px 10px 8px 12px; }
.nav-item:hover .nav-ico { transform: none; opacity: 1; }
.nav-item.active { background: rgba(17, 131, 110, .085); }
.nav-item.active .nav-ico { opacity: 1; }
.nav-item.active::before { width: 2px; border-radius: 0 2px 2px 0; }

/* KPI 光斑去掉，用一条更干净的顶部细线代替 */
.kpi::after { display: none; }
.kpi { border-radius: 12px; }
.dh-card { border-radius: 12px; }

/* 迷你柱：实色，靠深浅区分系列 */
.dh-spark > i { background: rgba(17, 131, 110, .22); border-radius: 2px; }
.dh-spark.brand > i { background: rgba(17, 131, 110, .5); }
.dh-spark.blue > i { background: rgba(29, 78, 216, .34); }
.dh-spark.green > i { background: rgba(4, 120, 87, .34); }
.dh-spark.amber > i { background: rgba(180, 83, 9, .32); }
.dh-spark.red > i { background: rgba(185, 28, 28, .32); }
.dh-spark.teal > i { background: rgba(13, 148, 136, .34); }
.dh-spark.gray > i { background: rgba(148, 163, 184, .34); }

/* 账号与权限：页签（子账号 / 角色 / 权限说明） */
.perm-tabs { display: flex; gap: 2px; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.perm-tab {
  padding: 9px 15px; border: 0; background: none; font-family: inherit;
  font-size: 15.5px; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.perm-tab:hover { color: var(--text); }
.perm-tab.on { color: var(--brand-text); border-bottom-color: var(--brand); font-weight: 600; }

/* 评价详情：AI 差评分析 */
.rv-ai {
  margin-top: 16px; border: 1px solid var(--border); border-radius: 12px;
  background: #fcfdfd; padding: 14px 16px;
}
/* 用 grid 而不用 flex：flex 下长文案会把按钮挤成一两个字 */
.rv-ai-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.rv-ai-h .btn { white-space: nowrap; }
.rv-ai-h b { font-size: 15.5px; }
.rv-ai-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 620px; }
.rv-ai-wait { padding: 18px 0; font-size: 14.5px; color: var(--muted); }
.rv-ai-err { padding: 14px 0; font-size: 14.5px; color: var(--red); }
.rv-ai-sec { margin-top: 14px; }
.rv-ai-t {
  font-size: 14px; font-weight: 600; color: var(--text-2);
  padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 10px;
}
.rv-ai-tip { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12.5px; }
.rv-ai-causes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rv-ai-cause { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.rv-ai-ct { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rv-ai-ct b { font-size: 14.5px; }
.rv-ai-ct span { font-size: 12.5px; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.rv-ai-bar { height: 4px; border-radius: 2px; background: var(--bg-subtle); margin: 7px 0 8px; overflow: hidden; }
.rv-ai-bar i { display: block; height: 100%; border-radius: 2px; background: var(--brand); }
.rv-ai-cd { font-size: 13px; color: var(--muted); line-height: 1.65; }
.rv-ai-advice { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rv-ai-advice li { display: flex; gap: 9px; font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.rv-ai-advice em {
  flex: none; width: 17px; height: 17px; border-radius: 50%; font-style: normal;
  background: var(--brand-soft); color: var(--brand-text);
  font-size: 11.5px; display: grid; place-items: center; margin-top: 2px;
}
.rv-ai-reply { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.rv-ai-rh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rv-ai-rh span { font-size: 13px; font-weight: 600; color: var(--brand-text); }
.rv-copy {
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-2);
  font-size: 12.5px; font-family: inherit; padding: 2px 9px; border-radius: 6px; cursor: pointer;
}
.rv-copy:hover { border-color: var(--brand); color: var(--brand-text); }
.rv-ai-reply p { font-size: 14.5px; line-height: 1.75; color: var(--text); }
.rv-ai-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--muted); }

/* =========================================================
 * 2026-11-12 新增四块：违规记录（重做）/ 店铺健康 / 广告营销 / FastMoss
 * 统一原则：表格列宽用 colgroup 定死，长文本单行省略 + title 看全文，
 * 数值列右对齐 tabular-nums，不靠换行塞内容（换行会把行高从 2 行撑到 4 行）
 * ========================================================= */

/* ---------- 违规记录 ---------- */
.vf2-table table { table-layout: fixed; }
.vf2-table td { padding: 10px 14px; }
.vf2-shop { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.vf2-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.vf2-sub {
  margin-top: 3px; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.vf2-penalty { display: inline-block; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.vf2-left { font-style: normal; font-size: 11.5px; margin-left: 4px; color: var(--red); font-variant-numeric: tabular-nums; }
.vf2-table .row-actions { white-space: nowrap; }
.vf2-table .row-actions button { flex: none; white-space: nowrap; }

.vf2-modal { width: 780px; max-width: 94vw; }
.vf2-meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px;
  padding: 12px 14px; background: var(--bg-subtle); border-radius: 10px; margin: 10px 0 14px;
}
.vf2-meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vf2-meta span { font-size: 12.5px; color: var(--muted); }
.vf2-meta b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf2-block { margin-bottom: 14px; }
.vf2-lb { font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.vf2-val { font-size: 15px; line-height: 1.7; color: var(--text); word-break: break-word; }
.vf2-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.vf2-form label, .vf2-note { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }
.vf2-form input, .vf2-form select, .vf2-note input, .vf2-note textarea { width: 100%; }
.vf2-note { margin-bottom: 12px; }
.vf2-form i, .vf2-note i { color: var(--red); font-style: normal; }

/* ---------- 店铺健康 ---------- */
/* 平台店铺评分（SPS）：手工录入的快照卡。和左侧健康分并列，但来源分开写清楚 */
.sh-sps-wrap { margin: 4px 0 16px; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.sh-sps-hd2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sh-sps-hd2 b { font-size: 16.5px; font-weight: 650; color: var(--text); }
.sh-sps-hd2 span { font-size: 13.5px; color: var(--muted); }
.sh-sps-hd2 i { margin-left: auto; font-style: normal; font-size: 13.5px; color: var(--muted); }
.sh-sps-hd2 i.warn { color: #b45309; }

.sh-sps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sh-sps-c {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  padding: 12px 13px 12px; border: 1px solid var(--border); border-radius: 11px;
  background: linear-gradient(180deg, #fcfdfd, #fafbfc);
}
.sh-sps-c.empty { background: #fbfcfd; border-style: dashed; }
.sh-sps-c.editing { border-color: rgba(15, 118, 110, .3); background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, .05); }

.sh-sps-hd { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.sh-sps-hd b { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-sps-hd span { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; line-height: 1.5; flex: none; }
.sh-sps-hd em { margin-left: auto; font-style: normal; font-size: 12.5px; color: #94a3b8; flex: none; }

.sh-sps-main { display: flex; align-items: baseline; gap: 6px; }
.sh-sps-main > b { font-size: 34.5px; font-weight: 650; letter-spacing: -.5px; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--text); }
.sh-sps-main > b.ok { color: #0f766e; }
.sh-sps-main > b.good { color: #15803d; }
.sh-sps-main > b.warn { color: #b45309; }
.sh-sps-main > b.risk, .sh-sps-main > b.bad { color: var(--red); }
.sh-sps-main > b.none { color: #cbd5e1; }
.sh-sps-of { font-size: 13px; color: var(--muted); }
.sh-sps-sp { display: flex; align-items: flex-end; gap: 2px; height: 20px; margin-left: auto; }
.sh-sps-sp i { width: 3px; border-radius: 1px; background: rgba(15, 118, 110, .3); }

.sh-sps-dims { display: flex; flex-direction: column; gap: 5px; }
.sh-sps-d { display: grid; grid-template-columns: 74px 28px 1fr; align-items: center; gap: 8px; }
.sh-sps-d span { font-size: 13px; color: var(--muted); }
.sh-sps-d b { font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.sh-sps-d b.ok { color: #0f766e; } .sh-sps-d b.good { color: #15803d; }
.sh-sps-d b.warn { color: #b45309; } .sh-sps-d b.risk, .sh-sps-d b.bad { color: var(--red); }
.sh-sps-d b.none { color: #cbd5e1; }
.sh-sps-d > i { display: block; height: 4px; border-radius: 3px; background: var(--bg-subtle); overflow: hidden; }
.sh-sps-d > i u { display: block; height: 100%; border-radius: 3px; background: #94a3b8; text-decoration: none; }
.sh-sps-d > i u.ok { background: #0f766e; } .sh-sps-d > i u.good { background: #16a34a; }
.sh-sps-d > i u.warn { background: #d97706; } .sh-sps-d > i u.risk, .sh-sps-d > i u.bad { background: var(--red); }

.sh-sps-btn {
  align-self: flex-start; margin-top: 2px; height: 26px; padding: 0 11px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-2);
  font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.sh-sps-btn:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }

.sh-sps-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.sh-sps-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sh-sps-f span { font-size: 12.5px; color: var(--muted); }
.sh-sps-f input {
  height: 30px; width: 100%; font-size: 14.5px; border-radius: 7px; padding: 0 9px;
  -webkit-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums;
}
.sh-sps-f input::-webkit-outer-spin-button, .sh-sps-f input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sh-sps-f input::placeholder { color: #cbd5e1; }
.sh-sps-acts { display: flex; gap: 7px; }
.sh-sps-none { font-size: 14.5px; color: var(--muted); padding: 14px 2px; }

.sh-score { display: flex; align-items: center; gap: 8px; }
.sh-n { font-size: 17px; font-variant-numeric: tabular-nums; min-width: 26px; }
.sh-n.ok { color: var(--brand-text); }
.sh-n.warn { color: #b45309; }
.sh-n.risk, .sh-n.bad { color: var(--red); }
.sh-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-subtle); overflow: hidden; min-width: 44px; }
.sh-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.sh-bar i.ok { background: var(--brand); }
.sh-bar i.warn { background: #d97706; }
.sh-bar i.risk, .sh-bar i.bad { background: var(--red); }
.sh-sev { font-style: normal; font-size: 11.5px; color: var(--red); margin-left: 3px; }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 4px 0 12px; border-bottom: 1px solid var(--border); }
.sh-name { font-size: 17px; font-weight: 700; }
.sh-big { display: flex; align-items: baseline; gap: 8px; }
.sh-big b { font-size: 30px; font-variant-numeric: tabular-nums; }
.sh-big b.ok { color: var(--brand-text); }
.sh-big b.warn { color: #b45309; }
.sh-big b.risk, .sh-big b.bad { color: var(--red); }
.sh-big span { font-size: 14px; color: var(--muted); }
.sh-dd-wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.sh-dd { background: var(--bg-subtle); border-radius: 9px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.sh-dd span { font-size: 12.5px; color: var(--muted); }
.sh-dd b { font-size: 16px; color: var(--red); font-variant-numeric: tabular-nums; }
.sh-dd i { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.sh-metrics > div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; }
.sh-metrics span { color: var(--muted); }
.sh-metrics b { font-variant-numeric: tabular-nums; }
.sh-sec { font-size: 14.5px; font-weight: 600; color: var(--text-2); margin: 16px 0 8px; }
.sh-prod { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
#sh-table td { padding: 10px 14px; }

/* ---------- 广告营销（旧版列表，已被文件末尾的新版覆盖） ---------- */
#pm-table td { padding: 10px 14px; }
.pm-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#pm-table .row-actions { white-space: nowrap; }
#pm-table .row-actions button { flex: none; white-space: nowrap; }

/* ---------- FastMoss ---------- */
.fm-modal { width: 1080px; max-width: 96vw; }
/* 三个筛选下拉别各占一整行（.modal select 是 width:100%），也别让整块弹窗滚动
   —— 改成弹窗固定高度、只有榜单列表内部滚，底部翻页条始终可见 */
/* flex + max-height 组合有个坑：flex 分配空间时认的是 height，不是 max-height，
   所以子项的 flex 收缩不会生效（内容照样把弹窗撑破）。改用 calc 直接给列表封顶。 */
.modal.fm-modal { max-height: 88vh; overflow: hidden; }
.fm-modal #fm-list { max-height: calc(88vh - 250px); overflow-y: auto; }
.fm-bar select { width: auto; min-width: 96px; }
.fm-bar #fm-kind { min-width: 150px; }
.fm-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; box-shadow: inset 0 -1px 0 var(--border); }
.fm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.fm-head h3 { margin: 0; }
.fm-head-act { display: flex; gap: 8px; flex: none; }
.fm-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-bar .af-input { height: 34px; }
.fm-conf { padding: 4px 0; }
.fm-conf-t { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.fm-conf-btns { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fm-list-head { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.fm-table { width: 100%; border-collapse: collapse; }
.fm-table th { padding: 8px 10px; font-size: 13px; }
.fm-table td { padding: 8px 10px; font-size: 14.5px; vertical-align: middle; }
.fm-img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--bg-subtle); display: block; }
.fm-title {
  font-size: 14.5px; line-height: 1.45; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fm-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
/* 连接失败原因：长句要能整段读，别挤成一行省略 */
.fm-err {
  margin: 12px auto 0; max-width: 560px; text-align: left;
  padding: 10px 12px; border-radius: 8px; background: #fff7f6;
  border: 1px solid #f3d6d2; color: #8a3a33; font-size: 14px; line-height: 1.7;
}

/* ---------- 2026-11-12 修正（截图核对后） ----------
   .modal.modal-wide 是两个类，自定义宽度必须用同等特异性才压得住 */
.modal.modal-wide.fm-modal { width: 1080px; max-width: 96vw; }
.modal.modal-wide.vf2-modal { width: 840px; max-width: 94vw; }

/* 数值列右对齐：只作用于新模块的表，避免影响既有页面 */
#sh-table th.num, #sh-table td.num,
.fm-table th.num, .fm-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.fm-table th.num { white-space: nowrap; }

/* 营销日历时间列：完整时间放 title，列里只显示 MM-DD HH:mm，单行不换 */
.pm-time { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 弹窗内明细表：短标签列不许折成竖排（"待处 理" 那种） */
.sh-tb th { white-space: nowrap; }
.sh-tb td:nth-child(1), .sh-tb td:nth-child(2),
.sh-tb td:nth-child(3), .sh-tb td:nth-child(6) { white-space: nowrap; }

/* 店铺健康详情：里面有两张明细表，640 宽会把「待处理」「服务违规」折成竖排 */
.modal.modal-wide.sh-modal { width: 980px; max-width: 94vw; }
.pm-type { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.modal.modal-wide.fm-modal.fm-narrow { width: 620px; }

/* 申诉截止：MM-DD + "N天" 必须同一行，否则 92px 列里会折成两行 */
.vf2-due { white-space: nowrap; }
/* 行内 badge 不许被 flex 压扁（"已消除" 会变成 "已消"） */
.vf2-table .row-actions .badge,
#pm-table .row-actions .badge { flex: none; white-space: nowrap; }

/* 弹窗按钮吸底（2026-11-13）
   `.modal` 是 overflow:auto 的滚动容器，内容一长（比如展开粘贴识别）
   保存按钮就被顶到可视区外，得先滚一下才点得到 —— 最容易被当成「坏了」。
   sticky 只在这种超长弹窗里生效，短弹窗没有滚动、位置不变。 */
.modal .modal-btns {
  position: sticky; bottom: 0; z-index: 1;
  background: var(--panel);
  padding-top: 12px; padding-bottom: 2px;
  box-shadow: 0 -10px 14px -10px rgba(15, 23, 42, .18);
}

/* =========================================================
 * 免费版 / 升级（2026-11-13）
 * 锁定的模块仍然显示在侧栏：藏起来用户永远不知道有这功能，
 * 也就没有升级的理由。但显示 ≠ 能用，点进去是升级说明页。
 * ========================================================= */

/* 锁定的导航项：能看清名字，但明显不是「可点」的常态 */
.nav-item.locked { color: var(--muted); }
.nav-item.locked .nav-ico { opacity: .5; }
.nav-item.locked:hover { color: var(--text-2); background: rgba(10, 21, 18, .03); }
.nav-item.locked.active { background: rgba(10, 21, 18, .045); color: var(--text-2); }
.nav-item.locked.active::before { background: var(--border-strong); }
.nav-lock {
  margin-left: auto; flex: none; display: flex; align-items: center;
  color: var(--mut-2); opacity: .8;
}
.nav-item.locked:hover .nav-lock { opacity: 1; color: var(--text-2); }
/* 锁图标和拖拽把手抢同一个位置：锁着的模块优先显示锁 */
.nav-item.locked .nav-grip { display: none; }
.nav-editing .nav-item.locked .nav-grip { display: none; }
.nav-editing .nav-item.locked .nav-lock { display: none; }

/* ---------- 升级说明页 ---------- */
.gate {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 150px); padding: 30px 20px;
}
.gate-card { width: 100%; max-width: 600px; text-align: center; }
.gate-ico {
  width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 16px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text);
}
.gate-card h1 {
  font-size: 24px; font-weight: 700; letter-spacing: -.3px;
  color: var(--text); line-height: 1.45;
}
.gate-sub { margin-top: 9px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.gate-meta {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding: 7px 14px; border-radius: 999px;
  background: var(--bg-subtle); font-size: 14px; color: var(--text-2);
}
.gate-meta b { font-weight: 600; }
.gate-dot { color: var(--mut-2); }
.gate-sec { margin-top: 26px; text-align: left; }
.gate-t {
  font-size: 13px; color: var(--muted); margin-bottom: 9px;
  text-align: center; letter-spacing: .02em;
}
.gate-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gate-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--panel); color: var(--text-2); font-family: inherit; font-size: 14.5px;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.gate-chip:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.gate-chip svg { flex: none; opacity: .8; }
.gate-act { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.gate-foot { margin-top: 14px; font-size: 13px; color: var(--mut-2); }

.gate-steps { margin: 6px 0 4px; padding-left: 20px; font-size: 15px; line-height: 2; color: var(--text-2); }
.gate-steps li { margin-bottom: 2px; }
.row-actions .setdef { color: var(--brand-text); }
.row-actions .setdef:hover { background: var(--brand-soft); }

/* 角色弹窗加宽到 760：22 个模块排 4 列一屏放得下。
   640 宽时只有 3 列、要 8 行，弹窗必然超出 86vh 出现滚动，
   勾选框正好被切在中间，看着像坏了 */
.modal.modal-wide.role-modal { width: 760px; }
/* 勾选区的底色只在最后一行下面露出一条，像条多余的灰杠 —— 加描边读成「容器」 */
.perm-grid { border: 1px solid var(--border); }

/* =========================================================
 * 金额明细：编辑成本（手工录入那 6 行）
 * ========================================================= */
.am-editc {
  margin-left: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 12.5px; font-weight: 400; padding: 1px 8px; border-radius: 999px;
  cursor: pointer; font-family: inherit; line-height: 1.6;
}
.am-editc:hover { border-color: var(--brand); color: var(--brand); }
.oc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.oc-f label { display: block; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.oc-f input {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 15px; font-family: inherit; text-align: right;
  background: #fff; color: var(--text);
}
.oc-f input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(17,131,110,.1); }
.oc-f .hint { font-size: 12.5px; color: #9aa3af; margin-top: 4px; line-height: 1.5; }
/* 数字输入框去掉浏览器自带的上下箭头：它会压住右对齐的 placeholder「自动」 */
.oc-f input::-webkit-outer-spin-button,
.oc-f input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.oc-f input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* =========================================================
 * 数据分析 · 利润明细（2026-11-13，对标妙手）
 * 结构：筛选（快捷区间 + 6 个条件）→ 实时数据 → 数据汇总 → 明细表
 * ========================================================= */
.an-filter {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px 12px; margin-bottom: 12px;
}
.an-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-qb {
  height: 26px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: #fff; color: var(--text-2); font-size: 14px; font-family: inherit;
  cursor: pointer; line-height: 1; white-space: nowrap;
}
.an-qb:hover { border-color: var(--brand); color: var(--brand); }
.an-qb.on { border-color: var(--brand); background: #f2f8f5; color: var(--brand); font-weight: 600; }
.an-dates { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.an-dates i { font-style: normal; font-size: 14px; color: var(--muted); }
.an-dates .an-input { width: 132px; }
.an-frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.an-frow .grow { flex: 1 1 auto; min-width: 0; }
.an-input {
  height: 30px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; color: var(--text); font-size: 14.5px; font-family: inherit;
}
.an-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(17, 131, 110, .1); }
select.an-input { padding-right: 30px; min-width: 118px; }
.an-q { width: 216px; flex: none; }

/* 卡片外壳（三块共用） */
.an-live, .an-sum, .an-tcard {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; margin-bottom: 12px;
}
.an-sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.an-sec-h b { font-size: 15.5px; font-weight: 650; color: var(--text); }
.an-sec-h span { font-size: 13px; color: var(--muted); }
.an-sec-h span b { font-size: 13px; color: var(--text-2); font-weight: 600; }
.an-sec-h .grow { flex: 1 1 auto; }
.an-sync { font-size: 12.5px; color: #9aa3af; }

/* 实时数据 */
.an-live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.an-lcard { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px 10px; background: #fcfdfd; }
.an-lcard .k { font-size: 13px; color: var(--muted); }
.an-lcard .v { font-size: 22px; font-weight: 700; color: var(--text); margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.an-lcard .s { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.an-lcard .s em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-lcard .s em.up { color: var(--red); }     /* 涨红跌绿，和全站一致 */
.an-lcard .s em.down { color: var(--green); }
.an-lcard .n { margin-top: 5px; font-size: 12px; color: #9aa3af; }
.an-skel {
  height: 84px; border-radius: 10px;
  background: linear-gradient(90deg, #f4f6f7 25%, #eceff1 37%, #f4f6f7 63%);
  background-size: 400% 100%; animation: anShine 1.2s ease infinite;
}
@keyframes anShine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 汇总卡片 */
.an-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.an-card { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px 10px; background: #fff; min-width: 0; }
.an-card .k { font-size: 13px; color: var(--muted); }
.an-card .v { font-size: 18px; font-weight: 700; color: var(--text); margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; white-space: nowrap; }
.an-card .h { margin-top: 4px; font-size: 12px; color: #9aa3af; line-height: 1.45; }
.an-card.strong { background: #f4faf7; border-color: #cfe7dd; }
.an-card.strong .v { color: var(--brand); font-size: 19px; }
.an-card.muted .v { color: #8b95a1; font-weight: 600; }
.an-ratio { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--border); }
.an-r { display: inline-flex; align-items: baseline; gap: 7px; }
.an-r i { font-style: normal; font-size: 13px; color: var(--muted); }
.an-r b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.an-r b.muted { color: #8b95a1; font-weight: 600; }
.an-warnbox {
  margin-top: 11px; padding: 9px 12px; border-radius: 8px; background: #fffaf0;
  border: 1px solid #f2e2c2; color: #7a5a1e; font-size: 13px; line-height: 1.75;
}
.an-warnbox b { color: #6b4a0f; }

/* 明细表 */
.an-tcard { padding: 13px 0 0; }
.an-th { display: flex; align-items: center; gap: 10px; padding: 0 16px 10px; flex-wrap: wrap; }
.an-th b { font-size: 15.5px; font-weight: 650; }
.an-th .an-total { font-size: 13px; color: var(--muted); }
.an-th .an-cny { font-size: 12.5px; color: var(--muted); padding: 1px 7px; border: 1px solid var(--border); border-radius: 20px; white-space: nowrap; }
.an-th .grow { flex: 1 1 auto; }
.an-tw { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.an-table th, .an-table td { padding: 8px 10px; font-size: 14px; }
.an-table th { height: 38px; font-size: 13px; color: var(--muted); font-weight: 500; }
.an-table td { vertical-align: middle; color: #1f2937; }
.an-table tbody tr:hover td { background: #fafbfc; }
.an-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 状态胶囊和行内按钮：列一窄就把「待结算」折成竖排、「明细」拆两行 */
.an-table .ox-chip { white-space: nowrap; }
.an-table .btn { white-space: nowrap; flex: none; }
.an-table .btn.sm { padding: 0 9px; height: 24px; line-height: 22px; font-size: 13px; }
.an-table .sm { font-size: 12.5px; color: #6b7280; }
.an-table .mono { font-variant-numeric: tabular-nums; }
.an-table .neg { color: #d93025; }
.an-table .muted { color: #9aa3af; }
.an-shop { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-oid {
  font-size: 12px; color: #6b7280; cursor: copy; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.an-oid:hover { color: var(--brand); }
.an-prod { display: flex; align-items: center; gap: 8px; min-width: 0; }
.an-img {
  width: 38px; height: 38px; flex: none; border-radius: 6px; object-fit: cover;
  background: #f1f3f5; border: 1px solid var(--border);
}
.an-img-ph { display: inline-block; }
.an-pinfo { min-width: 0; }
.an-pname {
  font-size: 14px; line-height: 1.35; color: #1f2937;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.an-psku {
  margin-top: 2px; font-size: 12px; color: #9aa3af;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.an-more {
  margin-left: 6px; padding: 0 5px; border-radius: 4px; background: #f1f3f5;
  color: #6b7280; font-size: 11.5px;
}
.an-empty { text-align: center; padding: 44px 0 !important; color: var(--muted); font-size: 14.5px; }
.an-foot {
  display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap;
  padding: 10px 16px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted); background: #fcfdfd;
}
.an-foot i { font-style: normal; margin-right: 6px; }
.an-foot b { font-size: 14.5px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.an-foot b.neg { color: #d93025; }
.an-tcard .pg-bar { border-top: 0; }

/* 数据来源弹窗 */
.modal.modal-wide.an-src-modal { width: 1000px; max-width: 96vw; }
.an-src-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.an-src-hd b { font-size: 18px; font-weight: 650; }
.an-src-x {
  width: 26px; height: 26px; border: 0; background: none; color: var(--muted);
  font-size: 23px; line-height: 1; cursor: pointer; border-radius: 6px;
}
.an-src-x:hover { background: #f1f3f5; color: var(--text); }
.an-src-top {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  background: #f7f9f8; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; color: var(--muted);
}
.an-src-top b { font-size: 14.5px; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.an-src-tip { margin: 9px 0 2px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.an-src-g { margin-top: 14px; }
.an-src-gh {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 650; color: #374151; margin-bottom: 4px;
}
.an-src-gh::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--brand); }
.an-src-r {
  display: grid; grid-template-columns: 1.1fr 84px 1.35fr 1.5fr; gap: 12px; align-items: start;
  padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.an-src-r:last-child { border-bottom: 0; }
.an-src-n { color: #1f2937; font-weight: 500; }
.an-src-f { font-size: 12.5px; color: #556070; word-break: break-all; }
.an-src-note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.an-src-r .ox-chip { font-size: 12px; padding: 1px 7px; }

@media (max-width: 1180px) {
  .an-live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-src-r { grid-template-columns: 1fr 76px; }
  .an-src-f, .an-src-note { grid-column: 1 / -1; }
}

/* =========================================================
 * 订单卡片补充（2026-11-13 晚）
 * 国内/海外发货徽标、收件人编辑入口、双币种金额、代发采购/调用库存弹窗
 * ========================================================= */

/* 国内发货 / 海外发货 / 自提：妙手用方块「内/外」，这里给带字的小胶囊，一眼能读懂 */
.ox-sf {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 18px; padding: 0 7px; border-radius: 4px; font-size: 12.5px; font-weight: 600;
  line-height: 1; white-space: nowrap; cursor: help;
}
.ox-sf.dom { background: #fff4e5; color: #b45309; box-shadow: inset 0 0 0 1px #f6dcb8; }
.ox-sf.ovs { background: #eef7f3; color: #11836e; box-shadow: inset 0 0 0 1px #cfe7dd; }
.ox-sf.pkp { background: #f1f3f5; color: #5b6472; box-shadow: inset 0 0 0 1px #e3e6ea; }

/* 收件人列底的「编辑收件人」：和金额列的「金额明细」同一层级，但要有框才看得出能点 */
.ox-need {
  margin-top: 7px; height: 24px; padding: 0 9px; display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #dfe3e8; border-radius: 4px; background: #fff;
  font-size: 13px; color: #4b5563; cursor: pointer; font-family: inherit; line-height: 1;
}
.ox-need:hover { border-color: var(--brand); color: var(--brand); background: #f7fbf9; }
.ox-need.filled { border-color: #cfe7dd; background: #f4faf7; color: var(--brand); }
.ox-need .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }

/* 采购单状态徽标（卡片商品列右上） */
.ox-po {
  display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12.5px;
  padding: 1px 6px; border-radius: 3px; font-weight: 600;
}
.ox-po.amber { background: #fff4e5; color: #b45309; }
.ox-po.blue { background: #eaf2fd; color: #2b5fa8; }
.ox-po.green { background: #eef7f3; color: #11836e; }
.ox-po.gray { background: #f1f3f5; color: #5b6472; }

/* ---------- 三个弹窗共用 ---------- */
.od-hint {
  display: flex; gap: 8px; align-items: flex-start;
  background: #f2f8f5; border: 1px solid #d8e8df; color: #2f6b57;
  border-radius: 8px; padding: 9px 11px; font-size: 14px; line-height: 1.65; margin-bottom: 12px;
}
.od-hint.warn { background: #fffaf0; border-color: #f2e2c2; color: #7a5a1e; }
.od-hint b { color: inherit; font-weight: 700; }
.od-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.od-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 12px; }
.od-f { min-width: 0; }
.od-f > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.od-f > span em { font-style: normal; color: #9aa3af; margin-left: 4px; }
.od-f input, .od-f textarea, .od-f select {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: var(--text);
}
.od-f textarea { height: auto; padding: 7px 10px; resize: vertical; }
.od-f input:focus, .od-f textarea:focus, .od-f select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(17,131,110,.1);
}
.od-f input[readonly] { background: #f7f8fa; color: #6b7280; }
.od-plat {
  margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: #fafbfc;
  border: 1px dashed var(--border); font-size: 13px; color: var(--muted); line-height: 1.75;
}
.od-plat b { color: var(--text-2); font-weight: 600; }

/* 订单商品（三个弹窗顶部都列一遍，避免用户在弹窗里忘了买的是什么） */
.od-goods { display: flex; flex-direction: column; gap: 8px; }
.od-g {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fcfdfd;
}
.od-g img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #f1f3f5; flex: none; }
.od-g .t { flex: 1; min-width: 0; }
.od-g .nm {
  font-size: 14.5px; color: #1f2937; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.od-g .sp { margin-top: 2px; font-size: 13px; color: #9aa3af; }
.od-g .qty { flex: none; font-size: 14px; color: #4b5563; font-variant-numeric: tabular-nums; }

/* 采购单列表 */
.od-pos { margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.od-po {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; background: #fff;
}
.od-po .l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-po .no { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: #374151; }
.od-po .amt { font-size: 14.5px; font-weight: 650; color: #0f172a; font-variant-numeric: tabular-nums; }
.od-po .sp { flex: 1; }
.od-po .l2 { margin-top: 5px; font-size: 13px; color: var(--muted); line-height: 1.65; word-break: break-all; }
.od-po .acts { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.od-po .acts .btn { height: 24px; padding: 0 9px; font-size: 13px; }
.od-empty { padding: 22px 0; text-align: center; color: var(--muted); font-size: 14.5px; }

/* 调用库存表 */
.od-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.od-tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 13px;
  padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.od-tbl td { padding: 8px; border-bottom: 1px solid #f2f4f7; vertical-align: middle; color: #1f2937; }
.od-tbl tr:last-child td { border-bottom: 0; }
.od-tbl .nm { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-tbl .code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #4b5563; }
.od-tbl .wh { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.od-tbl .wh b { font-weight: 650; color: #1f2937; }
.od-tbl .wh.zero { color: #c2c8d0; }
.od-tbl .wh.ok b { color: var(--green); }
.od-unbound { display: inline-flex; align-items: center; gap: 6px; color: #b45309; font-size: 13px; }
.od-bind { display: flex; gap: 6px; align-items: center; }
.od-bind select {
  height: 28px; max-width: 180px; padding: 0 8px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff;
}
.od-bind .btn { height: 26px; padding: 0 8px; font-size: 13px; flex: none; }

/* 金额列：结算项与成本项之间的分隔线 + 利润率的紧凑排版 */
.ox-amt .ox-arow.sep {
  border-top: 1px dashed #e6e9ed; margin-top: 3px; padding-top: 4px;
}
.ox-amt .ox-arow .v b.muted { color: #b6bcc5; font-weight: 500; }
.ox-amt .ox-arow.marg { padding-top: 2px; }
.ox-amt .ox-arow.marg .cny { color: #6b7280; }
/* 预估值标记：未结算订单的回款/利润是按历史回款率估的，别和平台真值混为一谈 */
.ox-amt .ox-arow .est {
  font-style: normal; margin-left: 3px; font-size: 11.5px; font-weight: 700; color: #b45309;
  background: #fff4e5; border-radius: 2px; padding: 0 3px; vertical-align: 1px;
}

/* 调用库存表：固定布局 + 明确列宽，多出来的宽度全给「订单商品」，
   否则 auto 布局会把剩余宽度喂给「仓库 SKU」列，中间留一条大空白 */
.od-tbl { table-layout: fixed; }
.od-tbl th:nth-child(2), .od-tbl td:nth-child(2) { width: 246px; }
.od-tbl .wh { width: 60px; }
.od-tbl .nm { max-width: none; }
.od-tbl .od-bind { flex-wrap: nowrap; }
.od-tbl .od-bind select { width: 176px; flex: none; max-width: none; }
.od-tbl .od-bind .btn { padding: 0 7px; }
.od-g .ph {
  width: 40px; height: 40px; flex: none; border-radius: 6px; background: #f1f3f5;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; color: #b6bcc5;
}

/* =========================================================
 * 选品池：FastMoss 商品畅销榜（js/picks.js）
 * 版式对齐 FastMoss 官网「TikTok 畅销榜」：筛选卡在上，榜单大表在下
 * ========================================================= */

/* ---- 页签 ---- */
.pk-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.pk-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 0; background: none; cursor: pointer;
  font-size: 15px; color: #6b7280; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pk-tab:hover { color: var(--text); }
.pk-tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.pk-tab em {
  font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  padding: 1px 5px; border-radius: 3px; background: var(--brand-soft); color: var(--brand-text);
}

/* ---- 筛选卡 ---- */
.pkf {
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 4px 16px; margin-bottom: 12px;
}
.pkf-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-height: 42px; padding: 6px 0;
}
.pkf-row + .pkf-row { border-top: 1px dashed #f0f2f5; }
.pkf-lab {
  flex: none; width: 62px; font-size: 14px; color: #8d95a1; letter-spacing: .2px;
}
/* 日 / 周 / 月：三段拼成一个控件，避免三个下拉占地方 */
.pkf-seg { display: flex; border: 1px solid #e3e7eb; border-radius: 6px; overflow: hidden; height: 28px; }
.pkf-seg button {
  border: 0; background: #fff; padding: 0 14px; font-size: 14.5px; color: #5b6472;
  font-family: inherit; cursor: pointer; line-height: 1;
}
.pkf-seg button + button { border-left: 1px solid #e3e7eb; }
.pkf-seg button:hover { background: #f7f9fa; }
.pkf-seg button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }

.pkf-date {
  height: 28px; width: 132px; border: 1px solid #e3e7eb; border-radius: 6px;
  padding: 0 9px; font-size: 14.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #374151; background: #fff; font-variant-numeric: tabular-nums;
}
.pkf-date:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.pkf-refresh {
  width: 28px; height: 28px; flex: none; border: 1px solid #e3e7eb; border-radius: 6px;
  background: #fff; color: #6b7280; cursor: pointer; display: flex; align-items: center;
  justify-content: center; padding: 0;
}
.pkf-refresh:hover { border-color: var(--brand); color: var(--brand); }
.pkf-refresh svg { width: 14px; height: 14px; }
.pkf-meta { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---- 筛选标签 ---- */
.pkf-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.pkf-pill {
  height: 26px; padding: 0 10px; border: 1px solid #e3e7eb; border-radius: 5px;
  background: #fff; color: #4b5563; font-size: 14px; font-family: inherit;
  cursor: pointer; white-space: nowrap; line-height: 1;
}
.pkf-pill:hover { border-color: var(--brand-soft-strong); color: var(--brand-text); }
/* 选中态带勾：单选用「填充 + 勾」比只改颜色更容易一眼看出当前口径 */
.pkf-pill.on {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text);
  font-weight: 600; padding-left: 7px;
}
.pkf-pill.on::before { content: "✓"; font-size: 11.5px; margin-right: 3px; opacity: .85; }
.pkf-more {
  height: 26px; padding: 0 8px; border: 0; background: none; color: var(--brand);
  font-size: 14px; font-family: inherit; cursor: pointer;
}
.pkf-more:hover { text-decoration: underline; }
.pkf-tip { font-size: 12.5px; color: #b0b7c0; margin-left: 4px; }

/* ---- 榜单表 ---- */
.pk-tw { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow-x: auto; }
.pk-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pk-table th {
  text-align: left; font-weight: 500; font-size: 13px; color: var(--muted);
  padding: 9px 8px; background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.pk-table td { padding: 8px; font-size: 14.5px; border-bottom: 1px solid #f3f5f7; vertical-align: middle; }
.pk-table tbody tr:last-child td { border-bottom: 0; }
.pk-table tbody tr:hover td { background: #fafbfc; }
.pk-table .c { text-align: center; }
.pk-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.pk-table td .btn { white-space: nowrap; }
/* 入池按钮压窄一点：60px 的操作列要能装下两字按钮，不能把文字挤出去 */
.pk-table .pk-add { padding: 0 8px; }


/* 排序表头：整列可点，当前排序列染成品牌色 */
.pk-sort {
  border: 0; background: none; padding: 0; font: inherit; color: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
}
.pk-sort:hover { color: var(--brand); }
.pk-sort.on { color: var(--brand); font-weight: 600; }
.pk-caret { font-style: normal; font-size: 11px; opacity: .35; }
.pk-sort.on .pk-caret { opacity: 1; }

.pk-rank { color: #b0b7c0; font-size: 14px; font-variant-numeric: tabular-nums; }

.pk-prod { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pk-img {
  width: 42px; height: 42px; flex: none; border-radius: 6px; object-fit: cover;
  background: var(--bg-subtle); display: block;
}
.pk-pinfo { min-width: 0; }
.pk-name {
  font-size: 14.5px; line-height: 1.45; font-weight: 500; color: #1f2937;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pk-off {
  font-style: normal; margin-left: 5px; font-size: 11.5px; font-weight: 600;
  padding: 0 4px; border-radius: 2px; background: #f1f3f5; color: #8d95a1; vertical-align: 1px;
}
.pk-sub { font-size: 12.5px; color: #9aa3af; line-height: 1.5; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sub2 { font-size: 12px; color: #9aa3af; line-height: 1.5; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 店铺：头像 + 店名 + 店铺累计销量（和官网那张表的排法一致） */
.pk-shop { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pk-ava {
  width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover;
  background: var(--bg-subtle); display: block;
}
.pk-shop-t { min-width: 0; }
.pk-shop-n { font-size: 14px; color: #374151; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pk-cat { font-size: 14px; color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-region { font-size: 14px; color: #6b7280; white-space: nowrap; }
/* 环比：涨红跌绿（与全站口径一致），字号压到 11px 免得抢过主值 */
.pk-gr {
  font-style: normal; font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pk-gr.up { color: #d93025; }
.pk-gr.down { color: #11836e; }
.pk-nil { color: #c3c9d1; }

.pk-cap {
  font-style: normal; font-size: 11.5px; color: #9aa3af;
  background: #f1f3f5; padding: 1px 4px; border-radius: 3px; margin-left: 2px;
}

#pk-pager { margin-top: 10px; }

/* 窄屏（≤1500，内容区约 1000~1230px）：12 列按桌面宽度硬塞，商品列会掉到 180px 以下。
   先让「总销售额」让位（总销量 × 均价就能估，信息量最小），其余 11 列保留。 */
@media (max-width: 1500px) {
  .pk-table col:nth-child(11), .pk-table th:nth-child(11), .pk-table td:nth-child(11) { display: none; }
}

.pk-guide {
  border: 1px dashed var(--border-strong); border-radius: 10px; background: #fcfdfd;
  padding: 26px 24px; max-width: 520px; margin: 40px auto; text-align: center;
}
.pk-guide b { font-size: 16px; color: #1f2937; }
.pk-guide p { font-size: 14.5px; color: #6b7280; line-height: 1.8; margin: 8px 0 16px; }
.pk-err { padding: 26px 16px; line-height: 1.9; }
.pk-err b { display: block; font-size: 15.5px; color: #1f2937; margin-bottom: 4px; }
.pk-err .muted { font-size: 14px; color: #8d95a1; margin-top: 4px; }

/* FastMoss 接入配置弹窗（js/fastmoss.js）：只放配置，不重复画榜单 */
.fmon-modal { width: 560px; max-width: 94vw; }
.fmon-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fmon-head h3 { margin: 0; }


/* =========================================================
 * 店铺产品（js/shop-products.js）
 * 十一列固定比例：商品列吃最多，其余按内容实测定宽。
 * 列宽必须**纯百分比** —— 混 px 且 table-layout:fixed 时 % 列会被压没；
 * 窄屏靠 .sp-tw 横向滚动，不缩列（缩了就是三个字的竖排）。
 * ========================================================= */
.sp-bar { gap: 8px; }
.sp-bar1 { margin-bottom: 8px; }
.sp-bar2 { margin-bottom: 12px; }
.sp-bar .af-input { height: 32px; }
.sp-bar #sp-shop { min-width: 176px; max-width: 220px; }
.sp-bar #sp-sort { min-width: 108px; }
.sp-bar .af-tab em {
  font-style: normal; font-size: 11.5px; margin-left: 4px; padding: 0 4px;
  border-radius: 3px; background: #eef1f4; color: #6b7280;
}
.sp-bar .af-tab.on em { background: var(--brand-soft); color: var(--brand-text); }

/* 「筛选」按钮 + 已生效条件数 */
.sp-fbtn { display: inline-flex; align-items: center; gap: 5px; }
.sp-fbtn.on { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.sp-fn {
  font-style: normal; font-size: 11.5px; font-weight: 700; line-height: 15px;
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--brand); color: #fff; text-align: center; box-sizing: border-box;
}
.sp-fn[hidden] { display: none; }

/* ---------------- 高级筛选面板 ---------------- */
.sp-filt {
  display: none; border: 1px solid var(--border); border-radius: 10px;
  background: #fcfdfd; padding: 13px 15px 10px; margin-bottom: 12px;
}
.sp-filt.on { display: block; }
.sp-filt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(326px, 1fr));
  gap: 9px 20px;
}
.sp-f { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sp-f > span {
  flex: none; width: 92px; text-align: right; font-size: 12.5px; color: #6b7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-f .af-input { flex: 1 1 auto; min-width: 0; height: 30px; padding: 4px 8px; font-size: 14px; }
.sp-range { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.sp-range .af-input { flex: 1 1 0; min-width: 0; height: 30px; padding: 4px 8px; font-size: 14px; }
.sp-range i { font-style: normal; flex: none; color: #c3c9d1; font-size: 12.5px; }
/* 原生 date 控件有最小固有宽度，压到 0 会把 yyyy/mm/dd 折成两行 */
.sp-range input[type="date"] { min-width: 118px; }
.sp-filt-ft {
  display: flex; align-items: center; gap: 10px;
  margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.sp-filt-tip { font-size: 12px; color: #a8b0b9; line-height: 1.6; }
/* .grow 的 flex:1 只写给了 .af-bar，放进面板里就成了普通 span，
   「收起筛选」/「保存」会被顶到左边 —— 这三处补上 */
.sp-filt-ft .grow, .spm-desc-bar .grow, .spm-foot .grow { flex: 1 1 auto; }

/* 顶部提示条：还有多少商品没补图片 */
.sp-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; line-height: 1.7; padding: 7px 11px; margin-bottom: 10px;
  border-radius: 7px; border: 1px solid transparent;
}
.sp-note.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.sp-note.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.sp-note b { font-weight: 600; }
.sp-note-i {
  width: 15px; height: 15px; flex: none; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700;
  background: currentColor; color: #fff;
}

/* ---------------- 表格 ---------------- */
.sp-tw {
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  overflow-x: auto; overflow-y: hidden;
}
.sp-table { width: 100%; min-width: 1360px; border-collapse: collapse; table-layout: fixed; }
.sp-table th {
  text-align: left; font-weight: 500; font-size: 13px; color: var(--muted);
  padding: 9px 10px; background: #fafbfc; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sp-table th.num, .sp-table td.num { text-align: right; }
/* 窄屏（≤1500）表格会横向滚动，但「操作」是最常点的列，不能滚出去 ——
   钉在右边，并用一道浅影提示左边还有内容被盖住。sticky 单元格必须有实底色。 */
.sp-table th:last-child, .sp-table td:last-child {
  position: sticky; right: 0; z-index: 2; background: #fff;
  box-shadow: -7px 0 9px -8px rgba(15, 23, 42, .22);
}
.sp-table thead th:last-child { background: #fafbfc; z-index: 3; }
.sp-table tbody tr:hover td:last-child { background: #fafbfc; }
.sp-table td {
  padding: 9px 10px; font-size: 14.5px; border-bottom: 1px solid #f3f5f7;
  vertical-align: middle;
}
.sp-table tbody tr:last-child td { border-bottom: 0; }
.sp-table tbody tr:hover td { background: #fafbfc; }
.sp-empty { text-align: center; color: var(--muted); font-size: 14.5px; padding: 34px 0; }

.sp-prod { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sp-img {
  width: 52px; height: 52px; flex: none; border-radius: 6px; object-fit: cover;
  background: #f1f4f6; display: block; color: #b0b7c0;
}
.sp-img.ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 20.5px; font-weight: 600; color: #c3c9d1; background: #f4f6f8;
}
.sp-img.bad { background: #f4f6f8; }
.sp-pinfo { min-width: 0; flex: 1 1 auto; }
.sp-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 14.5px; line-height: 1.45; color: #1f2937; font-weight: 500;
}
.sp-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12.5px; color: #9aa3af; min-width: 0;
}
.sp-meta .mono { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-region {
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px; color: #6b7280;
  background: #f1f3f5; border-radius: 3px; padding: 0 4px; flex: none;
}
/* 状态徽标：只染文字与极浅底，别在表格里刷一片高饱和色块 */
.sp-chip {
  font-size: 11.5px; font-weight: 600; line-height: 16px; padding: 0 5px;
  border-radius: 3px; white-space: nowrap; display: inline-block;
}
.sp-chip.green { background: #e9f7f1; color: #0f7a63; }
.sp-chip.gray { background: #f1f3f5; color: #6b7280; }
.sp-chip.blue { background: #eef4ff; color: #2f5fd0; }
.sp-chip.amber { background: #fff7e6; color: #a15c00; }
.sp-chip.red { background: #fdecec; color: #c02626; }

.sp-cat {
  font-size: 14px; color: #4b5563; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 价格区间：主价加粗 + 区间尾用同号小字，整段不换行（换行会把「150.78」孤零零甩到下一行） */
.sp-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-more { font-style: normal; font-size: 12.5px; color: #6b7280; font-weight: 400; margin-left: 2px; }
.sp-cny { font-size: 12px; color: #9aa3af; line-height: 1.5; margin-top: 1px; }
.sp-sub2 { font-size: 12px; color: #9aa3af; line-height: 1.5; white-space: nowrap; }
/* 「N SKU 共享」：提醒这个库存数字是单 SKU 的，不是相加 */
.sp-sub2.sp-shared { color: #a15c00; cursor: help; }
.sp-dim { font-size: 14px; color: #374151; white-space: nowrap; }

/* 发布人员：平台不提供，本系统保存过才有人名，否则写「平台同步」 */
.sp-ed { font-size: 13px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sp-ed.none { color: #b0b7c0; }

/* 所属店铺：站点角标 + 店名，店名超长省略，悬停看全称 */
.sp-shop { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sp-shop .n { font-size: 14px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 创建 / 更新：两行同宽，标签淡一点 */
.sp-tm {
  font-size: 12.5px; color: #6b7280; line-height: 1.55; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sp-tm i { font-style: normal; color: #b0b7c0; margin-right: 4px; }

/* 备注 */
.sp-note-c {
  font-size: 13px; color: #4b5563; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sp-note-add {
  border: 0; background: none; font-family: inherit; font-size: 12.5px; color: #c0c7cf;
  cursor: pointer; padding: 0;
}
.sp-note-add:hover { color: var(--brand); }

/* 操作列：三行两列（对齐妙手），按钮做成文字链，竖线只做分隔不画框 */
.sp-th-act { text-align: right; }
.sp-act { text-align: right; }
.sp-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 0; }
.sp-ops button {
  border: 0; background: none; font-family: inherit; font-size: 13px; line-height: 1.6;
  color: var(--brand); cursor: pointer; padding: 1px 0; text-align: center; white-space: nowrap;
}
.sp-ops button:hover { color: var(--brand-text); text-decoration: underline; }
.sp-ops button + button { box-shadow: inset 1px 0 0 #e9edf0; }
.sp-ops button:disabled { color: #c6ccd3; cursor: not-allowed; text-decoration: none; }

/* 「更多」下拉：fixed 定位，用 getBoundingClientRect 算位置，不受滚动影响 */
.sp-menu {
  position: fixed; z-index: 400; min-width: 152px; padding: 5px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.sp-menu button, .sp-menu a {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  font-family: inherit; font-size: 14.5px; color: var(--text); padding: 7px 10px;
  border-radius: 6px; cursor: pointer; text-decoration: none; line-height: 1.5;
}
.sp-menu button:hover, .sp-menu a:hover { background: var(--hover); }

/* 备注弹窗 */
.af-panel.sp-note-p { width: 540px; max-width: 94vw; }
.sp-note-ta { width: 100%; min-height: 124px; resize: vertical; padding: 9px 11px; line-height: 1.7; font-size: 14.5px; }
.sp-note-hint { font-size: 12.5px; color: #9aa3af; margin-top: 7px; }
.sp-note-ft { display: flex; gap: 8px; }

@media (max-width: 1500px) {
  .sp-bar #sp-shop { min-width: 148px; }
  .sp-filt-grid { grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); }
  .sp-f > span { width: 78px; }
}



/* =========================================================
 * 商品编辑弹窗（全屏 · 单页向下滚动）
 *
 * 三个纵向层：head（标题）/ nav（锚点）/ body（滚动）。
 * body 里再分「内容列 + 右侧信息栏」，右栏 sticky 常驻。
 * 高度全靠 flex，不用 calc(100vh - N) 猜 —— 猜差 10px 就是一条多余滚动条。
 * ========================================================= */
.af-panel.spm {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0; padding: 0; display: flex; flex-direction: row;
  overflow: hidden; animation: afpop .16s var(--ease);
}

/* ---------------- 左栏 ---------------- */
.spm-side {
  width: 252px; flex: none; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; background: #fbfcfd; min-height: 0;
}
.spm-side-h { padding: 12px 13px 10px; border-bottom: 1px solid #eef1f4; flex: none; }
.spm-side-t { font-size: 13px; color: var(--muted); }
.spm-side-t b { color: #374151; font-weight: 600; }
.spm-side-q { width: 100%; height: 28px; margin-top: 8px; padding: 3px 8px; font-size: 14px; }
.spm-side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; }
.spm-side-empty { font-size: 13px; color: #a8b0b9; text-align: center; padding: 22px 0; }
.spm-side-ft {
  flex: none; padding: 9px 13px; border-top: 1px solid #eef1f4;
  font-size: 12px; color: #a8b0b9; line-height: 1.6; background: #fbfcfd;
}
.spm-side-ft b { color: #6b7280; font-weight: 600; }
.spm-side-i {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 6px;
  padding: 6px; cursor: pointer; font-family: inherit;
}
.spm-side-i:hover { background: #f3f6f8; }
.spm-side-i.on { background: #fff; border-color: var(--brand-soft-strong); }
.spm-side-i img, .spm-side-i .ph {
  width: 38px; height: 38px; border-radius: 4px; object-fit: cover; flex: none;
  background: #eef1f3; display: block;
}
.spm-side-i .t { min-width: 0; flex: 1 1 auto; }
.spm-side-i .t b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 13px; line-height: 1.4; color: #374151; font-weight: 500;
}
.spm-side-i .t i {
  display: block; font-style: normal; font-size: 11.5px; color: #b0b7c0;
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spm-side-i .t em {
  display: inline-block; font-style: normal; font-size: 11.5px; line-height: 14px;
  margin-top: 3px; padding: 0 4px; border-radius: 3px; background: #f1f3f5; color: #6b7280;
}
.spm-side-i .t em.green { background: #e9f7f1; color: #0f7a63; }
.spm-side-i .t em.blue { background: #eef4ff; color: #2f5fd0; }
.spm-side-i .t em.amber { background: #fff7e6; color: #a15c00; }
.spm-side-i .t em.red { background: #fdecec; color: #c02626; }

/* ---------------- 右侧主体 ---------------- */
.spm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.spm-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 20px 9px; border-bottom: 1px solid var(--border); flex: none;
}
.spm-title { flex: 1 1 auto; min-width: 0; }
.spm-title .tt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 16px; font-weight: 600; color: #1f2937; line-height: 1.45;
}
.spm-title .spm-id { display: block; font-size: 12px; color: #b0b7c0; font-weight: 400; margin-top: 3px; }
.spm-head-ops { display: flex; align-items: center; gap: 10px; flex: none; }
.spm-x {
  border: 0; background: none; font-size: 23px; line-height: 1; color: #9aa3af;
  cursor: pointer; padding: 0 2px; flex: none;
}
.spm-x:hover { color: #374151; }

/* 锚点导航：不是页签，点了滚动定位，滚动时自动高亮 */
.spm-nav {
  display: flex; gap: 0; padding: 0 14px; border-bottom: 1px solid var(--border);
  flex: none; background: #fff; overflow-x: auto; scrollbar-width: none; align-items: center; height: 40px;
}
.spm-nav-tip {
  font-size: 12px; color: #b0b7c0; margin-right: 8px; flex: none; letter-spacing: .5px;
}
.spm-nav::-webkit-scrollbar { height: 0; }
.spm-nav-i {
  position: relative; display: inline-flex; align-items: center; gap: 5px; flex: none;
  border: 0; background: none; cursor: pointer; font-family: inherit;
  font-size: 14px; color: #6b7280; padding: 5px 10px 6px; white-space: nowrap;
}
.spm-nav-i + .spm-nav-i { border-left: 1px solid #f0f2f5; }
.spm-nav-i:hover { color: var(--text); }
.spm-nav-i.on { color: var(--brand); font-weight: 600; }
/* 只有一条下划线，不做底色 —— 有底色就像页签，用户会以为又回到了切页签 */
.spm-nav-i.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px;
  height: 2px; border-radius: 1px; background: var(--brand);
}
.spm-ico { width: 13px; height: 13px; flex: none; opacity: .9; }

.spm-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 24px;
}
.spm-cols { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 22px; align-items: start; }
.spm-content { min-width: 0; }
.spm-rail { position: sticky; top: 0; padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }

/* 区块：靠分隔线分段，不靠卡片堆叠（整页太长，卡片会显得碎） */
.spm-sec { padding: 18px 0 20px; border-bottom: 1px solid #f0f2f5; }
.spm-sec:last-child { border-bottom: 0; }
.spm-sec-h {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.spm-sec-h h3 { margin: 0; font-size: 16px; font-weight: 600; color: #1f2937; }
.spm-sec-sub { font-style: normal; font-size: 12.5px; color: #9aa3af; }

.spm-foot {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 11px 20px; border-top: 1px solid var(--border); background: #fff;
}
.spm-foot .grow, .spm-sku-tools .grow, .spm-sec-h .grow, .spi-bar .grow { flex: 1 1 auto; }
.spm-msg { font-size: 14px; color: var(--muted); max-width: 720px; line-height: 1.5; }
.spm-msg.err { color: #c02626; }
.spm-msg.ok { color: var(--brand-text); }

/* ---------------- 通用小件 ---------------- */
.spm-fld { margin-bottom: 16px; }
.spm-fld:last-child { margin-bottom: 0; }
.spm-fld-h { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; min-height: 26px; }
.spm-fld-h label { font-size: 14px; font-weight: 500; color: #374151; }
.spm-fld-ops { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.spm-counter { font-size: 12px; color: #b0b7c0; font-variant-numeric: tabular-nums; }
.spm-fld-ft { font-size: 12px; color: #a8b0b9; line-height: 1.6; margin-top: 7px; }
.req { font-style: normal; color: #e5484d; margin-right: 2px; }
.spm-fld > .af-input { width: 100%; height: 38px; font-size: 15px; }
.spm-hint { font-size: 13px; color: #8d95a1; line-height: 1.75; margin: 10px 0 0; }
.spm-hint b { color: #6b7280; }
.spm-hint.inline { margin: 0 0 0 8px; display: inline; }
.spm-tip {
  margin-top: 14px; padding: 9px 12px; border-radius: 6px; font-size: 13px;
  line-height: 1.75; background: #f8fafb; border: 1px solid #eef1f4; color: #6b7280;
  max-width: 1000px;
}
.spm-tip.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.spm-tip b { color: #374151; }
.spm-tip.warn b { color: #92400e; }
.spm-empty-big {
  border: 1px dashed #e3e7eb; border-radius: 10px; background: #fcfdfd;
  padding: 24px 26px; max-width: 760px;
}
.spm-empty-big b { display: block; font-size: 15px; color: #4b5563; font-weight: 600; margin-bottom: 8px; }
.spm-empty-big b::before {
  content: "i"; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: #e9edf1; color: #6b7280;
  font-size: 11.5px; font-weight: 700; margin-right: 7px; vertical-align: 1px;
}
.spm-empty-big p { margin: 0; font-size: 13px; color: #8d95a1; line-height: 1.85; max-width: 660px; }
.spm-empty-big code, .spm-tip code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px;
  background: #f1f3f5; border-radius: 3px; padding: 0 3px;
}

.spm-mini {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px;
  border: 1px solid #e3e7eb; border-radius: 5px; background: #fff; color: #4b5563;
  font-family: inherit; font-size: 13px; line-height: 1; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.spm-mini:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.spm-mini.on { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.spm-mini .spm-ico { width: 12px; height: 12px; }

.spm-seg { display: inline-flex; border: 1px solid #e3e7eb; border-radius: 6px; overflow: hidden; background: #fff; }
.spm-seg button {
  border: 0; background: none; font-family: inherit; font-size: 13px; line-height: 1;
  padding: 6px 11px; color: #6b7280; cursor: pointer; white-space: nowrap;
}
.spm-seg button + button { border-left: 1px solid #eef1f4; }
.spm-seg button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.spm-seg button:disabled { cursor: default; }
.spm-seg-sm button { padding: 5px 9px; font-size: 12.5px; }

/* 富文本描述（固定高度：整页滚动时不能靠 flex 撑） */
.spm-rt {
  display: flex; flex-direction: column; height: 460px;
  border: 1px solid #e3e7eb; border-radius: 8px; overflow: hidden; background: #fff;
}
.spm-rt-bar {
  display: flex; align-items: center; gap: 1px; flex-wrap: wrap; flex: none;
  padding: 4px 6px; border-bottom: 1px solid #f0f2f5; background: #fbfcfd;
}
.spm-rt-bar button {
  border: 0; background: none; border-radius: 4px; cursor: pointer;
  font-family: inherit; font-size: 14px; line-height: 1; color: #4b5563;
  width: 26px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
}
.spm-rt-bar button:hover { background: #eef1f4; color: var(--brand-text); }
.spm-rt-div { width: 1px; height: 14px; background: #e3e7eb; margin: 0 4px; flex: none; }
.spm-rt-edit {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px;
  font-size: 14.5px; line-height: 1.8; color: #374151; word-break: break-word;
}
.spm-rt-edit:focus { outline: none; }
.spm-rt-edit img { max-width: 100%; height: auto; }
.spm-rt-edit h3 { font-size: 16px; margin: 12px 0 6px; }
.spm-rt-edit ul, .spm-rt-edit ol { padding-left: 20px; }
.spm-rt-edit[hidden], #spm-f-desc[hidden], .spm-preview[hidden], .spm-rt-bar[hidden] { display: none !important; }
/* 采集箱复用同一套编辑器：它的 textarea / iframe 是常驻节点，只切显隐 */
.spm-ta[hidden], #cl-e-desc[hidden], #cl-e-desc-pv[hidden] { display: none !important; }
.spm-ta {
  width: 100%; flex: 1 1 auto; min-height: 200px; padding: 10px 12px; resize: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.75;
  border: 0; border-radius: 0;
}
.spm-preview { width: 100%; flex: 1 1 auto; min-height: 200px; border: 0; display: block; }

/* ---------------- 右栏卡片 ---------------- */
.spm-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 12px 13px; min-width: 0; }
.spm-card-grow { min-height: 150px; display: flex; flex-direction: column; }
.spm-card-h { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 10px; }
.spm-card-h i { font-style: normal; font-weight: 400; font-size: 12px; color: #9aa3af; }
.spm-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.spm-kv > div { min-width: 0; }
/* 19 位商品 ID 在 1440 的两列卡片里会折成「…756621 / 0」，让它独占一行 */
.spm-kv > div.full { grid-column: 1 / -1; }
.spm-kv span { display: block; font-size: 12px; color: #9aa3af; margin-bottom: 2px; }
.spm-kv b { font-size: 14px; font-weight: 500; color: #374151; word-break: break-all; }
.spm-cny { font-style: normal; display: block; font-size: 11.5px; color: #9aa3af; font-weight: 400; }
.spm-share {
  font-style: normal; font-size: 11.5px; font-weight: 600; color: #a15c00;
  background: #fff7e6; border-radius: 3px; padding: 0 4px; margin-left: 4px;
}
.spm-note-ta {
  width: 100%; flex: 1 1 auto; min-height: 100px; resize: vertical; padding: 8px 10px;
  line-height: 1.7; font-size: 14px;
}

/* ---------------- 类目 & 属性 ---------------- */
.spm-rows { display: flex; flex-direction: column; }
.spm-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed #f0f2f5; font-size: 14.5px; align-items: flex-start; }
.spm-row:last-child { border-bottom: 0; }
.spm-row > .k { width: 92px; flex: none; text-align: right; font-size: 13px; color: #9aa3af; padding-top: 3px; line-height: 1.5; }
.spm-row > .v { flex: 1 1 auto; min-width: 0; color: #374151; line-height: 1.65; }
.spm-row > .v.muted { color: #b0b7c0; }
.spm-v-sub { font-size: 12px; color: #a8b0b9; margin-top: 3px; line-height: 1.6; }
.spm-attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 26px; }
.spm-attr2 { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0f2f5; font-size: 14px; }
.spm-attr2 .k { width: 132px; flex: none; color: #9aa3af; line-height: 1.6; }
.spm-attr2 .v { color: #374151; line-height: 1.6; min-width: 0; word-break: break-word; }
.spm-sub-h { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 9px; font-size: 14.5px; font-weight: 600; color: #374151; }
.spm-sub-h i { font-style: normal; font-weight: 400; font-size: 12px; color: #9aa3af; }

/* ---------------- 销售属性 / SKU ---------------- */
.spm-specs { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 16px; }
.spm-spec { border: 1px solid #eef1f4; border-radius: 10px; background: #fcfdfd; padding: 12px 14px; }
.spm-spec-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; flex-wrap: wrap; }
.spm-spec-h b { font-size: 14.5px; color: #374151; font-weight: 600; }
.spm-spec-h i { font-style: normal; font-size: 12px; color: #9aa3af; }
.spm-spec-h .spm-counter { margin-left: auto; }
.spm-spec-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.spm-spec-v {
  display: inline-flex; align-items: center; gap: 7px; max-width: 384px;
  border: 1px solid #e3e7eb; border-radius: 6px; background: #fff; padding: 4px 8px 4px 4px;
}
.spm-spec-v:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.spm-spec-v img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; flex: none; background: #eef1f3; display: block; }
.spm-spec-v.noimg { padding-left: 9px; }
.spm-spec-in {
  border: 0; background: none; font-family: inherit; font-size: 13px; color: #374151;
  min-width: 80px; flex: 0 0 auto; padding: 2px 0; line-height: 1.5;
}
.spm-spec-in:focus { outline: none; color: #111827; }
.spm-spec-more {
  border: 1px dashed #d8dee5; border-radius: 6px; background: #fff; color: var(--brand-text);
  font-family: inherit; font-size: 12.5px; padding: 5px 9px; cursor: pointer; white-space: nowrap;
}
.spm-spec-more:hover { border-color: var(--brand); background: var(--brand-soft); }
/* 采集箱：规格组沿用店铺商品那套，只补几个它没有的小件 */
.spm-spec-add {
  border: 1px dashed #d8dee5; border-radius: 6px; background: #fff; color: #9aa3af;
  font-family: inherit; font-size: 12.5px; padding: 5px 9px; cursor: pointer; white-space: nowrap;
}
.spm-spec-add:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.cl4-gtag { font-size: 11.5px; color: #98a1ac; background: #f1f4f7; border-radius: 4px; padding: 1px 5px; flex: none; }
.spm-spec-v.fresh { border-color: #f0d9b0; background: #fffdf8; }
.cl4-vdel { font-style: normal; color: #c2c8d0; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.cl4-vdel:hover { color: var(--red); }
.spm-spec-h b[data-gname] { cursor: pointer; }
.spm-spec-h b[data-gname]:hover { color: var(--brand-text); text-decoration: underline; text-decoration-style: dotted; }
.spm-imgs-empty { flex: 1 1 100%; font-size: 14px; color: #9aa3af; line-height: 1.9; padding: 6px 0; }
/* SKU 表：采集箱是 6 列（勾选/规格/展示价/库存/编码/操作） */
.cl4-sku2 .spm-sku2-head, .cl4-sku2 .spm-sku2-row {
  grid-template-columns: 24px minmax(190px, 1.7fr) minmax(96px, .66fr)
    minmax(84px, .5fr) minmax(104px, .82fr) 32px;
}
.cl4-sku2 .spm-sku2-row .cl4-x { justify-self: center; }
.cl4-sku2 .spm-sku2-row .af-input.num { text-align: right; }
/* 规格值排成网格：flex 换行时每个 chip 宽度不一样，37 个值铺下来参差不齐 */
#cl4-spechead .spm-spec-vals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
}
#cl4-spechead .spm-spec-v { width: 100%; max-width: none; }
#cl4-spechead .spm-spec-in { flex: 1 1 auto; width: auto !important; min-width: 0; }
#cl4-spechead .cl4-spec-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#cl4-spechead .cl4-spec-acts > button { flex: none; }

.spm-sku-tools { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.spm-ck { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #6b7280; cursor: pointer; }
.spm-ck input { width: 13px; height: 13px; accent-color: var(--brand); cursor: pointer; }
.spm-pick { font-size: 12.5px; color: #b0b7c0; }

/* SKU 表自己在框里滚（不带着整页一起滚）：185 行商品整页滑到 SKU 表就要滑三屏。
   overflow 必须是 auto —— sticky 表头需要滚动容器；clip 反而会让表头失效。 */
.spm-sku2 {
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  overflow: auto; max-height: 520px;
}
.spm-sku2-head, .spm-sku2-row {
  display: grid;
  /* 勾选 / 规格 / 货源价 / 展示价 / 库存 / 平台SKU / 重量
   * 列宽用 minmax(min, fr) 分余量：规格列不再是唯一的长列，
   * 否则 1920 下它一个人吃掉 450px，中间空出一大块。 */
  grid-template-columns:
    24px minmax(150px, 1.5fr) minmax(78px, .55fr) minmax(96px, .75fr)
    minmax(150px, 1fr) minmax(110px, .9fr) 92px;
  gap: 8px; align-items: center;
}
.spm-sku2-head {
  font-size: 12.5px; color: var(--muted); padding: 8px 10px;
  background: #fafbfc; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 3;
}
.spm-sku2-head .num { text-align: right; }
.spm-sku2-row { padding: 5px 10px; border-bottom: 1px solid #f3f5f7; }
.spm-sku2-row:last-child { border-bottom: 0; }
.spm-sku2-row:hover { background: #fafcfb; }
.spm-sku2-row.on { background: #f4fbf8; }
.spm-sku2-spec { display: flex; align-items: center; gap: 8px; min-width: 0; }
.spm-sku2-spec img, .spm-sku2-spec .ph {
  width: 28px; height: 28px; border-radius: 4px; object-fit: cover; flex: none;
  background: #eef1f3; display: block;
}
.spm-sku2-spec > span {
  font-size: 14px; color: #374151; line-height: 1.45; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  /* 规格串动辄 60 字，单行省略会吃掉一半；给两行，行高不变（价格那格本来就有两行） */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  white-space: normal; word-break: break-word; flex: 1 1 auto;
}
.spm-sku2-row .af-input { height: 30px; font-size: 14px; }
.spm-sku-cost, .spm-sku-price, .spm-sku-sku, .spm-pcell .af-input { width: 100%; min-width: 0; }
/* 展示价：原币主值 + 人民币小字（边输边算，见 spmInput） */
.spm-pcell { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.spm-pcny {
  font-style: normal; font-size: 12px; color: #9aa3af; text-align: right;
  font-variant-numeric: tabular-nums; line-height: 1.15; padding-right: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spm-cur {
  font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  color: #9aa3af; background: #f4f6f8; border-radius: 3px; padding: 0 3px; margin-left: 3px;
}
.spm-sku-price, .spm-sku-cost { text-align: right; font-variant-numeric: tabular-nums; }
.spm-sku-sku { font-size: 13px !important; }
.spm-tax {
  font-style: normal; font-size: 11px; font-weight: 600; color: #a15c00; background: #fff7e6;
  border-radius: 3px; padding: 0 3px; margin-left: 4px; vertical-align: 1px;
}
.spm-inv { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.spm-wh { display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: #9aa3af; }
.spm-wh .af-input { width: 64px; height: 30px !important; text-align: right; padding: 3px 5px; }
.spm-wh .af-input::-webkit-outer-spin-button,
.spm-wh .af-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.spm-wkg { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.spm-wkg .af-input { width: 62px; text-align: right; }
.spm-wkg i { font-style: normal; font-size: 11.5px; color: #9aa3af; }

/* ---------------- 多国家售卖 ---------------- */
.spm-tbl { width: 100%; max-width: 1100px; border-collapse: collapse; font-size: 14.5px; }
.spm-tbl th {
  text-align: left; font-weight: 500; font-size: 13px; color: var(--muted);
  padding: 8px 10px; background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.spm-tbl td { padding: 10px; border-bottom: 1px solid #f3f5f7; color: #374151; }
.spm-tbl th.num, .spm-tbl td.num { text-align: right; }
.spm-tbl td .muted { color: #a8b0b9; font-size: 12.5px; }

/* ---------------- 产品图片 ---------------- */
.spm-imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.spm-img {
  position: relative; width: 132px; height: 132px; border-radius: 8px;
  border: 1px solid var(--border); overflow: hidden; cursor: grab; background: #f7f9fa;
}
.spm-img.first { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.spm-img.drag { opacity: .4; }
.spm-img.over { border-color: var(--brand); }
.spm-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spm-img .ix {
  position: absolute; left: 5px; top: 5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 3px; background: rgba(15,23,32,.62); color: #fff;
  font-size: 11.5px; line-height: 18px; text-align: center;
}
.spm-img .ops {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: flex-end; gap: 2px;
  padding: 4px; background: linear-gradient(to top, rgba(15,23,32,.55), transparent);
  opacity: 0; transition: opacity .12s;
}
.spm-img:hover .ops { opacity: 1; }
.spm-img .ops button {
  border: 0; border-radius: 3px; background: rgba(255,255,255,.92); color: #374151;
  width: 22px; height: 22px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.spm-img .ops button:hover { background: #fff; color: var(--brand); }
.spm-img .ops .spm-ico { width: 12px; height: 12px; }
.spm-img-add {
  width: 132px; height: 132px; border-radius: 8px; border: 1px dashed #d8dee5;
  background: #fcfdfd; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; cursor: pointer; color: #b0b7c0; font-family: inherit;
  padding: 0;
}
.spm-img-add:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.spm-img-add:hover em { color: var(--brand-text); opacity: .7; }
.spm-img-add b { font-size: 23px; font-weight: 400; line-height: 1; }
.spm-img-add span { font-size: 13px; }
.spm-img-add em { font-style: normal; font-size: 11.5px; color: #c6ccd3; }

/* ---------------- 产品视频 ---------------- */
.spm-video { max-width: 720px; }
.spm-video video { width: 100%; max-height: 420px; border-radius: 8px; background: #0f1720; display: block; }
.spm-video-url { margin-top: 8px; font-size: 12px; color: #9aa3af; word-break: break-all; line-height: 1.6; }

/* ---------------- 物流信息 ---------------- */
.spm-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spm-in-xs { width: 96px; height: 32px !important; text-align: right; }
.spm-unit { font-size: 13px; color: #9aa3af; }
.spm-x-sign { font-style: normal; color: #c3c9d1; font-size: 12.5px; }
.spm-switch {
  display: inline-flex; align-items: center; width: 32px; height: 18px; border-radius: 9px;
  background: #e3e7eb; padding: 2px; box-sizing: border-box; vertical-align: middle;
}
.spm-switch i { width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .14s; }
.spm-switch.on { background: var(--brand); }
.spm-switch.on i { transform: translateX(14px); }

/* ---------------- 浮层菜单（SKU 模板 / AI 动作） ---------------- */
.spm-menu {
  position: fixed; z-index: 420; width: 320px; padding: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px;
}
.spm-menu-q { height: 30px; font-size: 14px; }
.spm-menu-sub { font-size: 12px; color: #a8b0b9; line-height: 1.6; padding: 0 2px; }
.spm-menu-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.spm-menu-empty { font-size: 13px; color: #a8b0b9; padding: 14px 4px; text-align: center; }
.spm-menu-ft { border-top: 1px solid #f0f2f5; padding-top: 6px; display: flex; flex-direction: column; }
.spm-menu-ft button {
  border: 0; background: none; text-align: left; font-family: inherit; font-size: 14px;
  color: var(--brand-text); padding: 7px 8px; border-radius: 6px; cursor: pointer;
}
.spm-menu-ft button:hover { background: var(--brand-soft); }
.spm-menu-tip { font-size: 12px; color: #a8b0b9; padding: 2px 4px; }
.spm-tpl-i {
  border: 0; background: none; text-align: left; font-family: inherit; padding: 7px 8px;
  border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.spm-tpl-i:hover { background: var(--hover); }
.spm-tpl-i b { font-size: 14px; color: #374151; font-weight: 500; }
.spm-tpl-i i { font-style: normal; font-size: 12px; color: #9aa3af; }
.spm-ai-menu { width: 268px; }
.spm-ai-menu button {
  border: 0; background: none; text-align: left; font-family: inherit; padding: 6px 8px;
  border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 1px;
}
.spm-ai-menu button:hover { background: var(--hover); }
.spm-ai-menu button b { font-size: 14px; color: #374151; font-weight: 500; }
.spm-ai-menu button i { font-style: normal; font-size: 12px; color: #9aa3af; }

/* ---------------- 图片批处理弹窗 ---------------- */
.af-panel.spi { width: 980px; max-width: 96vw; height: 86vh; max-height: 86vh; display: flex; flex-direction: column; }
.af-panel.spi .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.spi-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  border-bottom: 1px solid #f0f2f5; background: #fbfcfd; flex: none;
}
.spi-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.spi-card {
  position: relative; width: 148px; height: 148px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: #f7f9fa; cursor: grab;
}
.spi-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.spi-card.drag { opacity: .4; }
.spi-card.over { border-color: var(--brand); }
.spi-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spi-ck { position: absolute; left: 6px; top: 6px; z-index: 2; }
.spi-ck input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }
.spi-ix {
  position: absolute; right: 6px; top: 6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 3px; background: rgba(15,23,32,.62); color: #fff; font-size: 11.5px;
  line-height: 18px; text-align: center;
}
.spi-size {
  position: absolute; left: 0; right: 0; bottom: 28px; text-align: center;
  font-size: 11.5px; color: #374151; background: rgba(255,255,255,.86); padding: 1px 0;
}
.spi-card .ops {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: flex-end; gap: 2px;
  padding: 3px; background: linear-gradient(to top, rgba(15,23,32,.55), transparent);
  opacity: 0; transition: opacity .12s;
}
.spi-card:hover .ops { opacity: 1; }
.spi-card .ops button {
  border: 0; border-radius: 3px; background: rgba(255,255,255,.92); color: #374151;
  width: 20px; height: 20px; cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.spi-card .ops button:hover { background: #fff; color: var(--brand); }
.spi-card .ops .spm-ico { width: 11px; height: 11px; }
.spi-add {
  width: 148px; height: 148px; border-radius: 8px; border: 1px dashed #d8dee5; background: #fcfdfd;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #b0b7c0; cursor: not-allowed;
}
.spi-add b { font-size: 23px; font-weight: 400; line-height: 1; }
.spi-add span { font-size: 13px; }
.spi-jobs { margin-top: 16px; }
.spi-jobs-h { font-size: 13px; color: #9aa3af; margin-bottom: 7px; }
.spi-jobs-list { display: flex; flex-wrap: wrap; gap: 6px; }
.spi-job {
  font-size: 12px; line-height: 18px; padding: 0 7px; border-radius: 9px;
  background: #f1f3f5; color: #6b7280;
}
.spi-job.pending { background: #fff7e6; color: #a15c00; }
.spi-job.running { background: #eef4ff; color: #2f5fd0; }
.spi-job.done { background: #e9f7f1; color: #0f7a63; }
.spi-job.failed { background: #fdecec; color: #c02626; }

/* ---------------- 批量改名 / 模板管理 / AI 说明 ---------------- */
.af-panel.sp-ren { width: 660px; max-width: 94vw; }
.sp-ren-row {
  display: flex; align-items: center; gap: 9px; padding: 9px 0;
  font-size: 14.5px; color: #374151; cursor: pointer;
}
.sp-ren-row > input[type="radio"] { flex: none; accent-color: var(--brand); }
.sp-ren-row > span { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.sp-ren-row .af-input { height: 32px; font-size: 14px; flex: 1 1 auto; min-width: 120px; }
.sp-ren-row .sp-ren-n { width: 78px; flex: none; }
.sp-ren-row .sp-ren-x { flex: 1 1 0; }
.sp-ren-row i { font-style: normal; color: #9aa3af; font-size: 13px; }

.af-panel.sp-tpl { width: 860px; max-width: 94vw; max-height: 86vh; display: flex; flex-direction: column; }
.af-panel.sp-tpl .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

.af-panel.sp-ai-note { width: 680px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.af-panel.sp-ai-note .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sp-ai-p { font-size: 14px; color: #4b5563; line-height: 1.8; margin: 0 0 8px; }
.sp-ai-pre {
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.7;
  background: #f8fafb; border: 1px solid #eef1f4; border-radius: 6px;
  padding: 9px 11px; margin: 0 0 10px; white-space: pre-wrap; word-break: break-all; color: #374151;
}

/* ---------------- 窄屏 ---------------- */
@media (max-width: 1560px) {
  .spm-cols { grid-template-columns: minmax(0, 1fr) 306px; gap: 16px; }
  .spm-sku2-head, .spm-sku2-row {
    grid-template-columns:
      22px minmax(132px, 1.4fr) minmax(74px, .55fr) minmax(90px, .75fr)
      minmax(140px, 1fr) minmax(104px, .9fr) 86px;
    gap: 7px;
  }
  .spm-wh .af-input { width: 56px; }
  .spm-wkg .af-input { width: 54px; }
  /* 窄屏表头放不下「货源价 + CNY + 批量」三个块，币种 chip 先让位：
     每行价格下面本来就有「≈ ¥」折人民币，页脚也写了按哪个币种填 */
  .spm-sku2-head .spm-cur { display: none; }
}
@media (max-width: 1320px) {
  .spm-side { width: 208px; }
  .spm-cols { grid-template-columns: minmax(0, 1fr); }
  .spm-rail { position: static; padding-top: 0; flex-direction: row; flex-wrap: wrap; }
  .spm-rail .spm-card { flex: 1 1 320px; }
}

/* =========================================================
 * 本轮新增：类目选择器 / 规格计数 / 批量弹窗 / 图片单图编辑 / 放大 / 翻译下拉
 * ========================================================= */

/* ---------------- 类目行 ---------------- */
.spm-cat-line { display: flex; align-items: center; gap: 10px; }
.spm-cat-txt { flex: 1 1 auto; min-width: 0; line-height: 1.6; }
.spm-cat-line .spm-mini { flex: none; }

/* ---------------- 类目选择器（搜索 + 历史 + 三列） ---------------- */
.af-panel.sp-cat { width: 1000px; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column; }
.af-panel.sp-cat .af-bd { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 14px 18px 12px; }
.sp-cat-q { display: flex; gap: 8px; flex: none; margin-bottom: 8px; }
.sp-cat-q .af-input { flex: 1 1 auto; height: 34px; }
.sp-cat-hist { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: none; margin-bottom: 10px; }
.sp-cat-hist-t { font-size: 12px; color: #a8b0b9; margin-right: 2px; }
.sp-cat-chip {
  border: 1px solid #e3e7eb; background: #fff; border-radius: 4px; padding: 2px 8px;
  font-family: inherit; font-size: 13px; color: #4b5563; cursor: pointer; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-cat-chip:hover { border-color: var(--brand); color: var(--brand-text); }
.sp-cat-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); font-weight: 600; }
/* 三列固定高 + 各自滚动：类目有 1979 个，不设高度会把弹窗撑爆 */
.sp-cat-cols {
  flex: 1 1 auto; min-height: 260px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff;
}
.sp-cat-col { overflow-y: auto; border-right: 1px solid #f0f2f5; padding: 4px; }
.sp-cat-col:last-child { border-right: 0; }
.sp-cat-i {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  border: 0; background: none; font-family: inherit; font-size: 14px; color: #374151;
  padding: 5px 7px; border-radius: 5px; cursor: pointer; line-height: 1.5;
}
.sp-cat-i > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-cat-i:hover { background: var(--hover); }
.sp-cat-i.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.sp-cat-i.leaf.on { box-shadow: inset 0 0 0 1px var(--brand); }
.sp-cat-ar { font-style: normal; color: #c3c9d1; flex: none; font-size: 15px; }
.sp-cat-ck { font-style: normal; color: var(--brand); flex: none; font-size: 12.5px; }
.sp-cat-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #c3c9d1; font-size: 13px; }
.sp-cat-load { display: flex; align-items: center; justify-content: center; height: 100%; color: #a8b0b9; font-size: 14px; grid-column: 1 / -1; }
.sp-cat-load.err { color: #c02626; }
.sp-cat-res { grid-column: 1 / -1; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; gap: 1px; }
.sp-cat-r {
  display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: none;
  font-family: inherit; padding: 6px 9px; border-radius: 5px; cursor: pointer;
}
.sp-cat-r:hover { background: var(--hover); }
.sp-cat-r b { font-size: 14.5px; color: #1f2937; font-weight: 500; }
.sp-cat-r i { font-style: normal; font-size: 12px; color: #9aa3af; }
.sp-cat-r:disabled { cursor: not-allowed; opacity: .55; }
.sp-cat-r:disabled b { font-weight: 400; }
.sp-cat-pick {
  flex: none; margin-top: 10px; padding: 8px 11px; border-radius: 6px;
  background: #f8fafb; border: 1px solid #eef1f4; font-size: 14px; color: #4b5563; line-height: 1.7;
}
.sp-cat-pick b { color: #1f2937; }
.sp-cat-pick .mono { margin-left: 4px; font-size: 12.5px; color: #9aa3af; }
.sp-cat-pick .muted { color: #a8b0b9; }
.sp-cat-same { font-style: normal; margin-left: 8px; font-size: 12px; color: #a15c00; background: #fff7e6; border-radius: 3px; padding: 0 5px; }
#spm-cat-new[hidden] { display: none; }
#spm-cat-new { margin-top: 4px; }
#spm-cat-new b { color: var(--brand-text); }

/* ---------------- 规格值：50 字计数 ---------------- */
.spm-spec-n {
  flex: none; font-size: 11.5px; color: #b0b7c0; font-variant-numeric: tabular-nums;
  padding: 0 1px; letter-spacing: -.2px;
}
.spm-spec-n.over { color: #c02626; font-weight: 600; }
.spm-spec-v { padding-right: 5px; }

/* ---------------- SKU 表头批量按钮 ---------------- */
.spm-hb {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 3px;
  background: var(--brand-soft); color: var(--brand-text); font-size: 11.5px; font-weight: 600;
  cursor: pointer; line-height: 15px; vertical-align: 1px; user-select: none;
}
.spm-hb:hover { background: var(--brand); color: #fff; }
.spm-sku2-head .num .spm-hb { margin-left: 4px; }
.spm-sku-cost { font-size: 13px !important; color: #4b5563; }
.spm-sku2-row { min-height: 46px; }

/* ---------------- 批量弹窗 ---------------- */
.af-panel.sp-bulk { width: 720px; max-width: 96vw; max-height: 90vh; display: flex; flex-direction: column; }
.af-panel.sp-bulk .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sp-bl-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed #f0f2f5; align-items: flex-start; }
.sp-bl-row:last-child { border-bottom: 0; }
.sp-bl-k {
  width: 76px; min-width: 76px; flex: none; text-align: right; font-size: 13px;
  color: #9aa3af; padding-top: 7px; white-space: nowrap;
}
.sp-bl-v { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-bl-r {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: #374151;
  cursor: pointer; line-height: 1.6;
}
.sp-bl-r > input[type="radio"] { accent-color: var(--brand); flex: none; }
.sp-bl-r2 { margin-top: 4px; }
.sp-bl-n {
  font-style: normal; font-size: 11.5px; color: #9aa3af; background: #f1f3f5;
  border-radius: 8px; padding: 0 6px; line-height: 15px;
}
.sp-bl-in { display: flex; align-items: center; gap: 7px; margin-left: 20px; }
.sp-bl-in .af-input { width: 168px; height: 32px; font-size: 14.5px; }
.sp-bl-u { font-style: normal; font-size: 13px; color: #9aa3af; }
.sp-bl-formula { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 20px; }
.sp-bl-formula.off { opacity: .5; }
.sp-bl-formula i { font-style: normal; color: #c3c9d1; font-size: 12.5px; }
.sp-bl-f2 { margin-top: 2px; }
.sp-bl-tag { font-size: 13px; color: #9aa3af; flex: none; }
.sp-bl-xs { width: 92px !important; height: 30px !important; font-size: 14px !important; }
.sp-bl-hint { font-size: 12px; color: #a8b0b9; line-height: 1.5; }
.sp-bl-wh { display: flex; flex-direction: column; gap: 6px; margin-left: 20px; }
.sp-bl-whr { display: flex; align-items: center; gap: 10px; }
.sp-bl-whr > span { font-size: 13px; color: #6b7280; display: flex; align-items: baseline; gap: 6px; }
.sp-bl-whr i { font-style: normal; font-size: 11.5px; color: #b0b7c0; }
.sp-bl-whr .af-input { width: 120px; height: 30px; }
.sp-bl-whr .af-input:disabled { background: #f7f9fa; color: #b0b7c0; }
.sp-bl-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-bl-var {
  display: inline-flex; align-items: baseline; gap: 4px; border: 1px solid #e3e7eb; background: #fff;
  border-radius: 4px; padding: 2px 7px; font-family: inherit; font-size: 12.5px; color: #4b5563; cursor: pointer;
}
.sp-bl-var:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.sp-bl-var i { font-style: normal; font-size: 11.5px; color: #b0b7c0; }
.sp-bl-prev { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; max-height: 210px; overflow-y: auto; }
.sp-bl-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.sp-bl-tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--muted);
  padding: 5px 9px; background: #fafbfc; border-bottom: 1px solid var(--border); position: sticky; top: 0;
}
.sp-bl-tbl td { padding: 5px 9px; border-bottom: 1px solid #f5f7f9; color: #4b5563; word-break: break-all; }
.sp-bl-tbl tr:last-child td { border-bottom: 0; }

/* ---------------- 主图：尺寸条 / 放大镜 / 单图编辑 ---------------- */
.spm-img { cursor: grab; }
.spm-img-size {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  font-size: 11.5px; line-height: 16px; text-align: center; color: #6b7280;
  background: rgba(255, 255, 255, .9); border-top: 1px solid #eef1f4;
  font-variant-numeric: tabular-nums;
}
.spm-img .ops { z-index: 3; bottom: 0; }
.spm-img-zoom {
  position: absolute; right: 4px; top: 4px; z-index: 3; width: 22px; height: 22px;
  border: 0; border-radius: 4px; background: rgba(255, 255, 255, .92); color: #374151;
  cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .12s;
}
.spm-img:hover .spm-img-zoom { opacity: 1; }
.spm-img-zoom:hover { background: #fff; color: var(--brand); }
.spm-img-zoom .spm-ico { width: 13px; height: 13px; }

.af-panel.sp-img-e { width: 720px; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; }
.af-panel.sp-img-e .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sp-img-e-box {
  border: 1px solid var(--border); border-radius: 8px; background: #f7f9fa;
  display: flex; align-items: center; justify-content: center; max-height: 46vh; overflow: hidden;
}
.sp-img-e-box img { max-width: 100%; max-height: 46vh; object-fit: contain; display: block; }
.sp-img-e-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 9px 0 12px; font-size: 12.5px; color: #9aa3af;
}
.sp-img-e-meta .mono { word-break: break-all; }
.sp-img-e-ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 放大查看（lightbox） ---------------- */
/* 不要用 afpop：它带 transform，会让这个 fixed 全屏层单独合成，
   headless 截图里遮罩整个不绘制（页面看着像没变暗）。只做 opacity 淡入。 */
.sp-zoom {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center;
  animation: spzoomfade .12s ease-out;
}
@keyframes spzoomfade { from { opacity: 0; } }
/* 遮罩放在子元素上（和 .af-mask 一个做法）：直接给这个 flex 容器刷背景，
   headless 截图里会整层不绘制，页面看着像没变暗 */
.sp-zoom-bd {
  position: absolute; inset: 0; cursor: zoom-out;
  /* 必须是不透明底色：半透明（rgba 或 opacity<1）的全屏层在无头截图里整层不绘制，
     看回放像遮罩没生效。不透明黑底对看图的观感也更接近专业查看器。 */
  background: #0b1016;
}
.sp-zoom-img {
  position: relative; z-index: 1; max-width: 88vw; max-height: 84vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); background: #fff;
}
.sp-zoom-bar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; color: #e5e7eb; font-size: 14px; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
}
.sp-zoom-bar .grow { flex: 1 1 auto; }
.sp-zoom-i { font-variant-numeric: tabular-nums; }
.sp-zoom-s { color: #9ca3af; font-variant-numeric: tabular-nums; }
.sp-zoom-a { color: #e5e7eb; text-decoration: none; font-size: 13px; }
.sp-zoom-a:hover { text-decoration: underline; }
.sp-zoom-b {
  border: 0; background: rgba(255,255,255,.14); color: #fff; width: 26px; height: 26px;
  border-radius: 5px; font-size: 18.5px; line-height: 1; cursor: pointer;
}
.sp-zoom-b:hover { background: rgba(255,255,255,.26); }
.sp-zoom-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 64px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1;
}
.sp-zoom-nav:hover { background: rgba(255,255,255,.24); }
.sp-zoom-nav.l { left: 18px; }
.sp-zoom-nav.r { right: 18px; }

/* ---------------- 批量处理弹窗的添加块 ---------------- */
.spi-add {
  width: 148px; height: 148px; border-radius: 8px; border: 1px dashed #d8dee5; background: #fcfdfd;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #b0b7c0; cursor: pointer; font-family: inherit;
}
.spi-add:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.spi-add b { font-size: 23px; font-weight: 400; line-height: 1; }
.spi-add span { font-size: 13px; }
.spi-add em { font-style: normal; font-size: 11.5px; color: #c6ccd3; }
.spi-add:hover em { color: var(--brand-text); opacity: .7; }

/* ---------------- 一键翻译下拉 ---------------- */
.spm-trmenu-wrap { position: relative; display: inline-flex; }
.spm-caret { font-style: normal; font-size: 11px; margin-left: 4px; opacity: .6; }
.spm-trmenu {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 60; width: 204px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 5px; display: flex; flex-direction: column;
}
.spm-trmenu[hidden] { display: none; }
.spm-trmenu-t { font-size: 12px; color: #a8b0b9; padding: 4px 8px 3px; }
.spm-trmenu-i {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  border: 0; background: none; font-family: inherit; font-size: 14.5px; color: #374151;
  padding: 6px 9px; border-radius: 6px; cursor: pointer;
}
.spm-trmenu-i span { flex: 1 1 auto; }
.spm-trmenu-i i { font-style: normal; font-size: 11.5px; color: var(--brand-text); background: var(--brand-soft); border-radius: 3px; padding: 0 4px; }
.spm-trmenu-i:hover { background: var(--hover); }
.spm-trmenu-i.on { color: var(--brand-text); font-weight: 600; }
.spm-trmenu-div { height: 1px; background: #f0f2f5; margin: 5px 4px; }
.spm-trmenu-ck {
  display: flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 6px;
  font-size: 14px; color: #4b5563; cursor: pointer;
}
.spm-trmenu-ck:hover { background: var(--hover); }
.spm-trmenu-ck input { accent-color: var(--brand); width: 13px; height: 13px; }
.spm-trmenu-hint { font-size: 12px; color: #b0b7c0; line-height: 1.6; padding: 3px 9px 6px; }

/* ---------------- 翻译对照列表 ---------------- */
.sp-tr-list {
  border: 1px solid var(--border); border-radius: 6px; max-height: 220px; overflow-y: auto;
}
.sp-tr-li {
  display: flex; align-items: baseline; gap: 10px; padding: 5px 9px;
  border-bottom: 1px solid #f5f7f9; font-size: 13px; line-height: 1.6;
}
.sp-tr-li:last-child { border-bottom: 0; }
.sp-tr-li s { flex: 0 0 44%; color: #9aa3af; text-decoration-color: #d8dee5; word-break: break-all; }
.sp-tr-li b { flex: 1 1 auto; color: #1f2937; font-weight: 500; word-break: break-all; }

/* =========================================================
 * 翻译弹窗（上一轮重写编辑器样式时这组被连带删掉，弹窗只剩默认样式：
 * 原文/译文没有底色区分、textarea 只有两行高。补回来。
 * ========================================================= */
.af-panel.sp-tr { width: 780px; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column; }
.af-panel.sp-tr .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sp-tr-sec { margin-bottom: 16px; }
.sp-tr-sec:last-child { margin-bottom: 8px; }
.sp-tr-k {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  font-size: 13px; color: #6b7280; font-weight: 500; margin-bottom: 6px;
}
.sp-tr-k i { font-style: normal; font-weight: 400; font-size: 12px; color: #a8b0b9; }
/* 原文压灰，译文抬高 —— 一眼能分出哪份是要提交的 */
.sp-tr-src {
  font-size: 14px; color: #6b7280; line-height: 1.75; padding: 8px 11px;
  background: #f8fafb; border: 1px solid #eef1f4; border-radius: 6px; word-break: break-word;
}
.sp-tr-dst {
  font-size: 15px; color: #1f2937; line-height: 1.75; padding: 9px 11px; margin-top: 6px;
  background: var(--brand-soft); border: 1px solid var(--brand-soft-strong);
  border-radius: 6px; word-break: break-word;
}
.sp-tr-ta {
  width: 100%; height: 168px; min-height: 120px; max-height: 320px; resize: vertical;
  padding: 9px 11px; line-height: 1.8; font-size: 14.5px;
}

/* 批量弹窗：每组「单选项 + 输入框」必须同一行（column 布局会把它们拆成两行） */
.sp-bl-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; }
.sp-bl-line > .sp-bl-r { flex: none; }
.sp-bl-line > .sp-bl-in { margin-left: 0; }
.sp-bl-wh .sp-bl-whr .mono { font-family: ui-monospace, Menlo, monospace; }

/* =========================================================
 * 批量弹窗：修改范围（横排）+ 指定规格勾选树 + 生成预览
 * ========================================================= */
/* 横着排：竖排三行会把「全部 / 已勾选 / 指定」拉成三个屏，选哪个看不全 */
.sp-bl-scopes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.sp-bl-scopes .sp-bl-r { flex: none; }
.sp-bl-scopes .sp-bl-n { margin-left: 4px; }

/* 指定规格：两个规格组各自一块，组内值两列以上铺开，超出滚 */
.sp-bl-pick[hidden] { display: none; }
.sp-bl-pick {
  margin-top: 8px; border: 1px solid var(--border); border-radius: 8px;
  background: #fbfcfd; padding: 10px 12px 12px;
}
.sp-bl-pickh {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: #9aa3af; line-height: 1.6; margin-bottom: 8px;
}
.sp-bl-pickh > span { flex: 1 1 auto; min-width: 0; }
.sp-bl-pickh b { font-size: 14px; color: var(--brand-text); font-weight: 600; white-space: nowrap; }
.sp-bl-pickh b.warn { color: #d97706; }
.sp-bl-pickb { display: flex; flex-direction: column; gap: 10px; }
.sp-bl-g { border-top: 1px dashed #e9edf1; padding-top: 9px; }
.sp-bl-g:first-child { border-top: 0; padding-top: 0; }
.sp-bl-gh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.sp-bl-gh b { font-size: 14px; color: #374151; font-weight: 600; }
.sp-bl-gh i { font-style: normal; font-size: 12px; color: #b0b7c0; }
.sp-bl-gh .sp-bl-r { font-size: 13px; }
.sp-bl-gq { width: 132px !important; height: 26px !important; font-size: 13px !important; }
.sp-bl-gv { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 2px 12px; }
/* 超过 12 个值先折叠：20 个值全铺开会有 7 行，第二个规格组直接被挤到看不见 */
.sp-bl-gv .sp-bl-pv[data-more] { display: none; }
.sp-bl-g[data-open="1"] .sp-bl-gv .sp-bl-pv[data-more] { display: flex; }
.sp-bl-more {
  margin-top: 5px; border: 1px dashed #d8dee5; border-radius: 6px; background: #fff;
  color: var(--brand-text); font-family: inherit; font-size: 12.5px; padding: 4px 9px; cursor: pointer;
}
.sp-bl-more:hover { border-color: var(--brand); background: var(--brand-soft); }
/* 注意：class 不能叫 sp-bl-v —— 那是 .sp-bl-row 里「值区」容器的名字，
 * 撞名的结果是值区被压成 column + center，输入框缩成一个小胶囊。 */
.sp-bl-pv {
  display: flex; flex-direction: row; align-items: center; gap: 6px; min-width: 0;
  font-size: 13px; color: #4b5563; padding: 3px 2px; border-radius: 4px; cursor: pointer;
}
.sp-bl-pv:hover { background: #f1f5f8; }
.sp-bl-pv[hidden] { display: none; }
.sp-bl-pv input { accent-color: var(--brand); flex: none; width: 13px; height: 13px; cursor: pointer; }
.sp-bl-pv span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5;
}

/* 预览表：列跟着规格组走（规格1 / 规格2 / 平台SKU），和妙手一样。
 * fixed + 均分：auto 布局下平台SKU 那一列按内容撑宽，长 SKU 直接顶出可视区被裁掉。 */
.sp-bl-tbl { table-layout: fixed; }
.sp-bl-tbl th, .sp-bl-tbl td { overflow: hidden; }
.sp-bl-tbl th { white-space: nowrap; text-overflow: ellipsis; }
.sp-bl-tbl td { vertical-align: middle; }
.sp-bl-tbl td.mono { color: #1f2937; }
.sp-bl-cut {
  font-style: normal; font-size: 11px; font-weight: 600; color: #a15c00; background: #fff7e6;
  border-radius: 3px; padding: 0 3px; margin-left: 5px; vertical-align: 1px;
}
.sp-bl-flush { margin-left: 0; }
.sp-bl-cutk { width: 190px !important; height: 30px !important; font-size: 14px !important; }

/* 批量弹窗加宽：多了「指定规格」和预览表，720 挤成两行 */
.af-panel.sp-bulk { width: 860px; }
.af-dlg#sp-bl-sku .af-panel.sp-bulk { width: 900px; }

/* 预览钉在弹窗底部：勾「指定规格」时列表能撑到一屏多，滚下去看不到结果＝没有预览 */
/* 注意别给这行留「负的下外边距」：sticky 会按 margin box 对齐，
 * 负值直接把这一行往上顶 16px，压住上面的「修改范围」。
 * 改成把 .af-bd 的下内边距归零，让内边距由这一行自己带。 */
.af-dlg#sp-bl-sku .af-bd { padding-bottom: 0; }
.af-dlg#sp-bl-sku .sp-bl-row:last-child {
  position: sticky; bottom: 0; z-index: 2;
  margin: 0 -18px; padding: 10px 18px 16px;
  background: var(--panel); border-top: 1px solid var(--border); border-bottom: 0;
  box-shadow: 0 -8px 14px -10px rgba(15, 23, 42, .22);
}
.af-dlg#sp-bl-sku .sp-bl-prev { max-height: 198px; }

/* 库存 / 重量弹窗：左边标签定宽，右边输入框才会竖着对齐（不定宽就是一道锯齿） */
.af-dlg#sp-bl-stock .sp-bl-line > .sp-bl-r,
.af-dlg#sp-bl-weight .sp-bl-line > .sp-bl-r { flex: 0 0 128px; white-space: nowrap; }
.af-dlg#sp-bl-stock .sp-bl-line > .sp-bl-in,
.af-dlg#sp-bl-weight .sp-bl-line > .sp-bl-in { margin-left: 0; }
.sp-bl-prevc {
  font-size: 12px; color: #a8b0b9; padding: 6px 9px 5px;
  border-bottom: 1px solid #f5f7f9; background: #fcfdfd;
}
.sp-bl-prevc b { color: var(--brand-text); }

/* =========================================================
 * 产品视频上传（2026-11-14）
 * 之前这块只有一句「本版没接」——现在走 /product/202309/files/upload 真传
 * ========================================================= */
.spm-vdrop {
  border: 1.5px dashed #d8dee5; border-radius: 10px; background: #fbfcfd;
  padding: 26px 18px; text-align: center; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.spm-vdrop:hover, .spm-vdrop.over { border-color: var(--brand); background: var(--brand-soft); }
.spm-vdrop b { display: block; font-size: 15px; color: #374151; font-weight: 600; margin-bottom: 6px; }
.spm-vdrop p { margin: 0; font-size: 13px; color: #8d95a1; line-height: 1.75; }
.spm-vbar {
  margin-top: 10px; height: 6px; border-radius: 3px; background: #eef1f4;
  max-width: 720px; overflow: hidden;
}
.spm-vbar[hidden] { display: none; }
.spm-vbar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.spm-vmsg { margin-top: 8px; font-size: 13px; color: #6b7280; min-height: 16px; }
.spm-vmsg.err { color: #d92d20; }
.spm-video + .spm-vbar { margin-top: 8px; }

/* ---------------- 批量弹窗：规格代称 ---------------- */
.sp-bl-alh {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: #8d95a1; line-height: 1.7;
}
.sp-bl-alh > span { flex: 1 1 auto; min-width: 0; }
.sp-bl-alh b { color: #4b5563; font-weight: 600; }
.sp-bl-alclr {
  border: 1px solid var(--border); background: #fff; border-radius: 6px;
  font-family: inherit; font-size: 12.5px; color: #6b7280; padding: 3px 9px; cursor: pointer; flex: none;
}
.sp-bl-alclr:hover { border-color: #f0b4ae; color: #d92d20; }
.sp-bl-almsg { font-style: normal; font-size: 12px; color: var(--brand-text); flex: none; }
.sp-bl-alq { display: flex; align-items: center; gap: 10px; }
.sp-bl-alq .af-input { width: 200px; height: 28px; font-size: 13px; }
.sp-bl-alq > span { font-size: 12px; color: #b0b7c0; }
.sp-bl-allist {
  border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd;
  max-height: 190px; overflow-y: auto; padding: 4px 6px;
  display: flex; flex-direction: column; gap: 1px;
}
.sp-bl-al {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 148px;
  align-items: center; gap: 8px; padding: 3px 4px; border-radius: 5px;
}
.sp-bl-al:hover { background: #f2f6f8; }
.sp-bl-al[hidden] { display: none; }
.sp-bl-alg {
  font-style: normal; font-size: 11.5px; color: #8d95a1; background: #eef1f4;
  border-radius: 3px; padding: 1px 5px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-bl-aln {
  font-size: 13px; color: #4b5563; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-bl-ali { height: 26px !important; font-size: 13px !important; }
.spm-vnone {
  border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd;
  padding: 12px 14px; font-size: 13px; color: #8d95a1; line-height: 1.8; max-width: 720px;
}

/* =========================================================
 * 自绘确认框（替代原生 confirm）
 * 原生弹窗是「IP 地址 显示」+ 系统字体，和整套界面不是一个东西
 * ========================================================= */
/* 选择器要压过 .af-dlg .af-panel（它把 panel 设成了 flex column + 760px 宽） */
.af-dlg .af-panel.ui-cf-panel {
  position: relative; width: 472px; max-width: calc(100vw - 32px); max-height: none;
  background: var(--panel); border-radius: 14px; overflow: visible;
  padding: 22px 24px 18px 22px;
  box-shadow: 0 26px 60px -18px rgba(15, 23, 42, .35), 0 2px 8px rgba(15, 23, 42, .06);
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 14px;
  animation: uicf-in .14s var(--ease);
}
@keyframes uicf-in { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }
.ui-cf-ico {
  grid-column: 1; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-text);
}
.ui-cf-ico svg { width: 21px; height: 21px; }
.ui-cf-ico.danger { background: var(--red-soft); color: var(--red); }
.ui-cf-bd { grid-column: 2; min-width: 0; padding-top: 1px; }
.ui-cf-t { font-size: 17px; font-weight: 650; color: var(--text); line-height: 1.5; }
.ui-cf-d {
  margin-top: 7px; font-size: 15px; color: #4b5563; line-height: 1.78;
  word-break: break-word;
}
.ui-cf-d b { color: #1f2937; font-weight: 600; }
/* 单行省略：商品名动辄 100+ 字，两行 clamp 会把第三行切一半，像渲染坏了 */
.ui-cf-target {
  background: var(--bg-subtle); border-radius: 8px; padding: 8px 10px; margin-bottom: 9px;
  font-size: 14.5px; color: #374151; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-cf-d .mono { font-size: 14px; }
.ui-cf-note {
  margin-top: 10px; padding: 7px 10px; border-radius: 7px;
  background: var(--bg-subtle); border-left: 2px solid var(--border-strong);
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
.ui-cf-ft {
  grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center;
  gap: 8px; margin-top: 20px;
}
.ui-cf-ft .btn { min-width: 84px; height: 34px; padding: 0 16px; font-size: 15px; border-radius: 8px; }
.ui-cf-ft .btn:focus-visible { outline: 2px solid var(--brand-ring, rgba(20, 184, 166, .35)); outline-offset: 2px; }
.btn.danger { background: var(--red); box-shadow: 0 2px 10px rgba(185, 28, 28, .22); }
.btn.danger:hover { background: #a02020; }
.btn.ghost.danger { background: var(--panel); color: var(--red); border: 1px solid rgba(185, 28, 28, .3); box-shadow: none; }
.btn.ghost.danger:hover { background: var(--red-soft); }

/* =========================================================
 * 采集箱 / 发布记录 / 仓库管理（2026-11-14）
 *
 * 三页共用一套「左栏 + 页签 + 工具栏 + 大表」的骨架：
 *   左栏 202px（公共箱只有一项 / 店铺箱按店铺列）
 *   表格用 table-layout:fixed + colgroup，宽度全靠 col 声明，
 *   不用 fr —— 这套项目里 fr 在表格上翻过车（min 顶住不分余量）
 * ========================================================= */
.cl-wrap { display: grid; grid-template-columns: 202px minmax(0, 1fr); gap: 16px; align-items: start; }
.cl-side {
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  padding: 10px; position: sticky; top: 12px;
}
.cl-side-h { font-size: 12.5px; color: var(--muted); padding: 2px 6px 8px; }
.cl-box {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 8px;
  padding: 8px 8px; font-family: inherit; cursor: pointer; margin-bottom: 2px;
}
.cl-box:hover { background: var(--hover); }
.cl-box.on { background: var(--brand-soft); border-color: var(--brand-soft-strong); }
.cl-box .rg {
  flex: none; font-size: 11.5px; font-weight: 600; color: #6b7280;
  background: #eef1f4; border-radius: 3px; padding: 1px 4px; letter-spacing: .3px;
}
.cl-box.on .rg { background: #fff; color: var(--brand-text); }
.cl-box .n {
  flex: 1 1 auto; min-width: 0; font-size: 14.5px; color: #374151;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cl-box.on .n { color: var(--brand-text); font-weight: 600; }
.cl-box em { flex: none; font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-side-tip { font-size: 12px; color: #a8b0b9; line-height: 1.75; padding: 8px 6px 2px; }

.cl-main { min-width: 0; }
.cl-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.cl-tab {
  position: relative; border: none; background: none; font-family: inherit; cursor: pointer;
  font-size: 15px; color: #6b7280; padding: 8px 12px 10px; border-radius: 6px 6px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.cl-tab:hover { color: var(--text); background: var(--hover); }
.cl-tab.on { color: var(--brand-text); font-weight: 600; }
.cl-tab.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px;
}
.cl-tab em {
  font-style: normal; font-size: 12px; color: #9aa3af; background: var(--bg-subtle);
  border-radius: 8px; padding: 0 5px; line-height: 15px; font-variant-numeric: tabular-nums;
}
.cl-tab.on em { background: var(--brand-soft); color: var(--brand-text); }

.cl-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cl-bar .grow { flex: 1 1 auto; }
.cl-q { width: 236px; height: 32px; font-size: 14.5px; }
.cl-sel { height: 32px; font-size: 14.5px; min-width: 132px; }
.cl-selinfo { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-src { font-size: 13px; color: #a8b0b9; }

.cl-table {
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  overflow: hidden;
}
.cl-tbl { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cl-tbl th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: #fbfcfd; padding: 8px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.cl-tbl th.num, .cl-tbl td.num { text-align: right; }
.cl-tbl td {
  padding: 8px 10px; border-bottom: 1px solid #f3f5f7;
  font-size: 14.5px; color: #374151; vertical-align: middle;
}
.cl-tbl tbody tr:last-child td { border-bottom: 0; }
.cl-tbl tbody tr:hover td { background: #fbfdfd; }
.cl-tbl tr.on td { background: var(--brand-soft-weak, #f2fbf9); }
.cl-tbl td.num b { font-variant-numeric: tabular-nums; }

.cl-prod { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cl-prod img, .cl-prod .ph {
  width: 40px; height: 40px; border-radius: 6px; flex: none; display: block;
  object-fit: cover; background: #eef1f3;
}
.cl-prod img.bad { opacity: .35; }
.cl-prod .ph { display: flex; align-items: center; justify-content: center; color: #b0b7c0; font-size: 15px; }
.cl-pinfo { min-width: 0; flex: 1 1 auto; }
.cl-name {
  font-size: 14.5px; color: #1f2937; line-height: 1.5; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.cl-name:hover { color: var(--brand-text); }
.cl-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.cl-meta .mono { font-size: 12px; color: #a8b0b9; }
.cl-src-chip {
  font-size: 11.5px; color: #7c8695; background: var(--bg-subtle);
  border-radius: 3px; padding: 1px 5px; white-space: nowrap;
}
.cl-cat { font-size: 13px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-sub { font-size: 12px; color: #a8b0b9; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cl-by { font-size: 13px; color: #6b7280; }
.cl-badge {
  display: inline-block; font-size: 12.5px; line-height: 18px; padding: 0 7px;
  border-radius: 4px; background: var(--bg-subtle); color: #6b7280; white-space: nowrap;
}
.cl-badge.gray { background: #f2f4f6; color: #6b7280; }
.cl-badge.blue { background: #eef4ff; color: #1d4ed8; }
.cl-badge.amber { background: #fff7e6; color: #a15c00; }
.cl-badge.green { background: #eafaf3; color: #067647; }
.cl-badge.red { background: var(--red-soft); color: var(--red); }
.cl-fail {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  font-size: 11.5px; font-style: normal; font-weight: 700; margin-left: 5px; cursor: help;
}
.cl-th-act, .cl-td-act { position: sticky; right: 0; background: inherit; }
.cl-tbl th.cl-th-act { background: #fbfcfd; }
.cl-tbl td.cl-td-act { background: var(--panel); box-shadow: -6px 0 8px -8px rgba(15, 23, 42, .2); padding-right: 16px; }
/* 操作列：小胶囊按钮。原来是一排蓝色下划线文字，两行挤在一起像表格没做完 */
.cl-ops { display: flex; gap: 6px; align-items: center; }
.cl-ops button {
  border: 1px solid var(--border); background: #fff; padding: 3px 9px; border-radius: 6px;
  font-family: inherit; font-size: 13px; line-height: 17px;
  color: #566070; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.cl-ops button:hover { border-color: var(--brand-soft-strong); color: var(--brand-text); background: #f7fbfa; }
.cl-ops button.op-main {
  color: var(--brand-text); border-color: var(--brand-soft-strong);
  background: var(--brand-soft); font-weight: 500;
}
.cl-ops button.op-main:hover { background: #e6f4ef; }
.cl-ops button.danger { color: var(--red); border-color: #f1d9d9; }
.cl-ops button.danger:hover { background: #fdf4f4; border-color: #e6bcbc; color: var(--red); }
.cl-ops button[disabled] { color: #c3c9d1; border-color: #edf0f3; background: #fafbfc; cursor: not-allowed; }

.cl-empty { padding: 46px 20px 50px; text-align: center; }
.cl-empty b { display: block; font-size: 15.5px; color: #4b5563; font-weight: 600; margin-bottom: 7px; }
.cl-empty p { margin: 0 auto; max-width: 460px; font-size: 14px; color: #9aa3af; line-height: 1.85; }

/* 认领弹窗 */
.af-dlg .af-panel.cl-dlg { width: 468px; }
.cl-shoplist { display: flex; flex-direction: column; gap: 6px; }
.cl-shopck {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.cl-shopck:hover { border-color: var(--brand-soft-strong); background: #fbfdfd; }
.cl-shopck input { accent-color: var(--brand); width: 14px; height: 14px; flex: none; }
.cl-shopck .rg {
  font-size: 11.5px; font-weight: 600; color: #6b7280; background: #eef1f4;
  border-radius: 3px; padding: 1px 4px; flex: none;
}
.cl-shopck .n { flex: 1 1 auto; font-size: 14.5px; color: #374151; min-width: 0; }
.cl-shopck em { font-style: normal; font-size: 12px; color: #a8b0b9; }
.cl-ft-btns { display: flex; gap: 8px; }

/* 快照详情 */
.af-dlg .af-panel.cl-dtl { width: 780px; max-width: calc(100vw - 40px); }
.cl-dtl .af-bd { max-height: 74vh; }
.cl-dtl-top { display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 18px; }
.cl-dtl-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cl-dtl-imgs img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; background: #eef1f3; display: block;
}
.cl-dtl-imgs img.bad { opacity: .3; }
.cl-dtl-noimg {
  grid-column: 1 / -1; padding: 26px 0; text-align: center;
  font-size: 13px; color: #a8b0b9; background: var(--bg-subtle); border-radius: 8px;
}
.cl-dtl-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.55; }
.cl-dtl-kv { display: flex; gap: 10px; margin-top: 7px; font-size: 14px; }
.cl-dtl-kv i { flex: 0 0 56px; font-style: normal; color: var(--muted); }
.cl-dtl-kv span { flex: 1 1 auto; min-width: 0; color: #374151; word-break: break-word; }
.cl-dtl-fail {
  margin-top: 10px; padding: 8px 10px; border-radius: 7px;
  background: var(--red-soft); color: #8a1c1c; font-size: 13px; line-height: 1.7;
}
.cl-dtl-sub { margin: 16px 0 8px; font-size: 13px; color: var(--muted); }
.cl-dtl-sku {
  border: 1px solid var(--border); border-radius: 9px; overflow: auto; max-height: 260px;
}
.cl-dtl-sku table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cl-dtl-sku th {
  position: sticky; top: 0; background: #fbfcfd; text-align: left; font-weight: 600;
  color: var(--muted); font-size: 12.5px; padding: 7px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.cl-dtl-sku th.num, .cl-dtl-sku td.num { text-align: right; }
.cl-dtl-sku td { padding: 6px 10px; border-bottom: 1px solid #f3f5f7; color: #4b5563; }
.cl-dtl-sku tr:last-child td { border-bottom: 0; }

/* 发布记录 */
.pl-tbl .cl-reason {
  font-size: 13px; color: #8a1c1c; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cl-shopn { font-size: 14px; color: #374151; }

/* =========================================================
 * 复制产品弹窗
 * ========================================================= */
.af-dlg .af-panel.cp-panel { width: 760px; max-width: calc(100vw - 40px); }
.cp-bd { padding: 16px 20px 18px; max-height: 76vh; }
.cp-prod {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-subtle); border-radius: 9px; margin-bottom: 16px;
}
.cp-prod img, .cp-prod .ph {
  width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #e9edf1; flex: none;
}
.cp-prod-t {
  font-size: 14.5px; color: #1f2937; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cp-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; margin-bottom: 15px; }
.cp-k { font-size: 14px; color: var(--muted); padding-top: 9px; }
.cp-v { min-width: 0; }
.cp-ways { display: flex; gap: 10px; }
.cp-way {
  flex: 1 1 0; min-width: 0; display: grid; gap: 2px; padding: 9px 12px 10px 34px;
  border: 1px solid var(--border); border-radius: 9px; cursor: pointer; position: relative;
}
.cp-way input { position: absolute; left: 12px; top: 12px; accent-color: var(--brand); width: 14px; height: 14px; }
.cp-way b { font-size: 14.5px; color: #374151; font-weight: 600; }
.cp-way i { font-style: normal; font-size: 12px; color: #a8b0b9; line-height: 1.5; }
.cp-way.on { border-color: var(--brand); background: var(--brand-soft); }
.cp-way.on b { color: var(--brand-text); }

.cp-pick { display: grid; grid-template-columns: 128px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.cp-regions { background: #fbfcfd; border-right: 1px solid var(--border); padding: 6px; display: flex; flex-direction: column; gap: 1px; max-height: 250px; overflow-y: auto; }
.cp-regions button {
  display: flex; align-items: center; gap: 6px; border: none; background: none; font-family: inherit;
  font-size: 14px; color: #4b5563; text-align: left; padding: 7px 8px; border-radius: 6px; cursor: pointer;
}
.cp-regions button:hover { background: var(--hover); }
.cp-regions button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.cp-regions em { margin-left: auto; font-style: normal; font-size: 12px; color: #a8b0b9; }
.cp-shops { min-width: 0; display: flex; flex-direction: column; }
.cp-shops-h {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-bottom: 1px solid #f1f4f7; flex-wrap: wrap;
}
.cp-shops-h .grow { flex: 1 1 auto; }
.cp-pub, .cp-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; cursor: pointer; white-space: nowrap; }
.cp-pub input, .cp-all input { accent-color: var(--brand); width: 13px; height: 13px; }
.cp-q { width: 138px !important; height: 26px !important; font-size: 13px !important; }
.cp-shoplist { padding: 6px; max-height: 206px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.cp-shop {
  display: flex; align-items: center; gap: 6px; padding: 6px 7px; border-radius: 6px;
  font-size: 14px; color: #4b5563; cursor: pointer; min-width: 0;
}
.cp-shop:hover { background: var(--hover); }
.cp-shop[hidden] { display: none; }
.cp-shop input { accent-color: var(--brand); width: 13px; height: 13px; flex: none; }
.cp-shop .rg { font-size: 11.5px; color: #8d95a1; background: #eef1f4; border-radius: 3px; padding: 1px 4px; flex: none; }
.cp-shop .n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-shop em { font-style: normal; font-size: 11.5px; color: #b0b7c0; }
.cp-empty { grid-column: 1 / -1; padding: 20px; text-align: center; font-size: 13px; color: #a8b0b9; }
.cp-num { display: flex; align-items: center; gap: 0; }
.cp-num button {
  width: 30px; height: 32px; border: 1px solid var(--border-strong); background: var(--panel);
  color: #6b7280; font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit;
}
.cp-num button:first-child { border-radius: 7px 0 0 7px; }
.cp-num button:last-of-type { border-radius: 0 7px 7px 0; }
.cp-num button:hover { background: var(--hover); color: var(--text); }
.cp-num input {
  width: 58px; height: 32px; margin-left: -1px; border-radius: 0; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cp-hint { margin-left: 10px; font-size: 12px; color: #a8b0b9; line-height: 1.6; }
.cp-note {
  margin-top: 4px; padding: 9px 12px; border-radius: 8px;
  background: var(--bg-subtle); font-size: 13px; color: #6b7280; line-height: 1.7;
}
.cp-note b { color: var(--brand-text); }

/* =========================================================
 * 仓库管理
 * ========================================================= */
.wm-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.wm-k {
  border: 1px solid var(--border); border-radius: 11px; background: var(--panel);
  padding: 11px 13px 12px; display: grid; gap: 1px;
}
.wm-k i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.wm-k b { font-size: 23px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.wm-k span { font-size: 12px; color: #a8b0b9; }
.wm-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.wm-card {
  text-align: left; font-family: inherit; cursor: pointer;
  border: 1px solid var(--border); border-radius: 11px; background: var(--panel);
  padding: 11px 12px 10px; display: grid; gap: 8px;
}
.wm-card:hover { border-color: var(--brand-soft-strong); }
.wm-card.on { border-color: var(--brand); background: var(--brand-soft); }
.wm-card-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wm-card-h .rg {
  font-size: 11.5px; font-weight: 600; color: #6b7280; background: #eef1f4;
  border-radius: 3px; padding: 1px 4px; flex: none;
}
.wm-card.on .wm-card-h .rg { background: #fff; color: var(--brand-text); }
.wm-card-h b { font-size: 15px; color: #1f2937; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-card-h em { margin-left: auto; font-style: normal; font-size: 11.5px; color: #a8b0b9; flex: none; }
.wm-card-m { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.wm-card-m span { display: grid; gap: 1px; font-size: 15px; color: #374151; font-variant-numeric: tabular-nums; font-weight: 600; }
.wm-card-m i { font-style: normal; font-size: 11.5px; color: #a8b0b9; font-weight: 400; }
.wm-card-f { font-size: 12px; color: #9aa3af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-addr {
  font-size: 13px; color: #6b7280; background: var(--bg-subtle); border-radius: 8px;
  padding: 8px 11px; margin-bottom: 10px; line-height: 1.6;
}
.wm-addr b { color: #374151; }
.wm-tbl .wm-code { font-size: 13px; color: #4b5563; }
.wm-tbl .wm-name { font-size: 14px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1400px) {
  .wm-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wm-none { font-size: 13px; color: #c3c9d1; cursor: help; }

/* 批量按钮的禁用态要一眼看出来（只调透明度在白底上还是像能点） */
.cl-bar .btn:disabled { background: #e7ebef; color: #9aa3af; box-shadow: none; opacity: 1; }

/* 编辑弹窗骨架（详情还没回来时先出结构，不要只给一行字） */
.spm-skel { padding: 22px 24px; display: grid; gap: 18px; }
.spm-skel-l { display: grid; gap: 10px; }
.spm-skel-g { display: grid; grid-template-columns: repeat(3, 132px); gap: 10px; }
.sk {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #eef1f4 25%, #f6f8fa 37%, #eef1f4 63%);
  background-size: 400% 100%; animation: sk-shine 1.2s ease-in-out infinite;
}
.sk.w40 { width: 40%; } .sk.w45 { width: 45%; } .sk.w55 { width: 55%; }
.sk.w60 { width: 60%; } .sk.w70 { width: 70%; } .sk.w80 { width: 80%; }
.sk.sk-img { height: 132px; border-radius: 10px; }
@keyframes sk-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.cl-src { margin-right: 4px; }

/* =========================================================
 * 采集箱 2.0（2026-11-14 夜）：筛选面板 / 工具栏 / 菜单 / 大表
 * ========================================================= */
.cl-filters {
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  padding: 10px 14px 0; margin-bottom: 10px;
}
.cl-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.cl-f { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 0; }
.cl-fl { font-size: 14px; color: var(--muted); white-space: nowrap; }
.cl-f .af-input { height: 30px; font-size: 14.5px; }
.cl-fv { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cl-fv > .af-input { flex: 1 1 auto; min-width: 0; }
.cl-fv > i { font-style: normal; color: #b6bec8; flex: none; }
.cl-fmini { flex: 0 0 92px !important; min-width: 0; }
.cl-frange .af-input { flex: 1 1 0; min-width: 0; }
.cl-frange em { font-style: normal; font-size: 12.5px; color: #a8b0b9; flex: none; }
.cl-fbar { display: flex; align-items: center; gap: 8px; padding: 9px 0 10px; margin-top: 2px; border-top: 1px dashed #eef1f4; }
.cl-fbar .btn { height: 30px; padding: 0 16px; font-size: 14.5px; }
.cl-fold { border: 0; background: none; font-family: inherit; font-size: 14px; color: var(--brand-text); cursor: pointer; padding: 4px 6px; }
.cl-filters.collapsed .cl-f:nth-child(n+5) { display: none; }

/* 工具栏 */
.cl-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cl-tgg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-btn {
  border: 1px solid var(--border-strong); background: var(--panel); border-radius: 7px;
  height: 30px; padding: 0 12px; font-family: inherit; font-size: 14.5px; color: #374151;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.cl-btn:hover { border-color: var(--brand); color: var(--brand-text); }
.cl-btn i { font-style: normal; font-size: 11px; color: #9aa3af; }
.cl-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.cl-btn.on:hover { background: var(--brand-hover); color: #fff; }
.cl-link { border: 0; background: none; font-family: inherit; font-size: 14px; color: var(--brand-text); cursor: pointer; }
.cl-tcount { font-size: 13px; color: #a8b0b9; font-variant-numeric: tabular-nums; }

/* 页签 */
.cl-tabs { display: flex; align-items: flex-end; gap: 14px; border-bottom: 1px solid var(--border); margin-bottom: 10px; flex-wrap: wrap; }
.cl-tablist { display: flex; gap: 2px; }
.cl-tabhint { flex: 1 1 auto; text-align: right; font-size: 12px; color: #b0b7c0; padding-bottom: 6px; line-height: 1.5; }

/* 下拉菜单 */
.cl-menu {
  position: fixed; z-index: 130; min-width: 186px; max-width: 320px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .28); padding: 6px; animation: clmenu .12s var(--ease);
}
@keyframes clmenu { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cl-menu-h { font-size: 12px; color: #a8b0b9; padding: 3px 8px 6px; }
.cl-menu-i {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; border-radius: 6px; padding: 7px 9px; font-family: inherit; cursor: pointer;
}
.cl-menu-i:hover { background: var(--brand-soft); }
.cl-menu-i b { font-size: 14.5px; color: #374151; font-weight: 500; }
.cl-menu-i:hover b { color: var(--brand-text); }
.cl-menu-i em { margin-left: auto; font-style: normal; font-size: 12px; color: #b0b7c0; }
.cl-menu-i.danger b { color: var(--red); }

/* 表格外壳（横向滚动 + 操作列吸右） */
.cl-table { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: hidden; }
.cl-scroll { overflow-x: auto; }
.cl-tbl { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cl-tbl thead th { position: sticky; top: 0; z-index: 2; }
.cl-sort { font-style: normal; font-size: 11px; color: var(--brand-text); margin-left: 2px; }
.cl-tbl th[data-sort] { cursor: pointer; user-select: none; }
.cl-tbl th[data-sort]:hover { color: var(--brand-text); }
.cl-group { font-size: 13px; color: #6b7280; }
.cl-time { font-size: 13px; color: #6b7280; font-variant-numeric: tabular-nums; }
.cl-note { font-size: 13px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-dim { color: #c3c9d1; }
.cl-skuone { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.cl-shopv { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; }
.cl-shopv .dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; flex: none; }
.cl-shopv .dot.ok { background: #059669; }
.cl-mini {
  border: 0; background: none; padding: 0 0 0 6px; font-family: inherit;
  font-size: 12.5px; color: var(--brand-text); cursor: pointer;
}
.cl-mini:hover { text-decoration: underline; }
.cl-tbl td .cl-ops + .cl-ops { margin-top: 3px; }
.cl-tbl td.cl-td-act { padding-right: 14px; }

/* 批量弹窗 */
.af-dlg .af-panel.cl-bulk { width: 560px; }
.af-dlg .af-panel.cl-dlg { width: 468px; }
.af-dlg .af-panel.cl-edit { width: 620px; }
.cl-bl { display: flex; flex-direction: column; gap: 10px; }
.cl-bl-line { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.cl-r { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: #374151; white-space: nowrap; flex: 0 0 auto; }
.cl-r input { accent-color: var(--brand); width: 14px; height: 14px; }
.cl-in { display: inline-flex; align-items: center; gap: 6px; }
.cl-in .af-input { width: 120px; height: 30px; font-size: 14.5px; }
.cl-in em { font-style: normal; font-size: 12.5px; color: #9aa3af; }
.cl-bl-line .af-input[data-f="pctway"], .cl-bl-line .af-input[data-f="addway"] { width: 92px; height: 30px; font-size: 14.5px; }

/* 表单（编辑 / 批量） */
.cl-frm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.cl-frm-r { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 8px; }
.cl-frm-r > span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.cl-frm-r > .af-input { height: 32px; font-size: 14.5px; }
.cl-frm-r .cl-fv { gap: 6px; }
.cl-frm-u { font-style: normal; font-size: 12.5px; color: #9aa3af; grid-column: 2; }
.cl-frm-col { grid-column: 1 / -1; align-items: start; }
.cl-frm-col > span { padding-top: 7px; }
.cl-frm-col textarea { resize: vertical; line-height: 1.6; font-size: 14.5px; }
.cl-frm-tip { font-size: 13px; color: #9aa3af; line-height: 1.75; margin-top: 10px; }
.cl-fpre { margin-top: 12px; border: 1px solid var(--border); border-radius: 9px; background: #fbfcfd; padding: 9px 11px; }
.cl-fpre i { display: block; font-style: normal; font-size: 12px; color: #a8b0b9; margin-bottom: 4px; }
.cl-fpre div { font-size: 14.5px; color: #1f2937; line-height: 1.6; word-break: break-word; }
.cl-catpick { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cl-catpick .af-input { flex: 1 1 auto; min-width: 0; height: 32px; font-size: 14.5px; }
.cl-gchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.cl-chip {
  border: 1px solid var(--border-strong); background: #fff; border-radius: 999px;
  font-family: inherit; font-size: 13px; color: #4b5563; padding: 3px 10px; cursor: pointer;
}
.cl-chip:hover { border-color: var(--brand); color: var(--brand-text); }

/* 编辑弹窗顶部 */
.cl-edit-top { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--bg-subtle); border-radius: 9px; margin-bottom: 14px; }
.cl-edit-top img, .cl-edit-top .ph { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: #e6eaee; flex: none; }
.cl-edit-t { font-size: 14.5px; color: #1f2937; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 类目选择 */
.af-dlg .af-panel.cl-cat { width: 640px; }
.cl-cat-list { margin-top: 9px; border: 1px solid var(--border); border-radius: 9px; max-height: 360px; overflow-y: auto; padding: 4px; }
.cl-cat-i {
  display: grid; gap: 2px; width: 100%; text-align: left; border: 0; background: none;
  border-radius: 7px; padding: 6px 9px; font-family: inherit; cursor: pointer;
}
.cl-cat-i:hover { background: var(--hover); }
.cl-cat-i.on { background: var(--brand-soft); }
.cl-cat-i b { font-size: 14.5px; color: #1f2937; font-weight: 500; }
.cl-cat-i.on b { color: var(--brand-text); }
.cl-cat-i i { font-style: normal; font-size: 12px; color: #a8b0b9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 采集箱详情 */
.af-dlg .af-panel.cl-dtl { width: 800px; max-width: calc(100vw - 40px); }
.cl-dtl .af-bd { max-height: 76vh; }

/* =========================================================
 * 发布产品弹窗
 * ========================================================= */
.af-dlg .af-panel.cl-pub { width: 1040px; max-width: calc(100vw - 48px); }
.cl-pub .af-bd { padding: 0; max-height: 78vh; overflow-y: auto; }
.pd-sec { padding: 14px 20px 4px; border-bottom: 1px solid var(--border); }
.pd-sec:last-child { border-bottom: 0; }
.pd-sec-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.pd-sec-h h3 { font-size: 15px; font-weight: 650; color: var(--text); }
.pd-sec-h .pd-hint { font-style: normal; font-size: 12.5px; color: #a8b0b9; }
.pd-tag {
  font-size: 13px; font-weight: 600; color: #fff; background: var(--brand);
  border-radius: 6px; padding: 2px 8px;
}
.pd-mini { height: 26px !important; font-size: 13px !important; width: 104px; }
.pd-search { height: 26px !important; font-size: 13px !important; width: 150px; }
.pd-shops-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pd-ck, .pd-r { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #374151; cursor: pointer; }
.pd-ck input, .pd-r input { accent-color: var(--brand); width: 13px; height: 13px; flex: none; }
.pd-sep { color: #d8dee5; }
.pd-add { font-size: 14px; color: var(--brand-text); cursor: pointer; }
.pd-add:hover { text-decoration: underline; }
.pd-count { margin-left: auto; font-size: 12.5px; color: #a8b0b9; }
.pd-shoplist {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px;
  max-height: 148px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px;
  padding: 6px; background: #fbfcfd;
}
.pd-shop {
  display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 6px;
  font-size: 14px; color: #4b5563; cursor: pointer; min-width: 0;
}
.pd-shop:hover { background: var(--hover); }
.pd-shop[hidden] { display: none; }
.pd-shop input { accent-color: var(--brand); width: 13px; height: 13px; flex: none; }
.pd-shop .rg { font-size: 11.5px; color: #8d95a1; background: #eef1f4; border-radius: 3px; padding: 1px 4px; flex: none; }
.pd-shop .n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-shop em { font-style: normal; font-size: 11.5px; color: #b0b7c0; flex: none; }
.pd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; padding-bottom: 8px; }
.pd-col { min-width: 0; }
.pd-row { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: start; gap: 8px; padding: 4px 0; }
.pd-k { font-size: 14px; color: var(--muted); padding-top: 5px; white-space: nowrap; }
.pd-v { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; font-size: 14px; color: #374151; }
.pd-v > em { font-style: normal; font-size: 12.5px; color: #6b7280; }
.pd-wrap { row-gap: 5px; }
.pd-num { width: 86px; height: 30px !important; font-size: 14.5px !important; }
.pd-num2 { width: 62px; height: 28px !important; font-size: 14px !important; text-align: center; }
.pd-unit { width: 78px; height: 30px !important; font-size: 14px !important; }
.pd-keep { width: 148px; height: 28px !important; font-size: 13px !important; }
.pd-dt { width: 200px; height: 30px !important; font-size: 14px !important; }
.cl-pub .af-input { height: 30px; font-size: 14.5px; }
.pd-tip { font-style: normal; font-size: 12px; color: #a8b0b9; }
.pd-no {
  font-style: normal; font-size: 11.5px; color: #a15c00; background: #fff7e6;
  border-radius: 3px; padding: 0 4px; line-height: 15px;
}
.pd-r.dis { color: #b0b7c0; cursor: not-allowed; }
.pd-ft-tip {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px 14px; flex-wrap: wrap;
  background: #fcfdfd; border-top: 1px solid var(--border);
}
.pd-linkbtn { border: 0; background: none; font-family: inherit; font-size: 13px; color: var(--brand-text); cursor: pointer; padding: 0; }
.pd-linkbtn:hover { text-decoration: underline; }
.pd-risk { font-size: 12px; color: #b45309; line-height: 1.6; flex: 1 1 auto; text-align: right; }
.pd-skiplist { display: grid; gap: 4px; font-size: 14px; color: #4b5563; }

/* =========================================================
 * 仓库管理 2.0
 * ========================================================= */
.wm-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.wm-k {
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
  padding: 8px 12px 9px; display: grid; gap: 0;
}
.wm-k i { font-style: normal; font-size: 12px; color: var(--muted); }
.wm-k b { font-size: 20.5px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.2px; line-height: 1.3; }
.wm-k span { font-size: 11.5px; color: #a8b0b9; }
.wm-seg { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.wm-segi {
  flex: 1 1 0; min-width: 168px; text-align: left; font-family: inherit; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
  padding: 7px 11px; display: grid; gap: 1px;
}
.wm-segi:hover { border-color: var(--brand-soft-strong); }
.wm-segi.on { border-color: var(--brand); background: var(--brand-soft); }
.wm-segi .rg { font-size: 11px; font-weight: 600; color: #6b7280; letter-spacing: .3px; }
.wm-segi.on .rg { color: var(--brand-text); }
.wm-segi b { font-size: 14.5px; color: #1f2937; font-weight: 650; }
.wm-segi em { font-style: normal; font-size: 12px; color: #9aa3af; font-variant-numeric: tabular-nums; }
.wm-meta {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline;
  background: var(--bg-subtle); border-radius: 9px; padding: 7px 12px; margin-bottom: 10px;
  font-size: 13px; color: #4b5563;
}
.wm-meta i { font-style: normal; color: #9aa3af; margin-right: 5px; }
.wm-hint {
  font-size: 13px; color: #6b7280; line-height: 1.8; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 9px; padding: 8px 11px; margin-bottom: 10px;
}
.wm-hint:empty { display: none; }
.wm-hint b { color: #8a5300; }
.wm-ck { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: #4b5563; white-space: nowrap; cursor: pointer; }
.wm-ck input { accent-color: var(--brand); width: 13px; height: 13px; }
.wm-pic { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: #eef1f3; display: block; }
.wm-pic.ph { display: flex; align-items: center; justify-content: center; color: #b0b7c0; font-size: 15px; }
.wm-code { font-size: 13px; color: #374151; word-break: break-all; }
.wm-name { font-size: 14px; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-none { font-size: 13px; color: #b0b7c0; }
.wm-tbl .cl-sub { margin-top: 1px; }

/* 配对弹窗 */
.af-dlg .af-panel.wm-bind { width: 820px; max-width: calc(100vw - 40px); }
.wm-bind-q { display: flex; gap: 8px; margin-bottom: 10px; }
.wm-bind-q .af-input { flex: 1 1 auto; height: 32px; font-size: 14.5px; }
.wm-bind-box { display: flex; gap: 10px; min-height: 300px; }
.wm-bind-l { flex: 1 1 0; min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 5px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.wm-bind-r { flex: 0 0 336px; border: 1px solid var(--border); border-radius: 9px; padding: 5px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.wm-prod {
  display: flex; align-items: center; gap: 8px; text-align: left; width: 100%;
  border: 1px solid transparent; background: none; border-radius: 7px; padding: 5px 6px;
  font-family: inherit; cursor: pointer; min-width: 0;
}
.wm-prod:hover { background: var(--hover); }
.wm-prod.on { background: var(--brand-soft); border-color: var(--brand-soft-strong); }
.wm-prod img, .wm-prod .ph { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; background: #eef1f3; flex: none; }
.wm-prod span { min-width: 0; display: grid; gap: 1px; }
.wm-prod b { font-size: 14px; color: #1f2937; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-prod i { font-style: normal; font-size: 11.5px; color: #a8b0b9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-sku {
  display: grid; gap: 1px; text-align: left; border: 1px solid transparent; background: none;
  border-radius: 6px; padding: 5px 7px; font-family: inherit; cursor: pointer; min-width: 0;
}
.wm-sku:hover { background: var(--hover); }
.wm-sku.on { background: var(--brand-soft); border-color: var(--brand); }
.wm-sku b { font-size: 14px; color: #1f2937; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-sku i { font-style: normal; font-size: 11.5px; color: #a8b0b9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-auto-prev { margin-top: 10px; }
.wm-auto-h { font-size: 13px; color: #4b5563; margin-bottom: 6px; }
.wm-auto-h b { color: var(--brand-text); }
.wm-auto-list { border: 1px solid var(--border); border-radius: 9px; max-height: 200px; overflow-y: auto; padding: 4px; }
.wm-auto-r { display: grid; grid-template-columns: 150px 74px minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 7px; border-radius: 6px; font-size: 13px; }
.wm-auto-r i { font-style: normal; color: #a8b0b9; font-size: 12px; }
.wm-auto-r em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-auto-r.ok { background: #f2fbf7; color: #1f2937; }
.wm-auto-r.ok em { color: #047857; }
.wm-auto-r.no { color: #9aa3af; }
.wm-auto-r.no em { color: #b45309; }
.wm-dl-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wm-dl-h img, .wm-dl-h .wm-pic { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.wm-dl-h b { display: block; font-size: 15px; color: #1f2937; }
.wm-dl-h i { font-style: normal; font-size: 12.5px; color: #a8b0b9; }
.wm-dl-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.wm-dl-g span { display: grid; gap: 1px; font-size: 14px; color: #1f2937; font-variant-numeric: tabular-nums; }
.wm-dl-g i { font-style: normal; font-size: 12px; color: #9aa3af; }

@media (max-width: 1500px) {
  .cl-fgrid { grid-template-columns: 1fr 1fr; }
  .pd-shoplist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wm-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .cl-fgrid { grid-template-columns: 1fr; }
  .pd-cols { grid-template-columns: 1fr; }
  .wm-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 修正：编辑/批量表单里的单位与按钮 */
.cl-frm-r .cl-fv { min-width: 0; }
.cl-frm-r .cl-fv > .af-input { flex: 1 1 auto; min-width: 0; }
.cl-frm-r .cl-frm-u { grid-column: auto; flex: none; font-size: 12.5px; color: #9aa3af; }
.cl-frm-1 { grid-template-columns: 1fr !important; }
.cl-frm-r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.cl-frm-r2 .cl-frm-r { grid-template-columns: 66px minmax(0, 1fr); }
.cl-fv-ck { gap: 7px; }
.cl-fv-ck input { accent-color: var(--brand); width: 14px; height: 14px; flex: none; }
.cl-fv-ck em { font-style: normal; font-size: 13px; color: #6b7280; white-space: nowrap; }
.cl-catpick .btn { flex: none; white-space: nowrap; }
/* 下拉菜单在纯白页面上要能立起来 */
.cl-menu { border-color: rgba(15, 23, 42, .14); box-shadow: 0 14px 34px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .08); }
/* 发布弹窗：尺寸输入与截断下拉更紧凑，避免换行 */
.pd-v .pd-num { width: 72px; }
.pd-v .pd-keep { width: 132px; }
.pd-row .pd-v > em { white-space: nowrap; }
.pd-dt[hidden] { display: none; }
.cl-shopv .cl-shopn {
  font-weight: 400; max-width: 96px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: inline-block; vertical-align: bottom;
}

/* 1440 下产品信息列的 meta 只能占一行：4 个 chip 各自换行会把行高抬到 128px */
.cl-meta { flex-wrap: nowrap; overflow: hidden; }
.cl-meta > .mono { flex: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-meta > .cl-src-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-meta > .cl-fail { flex: none; }
.cl-name { max-height: 3em; }





/* 表格最小宽度按「固定列合计 + 主列 300px」算：
 * 固定列写死后再给 table 一个偏小的 min-width，主列会被压成 2px（只剩一张图）。
 * 这里统一由 CSS 给宽度，媒体查询里再随隐藏列一起收缩。 */
/* 固定列合计 1022 / 1228，主列固定留 300 -> 1322 / 1528。
 * 不按 nth-child 隐藏列：display:none 只藏单元格，<col> 的宽度仍在，
 * 反而是主列（width:auto）被压成一张图的宽度。 */

/* 缩略图：首字母垫底、图片盖在上面；图片 404 就把 img 移除，露出首字母 */
.cl-thumb {
  position: relative; width: 40px; height: 40px; border-radius: 6px; flex: none;
  background: #eef1f3; overflow: hidden; display: block;
}
.cl-thumb > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 17px; font-weight: 600; color: #b6bec8;
}
.cl-thumb > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.cl-frm-r.cl-frm-wide { grid-column: 1 / -1; }
.cl-frm-wide .cl-catpick .af-input { flex: 1 1 auto; }

/* =========================================================
 * 采集箱：发布店铺格（点击切换 / 增加店铺）
 * ========================================================= */
.cl-shopbtn {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0;
  border: 1px solid transparent; background: none; border-radius: 7px;
  padding: 3px 5px; margin-left: -5px; font-family: inherit; cursor: pointer; text-align: left;
}
.cl-shopbtn:hover { border-color: var(--border-strong); background: #fbfdfd; }
.cl-shopchips { display: flex; flex-wrap: wrap; gap: 3px 5px; min-width: 0; flex: 1 1 auto; }
.cl-schip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  font-size: 13px; color: #374151; background: #f3f6f8; border: 1px solid transparent;
  border-radius: 999px; padding: 1px 7px; white-space: nowrap; line-height: 16px;
}
.cl-schip.main { background: var(--brand-soft, #eafaf7); color: var(--brand-text, #0f766e); }
.cl-schip .dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; flex: none; }
.cl-schip .dot.ok { background: #059669; }
.cl-shopcaret { font-style: normal; font-size: 11.5px; color: #8b95a1; flex: none; padding-left: 1px; }
.cl-shopbtn:hover .cl-shopcaret { color: var(--brand); }
.cl-shopbtn:focus-visible { outline: 2px solid var(--brand-soft-strong, rgba(17,131,110,.28)); outline-offset: 1px; }

.cl-pp {
  position: fixed; z-index: 3000; width: 262px; background: var(--panel, #fff);
  border: 1px solid rgba(15, 23, 42, .12); border-radius: 10px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .08);
  overflow: hidden;
}
.cl-pp-h { display: flex; align-items: center; gap: 6px; padding: 8px 11px; font-size: 13px; color: #6b7280; border-bottom: 1px solid var(--border); }
.cl-pp-h em { font-style: normal; margin-left: auto; font-size: 12px; color: #a8b0b9; }
.cl-pp-l { max-height: 264px; overflow-y: auto; padding: 4px; display: grid; gap: 1px; }
.cl-pp-i {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 7px;
  padding: 6px 7px; font-family: inherit; cursor: pointer; min-width: 0;
}
.cl-pp-i:hover { background: var(--hover, #f5f7f9); }
.cl-pp-i .ck {
  width: 13px; height: 13px; border-radius: 4px; border: 1px solid #cbd5e1;
  background: #fff; flex: none; position: relative;
}
.cl-pp-i.on .ck { background: var(--brand); border-color: var(--brand); }
.cl-pp-i.on .ck::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.cl-pp-i .rg { font-size: 11.5px; font-weight: 600; color: #6b7280; letter-spacing: .3px; flex: none; }
.cl-pp-i b { font-size: 14px; color: #1f2937; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-pp-i em { font-style: normal; margin-left: auto; font-size: 11.5px; color: #9aa3af; flex: none; }
.cl-pp-i.own { background: var(--brand-soft-weak, #f2fbf9); cursor: default; }
.cl-pp-i.own .ck { background: var(--brand); border-color: var(--brand); }
.cl-pp-i.own .ck::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.cl-pp-f { padding: 7px 11px; border-top: 1px solid var(--border); font-size: 12px; color: #9aa3af; line-height: 1.6; background: #fbfcfd; }
.cl-pp-empty { padding: 14px; font-size: 13px; color: #9aa3af; text-align: center; }

/* =========================================================
 * 仓库管理 v2（妙手式筛选栏 + 仓库列 + 已配对平台）
 * ========================================================= */
.wm-k.wm-sk, .wm-skel-r { overflow: hidden; }
.wm-k.wm-sk i, .wm-k.wm-sk b, .wm-k.wm-sk span,
.wm-skel-r s {
  display: block; background: linear-gradient(90deg, #eef2f5 25%, #f6f9fb 37%, #eef2f5 63%);
  background-size: 400% 100%; animation: wmShine 1.3s ease-in-out infinite; border-radius: 5px;
}
.wm-k.wm-sk i { width: 44px; height: 10px; }
.wm-k.wm-sk b { width: 66px; height: 18px; margin: 3px 0 2px; }
.wm-k.wm-sk span { width: 40px; height: 9px; }
@keyframes wmShine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.wm-skel { border: 1px solid var(--border); border-radius: 11px; background: var(--panel); padding: 6px; display: grid; gap: 2px; }
.wm-skel-r { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.wm-skel-r s:nth-child(1) { width: 36px; height: 36px; flex: none; border-radius: 6px; }
.wm-skel-r s:nth-child(2) { width: 128px; height: 12px; }
.wm-skel-r s:nth-child(3) { flex: 1 1 auto; height: 12px; }

.wm-f { display: grid; gap: 8px; margin-bottom: 8px; }
.wm-fr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wm-fi { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.wm-fi > span { font-size: 13px; color: #6b7280; white-space: nowrap; flex: none; }
.wm-fi .af-input { height: 32px; font-size: 14.5px; }
.wm-fi-src > span { color: #9aa3af; }
.wm-src {
  height: 32px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 14.5px; color: #374151; padding: 0 9px;
  display: inline-flex; align-items: center; gap: 6px; cursor: default;
}
.wm-src i {
  font-style: normal; font-size: 11.5px; color: var(--brand-text, #0f766e);
  background: var(--brand-soft, #eafaf7); border-radius: 4px; padding: 1px 5px;
}
.wm-fi .wm-sel { width: 176px; }
.wm-fi-lg { flex: 1 1 260px; }
.wm-fi-lg .af-input { flex: 1 1 auto; min-width: 0; }
.wm-fi-range { flex: 0 0 auto; }
.wm-fi-range .af-input { width: 88px; }
.wm-fi-range i { font-style: normal; color: #9aa3af; }
.wm-mini { width: 74px; }
.wm-tools { margin-bottom: 8px; }
.wm-tools .cl-btn { height: 30px; }
.wm-tools .wm-ck { margin-right: 2px; }

.wm-tbl .wm-wh {
  display: block; font-size: 13px; color: #374151; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.wm-tbl .wm-wh i { font-style: normal; font-size: 11.5px; color: #9aa3af; margin-right: 5px; }
.wm-pair { display: grid; gap: 1px; justify-items: start; }
.wm-pair-n {
  border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #0d9488;
}
.wm-pair-n:hover { text-decoration: underline; }
.wm-pair-0 { font-size: 13px; color: #b0b7c0; }
.wm-pair-go {
  border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer;
  font-size: 13px; color: #0d9488;
}
.wm-pair-go:hover { color: #0f766e; text-decoration: underline; }
.wm-foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 7px 11px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--bg-subtle); font-size: 13px; color: #6b7280;
}
.wm-foot b { color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; }
.wm-foot .grow { flex: 1 1 auto; }

/* 配对设置弹窗 */
.af-dlg .af-panel.wm-bindset { width: 760px; max-width: calc(100vw - 40px); }
.wm-bind-tip {
  font-size: 14px; color: #8a5300; background: #fff8ec; border: 1px solid #ffe2b8;
  border-radius: 8px; padding: 7px 11px; margin-bottom: 12px; line-height: 1.6;
}
.wm-bind-hd { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.wm-bind-pic {
  position: relative; width: 54px; height: 54px; border-radius: 8px; background: #eef1f3;
  overflow: hidden; flex: none; display: block;
}
.wm-bind-pic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 20.5px; font-weight: 600; color: #b6bec8;
}
.wm-bind-pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wm-bind-meta { display: grid; gap: 4px; min-width: 0; }
.wm-bind-meta > div { font-size: 14.5px; color: #1f2937; display: flex; align-items: baseline; gap: 8px; }
.wm-bind-meta i { font-style: normal; font-size: 12.5px; color: #9aa3af; width: 56px; flex: none; }
.wm-bind-meta b.mono { font-size: 15px; }

.wm-tagf { margin-bottom: 12px; }
.wm-tagf-h { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.wm-tagf-h > span { font-size: 14px; color: #374151; }
.wm-qq {
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid #cbd5e1; color: #9aa3af;
  font-style: normal; font-size: 11px; line-height: 11px; text-align: center; cursor: help; flex: none;
}
.wm-tagbox {
  min-height: 60px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff; padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 5px;
  align-content: flex-start; cursor: text;
}
.wm-tagbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft, #eafaf7); }
.wm-tags { display: contents; }
.wm-tag {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  background: #f1f5f8; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 4px 2px 7px; font-size: 14px; color: #374151;
}
.wm-tag button {
  border: 0; background: none; padding: 0 2px; cursor: pointer; color: #9aa3af;
  font-family: inherit; font-size: 15px; line-height: 1;
}
.wm-tag button:hover { color: #e5484d; }
.wm-tagin {
  flex: 1 1 180px; min-width: 120px; border: 0; outline: 0; height: 24px;
  font-family: inherit; font-size: 14.5px; color: #1f2937; background: none;
}
.wm-tagin::placeholder { color: #b0b7c0; }
.wm-tagf-f { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: #9aa3af; }
.wm-tagf-f b { color: #4b5563; font-weight: 600; }
.wm-tagclr {
  margin-left: auto; border: 0; background: none; cursor: pointer; color: #b0b7c0;
  padding: 3px; display: inline-flex; border-radius: 5px;
}
.wm-tagclr:hover { color: #e5484d; background: #fef2f2; }
.wm-tagdel {
  border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit;
  font-size: 14px; color: #0d9488;
}
.wm-tagdel:hover { text-decoration: underline; }
.wm-bind-note { margin-top: 12px; font-size: 13px; color: #9aa3af; line-height: 1.7; }

/* 已配对平台产品 */
.af-dlg .af-panel.wm-paired { width: 880px; max-width: calc(100vw - 40px); }
.wm-warn {
  font-size: 13px; color: #8a5300; background: #fff8ec; border: 1px solid #ffe2b8;
  border-radius: 8px; padding: 7px 11px; margin-bottom: 10px; line-height: 1.7;
}
.wm-pd-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.wm-pd-code { font-size: 14.5px; color: #1f2937; font-weight: 600; }
.wm-pd-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.wm-pd-tabs button {
  border: 0; background: none; font-family: inherit; font-size: 14.5px; color: #6b7280;
  padding: 7px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.wm-pd-tabs button.on { color: var(--brand-text, #0f766e); border-bottom-color: var(--brand); font-weight: 600; }
.wm-pd-tabs button:disabled { color: #b0b7c0; cursor: default; }
.wm-pd-tbl { max-height: 380px; overflow-y: auto; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 9px 9px; }
.wm-pd-tbl table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.wm-pd-tbl th {
  position: sticky; top: 0; z-index: 1; background: #fbfcfd; text-align: left;
  font-size: 13px; font-weight: 500; color: #6b7280; padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}
.wm-pd-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; color: #374151; }
.wm-pd-tbl tr:last-child td { border-bottom: 0; }
.wm-pd-prod { display: flex; gap: 9px; min-width: 0; }
.wm-pd-prod .wm-bind-pic { width: 44px; height: 44px; }
.wm-pd-pi { min-width: 0; display: grid; gap: 1px; }
.wm-pd-t { font-size: 14px; color: #1f2937; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-pd-shop { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; }
.wm-pd-shop i { font-style: normal; font-size: 11.5px; font-weight: 600; color: #6b7280; background: #f3f6f8; border-radius: 4px; padding: 1px 4px; }
.wm-pd-un { border: 0; background: none; padding: 0; font-family: inherit; font-size: 14px; color: #0d9488; cursor: pointer; }
.wm-pd-un:hover { color: #e5484d; }
.wm-pd-empty { padding: 26px; text-align: center; font-size: 14px; color: #9aa3af; }
.wm-pd-ft { margin-top: 8px; font-size: 13px; color: #9aa3af; text-align: right; }

/* 手动映射 */
.af-dlg .af-panel.wm-manual { width: 620px; max-width: calc(100vw - 40px); }
.wm-mm-list { border: 1px solid var(--border); border-radius: 9px; max-height: 380px; overflow-y: auto; padding: 4px; }
.wm-mm-i {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 92px; gap: 8px; align-items: center;
  width: 100%; text-align: left; border: 1px solid transparent; background: none;
  border-radius: 7px; padding: 6px 8px; font-family: inherit; cursor: pointer;
}
.wm-mm-i:hover { background: var(--hover, #f5f7f9); }
.wm-mm-i .mono { font-size: 13px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-mm-i b { font-size: 13px; font-weight: 500; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-mm-i em { font-style: normal; font-size: 12.5px; color: #9aa3af; text-align: right; font-variant-numeric: tabular-nums; }

/* 详情里已配对清单 */
.wm-dl-p { margin: 12px 0 4px; display: grid; gap: 6px; }
.wm-dl-pr { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.wm-dl-pr .wm-bind-pic { width: 34px; height: 34px; }
.wm-dl-pr b { font-size: 14px; color: #1f2937; font-weight: 500; display: block; }
.wm-dl-pr i { font-style: normal; font-size: 12px; color: #9aa3af; }

/* KPI 卡在窄屏也保持一行：卡片本身很小，掉成两行反而更占地方 */
@media (max-width: 1500px) { .wm-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .wm-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .wm-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =========================================================
 * 编辑采集商品 v2（对齐店铺产品编辑弹窗：商品卡 + 分区卡片）
 * ========================================================= */
.af-dlg .af-panel.cl-edit2 { width: 792px; max-width: calc(100vw - 40px); max-height: 90vh; }
.af-dlg .af-panel.cl-edit2 .af-bd { padding: 14px 18px 16px; }
.ce2-hd {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; background: #f7f9fa; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 9px;
}
.cl-thumb.ce2-pic { width: 56px; height: 56px; border-radius: 8px; }
.cl-thumb.ce2-pic > i { font-size: 23px; }
.ce2-hd-main { min-width: 0; flex: 1 1 auto; padding-top: 1px; }
.ce2-t {
  font-size: 15px; font-weight: 600; color: #1f2937; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ce2-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 6px; font-size: 12.5px; color: #9aa3af; }
.ce2-meta .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #8b95a1; }
.ce2-dim { color: #a8b0b9; }
.ce2-link { color: var(--brand-text, #0f766e); text-decoration: none; font-size: 12.5px; }
.ce2-link:hover { text-decoration: underline; }

.ce2-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ce2-stats > div {
  display: grid; gap: 2px; align-content: start; min-width: 0;
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; background: #fff;
}
.ce2-stats span { font-size: 12px; color: #9aa3af; }
.ce2-stats b {
  font-size: 15px; font-weight: 650; color: #374151; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce2-stats b.on { color: var(--brand-text, #0f766e); }
.ce2-stats i { font-style: normal; font-size: 11.5px; color: #9aa3af; font-variant-numeric: tabular-nums; }
.ce2-stats i.up { color: #d9480f; }
.ce2-stats i.down { color: #0f7a63; }

.ce2-card { border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; background: #fff; }
.ce2-ch { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.ce2-ch b { font-size: 14px; font-weight: 600; color: #374151; }
.ce2-ch i { font-style: normal; font-size: 12px; color: #9aa3af; }

.ce2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ce2-f { display: grid; gap: 5px; min-width: 0; align-content: start; }
.ce2-f-full { grid-column: 1 / -1; }
.ce2-f > span { font-size: 13px; color: #6b7280; display: flex; align-items: center; gap: 5px; }
.ce2-f > span em { font-style: normal; color: #e5484d; }
.ce2-q {
  font-style: normal; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid #d8dee4; color: #9aa3af; font-size: 11px; line-height: 11px;
  text-align: center; cursor: help; flex: none;
}
.ce2-box { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ce2-box .af-input { height: 34px; font-size: 14.5px; flex: 1 1 auto; min-width: 0; }
.ce2-f-full .ce2-box .af-input { padding-right: 56px; }
.ce2-cnt {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 12px; color: #b0b7c0; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.ce2-cur {
  font-style: normal; flex: none; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; font-size: 13px; color: #6b7280;
  background: #f5f7f9; border: 1px solid var(--border); border-radius: 6px;
}
.ce2-unit { font-style: normal; flex: none; font-size: 12.5px; color: #9aa3af; }
.ce2-cny { font-style: normal; font-size: 12px; color: #9aa3af; min-height: 14px; line-height: 1.5; }
.ce2-ro {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px;
  border: 1px dashed var(--border-strong); border-radius: 8px; background: #fbfcfd;
  font-size: 14.5px; color: #4b5563; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce2-ro i {
  font-style: normal; font-size: 11.5px; color: #a15c00; background: #fff7e6;
  border-radius: 3px; padding: 0 4px; flex: none;
}
.ce2-f textarea.af-input { min-height: 56px; padding: 8px 10px; line-height: 1.65; font-size: 14.5px; resize: vertical; }
.ce2-tip { font-size: 13px; color: #9aa3af; line-height: 1.7; }

@media (max-width: 900px) {
  .ce2-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce2-grid { grid-template-columns: 1fr; }
}

/* =========================================================
 * 广告管理（TikTok GMV Max）
 * 版式参照商务中心：账号卡 + KPI + 双轴折线 + 计划表 + 素材卡
 * ========================================================= */

/* 日期分段 */
.ad-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: #fff; }
.ad-seg button {
  border: 0; background: none; font-family: inherit; font-size: 14.5px; color: #4b5563;
  padding: 0 11px; height: 32px; cursor: pointer;
}
.ad-seg button + button { border-left: 1px solid var(--border); }
.ad-seg button:hover { background: #f7f9fa; }
.ad-seg button.on { background: var(--brand-soft, #eafaf7); color: var(--brand-text, #0f766e); font-weight: 600; }

/* 提示条 */
.ad-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-radius: 9px; padding: 8px 12px; font-size: 14px; line-height: 1.6; margin-bottom: 10px;
}
.ad-banner b { font-weight: 600; flex: none; }
.ad-banner span { color: #6b7280; min-width: 0; }
.ad-banner.amber { background: #fff8ec; border: 1px solid #ffe2b8; color: #8a5300; }
.ad-banner.amber b { color: #8a5300; }
.ad-banner.amber span { color: #8a5300; }
.ad-banner.amber .btn { margin-left: auto; }
.ad-banner.ok { background: #f2fbf9; border: 1px solid #cdeee6; color: var(--brand-text, #0f766e); }
.ad-banner.ok b { color: var(--brand-text, #0f766e); }
.ad-banner.ok span { color: #4b6b66; }
.ad-banner-sub { font-size: 12.5px; color: #9aa3af; width: 100%; }

/* 页签 */
.ad-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.ad-tabs button {
  border: 0; background: none; font-family: inherit; font-size: 15px; color: #6b7280;
  padding: 9px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.ad-tabs button:hover { color: var(--text); }
.ad-tabs button.on { color: var(--brand-text, #0f766e); border-bottom-color: var(--brand); font-weight: 600; }
.ad-tabs em {
  font-style: normal; font-size: 12px; color: #8b95a1; background: #f1f4f7;
  border-radius: 999px; padding: 1px 6px; font-variant-numeric: tabular-nums;
}

/* 账号卡 */
.ad-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(180deg, #fbfdfd, #fff);
  padding: 14px 16px; margin-bottom: 12px;
}
.ad-hero-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ad-hero-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft, #eafaf7); color: var(--brand-text, #0f766e);
}
.ad-ico { width: 18px; height: 18px; }
.ad-hero-t { font-size: 16px; font-weight: 650; color: #1f2937; }
.ad-hero-s { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: #8b95a1; flex-wrap: wrap; }
.ad-hero-s i { width: 2px; height: 2px; border-radius: 50%; background: #cbd5e1; }
.ad-hero-kpis { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.ad-hero-kpis > div { display: grid; gap: 2px; }
.ad-hero-kpis span { font-size: 12px; color: #9aa3af; }
.ad-hero-kpis b { font-size: 19.5px; font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.ad-hero-kpis b.brand { color: var(--brand-text, #0f766e); }

/* KPI */
.ad-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ad-k { border: 1px solid var(--border); border-radius: 11px; background: #fff; padding: 11px 12px; min-width: 0; }
.ad-k-l { display: block; font-size: 13px; color: #6b7280; }
.ad-k-v {
  display: block; font-size: 23px; font-weight: 700; color: #1f2937; margin: 4px 0 3px;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-k-f { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #a8b0b9; }
.ad-k-f em { font-style: normal; }
.ad-dt { font-variant-numeric: tabular-nums; font-weight: 600; }
.ad-dt.up { color: #d9480f; }
.ad-dt.down { color: #0f7a63; }
.ad-dt.flat { color: #a8b0b9; font-weight: 400; }

/* 卡片 */
.ad-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 13px 15px 15px; margin-bottom: 12px; }
.ad-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ad-card-h > b { font-size: 15px; font-weight: 650; color: #1f2937; }
.ad-card-sub { font-size: 12.5px; color: #9aa3af; }
.ad-card-h .btn { margin-left: auto; }
.ad-range { font-style: normal; font-size: 12px; color: #a8b0b9; margin-left: auto; }
.ad-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #6b7280; }
.ad-legend .ad-lg { width: 14px; height: 2px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.ad-legend .ad-lg.cost { background: #0d9488; }
.ad-legend .ad-lg.order { background: #f0a500; }

/* 折线图：SVG 只画线，轴与提示用 DOM（不会被拉伸变形） */
.ad-chart { display: grid; grid-template-columns: 74px minmax(0, 1fr) 46px; gap: 0 8px; }
.ad-axis-l, .ad-axis-r {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 236px; font-size: 12px; color: #a8b0b9; font-variant-numeric: tabular-nums;
  padding: 0 2px;
}
.ad-axis-l { text-align: right; padding-right: 7px; }
.ad-axis-r { text-align: left; padding-left: 4px; color: #c1a05a; }
.ad-plot { position: relative; height: 236px; }
.ad-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ad-dot {
  position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #fff;
  border: 2px solid #0d9488; transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 1px #fff;
}
.ad-dot.order { border-color: #f0a500; }
.ad-hits { position: absolute; inset: 0; display: flex; }
.ad-hit { position: absolute; top: 0; bottom: 0; z-index: 2; }
.ad-hit:hover { background: rgba(13, 148, 136, .05); }
.ad-tip {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 156px; background: #fff; border: 1px solid rgba(15, 23, 42, .12); border-radius: 9px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16); padding: 8px 10px;
  opacity: 0; pointer-events: none; transition: opacity .12s var(--ease);
  display: grid; gap: 2px; z-index: 6;
}
.ad-hit:hover .ad-tip { opacity: 1; }
.ad-hit:first-child .ad-tip { left: 0; transform: none; }
.ad-hit:last-child .ad-tip { left: auto; right: 0; transform: none; }
.ad-tip b { font-size: 12.5px; color: #374151; margin-bottom: 2px; }
.ad-tip span { font-size: 12.5px; color: #8b95a1; display: flex; justify-content: space-between; }
.ad-tip em { font-style: normal; color: #1f2937; font-variant-numeric: tabular-nums; font-weight: 600; }
.ad-x { position: relative; grid-column: 2; height: 18px; margin-top: 7px; }
.ad-x span {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 12px; color: #a8b0b9; white-space: nowrap;
}
.ad-x span:first-child { transform: none; }
.ad-x span:last-child { transform: translateX(-100%); }

/* 计划工具条 */
.ad-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ad-search { position: relative; display: flex; align-items: center; width: 268px; }
.ad-search .ad-ico { position: absolute; left: 9px; width: 14px; height: 14px; color: #b0b7c0; pointer-events: none; }
.ad-search .af-input { padding-left: 29px; height: 32px; font-size: 14.5px; }
.ad-sel { height: 32px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; padding: 0 9px; font-family: inherit; font-size: 14.5px; color: #374151; }
.ad-bar-sum { margin-left: auto; font-size: 13px; color: #8b95a1; font-variant-numeric: tabular-nums; }

/* 计划表 */
.ad-tbl-wrap { border: 1px solid var(--border); border-radius: 11px; overflow: auto; background: #fff; }
.ad-tbl { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.ad-tbl th {
  position: sticky; top: 0; z-index: 1; background: #fbfcfd; text-align: left;
  font-size: 13px; font-weight: 500; color: #6b7280; padding: 9px 10px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ad-tbl th.num, .ad-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ad-tbl td { padding: 9px 10px; border-bottom: 1px solid #f2f5f7; font-size: 14.5px; color: #374151; vertical-align: middle; }
.ad-tbl tbody tr:last-child td { border-bottom: 0; }
.ad-tbl tbody tr:hover { background: #fbfcfd; }
.ad-th-sw, .ad-td-sw { padding-left: 12px !important; }
.ad-th-op, .ad-td-op { text-align: right !important; padding-right: 12px !important; }
.ad-pname { display: grid; gap: 2px; min-width: 0; }
.ad-pn {
  border: 0; background: none; padding: 0; font-family: inherit; text-align: left;
  font-size: 14.5px; font-weight: 500; color: #1f2937; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-pn:hover { color: var(--brand-text, #0f766e); text-decoration: underline; }
.ad-psub {
  font-size: 12px; color: #a8b0b9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-td-obj { font-size: 13px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-good { color: #0f7a63; }
.ad-link { border: 0; background: none; padding: 0; font-family: inherit; font-size: 14px; color: var(--brand-text, #0f766e); cursor: pointer; }
.ad-link:hover { text-decoration: underline; }

/* 状态徽章 */
.ad-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px;
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.ad-badge.green { background: #e9f7f1; color: #0f7a63; }
.ad-badge.amber { background: #fff7e6; color: #a15c00; }
.ad-badge.red { background: #fdecec; color: #c02626; }
.ad-badge.gray { background: #f1f4f7; color: #6b7280; }
.ad-badge.blue { background: #eef4ff; color: #2f5fd0; }

/* 开关 */
.ad-sw {
  position: relative; width: 34px; height: 19px; border-radius: 999px; border: 1px solid #d8dee4;
  background: #eef1f4; cursor: pointer; padding: 0; transition: background .15s, border-color .15s;
}
.ad-sw i {
  position: absolute; top: 1px; left: 1px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .18); transition: left .15s;
}
.ad-sw.on { background: var(--brand); border-color: var(--brand); }
.ad-sw.on i { left: 16px; }
.ad-sw:disabled { opacity: .6; cursor: default; }

/* 素材 */
.ad-mk {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px;
}
.ad-mk > div { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 10px 12px; }
.ad-mk span { display: block; font-size: 12.5px; color: #8b95a1; }
.ad-mk b { display: block; font-size: 19.5px; font-weight: 700; color: #1f2937; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ad-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(354px, 1fr)); gap: 12px; }
.ad-mcard { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 12px; }
.ad-mtop { display: flex; gap: 10px; min-width: 0; }
.ad-mpic {
  position: relative; width: 66px; height: 66px; border-radius: 9px; background: #eef1f3;
  overflow: hidden; flex: none;
}
.ad-mpic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 23px; font-weight: 600; color: #b6bec8;
}
.ad-mpic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-mpic.small { width: 52px; height: 52px; border-radius: 8px; }
.ad-meta { min-width: 0; }
.ad-mname {
  font-size: 14.5px; font-weight: 600; color: #1f2937; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-msub { font-size: 12px; color: #a8b0b9; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-mtags { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ad-mcamp { font-size: 11.5px; color: #6b7280; background: #f4f6f8; border-radius: 4px; padding: 1px 5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-mgrid2 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px;
  margin-top: 11px; padding-top: 10px; border-top: 1px solid #f2f5f7;
}
.ad-mgrid2 > div { display: grid; gap: 1px; min-width: 0; }
.ad-mgrid2 span { font-size: 12px; color: #a8b0b9; }
.ad-mgrid2 b { font-size: 14.5px; font-weight: 600; color: #1f2937; font-variant-numeric: tabular-nums; }

/* 骨架 / 空态 / 错误 */
.ad-sk-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ad-sk-k { border: 1px solid var(--border); border-radius: 11px; background: #fff; padding: 12px; }
.ad-sk-k i, .ad-sk-k b, .ad-sk-k s, .ad-sk-chart i {
  display: block; background: linear-gradient(90deg, #eef2f5 25%, #f6f9fb 37%, #eef2f5 63%);
  background-size: 400% 100%; animation: wmShine 1.3s ease-in-out infinite; border-radius: 5px;
}
.ad-sk-k i { width: 54px; height: 10px; }
.ad-sk-k b { width: 82px; height: 20px; margin: 7px 0 5px; }
.ad-sk-k s { width: 64px; height: 9px; }
.ad-sk-chart { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fff; }
.ad-sk-chart i { height: 236px; border-radius: 8px; }
.ad-empty { padding: 26px; text-align: center; font-size: 14.5px; color: #9aa3af; border: 1px dashed var(--border-strong); border-radius: 11px; background: #fbfcfd; }
.ad-empty.big { padding: 40px 30px; line-height: 1.9; }
.ad-err { border: 1px solid #f6d4d4; background: #fef7f7; border-radius: 12px; padding: 18px 20px; }
.ad-err-t { font-size: 16px; font-weight: 650; color: #b3261e; }
.ad-err-m { margin-top: 6px; font-size: 14.5px; color: #7a2e2a; line-height: 1.7; word-break: break-word; }
.ad-err-h { margin-top: 6px; font-size: 13px; color: #9b6a66; line-height: 1.7; }
.ad-err-b { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ad-err-b .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* 弹窗：修改计划 */
.af-dlg .af-panel.ad-panel { width: 760px; max-width: calc(100vw - 40px); }
.af-dlg .af-panel.ad-plan-panel { width: 980px; max-width: calc(100vw - 40px); }
.af-dlg .af-panel.ad-conf-panel { width: 620px; max-width: calc(100vw - 40px); }
.ad-msg { font-size: 13px; color: #b3261e; min-width: 0; }
.ad-ft-b { display: flex; gap: 8px; margin-left: auto; }

.ap { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 18px; align-items: start; }
.ap-sec { margin-bottom: 16px; }
.ap-h { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.ap-h i { font-style: normal; font-size: 12px; font-weight: 400; color: #9aa3af; }
.ap-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ap-type { border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 11px; background: #fff; }
.ap-type.on { border-color: var(--brand); background: var(--brand-soft, #eafaf7); box-shadow: inset 0 0 0 1px var(--brand-soft-strong, rgba(13,148,136,.2)); }
.ap-type.off { opacity: .62; }
.ap-type-t { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: #1f2937; }
.ap-type.on .ap-type-t { color: var(--brand-text, #0f766e); }
.ap-type-s { font-size: 12px; color: #8b95a1; margin-top: 3px; line-height: 1.5; }
.ap-prod { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; background: #fbfcfd; }
.ap-prod-t { min-width: 0; }
.ap-prod-t b { display: block; font-size: 14.5px; font-weight: 500; color: #1f2937; line-height: 1.5; }
.ap-prod-t span { display: block; font-size: 12px; color: #a8b0b9; margin-top: 2px; }
.ap-f { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 10px; }
.ap-f > span { font-size: 14px; color: #6b7280; }
.ap-box { display: flex; align-items: center; gap: 6px; }
.ap-box .af-input { height: 32px; font-size: 14.5px; }
.ap-box em { font-style: normal; font-size: 13px; color: #6b7280; flex: none; }
.ap-hint { grid-column: 2; font-style: normal; font-size: 12px; color: #a8b0b9; }
.ap-slide { display: flex; align-items: center; gap: 10px; }
.ap-slide input[type="range"] { flex: 1 1 auto; accent-color: var(--brand); }
.ap-slide b { font-size: 15px; font-weight: 700; color: var(--brand-text, #0f766e); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.ap-ck { display: flex; align-items: center; gap: 8px; }
.ap-ck input { accent-color: var(--brand); width: 14px; height: 14px; }
.ap-ck em { font-style: normal; font-size: 13px; color: #6b7280; }
.ap-side { border: 1px solid var(--border); border-radius: 12px; background: #fbfcfd; padding: 12px; position: sticky; top: 0; }
.ap-side-h { font-size: 13px; color: #6b7280; margin-bottom: 9px; }
.ap-side-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.ap-side-thumb {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; background: #eef1f3; overflow: hidden;
}
.ap-side-thumb i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 30px; font-weight: 600; color: #b6bec8;
}
.ap-side-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-side-t { font-size: 13px; color: #374151; line-height: 1.5; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-side-b { font-size: 12px; color: #a8b0b9; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-side-rows { display: grid; gap: 6px; margin-top: 10px; }
.ap-side-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.ap-side-rows span { color: #8b95a1; }
.ap-side-rows b { color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; }
.ap-side-note { margin-top: 10px; font-size: 12px; color: #a8b0b9; line-height: 1.6; }

/* 弹窗：接入设置 */
.ac-tip { font-size: 13px; color: #8a5300; background: #fff8ec; border: 1px solid #ffe2b8; border-radius: 8px; padding: 8px 11px; line-height: 1.75; margin-bottom: 12px; }
.ac-f { display: grid; gap: 5px; margin-bottom: 11px; min-width: 0; }
.ac-f > span { font-size: 13px; color: #6b7280; }
.ac-f > span em { font-style: normal; color: #e5484d; }
.ac-f .af-input { height: 34px; font-size: 14.5px; }
.ac-f textarea.af-input { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.ac-hint { font-style: normal; font-size: 12px; color: #a8b0b9; }
.ac-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-test { border-top: 1px dashed var(--border); padding-top: 10px; font-size: 13px; }
.ac-test .ok { color: #0f7a63; }
.ac-test .no { color: #b3261e; }
.ac-test .dim { color: #a8b0b9; }

/* 6 张 KPI 在 1440 也排得下（每张约 170px，够放 $1,266.93），
   断点压到 1280 再变 3 列，否则 1440 会白掉一整行 */
@media (max-width: 1280px) {
  .ad-kpi, .ad-sk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad-hero-kpis { gap: 16px; }
}
@media (max-width: 1180px) {
  .ad-kpi, .ad-sk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-mk { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap { grid-template-columns: 1fr; }
  .ap-side { position: static; }
}

/* =========================================================
 * 广告管理 v2：可选 KPI + 双线图 + 计划工具条 + 计划编辑/洞察/作品/记录
 * ========================================================= */

/* --- KPI 卡改成可点选的按钮 --- */
.ad-kpi .ad-k {
  position: relative; display: block; width: 100%; text-align: left; font-family: inherit;
  cursor: pointer; appearance: none; -webkit-appearance: none; transition: border-color .12s, box-shadow .12s;
}
.ad-kpi .ad-k:hover { border-color: var(--border-strong); }
.ad-kpi .ad-k.on { border-color: var(--mc, var(--brand)); box-shadow: inset 0 0 0 1px var(--mc, var(--brand)); }
.ad-kpi .ad-k.on::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 2px 2px 0; background: var(--mc, var(--brand));
}
.ad-k-ck {
  position: absolute; top: 9px; right: 9px; width: 15px; height: 15px; border-radius: 4px;
  border: 1px solid #d8dee4; background: #fff; color: #fff; font-size: 11.5px; line-height: 13px;
  text-align: center; font-weight: 700;
}
.ad-k.on .ad-k-ck { background: var(--mc, var(--brand)); border-color: var(--mc, var(--brand)); }
.ad-k-l { padding-right: 20px; }
.ad-k-f { display: flex; align-items: center; gap: 6px; }
.ad-k-f em { font-style: normal; }
.ad-k-f .ad-dt { font-size: 12px; }

/* --- 折线图：悬停竖线 + 数据点 + 图例 --- */
.ad-hit::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--gx, 50%); width: 1px;
  background: rgba(15, 23, 42, .16); opacity: 0; pointer-events: none; transition: opacity .1s;
}
.ad-hit:hover::before { opacity: 1; }
.ad-hdot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #fff;
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity .1s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .2); z-index: 3;
}
.ad-hit:hover .ad-hdot { opacity: 1; }
.ad-tip { z-index: 8; }
.ad-tip b { display: block; margin-bottom: 3px; }
.ad-tip span { display: flex; align-items: center; gap: 6px; justify-content: flex-start; }
.ad-tip span em { margin-left: auto; }
.ad-tip-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ad-legend2 {
  grid-column: 2; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 8px; font-size: 13px; color: #4b5563;
}
.ad-legend2 > span { display: inline-flex; align-items: center; gap: 6px; }
.ad-legend2 em { font-style: normal; font-size: 11.5px; color: #a8b0b9; }
.ad-chart.single .ad-axis-r { display: none; }

/* --- 计划表新增小件 --- */
.ad-cell-sub { display: block; font-style: normal; font-size: 11.5px; color: #a8b0b9; line-height: 1.4; }
.ad-st-cell { display: grid; gap: 2px; justify-items: start; }
.ad-health-cell { display: grid; gap: 3px; justify-items: start; }
.ad-mini {
  border: 0; background: none; padding: 0; font-family: inherit; font-size: 12.5px;
  color: var(--brand-text, #0f766e); cursor: pointer; white-space: nowrap;
}
.ad-mini:hover { text-decoration: underline; }
.ad-td-dim { font-size: 13px; color: #9aa3af; }
.ad-psub .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #8b95a1; }
.ad-dotsep { margin: 0 4px; color: #cbd5e1; }
.ad-foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 8px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--bg-subtle); font-size: 13px; color: #6b7280;
}
.ad-foot b { color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-more { margin-left: 8px; color: #6b7280; }

/* --- 弹出层 --- */
.ad-pop {
  position: fixed; z-index: 3200; min-width: 168px; padding: 5px;
  background: #fff; border: 1px solid rgba(15, 23, 42, .12); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .06);
}
.ad-pop-h { padding: 6px 9px 5px; font-size: 12px; color: #9aa3af; }
.ad-pop-list { display: grid; gap: 1px; }
.ad-pop-i {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; font-family: inherit; font-size: 14.5px; color: #374151;
  padding: 7px 9px; border-radius: 7px; cursor: pointer;
}
.ad-pop-i:hover { background: #f4f7f9; }
.ad-pop-i:disabled { color: #b0b7c0; cursor: default; }
.ad-pop-i.dim i { font-style: normal; font-size: 11.5px; color: #b0b7c0; margin-left: auto; }
.ad-pop-ck {
  width: 14px; height: 14px; border-radius: 4px; border: 1px solid #cbd5e1;
  font-style: normal; font-size: 11.5px; line-height: 12px; text-align: center; color: #fff; flex: none;
}
.ad-pop-i.on .ad-pop-ck { background: var(--brand); border-color: var(--brand); }
.ad-pop-div { height: 1px; background: var(--border); margin: 4px 2px; }
.ad-pop-f { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; padding-left: 9px; }

/* --- 修改广告计划 --- */
.af-dlg .af-panel.ad-plan-panel { width: 1120px; max-width: calc(100vw - 40px); }
.apx { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.apx-main { min-width: 0; }
.apx-sec { padding: 0 0 15px; margin-bottom: 15px; border-bottom: 1px solid #f0f2f5; }
.apx-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.apx-h {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 15px; font-weight: 600; color: #1f2937; margin-bottom: 10px;
}
.apx-h i { font-style: normal; font-size: 12px; font-weight: 400; color: #9aa3af; }
.apx-types { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.apx-type { border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 11px; background: #fff; min-width: 0; }
.apx-type.on { border-color: var(--brand); background: var(--brand-soft, #eafaf7); }
.apx-type.off { opacity: .62; }
.apx-type-t { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: #1f2937; }
.apx-type.on .apx-type-t { color: var(--brand-text, #0f766e); }
.apx-type-s { font-size: 12px; color: #8b95a1; margin-top: 3px; line-height: 1.5; }
.apx-note {
  border: 1px solid #cdeee6; background: #f2fbf9; border-radius: 9px; padding: 8px 11px; margin-bottom: 10px;
}
.apx-note b { display: block; font-size: 14px; color: var(--brand-text, #0f766e); }
.apx-note span { display: block; font-size: 12.5px; color: #4b6b66; margin-top: 2px; line-height: 1.6; }
.apx-f { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 9px; }
.apx-f > span { font-size: 14px; color: #6b7280; }
.apx-f > .apx-hint { grid-column: 2; }
.apx-f > .af-input { max-width: 320px; height: 32px; font-size: 14.5px; }
.apx-box { display: flex; align-items: center; gap: 6px; min-width: 0; }
.apx-box .af-input { flex: 1 1 auto; min-width: 0; height: 32px; font-size: 14.5px; }
.apx-box > .af-input:only-of-type { max-width: 320px; }
.apx-box .apx-mini { flex: 0 0 62px; }
.apx-cur {
  flex: none; font-style: normal; height: 26px; padding: 0 8px; display: inline-flex; align-items: center;
  font-size: 13px; color: #6b7280; background: #f5f7f9; border: 1px solid var(--border); border-radius: 6px;
}
.apx-dim { font-size: 12.5px; color: #9aa3af; flex: none; }
.apx-hint { display: block; font-style: normal; font-size: 12px; color: #9aa3af; line-height: 1.6; margin-top: -3px; }
.apx-slide { display: flex; align-items: center; gap: 10px; margin: 0 0 12px 122px; }
.apx-slide span { font-size: 12px; color: #a8b0b9; flex: none; }
.apx-slide input[type="range"] { flex: 1 1 auto; accent-color: var(--brand); }
.apx-ck { display: flex; align-items: center; gap: 8px; }
.apx-ck input { accent-color: var(--brand); width: 14px; height: 14px; }
.apx-ck em { font-style: normal; font-size: 13px; color: #6b7280; }
.apx-pro { border: 1px solid #f3d9a4; background: linear-gradient(180deg, #fffdf7, #fff); border-radius: 11px; padding: 12px 13px; }
.apx-coupon p { margin: 6px 0 10px; font-size: 13px; color: #6b7280; line-height: 1.7; }
.apx-swrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.apx-swrow > span { font-size: 14.5px; font-weight: 600; color: #374151; }
.apx-promo { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 16px; align-items: start; }
.apx-promo-l p { margin: 6px 0 10px; font-size: 13px; color: #6b7280; line-height: 1.7; }
.apx-cal { border: 1px solid var(--border); border-radius: 10px; padding: 8px 9px 7px; background: #fff; }
.apx-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.apx-cal-h b { font-size: 14px; color: #374151; font-variant-numeric: tabular-nums; }
.apx-cal-nav {
  border: 1px solid var(--border); background: #fff; border-radius: 6px; width: 22px; height: 22px;
  font-family: inherit; font-size: 15px; line-height: 1; color: #6b7280; cursor: pointer;
}
.apx-cal-nav:hover { border-color: var(--brand); color: var(--brand); }
.apx-cal-w, .apx-cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.apx-cal-w span { text-align: center; font-size: 11.5px; color: #a8b0b9; padding: 2px 0; }
.apx-cal-d {
  height: 26px; border: 0; background: none; border-radius: 6px; font-family: inherit;
  font-size: 13px; color: #374151; cursor: pointer; font-variant-numeric: tabular-nums;
}
.apx-cal-d.out { color: #d3d9df; cursor: default; display: flex; align-items: center; justify-content: center; }
.apx-cal-d.today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.apx-cal-d:hover:not(.out) { background: #f1f5f8; }
.apx-cal-d.on { background: #d9f2ec; color: var(--brand-text, #0f766e); font-weight: 600; }
.apx-cal-lg { display: flex; align-items: center; gap: 12px; margin-top: 7px; padding-top: 6px; border-top: 1px solid #f0f2f5; font-size: 11.5px; color: #8b95a1; }
.apx-cal-lg span { display: inline-flex; align-items: center; gap: 4px; }
.apx-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.apx-dot.plan { background: #cbd5e1; }
.apx-dot.promo { background: #2fbfa4; }
.apx-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-bottom: 10px; }
.apx-rows > div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; min-width: 0; }
.apx-rows span { color: #9aa3af; flex: none; }
.apx-rows b { color: #374151; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apx-creatives {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px;
  max-height: 236px; overflow-y: auto; padding: 2px;
}
.apx-ck { min-width: 0; }
.apx-ck-pic {
  position: relative; width: 100%; aspect-ratio: 9 / 14; border-radius: 7px; background: #eef1f3;
  overflow: hidden; display: block;
}
.apx-ck-pic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 20.5px; font-weight: 600; color: #b6bec8;
}
.apx-ck-pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.apx-ck-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.apx-ck-play .ad-ico { width: 14px; height: 14px; }
.apx-ck-t { margin-top: 3px; font-size: 12px; color: #4b5563; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apx-ck-m { font-size: 11.5px; color: #a8b0b9; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apx-empty { grid-column: 1 / -1; padding: 18px; text-align: center; font-size: 13px; color: #9aa3af; border: 1px dashed var(--border-strong); border-radius: 9px; }
.apx-skel { padding: 16px; text-align: center; font-size: 13px; color: #a8b0b9; }
.apx-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apx-end .af-input { flex: 1 1 200px; height: 32px; }
.apx-prod {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; background: #fbfcfd;
}
.apx-prod-t { min-width: 0; flex: 1 1 auto; }
.apx-prod-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 500; color: #1f2937; line-height: 1.5; }
.apx-prod-t span { display: block; font-size: 12px; color: #a8b0b9; margin-top: 2px; }
.apx-prod-ops { display: flex; gap: 6px; flex: none; }

/* 右侧摘要 */
.apx-side { position: sticky; top: 0; background: #fbfcfd; border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; }
.apx-side-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 9px; }
.apx-side-tabs button {
  border: 0; background: none; font-family: inherit; font-size: 14px; color: #6b7280;
  padding: 5px 9px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.apx-side-tabs button.on { color: var(--brand-text, #0f766e); border-bottom-color: var(--brand); font-weight: 600; }
.apx-side-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.apx-side-kv span { color: #8b95a1; }
.apx-side-kv b { color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; }
.apx-side-h { margin: 10px 0 6px; font-size: 13px; color: #6b7280; }
.apx-prev-tabs { display: flex; gap: 10px; font-size: 13px; color: #9aa3af; margin-bottom: 7px; }
.apx-prev-tabs .on { color: var(--brand-text, #0f766e); font-weight: 600; }
.apx-prev { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.apx-prev-thumb {
  position: relative; width: 100%; aspect-ratio: 9 / 15; border-radius: 8px; overflow: hidden; background: #eef1f3;
}
.apx-prev-thumb > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 34.5px; font-weight: 600; color: #b6bec8;
}
.apx-prev-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.apx-prev-ui {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 9px 9px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .72)); color: #fff;
}
.apx-prev-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; background: rgba(255, 255, 255, .22); border-radius: 4px; padding: 1px 5px; }
.apx-prev-badge .ad-ico { width: 10px; height: 10px; }
.apx-prev-t { font-size: 12.5px; line-height: 1.45; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apx-prev-cta {
  margin-top: 6px; display: inline-block; background: #fff; color: #111;
  font-size: 12px; font-weight: 600; border-radius: 4px; padding: 2px 10px;
}
.apx-prev-note { margin: 8px 0 0; font-size: 11.5px; color: #a8b0b9; line-height: 1.65; }

/* --- 选择推广商品 --- */
.af-dlg .af-panel.ad-prod-panel { width: 940px; max-width: calc(100vw - 40px); }
.app-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.app-bar .ad-search { flex: 1 1 auto; width: auto; max-width: 460px; }
.app-sum { margin-left: auto; font-size: 13px; color: #8b95a1; }
.app-list { max-height: 470px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.app-i {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 150px 20px; gap: 10px; align-items: center;
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f2f5f7; background: #fff;
  padding: 8px 10px; font-family: inherit; cursor: pointer;
}
.app-i:last-child { border-bottom: 0; }
.app-i:hover { background: #fbfcfd; }
.app-i.on { background: #f2fbf9; }
.app-pic {
  position: relative; width: 46px; height: 46px; border-radius: 7px; overflow: hidden; background: #eef1f3; display: block;
}
.app-pic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 18.5px; font-weight: 600; color: #b6bec8;
}
.app-pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-t { min-width: 0; display: grid; gap: 2px; }
.app-t b { font-size: 14.5px; font-weight: 500; color: #1f2937; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-t em { font-style: normal; font-size: 12px; color: #a8b0b9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-m { display: grid; gap: 2px; text-align: right; }
.app-m i { font-style: normal; font-size: 14px; color: #374151; font-variant-numeric: tabular-nums; }
.app-m em { font-style: normal; font-size: 11.5px; color: #a8b0b9; }
.app-ck {
  width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 12.5px; line-height: 18px; text-align: center; opacity: 0;
}
.app-i.on .app-ck { opacity: 1; }
.app-empty { padding: 30px; text-align: center; font-size: 14px; color: #9aa3af; }

/* --- 健康状态与洞察 --- */
.af-dlg .af-panel.ad-health-panel { width: 760px; max-width: calc(100vw - 40px); }
.ah-banner { display: flex; align-items: flex-start; gap: 10px; border-radius: 10px; padding: 11px 12px; margin-bottom: 11px; }
.ah-banner.good { background: #f1fbf7; border: 1px solid #c9ecdf; }
.ah-banner.fair { background: #fffbf1; border: 1px solid #f6e3bb; }
.ah-banner.poor { background: #fef6f6; border: 1px solid #f6d4d4; }
.ah-banner-ico {
  width: 20px; height: 20px; border-radius: 50%; color: #fff; font-style: normal; font-size: 14px;
  line-height: 20px; text-align: center; flex: none; margin-top: 1px;
}
.ah-banner.good .ah-banner-ico { background: #12a37b; }
.ah-banner.fair .ah-banner-ico { background: #d99000; }
.ah-banner.poor .ah-banner-ico { background: #d9484d; }
.ah-banner b { display: block; font-size: 14.5px; color: #1f2937; }
.ah-banner p { margin: 3px 0 0; font-size: 13px; color: #6b7280; line-height: 1.7; }
.ah-banner .btn { margin-left: auto; flex: none; }
.ah-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.ah-check {
  display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 8px;
  background: #fbfcfd; border: 1px solid var(--border); font-size: 12.5px; min-width: 0;
}
.ah-check i { font-style: normal; font-weight: 700; flex: none; }
.ah-check.ok i { color: #0f7a63; }
.ah-check.no i { color: #c02626; }
.ah-check b { font-size: 13px; font-weight: 500; color: #374151; flex: none; }
.ah-check span { color: #9aa3af; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-sec { margin-top: 14px; }
.ah-sec-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ah-sec-h b { font-size: 14.5px; color: #1f2937; }
.ah-sec-h span { font-size: 12px; color: #9aa3af; }
.ah-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 9px; }
.ah-tabs button {
  border: 0; background: none; font-family: inherit; font-size: 14px; color: #6b7280;
  padding: 6px 11px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ah-tabs button.on { color: var(--brand-text, #0f766e); border-bottom-color: var(--brand); font-weight: 600; }
.ah-tabs em { font-style: normal; font-size: 11.5px; color: #9aa3af; margin-left: 3px; }
.ah-tip { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; background: #fff; }
.ah-tip-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ah-tip-h b { font-size: 14px; color: #1f2937; font-weight: 600; }
.ah-tip p { margin: 4px 0 0; font-size: 13px; color: #6b7280; line-height: 1.7; }
.ah-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ah-kv > div { border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; background: #fff; }
.ah-kv span { display: block; font-size: 11.5px; color: #9aa3af; }
.ah-kv b { font-size: 14px; color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; }
.ah-protect { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.ah-protect.ok { background: #f2fbf9; color: #0f766e; }
.ah-protect.no { background: #fffbf1; color: #8a5300; }
.ah-protect b { font-weight: 600; }
.ah-protect span { color: #6b7280; }
.ah-empty { padding: 16px; text-align: center; font-size: 13px; color: #9aa3af; }

/* --- 作品数据 --- */
.af-dlg .af-panel.ad-videos-panel { width: 880px; max-width: calc(100vw - 40px); }
.av-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.av-kpis > div { border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: #fff; }
.av-kpis span { display: block; font-size: 12px; color: #9aa3af; }
.av-kpis b { font-size: 18.5px; color: #1f2937; font-variant-numeric: tabular-nums; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.av-card { border: 1px solid var(--border); border-radius: 9px; padding: 7px; background: #fff; min-width: 0; }
.av-pic { position: relative; width: 100%; aspect-ratio: 9 / 14; border-radius: 6px; overflow: hidden; background: #eef1f3; }
.av-pic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 20.5px; font-weight: 600; color: #b6bec8;
}
.av-pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-open {
  position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 11.5px; border-radius: 4px; padding: 1px 6px; text-decoration: none;
}
.av-t { font-size: 12.5px; color: #374151; line-height: 1.45; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.av-m { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: #9aa3af; margin-top: 3px; }
.av-time { font-size: 11.5px; color: #b0b7c0; margin-top: 2px; }
.av-note { margin-top: 10px; font-size: 12px; color: #9aa3af; line-height: 1.7; }

/* --- 计划记录 --- */
.af-dlg .af-panel.ad-log-panel { width: 780px; max-width: calc(100vw - 40px); }
.al-rights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.al-right { border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: #fff; min-width: 0; }
.al-right b { display: block; font-size: 12px; color: #9aa3af; font-weight: 400; }
.al-right span { display: block; font-size: 15px; color: #1f2937; font-weight: 600; margin-top: 1px; }
.al-right em { display: block; font-style: normal; font-size: 11.5px; color: #a8b0b9; margin-top: 2px; line-height: 1.5; }
.al-right.ok { background: #f2fbf9; border-color: #cdeee6; }
.al-right.ok span { color: var(--brand-text, #0f766e); }
.al-right.no { background: #fffbf1; border-color: #f6e3bb; }
.al-right.no span { color: #8a5300; }
.al-hd { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; color: #1f2937; margin-bottom: 6px; }
.al-hd i { font-style: normal; font-size: 12px; color: #9aa3af; }
.al-list { border: 1px solid var(--border); border-radius: 9px; max-height: 340px; overflow-y: auto; }
.al-i {
  display: grid; grid-template-columns: 108px 92px minmax(0, 1fr) 62px; gap: 8px; align-items: center;
  padding: 7px 10px; border-bottom: 1px solid #f2f5f7; font-size: 12.5px;
}
.al-i:last-child { border-bottom: 0; }
.al-time { color: #8b95a1; font-variant-numeric: tabular-nums; }
.al-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.al-badges i { font-style: normal; font-size: 11.5px; background: #f1f4f7; color: #6b7280; border-radius: 4px; padding: 1px 5px; }
.al-detail { color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-by { color: #a8b0b9; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 接入设置补充 --- */
.ac-store-row { display: flex; align-items: center; gap: 8px; }
.ac-store-row .af-input { flex: 1 1 auto; min-width: 0; }
.ac-req {
  font-style: normal; font-size: 11.5px; color: #a15c00; background: #fff7e6;
  border-radius: 4px; padding: 1px 5px; margin-left: 4px;
}
.ac-diag { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.ac-diag-t { font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.ac-diag-t .ok { color: #0f7a63; }
.ac-diag-t .no { color: #b3261e; }
.ac-diag-i { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 7px; padding: 4px 0; font-size: 12.5px; }
.ac-diag-i > i { font-style: normal; font-weight: 700; }
.ac-diag-i.ok > i { color: #0f7a63; }
.ac-diag-i.no > i { color: #b3261e; }
.ac-diag-i b { color: #374151; font-weight: 600; margin-right: 6px; }
.ac-diag-i span { color: #6b7280; }
.ac-diag-i em { display: block; font-style: normal; color: #9aa3af; font-size: 12px; margin-top: 1px; }

@media (max-width: 1360px) {
  .ad-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apx { grid-template-columns: minmax(0, 1fr) 268px; }
  .apx-promo { grid-template-columns: 1fr; }
}

/* =========================================================
 * 采集箱编辑 v3：对齐店铺商品编辑页
 *   商品头 + 锚点导航（滚动时反高亮）+ 主内容 + 右侧商品信息/备注
 * ========================================================= */
.af-dlg .af-panel.cl-edit3 {
  width: 1120px; max-width: calc(100vw - 40px); max-height: 92vh;
  display: flex; flex-direction: column;
}
.af-dlg .af-panel.cl-edit3 .af-bd { padding: 0 20px; overflow-y: auto; min-height: 0; }
.af-dlg .af-panel.cl-edit3 .af-hd { flex: none; }
.af-dlg .af-panel.cl-edit3 .af-ft { flex: none; }
.ce3 { display: flex; flex-direction: column; min-height: 0; }
.ce3-top {
  position: sticky; top: 0; z-index: 4; background: #fff;
  margin: 0 -20px; padding: 0 20px; border-bottom: 1px solid var(--border);
}
.ce3-hd { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0 10px; }
.cl-thumb.ce3-pic { width: 58px; height: 58px; border-radius: 9px; }
.cl-thumb.ce3-pic > i { font-size: 23px; }
.ce3-hd-main { min-width: 0; flex: 1 1 auto; padding-top: 1px; }
.ce3-t {
  font-size: 16px; font-weight: 600; color: #1f2937; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ce3-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 6px; font-size: 12.5px; color: #9aa3af; }
.ce3-meta .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #8b95a1; }
.ce3-dim { color: #a8b0b9; }
.ce3-link { color: var(--brand-text, #0f766e); text-decoration: none; font-size: 12.5px; }
.ce3-link:hover { text-decoration: underline; }

.ce3-nav {
  display: flex; align-items: center; gap: 0; height: 38px;
  overflow-x: auto; scrollbar-width: none;
}
.ce3-nav::-webkit-scrollbar { height: 0; }
.ce3-nav-tip { font-size: 12px; color: #b0b7c0; margin-right: 8px; flex: none; letter-spacing: .5px; }
.ce3-nav-i {
  position: relative; border: 0; background: none; font-family: inherit; cursor: pointer;
  font-size: 14px; color: #6b7280; padding: 6px 12px 7px; white-space: nowrap; flex: none;
}
.ce3-nav-i + .ce3-nav-i { border-left: 1px solid #f0f2f5; }
.ce3-nav-i:hover { color: var(--text); }
.ce3-nav-i.on { color: var(--brand); font-weight: 600; }
/* 只给下划线，不给底色：有底色就像页签，用户会以为又要切页签 */
.ce3-nav-i.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2px; border-radius: 1px; background: var(--brand);
}
.ce3-nav-grow { flex: 1 1 auto; }
.ce3-nav-hint { flex: none; font-size: 12px; color: #a8b0b9; padding-left: 12px; }

.ce3-body { padding-top: 2px; }
.ce3-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.ce3-main { min-width: 0; }
.ce3-rail { position: sticky; top: 96px; display: grid; gap: 12px; padding-bottom: 4px; }
.ce3-sec {
  padding: 16px 0 18px; border-bottom: 1px solid #f0f2f5;
  scroll-margin-top: 104px;
}
.ce3-sec:last-of-type { border-bottom: 0; }
.ce3-sec-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.ce3-sec-h h3 { margin: 0; font-size: 15.5px; font-weight: 600; color: #1f2937; }
.ce3-sec-h i { font-style: normal; font-size: 12px; color: #9aa3af; }
.ce3-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; }
.ce3-f { display: grid; gap: 5px; min-width: 0; align-content: start; }
.ce3-full { grid-column: 1 / -1; }
.ce3-f > span { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #6b7280; }
.ce3-f > span em { font-style: normal; color: #e5484d; }
.ce3-q {
  font-style: normal; width: 13px; height: 13px; border-radius: 50%; border: 1px solid #d8dee4;
  color: #9aa3af; font-size: 11px; line-height: 11px; text-align: center; cursor: help; flex: none;
}
.ce3-box { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ce3-box .af-input { flex: 1 1 auto; min-width: 0; height: 34px; font-size: 14.5px; }
.ce3-full .ce3-box .af-input { padding-right: 58px; }
.ce3-cnt {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 12px; color: #b0b7c0; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.ce3-cur {
  flex: none; font-style: normal; height: 26px; padding: 0 8px; display: inline-flex; align-items: center;
  font-size: 13px; color: #6b7280; background: #f5f7f9; border: 1px solid var(--border); border-radius: 6px;
}
.ce3-unit { flex: none; font-style: normal; font-size: 12.5px; color: #9aa3af; }
.ce3-hint { display: block; font-style: normal; font-size: 12px; color: #9aa3af; line-height: 1.55; min-height: 14px; }
.ce3-ro {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px;
  border: 1px dashed var(--border-strong); border-radius: 8px; background: #fbfcfd;
  font-size: 14.5px; color: #4b5563; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce3-ro i {
  font-style: normal; font-size: 11.5px; color: #a15c00; background: #fff7e6;
  border-radius: 3px; padding: 0 4px; flex: none;
}
.ce3-catpick { display: flex; align-items: center; gap: 6px; }
.ce3-catpick .af-input { flex: 1 1 auto; min-width: 0; height: 34px; font-size: 14.5px; }
.ce3-tip { font-size: 12.5px; color: #a8b0b9; line-height: 1.7; padding: 2px 0 14px; }

.ce3-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 11px 12px; }
.ce3-card-h { display: flex; align-items: baseline; gap: 7px; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 9px; }
.ce3-card-h i { font-style: normal; font-weight: 400; font-size: 11.5px; color: #9aa3af; }
.ce3-rail-pic {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 198px; border-radius: 8px;
  overflow: hidden; background: #eef1f3; margin-bottom: 10px;
}
/* 缩略图组件默认 40×40，这里要铺满容器：只写 height:100% 在 aspect-ratio 容器里会被解析成 40px */
.cl-thumb.ce3-big { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.cl-thumb.ce3-big > i { font-size: 34.5px; }
.ce3-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.ce3-kv > div { min-width: 0; }
.ce3-kv > div.full { grid-column: 1 / -1; }
.ce3-kv span { display: block; font-size: 11.5px; color: #9aa3af; margin-bottom: 1px; }
.ce3-kv b { display: block; font-size: 13px; color: #374151; font-weight: 500; }
.ce3-kv b.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.ce3-kv b.wrap { font-weight: 400; line-height: 1.5; word-break: break-word; }
.ce3-kv b.on { color: var(--brand-text, #0f766e); font-weight: 600; }
.ce3-card-link {
  display: block; margin-top: 9px; padding-top: 8px; border-top: 1px solid #f2f5f7;
  font-size: 12.5px; color: var(--brand-text, #0f766e); text-decoration: none;
}
.ce3-card-link:hover { text-decoration: underline; }
.ce3-note { width: 100%; min-height: 96px; padding: 8px 10px; font-size: 14px; line-height: 1.7; resize: vertical; }

@media (max-width: 1180px) {
  .ce3-cols { grid-template-columns: minmax(0, 1fr) 272px; }
  .ce3-rail { position: static; }
}

/* =========================================================
 * 广告管理 v3：自定义区间 / 绿黄双线 / 指标解释 / 计划操作
 * ========================================================= */

/* --- 账号卡与 KPI 放大（原来偏小，1440 下看着发虚） --- */
.ad-hero { padding: 18px 20px; border-radius: 14px; margin-bottom: 14px; }
.ad-hero-ico { width: 46px; height: 46px; border-radius: 13px; }
.ad-hero-ico .ad-ico { width: 21px; height: 21px; }
.ad-hero-t { font-size: 18.5px; }
.ad-hero-s { font-size: 14px; margin-top: 5px; }
.ad-hero-kpis { gap: 34px; }
.ad-hero-kpis span { font-size: 13px; }
.ad-hero-kpis b { font-size: 25.5px; }
.ad-kpi { gap: 12px; margin-bottom: 14px; }
.ad-k { padding: 14px 15px; border-radius: 12px; }
.ad-k-l { font-size: 14.5px; }
.ad-k-v { font-size: 27.5px; margin: 6px 0 4px; }
.ad-k-f { font-size: 12.5px; }
.ad-k-ck { top: 12px; right: 12px; }

/* --- 指标解释：问号 + 黑底气泡（点一下钉住） --- */
.ad-k-l { position: relative; display: block; padding-right: 20px; }
.ad-k-q {
  position: absolute; right: 0; top: -1px; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid #cfd6dd; color: #9aa3af; font-style: normal; font-size: 11.5px; line-height: 12px;
  text-align: center; cursor: help; font-weight: 600; background: #fff;
}
.ad-k-q:hover, .ad-k-q.show { border-color: var(--brand); color: var(--brand-text, #0f766e); }
.ad-k-pop {
  position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translate(-50%, 4px);
  width: 238px; background: #1f2937; color: #fff; font-size: 13px; line-height: 1.7;
  font-weight: 400; text-align: left; border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .24); opacity: 0; visibility: hidden;
  transition: opacity .12s, transform .12s; z-index: 30; pointer-events: none; white-space: normal;
}
.ad-k-pop::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: #1f2937;
}
.ad-k-q:hover .ad-k-pop, .ad-k-q.show .ad-k-pop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ad-kpi .ad-k:first-child .ad-k-pop { left: 0; transform: translate(0, 4px); }
.ad-kpi .ad-k:first-child .ad-k-q:hover .ad-k-pop,
.ad-kpi .ad-k:first-child .ad-k-q.show .ad-k-pop { transform: translate(0, 0); }
.ad-kpi .ad-k:first-child .ad-k-pop::after { left: 12px; }
.ad-kpi .ad-k:last-child .ad-k-pop { left: auto; right: 0; transform: translate(0, 4px); }
.ad-kpi .ad-k:last-child .ad-k-q:hover .ad-k-pop,
.ad-kpi .ad-k:last-child .ad-k-q.show .ad-k-pop { transform: translate(0, 0); }
.ad-kpi .ad-k:last-child .ad-k-pop::after { left: auto; right: 12px; }

/* --- 折线提示框：Nov 14 + 指标（当前店铺）+ 右对齐数值 --- */
.ad-tip { width: 248px; padding: 9px 11px; gap: 3px; }
.ad-tip-h { font-size: 14px; font-weight: 650; color: #1f2937; margin-bottom: 3px; }
.ad-tip-r { display: flex; align-items: center; gap: 6px; }
.ad-tip-l {
  font-size: 12.5px; font-weight: 400; color: #6b7280; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-tip-r em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 600; color: #1f2937; white-space: nowrap; }

/* --- 自定义日期 --- */
.ad-rangebtn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 14.5px; color: #374151; cursor: pointer; font-variant-numeric: tabular-nums;
}
.ad-rangebtn:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); }
.ad-rangebtn .ad-ico { width: 15px; height: 15px; color: #8b95a1; }
.ad-caret { font-style: normal; font-size: 11.5px; color: #a8b0b9; }
.ad-dr {
  position: fixed; z-index: 420; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; overflow: hidden;
}
.ad-dr-quick {
  width: 132px; flex: none; padding: 8px; border-right: 1px solid var(--border);
  background: #fbfcfd; display: flex; flex-direction: column; gap: 3px;
}
.ad-dr-quick button {
  border: 0; background: none; text-align: left; font-family: inherit; font-size: 14px;
  color: #4b5563; padding: 7px 9px; border-radius: 7px; cursor: pointer;
}
.ad-dr-quick button:hover { background: #fff; color: var(--brand-text, #0f766e); }
.ad-dr-main { flex: 1 1 auto; min-width: 0; padding: 10px 12px 0; display: flex; flex-direction: column; }
.ad-dr-h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ad-dr-h b { flex: 1 1 0; text-align: center; font-size: 14.5px; font-weight: 600; color: #1f2937; }
.ad-dr-nav {
  width: 26px; height: 26px; border: 1px solid transparent; border-radius: 7px; background: none;
  color: #6b7280; cursor: pointer; font-size: 15px; line-height: 1;
}
.ad-dr-nav:hover { background: #f3f6f8; color: #1f2937; }
.ad-dr-grids { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ad-dr-w { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.ad-dr-w span { text-align: center; font-size: 12px; color: #a8b0b9; padding: 4px 0; }
.ad-dr-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ad-dr-d {
  height: 30px; border: 0; background: none; border-radius: 6px; font-family: inherit;
  font-size: 14px; color: #374151; cursor: pointer; font-variant-numeric: tabular-nums;
}
.ad-dr-d:hover { background: #f1f6f5; }
.ad-dr-d.out { cursor: default; }
.ad-dr-d.out:hover { background: none; }
.ad-dr-d.today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.ad-dr-d.in { background: #e6f6f2; color: #0f766e; border-radius: 0; }
.ad-dr-d.start, .ad-dr-d.end { background: var(--brand); color: #fff; font-weight: 600; }
.ad-dr-d.start { border-radius: 7px 0 0 7px; }
.ad-dr-d.end { border-radius: 0 7px 7px 0; }
.ad-dr-d.start.end { border-radius: 7px; }
.ad-dr-f {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 9px 0 10px; border-top: 1px solid #f2f5f7;
}
.ad-dr-f > span { font-size: 13px; color: #6b7280; font-variant-numeric: tabular-nums; }
.ad-dr-fb { margin-left: auto; display: flex; gap: 8px; }

/* --- 计划行内操作 --- */
.ad-pname { gap: 1px; }
.ad-pn { font-size: 15px; }
.ad-pacts { display: flex; align-items: center; gap: 10px; margin-top: 3px; }
.ad-pact {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0;
  font-family: inherit; font-size: 12.5px; color: #6b7280; cursor: pointer;
}
.ad-pact:hover { color: var(--brand-text, #0f766e); text-decoration: underline; }
.ad-pact .ad-ico { width: 12px; height: 12px; }
.ad-pact-more {
  margin-left: 2px; font-size: 16px; line-height: 1; color: #9aa3af; padding: 0 3px; border-radius: 4px;
}
.ad-pact-more:hover { color: #374151; background: #f3f6f8; text-decoration: none; }
.ad-tbl td { padding: 10px; }
.ad-tbl-c td { padding: 11px 10px; }

/* --- 健康与洞察列 --- */
.ad-health-cell { gap: 2px; }
.ad-h-lv { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; }
.ad-h-lv i {
  width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; color: #fff; font-size: 11px; font-style: normal; flex: none;
}
.ad-h-lv.good { color: #0f7a63; }
.ad-h-lv.good i { background: #12b76a; }
.ad-h-lv.good i::before { content: "✓"; }
.ad-h-lv.fair { color: #a15c00; }
.ad-h-lv.fair i { background: #f79009; }
.ad-h-lv.fair i::before { content: "!"; }
.ad-h-lv.poor { color: #c02626; }
.ad-h-lv.poor i { background: #f04438; }
.ad-h-lv.poor i::before { content: "×"; }

/* --- 更多菜单里的图标 --- */
.ad-pop-i span { display: inline-flex; align-items: center; gap: 7px; }
.ad-pop-i .ad-ico { width: 14px; height: 14px; color: #8b95a1; }
.ad-pop-i:hover .ad-ico { color: inherit; }
.ad-pop-i.danger, .ad-pop-i.danger .ad-ico { color: #c02626; }

/* --- 数据分析 --- */
.af-dlg .af-panel.ad-ana-panel { width: 880px; max-width: calc(100vw - 40px); }
.ana-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ana-kpis > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; }
.ana-kpis span { display: block; font-size: 12.5px; color: #8b95a1; }
.ana-kpis b { display: block; font-size: 19.5px; color: #1f2937; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ana-chart { margin-bottom: 10px; }
.ana-tip { font-size: 12.5px; color: #9aa3af; line-height: 1.7; }

/* --- 接口说明 --- */
.af-dlg .af-panel.ad-cap-panel { width: 780px; max-width: calc(100vw - 40px); }
.ad-cap-sec { margin-bottom: 14px; }
.ad-cap-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.ad-cap-h b { font-size: 14.5px; color: #1f2937; }
.ad-cap-h span { font-size: 12px; color: #a8b0b9; }
.ad-cap-i { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f4f6f8; }
.ad-cap-i:last-child { border-bottom: 0; }
.ad-cap-i > i {
  width: 16px; height: 16px; border-radius: 50%; flex: none; font-style: normal; font-size: 11.5px;
  line-height: 16px; text-align: center; color: #fff; margin-top: 2px;
}
.ad-cap-i.ok > i { background: #12b76a; }
.ad-cap-i.read > i { background: #0ea5e9; }
.ad-cap-i.local > i { background: #c0c7cf; }
.ad-cap-i > div { min-width: 0; }
.ad-cap-i b { display: block; font-size: 14px; color: #374151; font-weight: 600; }
.ad-cap-i span { display: block; font-size: 12.5px; color: #8b95a1; line-height: 1.6; margin-top: 1px; }
.ad-cap-i em {
  display: block; font-style: normal; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: #b0b7c0; margin-top: 2px; word-break: break-all;
}
.ad-cap-note { font-size: 12.5px; color: #8a5300; background: #fff8ec; border: 1px solid #ffe2b8; border-radius: 8px; padding: 8px 11px; line-height: 1.7; }
.ad-cap-note.warn { margin: 10px 0; }

/* --- 推广商品：多个 / 全店 --- */
#apx-prod { margin-bottom: 8px; }
.apx-plist { display: flex; flex-direction: column; gap: 6px; max-height: 268px; overflow-y: auto; }
.apx-prow {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 9px; background: #fbfcfd;
}
.apx-ppic { position: relative; width: 40px; height: 40px; border-radius: 7px; overflow: hidden; background: #eef1f3; flex: none; }
.apx-ppic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 16px; font-weight: 600; color: #b6bec8;
}
.apx-ppic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.apx-pmeta { min-width: 0; flex: 1 1 auto; }
.apx-pmeta b {
  display: block; font-size: 14px; font-weight: 500; color: #1f2937; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.apx-pmeta em { font-style: normal; font-size: 12px; color: #a8b0b9; }
.apx-pdel {
  width: 22px; height: 22px; border: 0; background: none; border-radius: 5px;
  color: #b0b7c0; font-size: 17px; line-height: 1; cursor: pointer; flex: none;
}
.apx-pdel:hover { background: #fdecec; color: #c02626; }
.apx-prod-ops { display: flex; gap: 6px; margin-top: 8px; }
.apx-pall {
  display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--border-strong);
  border-radius: 10px; padding: 12px 14px; background: #fbfcfd;
}
.apx-pall-ico {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft, #eafaf7);
  color: var(--brand-text, #0f766e); display: flex; align-items: center; justify-content: center; flex: none;
}
.apx-pall-ico .ad-ico { width: 16px; height: 16px; }
.apx-pall b { display: block; font-size: 14.5px; color: #1f2937; }
.apx-pall span { display: block; font-size: 12.5px; color: #8b95a1; line-height: 1.6; margin-top: 2px; }

/* --- 商品选择器：全店 + 多选 --- */
.app-all {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd;
  padding: 10px 12px; margin-bottom: 10px; font-family: inherit; cursor: pointer;
}
.app-all.on { border-color: var(--brand); background: #f2fbf9; }
.app-all .app-ck {
  width: 18px; height: 18px; opacity: 1; border: 1px solid #d8dee4; background: #fff;
  color: #fff; border-radius: 5px; flex: none; line-height: 16px;
}
.app-all.on .app-ck { background: var(--brand); border-color: var(--brand); }
.app-all-t { display: grid; gap: 1px; min-width: 0; }
.app-all-t b { font-size: 14.5px; color: #1f2937; font-weight: 600; }
.app-all-t em { font-style: normal; font-size: 12.5px; color: #8b95a1; }
.app-i { grid-template-columns: 20px 46px minmax(0, 1fr) 150px; }
.app-i .app-ck { border: 1px solid #d8dee4; background: #fff; color: #fff; border-radius: 5px; opacity: 1; width: 18px; height: 18px; line-height: 16px; }
.app-i.on .app-ck { background: var(--brand); border-color: var(--brand); }

/* --- 计划弹窗小件 --- */
.apx-q {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  border-radius: 50%; border: 1px solid #d8dee4; color: #9aa3af; font-style: normal; font-size: 11.5px;
  font-weight: 600; cursor: help; vertical-align: 1px; margin-left: 2px;
}
.apx-q:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); }
.apx-pro-note { margin: 0 0 9px; font-size: 13px; color: #8b95a1; line-height: 1.7; }
.apx-aff { display: inline-flex; align-items: center; gap: 8px; }
.apx-aff em { font-style: normal; font-size: 12.5px; color: #8b95a1; }
.apx-ck-who {
  font-style: normal; font-size: 11.5px; color: var(--brand-text, #0f766e);
  background: #eef8f5; border-radius: 3px; padding: 0 4px; margin-right: 4px;
}
.apx-empty span { display: block; font-size: 12px; color: #b0b7c0; margin-top: 4px; line-height: 1.6; }
.av-who { font-size: 11.5px; color: var(--brand-text, #0f766e); margin-top: 2px; }

@media (max-width: 1280px) {
  .ana-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad-hero-kpis { gap: 20px; }
}
@media (max-width: 1024px) {
  .ad-dr { flex-direction: column; }
  .ad-dr-quick { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
  .ad-dr-grids { grid-template-columns: 1fr; }
}

/* =========================================================
 * 采集箱编辑：全屏版式（对齐店铺产品编辑页）
 * 左栏本页商品 + 商品头 + 锚点导航 + 内容/右栏 + 底部保存
 * ========================================================= */
.af-dlg .af-panel.cl-edit4 {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0; padding: 0; display: flex; flex-direction: row;
  overflow: hidden; animation: afpop .16s var(--ease);
}

.ce4-side {
  width: 252px; flex: none; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; background: #fbfcfd; min-height: 0;
}
.ce4-side-h { padding: 12px 13px 10px; border-bottom: 1px solid #eef1f4; flex: none; }
.ce4-side-t { font-size: 13px; color: var(--muted); }
.ce4-side-t b { color: #374151; font-weight: 600; }
.ce4-side-q { width: 100%; height: 28px; margin-top: 8px; padding: 3px 8px; font-size: 14px; }
.ce4-side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; }
.ce4-side-empty { font-size: 13px; color: #a8b0b9; text-align: center; padding: 22px 0; }
.ce4-side-ft {
  flex: none; padding: 9px 13px; border-top: 1px solid #eef1f4;
  font-size: 12px; color: #a8b0b9; font-variant-numeric: tabular-nums;
}
.ce4-side-i {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; border-radius: 8px;
  padding: 6px; font-family: inherit; cursor: pointer; margin-bottom: 2px;
}
.ce4-side-i:hover { background: #f3f6f8; }
.ce4-side-i.on { background: #fff; border-color: var(--brand-soft-strong); }
.ce4-side-i .t { min-width: 0; flex: 1 1 auto; display: grid; gap: 1px; }
.ce4-side-i .t b {
  font-size: 13px; font-weight: 500; color: #1f2937; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce4-side-i .t i {
  font-style: normal; font-size: 11.5px; color: #a8b0b9;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce4-side-i .t em {
  justify-self: start; font-style: normal; font-size: 11px; line-height: 14px;
  border-radius: 4px; padding: 0 5px; background: #f1f4f7; color: #6b7280;
}
.ce4-side-i .t em.green { background: #e9f7f1; color: #0f7a63; }
.ce4-side-i .t em.blue { background: #eef4ff; color: #2f5fd0; }
.ce4-side-i .t em.amber { background: #fff7e6; color: #a15c00; }

.cl-thumb.ce4-sthumb { width: 36px; height: 36px; border-radius: 6px; flex: none; }
.cl-thumb.ce4-sthumb > i { font-size: 15px; }

.ce4-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.ce4-hd {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 20px 10px; border-bottom: 1px solid var(--border); flex: none;
}
.ce4-eyebrow { font-size: 11.5px; color: #a8b0b9; letter-spacing: .04em; margin-bottom: 2px; }
.ce4-x {
  margin-left: auto; width: 30px; height: 30px; border: 0; background: none; border-radius: 7px;
  font-size: 23px; line-height: 1; color: #8b95a1; cursor: pointer; flex: none;
}
.ce4-x:hover { background: #f3f6f8; color: #1f2937; }
.ce4-main > .ce3-nav { padding: 0 20px; border-bottom: 1px solid var(--border); flex: none; background: #fff; }
.ce4-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 20px 10px; }
.ce4-ft {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-top: 1px solid var(--border); background: #fff;
}
.ce4-ft .spm-msg { margin-right: auto; }
.ce4-ftb { display: flex; gap: 8px; margin-left: auto; }

@media (max-width: 1180px) {
  .ce4-side { width: 220px; }
}

/* 全屏编辑里右栏不要按弹窗偏移，直接贴内容区顶部 */
.ce4-body .ce3-rail { top: 0; }

/* 接口说明内容偏长：放到 92vh 并压紧行距，一屏能看完三段 */
.af-dlg .af-panel.ad-cap-panel { max-height: 92vh; }
.ad-cap-i { padding: 6px 0; }
.ad-cap-i b { font-size: 13px; }
.ad-cap-i span { font-size: 12px; line-height: 1.55; }
.ad-cap-i em { font-size: 11.5px; }
.ad-cap-note { font-size: 12px; }

/* 接口路径跟标题同一行，省掉每行一条独立代码行的高度 */
.ad-cap-i em {
  display: inline; margin-left: 8px; font-size: 11.5px; color: #a8b0b9; word-break: break-all;
}

/* 日历格：按钮自带全局 padding，会把 1fr 的列撑得忽宽忽窄 —— 必须清零并用 minmax(0,1fr) */
.ad-dr-w, .ad-dr-g { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ad-dr-d { padding: 0; min-width: 0; }
.ad-dr-nav { padding: 0; }

/* =========================================================
 * 通用：编辑弹窗关闭按钮（原来 20px 的 ×，命中区太小）
 * ========================================================= */
.spm-x {
  width: 32px; height: 32px; flex: none; padding: 0; margin: -3px -5px -3px 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; color: #8b95a1; border-radius: 8px;
  transition: background .12s, color .12s;
}
.spm-x:hover { background: #f1f4f7; color: #1f2937; }
.spm-x:active { background: #e8edf1; }

/* =========================================================
 * 采集箱编辑：与店铺产品编辑页共用 .spm，只补独有小件
 * ========================================================= */
.spm-side-i .cl-thumb { width: 38px; height: 38px; border-radius: 4px; }
.spm-side-i .cl-thumb > i { font-size: 15px; }

.cl4-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
.cl4-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.cl4-2 > .spm-fld, .cl4-3 > .spm-fld { min-width: 0; }

.cl4-ro {
  display: flex; align-items: center; min-height: 38px; padding: 8px 11px;
  border: 1px solid #eef1f4; border-radius: 8px; background: #fafbfc;
  font-size: 14.5px; color: #4b5563; line-height: 1.55; word-break: break-word;
}
.cl4-ro.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: #6b7280; }

.cl4-unit { position: relative; }
.cl4-unit .af-input { width: 100%; height: 38px; padding-right: 54px; font-size: 15px; }
.cl4-unit > em {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 12.5px; color: #9aa3af; pointer-events: none; max-width: 46px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.cl4-desc {
  max-height: 170px; overflow-y: auto; padding: 10px 12px;
  border: 1px solid #eef1f4; border-radius: 8px; background: #fafbfc;
  font-size: 14px; line-height: 1.9; color: #4b5563; white-space: pre-wrap; word-break: break-word;
}

.cl4-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.cl4-stats > div { border: 1px solid #eef1f4; border-radius: 9px; background: #fbfcfd; padding: 9px 12px; min-width: 0; }
.cl4-stats span { display: block; font-size: 12px; color: #9aa3af; }
.cl4-stats b {
  display: block; font-size: 16px; color: #1f2937; margin-top: 3px;
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.cl4-tblwrap { border: 1px solid var(--border); border-radius: 10px; overflow: auto; max-height: 400px; }
.cl4-tbl { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.cl4-tbl th {
  position: sticky; top: 0; z-index: 1; background: #f7f9fa; text-align: left;
  font-size: 12.5px; font-weight: 500; color: #6b7280; padding: 8px 10px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.cl4-tbl th.num, .cl4-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cl4-tbl td { padding: 8px 10px; border-bottom: 1px solid #f4f6f8; font-size: 14px; color: #374151; }
.cl4-tbl tbody tr:last-child td { border-bottom: 0; }
.cl4-tbl tbody tr:hover { background: #fbfcfd; }
.cl4-tbl td b { font-weight: 500; }
.cl4-dim { color: #9aa3af; }

.cl4-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 10px; }
.cl4-img {
  margin: 0; position: relative; aspect-ratio: 1; overflow: hidden;
  border: 1px solid var(--border); border-radius: 9px; background: #f4f6f8;
}
.cl4-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cl4-img.main { border-color: var(--brand-soft-strong); box-shadow: 0 0 0 1px var(--brand-soft-strong); }
.cl4-img figcaption {
  position: absolute; left: 6px; bottom: 6px; padding: 0 6px; border-radius: 4px;
  background: rgba(15, 23, 42, .62); color: #fff; font-size: 11.5px; line-height: 15px;
}
.cl4-img.main figcaption { background: var(--brand); }

.cl4-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 10px;
  font-size: 13px; color: var(--brand-text, #0f766e); text-decoration: none;
}
.cl4-link:hover { text-decoration: underline; }
.spm-head-ops .cl4-link { margin-top: 0; }
.spm-head-ops .cl-badge { align-self: center; }

@media (max-width: 1080px) {
  .cl4-2, .cl4-3 { grid-template-columns: minmax(0, 1fr); }
  .cl4-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
 * 广告管理 v4：日期控件 / 导出 / 计划列表（照 TikTok 后台）
 * ========================================================= */
.ad-head-actions { flex-wrap: wrap; justify-content: flex-end; }

/* --- 日期区间控件：时区文字 + 起止输入框 + 导出 --- */
.ad-dater { display: inline-flex; align-items: center; gap: 8px; }
.ad-tz { font-size: 13px; color: #8b95a1; white-space: nowrap; }
.ad-datebtn {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 12px;
  border: 1px solid #d8dee4; border-radius: 6px; background: #fff;
  font-family: inherit; font-size: 14.5px; color: #1f2937; cursor: pointer;
  font-variant-numeric: tabular-nums; letter-spacing: .1px;
}
.ad-datebtn:hover { border-color: var(--brand); }
.ad-datebtn .ad-ico { width: 15px; height: 15px; color: #8b95a1; flex: none; }
.ad-datebtn.sm { height: 30px; font-size: 14px; padding: 0 9px 0 10px; gap: 8px; }
.ad-datebtn.sm .ad-ico { width: 14px; height: 14px; }

.ad-iconbtn {
  position: relative; width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d8dee4; border-radius: 6px; background: #f7f8f9;
  color: #4b5563; cursor: pointer;
}
.ad-iconbtn:hover { background: #eef1f4; color: #1f2937; border-color: #cfd6dd; }
.ad-iconbtn .ad-ico { width: 16px; height: 16px; }
.ad-iconbtn.on { border-color: var(--brand); color: var(--brand-text, #0f766e); background: #f2fbf9; }
.ad-iconbtn::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 9px);
  transform: translateX(-50%); background: #374151; color: #fff;
  font-size: 12.5px; line-height: 1; padding: 6px 8px; border-radius: 5px;
  white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .12s;
  pointer-events: none; z-index: 45;
}
.ad-iconbtn::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px); margin-left: -4px;
  border: 4px solid transparent; border-top-color: #374151;
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 45;
}
.ad-iconbtn:hover::after, .ad-iconbtn:hover::before { opacity: 1; visibility: visible; }

/* --- 计划页：模式切换 + 搜索 + 子页签 --- */
/* ---------------- 广告二级功能页 ---------------- */
.ad-subnav {
  display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border);
  margin: 2px 0 14px; padding-bottom: 0;
}
.ad-subnav button {
  border: 0; background: none; font-family: inherit; font-size: 14.5px; color: #6b7280;
  padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: 6px 6px 0 0;
}
.ad-subnav button:hover { color: #111827; background: #f7f9fa; }
.ad-subnav button.on { color: var(--brand-text); border-bottom-color: var(--brand); font-weight: 600; background: none; }

/* 创意作品：4 个指标卡（浅品牌底，跟后台一样） */
.ad-wks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ad-wk {
  border: 1px solid var(--brand-soft-strong); background: #f4fbf9;
  border-radius: 10px; padding: 12px 14px 13px;
}
.ad-wk > span { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #6b7280; }
.ad-wk b { display: block; font-size: 25.5px; line-height: 1.2; margin: 7px 0 3px; color: #0f766e; font-variant-numeric: tabular-nums; }
.ad-wk em { font-style: normal; font-size: 12px; color: #9aa3af; }
.ad-search-sm { width: 220px; }
.ad-search-sm .af-input { height: 30px; }
.ad-acc { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #374151; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ad-ava {
  width: 20px; height: 20px; border-radius: 50%; background: #eef2f5; color: #6b7280;
  font-style: normal; font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.ad-wprod { font-size: 14px; color: #566070; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-auth { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.ad-auth i { width: 6px; height: 6px; border-radius: 50%; background: #c9d1d9; display: block; }
.ad-auth.ok { color: #0f766e; }
.ad-auth.ok i { background: #12a594; }
.ad-auth.no { color: #9aa3af; }
.ad-wdetail { font-size: 13px; color: #566070; }
.ad-tbl-works th, .ad-tbl-works td { padding-left: 8px; padding-right: 8px; }

/* 未接入页 */
.ad-soon {
  max-width: 640px; margin: 26px auto 40px; text-align: center;
  border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 30px 30px 24px;
}
.ad-soon-ico {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-text);
  display: flex; align-items: center; justify-content: center;
}
.ad-soon-ico .ad-ico { width: 22px; height: 22px; }
.ad-soon-t { font-size: 18.5px; font-weight: 600; color: #1f2937; }
.ad-soon-s { font-size: 14px; color: #8b95a1; margin-top: 5px; }
.ad-soon-why, .ad-soon-can {
  text-align: left; margin-top: 16px; padding: 12px 14px;
  border-radius: 9px; background: #fbfcfd; border: 1px solid #eef1f4;
}
.ad-soon-why b, .ad-soon-can b { font-size: 13px; color: #6b7280; font-weight: 600; }
.ad-soon-why p { margin: 6px 0 0; font-size: 14.5px; color: #374151; line-height: 1.75; }
.ad-soon-can ul { margin: 6px 0 0; padding-left: 18px; }
.ad-soon-can li { font-size: 14.5px; color: #374151; line-height: 1.85; }
.ad-soon-act { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* 概览块与计划列表合并成一页：上面账号卡 / 指标 / 趋势，下面计划列表 */
.ad-ovh { display: block; }
.ad-split { height: 1px; background: var(--border); margin: 2px 0 16px; }
.ad-card-trend .ad-card-h { align-items: baseline; }
.ad-pv { min-width: 0; }
.ad-pv-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ad-modes { display: flex; gap: 8px; }
.ad-mode {
  height: 32px; padding: 0 13px; border: 1px solid #d8dee4; border-radius: 6px;
  background: #fff; font-family: inherit; font-size: 14.5px; color: #4b5563; cursor: pointer;
  white-space: nowrap;
}
.ad-mode:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); }
.ad-mode.on {
  border-color: var(--brand); background: #f2fbf9; color: var(--brand-text, #0f766e); font-weight: 600;
}
.ad-pv-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-search-lg { width: 330px; }
.ad-search-lg .af-input { height: 30px; }

.ad-subtabs {
  display: flex; align-items: center; gap: 2px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.ad-subtabs > button {
  position: relative; border: 0; background: none; font-family: inherit;
  font-size: 14.5px; color: #6b7280; padding: 9px 12px 10px; cursor: pointer; white-space: nowrap;
}
.ad-subtabs > button:hover { color: #1f2937; }
.ad-subtabs > button.on { color: var(--brand-text, #0f766e); font-weight: 600; }
.ad-subtabs > button.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  border-radius: 1px; background: var(--brand);
}
.ad-subtabs .grow { flex: 1 1 auto; }
.ad-colbtn, .ad-exportbtn {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border: 1px solid #d8dee4; border-radius: 6px; background: #fff;
  font-family: inherit; font-size: 14px; color: #374151; cursor: pointer; white-space: nowrap;
}
.ad-colbtn:hover, .ad-exportbtn:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); }
.ad-colbtn { margin-right: 8px; }
.ad-colbtn .ad-ico, .ad-exportbtn .ad-ico { width: 14px; height: 14px; color: #6b7280; }
.ad-fchip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  margin-right: 6px; border-radius: 12px; background: #eef7f5; color: #0f766e; font-size: 12.5px;
}
.ad-fchip i { font-style: normal; cursor: pointer; opacity: .55; font-size: 14px; }
.ad-fchip i:hover { opacity: 1; }

/* --- 计划表 --- */
.ad-tblw { border: 1px solid var(--border); border-radius: 10px; overflow: auto; background: #fff; }
.ad-tblw::-webkit-scrollbar { height: 10px; }
.ad-tblw::-webkit-scrollbar-thumb { background: #dfe4e9; border-radius: 5px; }
.ad-tbl2 { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.ad-tbl2 th {
  background: #f7f9fa; text-align: left; font-size: 13px; font-weight: 500; color: #6b7280;
  padding: 0 10px; height: 38px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ad-tbl2 th.num, .ad-tbl2 td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ad-tbl2 td {
  padding: 9px 10px; border-bottom: 1px solid #f2f5f7; font-size: 14.5px;
  color: #374151; vertical-align: middle;
}
.ad-tbl2 tbody tr:last-child td { border-bottom: 0; }
.ad-tbl2 tbody tr:hover td { background: #fbfcfd; }
.ad-tbl2 .ad-th-sw { padding: 0; }
.ad-tbl2 .ad-td-sw { padding: 9px 4px 9px 12px; }
.ad-tbl2 .ad-th-sort { cursor: pointer; user-select: none; }
.ad-tbl2 .ad-th-sort:hover { color: #374151; }
.ad-sort { font-style: normal; margin-left: 3px; font-size: 11.5px; color: #9aa3af; }

.ad-st { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: #374151; white-space: nowrap; }
.ad-st-dot { width: 6px; height: 6px; border-radius: 50%; background: #b0b7c0; flex: none; }
.ad-st-dot.green { background: #12b76a; }
.ad-st-dot.gray { background: #b0b7c0; }
.ad-st-dot.amber { background: #f79009; }
.ad-st-dot.red { background: #f04438; }
.ad-st-dot.blue { background: #2f5fd0; }
.ad-st-sub { display: block; font-style: normal; font-size: 11.5px; color: #a8b0b9; margin-top: 2px; }

.ad-boost { display: flex; flex-direction: column; gap: 1px; }
.ad-boost span {
  position: relative; padding-left: 10px; font-size: 12.5px; line-height: 1.6;
  color: #9aa3af; white-space: nowrap;
}
.ad-boost span::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 4px; height: 4px;
  border-radius: 50%; background: #d2d8de;
}
.ad-boost span.on { color: #4b5563; }
.ad-boost span.on::before { background: var(--brand); }

.ad-bd { display: flex; flex-direction: column; gap: 1px; }
.ad-bd em { font-style: normal; font-size: 12px; color: #9aa3af; line-height: 1.4; }
.ad-bd b { font-size: 14.5px; color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; }

.ad-h-sub { font-style: normal; font-size: 12px; color: #a8b0b9; line-height: 1.5; }
.ad-prot { display: block; font-size: 12.5px; line-height: 1.55; color: #9aa3af; }
.ad-prot.on { color: #4b5563; }
.ad-dim { color: #9aa3af; }
.ad-nowrap { white-space: nowrap; }
.ad-cost { font-weight: 600; color: #1f2937; font-variant-numeric: tabular-nums; }

/* --- 商品页签 --- */
.ad-prodcell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ad-prodpic {
  position: relative; width: 34px; height: 34px; border-radius: 6px; overflow: hidden;
  background: #eef1f3; flex: none;
}
.ad-prodpic > i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 15px; font-weight: 600; color: #b6bec8;
}
.ad-prodpic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-prodt { min-width: 0; }
.ad-prodt b {
  display: block; font-size: 14.5px; font-weight: 500; color: #1f2937;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-prodt em { font-style: normal; font-size: 11.5px; color: #a8b0b9; }
/* 商品 / 创意素材页签的补充件 */
.ad-prodpic.sm { width: 30px; height: 30px; }
.ad-prodt em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-dim2 { display: block; font-style: normal; font-size: 11.5px; color: #a8b0b9; line-height: 1.5; margin-top: 1px; }
.ad-omode { font-size: 14px; color: #374151; }
.ad-tbl-cr td { vertical-align: middle; }
.ad-tbl-cr td { font-size: 14px; }
.ad-tbl-cr th, .ad-tbl-cr td { padding-left: 8px; padding-right: 8px; }
/* 窄屏横向滚动时，素材列钉在左边，不至于一滑就没了商品身份 */
.ad-tbl-cr th:first-child, .ad-tbl-cr td:first-child {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 6px 0 8px -8px rgba(15, 23, 42, .25);
}
.ad-tbl-cr th:first-child { background: #f7f9fa; z-index: 3; }

/* --- 说明与图片卡 --- */
.ad-note { margin: 10px 0 0; font-size: 12.5px; color: #8b95a1; line-height: 1.75; }
.ad-note.top { margin: 0 0 10px; }
.ad-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: #f3f5f7; padding: 1px 4px; border-radius: 3px; color: #6b7280;
}
.ad-cw { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; }
.ad-cw-i { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; min-width: 0; }
.ad-cw-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ad-cw-h b { font-size: 14.5px; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-cw-s {
  font-size: 12.5px; color: #9aa3af; margin: 4px 0 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- 筛选浮层 --- */
.ad-pop-filter { width: 256px; padding: 11px 12px 10px; }
.ad-frow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ad-frow > span { width: 36px; flex: none; font-size: 13px; color: #6b7280; }
.ad-frow .ad-sel { flex: 1 1 auto; min-width: 0; height: 30px; font-size: 14px; }

/* --- 计划权益弹窗 --- */
.af-dlg .af-panel.ad-rights-panel { width: 620px; max-width: calc(100vw - 40px); }
.rt-i { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid #f4f6f8; }
.rt-i:last-of-type { border-bottom: 0; }
.rt-i > i {
  width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11.5px; color: #fff; background: #c0c7cf;
}
.rt-i.on > i { background: #12b76a; }
.rt-i b { display: block; font-size: 14.5px; color: #1f2937; font-weight: 600; }
.rt-i span { display: block; font-size: 13px; color: #8b95a1; line-height: 1.7; margin-top: 2px; }

@media (max-width: 1280px) {
  .ad-search-lg { width: 220px; }
  .ad-pv-right { width: 100%; margin-left: 0; }
}

/* 计划页顶栏按后台分两行：模式按钮一行，搜索 + 日期一行 */
.ad-modes { margin-bottom: 10px; }
.ad-pv-top { justify-content: space-between; margin-bottom: 10px; }

/* 列 / 导出 是普通按钮，不要吃子页签的按钮样式 */
.ad-subtabs > button.ad-colbtn,
.ad-subtabs > button.ad-exportbtn {
  padding: 0 10px 0 9px; font-size: 14px; color: #374151; font-weight: 400;
  border: 1px solid #d8dee4; border-radius: 6px; background: #fff;
}
.ad-subtabs > button.ad-colbtn:hover,
.ad-subtabs > button.ad-exportbtn:hover { color: var(--brand-text, #0f766e); border-color: var(--brand); }
.ad-subtabs > button.ad-colbtn::after,
.ad-subtabs > button.ad-exportbtn::after { content: none; }

/* 关闭按钮：加个浅底，一眼能看出是可点的按钮（原来只有一个小 ×） */
.spm-x {
  width: 34px; height: 34px; margin: -4px -6px -4px 0;
  background: #f3f5f7; color: #6b7280; font-size: 23px;
}
.spm-x:hover { background: #e7ecf1; color: #111827; }

/* 页头的图标按钮贴着页面顶，提示气泡改到下方，否则被视口裁掉 */
.ad-head-actions .ad-iconbtn::after { top: calc(100% + 9px); bottom: auto; }
.ad-head-actions .ad-iconbtn::before {
  top: calc(100% + 4px); bottom: auto; margin-left: -4px;
  border-top-color: transparent; border-bottom-color: #374151;
}

/* =========================================================
 * 采集箱编辑页 v6：描述富文本 / 多规格 SKU / 图片批量 / 尺寸视频 / 物流货源
 * ========================================================= */

/* --- 详情描述：工具条 + 可视化编辑区 --- */
.cl4-rt { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #fff; }
.cl4-rt-bar {
  display: flex; align-items: center; gap: 2px; padding: 5px 8px;
  border-bottom: 1px solid #f0f2f5; background: #fafbfc; flex-wrap: wrap;
}
.cl4-rt-bar button {
  min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px;
  background: none; font-family: inherit; font-size: 14px; color: #4b5563; cursor: pointer; line-height: 1;
}
.cl4-rt-bar button:hover { background: #eef1f4; color: #111827; }
.cl4-rt-bar button.on { background: #e6f4f0; color: #0f766e; border-color: #bfe4da; }
.cl4-rt-div { width: 1px; height: 16px; background: #e3e8ec; margin: 0 4px; }
.cl4-rt-bar .grow { flex: 1 1 auto; }
.cl4-rt-body {
  min-height: 168px; max-height: 360px; overflow-y: auto;
  padding: 11px 13px; font-size: 14.5px; line-height: 1.85; color: #374151; outline: none;
  word-break: break-word;
}
.cl4-rt-body:empty::before { content: attr(data-ph); color: #b0b7c0; }
.cl4-rt-body img { max-width: 100%; height: auto; border-radius: 6px; }
.cl4-rt-body h3 { font-size: 15.5px; margin: 10px 0 4px; color: #1f2937; }
.cl4-rt-body ul, .cl4-rt-body ol { padding-left: 20px; margin: 6px 0; }
.cl4-rt-ta { width: 100%; border: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; resize: vertical; }

/* --- 单层 / 双层 / 三层 --- */
.cl4-seg { display: inline-flex; border: 1px solid #d8dee4; border-radius: 7px; overflow: hidden; background: #fff; }
.cl4-seg > button {
  border: 0; background: none; font-family: inherit; font-size: 13px; color: #6b7280;
  padding: 0 11px; height: 28px; cursor: pointer;
}
.cl4-seg > button + button { border-left: 1px solid #e6eaee; }
.cl4-seg > button:hover { color: #111827; }
.cl4-seg > button.on { background: var(--brand); color: #fff; font-weight: 500; }

/* --- 规格组 --- */
.cl4-grp { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcfd; }
.cl4-grp-h { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.cl4-grp-n { flex: none; font-size: 13px; color: #6b7280; width: 44px; }
.cl4-grp-h .af-input { width: 220px; height: 32px; font-size: 14.5px; }
.cl4-grp-c { font-size: 12px; color: #a8b0b9; font-style: normal; }
.cl4-grp-h .cl4-x { margin-left: auto; }
.cl4-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.cl4-val {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 6px 0 12px; border: 1px solid #d8dee4; border-radius: 6px;
  background: #fff; font-size: 14px; color: #374151; cursor: default; user-select: none;
}
.cl4-val b { font-weight: 500; }
.cl4-val i { font-style: normal; color: #b0b7c0; cursor: pointer; padding: 0 3px; font-size: 15px; line-height: 1; }
.cl4-val i:hover { color: #c02626; }
.cl4-val.new { border-style: dashed; border-color: #f0b37e; background: #fffaf3; }
.cl4-val.new b::after { content: "新"; font-size: 11px; color: #a15c00; margin-left: 4px; vertical-align: 1px; }
.cl4-vadd {
  height: 30px; padding: 0 11px; border: 1px dashed #cfd6dd; border-radius: 6px;
  background: #fff; font-family: inherit; font-size: 14px; color: #0f766e; cursor: pointer;
}
.cl4-vadd:hover { border-color: var(--brand); background: #f4fbf9; }
.cl4-x {
  width: 24px; height: 24px; border: 0; background: none; border-radius: 5px;
  color: #b0b7c0; font-size: 15px; line-height: 1; cursor: pointer;
}
.cl4-x:hover { background: #fdecec; color: #c02626; }

/* --- 批量改价 / 批量库存 --- */
.cl4-batch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.cl4-batch label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #6b7280; }
.cl4-batch .af-input { width: 100px; height: 30px; font-size: 14px; }

/* --- SKU 表 --- */
.cl4-tbl.cl4-sku td { padding: 6px 8px; }
.cl4-in {
  width: 100%; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  background: #f7f9fa; font-family: inherit; font-size: 14px; color: #1f2937; outline: none;
}
.cl4-in:hover { border-color: #dfe5ea; }
.cl4-in:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .1); }
.cl4-in.num { text-align: right; font-variant-numeric: tabular-nums; }
.cl4-in.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.cl4-badge {
  display: inline-block; margin-left: 5px; padding: 0 4px; border-radius: 3px;
  background: #fff4e5; color: #a15c00; font-size: 11px; line-height: 14px; font-style: normal;
}
.cl4-skuempty {
  border: 1px dashed var(--border-strong); border-radius: 9px; padding: 22px 14px;
  text-align: center; font-size: 14px; color: #9aa3af; line-height: 1.8; background: #fbfcfd;
}
.af-input.ro { background: #f4f6f8; color: #6b7280; }

/* --- 图片网格 --- */
.cl4-imgs .cl4-more {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
  border: 1px dashed var(--border-strong); border-radius: 9px; font-size: 14px; color: #9aa3af;
}
.cl4-img.needs-up::after {
  content: "无 uri"; position: absolute; right: 6px; top: 6px; padding: 0 5px;
  border-radius: 3px; background: #fff4e5; color: #a15c00; font-size: 11px; line-height: 15px;
}

/* --- 尺寸图表 / 产品视频 --- */
.cl4-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.cl4-mcard { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fff; min-width: 0; }
.cl4-mhd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.cl4-mhd b { font-size: 14.5px; color: #1f2937; }
.cl4-mhd span { font-size: 12px; color: #a8b0b9; }
.cl4-chart, .cl4-vwrap {
  position: relative; aspect-ratio: 1; max-height: 240px; width: 100%;
  border: 1px dashed var(--border-strong); border-radius: 9px; background: #fbfcfd;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.cl4-chart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cl4-vwrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0f172a; }
.cl4-chart-ph { display: grid; justify-items: center; gap: 4px; color: #b0b7c0; }
.cl4-chart-ph span { font-size: 25.5px; line-height: 1; }
.cl4-chart-ph em { font-style: normal; font-size: 13px; }
.cl4-chart-x {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(15, 23, 42, .55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}
.cl4-chart-x:hover { background: #c02626; }
.cl4-mops { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.cl4-mops .af-input { flex: 1 1 140px; height: 30px; font-size: 14px; min-width: 0; }

/* --- 物流尺寸 --- */
.cl4-dims { display: flex; align-items: center; gap: 6px; }
.cl4-dims .af-input { width: 78px; height: 38px; text-align: center; font-size: 15px; }
.cl4-dims i { font-style: normal; color: #b0b7c0; font-size: 12.5px; }
.cl4-subh { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 10px; padding-top: 14px; border-top: 1px dashed #e6eaee; }
.cl4-subh h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1f2937; }
.cl4-subh span { font-size: 12px; color: #a8b0b9; }

/* --- 图片批量处理弹窗 --- */
.af-dlg .af-panel.cl-imgedit { width: 1080px; max-width: calc(100vw - 40px); max-height: 92vh; display: flex; flex-direction: column; }
.af-panel.cl-imgedit .af-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ie-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ie-bar .grow { flex: 1 1 auto; }
.ie-ckall, .ie-tg { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #4b5563; cursor: pointer; }
.ie-sum { font-size: 13px; color: #8b95a1; font-variant-numeric: tabular-nums; }
.ie-linkrow { display: flex; gap: 8px; margin-bottom: 10px; }
.ie-linkrow .af-input { flex: 1 1 auto; height: 34px; font-size: 14.5px; }
.ie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }
.ie-grid.nosize .ie-size { display: none; }
.ie-card {
  position: relative; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #f4f6f8;
}
.ie-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ie-card.bad { background: #fdecec; }
.ie-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(13, 148, 136, .28); }
.ie-card.main { border-color: #0f766e; }
.ie-ck {
  position: absolute; left: 6px; top: 6px; z-index: 2; width: 19px; height: 19px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}
.ie-ck input { margin: 0; width: 13px; height: 13px; accent-color: var(--brand); }
.ie-idx {
  position: absolute; right: 6px; top: 6px; z-index: 1; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 4px; background: rgba(15, 23, 42, .55); color: #fff; font-size: 11.5px; line-height: 17px; text-align: center;
}
.ie-tag {
  position: absolute; left: 6px; bottom: 28px; z-index: 1; padding: 0 5px; border-radius: 3px;
  background: var(--brand); color: #fff; font-size: 11px; line-height: 15px;
}
.ie-warn {
  position: absolute; right: 6px; top: 27px; z-index: 1; padding: 0 4px; border-radius: 3px;
  background: #fff4e5; color: #a15c00; font-size: 11px; line-height: 15px;
}
.ie-size {
  position: absolute; left: 6px; bottom: 6px; z-index: 1; padding: 0 5px; border-radius: 3px;
  background: rgba(15, 23, 42, .6); color: #fff; font-size: 11.5px; line-height: 15px;
  font-variant-numeric: tabular-nums;
}
.ie-ops {
  position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; gap: 2px;
  padding: 4px; background: rgba(15, 23, 42, .62); opacity: 0; transition: opacity .12s;
}
.ie-card:hover .ie-ops { opacity: 1; }
.ie-card:hover .ie-size { opacity: 0; }
.ie-ops button {
  flex: 1 1 0; height: 22px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .9);
  font-family: inherit; font-size: 12px; color: #1f2937; cursor: pointer; padding: 0;
}
.ie-ops button:hover { background: #fff; }
.ie-ops button:disabled { opacity: .38; cursor: default; }
.ie-ops button.danger:hover { background: #f04438; color: #fff; }
.ie-empty {
  grid-column: 1 / -1; padding: 40px 0; text-align: center;
  font-size: 14px; color: #9aa3af; border: 1px dashed var(--border-strong); border-radius: 10px;
}

/* --- 小输入弹窗 --- */
.af-dlg .af-panel.cl-ask { width: 420px; max-width: calc(100vw - 40px); }

@media (max-width: 1080px) {
  .cl4-media { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
 * 广告管理 v5：自定义列抽屉 / 计划数据分析抽屉
 * ========================================================= */
@keyframes adslide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.ad-dw-wrap { position: fixed; inset: 0; z-index: 430; display: flex; justify-content: flex-end; }
.ad-dmask { position: absolute; inset: 0; background: rgba(15, 23, 42, .3); }
.ad-dw {
  position: relative; height: 100%; background: #fff; display: flex; flex-direction: column;
  box-shadow: -14px 0 40px rgba(15, 23, 42, .16); animation: adslide .18s ease;
}
.ad-dw-cols { width: 740px; max-width: 96vw; }
.ad-dw-ana { width: 840px; max-width: 96vw; }
.ad-dw-h {
  flex: none; display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px 13px; border-bottom: 1px solid var(--border);
}
.ad-dw-h > div { min-width: 0; }
.ad-dw-h b { display: block; font-size: 17px; color: #1f2937; }
.ad-dw-h em { display: block; font-style: normal; font-size: 12.5px; color: #8b95a1; margin-top: 4px; line-height: 1.6; }
.ad-dw-x {
  margin-left: auto; width: 30px; height: 30px; flex: none; border: 0; border-radius: 7px;
  background: none; font-size: 23px; line-height: 1; color: #8b95a1; cursor: pointer;
}
.ad-dw-x:hover { background: #f1f4f7; color: #1f2937; }
.ad-dw-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 18px 24px; }
.ad-dw-f {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-top: 1px solid var(--border); background: #fff;
}
.ad-dw-f .grow { flex: 1 1 auto; }

/* --- 自定义列：左右两栏 --- */
.ad-cols2 { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ad-cols-pane { display: flex; flex-direction: column; min-height: 0; padding: 12px 14px 0; }
.ad-cols-pane.right { border-left: 1px solid var(--border); background: #fbfcfd; }
.ad-cols-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ad-cols-ph b { font-size: 14.5px; color: #1f2937; }
.ad-cols-ph em { font-style: normal; font-size: 12px; color: #a8b0b9; font-weight: 400; margin-left: 3px; }
.ad-cols-ph > button {
  border: 0; background: none; font-family: inherit; font-size: 13px; color: #6b7280;
  cursor: pointer; padding: 2px 4px; border-radius: 4px;
}
.ad-cols-ph > button:hover { color: var(--brand-text, #0f766e); background: #eef7f5; }
.ad-cols-q { position: relative; display: flex; align-items: center; margin-bottom: 8px; }
.ad-cols-q .ad-ico { position: absolute; left: 9px; width: 14px; height: 14px; color: #a8b0b9; pointer-events: none; }
.ad-cols-q .af-input { width: 100%; height: 32px; padding-left: 28px; font-size: 14px; }
.ad-cols-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 12px; }
.ad-cols-g {
  font-size: 12px; color: #a8b0b9; margin: 10px 0 5px; padding-left: 2px;
}
.ad-cols-g:first-child { margin-top: 2px; }
.ad-cl {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 1px solid transparent; border-radius: 7px; background: none;
  padding: 6px 8px; font-family: inherit; font-size: 14px; color: #374151; cursor: pointer;
}
.ad-cl:hover { background: #f3f6f8; }
.ad-cl.on { color: #0f766e; }
.ad-ck {
  width: 16px; height: 16px; flex: none; border: 1px solid #d8dee4; border-radius: 4px;
  background: #fff; font-style: normal; font-size: 11.5px; line-height: 14px; text-align: center; color: #fff;
}
.ad-cl.on .ad-ck { background: var(--brand); border-color: var(--brand); }
.ad-cr {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  border-radius: 7px; background: #fff; padding: 6px 8px; margin-bottom: 6px;
  font-size: 14px; color: #374151; cursor: grab;
}
.ad-cr:active { cursor: grabbing; }
.ad-grip { color: #cfd6dd; font-size: 11.5px; letter-spacing: -1px; flex: none; cursor: grab; }
.ad-cr .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-cr > button {
  width: 22px; height: 22px; flex: none; border: 0; border-radius: 5px; background: none;
  font-family: inherit; font-size: 14px; line-height: 1; color: #8b95a1; cursor: pointer;
}
.ad-cr > button:hover { background: #eef1f4; color: #1f2937; }
.ad-cr > button:disabled { opacity: .3; cursor: default; background: none; }
.ad-cr > button.x:hover { background: #fdecec; color: #c02626; }
.ad-cols-empty { padding: 26px 0; text-align: center; font-size: 13px; color: #a8b0b9; }

/* --- 计划数据分析抽屉 --- */
.ad-ana-hd { align-items: flex-start; }
.ad-ana-t b { font-size: 17px; }
.ad-ana-t > span { display: block; font-size: 14.5px; color: #374151; margin-top: 3px; }
.ad-ana-t em { font-size: 12px; color: #8b95a1; margin-top: 5px; }
.ad-ana-rec {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px;
  border: 1px solid #ffe2b8; background: #fff8ec; border-radius: 10px; margin-bottom: 14px;
}
.ad-ana-rec.ok { border-color: #cfeadb; background: #f3fbf6; }
.ad-ana-rec-i {
  width: 18px; height: 18px; flex: none; border-radius: 50%; margin-top: 1px;
  background: #f79009; color: #fff; font-size: 12.5px; line-height: 18px; text-align: center;
}
.ad-ana-rec.ok .ad-ana-rec-i { background: #12b76a; }
.ad-ana-rec > div { min-width: 0; flex: 1 1 auto; }
.ad-ana-rec b { display: block; font-size: 14.5px; color: #7a4a00; }
.ad-ana-rec.ok b { color: #0f7a63; }
.ad-ana-rec span { display: block; font-size: 13px; color: #8a5300; line-height: 1.7; margin-top: 2px; }
.ad-ana-rec.ok span { color: #3f6b5c; }
.ad-ana-sec { margin-bottom: 16px; }
.ad-ana-sh { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.ad-ana-sh b { font-size: 15px; color: #1f2937; }
.ad-ana-sh em { font-style: normal; font-size: 12px; color: #a8b0b9; }
.ad-ana-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.ad-ana-k {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; background: #fff; min-width: 0;
}
.ad-ana-k span { display: block; font-size: 12px; color: #8b95a1; }
.ad-ana-k b {
  display: block; font-size: 18.5px; color: #1f2937; margin-top: 3px;
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-ana-k em { display: block; font-style: normal; font-size: 11.5px; color: #b0b7c0; margin-top: 2px; }
.ad-ana-ch { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 4px; }
.ad-ana-legend { display: flex; gap: 16px; margin-bottom: 4px; }
.ad-ana-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #4b5563; }
.ad-ana-legend i { width: 9px; height: 9px; border-radius: 2px; }
.ad-ana-legend em { font-style: normal; font-size: 11.5px; color: #b0b7c0; }
.ad-dr-tz { font-size: 12px; color: #a8b0b9; white-space: nowrap; margin-left: auto; }

@media (max-width: 1280px) {
  .ad-ana-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad-dw-cols, .ad-dw-ana { width: 96vw; }
}

/* 规格选项折叠按钮 */
.cl4-vmore {
  height: 30px; padding: 0 11px; border: 1px solid #e6eaee; border-radius: 6px;
  background: #f7f9fa; font-family: inherit; font-size: 13px; color: #6b7280; cursor: pointer;
}
.cl4-vmore:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); background: #f4fbf9; }

/* [hidden] 会被 display:flex 覆盖 —— 外链输入行必须显式关掉 */
.ie-linkrow[hidden] { display: none !important; }
.ad-ana-rec-t { font-size: 14px !important; color: #7a4a00 !important; font-weight: 600; margin-top: 3px !important; }
.ad-ana-rec.ok .ad-ana-rec-t { color: #0f7a63 !important; }

/* 三点菜单：第一项「切换至最大投放量模式」不能被省略号吃掉 */
.ad-pop.ad-pop-menu { min-width: 226px; }
.ad-pop-menu .ad-pop-i span { white-space: nowrap; }

/* =========================================================
 * 广告管理 v6：权益页 / 账号页 / 数据分析下钻 / ROI 说明 / 字体
 * ========================================================= */

/* 广告页字体：TikTok 后台用的 TikTok Sans（只有拉丁字符，中文回落到系统字体） */
@font-face {
  font-family: "TikTok Sans";
  src: url("fonts/tiktok-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
#ad-body, .ad-dw, .ad-pop, .af-dlg .ad-panel {
  font-family: "TikTok Sans", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
  letter-spacing: .002em;
}

/* --- 权益 --- */
.ad-rt-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid #e4f2ee; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px;
  background: linear-gradient(96deg, #f1faf7 0%, #f6fcfb 52%, #ffffff 100%);
  overflow: hidden;
}
.ad-rt-hero-t b { display: block; font-size: 18.5px; color: #1f2937; letter-spacing: .01em; }
.ad-rt-hero-t span { display: block; font-size: 14px; color: #6b7280; margin-top: 6px; }
.ad-rt-hero-t a { color: var(--brand-text, #0f766e); text-decoration: none; margin-left: 4px; }
.ad-rt-hero-t a:hover { text-decoration: underline; }
.ad-rt-art { width: 168px; height: 94px; flex: none; }

.ad-rt-tabs { display: flex; align-items: center; gap: 26px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.ad-rt-tabs button {
  position: relative; border: 0; background: none; font-family: inherit; cursor: pointer;
  font-size: 14.5px; color: #6b7280; padding: 8px 2px 11px;
}
.ad-rt-tabs button em { font-style: normal; font-size: 12.5px; color: #9aa3af; margin-left: 3px; }
.ad-rt-tabs button.on { color: #111827; font-weight: 600; }
.ad-rt-tabs button.on em { color: var(--brand-text, #0f766e); }
.ad-rt-tabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 1px; background: var(--brand);
}
.ad-rt-note { font-size: 13px; color: #8b95a1; margin-bottom: 12px; }

.ad-rt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ad-rt-card {
  border: 1px solid #edf0f3; border-radius: 10px; background: #fbfcfd;
  padding: 14px 16px 16px; min-width: 0;
}
.ad-rt-h { display: flex; align-items: flex-start; gap: 10px; }
.ad-rt-h > div { min-width: 0; flex: 1 1 auto; }
.ad-rt-t { font-size: 15px; font-weight: 600; color: #1f2937; }
.ad-rt-sub { font-size: 13px; color: #6b7280; line-height: 1.7; margin-top: 5px; }
.ad-rt-period { font-size: 12.5px; color: #9aa3af; margin-top: 4px; }
.ad-rt-fold {
  width: 24px; height: 24px; flex: none; border: 1px solid #e4e8ec; border-radius: 6px;
  background: #fff; color: #8b95a1; font-size: 14px; line-height: 1; cursor: pointer;
}
.ad-rt-fold:hover { color: #374151; border-color: #d5dbe2; }
.ad-rt-body { margin-top: 12px; }
.ad-rt-card.off .ad-rt-body { display: none; }
.ad-rt-long { font-size: 13px; color: #6b7280; line-height: 1.85; }
.ad-rt-prog { margin-top: 14px; }
.ad-rt-prow { display: flex; align-items: baseline; gap: 8px; }
.ad-rt-prow b { font-size: 14px; color: #374151; font-weight: 600; }
.ad-rt-prow em { font-style: normal; font-size: 13px; color: #6b7280; margin-left: auto; }
.ad-rt-bar { height: 4px; border-radius: 2px; background: #e9eef2; margin: 8px 0 7px; overflow: hidden; }
.ad-rt-bar i { display: block; height: 100%; border-radius: 2px; background: var(--brand); }
.ad-rt-foot { font-size: 12.5px; color: #9aa3af; line-height: 1.7; }
.ad-rt-btn {
  margin-top: 14px; height: 30px; padding: 0 14px; border-radius: 6px;
  background: #111827; color: #fff; border: 1px solid #111827; font-size: 14px;
}
.ad-rt-btn:hover { background: #1f2937; }

/* --- 账号 --- */
.ad-ac-page { display: grid; gap: 12px; }
.ad-ac-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 14px 16px 16px; }
.ad-ac-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-ac-h b { font-size: 15.5px; color: #1f2937; }
.ad-ac-h .grow { flex: 1 1 auto; }
.ad-ac-h .btn { height: 28px; padding: 0 10px; font-size: 13px; }
.ad-ac-sub {
  font-size: 12.5px; color: #8b95a1; margin: 14px 0 6px; padding-top: 12px;
  border-top: 1px dashed #eef1f4;
}
.ad-ac-sub:first-of-type { border-top: 0; padding-top: 0; }
.ad-ac-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; min-width: 0; }
.ad-ac-ava {
  width: 34px; height: 34px; flex: none; border-radius: 50%; background: #eef2f5;
  color: #6b7280; font-style: normal; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.ad-ac-ava .ad-ico { width: 16px; height: 16px; }
.ad-ac-ava.brand { background: #e8f5f1; color: var(--brand-text, #0f766e); }
.ad-ac-info { min-width: 0; flex: 1 1 auto; }
.ad-ac-n { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: #1f2937; flex-wrap: wrap; }
.ad-ac-id { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8b95a1; margin-top: 3px; flex-wrap: wrap; }
.ad-ac-id .mono { font-size: 12.5px; color: #6b7280; }
.ad-ac-cp {
  width: 20px; height: 20px; border: 0; border-radius: 4px; background: none; padding: 0;
  color: #a8b0b9; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ad-ac-cp .ad-ico { width: 12px; height: 12px; }
.ad-ac-cp:hover { background: #f1f4f7; color: #374151; }
.ad-ac-region {
  font-style: normal; font-size: 11.5px; color: #6b7280; background: #f1f4f7;
  border-radius: 4px; padding: 1px 5px;
}
.ad-ac-hint { font-size: 12.5px; color: #9aa3af; line-height: 1.7; margin-top: 6px; }
.ad-ac-grp { font-size: 14px; color: #374151; font-weight: 600; margin: 14px 0 2px; }
.ad-ac-grp em { font-style: normal; font-size: 12px; color: #a8b0b9; font-weight: 400; margin-left: 3px; }
.ad-ac-empty {
  border: 1px dashed #e4e8ec; border-radius: 8px; padding: 14px; text-align: center;
  font-size: 13px; color: #9aa3af; margin: 6px 0;
}

/* --- 数据分析：头部 / 概览 / 商品 / 素材 --- */
.ad-ana-hd { align-items: flex-start; }
.ad-ana-t b .ad-ana-dot { font-style: normal; color: #c3c9d1; margin: 0 5px; }
.ad-ana-t b .ad-ana-sub2 { font-weight: 500; color: #6b7280; font-size: 15px; }
.ad-ana-nm { display: flex; align-items: center; gap: 7px; margin-top: 5px; flex-wrap: wrap; }
.ad-ana-name { font-size: 15px; color: #1f2937; font-weight: 600; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-ana-pid { font-style: normal; font-size: 12px; color: #9aa3af; }
.ad-ana-hact { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.ad-ana-hact .btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; font-size: 13px; }
.ad-ana-hact .btn .ad-ico { width: 13px; height: 13px; }
.ad-ana-tz { font-style: normal; font-size: 11.5px; color: #a8b0b9; }
.ad-ana-date {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #6b7280;
  border: 1px solid #e4e8ec; border-radius: 6px; padding: 2px 7px; background: #fff;
}
.ad-ana-date .ad-ico { width: 11px; height: 11px; color: #9aa3af; }
.ad-ana-scope { font-size: 12px; color: #6b7280; background: #f4f7f9; border-radius: 5px; padding: 2px 7px; }
.ad-ana-dt { display: flex; align-items: baseline; gap: 4px; font-size: 11.5px !important; color: #b0b7c0 !important; }
.ad-ana-dt .ad-dt { font-size: 12px; }
.ad-ana-dt s { text-decoration: none; color: #b0b7c0; }
.ad-ana-prod .ad-mini { white-space: nowrap; }

.ad-ana-crh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-ana-crh b { font-size: 15px; color: #1f2937; }
.ad-ana-crstat { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #8b95a1; flex-wrap: wrap; }
.ad-ana-crstat b { font-size: 13px; color: #374151; font-weight: 600; }
.ad-ana-crf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.ad-ana-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ad-ana-chips button {
  height: 26px; padding: 0 9px; border: 1px solid #e4e8ec; border-radius: 6px;
  background: #fff; font-family: inherit; font-size: 12.5px; color: #6b7280; cursor: pointer;
}
.ad-ana-chips button:hover { border-color: #cfd6dd; color: #374151; }
.ad-ana-chips button.on { border-color: var(--brand); background: #f2fbf9; color: var(--brand-text, #0f766e); font-weight: 600; }
.ad-ana-chips button.hide { display: none; }
.ad-ana-sel { font-style: normal; font-size: 12.5px; color: #8b95a1; white-space: nowrap; }
.ad-ana-sel b { color: #1f2937; }

.ad-th-ck, .ad-td-ck { width: 34px; padding-left: 10px !important; padding-right: 0 !important; }
.ad-th-ck input, .ad-td-ck input { width: 13px; height: 13px; accent-color: var(--brand); cursor: pointer; }
.ad-ana-cr { max-height: 320px; }
.ad-ana-cr td { padding-top: 7px; padding-bottom: 7px; }
.ad-ana-cr .ad-prodt em { font-style: normal; font-size: 11.5px; color: #a8b0b9; }

.ad-empty-sub { font-size: 12.5px; color: #a8b0b9; margin-top: 6px; line-height: 1.75; }

/* --- ROI 保障：行内可点 + 悬浮说明 --- */
.ad-roi {
  display: inline-flex; align-items: flex-start; gap: 4px; border: 0; background: none;
  padding: 0; font-family: inherit; text-align: left; cursor: pointer; color: #374151;
}
.ad-roi .ad-ico { width: 12px; height: 12px; color: var(--brand); margin-top: 2px; flex: none; }
.ad-roi span { font-size: 12.5px; line-height: 1.55; }
.ad-roi:hover span { color: var(--brand-text, #0f766e); text-decoration: underline; text-underline-offset: 2px; }
.ad-pop.ad-roi-pop { width: 392px; max-width: 92vw; padding: 14px 15px 12px; }
.ad-roi-t { display: block; font-size: 15px; color: #1f2937; margin-bottom: 7px; }
.ad-roi-pop p { font-size: 13px; line-height: 1.8; color: #4b5563; }
.ad-roi-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ad-roi-f .btn { height: 28px; padding: 0 12px; font-size: 13px; }

@media (max-width: 1180px) {
  .ad-rt-grid { grid-template-columns: minmax(0, 1fr); }
  .ad-rt-art { display: none; }
}
.ad-ana-t { flex: 1 1 auto; min-width: 0; }
.ad-dw-h.ad-ana-hd { gap: 10px; }

/* 素材表：9 列要塞进 840 抽屉，内边距收一点，内容不换行不越界 */
.ad-ana-cr th, .ad-ana-cr td { padding-left: 8px; padding-right: 8px; }
.ad-ana-cr th { overflow: hidden; text-overflow: ellipsis; }
.ad-ana-cr td { overflow: hidden; text-overflow: ellipsis; }
.ad-ana-cr .ad-td-time { font-size: 12px; }
.ad-ana-cr .ad-prodt b { font-size: 13px; }

/* 指标卡：标签长度不一，给固定高度，五张卡的数字才对得齐 */
.ad-ana-k { display: flex; flex-direction: column; }
.ad-ana-k span { min-height: 27px; font-size: 11.5px; line-height: 1.35; }
.ad-ana-k b { margin-top: 3px; }
.ad-ana-k em { margin-top: auto; padding-top: 4px; }

/* 权益 banner 的插图再大一点，别缩在角落 */
.ad-rt-art { width: 196px; height: 108px; margin-right: 6px; }
.ad-ana-cr th { font-size: 12px; }
.ad-ana-cr td { font-size: 13px; }

/* 广告模块整页字体（页头 + 内容），和 TikTok 后台一致 */
#main.ad-font { font-family: "TikTok Sans", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif; }
#main.ad-font .btn, #main.ad-font input, #main.ad-font select, #main.ad-font textarea, #main.ad-font button { font-family: inherit; }

/* 行内动作（商品名下面一行）：数据分析 / 查看素材，跟后台一样的青色文字 + 图标 */
.ad-rowact {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0;
  margin-top: 3px; font-family: inherit; font-size: 12px; color: var(--brand-text, #0f766e); cursor: pointer;
}
.ad-rowact .ad-ico { width: 11px; height: 11px; }
.ad-rowact:hover span { text-decoration: underline; text-underline-offset: 2px; }

/* =========================================================
 * 内部协作（3-5 人小团队）
 * ========================================================= */
.tm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.tm-stat { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 12px 14px; min-width: 0; }
.tm-stat > span { font-size: 12.5px; color: #6b7280; }
.tm-stat b { display: block; font-size: 25.5px; line-height: 1.25; color: #111827; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.tm-stat b.warn { color: #b45309; }
.tm-stat em { font-style: normal; font-size: 12px; color: #9aa3af; }

.tm-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, 1fr); gap: 12px; align-items: start; }
.tm-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 14px 16px 16px; margin-bottom: 12px; min-width: 0; }
.tm-side .tm-card:last-child { margin-bottom: 0; }
.tm-card-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tm-card-h b { font-size: 15px; color: #1f2937; }
.tm-card-h span { font-size: 12.5px; color: #9aa3af; }
.tm-card-h .grow { flex: 1 1 auto; }
.tm-card-h em { font-style: normal; font-size: 12px; color: #a8b0b9; }

.tm-composer { border: 1px solid #e4e8ec; border-radius: 10px; background: #fbfcfd; padding: 10px 12px 9px; margin-bottom: 14px; }
.tm-composer textarea {
  width: 100%; border: 0; background: none; resize: vertical; min-height: 58px;
  font-family: inherit; font-size: 14.5px; line-height: 1.8; color: #111827; outline: none;
}
.tm-composer-f { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.tm-composer-f .grow { flex: 1 1 auto; }
.tm-pin { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #6b7280; cursor: pointer; }
.tm-pin input { accent-color: var(--brand); }
.tm-composer-f .btn { height: 30px; padding: 0 16px; font-size: 14px; }

.tm-note { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid #f2f5f7; }
.tm-note:first-child { border-top: 0; padding-top: 4px; }
.tm-note.pinned { background: #f9fdfc; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.tm-ava {
  width: 30px; height: 30px; flex: none; border-radius: 50%; background: #eef2f5; color: #6b7280;
  font-style: normal; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.tm-ava.admin { background: #e8f5f1; color: var(--brand-text, #0f766e); }
.tm-note-b { min-width: 0; flex: 1 1 auto; }
.tm-note-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tm-note-h b { font-size: 14.5px; color: #1f2937; }
.tm-note-h em { font-style: normal; font-size: 12px; color: #a8b0b9; }
.tm-note-h .grow { flex: 1 1 auto; }
.tm-tag { font-size: 11.5px; color: #0f766e; background: #e8f5f1; border-radius: 4px; padding: 1px 5px; }
.tm-act {
  border: 0; background: none; padding: 0; font-family: inherit; font-size: 12.5px; color: #8b95a1; cursor: pointer;
}
.tm-act:hover { color: var(--brand-text, #0f766e); text-decoration: underline; }
.tm-act.danger:hover { color: #c02626; }
.tm-note-t { font-size: 14.5px; color: #374151; line-height: 1.85; margin-top: 5px; white-space: pre-wrap; word-break: break-word; }

.tm-member { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.tm-member > div { min-width: 0; }
.tm-member b { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: #1f2937; font-weight: 500; }
.tm-member span { display: block; font-size: 12px; color: #9aa3af; margin-top: 2px; }
.tm-me { font-style: normal; font-size: 11.5px; color: var(--brand-text, #0f766e); background: #e8f5f1; border-radius: 4px; padding: 0 4px; }

.tm-tadd { border: 1px solid #e4e8ec; border-radius: 10px; padding: 9px 10px; background: #fbfcfd; margin-bottom: 10px; }
.tm-tadd > .af-input { width: 100%; height: 30px; font-size: 14px; }
.tm-tadd-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.tm-tadd-row select, .tm-tadd-row input[type="date"] { height: 30px; font-size: 13px; }
.tm-tadd-row select { flex: 1 1 auto; min-width: 0; }
.tm-tadd-row input[type="date"] { width: 128px; flex: none; }
.tm-tadd-row .btn { height: 30px; padding: 0 10px; font-size: 13px; flex: none; }

.tm-todo { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-top: 1px solid #f2f5f7; }
.tm-todo:first-child { border-top: 0; }
.tm-todo > input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.tm-todo-b { min-width: 0; flex: 1 1 auto; }
.tm-todo-b b { display: block; font-size: 14.5px; color: #1f2937; font-weight: 500; line-height: 1.55; word-break: break-word; }
.tm-todo.done .tm-todo-b b { color: #9aa3af; text-decoration: line-through; }
.tm-todo-m { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.tm-chip { font-size: 11.5px; color: #4b5563; background: #f1f4f7; border-radius: 4px; padding: 1px 5px; }
.tm-chip.dim { color: #a8b0b9; }
.tm-due { font-size: 11.5px; color: #9aa3af; }
.tm-due.late { color: #b91c1c; }
.tm-empty { padding: 16px 0; text-align: center; font-size: 13px; color: #a8b0b9; }
.tm-empty.big { padding: 34px 10px; line-height: 1.9; }
.tm-hint { font-size: 12px; color: #a8b0b9; line-height: 1.7; margin-top: 8px; }

@media (max-width: 1180px) {
  .tm-grid { grid-template-columns: minmax(0, 1fr); }
  .tm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ROI 保障记录 */
.ad-roi-rec-panel { width: 780px; max-width: 96vw; }
.ad-roi-rec-panel .af-hd-s a { color: var(--brand-text, #0f766e); text-decoration: none; }
.ad-roi-rec-panel .af-hd-s a:hover { text-decoration: underline; }
.ad-rr-wrap { max-height: 58vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.ad-rr-tbl th { position: sticky; top: 0; z-index: 2; }
.ad-rr-tbl td { font-size: 14px; padding-top: 7px; padding-bottom: 7px; }
.ad-rr-st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #374151; }
.ad-rr-i { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.ad-rr-i .ad-ico { width: 11px; height: 11px; }
.ad-rr-i.ok { color: #12b76a; }
.ad-rr-i.calc, .ad-rr-i.no { color: #98a2b3; }
.ad-rr-g { color: #0f766e; font-weight: 600; }

/* =========================================================
 * 广告 v7：账号切换弹窗 / 权益抽屉 / 创意作品与达人 / 新建作品
 * ========================================================= */

/* --- 账号页 --- */
.ad-ac-q {
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid #d5dbe2; color: #a8b0b9;
  font-style: normal; font-size: 11px; line-height: 12px; text-align: center; cursor: help; flex: none;
}
.ad-ac-q:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); }
.ad-ac-tip { font-size: 12.5px; color: #9aa3af; line-height: 1.7; margin: 2px 0 4px; }
.ad-ac-dlg { width: 640px; max-width: 96vw; }
.ad-ac-dlg-sm { width: 560px; }

/* 更改 GMV Max 账号：店铺 / 官方账号 / GMV Max 账号 三列横条 */
.ad-gm-bar {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: #eef1f4; border: 1px solid #eef1f4; border-radius: 8px; overflow: hidden; margin-bottom: 16px;
}
.ad-gm-bar > div { background: #fafbfc; padding: 9px 12px 10px; min-width: 0; }
.ad-gm-bar span { display: block; font-size: 12px; color: #8b95a1; margin-bottom: 3px; }
.ad-gm-bar b { display: block; font-size: 14.5px; color: #1f2937; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-gm-lb { display: block; font-size: 14px; color: #374151; font-weight: 600; margin: 14px 0 6px; }
.ad-gm-lb:first-child { margin-top: 0; }
.ad-gm-ck { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 14px; color: #374151; line-height: 1.7; cursor: pointer; }
.ad-gm-ck input { margin-top: 2px; accent-color: var(--brand); flex: none; }
.ad-gm-fine { font-size: 12.5px; color: #8b95a1; line-height: 1.75; margin-top: 12px; }
.ad-gm-fine a { color: var(--brand-text, #0f766e); text-decoration: none; }
.ad-gm-fine a:hover { text-decoration: underline; }

/* --- 权益：右侧双栏面板 --- */
.ad-rt-dw { width: 900px; max-width: 96vw; }
.ad-rt-dw-h {
  flex: none; display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px 15px; border-bottom: 1px solid var(--border);
}
.ad-rt-dw-t { min-width: 0; flex: 1 1 auto; }
.ad-rt-dw-t > b { font-size: 18px; color: #111827; }
.ad-rt-dw-sub { font-size: 13px; color: #6b7280; line-height: 1.85; margin-top: 7px; }
.ad-rt-dw-act { display: flex; align-items: center; gap: 10px; flex: none; }
.ad-rt-go {
  height: 32px; padding: 0 16px; border-radius: 6px; font-size: 14px;
  background: #0f766e; border: 1px solid #0f766e; color: #fff;
}
.ad-rt-go:hover { background: #0d6a62; }
.ad-rt-dw-body { padding: 16px 20px 20px; }
.ad-rt-cols { display: grid; grid-template-columns: minmax(260px, .76fr) minmax(0, 1.24fr); gap: 18px; }
.ad-rt-col { min-width: 0; }
.ad-rt-col-t { display: block; font-size: 15px; color: #1f2937; margin-bottom: 9px; }
.ad-rt-col-s { font-size: 13px; color: #6b7280; line-height: 1.8; margin-bottom: 12px; }
.ad-rt-ptabs { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border); margin: 12px 0 8px; }
.ad-rt-ptabs button {
  border: 0; background: none; font-family: inherit; font-size: 14px; color: #6b7280;
  padding: 6px 2px 8px; cursor: pointer; position: relative;
}
.ad-rt-ptabs button em { font-style: normal; font-size: 12px; color: #9aa3af; margin-left: 3px; }
.ad-rt-ptabs button.on { color: #111827; font-weight: 600; }
.ad-rt-ptabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 1px;
}
.ad-rt-plans { max-height: 300px; overflow: auto; }
.ad-rt-plan {
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 7px;
  cursor: pointer; border: 1px solid transparent;
}
.ad-rt-plan:hover { background: #f8fafb; }
.ad-rt-plan.on { background: #f2fbf9; border-color: #cdeae4; }
.ad-rt-plan-n { min-width: 0; flex: 1 1 auto; }
.ad-rt-plan-n b { display: block; font-size: 14px; color: #1f2937; font-weight: 500; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-rt-plan-n span { display: block; font-size: 11.5px; color: #a8b0b9; margin-top: 2px; }
.ad-rt-tbl th { font-size: 12.5px; }
.ad-rt-pn { display: block; font-size: 14px; color: #1f2937; font-weight: 500; cursor: pointer; }
.ad-rt-pn:hover { color: var(--brand-text, #0f766e); text-decoration: underline; text-underline-offset: 2px; }
.ad-rt-miss { display: inline-block; font-size: 12px; color: #b45309; background: #fef6e7; border-radius: 4px; padding: 1px 5px; margin-right: 4px; }
.ad-rt-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #0f766e; }
.ad-rt-ok .ad-ico { width: 11px; height: 11px; }
.ad-rt-foot {
  margin-top: 18px; padding: 10px 12px; border-radius: 8px; background: #fbfcfd;
  border: 1px solid #eef1f4; font-size: 12.5px; color: #8b95a1; line-height: 1.8;
}

/* --- 创意作品 --- */
.ad-whead { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; min-height: 32px; }
.ad-whead .grow { flex: 1 1 auto; }
.ad-wtabs { display: flex; align-items: center; gap: 4px; }
.ad-wtabs button {
  border: 0; background: none; font-family: inherit; font-size: 15px; color: #6b7280;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
}
.ad-wtabs button:hover { background: #f5f8f9; color: #1f2937; }
.ad-wtabs button.on { background: #eef7f5; color: var(--brand-text, #0f766e); font-weight: 600; }
.ad-newbtn {
  height: 32px; padding: 0 14px; border-radius: 6px; background: #0f766e; border: 1px solid #0f766e; color: #fff;
  display: inline-flex; align-items: center; gap: 5px; font-size: 14px;
}
.ad-newbtn:hover { background: #0d6a62; }
.ad-newbtn .ad-ico { width: 13px; height: 13px; }

/* 作品第一列：封面 + 名称 + 作品分析 */
.ad-workcell { align-items: flex-start; }
.ad-wcover {
  position: relative; width: 44px; height: 56px; flex: none; border-radius: 6px; overflow: hidden;
  border: 1px solid #e6eaee; background: #f1f4f7; padding: 0; cursor: pointer;
}
.ad-wcover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-wcover > i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 17px; color: #8b95a1; }
.ad-wplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(17, 24, 39, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ad-wplay .ad-ico { width: 12px; height: 12px; }
.ad-wcover:hover .ad-wplay { background: rgba(15, 118, 110, .9); }
.ad-wname { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ad-wname b { font-size: 14px; color: #1f2937; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-wana {
  width: 20px; height: 20px; flex: none; border-radius: 5px; border: 1px solid #e4e8ec; background: #fff;
  color: #8b95a1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.ad-wana .ad-ico { width: 12px; height: 12px; }
.ad-wana:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); background: #f2fbf9; }
.ad-tbl-works .ad-prodt em { font-size: 11.5px; }
.ad-tbl-works td { vertical-align: middle; }

/* 用户名：头像 + 账号 + 真名，点进达人视图 */
.ad-wuser {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0;
  font-family: inherit; text-align: left; cursor: pointer; max-width: 100%;
}
.ad-wuser > span { min-width: 0; }
.ad-wuser b { display: block; font-size: 14px; color: var(--brand-text, #0f766e); font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-wuser em { display: block; font-style: normal; font-size: 12px; color: #9aa3af; line-height: 1.4; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-wuser:hover b { text-decoration: underline; text-underline-offset: 2px; }

.ad-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #4b5563; }
.ad-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c9d1d9; flex: none; }
.ad-dot.green::before { background: #12a594; }
.ad-dot.amber::before { background: #e0a11b; }

.ad-chip-x {
  height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid #cdeae4; background: #f2fbf9;
  color: var(--brand-text, #0f766e); font-family: inherit; font-size: 12.5px; cursor: pointer; margin-right: 4px;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 达人表 */
.ad-tbl-cre th, .ad-tbl-cre td { padding-left: 8px; padding-right: 8px; }
.ad-tbl-cre th:first-child, .ad-tbl-cre td:first-child {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 6px 0 8px -8px rgba(15, 23, 42, .25);
}
.ad-tbl-cre th:first-child { background: #f7f9fa; z-index: 3; }
.ad-tbl-cre tr.on { background: #f6fcfb; }
.ad-tbl-cre tr.on td:first-child { background: #f6fcfb; }
.ad-tbl-cre tfoot td { background: #fafbfc; font-weight: 600; border-top: 1px solid var(--border); }
.ad-tbl-cre tfoot em { font-style: normal; font-weight: 400; font-size: 12px; margin-left: 4px; }

/* --- 作品分析抽屉 --- */
.ad-wdw { width: 780px; max-width: 96vw; }
.ad-wdw-h { align-items: flex-start; }
.ad-wdw-t { min-width: 0; flex: 1 1 auto; }
.ad-wdw-t > b { font-size: 15.5px; color: #1f2937; }
.ad-wp { display: flex; gap: 14px; margin-bottom: 4px; }
.ad-wp-v {
  position: relative; width: 108px; height: 140px; flex: none; border-radius: 10px; overflow: hidden;
  background: #eef2f5; border: 1px solid #e4e8ec;
}
.ad-wp-v img { width: 100%; height: 100%; object-fit: cover; }
.ad-wp-v > i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 34.5px; color: #9aa3af; }
.ad-wp-badge {
  position: absolute; left: 6px; bottom: 6px; z-index: 2; font-size: 11.5px; color: #fff;
  background: rgba(17, 24, 39, .6); border-radius: 4px; padding: 1px 5px;
}
.ad-wp-m { min-width: 0; flex: 1 1 auto; display: grid; gap: 7px; align-content: start; }
.ad-wp-m > div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; min-width: 0; }
.ad-wp-m span { color: #9aa3af; width: 58px; flex: none; }
.ad-wp-m b { color: #374151; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ad-kv4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #eef1f4; border: 1px solid #eef1f4; border-radius: 8px; overflow: hidden; }
.ad-kv4 > div { background: #fbfcfd; padding: 10px 12px; }
.ad-kv4 span { display: block; font-size: 12px; color: #8b95a1; }
.ad-kv4 b { display: block; font-size: 17px; color: #1f2937; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* 转化漏斗 */
.ad-fnl { display: grid; gap: 9px; }
.ad-fnl-r { display: grid; grid-template-columns: 100px minmax(0, 1fr) 78px; align-items: center; gap: 10px; }
.ad-fnl-r > span { font-size: 13px; color: #6b7280; }
.ad-fnl-b { height: 10px; border-radius: 5px; background: #f1f4f7; overflow: hidden; }
.ad-fnl-b i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #12a594, #5cc2a8); }
.ad-fnl-r b { font-size: 14px; color: #1f2937; text-align: right; font-variant-numeric: tabular-nums; }
.ad-fnl-f { font-size: 12.5px; color: #9aa3af; }

/* --- 预览作品 --- */
.ad-wprev-panel { width: 760px; max-width: 96vw; }
.ad-wprev { display: flex; gap: 18px; }
.ad-wprev-v {
  position: relative; width: 300px; height: 380px; flex: none; border-radius: 12px; overflow: hidden;
  background: #eef2f5; border: 1px solid #e4e8ec;
}
.ad-wprev-v img { width: 100%; height: 100%; object-fit: cover; }
.ad-wprev-v > i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 53px; color: #b6bec7; }
.ad-wprev-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: rgba(17, 24, 39, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ad-wprev-play .ad-ico { width: 26px; height: 26px; }
.ad-wprev-i { min-width: 0; flex: 1 1 auto; }
.ad-wprev-i > b { display: block; font-size: 16px; color: #1f2937; line-height: 1.6; }
.ad-wprev-i > em { display: block; font-style: normal; font-size: 12.5px; color: #9aa3af; margin-top: 4px; }
.ad-wprev-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #eef1f4; border: 1px solid #eef1f4; border-radius: 8px; overflow: hidden; margin-top: 14px; }
.ad-wprev-kv > div { background: #fbfcfd; padding: 10px 12px; }
.ad-wprev-kv span { display: block; font-size: 12px; color: #8b95a1; }
.ad-wprev-kv b { display: block; font-size: 17px; color: #1f2937; margin-top: 3px; }
.ad-wprev-f { margin-top: 16px; }
.ad-wprev-f .btn { height: 32px; padding: 0 14px; font-size: 14px; }

/* --- 新建作品浮层 --- */
.ad-new-pop {
  width: 282px; padding: 5px; display: grid; gap: 2px;
}
.ad-new-pop button {
  display: flex; align-items: flex-start; gap: 9px; width: 100%; text-align: left; border: 0; background: none;
  font-family: inherit; padding: 8px 9px; border-radius: 6px; cursor: pointer;
}
.ad-new-pop button:hover { background: #f4f8f9; }
.ad-new-pop i { width: 26px; height: 26px; flex: none; border-radius: 6px; background: #eef7f5; color: var(--brand-text, #0f766e); display: flex; align-items: center; justify-content: center; }
.ad-new-pop i .ad-ico { width: 14px; height: 14px; }
.ad-new-pop span { min-width: 0; }
.ad-new-pop b { display: block; font-size: 14.5px; color: #1f2937; font-weight: 600; }
.ad-new-pop em { display: block; font-style: normal; font-size: 12px; color: #9aa3af; line-height: 1.55; margin-top: 1px; }

/* 商品链接解析结果 */
.ad-lk-res { margin-top: 10px; min-height: 46px; }
.ad-lk-card {
  display: flex; gap: 10px; align-items: center; padding: 9px 10px;
  border: 1px solid #eef1f4; border-radius: 8px; background: #fbfcfd;
}
.ad-lk-card .ad-prodpic { width: 42px; height: 42px; }
.ad-lk-card > div { min-width: 0; }
.ad-lk-card b { display: block; font-size: 14.5px; color: #1f2937; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-lk-card em { display: block; font-style: normal; font-size: 12px; color: #8b95a1; margin-top: 2px; }
.ad-err-t { font-size: 13px; color: #b91c1c; }

/* 上传视频 */
.ad-up-file {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 84px;
  border: 1px dashed #d5dbe2; border-radius: 9px; background: #fbfcfd; cursor: pointer;
  font-size: 13px; color: #8b95a1; padding: 12px; text-align: center;
}
.ad-up-file:hover { border-color: var(--brand); color: var(--brand-text, #0f766e); background: #f8fdfc; }
.ad-up-file input { display: none; }
.ad-up-bar { height: 3px; border-radius: 2px; background: #eef1f4; margin-top: 10px; overflow: hidden; opacity: 0; }
.ad-up-bar.on { opacity: 1; }
.ad-up-bar i { display: block; height: 100%; width: 40%; border-radius: 2px; background: var(--brand); animation: adbar 1.1s linear infinite; }
@keyframes adbar { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.ad-up-res { margin-top: 10px; }
.ad-up-ok {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px;
  background: #f1faf7; border: 1px solid #cdeae4;
}
.ad-up-ok .ad-ico { width: 16px; height: 16px; color: #0f766e; flex: none; }
.ad-up-ok > div { min-width: 0; flex: 1 1 auto; }
.ad-up-ok b { display: block; font-size: 14px; color: #0f766e; }
.ad-up-ok em { display: block; font-style: normal; font-size: 12px; color: #6b7280; margin-top: 2px; }
.ad-up-list { margin-top: 12px; }
.ad-up-lh { font-size: 12.5px; color: #8b95a1; margin-bottom: 5px; }
.ad-up-li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid #f2f5f7; font-size: 13px; }
.ad-up-li > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4b5563; }
.ad-up-li em { font-style: normal; font-size: 12px; color: #9aa3af; }
.ad-up-li button { border: 0; background: none; font-family: inherit; font-size: 12.5px; color: var(--brand-text, #0f766e); cursor: pointer; }
.ad-tbl-cre td { padding-top: 8px; padding-bottom: 8px; }
/* 封面：首字母垫底也铺满，img 绝对定位覆盖；大图位置别让 i 压住图 */
.ad-wprev-v > i, .ad-wp-v > i { background: linear-gradient(150deg, #f4f7f9 0%, #e8eef2 100%); }
.ad-wprev-v img, .ad-wp-v img { position: absolute; inset: 0; z-index: 1; }
.ad-wprev-play, .ad-wp-badge { z-index: 2; }

/* =========================================================
 * 驾驶舱自定义布局（12 栏栅格 + 配置抽屉）
 *
 * 每块自己带宽度（w3/4/6/8/12），按顺序流式排；
 * 窄屏按比例折半，不做「8 变整行然后旁边留个大洞」那种缩法。
 * ========================================================= */
.dh-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.dh-cell { display: flex; min-width: 0; }
.dh-cell > .dh-card { flex: 1 1 auto; }
.dh-w3 { grid-column: span 3; }
.dh-w4 { grid-column: span 4; }
.dh-w6 { grid-column: span 6; }
.dh-w8 { grid-column: span 8; }
.dh-w12 { grid-column: span 12; }

.dh-none, .dh-kpi-none {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  padding: 28px 22px; border: 1px dashed var(--border-strong); border-radius: 14px;
  background: #fbfcfd; color: var(--muted); font-size: 14.5px; text-align: center; line-height: 1.6;
}
.dh-none b { font-size: 15.5px; color: var(--text-2); font-weight: 650; }
.dh-kpi-none { flex-direction: row; gap: 12px; padding: 16px 20px; text-align: left; }
.dh-none .btn, .dh-kpi-none .btn { flex: none; }

/* 顶部「自定义」：图标与文字居中对齐，和旁边的 ghost 按钮同高 */
.dh-cfg-btn { display: inline-flex; align-items: center; gap: 6px; }
.dh-cfg-btn svg { opacity: .62; transition: opacity .15s; }
.dh-cfg-btn:hover svg { opacity: 1; }

/* ---- 抽屉 ---- */
.dh-cfg-mask {
  position: fixed; inset: 0; z-index: 88;
  display: flex; justify-content: flex-end;
  background: rgba(15, 23, 42, 0);
  transition: background .2s var(--ease);
}
.dh-cfg-mask.on { background: rgba(15, 23, 42, .34); }
.dh-cfg {
  width: min(462px, 96vw); height: 100%;
  display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--border);
  box-shadow: -30px 0 70px -34px rgba(15, 23, 42, .38);
  transform: translateX(30px); opacity: 0;
  transition: transform .24s var(--ease), opacity .18s var(--ease);
}
.dh-cfg-mask.on .dh-cfg { transform: none; opacity: 1; }

.dh-cfg-hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border); flex: none;
}
.dh-cfg-hd h3 { font-size: 18.5px; font-weight: 650; letter-spacing: -.2px; }
.dh-cfg-hd p { margin-top: 5px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.dh-cfg-x {
  border: 0; background: none; width: 28px; height: 28px; flex: none; border-radius: 8px;
  color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer; font-family: inherit;
}
.dh-cfg-x:hover { background: var(--hover); color: var(--text); }

.dh-cfg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 20px 20px; }
.dh-cfg-sec { padding-top: 16px; }
.dh-cfg-sec-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dh-cfg-sec-h b { font-size: 15px; font-weight: 650; }
.dh-cfg-sec-h em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.dh-cfg-list { display: flex; flex-direction: column; gap: 6px; }
.dh-cfg-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.dh-cfg-row:hover { border-color: var(--border-strong); }
.dh-cfg-row.off { background: #fbfcfd; }
.dh-cfg-row.off .dh-cfg-t b { color: var(--muted); }
.dh-cfg-row.off .dh-cfg-t em { opacity: .72; }
.dh-cfg-row.drag {
  opacity: .6; border-color: var(--brand);
  box-shadow: 0 8px 22px -10px rgba(15, 23, 42, .28);
}

.dh-cfg-grip {
  display: grid; place-items: center; width: 15px; height: 26px; flex: none;
  color: #b6c2cf; cursor: grab;
}
.dh-cfg-grip:hover { color: var(--muted); }
.dh-cfg-grip:active { cursor: grabbing; }

.dh-cfg-ck { position: relative; display: grid; place-items: center; width: 18px; height: 18px; flex: none; cursor: pointer; }
.dh-cfg-ck input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dh-cfg-ck i {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.5px solid var(--border-strong); background: #fff;
  transition: background .14s, border-color .14s, box-shadow .14s;
}
.dh-cfg-ck input:checked + i { background: var(--brand); border-color: var(--brand); }
.dh-cfg-ck input:checked + i::after {
  content: ""; display: block; width: 7.5px; height: 4px; margin: 3.5px auto 0;
  border-left: 1.7px solid #fff; border-bottom: 1.7px solid #fff;
  transform: rotate(-45deg);
}
.dh-cfg-ck input:focus-visible + i { box-shadow: 0 0 0 3px var(--brand-soft); }

.dh-cfg-t { flex: 1 1 auto; min-width: 0; }
.dh-cfg-t b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.dh-cfg-t em {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 2px; font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.45;
}

.dh-cfg-w {
  flex: none; width: 76px; height: 28px; padding: 0 24px 0 9px;
  font-size: 13px; border-radius: 7px;
  background-position: right 8px center; background-size: 8px 5px;
}

.dh-cfg-mv { display: flex; flex-direction: column; gap: 1px; flex: none; }
.dh-cfg-mv button {
  display: grid; place-items: center;
  width: 20px; height: 15px; padding: 0; border: 0; border-radius: 4px; background: none;
  color: #9aa8b8; font-size: 13px; line-height: 1; cursor: pointer; font-family: inherit;
}
.dh-cfg-mv button:hover { color: var(--text); background: var(--hover); }

.dh-cfg-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dh-cfg-presets button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; cursor: pointer; font-family: inherit; text-align: left;
  transition: border-color .15s, background .15s;
}
.dh-cfg-presets button:hover { border-color: var(--brand); background: var(--brand-soft); }
.dh-cfg-presets b { font-size: 14.5px; font-weight: 650; color: var(--text); }
.dh-cfg-presets em { font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.dh-cfg-ft {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 13px 20px; border-top: 1px solid var(--border); background: #fbfcfd;
}
.dh-cfg-grow { flex: 1 1 auto; }
.dh-cfg-ft .btn { padding: 8px 16px; font-size: 15px; }
.dh-cfg-reset {
  border: 0; background: none; padding: 4px 0; font-family: inherit;
  font-size: 14px; color: var(--muted); cursor: pointer;
}
.dh-cfg-reset:hover { color: var(--red); }

body.dh-cfg-on { overflow: hidden; }

/* ---- 店铺选择（顶部工具条） ---- */
.dh-shop {
  position: relative; display: inline-flex; align-items: center;
  border-radius: 9px; background: #fff;
}
.dh-shop-ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; color: var(--muted); pointer-events: none;
}
.dh-shop select {
  height: 34px; min-width: 168px; max-width: 230px;
  padding: 0 28px 0 32px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--text);
}
.dh-shop.on select { border-color: rgba(17, 131, 110, .5); color: var(--brand-text); font-weight: 600; }
.dh-shop.on .dh-shop-ico { color: var(--brand); }
.dh-sub-shop {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 20px; background: var(--brand-soft);
  color: var(--brand-text); font-size: 13px; font-weight: 600;
}

/* ---- 店铺结构：可点切换 + 当前高亮 ---- */
.sitem.clickable { cursor: pointer; border-radius: 8px; }
.sitem.clickable:hover { background: var(--bg-subtle); }
.sitem.on { background: var(--brand-soft); }
.sitem.on .sitem-name b { color: var(--brand-text); }
.sitem.on .sitem-bar > i { background: var(--brand); }
.sitem-cur {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-style: normal; font-size: 11.5px; font-weight: 600; line-height: 1.5;
  color: var(--brand-text); background: rgba(17, 131, 110, .16); border-radius: 4px;
  vertical-align: 1px;
}

/* ---- 功能模块卡（驾驶舱 · 全站功能） ---- */
.dh-modc { gap: 0; }
.dh-modc-h { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dh-modc-ico {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--bg-subtle); color: var(--text-2);
}
.dh-modc-t { min-width: 0; }
.dh-modc-t h3 { font-size: 15.5px; }
.dh-modc-v { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.dh-modc-v b {
  font-size: 31px; font-weight: 680; letter-spacing: -.6px;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.dh-modc-v span { font-size: 14px; color: var(--muted); }
.dh-modc-sub { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.dh-modc-rows {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--border);
}
.dh-modc-rows > div { display: flex; align-items: baseline; gap: 5px; font-size: 13px; color: var(--muted); }
.dh-modc-rows b { font-size: 15px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.dh-modc-rows .warn b { color: var(--amber); }
.dh-modc-rows .bad b { color: var(--red); }
.dh-modc-rows .ok b { color: var(--green); }
.dh-modc-none {
  margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.55;
}

/* ---- 抽屉：功能模块区 ---- */
.dh-cfg-q { margin-bottom: 8px; }
.dh-cfg-q input {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 14.5px;
}
.dh-cfg-empty { padding: 14px 4px; font-size: 14px; color: var(--muted); }
.dh-cfg-row[hidden] { display: none !important; }
.dh-cfg-static { cursor: default; color: #cbd5e1; }
.dh-cfg-static:hover { color: #cbd5e1; }

/* 中等屏：12 栏折成 6 栏，宽度按比例减半（2/3 仍然是 2/3，不会留洞） */
@media (max-width: 1500px) {
  .dh-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dh-w3, .dh-w4 { grid-column: span 2; }
  .dh-w6 { grid-column: span 3; }
  .dh-w8 { grid-column: span 4; }
  .dh-w12 { grid-column: span 6; }
}
@media (max-width: 1120px) {
  .dh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-w3, .dh-w4 { grid-column: span 1; }
  .dh-w6, .dh-w8, .dh-w12 { grid-column: span 2; }
  .dh-cfg-presets { grid-template-columns: 1fr; }
}

/* =========================================================
 * 店铺任务（增长营销 → 店铺任务）
 * 卡片式：后台「我的任务」一条任务一张卡，进度条是主角
 * ========================================================= */
.ms-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(348px, 1fr));
  gap: 12px; align-items: start;
}
.ms-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px 12px; min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.ms-card:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.ms-card.done { background: #fcfefd; border-color: rgba(17, 131, 110, .18); }
.ms-card.expired { background: #fdfcfa; border-color: rgba(180, 83, 9, .22); }

.ms-hd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ms-cat {
  font-size: 12px; line-height: 1.7; padding: 0 6px; border-radius: 5px;
  font-weight: 600; letter-spacing: .01em;
}
.ms-cat.blue { background: #eff5ff; color: #1d4ed8; }
.ms-cat.violet { background: #f4f0ff; color: #6d28d9; }
.ms-cat.amber { background: #fff7ea; color: #b45309; }
.ms-cat.teal { background: #ecf8f5; color: #0f766e; }
.ms-cat.red { background: #fdf0f0; color: #b91c1c; }
.ms-cat.gray { background: #f3f5f7; color: #64748b; }

.ms-st {
  font-size: 12px; line-height: 1.7; padding: 0 6px; border-radius: 5px;
  border: 1px solid transparent; font-weight: 600;
}
.ms-st.doing { background: #fff7ea; color: #b45309; border-color: rgba(180, 83, 9, .16); }
.ms-st.review { background: #eff5ff; color: #1d4ed8; border-color: rgba(29, 78, 216, .16); }
.ms-st.done { background: var(--brand-soft); color: var(--brand-text); border-color: rgba(17, 131, 110, .2); }
.ms-st.reached { background: #ecfdf5; color: #047857; border-color: rgba(4, 120, 87, .18); }
.ms-st.expired { background: #fdf0f0; color: #b91c1c; border-color: rgba(185, 28, 28, .18); }
.ms-st.pending { background: #f3f5f7; color: #64748b; border-color: rgba(100, 116, 139, .16); }

.ms-due { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ms-due.warn { color: #b45309; font-weight: 600; }
.ms-due.bad { color: var(--red); font-weight: 600; }

.ms-card h3 {
  margin: 9px 0 0; font-size: 15.5px; font-weight: 650; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.ms-reward { margin-top: 7px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.ms-reward b { font-size: 19.5px; font-weight: 700; letter-spacing: -.3px; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.ms-reward em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.ms-na { font-size: 14px; color: #b6c0cc; }

.ms-prog { margin-top: 10px; }
.ms-prog-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ms-prog-hd span { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ms-prog-hd span i { font-style: normal; color: var(--muted); }
.ms-prog-hd b { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ms-prog-hd b.ok { color: #047857; }
.ms-bar { height: 6px; border-radius: 99px; background: #eef2f5; overflow: hidden; margin-top: 6px; }
.ms-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #11836e, #2fae94); transition: width .3s var(--ease); }
.ms-bar i.ok { background: linear-gradient(90deg, #0f766e, #34d399); }
.ms-cover { margin-top: 5px; font-size: 12.5px; color: #94a3b8; }
.ms-cover.warn { color: #b45309; }
.ms-prog-none { margin-top: 9px; font-size: 12.5px; color: #b6c0cc; }

.ms-ft {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.ms-shop {
  flex: 1 1 120px; min-width: 0; font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ms-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.ms-act {
  height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-strong);
  background: var(--panel); color: var(--text-2); font-size: 13px; font-family: inherit;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  transition: border-color .14s, color .14s, background .14s;
}
.ms-act:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.ms-act.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ms-act.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.ms-act[disabled] { opacity: .55; cursor: default; }

.ms-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 46px 20px; border: 1px dashed var(--border-strong); border-radius: 12px;
  background: #fbfcfd; text-align: center;
}
.ms-empty b { font-size: 16px; color: var(--text-2); font-weight: 650; }
.ms-empty span { font-size: 14px; color: var(--muted); max-width: 460px; line-height: 1.65; }

/* ---- 录入 / 编辑弹窗 ---- */
/* 字段多，改成「标题固定 + 表单滚动 + 按钮固定」，不然最后一项会被按钮压住 */
.ms-modal {
  width: 760px; max-height: 88vh;
  display: flex; flex-direction: column;
  padding: 20px 22px 16px;
}
.ms-modal > h3 { flex: none; }
.ms-modal .ms-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; margin-bottom: 2px; }
.ms-modal .modal-btns {
  flex: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.ms-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; margin-top: 14px; }
.ms-form label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ms-form label i { font-style: normal; font-size: 13px; color: var(--muted); }
.ms-form input, .ms-form select { width: 100%; }
/* 原生数字框的上下箭头又小又灰，和整体的自绘控件不是一套 */
.ms-form input[type="number"] { -webkit-appearance: textfield; appearance: textfield; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.ms-form input[type="number"]::-webkit-outer-spin-button,
.ms-form input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ms-form .f-title, .ms-form .f-note, .ms-form .f-link { grid-column: 1 / -1; }
.ms-form [hidden] { display: none; }
.ms-form .ms-form-hint {
  grid-column: 1 / -1; margin-top: -2px; padding: 7px 10px; border-radius: 8px;
  background: #f7faf9; border: 1px dashed var(--border-strong); color: var(--muted);
}
.ms-modal .modal-btns { align-items: center; }
.ms-modal .modal-btns .grow { flex: 1 1 auto; }
.ms-del { color: var(--red); border-color: rgba(185, 28, 28, .28); }
.ms-del:hover { background: #fdf0f0; border-color: var(--red); color: var(--red); }

.ms-help p { margin: 0 0 9px; font-size: 14.5px; line-height: 1.72; color: var(--text-2); }
.ms-help p:last-child { margin-bottom: 0; }
.ms-help b { color: var(--text); }

@media (max-width: 860px) {
  .ms-list { grid-template-columns: 1fr; }
  .ms-form { grid-template-columns: 1fr; }
  .ms-modal { width: 96vw; }
}

/* ==========================================================================
 * 广告营销（2026-11-16 重做，原「营销日历」）
 * 三块：促销创建（工具卡 + 表单工作室）/ 促销管理（数据条 + 表）/ 营销活动（报名卡）
 * 观感沿用中台既有规范：白底细边、品牌色只做点状强调，数值等宽右对齐
 * ========================================================================== */

/* 一级页签：胶囊式，与店铺授权 / 售后页同一套 */
.pm-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 16px;
  background: var(--bg-subtle); border-radius: 11px;
  width: fit-content; max-width: 100%; overflow-x: auto;
}
.pm-tab {
  padding: 7px 18px; border: none; border-radius: 8px; background: none;
  font-size: 15.5px; color: var(--muted); font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: all .15s var(--ease);
}
.pm-tab:hover { color: var(--text); }
.pm-tab.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* 区头 */
.pm-lead { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.pm-lead h2 { font-size: 18px; font-weight: 650; letter-spacing: .1px; }
.pm-lead p { font-size: 14.5px; color: var(--muted); margin-top: 5px; line-height: 1.75; max-width: 780px; }
.pm-lead-tag {
  flex: none; font-size: 13px; color: var(--brand-text);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 11px; white-space: nowrap;
}

/* 色片：图标底 */
.pm-chip {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.pm-chip.red { background: var(--red-soft); color: var(--red); }
.pm-chip.brand { background: var(--brand-soft); color: var(--brand-text); }
.pm-chip.amber { background: var(--amber-soft); color: var(--amber); }
.pm-chip.teal { background: var(--green-soft); color: var(--green); }
.pm-chip.violet { background: var(--blue-soft); color: var(--blue); }

/* ---------- 推荐卡 ---------- */
.pm-rec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.pm-card {
  position: relative; background: var(--panel); border: 1px solid var(--border);
  border-radius: 13px; padding: 15px 16px 0; cursor: pointer;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.pm-card:hover { border-color: var(--brand); box-shadow: 0 10px 24px -16px rgba(17, 131, 110, .55); transform: translateY(-1px); }
.pm-card.ext { background: linear-gradient(180deg, var(--panel), rgba(248, 250, 251, .9)); }
.pm-card-hd { display: flex; align-items: center; gap: 8px; }
.pm-card-kicker { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .2px; }
.pm-card-ext {
  margin-left: auto; font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}
.pm-card h3 { font-size: 16.5px; font-weight: 650; margin: 10px 0 0; letter-spacing: .1px; }
.pm-card p {
  font-size: 14px; color: var(--muted); line-height: 1.65; margin-top: 5px; min-height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pm-card-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 10px -16px 0; padding: 9px 16px; border-top: 1px solid var(--border);
  background: rgba(248, 250, 251, .6);
}
.pm-card:hover .pm-card-ft { background: rgba(17, 131, 110, .04); }
.pm-metric { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-go { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--brand-text); white-space: nowrap; }
.pm-card.ext .pm-go { color: var(--muted); }

/* ---------- 工具网格 ---------- */
.pm-sec-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pm-sec-hd h2 { font-size: 16px; font-weight: 650; }
.pm-sec-hd span { font-size: 13px; color: var(--muted); }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 12px; }
.pm-tool {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 15px; cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.pm-tool:hover { border-color: var(--brand); box-shadow: 0 8px 20px -16px rgba(17, 131, 110, .5); }
.pm-tool.off:hover { border-color: var(--border-strong); box-shadow: none; }
.pm-tool-hd { display: flex; align-items: center; gap: 8px; }
.pm-tool-hd h3 { font-size: 15.5px; font-weight: 620; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-tool p {
  font-size: 14px; color: var(--muted); line-height: 1.6; min-height: 34px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pm-tool-rule { font-size: 12.5px; color: var(--text-2); background: var(--bg-subtle); border-radius: 7px; padding: 6px 8px; line-height: 1.5; }

/* ---------- 创建工作室 ---------- */
.pm-studio {
  margin-top: 20px; background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: 15px; box-shadow: 0 18px 40px -30px rgba(15, 23, 42, .4); overflow: hidden;
}
.pm-studio-hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 131, 110, .05), transparent);
}
.pm-studio-kicker { font-size: 13px; color: var(--brand-text); font-weight: 600; letter-spacing: .2px; }
.pm-studio-hd h2 { font-size: 18.5px; font-weight: 650; margin-top: 4px; }
.pm-x {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
  flex: none; transition: all .15s;
}
.pm-x:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-subtle); }
.pm-studio-bd { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 0; }
.pm-form { padding: 16px 18px 20px; min-width: 0; }
.pm-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.pm-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pm-f i { font-style: normal; font-size: 13px; color: var(--text-2); font-weight: 500; }
.pm-f input, .pm-f select { width: 100%; height: 34px; font-size: 14.5px; border-radius: 8px; }
.pm-f input[type="datetime-local"] { font-variant-numeric: tabular-nums; }

/* 选品 */
.pm-pickblock { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; margin-top: 4px; }
.pm-pick-hd {
  display: flex; align-items: baseline; gap: 8px; padding: 10px 12px;
  background: var(--bg-subtle); border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.pm-pick-hd b { font-size: 14.5px; font-weight: 600; }
.pm-pick-hd span { font-size: 12.5px; color: var(--muted); }
.pm-pick-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.pm-pick-bar .af-input { height: 32px; flex: 1; min-width: 0; }
.pm-pick-note { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pm-pick-res { max-height: 268px; overflow-y: auto; }
.pm-pick-empty { padding: 22px 12px; text-align: center; font-size: 14px; color: var(--muted); }
.pm-pr { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.pm-pr:last-child { border-bottom: none; }
.pm-pr.on { background: rgba(17, 131, 110, .04); }
.pm-pr img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--bg-subtle); flex: none; }
.pm-pr-bd { flex: 1; min-width: 0; }
.pm-pr-t { font-size: 14.5px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-pr-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.pm-pr .btn { flex: none; }

/* 已选商品与 SKU 价格 */
.pm-picked { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pm-picked-empty {
  border: 1px dashed var(--border-strong); border-radius: 10px; padding: 18px;
  text-align: center; font-size: 14px; color: var(--muted);
}
.pm-pk { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.pm-pk-hd { display: flex; align-items: center; gap: 9px; padding: 8px 12px; background: var(--bg-subtle); }
.pm-pk-hd img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex: none; }
.pm-pk-t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-pk-del {
  border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer;
  font-family: inherit; flex: none; padding: 2px 4px;
}
.pm-pk-del:hover { color: var(--red); }
.pm-skus { padding: 4px 12px 8px; }
.pm-sku {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px 104px 54px;
  align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border);
}
.pm-sku:last-child { border-bottom: none; }
.pm-sku-n { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-sku-o { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-sku-in {
  height: 30px; width: 100%; border: 1px solid var(--border-strong); border-radius: 7px;
  padding: 0 9px; font-size: 14.5px; font-family: inherit; text-align: right;
  font-variant-numeric: tabular-nums;
}
.pm-sku-in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pm-sku-d { font-size: 13px; color: var(--amber); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 右侧汇总 */
.pm-side {
  padding: 16px 16px 18px; border-left: 1px solid var(--border);
  background: rgba(248, 250, 251, .66); display: flex; flex-direction: column; gap: 8px;
}
.pm-side-t { font-size: 14px; font-weight: 600; color: var(--text-2); letter-spacing: .2px; margin-bottom: 2px; }
.pm-side-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; }
.pm-side-row span { color: var(--muted); }
.pm-side-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.pm-side-row b.ok { color: var(--green); }
.pm-side-row b.warn { color: var(--red); }
.pm-side-tip { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-top: 6px; }
.pm-submit { width: 100%; margin-top: 6px; }
.pm-side-warn { font-size: 12px; color: var(--amber); line-height: 1.55; }

/* ---------- 管理面板 ---------- */
.pm-stat {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  margin-bottom: 14px; overflow: hidden;
}
.pm-stat-i { padding: 13px 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-stat-i:first-child { border-left: none; }
.pm-stat-lb { font-size: 13px; color: var(--muted); }
.pm-stat-i b { font-size: 22px; font-weight: 680; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.pm-stat-sb { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#pm-table td { padding: 10px 14px; }
.pm-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pm-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-shop { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pm-table .row-actions { white-space: nowrap; }
#pm-table .row-actions button { flex: none; white-space: nowrap; }
#pm-table th.num, #pm-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
#pm-table .row-actions .badge { flex: none; white-space: nowrap; }
.pm-time { white-space: nowrap; font-variant-numeric: tabular-nums; }

.pm-pager { display: flex; align-items: center; gap: 6px; margin-top: 12px; justify-content: flex-end; }
.pm-pg {
  min-width: 30px; height: 30px; padding: 0 9px; border: 1px solid var(--border);
  background: var(--panel); border-radius: 7px; font-size: 14px; color: var(--text-2);
  font-family: inherit; cursor: pointer; transition: all .14s;
}
.pm-pg:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.pm-pg.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pm-pg:disabled { opacity: .45; cursor: not-allowed; }
.pm-pg-info { font-size: 13px; color: var(--muted); margin-left: 6px; }

/* 详情弹窗 */
.modal.modal-wide.pm-modal { width: 980px; max-width: 95vw; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; }
.pm-dt-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pm-dt-hd h3 { font-size: 18.5px; font-weight: 650; }
.pm-dt-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pm-dt-body { overflow-y: auto; padding: 14px 0 4px; flex: 1; min-height: 0; }
.pm-dt-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr; gap: 12px; margin-bottom: 14px; }
.pm-f-ro .pm-ro { font-size: 14px; color: var(--text-2); padding: 8px 0; line-height: 1.5; }
.pm-dt-prods-hd { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.pm-dt-prods-hd span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.pm-dt-p { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.pm-dt-p-hd { display: flex; align-items: center; gap: 9px; padding: 8px 12px; background: var(--bg-subtle); }
.pm-dt-p-hd img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex: none; }
.pm-dt-p-hd span { flex: 1; min-width: 0; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-dt-p-hd em { font-style: normal; font-size: 12.5px; color: var(--muted); flex: none; }
.pm-dt-skus { padding: 4px 12px 8px; }
.pm-dt-sku {
  display: grid; grid-template-columns: minmax(0, 1fr) 100px 80px; gap: 10px;
  padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.pm-dt-sku:last-child { border-bottom: none; }
.pm-dt-sku span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-dt-sku b { text-align: right; font-variant-numeric: tabular-nums; }
.pm-dt-sku i { font-style: normal; text-align: right; color: var(--muted); font-size: 12.5px; }
.pm-dt-none, .pm-dt-err { padding: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.pm-dt-err { color: var(--red); }
.modal .pm-modal .modal-btns { position: static; box-shadow: none; padding-top: 12px; border-top: 1px solid var(--border); }
.pm-del { color: var(--red); }
.pm-del:hover { background: var(--red-soft); }

/* 确认框里的小表 */
.pm-confirm > div { display: flex; gap: 10px; font-size: 14.5px; padding: 3px 0; }
.pm-confirm > div span { color: var(--muted); min-width: 44px; }
.pm-confirm p { font-size: 14px; color: var(--amber); margin-top: 8px; line-height: 1.6; }

/* 类型外链说明 */
.pm-ext-note p { font-size: 14.5px; line-height: 1.75; margin-bottom: 8px; }
.pm-ext-rule { font-size: 13px; color: var(--muted); background: var(--bg-subtle); border-radius: 7px; padding: 7px 9px; }
.pm-help p { font-size: 14.5px; line-height: 1.8; margin-bottom: 10px; }
.pm-help p:last-child { margin-bottom: 0; }

/* ---------- 营销活动（报名卡） ---------- */
.pm-mkt-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pm-mc {
  background: var(--panel); border: 1px solid var(--border); border-radius: 13px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.pm-mc:hover { border-color: var(--border-strong); box-shadow: 0 8px 22px -20px rgba(15, 23, 42, .5); }
.pm-mc-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pm-mc-t { font-size: 15.5px; font-weight: 620; line-height: 1.45; min-width: 0; }
.pm-mc-sub { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.pm-mc-time { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pm-mc-time i { font-style: normal; color: var(--muted); margin-right: 4px; }
.pm-mc-subs { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); padding: 7px 0; }
.pm-mc-sub { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; padding: 3px 0; min-width: 0; }
.pm-mc-sub input { width: 14px; height: 14px; accent-color: var(--brand); flex: none; cursor: pointer; }
.pm-mc-sub span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-mc-sub em { font-style: normal; font-size: 12px; color: var(--muted); flex: none; }
.pm-mc-sub.on span { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--muted); }
.pm-mc-nosub { font-size: 13px; color: var(--muted); padding: 4px 0; }
.pm-mc-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pm-mc-cnt { font-size: 12.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-mc-link {
  font-size: 14px; color: var(--brand-text); text-decoration: none;
  border: 1px solid rgba(17, 131, 110, .28); border-radius: 7px; padding: 3px 9px; white-space: nowrap;
}
.pm-mc-link:hover { background: var(--brand-soft); }
.pm-mc-ft .row-actions { flex: none; }
.pm-mkt-empty {
  grid-column: 1 / -1; border: 1px dashed var(--border-strong); border-radius: 12px;
  padding: 34px 20px; text-align: center; display: flex; flex-direction: column; gap: 7px; align-items: center;
}
.pm-mkt-empty b { font-size: 15.5px; }
.pm-mkt-empty span { font-size: 14px; color: var(--muted); }

/* 营销活动表单 */
.modal.modal-wide.pm-mc-modal { width: 820px; max-width: 95vw; }
.pm-mc-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.pm-mc-form .f-title { grid-column: 1 / 4; }
.pm-mc-form .f-site { grid-column: 4 / 5; }
.pm-mc-form .f-sub { grid-column: 1 / -1; }
/* 四个时间框两两一行：4 列会把 "yyyy/mm/dd --:--" 挤成只剩数字 */
.pm-mc-form .f-es, .pm-mc-form .f-ee, .pm-mc-form .f-rs, .pm-mc-form .f-re { grid-column: span 2; }
.pm-mc-form .f-link, .pm-mc-form .f-note { grid-column: 1 / -1; }
.pm-mc-form .f-subs { grid-column: 1 / -1; }
.pm-subs-edit { display: flex; flex-direction: column; gap: 6px; }
.pm-sub-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.pm-sub-row input[type="text"], .pm-sub-row input:not([type]) {
  height: 32px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 0 9px; font-size: 14.5px; font-family: inherit;
}
.pm-sub-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pm-sub-ck { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.pm-sub-ck input { accent-color: var(--brand); }
.pm-sub-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.pm-sub-del:hover { color: var(--red); }
.pm-add-sub {
  margin-top: 6px; align-self: flex-start; border: 1px dashed var(--border-strong);
  background: none; border-radius: 7px; padding: 5px 10px; font-size: 13px; color: var(--text-2);
  font-family: inherit; cursor: pointer;
}
.pm-add-sub:hover { border-color: var(--brand); color: var(--brand-text); background: rgba(17, 131, 110, .04); }
.pm-subs-none { font-size: 13px; color: var(--muted); padding: 4px 0; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1440px) {
  .pm-rec { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .pm-card h3 { font-size: 15.5px; }
}
@media (max-width: 1280px) {
  .pm-rec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-studio-bd { grid-template-columns: minmax(0, 1fr) 250px; }
  .pm-dt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .pm-mkt-list { grid-template-columns: minmax(0, 1fr); }
  .pm-stat { grid-template-columns: minmax(0, 1fr); }
  .pm-stat-i { border-left: none; border-top: 1px solid var(--border); }
  .pm-stat-i:first-child { border-top: none; }
  .pm-studio-bd { grid-template-columns: minmax(0, 1fr); }
  .pm-side { border-left: none; border-top: 1px solid var(--border); }
  .pm-mc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-mc-form .f-title, .pm-mc-form .f-site, .pm-mc-form .f-sub,
  .pm-mc-form .f-link, .pm-mc-form .f-note, .pm-mc-form .f-subs { grid-column: 1 / -1; }
}

/* 选品里的统一折扣 + SKU 折叠（商品可能有 200+ 个 SKU，全量渲染会卡） */
.pm-bulk {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.pm-bulk input {
  width: 46px; height: 26px; border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 0 6px; font-size: 13px; font-family: inherit; text-align: right;
  font-variant-numeric: tabular-nums;
}
.pm-bulk input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pm-bulk-go {
  height: 26px; padding: 0 8px; border: 1px solid var(--border); background: var(--panel);
  border-radius: 6px; font-size: 12.5px; color: var(--text-2); font-family: inherit; cursor: pointer;
}
.pm-bulk-go:hover { border-color: var(--brand); color: var(--brand-text); }
.pm-more {
  width: 100%; margin-top: 6px; border: 1px dashed var(--border-strong); background: none;
  border-radius: 7px; padding: 5px 10px; font-size: 13px; color: var(--text-2);
  font-family: inherit; cursor: pointer;
}
.pm-more:hover { border-color: var(--brand); color: var(--brand-text); background: rgba(17, 131, 110, .04); }

/* 推荐卡：等高、页脚贴底（否则 4 张卡内容长短不一时页脚错位） */
.pm-card { display: flex; flex-direction: column; }
.pm-card-ft { margin-top: auto; }

/* 详情弹窗：SKU 行顺序改为「SKU → 限购 → 活动价」，价格贴右边缘才对齐；
   SKU 多时默认只列 6 行，避免弹窗被 100+ 行撑成一条长带 */
.pm-dt-sku { grid-template-columns: minmax(0, 1fr) 74px 104px; }
.pm-dt-sku b { text-align: right; }
.pm-dt-sku i { font-size: 12.5px; color: var(--muted); text-align: right; }
.pm-dt-all {
  margin-left: auto; border: 1px solid var(--border); background: var(--panel);
  border-radius: 6px; padding: 2px 8px; font-size: 12.5px; color: var(--text-2);
  font-family: inherit; cursor: pointer;
}
.pm-dt-all:hover { border-color: var(--brand); color: var(--brand-text); }
.pm-dt-more { font-size: 12.5px; color: var(--muted); padding: 4px 0 2px; }

/* 列表排序切换：小号描边按钮，和 af-bar 里的下拉同高 */
.pm-sort {
  height: 32px; padding: 0 10px; border: 1px solid var(--border);
  background: var(--panel); border-radius: 8px; font-size: 14px; color: var(--text-2);
  font-family: inherit; cursor: pointer; white-space: nowrap; transition: all .14s;
}
.pm-sort:hover { border-color: var(--border-strong); color: var(--text); }
.pm-sort.on { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }

/* 刚创建的那一行：淡绿底 + 左侧刻度，扫一眼就能找到 */
#pm-table tr.pm-row-new td { background: rgba(17, 131, 110, .055); }
#pm-table tr.pm-row-new td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* 5 个工具卡在 1280 会排成 4+1（孤儿），落成 3+2 更整 */
@media (max-width: 1320px) {
  .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
 * 财务概览（2026-11-16）
 * 对齐 Seller Center › 财务 › 概览：四卡 + 资金流 + 结算单 + 回款
 * 观感沿用中台规范：白底细边、品牌色只做点状强调、金额等宽右对齐
 * ========================================================================== */

/* 周期条 */
.fo-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.fo-bar .grow { flex: 1 1 auto; }
.fo-periods { display: flex; gap: 2px; padding: 3px; background: var(--bg-subtle); border-radius: 10px; }
.fo-period {
  padding: 6px 15px; border: none; border-radius: 7px; background: none;
  font-size: 15px; color: var(--muted); font-family: inherit; cursor: pointer;
  white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease);
}
.fo-period:hover { color: var(--text); }
.fo-period.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.fo-range { display: flex; align-items: center; gap: 8px; }
.fo-range[hidden] { display: none; }
.fo-range input[type="date"] { height: 34px; padding: 0 10px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.fo-range-dash { color: var(--muted); font-size: 14px; }
.fo-range .btn { height: 34px; }
.fo-fetched { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* 四卡 */
.fo-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fo-k {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; min-width: 0;
}
.fo-k .lb { font-size: 14px; color: var(--text-2); }
.fo-k .v {
  font-size: 26.5px; font-weight: 700; letter-spacing: -.5px; margin-top: 7px;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-k .sb {
  font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-k.hl .v { color: var(--brand-text); }
.fo-k.green .v { color: var(--green); }
.fo-k.amber .v { color: var(--amber); }

/* 骨架屏 */
.fo-skel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fo-skel-k {
  height: 92px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--bg-subtle) 30%, rgba(255, 255, 255, .7) 50%, var(--bg-subtle) 70%);
  background-size: 240% 100%; animation: fo-shine 1.3s linear infinite;
}
@keyframes fo-shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* 卡片 */
.fo-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden;
}
.fo-card-hd {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 13px 17px; border-bottom: 1px solid var(--border);
}
.fo-card-hd h2 { font-size: 16px; font-weight: 650; }
.fo-card-hd span { font-size: 13px; color: var(--muted); }
.fo-card-total { margin-left: auto; font-variant-numeric: tabular-nums; }

/* 资金流 */
#fo-flow { padding: 17px; }
.fo-flow-hero { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.fo-flow-lb { font-size: 14px; color: var(--text-2); }
.fo-flow-v {
  font-size: 34.5px; font-weight: 720; letter-spacing: -.8px; color: var(--brand-text);
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.fo-flow-sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fo-flow-open {
  border: 1px solid var(--border); background: var(--panel); border-radius: 6px;
  padding: 2px 8px; font-size: 12.5px; color: var(--text-2); font-family: inherit; cursor: pointer;
}
.fo-flow-open:hover { border-color: var(--brand); color: var(--brand-text); }
.fo-flow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; }
.fo-flow-col { min-width: 0; }
.fo-flow-hd {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 14px; color: var(--text-2); padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.fo-flow-hd b { font-size: 16px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.fo-ln {
  display: flex; align-items: center; gap: 9px; padding: 6px 0;
  border-bottom: 1px dashed var(--border); font-size: 14.5px;
}
.fo-ln:last-child { border-bottom: none; }
.fo-ln-n { flex: 1; min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-ln-v { flex: none; font-variant-numeric: tabular-nums; font-weight: 500; }
.fo-ln-v.neg { color: var(--red); }
.fo-ln.sum { border-top: 1px solid var(--border); border-bottom: none; margin-top: 3px; padding-top: 9px; }
.fo-ln.sum .fo-ln-n { color: var(--text); font-weight: 600; }
.fo-ln.sum .fo-ln-v { font-weight: 700; }
.fo-ln-bar { flex: none; width: 96px; height: 7px; border-radius: 4px; background: var(--bg-subtle); overflow: hidden; }
.fo-ln-bar i { display: block; height: 100%; border-radius: 4px; background: rgba(17, 131, 110, .45); }
.fo-ln-bar i.alt { background: rgba(100, 116, 139, .38); }

.fo-flow-foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border);
}
.fo-flow-eq { font-size: 14.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fo-flow-eq b { color: var(--text); font-weight: 700; }
.fo-flow-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; flex: 1 1 320px; min-width: 0; }
.fo-flow-load { padding: 26px; text-align: center; font-size: 14.5px; color: var(--muted); }
.fo-flow-load.err { color: var(--red); }
.fo-flow-empty { padding: 30px; text-align: center; font-size: 14.5px; color: var(--muted); }

/* 表格 */
.fo-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.fo-table th {
  font-size: 13px; font-weight: 600; color: var(--muted); text-align: left;
  padding: 9px 14px; background: rgba(248, 250, 251, .8);
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.fo-table td {
  padding: 10px 14px; font-size: 14.5px; border-bottom: 1px solid var(--border);
  white-space: nowrap; vertical-align: middle;
}
.fo-table tbody tr:last-child td { border-bottom: none; }
.fo-table tbody tr:hover td { background: rgba(17, 131, 110, .025); }
.fo-table tr.on td { background: rgba(17, 131, 110, .055); }
.fo-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.fo-table th.num, .fo-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.fo-table td.num.strong { font-weight: 650; }
.fo-table td.neg { color: var(--red); }
.fo-table td.dim { color: var(--muted); }
.fo-day { font-variant-numeric: tabular-nums; color: var(--text-2); }
.fo-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.fo-bank { color: var(--text-2); font-variant-numeric: tabular-nums; }
.fo-act { text-align: right; }
.fo-link {
  border: 1px solid var(--border); background: var(--panel); border-radius: 6px;
  padding: 3px 9px; font-size: 13px; color: var(--text-2); font-family: inherit; cursor: pointer;
}
.fo-link:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }

/* 徽章 */
.fo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; border-radius: 5px; padding: 2px 7px;
  white-space: nowrap;
}
.fo-badge.ok { background: var(--green-soft); color: var(--green); }
.fo-badge.wait { background: var(--amber-soft); color: var(--amber); }

/* 分页 */
.fo-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 10px 14px; border-top: 1px solid var(--border);
}
.fo-pg {
  min-width: 30px; height: 28px; padding: 0 10px; border: 1px solid var(--border);
  background: var(--panel); border-radius: 6px; font-size: 14px; color: var(--text-2);
  font-family: inherit; cursor: pointer; transition: all .14s;
}
.fo-pg:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.fo-pg:disabled { opacity: .45; cursor: not-allowed; }
.fo-pg-info { font-size: 13px; color: var(--muted); margin-right: 4px; }

/* 空态 */
.fo-empty {
  padding: 40px 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.fo-empty b { font-size: 15.5px; }
.fo-empty span { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 520px; }
.fo-empty.sm { padding: 30px 20px; }

/* 页脚口径说明 */
.fo-foot {
  display: flex; gap: 12px; padding: 14px 17px; border-radius: 11px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted); line-height: 1.75;
}
.fo-foot b { color: var(--text-2); flex: none; }
.fo-foot span b { color: var(--text-2); font-weight: 600; }

/* 明细弹窗 */
.modal.fo-modal { width: 1120px; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.fo-modal-hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.fo-modal-hd h3 { font-size: 18.5px; font-weight: 650; }
.fo-modal-sub { font-size: 13px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.fo-x {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: 14px;
  line-height: 1; flex: none; transition: all .15s;
}
.fo-x:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-subtle); }
.fo-modal-bd { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 13px; }
.fo-dt-fees { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; flex: none; }
.fo-dt-fee {
  display: flex; align-items: baseline; gap: 7px; padding: 5px 11px;
  background: var(--bg-subtle); border-radius: 8px; font-size: 13px;
}
.fo-dt-fee span { color: var(--muted); }
.fo-dt-fee b { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--red); }
.fo-dt-fee.sum { background: var(--brand-soft); }
.fo-dt-fee.sum b { color: var(--brand-text); }
.fo-dt-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.fo-dt-table th { position: sticky; top: 0; z-index: 1; }
.fo-dt-table td { padding: 8px 12px; font-size: 13px; }
.fo-oid { font-variant-numeric: tabular-nums; color: var(--text-2); }
.fo-dt-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; padding-top: 10px; flex: none; }
.fo-modal-ft {
  display: flex; justify-content: flex-end; padding-top: 12px; margin-top: 4px;
  border-top: 1px solid var(--border); flex: none;
}

/* 窄屏 */
@media (max-width: 1440px) {
  .fo-flow-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; }
}
@media (max-width: 1280px) {
  .fo-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-skel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-flow-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fo-ln-bar { width: 120px; }
}
@media (max-width: 1100px) {
  .fo-k { padding: 13px 14px; }
  .fo-k .v { font-size: 23px; }
  .fo-fetched { display: none; }
}

/* 结算单行可点：整行点击切换资金流，但只有「明细」才弹窗 */
#fo-table tbody tr { cursor: pointer; }
#fo-table tbody tr .fo-link { cursor: pointer; }

/* 资金流第二版：两列各成一块面板，别把「名称——金额」拉满整行 */
.fo-flow-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.fo-flow-top .fo-flow-hero { margin-bottom: 0; }
.fo-flow-open {
  flex: none; height: 30px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--panel);
  font-size: 14px; color: var(--text-2); font-family: inherit; cursor: pointer;
  transition: all .14s var(--ease);
}
.fo-flow-open:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }

.fo-flow-grid {
  grid-template-columns: minmax(0, 420px) minmax(0, 470px);
  justify-content: start; gap: 34px;
}
.fo-flow-col {
  padding: 12px 15px 13px; border: 1px solid var(--border);
  border-radius: 11px; background: rgba(248, 250, 251, .55);
}
.fo-flow-hd { padding-bottom: 7px; }
.fo-flow-hd span { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.fo-ln { padding: 5.5px 0; }
.fo-ln-bar { width: 84px; }
.fo-ln-pct {
  flex: none; width: 44px; text-align: right; font-size: 12.5px;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.fo-flow-foot { display: block; margin-top: 18px; }
.fo-flow-eq {
  font-size: 16px; font-weight: 600; color: var(--text-2);
  padding-bottom: 8px; font-variant-numeric: tabular-nums;
}
.fo-flow-eq b { color: var(--brand-text); font-size: 18.5px; }
.fo-flow-note { display: block; font-size: 12.5px; }

@media (max-width: 1280px) {
  .fo-flow-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fo-ln-bar { width: 110px; }
}

/* 费用条形：按最大项归一化才有对比度；配色走中性灰蓝（费用不是涨跌，不用红绿） */
.fo-ln-bar { width: 96px; }
.fo-ln-bar i { background: rgba(71, 85, 105, .42); }
.fo-ln-bar i.alt { background: rgba(148, 163, 184, .55); }

/* 窄屏：周期条和自定义日期不要挤在同一行 */
@media (max-width: 1280px) {
  .fo-bar { gap: 8px; }
  .fo-range { order: 3; flex-basis: 100%; }
}

/* 大屏：资金流两栏别只占左边三分之一，撑到 1000px 宽再往右留白 */
.fo-flow-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  max-width: 1000px;
}
@media (max-width: 1440px) { .fo-flow-grid { max-width: none; } }

/* ==========================================================================
 * 优惠券详情（2026-11-16）
 * 对齐 Seller Center › 促销 › 查看详情：面额 + 使用统计 / 优惠券设置 / 基本信息
 * 券只读，所以页面上不出现保存、停用这类写操作
 * ========================================================================== */
.modal.pm-cp-modal {
  width: 760px; max-width: 95vw; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.pm-cp-hd { flex: 1; min-width: 0; }
.pm-cp-modal .pm-dt-body { overflow-y: auto; flex: 1; min-height: 0; padding-top: 14px; }

/* 顶部：面额 + 状态 + 四个统计 */
.pm-cp-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 15px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 131, 110, .05), rgba(17, 131, 110, 0) 62%);
  margin-bottom: 14px;
}
.pm-cp-face {
  flex: none; min-width: 86px; padding: 9px 13px; border-radius: 11px;
  background: var(--panel); border: 1px solid rgba(17, 131, 110, .28);
  color: var(--brand-text); font-size: 28.5px; font-weight: 720; letter-spacing: -.6px;
  text-align: center; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.pm-cp-face.money { font-size: 24px; letter-spacing: -.4px; }
.pm-cp-hero-bd { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pm-cp-badge {
  align-self: flex-start; font-size: 12px; font-weight: 600;
  border-radius: 5px; padding: 1px 7px; margin-bottom: 1px;
}
.pm-cp-badge.ok { background: var(--green-soft); color: var(--green); }
.pm-cp-badge.wait { background: var(--amber-soft); color: var(--amber); }
.pm-cp-badge.off { background: var(--bg-subtle); color: var(--muted); }
.pm-cp-face-lb { font-size: 16.5px; font-weight: 650; letter-spacing: .1px; }
.pm-cp-face-sub {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis;
}
.pm-cp-stats {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(58px, auto));
  gap: 0 16px; padding-left: 16px; border-left: 1px solid var(--border);
}
.pm-cp-stats > div { display: flex; flex-direction: column; gap: 2px; }
.pm-cp-stats span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pm-cp-stats b {
  font-size: 17px; font-weight: 680; font-variant-numeric: tabular-nums;
  letter-spacing: -.2px; white-space: nowrap;
}

/* 分区 */
.pm-cp-sec { margin-bottom: 16px; }
.pm-cp-sec-hd {
  font-size: 14px; font-weight: 600; color: var(--text-2);
  padding-bottom: 7px; margin-bottom: 10px; border-bottom: 1px solid var(--border);
}
.pm-cp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.pm-cp-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-cp-f span { font-size: 12.5px; color: var(--muted); }
.pm-cp-f b {
  font-size: 14.5px; font-weight: 500; line-height: 1.55; color: var(--text);
  word-break: break-word;
}
.pm-cp-mono { font-variant-numeric: tabular-nums; font-size: 14px; }
.pm-cp-arrow { color: var(--muted); margin: 0 2px; }
.pm-cp-tip {
  font-size: 12.5px; color: var(--muted); line-height: 1.75;
  padding: 10px 12px; background: var(--bg-subtle); border-radius: 8px;
  margin: 2px 0 4px;
}
.pm-cp-tip.warn { background: var(--amber-soft); color: var(--amber); }
.pm-cp-ro { font-size: 13px; color: var(--muted); }

/* 读不到时的降级面板（活动 / 券共用） */
.pm-fail {
  border: 1px solid rgba(217, 119, 6, .32); background: rgba(217, 119, 6, .04);
  border-radius: 11px; padding: 15px 16px;
}
.pm-fail-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pm-fail-x {
  width: 19px; height: 19px; border-radius: 50%; flex: none;
  background: var(--amber-soft); color: var(--amber);
  font-size: 14px; font-weight: 700; line-height: 19px; text-align: center;
}
.pm-fail-hd b { font-size: 15.5px; font-weight: 650; }
.pm-fail-why { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-bottom: 12px; }
.pm-fail-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px;
  padding: 11px 13px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
}
.pm-fail-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-fail-grid span { font-size: 12px; color: var(--muted); }
.pm-fail-grid b {
  font-size: 14px; font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pm-fail-btns { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pm-fail-btns .btn { text-decoration: none; display: inline-flex; align-items: center; }
.pm-fail-raw { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 10px; word-break: break-all; }

@media (max-width: 1100px) {
  .pm-cp-stats { border-left: none; padding-left: 0; flex-basis: 100%; gap: 0 20px; }
  .pm-cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-fail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 券设置三列：8 个字段正好排三行（可领取时间占两列，否则日期被挤成三行） */
.pm-cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.pm-cp-f.wide { grid-column: span 2; }
@media (max-width: 1100px) {
  .pm-cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
 * 财务概览 v2（2026-11-16 重排）
 * 结构：四卡 → 资金流瀑布 + 费用构成 → 每日净额趋势 + 结算单 → 回款
 * 视觉语言：柱高一律按同一基准归一化，数字与柱长必须能互相解释
 * ========================================================================== */

/* ---------- 布局 ---------- */
.fo-main {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px; margin-bottom: 16px;
}
.fo-main > .fo-card { margin-bottom: 0; display: flex; flex-direction: column; }
.fo-main > .fo-card > #fo-flow,
.fo-main > .fo-card > #fo-mix { flex: 1; min-height: 0; }

/* ---------- KPI 卡：标题 + 环比 ---------- */
.fo-kp, .fo-kpi .lb { letter-spacing: .1px; }
.fo-k-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fo-dt {
  font-size: 12px; font-weight: 650; padding: 1px 6px; border-radius: 99px;
  font-variant-numeric: tabular-nums; white-space: nowrap; flex: none;
}
.fo-dt.up { background: var(--red-soft); color: var(--red); }
.fo-dt.down { background: var(--green-soft); color: var(--green); }
.fo-dt.flat { background: var(--bg-subtle); color: var(--muted); font-weight: 500; }
.fo-dt.wait { background: var(--amber-soft); color: var(--amber); }

/* 每日净额迷你柱 */
.fo-spark { display: flex; align-items: flex-end; gap: 2px; height: 24px; margin-top: 10px; }
.fo-spark > i {
  flex: 1 1 0; min-height: 2px; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(17, 131, 110, .55), rgba(17, 131, 110, .2));
}
.fo-spark > i.neg { background: linear-gradient(180deg, rgba(185, 28, 28, .5), rgba(185, 28, 28, .18)); }

/* ---------- 瀑布图 ---------- */
.fo-flow-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px 24px; flex-wrap: wrap; margin-bottom: 4px;
}
.fo-flow-eq { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.fo-flow-eq b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.fo-flow-eq b.neg { color: var(--red); }
.fo-flow-eq b.ok { color: var(--brand-text); }
.fo-eq-op { color: var(--muted); }

#fo-flow { padding: 15px 16px 13px; }
#fo-mix { padding: 15px 16px 13px; }

.fo-wf {
  display: flex; align-items: flex-end; gap: 4px;
  margin: 14px 0 10px; padding-top: 4px;
}
.fo-wf-c { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fo-wf-lb {
  font-size: 12.5px; color: var(--text-2); text-align: center; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-wf-track { position: relative; height: 186px; border-radius: 7px; background: rgba(248, 250, 251, .9); }
.fo-wf-track::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--border);
}
.fo-wf-link {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed rgba(15, 23, 42, .14);
}
.fo-wf-bar {
  position: absolute; left: 13%; right: 13%; border-radius: 4px 4px 2px 2px;
  transition: height .28s var(--ease), bottom .28s var(--ease);
}
.fo-wf-bar.in { background: linear-gradient(180deg, #168a76, #0f6e5e); }
.fo-wf-bar.out { background: linear-gradient(180deg, #0b6353, #084c40); }
.fo-wf-bar.fee { background: linear-gradient(180deg, rgba(185, 28, 28, .62), rgba(185, 28, 28, .34)); }
.fo-wf-bar.other { background: linear-gradient(180deg, rgba(148, 163, 184, .75), rgba(148, 163, 184, .4)); }
.fo-wf-v {
  font-size: 13px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-wf-v.fee { color: var(--red); font-weight: 500; }
.fo-wf-pct { font-size: 12px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.fo-flow-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 6px; }

/* ---------- 费用构成 ---------- */
.fo-mix-bar {
  display: flex; gap: 2px; height: 15px; border-radius: 8px; overflow: hidden;
  background: var(--bg-subtle); margin: 6px 0 4px;
}
.fo-mix-bar > i { height: 100%; display: block; min-width: 2px; }
.fo-mix-legend { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.fo-mix-row {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
  padding: 6px 0; border-bottom: 1px dashed var(--border);
}
.fo-mix-row:last-child { border-bottom: none; }
.fo-mix-row > i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.fo-mix-lb {
  flex: 1; min-width: 0; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-mix-pct { flex: none; width: 46px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.fo-mix-row > b { flex: none; min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fo-mix-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 14.5px; font-weight: 600;
}
.fo-mix-total b { font-variant-numeric: tabular-nums; color: var(--red); }
.fo-mix-empty { padding: 24px 0; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- 每日净额趋势 ---------- */
#fo-trend { border-bottom: 1px solid var(--border); }
.fo-tr { padding: 10px 14px 0; }
.fo-tr-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fo-tr-hd span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.fo-tr-hd em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fo-tr-bars { display: flex; align-items: flex-end; gap: 3px; height: 52px; padding: 8px 0 10px; }
.fo-tr-bar {
  flex: 1 1 0; height: 100%; display: flex; align-items: flex-end;
  padding: 0; border: none; background: none; cursor: pointer; border-radius: 3px;
}
.fo-tr-bar > i { width: 100%; border-radius: 3px 3px 0 0; background: rgba(17, 131, 110, .3); min-height: 2px; }
.fo-tr-bar.neg > i { background: rgba(185, 28, 28, .3); }
.fo-tr-bar:hover > i { background: rgba(17, 131, 110, .55); }
.fo-tr-bar.neg:hover > i { background: rgba(185, 28, 28, .5); }
.fo-tr-bar.on > i { background: #11836e; }
.fo-tr-bar.neg.on > i { background: #b91c1c; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1280px) {
  .fo-main { grid-template-columns: minmax(0, 1fr); }
  .fo-wf-track { height: 164px; }
}
@media (max-width: 900px) {
  .fo-wf-v { font-size: 12px; }
  .fo-wf-pct { display: none; }
  .fo-mix-row > b { min-width: 74px; }
}

/* 费用构成：底部结论 + 整行时图例排两列（否则一条细长行很空） */
.fo-mix-note {
  font-size: 12.5px; color: var(--muted); line-height: 1.7;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
}
@media (max-width: 1280px) {
  .fo-mix-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
}

/* 连接虚线加深一点，柱子之间的「同一水平面」更明显 */
.fo-wf-link { border-top-color: rgba(15, 23, 42, .2); }
