:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #171b2e;
  --muted: #7b8199;
  --line: #e8ebf3;
  --primary: #4b6bfb;
  --primary-hover: #3b5aeb;
  --primary-soft: #eef1fe;
  --ok: #16a34a;
  --err: #e0343c;
  --warn: #f59e0b;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 整体布局 ---------- */
.app { flex: 1 1 auto; display: flex; min-height: 0; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 212px; flex: 0 0 auto;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.side-brand {
  height: 60px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--line);
}
.logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #5b7bff, #7c5cff);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(91,123,255,.32);
}
.brand-txt h1 { font-size: 13.5px; font-weight: 600; letter-spacing: .2px; }
.brand-txt p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.menu { flex: 1 1 auto; overflow-y: auto; padding: 10px 10px 16px; }
.menu-group { margin-bottom: 2px; }
.menu-lv1 {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
  color: #4a5069; font-size: 13px; user-select: none;
  transition: background .13s;
}
.menu-lv1:hover { background: #f3f5fb; }
.menu-group.open > .menu-lv1 { color: var(--text); font-weight: 600; }
.ico { display: flex; align-items: center; color: #8f97af; flex: 0 0 auto; }
.menu-group.open > .menu-lv1 .ico { color: var(--primary); }
.caret {
  margin-left: auto; font-size: 9px; color: #b3b9ca;
  transform: rotate(-90deg); transition: transform .16s;
}
.menu-group.open .caret { transform: rotate(0deg); }

.sub { display: none; padding: 2px 0 6px 34px; }
.menu-group.open .sub { display: block; }
.menu-lv2 {
  padding: 7px 10px; border-radius: 6px; font-size: 12.5px;
  color: #6b7290; cursor: pointer; margin: 1px 0; user-select: none;
  transition: all .13s;
}
.menu-lv2:hover { background: #f3f5fb; color: var(--text); }
.menu-lv2.active { background: var(--primary-soft); color: var(--primary); font-weight: 500; }

.side-foot {
  flex: 0 0 auto; border-top: 1px solid var(--line);
  padding: 10px 14px; display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted);
}
.btn-ghost.mini { padding: 2px 7px; font-size: 11px; margin-left: auto; }

/* ---------- 右侧主区 ---------- */
.main-wrap { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 56px; flex: 0 0 auto;
  background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
}
.crumb { font-size: 12.5px; color: var(--muted); }
.top-right { display: flex; gap: 8px; }

main { flex: 1 1 auto; overflow-y: auto; padding: 18px 22px 22px; }
.view { max-width: none; }
.view-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.view-head h2 { font-size: 17px; font-weight: 600; }
.view-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 按钮 ---------- */
button {
  font-family: inherit; font-size: 13px; cursor: pointer;
  border: none; border-radius: 7px; transition: all .15s ease;
}
.btn-ghost { background: transparent; color: var(--muted); padding: 4px 9px; }
.btn-ghost:hover { background: #eef0f6; color: var(--text); }
.btn-primary {
  background: var(--primary); color: #fff; padding: 8px 15px; font-weight: 500;
  box-shadow: 0 2px 6px rgba(75,107,251,.26);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-danger {
  background: #e0343c; color: #fff; padding: 8px 15px; font-weight: 500;
  box-shadow: 0 2px 6px rgba(224,52,60,.26);
}
.btn-danger:hover { background: #c02b32; }
.btn-secondary {
  background: var(--card); color: #4a5069; padding: 8px 13px;
  border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { border-color: #cfd6ea; background: #fafbff; }
.btn-secondary.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(75,107,251,.26);
}

/* ---------- 提示条 ---------- */
.alert {
  margin: 12px 22px 0; flex: 0 0 auto;
  background: #fff8ed; border: 1px solid #ffe0b2; border-radius: var(--radius);
  padding: 12px 15px; display: flex; gap: 11px; align-items: flex-start;
}
.alert-icon {
  width: 19px; height: 19px; border-radius: 50%; background: #f59e0b;
  color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.alert-body strong { font-size: 13px; display: block; margin-bottom: 3px; }
.alert-body p { font-size: 12.5px; color: #8a6d3b; line-height: 1.65; }
.alert-body pre {
  margin-top: 8px; background: #2b2f3a; color: #d6e2ff; padding: 9px 12px;
  border-radius: 6px; font-size: 12px; font-family: Consolas, monospace;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.alert-btn { margin-top: 10px; padding: 7px 14px; font-size: 12.5px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
}
.card-title { font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-bottom: 13px; }
.card.placeholder { text-align: center; padding: 64px 20px; }
.ph-ico { font-size: 32px; margin-bottom: 12px; opacity: .65; }
.ph-title { font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.ph-desc { font-size: 12.5px; color: var(--muted); line-height: 1.75; max-width: 560px; margin: 0 auto; }

.info-grid { display: grid; grid-template-columns: 88px 1fr; gap: 9px 14px; font-size: 12.5px; }
.info-grid .k { color: var(--muted); }
.info-grid .v {
  color: #3c4360; word-break: break-all;
  font-family: Consolas, "Courier New", monospace; font-size: 11.5px;
}

/* ---------- 搜索 ---------- */
.search-box {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; width: 220px; color: var(--muted); flex: 0 0 auto;
}
.search-box:focus-within { border-color: #b9c6f8; box-shadow: 0 0 0 3px rgba(75,107,251,.09); }
.search-box input {
  border: none; outline: none; background: transparent; font-size: 13px;
  color: var(--text); width: 100%; font-family: inherit;
}

/* ---------- 店铺列表 ---------- */
/* 一行 5 个店铺，宽度一致（grid 每列等宽）。
   排序号 1,2,3,4,5 排在第一排（横向），6,7,8,9,10 排第二排 —— grid 默认按行填充。
   卡片内部横向：店铺名在左（占满），齿轮/启动/删除按钮紧凑在右，缩窄中间空白。 */
.store-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.store-row {
  display: flex; flex-direction: row; gap: 6px;
  align-items: center; justify-content: space-between;
  min-width: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; transition: all .15s ease;
}
.store-row:hover { border-color: #ccd7f5; box-shadow: 0 2px 10px rgba(23,27,46,.055); }
.store-row.running { border-color: #b6e3c6; background: #fbfefc; }

.store-name { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; }
.name-text {
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tag {
  font-size: 10.5px; padding: 1.5px 6px; border-radius: 4px;
  background: var(--primary-soft); color: var(--primary); flex: 0 0 auto;
}
.tag.live { background: #e8f8ee; color: #16a34a; }
.tag.miss { background: #fdeaea; color: var(--err); }
.tag.keep { background: #fff4e5; color: #c2740a; }
/* 四态状态标签 */
.tag.st-run { background: #e8f8ee; color: #16a34a; }   /* 运行中：绿色 */
.tag.st-map { background: #fdeaea; color: var(--err); } /* 未映射：红色 */
.tag.st-off { background: #eceef3; color: #4a5163; }   /* 已禁用：深灰 */

.store-mode select {
  width: 100%; padding: 6px 8px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe;
  color: #3c4360; outline: none; cursor: pointer;
}
.store-mode select:focus { border-color: #b9c6f8; }

.col-act { display: flex; justify-content: flex-end; align-items: center; gap: 4px; flex: 0 0 auto; }
.btn-open {
  background: var(--primary-soft); color: var(--primary);
  padding: 6px 16px; font-weight: 500; border: 1px solid #d7defb;
}
.btn-open:hover { background: #e2e8fd; }
.btn-open:disabled { opacity: .6; cursor: default; }
.btn-del {
  background: transparent; color: #b8bdcf; font-size: 16px; line-height: 1;
  padding: 5px 7px; border-radius: 6px;
}
.btn-del:hover { background: #fdeaea; color: var(--err); }
.btn-set {
  background: transparent; color: #b8bdcf; padding: 5px 7px;
  border-radius: 6px; display: inline-flex; align-items: center;
}
.btn-set:hover { background: #eef1fb; color: var(--primary); }

.empty { text-align: center; padding: 60px 0; color: var(--muted); }
.empty-art { font-size: 34px; margin-bottom: 11px; opacity: .65; }
.empty p { font-size: 14px; color: #4a5069; margin-bottom: 5px; }
.empty span { font-size: 12.5px; }

/* ---------- 路径选择 ---------- */
.path-row { display: flex; gap: 8px; align-items: center; }
.path-row input {
  flex: 1 1 auto; width: 100%; min-width: 0;
  padding: 8px 11px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; outline: none;
  background: #fbfcfe; color: var(--text);
}
.path-row input:focus { border-color: #b9c6f8; background: #fff; }
.path-row button { flex: 0 0 auto; padding: 8px 14px; font-size: 12.5px; }
.path-actions { display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end; }
.path-actions button { font-size: 12px; padding: 6px 12px; border: 1px solid var(--line); }
.path-actions .btn-primary { border: none; }

/* ---------- 底栏 ---------- */
footer {
  flex: 0 0 auto; height: 28px; background: var(--card);
  border-top: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 22px; font-size: 11.5px; color: var(--muted);
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(23,27,46,.34);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--card); border-radius: 13px; padding: 22px 24px;
  width: 420px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(23,27,46,.19);
}
.modal h2 { font-size: 15.5px; font-weight: 600; margin-bottom: 7px; }
.modal-tip { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-bottom: 15px; }
.modal label { display: block; font-size: 12.5px; color: #4a5069; margin: 11px 0 5px; }
.modal input, .modal select {
  width: 100%; padding: 8px 11px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; outline: none;
  background: #fbfcfe; color: var(--text);
}
.modal input:focus, .modal select:focus { border-color: #b9c6f8; background: #fff; }
.hint-line { font-size: 11.5px; margin-top: 6px; min-height: 15px; }
.hint-line.ok { color: var(--ok); }
.hint-line.err { color: var(--err); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal pre {
  background: #2b2f3a; color: #d6e2ff; padding: 10px 12px; border-radius: 7px;
  font-size: 12px; font-family: Consolas, monospace;
  white-space: pre-wrap; word-break: break-all;
}

/* 开关 */
.switch-row {
  display: flex; align-items: flex-start; gap: 14px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 13px; margin-top: 16px; background: #fbfcfe;
}
.switch-text { flex: 1 1 auto; }
.switch-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.switch-desc { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 auto; margin-top: 1px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #ccd2e0; border-radius: 22px; transition: .2s;
}
.slider:before {
  content: ""; position: absolute; height: 17px; width: 17px;
  left: 3px; top: 2.5px; background: #fff; border-radius: 50%;
  transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(17px); }

/* 授权 */
.auth-step {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 13px; margin-bottom: 10px; background: #fbfcfe;
}
.step-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.auth-step pre {
  background: #2b2f3a; color: #d6e2ff; padding: 8px 10px; border-radius: 6px;
  font-size: 11.5px; font-family: Consolas, monospace; margin-bottom: 9px;
  white-space: pre-wrap; word-break: break-all;
}
.auth-step input {
  width: 100%; padding: 8px 11px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; outline: none;
  background: #fff; color: var(--text); margin-bottom: 9px;
}
.auth-step input:focus { border-color: #b9c6f8; }
.auth-step button { font-size: 12.5px; padding: 7px 14px; }

.auth-wait {
  display: flex; gap: 12px; align-items: flex-start;
  background: #eef4ff; border: 1px solid #cfdcfb; border-radius: 8px;
  padding: 12px 13px; margin: 4px 0 6px;
}
.spinner {
  width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px;
  border: 2.5px solid #c3d2f7; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.wait-text { flex: 1 1 auto; }
.wait-title { font-size: 13px; font-weight: 500; color: #26418f; margin-bottom: 3px; }
.wait-desc { font-size: 11.5px; color: #5a6b96; line-height: 1.55; }
.wait-timer { font-size: 11px; color: #8b9bc4; margin-top: 5px; font-variant-numeric: tabular-nums; }
.auth-wait.done { background: #eafaf0; border-color: #b9e6ca; }
.auth-wait.done .spinner { display: none; }
.auth-wait.done .wait-title { color: #15803d; }

/* 状态点 */
.dot { width: 7px; height: 7px; border-radius: 50%; background: #c3c8d6; flex: 0 0 auto; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.13); }
.dot.err { background: var(--err); box-shadow: 0 0 0 3px rgba(224,52,60,.13); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d5d9e5; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c0c6d6; }

/* ---------- 评价分析 ---------- */
.stat-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 9px; margin-bottom: 14px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat-card.bad { border-color: #f6d5d7; background: #fffafa; }
.stat-num { font-size: 20px; font-weight: 600; letter-spacing: -.5px; }
.stat-card.bad .stat-num { color: var(--err); }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.form-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.form-label {
  width: 66px; flex: 0 0 auto; font-size: 12.5px;
  color: #4a5069; padding-top: 6px;
}
.store-picker {
  flex: 1 1 auto; border: 1px solid var(--line); border-radius: 8px;
  background: #fbfcfe; overflow: hidden;
}
.picker-head {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-bottom: 1px solid var(--line); background: #fff;
}
.picker-count { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.picker-list {
  max-height: 148px; overflow-y: auto; padding: 6px 10px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 2px;
}
.picker-list label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #3c4360; padding: 4px 4px; border-radius: 5px;
  cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.picker-list label:hover { background: #eef1fb; }
.picker-list input[type=checkbox] { accent-color: var(--primary); flex: 0 0 auto; }
.picker-list .badge {
  font-size: 10px; color: var(--err); background: #fdeaea;
  padding: 0 4px; border-radius: 3px; margin-left: auto; flex: 0 0 auto;
}

.radio-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.radio input { accent-color: var(--primary); }
.radio-hint { font-size: 11.5px; color: var(--muted); }

.inline-field { display: flex; align-items: center; gap: 10px; padding-top: 2px; }
.inline-field input {
  width: 84px; padding: 6px 9px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; outline: none; background: #fbfcfe;
}
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.run-hint { font-size: 12px; color: var(--muted); }

.progress-line {
  display: flex; gap: 14px; font-size: 12.5px; color: #3c4360;
  margin-bottom: 10px; flex-wrap: wrap;
}
.progress-line span { white-space: nowrap; }
.log-box {
  background: #1e2230; color: #b9c6e8; border-radius: 8px;
  padding: 10px 12px; font-family: Consolas, monospace; font-size: 11.5px;
  line-height: 1.75; max-height: 190px; overflow-y: auto; white-space: pre-wrap;
}

.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.filter-row select {
  padding: 6px 10px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe;
  color: #3c4360; outline: none; cursor: pointer;
}
.search-box.slim { width: 210px; padding: 5px 10px; }
.search-box.slim input { font-size: 12.5px; }

.rv-table-wrap { max-height: 460px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
/* ★ border-collapse 必须是 separate：collapse 会让 th 的 position:sticky 失效（Chrome 已知行为）
   订单表 .od-table 默认就是 separate 所以能固定，采集箱改成一致 */
.rv-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.rv-table th {
  position: sticky; top: 0; background: #f7f8fc; z-index: 1;
  text-align: center; padding: 8px 10px; font-weight: 500;
  color: var(--muted); font-size: 11.5px; border-bottom: 1px solid var(--line);
}
.rv-table td {
  padding: 9px 10px; border-bottom: 1px solid #f2f4fa;
  /* ★ 垂直居中：标题两行时其余列不再贴着第一行 */
  vertical-align: middle; color: #3c4360;
}
.rv-table tr:hover td { background: #fafbff; }
.stars { color: #ffb020; letter-spacing: 1px; font-size: 12px; white-space: nowrap; }
.stars.low { color: var(--err); }
.rv-content { line-height: 1.6; word-break: break-word; max-width: 420px; }
.rv-content.empty { color: #b9becd; font-style: italic; }
.rv-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rv-foot { padding: 8px 2px 0; font-size: 11.5px; color: var(--muted); }

.picked-summary {
  flex: 1 1 auto; display: flex; align-items: center; gap: 12px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fbfcfe; font-size: 12.5px; color: #3c4360;
}
.picked-summary span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-summary button { flex: 0 0 auto; font-size: 12.5px; padding: 6px 13px; }
.modal.wide { width: 580px; }
.picker-list.tall {
  max-height: 320px;
  grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
}

.picker-head { justify-content: flex-start; }
.picker-head button { flex: 0 0 auto; }
.picker-list label > span { min-width: 0; }

.last-run {
  flex: 1 1 auto; padding: 7px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fbfcfe; font-size: 12.5px; color: #3c4360;
}
.run-tip {
  margin-top: 9px; font-size: 11.5px; color: var(--muted); line-height: 1.7;
}
.run-tip b { color: #4a5069; font-weight: 600; }

/* 修正：label 自身不要 overflow，否则 flex 子项被压没 */
.picker-list label {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}
.picker-list label > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3c4360;
}

/* 店铺多选：block 布局，彻底避免文字被压 */
.picker-list label {
  position: relative;
  display: block;
  padding: 5px 8px 5px 26px;
  font-size: 12.5px;
  color: #3c4360;
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.6;
}
.picker-list label:hover { background: #eef1fb; }
.picker-list label input[type=checkbox] {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  accent-color: var(--primary);
  /* 全局样式里的 contain:paint + will-change 会让勾选后不立即重绘（点了没反应的样子），
     多选列表里必须关掉，否则会出现「勾了不显示 / 勾下一个才显示上一个」 */
  contain: none !important;
  will-change: auto !important;
  transition: none !important;
}
.picker-list label span { display: inline; }

/* 操作条 */
.head-actions { display: flex; gap: 8px; align-items: flex-start; }
.action-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 18px;
}
.action-left { display: flex; gap: 9px; align-items: center; }
.action-left .btn-primary, .action-left .btn-secondary { padding: 9px 18px; }
.action-info { text-align: right; font-size: 12.5px; color: #3c4360; }
.action-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.run-hint-line { font-size: 12px; color: var(--muted); margin: -6px 0 12px 2px; }

/* ---------- 多选下拉 ---------- */
.ms { position: relative; }
.ms-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe;
  color: #3c4360; cursor: pointer; min-width: 120px; justify-content: space-between;
}
.ms-btn:hover { border-color: #cfd6ea; }
.ms-btn.on { border-color: #b9c6f8; background: #f5f7ff; color: var(--primary); }
.caret-s { font-size: 9px; color: #a8aec2; flex: 0 0 auto; }
.ms-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: 100%; max-height: 264px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23,27,46,.13); padding: 5px;
}
.ms-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: 6px; font-size: 12.5px;
  color: #3c4360; cursor: pointer; white-space: nowrap;
}
.ms-item:hover { background: #f3f5fb; }
.ms-item input[type=checkbox] { accent-color: var(--primary); margin: 0; flex: 0 0 auto; }
.ms-item span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.ms-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.ms-clear { color: var(--primary); font-size: 12px; }

/* ---------- 商品/订单单元格 ---------- */
.cell-order {
  display: flex; align-items: center; gap: 5px;
  font-family: Consolas, "Courier New", monospace; font-size: 11px; color: #6b7290;
}
.copy-btn {
  background: transparent; border: none; color: #b0b7c9;
  font-size: 10.5px; padding: 1px 5px; border-radius: 3px; cursor: pointer;
  flex: 0 0 auto; font-family: inherit;
}
.copy-btn:hover { background: #eef1fb; color: var(--primary); }
.copy-btn.done { color: var(--ok); }
.cell-prod {
  font-size: 11.5px; color: #5a6076; line-height: 1.45; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.cell-pid {
  font-size: 10.5px; color: #9aa2b8; margin-top: 2px;
  font-family: Consolas, "Courier New", monospace;
}

/* 空内容更紧凑 */
.rv-content.empty { color: #c3c8d6; font-style: italic; font-size: 11.5px; line-height: 1.4; }
.rv-table td { padding: 7px 10px; }

/* 星级多选按钮（仿 TikTok 后台） */
.filter-label { font-size: 12.5px; color: #6b7290; flex: 0 0 auto; }
.filter-sep { width: 1px; height: 18px; background: var(--line); flex: 0 0 auto; }
.star-filter { display: flex; gap: 6px; flex: 0 0 auto; }
.star-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 11px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #4a5069; cursor: pointer;
  transition: all .13s;
}
.star-chip .s { color: #ffb020; font-size: 12px; line-height: 1; }
.star-chip:hover { border-color: #cfd6ea; background: #fafbff; }
.star-chip.on {
  border-color: #a8baff; background: #edf1ff;
  color: var(--primary); font-weight: 600;
  box-shadow: 0 0 0 2px rgba(75,107,251,.1);
}

/* 表格固定列宽，避免自适应把单元格挤变形 */
.rv-table { table-layout: fixed; }
.rv-table td { overflow: hidden; }
.cell-prod {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  max-height: 3.05em;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}
.cell-order span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 商品名压缩为单行，整体行高更紧凑 */
.cell-prod {
  max-height: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.rv-content { line-height: 1.5; }

.rv-content { display: block; height: auto; min-height: 0; }
.rv-sub { display: inline; font-size: 11px; color: var(--muted); margin: 0; }
.rv-table td { vertical-align: middle; }

/* 表格最小宽度 + 横向滚动，防止窄屏把评价列压扁 */
.rv-table-wrap { overflow-x: auto; }
.rv-table { width: 100%; min-width: 920px; table-layout: fixed; }
.rv-table td { overflow: hidden; word-break: break-word; }
.rv-content { max-width: none; }

/* 列宽百分比 + 单元格内不换行撑高 */
.rv-table { min-width: 960px; }
.rv-table td { white-space: normal; }
.rv-content, .cell-pid, .cell-order { white-space: normal; }
.cell-prod { white-space: nowrap; }

/* 关键修复：table-cell 上不能设 overflow，否则列宽计算异常 */
.rv-table td { overflow: visible; }
.rv-table { table-layout: fixed; }
.rv-content { width: auto; max-width: none; }

/* 强制限制评价内容高度，防止异常行高 */
.rv-content {
  line-height: 1.55 !important;
  max-height: 4.8em !important;
  overflow: hidden !important;
  display: block !important;
}
.rv-content.empty { line-height: 1.55 !important; }

/* 空内容单元格：直接用 td 文本，避免 div 撑高 */
.cell-empty {
  color: #c3c8d6 !important;
  font-style: italic;
  font-size: 11.5px !important;
  line-height: 1.5 !important;
}

/* 抓取进度条 */
.progress-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: #3c4360; margin-bottom: 9px; flex-wrap: wrap;
}
.progress-head .pct {
  font-size: 17px; font-weight: 600; color: var(--primary);
  font-variant-numeric: tabular-nums; min-width: 52px;
}
.progress-head .pct-sub { font-size: 11.5px; color: var(--muted); }
.spinner-sm {
  width: 13px; height: 13px; flex: 0 0 auto;
  border: 2px solid #cfdcfb; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner-sm.hide { display: none; }
.progress-bar {
  height: 7px; background: #eef1f8; border-radius: 4px;
  overflow: hidden; margin-bottom: 9px;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #5b7bff, #7c5cff);
  transition: width .5s ease;
}
.progress-fill.done { background: linear-gradient(90deg, #22c55e, #16a34a); }

/* 操作栏中间实时状态 */
.action-bar { gap: 14px; }
.action-live {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
  justify-content: center;
}
.live-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #3c4360;
  white-space: nowrap; overflow: hidden;
}
.live-line b { color: var(--primary); font-weight: 600; }
.live-line .sep { color: #d5d9e5; }
.live-bar { height: 6px; background: #eef1f8; border-radius: 3px; overflow: hidden; }
.live-bar > div {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #5b7bff, #7c5cff);
  transition: width .5s ease;
}

.detect-opts {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 14px 14px; background: #fbfcfe; margin-top: 4px;
}
.detect-opts label:first-child { margin-top: 10px; }
.mini-input {
  width: 74px; padding: 5px 8px; font-size: 12.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 6px; outline: none; background: #fff;
}

/* 店铺列表改成一行 4 个等宽卡片（启动方式已并入齿轮设置） */
/* .store-list / .store-row 的网格定义见文件前面的「店铺列表」段 */
.tag.off { background: #f1f3f8; color: #9aa2b8; }
.tag.mon { background: #eaf7ef; color: #16a34a; }

#msBatch .ms-menu { min-width: 168px; }
#msBatch .ms-item { cursor: pointer; }
#batchMenu { right: 0; left: auto; }

.stat-pct {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat-card.bad .stat-pct { color: #d97706; }

/* 多选工具条 */
.multi-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 10px;
  background: #f2f5ff; border: 1px solid #dbe3ff; border-radius: 8px;
}
.multi-all { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: #3c4360; cursor: pointer; }
.multi-all input { accent-color: var(--primary); }
.btn-ghost.sm, .btn-primary.sm { padding: 4px 10px; font-size: 12px; }
.multi-count { font-size: 12px; color: var(--muted); margin-left: auto; }

/* 行内复选框 */
.row-check {
  accent-color: var(--primary); margin-right: 8px; flex: 0 0 auto;
}

/* 批量弹窗 */
.modal-wide { max-width: 560px; }
.batch-grid {
  display: grid; grid-template-columns: 132px 1fr; gap: 9px 12px;
  align-items: center; margin-top: 14px;
}
.batch-grid label { margin: 0; font-size: 12.5px; color: #3c4360; }
.batch-grid input, .batch-grid select { width: 100%; }

/* 店铺商品信息 */
.pd-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pd-stat { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pd-table-wrap { max-height: calc(100vh - 330px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.pd-table thead th:nth-child(1) { width: 56px; }
.pd-table thead th:nth-child(3) { width: 96px; }
.pd-table thead th:nth-child(4) { width: 160px; }
.pd-table thead th:nth-child(5) { width: 90px; }
.pd-table thead th {
  position: sticky; top: 0; z-index: 2; background: #f7f8fc;
  text-align: left; padding: 9px 10px; font-weight: 600; color: #3c4360;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.pd-table tbody td { padding: 8px 10px; border-bottom: 1px solid #f0f2f8; vertical-align: middle; }
.pd-table tbody tr:hover { background: #fafbff; }
.pd-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; background: #f0f2f8; }
.pd-title { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; background: #eef6ee; color: #2f7a3d; }
.pd-badge.off { background: #f4f4f6; color: #8a90a6; }

.cell-pid.link-id { color: #1a6b3c; font-weight: 600; }

.pd-linkid { font-size: 11px; color: #1a6b3c; font-weight: 600; margin-top: 2px; font-family: ui-monospace, monospace; }
.cell-pid.link-id.missing { color: #b0b4c4; font-weight: 400; }

/* 商品页链接ID 复制按钮 */
.pd-linkid-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.pd-copy {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; cursor: pointer;
  border: 1px solid #cfe0d6; background: #f2f9f4; color: #1a6b3c; line-height: 1.5;
}
.pd-copy:hover { background: #e4f3ea; }

.head-actions { display: flex; align-items: center; gap: 10px; }
.cfg-brief { font-size: 12.5px; color: var(--muted); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 340px; overflow-y: auto; margin-top: 10px; }
.pick-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.pick-item:hover { background: #f4f6fd; }
.pick-item input { accent-color: var(--primary); }

/* 店铺多选下拉 */
.ms-field { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.ms-field > label { width: 46px; flex: 0 0 auto; margin: 0; font-size: 13px; color: #3c4360; }
.ms-select { position: relative; flex: 1 1 auto; min-width: 0; }
.ms-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fbfcfe; font-size: 13px; color: var(--text); cursor: pointer;
  font-family: inherit;
}
.ms-btn:hover { border-color: #c3cdf5; background: #fff; }
.ms-arrow { font-style: normal; color: #9aa0b4; font-size: 11px; }
.ms-panel {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 5px);
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  box-shadow: 0 10px 28px rgba(40,50,90,.12); padding: 6px;
}
.ms-tools {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 4px 8px; border-bottom: 1px solid #f0f2f8; margin-bottom: 4px;
}
.ms-panel #pickerList, .ms-panel #pdPickList { display: block; max-height: 230px; overflow-y: auto; }

/* 店铺多选（原生 details，无需 JS） */
.ms-details { position: relative; flex: 1 1 auto; min-width: 0; }
.ms-details > summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fbfcfe; font-size: 13px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.ms-details > summary::-webkit-details-marker { display: none; }
.ms-details > summary::after { content: '▾'; color: #9aa0b4; font-size: 11px; }
.ms-details > summary:hover { border-color: #c3cdf5; background: #fff; }
.ms-details[open] > summary { border-color: #7b8cf0; background: #fff; }
.ms-panel-static {
  position: static; margin-top: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 6px;
}
.ms-panel-static #pickerList, .ms-panel-static #pdPickList {
  display: block; max-height: 230px; overflow-y: auto;
}

.logo { width: 36px; height: 36px; border-radius: 9px; overflow: hidden; background: #fff; flex: 0 0 auto; }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 体验分表格列宽（避免操作列被裁） */
.sc-table { table-layout: fixed; }
.sc-table thead th:nth-child(1) { width: 26%; }
.sc-table thead th:nth-child(2) { width: 17%; }
.sc-table thead th:nth-child(3) { width: 19%; }
.sc-table thead th:nth-child(4) { width: 19%; }
.sc-table thead th:nth-child(5) { width: 19%; }
.sc-store-link { color: #4a5cf0; font-weight: 600; cursor: pointer; }
.sc-store-link:hover { text-decoration: underline; }
.sc-table td { padding: 9px 8px; }
.sc-table .btn-ghost.mini { padding: 3px 6px; font-size: 11px; white-space: nowrap; }


/* ===== 订单表格：淡红表头 + 斑马纹 + 全居中 ===== */
.od-table th {
  background: #FDECEC !important;
  color: #000 !important;
  font-weight: 600;
  text-align: center !important;
  border-bottom: 1px solid #F5C9C9 !important;
  position: sticky;
  top: 0;
  z-index: 2;
}
.od-table td {
  text-align: center !important;
  border-bottom: 1px solid #F0F1F5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  padding: 8px 10px;
}
.od-table tbody tr:nth-child(odd) td { background: #FFFFFF; }
.od-table tbody tr:nth-child(even) td { background: #EDEFF3; }
.od-table tbody tr:hover td { background: #EEF4FF !important; }

/* ===== 系统商品表格：淡红表头 + 全居中 + 斑马纹 ===== */
.sp-table th {
  background: #FDECEC !important;
  color: #000 !important;
  font-weight: 600;
  text-align: center !important;
  border-bottom: 1px solid #F5C9C9 !important;
}
.sp-table td {
  text-align: center !important;
  border-bottom: 1px solid #F0F1F5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  padding: 8px 10px;
}
.sp-table tbody tr:nth-child(odd) td { background: #FFFFFF; }
.sp-table tbody tr:nth-child(even) td { background: #EDEFF3; }
.sp-table tbody tr:hover td { background: #EEF4FF !important; }
/* ==================================================================
   ★ Stripe Dashboard 商务风（纯视觉，零功能影响）
   ================================================================== */

/* ---------- 0. 设计令牌 ---------- */
:root {
  --bg: #f6f9fc;
  --card: #ffffff;
  --text: #0a2540;
  --muted: #697386;
  --line: #e3e8ee;
  --primary: #635bff;
  --primary-hover: #5449e8;
  --primary-soft: #f0efff;
  --ok: #09825d;
  --err: #df1b41;
  --warn: #c77000;
  --radius: 8px;
}

/* ---------- 1. 全局 ---------- */
body {
  background: #f6f9fc;
  color: #0a2540;
  font-size: 13.5px;
  letter-spacing: -.01em;
}

/* ---------- 2. 侧边栏：纯白 + 细边框 ---------- */
.sidebar {
  background: #ffffff;
  border-right: 1px solid #e3e8ee;
  box-shadow: none;
}
.side-brand { border-bottom: 1px solid #e3e8ee; }
.brand-txt h1 { font-size: 14px; font-weight: 600; color: #0a2540; letter-spacing: -.2px; }
.brand-txt p { font-size: 10.5px; color: #8792a2; letter-spacing: .9px; text-transform: uppercase; }
.logo { box-shadow: none; background: linear-gradient(135deg, #635bff, #8b5cf6) !important; }

.menu-lv1 { color: #425466; font-weight: 500; }
.menu-lv1:hover { background: #f6f9fc; color: #0a2540; }
.menu-group.open > .menu-lv1 { color: #0a2540; font-weight: 600; }
.ico { color: #8792a2; }
.menu-group.open > .menu-lv1 .ico { color: #635bff; }
.caret { color: #a3acba; }

.menu-lv2 { color: #697386; }
.menu-lv2:hover { background: #f6f9fc; color: #0a2540; }
.menu-lv2.active {
  background: #f0efff;
  color: #635bff;
  font-weight: 600;
  box-shadow: inset 2px 0 0 #635bff;
}

.side-foot {
  border-top: 1px solid #e3e8ee;
  background: #fff;
  color: #697386;
}
.side-foot #statusText {
  color: #425466;
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-foot .btn-ghost.mini { margin-left: 0; flex: 0 0 auto; }

/* ---------- 3. 顶栏 ---------- */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e3e8ee;
  box-shadow: none;
}
.crumb { color: #697386; font-size: 12.5px; letter-spacing: 0; }

/* ---------- 4. 主区与标题 ---------- */
main { padding: 24px 28px 32px; }
.view-head { margin-bottom: 18px; }
.view-head h2 {
  font-size: 19px;
  font-weight: 600;
  color: #0a2540;
  letter-spacing: -.3px;
  background: none;
  -webkit-text-fill-color: currentColor;
}
.view-desc { color: #697386; font-size: 12.5px; margin-top: 5px; line-height: 1.6; }
.head-actions { gap: 8px; align-items: center; }
.top-right { gap: 8px; }

/* ---------- 5. 卡片：纯白 + 极轻阴影 ---------- */
.card {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(10,37,64,.04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.card::after { display: none; }
.card:hover {
  border-color: #d8dfe8;
  box-shadow: 0 2px 6px rgba(10,37,64,.07);
  transform: none;
}
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -.1px; color: #0a2540; }

.stat-card {
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10,37,64,.04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.stat-card:hover { border-color: #d8dfe8; box-shadow: 0 2px 6px rgba(10,37,64,.07); transform: none; }
.stat-num { font-size: 22px; font-weight: 600; letter-spacing: -.4px; color: #0a2540; }

/* ---------- 6. 按钮 ---------- */
.btn-primary {
  background: #635bff;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(10,37,64,.12);
  transform: none;
}
.btn-primary::after { display: none; }
.btn-primary:hover:not(:disabled) {
  background: #5449e8;
  box-shadow: 0 2px 5px rgba(10,37,64,.18);
  transform: none;
}
.btn-primary:active:not(:disabled) { transform: none; box-shadow: 0 1px 2px rgba(10,37,64,.16); }

.btn-secondary {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  color: #425466;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(10,37,64,.04);
  transform: none;
}
.btn-secondary:hover {
  background: #f6f9fc;
  border-color: #d8dfe8;
  color: #0a2540;
  box-shadow: 0 1px 2px rgba(10,37,64,.06);
  transform: none;
}
.btn-ghost { border-radius: 6px; color: #697386; }
.btn-ghost:hover { background: #f6f9fc; color: #0a2540; }
.btn-open { border-radius: 6px; }

/* ---------- 7. 表单控件 ---------- */
input[type=text], input[type=password], select, textarea,
.mini-input, .path-row input, .modal input, .modal select,
.inline-field input, .store-mode select, .filter-row select,
.auth-step input, .search-box {
  border-radius: 6px;
  border-color: #e3e8ee;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #635bff !important;
  box-shadow: 0 0 0 3px rgba(99,91,255,.13) !important;
  background: #fff !important;
}

/* ---------- 8. 复选框 / 单选框 ---------- */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none;
  width: 18px !important; height: 18px !important;
  min-width: 18px !important; min-height: 18px !important;
  flex: 0 0 18px !important;
  box-sizing: border-box;
  border: 1.5px solid #c9d2e0;
  border-radius: 4px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  cursor: pointer;
  /* 注意：这里绝对不能加 contain:paint / will-change！
     加了会让勾选状态不立即重绘，表现为「勾了不显示 / 勾下一个才显示上一个」，
     评价管理多选框和利润分析的三个筛选都踩过这个坑。 */
  transition: none;
}
input[type=checkbox]:hover { border-color: #9ba8bd; }
input[type=checkbox]:checked {
  background-color: #635bff;
  border-color: #635bff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3.6 8.4l3 3 5.8-6'/%3E%3C/svg%3E");
}
input[type=checkbox]:focus-visible { box-shadow: 0 0 0 3px rgba(99,91,255,.16); }
input[type=checkbox]:indeterminate {
  background-color: #635bff; border-color: #635bff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' d='M4 8h8'/%3E%3C/svg%3E");
}

input[type=radio] {
  -webkit-appearance: none; appearance: none;
  width: 17px !important; height: 17px !important;
  min-width: 17px !important; min-height: 17px !important;
  flex: 0 0 17px !important;
  box-sizing: border-box;
  border: 1.5px solid #c9d2e0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, border-width .15s ease;
}
input[type=radio]:checked { border-color: #635bff; border-width: 5px; }

/* ---------- 9. 多选列表：单列整齐 ---------- */
.picker-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 8px !important;
  max-height: 264px !important;
  overflow-y: auto;
}
.picker-list label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 11px !important;
  min-height: 40px;
  box-sizing: border-box;
  line-height: 1.35 !important;
  font-size: 13px !important;
  border-radius: 6px;
  position: relative !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  cursor: pointer;
}
.picker-list label input[type=checkbox] {
  position: static !important;
  left: auto !important; top: auto !important;
  transform: none !important;
  margin: 0 !important;
}
.picker-list label > span {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.35;
}
.picker-list label:hover { background: #f6f9fc; }
.picker-list label:has(input:checked) { background: #f0efff; color: #3d34c9; font-weight: 500; }

.ms-item:has(input:checked) { background: #f0efff; color: #3d34c9; }

/* ---------- 10. 弹窗 ---------- */
.modal-mask { background: rgba(10,37,64,.42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 15px 35px rgba(10,37,64,.18), 0 5px 15px rgba(10,37,64,.08);
  animation: modalPop .2s ease-out;
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal::before { display: none; }
.modal h2 { font-size: 17px; font-weight: 600; color: #0a2540; letter-spacing: -.2px; margin-bottom: 8px; }
.modal-tip { color: #697386; line-height: 1.65; }
.modal label { font-size: 12.5px; font-weight: 600; color: #425466; margin: 16px 0 7px; letter-spacing: 0; }
.modal .ms-field { margin: 12px 0 4px; align-items: flex-start; }
.modal .ms-field > label { padding-top: 11px; width: 52px; margin: 0; }
.modal .inline-field { margin-top: 2px; }
.modal .radio-hint { margin-top: 6px; }
.modal .hint-line { margin-top: 8px; }
.modal .modal-actions { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e3e8ee; gap: 8px; }
.hint-line, .radio-hint { color: #697386; line-height: 1.6; }

/* 下拉入口 */
.ms-details > summary {
  border-radius: 6px;
  border-color: #e3e8ee;
  background: #fff;
  padding: 10px 12px;
  min-height: 42px;
  box-sizing: border-box;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ms-details > summary:hover { border-color: #c9d2e0; background: #fff; }
.ms-details[open] > summary { border-color: #635bff; box-shadow: 0 0 0 3px rgba(99,91,255,.11); }
.ms-panel-static { border-radius: 8px; border-color: #e3e8ee; padding: 6px; box-shadow: 0 4px 12px rgba(10,37,64,.08); }
.ms-tools { padding: 6px 8px 8px; border-bottom: 1px solid #eef2f7; margin-bottom: 4px; gap: 8px; }
.ms-tools .btn-ghost.mini { padding: 4px 10px; border-radius: 5px; font-size: 11.5px; color: #635bff; }
.ms-tools .btn-ghost.mini:hover { background: #f0efff; }
.picker-count { font-size: 11.5px; color: #8792a2; }

/* ---------- 11. 下拉菜单 ---------- */
.ms-menu, .ms-panel {
  border-radius: 8px;
  border: 1px solid #e3e8ee;
  box-shadow: 0 8px 24px rgba(10,37,64,.12);
  background: #fff;
}
.ms-btn { border-radius: 6px; border-color: #e3e8ee; background: #fff; }
.ms-item { border-radius: 5px; }
.ms-item:hover { background: #f6f9fc; }
.store-picker { border-radius: 8px; border-color: #e3e8ee; }
.picker-list label { border-radius: 6px; }
.picker-head { background: #fff; border-bottom: 1px solid #eef2f7; }

/* ---------- 12. 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cfd7e3;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #b6c1d1; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent !important; }

/* ---------- 13. 标签 / 进度 / 日志 ---------- */
.tag { border-radius: 4px; font-weight: 500; letter-spacing: 0; }
.log-box { border-radius: 6px; }
.progress-bar { border-radius: 4px; box-shadow: none; }
.progress-fill { border-radius: 4px; background: #635bff; }
.star-chip { border-radius: 6px; }
.star-chip.on { border-color: #635bff; background: #f0efff; color: #635bff; box-shadow: none; }

/* ---------- 14. 表格容器 ---------- */
.card[style*="padding:0"] { border-radius: 8px; }
.pd-table-wrap, .rv-table-wrap, .sc-table-wrap { border-radius: 8px; border-color: #e3e8ee; }

/* ---------- 15. 提示条 ---------- */
.alert {
  border-radius: 8px;
  border: 1px solid #f5d9a8;
  background: #fffaf0;
  box-shadow: none;
}

/* ---------- 16. 底部状态栏 ---------- */
footer {
  background: #ffffff;
  border-top: 1px solid #e3e8ee;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #8792a2;
}

/* ---------- 17. 表格表头：Stripe 浅灰（覆盖原有淡红/浅绿） ---------- */
.od-table thead th,
.sp-table thead th {
  background: #f7fafc !important;
  color: #697386 !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  letter-spacing: .04em !important;
  border-bottom: 1px solid #e3e8ee !important;
  box-shadow: none !important;
}
.od-table thead th[style*="background"] { background: #f7fafc !important; }

/* 表格单元格：去重线，留横线 */
.od-table tbody td {
  border-bottom: 1px solid #eef2f7 !important;
  color: #425466;
}
.od-table tbody tr:last-child td { border-bottom: none !important; }

/* 斑马纹：改成极浅，接近 Stripe（保留交替但更克制） */
.od-table tbody tr:nth-child(odd) td { background: #ffffff; }
.od-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.od-table tbody tr:hover td { background: #f4f7fc !important; }

.sp-table tbody tr:nth-child(odd) td { background: #ffffff; }
.sp-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.sp-table tbody tr:hover td { background: #f4f7fc !important; }

/* ---------- 18. 订单状态胶囊（Stripe 风格标签） ---------- */
.od-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.55;
  white-space: nowrap;
  letter-spacing: 0;
}
.od-pill.wait   { background: #fff4e0; color: #a05a00; }   /* 待审核等 → 橙 */
.od-pill.fbt    { background: #e8f8ee; color: #16a34a; }   /* 等待FBT发货 → 浅绿 */
.od-pill.sent   { background: #c9f0dd; color: #046c46; }   /* 已发货 → 深绿 */
.od-pill.ship   { background: #e0ecff; color: #1a56c4; }   /* 发货中 → 蓝 */
.od-pill.cancel { background: #ffdfe4; color: #d3153a; }   /* 取消 → 大红 */
.od-pill.warn   { background: #f2e7db; color: #8a5520; }   /* 异常 → 棕 */

/* 链接ID 列：紫色链接更克制（覆盖之前的蓝色下划线） */
.od-link { color: #635bff !important; text-decoration: none !important; font-weight: 500; }
.od-link:hover { text-decoration: underline !important; }

/* ============================================================
   视觉升级（Stripe / Linear / Vercel 血统）
   - 只做视觉覆盖：颜色、圆角、阴影、字体、间距
   - 不改任何布局属性（display/position/width 关键值），零功能影响
   ============================================================ */
:root {
  --brand-50:  #EEF0FB;
  --brand-100: #DDE0F7;
  --brand-500: #5E6AD2;
  --brand-600: #4F5ABF;
  --n-50:  #F8FAFC;
  --n-100: #F1F5F9;
  --n-200: #E2E8F0;
  --n-400: #94A3B8;
  --n-600: #475569;
  --n-900: #0F172A;
  --shadow-xs: 0 1px 2px rgba(16,24,40,.04);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md: 0 4px 12px rgba(16,24,40,.07), 0 1px 3px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.10), 0 2px 8px rgba(16,24,40,.05);
}

body {
  background: var(--n-50);
  color: var(--n-900);
  font-family: "Inter", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 侧边栏：干净白底 + 细边 */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--n-200);
  box-shadow: none;
}
.menu-lv1 { color: var(--n-600); }
.menu-lv2 { color: var(--n-600); border-radius: 6px; }
.menu-lv2:hover { background: var(--n-100); color: var(--n-900); }
.menu-lv2.active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}

/* 顶部面包屑 */
.crumb, .view-desc { color: var(--n-600); }
h1, h2 { color: var(--n-900); letter-spacing: -.02em; }

/* 卡片：12px 圆角 + 紧致阴影 */
.card {
  background: #fff;
  border: 1px solid var(--n-200);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}
.card-title { color: var(--n-900); letter-spacing: -.01em; }
.card-desc, .hint-line { color: var(--n-600); }

/* 主按钮：品牌靛蓝 + 8px 圆角 + 微阴影 */
.btn-primary {
  background: var(--brand-500);
  border: 1px solid var(--brand-500);
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: background .15s ease, box-shadow .15s ease, transform .06s ease;
}
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); box-shadow: var(--shadow-sm); }
.btn-primary:active { transform: translateY(.5px); }
.btn-primary:disabled { background: #C7CBEC; border-color: #C7CBEC; box-shadow: none; }

/* 次按钮：白底细边 */
.btn-secondary {
  background: #fff;
  border: 1px solid var(--n-200);
  border-radius: 8px;
  color: var(--n-900);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-secondary:hover { background: var(--n-50); border-color: #CBD5E1; box-shadow: var(--shadow-sm); }

/* 幽灵按钮 */
.btn-ghost { border-radius: 8px; color: var(--n-600); }
.btn-ghost:hover { background: var(--n-100); color: var(--n-900); }

/* 输入框 / 下拉 / 日期 */
input[type="text"], input[type="number"], input[type="time"], input[type="date"],
input[type="password"], input:not([type]), select, textarea, .mini-input {
  border: 1px solid var(--n-200);
  border-radius: 8px;
  background: #fff;
  color: var(--n-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus, .mini-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-50);
}
input::placeholder, textarea::placeholder { color: var(--n-400); }

/* 复选框：6px 圆角 + 品牌色勾 */
input[type="checkbox"] {
  /* 关键：不写 appearance:none 的话，浏览器自带的方块/勾会和下面的自定义样式叠在一起，
     看起来像"两个勾"或右下角多一个白角。 */
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
  border-radius: 6px;
  border: 1.5px solid var(--n-200);
  background: #fff;
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
  transition: background .12s ease, border-color .12s ease;
}
input[type="checkbox"]:checked {
  background: var(--brand-500);
  border-color: var(--brand-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px var(--brand-50); }

/* 开关：品牌色 */
.switch input:checked + .slider { background: var(--brand-500); }

/* 表格：斑马纹 + 悬停 + 表头浅灰 */
.data-table thead th {
  background: var(--n-50);
  color: var(--n-600);
  font-weight: 600;
  border-bottom: 1px solid var(--n-200);
  letter-spacing: .01em;
}
.data-table tbody tr:nth-child(even) { background: #FCFDFE; }
.data-table tbody tr:hover { background: var(--brand-50); }
.data-table td { border-bottom: 1px solid #F1F5F9; color: var(--n-900); }

/* 弹窗：16px 圆角 + 大阴影 */
.modal, .modal-box, [id$="Mask"] > div {
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.modal h2 { color: var(--n-900); }

/* 标签 */
.tag { border-radius: 6px; font-weight: 500; }

/* 滚动条：更细更浅 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #D8DEE9;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #C2CAD8; background-clip: content-box; }

/* 状态栏 */
.side-foot { border-top: 1px solid var(--n-200); color: var(--n-600); }

/* ===== 视觉微调（第二轮）===== */
/* 顶部操作区按钮字稍大一点，更易读 */
.head-actions .btn-primary,
.head-actions .btn-secondary { font-size: 13px; padding: 8px 14px; }

/* 「打开」按钮：浅底 + 品牌字，hover 更明显 */
.btn-open {
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  border-radius: 7px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-open:hover { background: var(--brand-100); border-color: #C9CFEF; color: #3F49A8; }

/* 店铺行：悬停高亮，更像现代 SaaS 列表 */
.store-row { transition: background .12s ease; border-radius: 10px; }
.store-row:hover { background: var(--n-50); }

/* 删除按钮：默认淡，悬停才醒目 */
.btn-del { color: var(--n-400); border-radius: 7px; transition: color .12s ease, background .12s ease; }
.btn-del:hover { color: #DC2626; background: #FEF2F2; }

/* 齿轮按钮 */
.btn-set { color: var(--n-400); border-radius: 7px; transition: color .12s ease, background .12s ease; }
.btn-set:hover { color: var(--brand-600); background: var(--brand-50); }

/* 表头/工具栏里的小字统一中性色 */
.view-head h2 { font-size: 20px; font-weight: 650; }
.crumb { font-size: 12.5px; letter-spacing: .01em; }

/* 操作区：右侧留出呼吸空间，别贴着边框 */
.col-act { gap: 5px; }

/* ---------- 订单筛选条（常显，不再折叠） ---------- */
.od-filters {
  display: flex; flex-direction: column; gap: 9px;
  padding: 11px 14px; margin-bottom: 12px;
  background: #fff; border: 1px solid #e6e9f0; border-radius: 10px;
}
.od-filters .frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-filters .mini-input {
  padding: 6px 9px; font-size: 12.5px; height: 30px; border-radius: 7px;
}
.od-filters .lab {
  font-size: 12px; color: #6b7280; white-space: nowrap; letter-spacing: .01em;
}
.od-filters .dash { color: #c2c8d4; font-size: 12px; }
.od-filters #btnOdShop,
.od-filters #btnOdAdvReset { font-size: 12.5px; padding: 6px 12px; }

/* ---------- 「操作」下拉：贴着按钮、无底色 ---------- */
.od-ops { position: relative; display: inline-block; }
.od-ops .ms-menu {
  left: auto; right: 0; top: calc(100% + 6px);
  width: 116px; min-width: 0; padding: 4px;
}
.od-ops .ms-item {
  width: 100%; background: transparent; border: none; box-shadow: none;
  justify-content: flex-start; text-align: left;
  padding: 7px 10px; border-radius: 6px;
  font-size: 12.5px; color: #3c4360; line-height: 1.2;
}
.od-ops .ms-item:hover { background: #f4f6fa; }
.od-ops .ms-item:disabled { color: #a8aec0; cursor: default; }

/* ---------- 售后 / 物流账单：表头吸顶（整段 thead 吸，最稳） ---------- */
.table-wrap {
  max-height: calc(100vh - 232px);
  overflow: auto;
  position: relative;
  isolation: isolate;
  background: #fff;
  border: 1px solid #e6e9f0;
  border-radius: 10px;
}
.table-wrap thead { position: sticky; top: 0; z-index: 9; }
.table-wrap thead th {
  position: static !important;
  background-clip: padding-box !important;
  box-shadow: inset 0 -1px 0 rgba(15,30,60,.10);
}
/* 售后表：粉色表头 */
.table-wrap .od-table thead th { background: #FDECEC !important; }
/* 物流账单等普通表：浅灰白表头 */
.table-wrap .data-table:not(.od-table) thead th { background: #f7f8fc !important; }

/* 售后 / 物流账单：视图撑满、只有表格内部滚动（页面不再滚，表头就不会错位） */
#view-refunds, #view-freightbill {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
}
#view-refunds .table-wrap,
#view-freightbill .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
#view-refunds .view-head,
#view-freightbill .view-head { flex: 0 0 auto; margin-bottom: 12px; }

/* 售后页底部：状态行（「共 N 条，已加载 M 条（继续下拉加载）」）整行去掉，
   分页条不再压一块白底，直接融进页面背景，表格因此能一直铺到底。 */
#view-refunds { padding-bottom: 4px; }
#view-refunds .table-foot { display: none !important; }
#view-refunds .od-pager {
  flex: 0 0 auto;
  background: transparent;
  border-top: 0;
  padding: 8px 2px 0;
  margin-top: 8px;
}
#view-refunds .od-pager .pager-info { color: #6b7280; }

/* 表格默认是 separate，这里显式固定住：collapse 会让 sticky 表头在滚动到底时被行盖住 */
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap tbody td { background: #fff; }


/* ---------- 订单分页条（右下角） ---------- */
.od-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 14px; border-top: 1px solid #eef1f6; background: #fff;
}
.od-pager .pager-info { font-size: 12.5px; color: #6b7280; }
.od-pager .pager-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.od-pager .pager-lab { font-size: 12px; color: #6b7280; }
.od-pager .pager-page { font-size: 12.5px; color: #374151; min-width: 72px; text-align: center; }
.od-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* 订单页顶部/筛选条：不换行、更紧凑 */
.view-head h2 { white-space: nowrap; }
#view-orders .head-actions { flex-wrap: nowrap; }
#view-orders .head-actions button { white-space: nowrap; }
#view-orders .od-filters .frow { flex-wrap: wrap; row-gap: 8px; }
#view-orders .od-filters .mini-input { height: 28px; }
#view-orders .od-filters .lab { flex: 0 0 auto; }

/* 订单页顶部按钮更紧凑，窄窗口也不被裁掉 */
#view-orders .head-actions { gap: 6px; }
#view-orders .head-actions .btn-secondary,
#view-orders .head-actions .btn-primary { padding-left: 10px; padding-right: 10px; font-size: 12.5px; }
#view-orders #odSearch { width: 150px !important; }
#view-orders .head-actions .mini-input { font-size: 12.5px; }

/* ---------- 订单加载遮罩 ---------- */
.od-table-card { position: relative; }
.od-loading {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(1.2px);
  border-radius: 10px;
}
.od-loading[hidden] { display: none; }
.od-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(99, 91, 255, .18);
  border-top-color: #635bff;
  animation: od-spin .8s linear infinite;
}
@keyframes od-spin { to { transform: rotate(360deg); } }
.od-loading-text { font-size: 13px; color: #4b5563; letter-spacing: .02em; }

/* 订单页顶部：按钮永不折行，空间不够时优先保右边，左边多余的自然裁掉 */
#view-orders .view-head { align-items: flex-start; gap: 12px; }
#view-orders .view-head > div:first-child { flex: 0 0 auto; }
#view-orders .view-head h2 { white-space: nowrap; }
#view-orders .head-actions {
  flex: 1 1 auto; min-width: 0;
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  overflow: visible;
}
#view-orders .head-actions > * {
  flex: 0 0 auto !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 订单页也撑满可视高度：表格延伸到接近窗口底部，只留一点呼吸 */
#view-orders { display: flex; flex-direction: column; height: 100%; min-height: 0; }
#view-orders .view-head,
#view-orders .od-filters { flex: 0 0 auto; }
#view-orders .od-table-card {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}
#view-orders #odTableWrap {
  flex: 1 1 auto; min-height: 0;
  max-height: none !important;
  overflow: auto;
}
#view-orders .od-pager { flex: 0 0 auto; }

/* 去掉卡片自身外边距，并让区块吃掉底部内边距，表格更贴近窗口底部 */
#view-orders .od-table-card { margin-bottom: 0 !important; }
#view-orders { margin-bottom: -20px; }

/* ---------- 滚动条加宽加深，方便看和拖 ---------- */
#odTableWrap::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.pd-table-wrap::-webkit-scrollbar { width: 15px; height: 15px; }

#odTableWrap::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.pd-table-wrap::-webkit-scrollbar-track { background: #eef1f6; }

#odTableWrap::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.pd-table-wrap::-webkit-scrollbar-thumb {
  background: #a8b0c2;
  border-radius: 8px;
  border: 2px solid #eef1f6;
  min-height: 40px;
}
#odTableWrap::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover,
.pd-table-wrap::-webkit-scrollbar-thumb:hover { background: #7c879b; }

#odTableWrap::-webkit-scrollbar-thumb:active,
.table-wrap::-webkit-scrollbar-thumb:active,
.pd-table-wrap::-webkit-scrollbar-thumb:active { background: #5f6a7d; }

/* 横竖滚动条交汇的小方块 */
#odTableWrap::-webkit-scrollbar-corner,
.table-wrap::-webkit-scrollbar-corner { background: #eef1f6; }

/* 物流商下拉：新增项用更小的灰字，和已选项区分 */
.od-carrier .od-carrier-add span {
  font-size: 11.5px; color: #8a92a6; font-style: italic;
}
.od-carrier .od-carrier-add:hover span { color: #635bff; }

/* 顶部工具条：下拉菜单必须能溢出显示 */
#view-orders .head-actions .ms { position: relative; }
#view-orders .head-actions .ms-menu { z-index: 60; }

/* ---------- 新增物流商弹窗 ---------- */
.modal-mask.modal-mask-top {
  align-items: flex-start;
  padding-top: 12vh;
}
.od-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow-y: auto; }
.od-chip {
  padding: 5px 10px; border-radius: 14px; cursor: pointer;
  background: #f4f6fa; color: #4b5563; font-size: 12px;
  border: 1px solid #e6e9f0; transition: all .12s;
}
.od-chip:hover { background: #eef1ff; border-color: #c9c4ff; color: #4c46c9; }
.od-chip b { font-weight: 500; color: #9aa1b1; margin-left: 4px; font-size: 11px; }

/* 弹窗里可多选的物流商 chip */
.od-chip.on {
  background: #eef1ff; border-color: #a9a2ff; color: #4c46c9; font-weight: 600;
}
.od-chip.on::before { content: '✓ '; font-size: 11px; }

/* ---------- 利润设置：左标签右输入，两列紧凑 ---------- */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 9px 26px;
  align-items: center;
}
.pf-cell { display: flex; align-items: center; gap: 10px; }
.pf-cell label {
  flex: 0 0 88px; text-align: right;
  font-size: 12.5px; color: #384152; font-weight: 500; white-space: nowrap;
}
.pf-cell .mini-input { flex: 0 0 auto; width: 104px !important; padding: 6px 9px; font-size: 13px; }
.pf-note { margin-top: 8px; font-size: 11.5px; color: #9aa1b1; line-height: 1.5; }

/* 利润弹窗里「固定项费用」标签不折行 */
#modalProfit .ms-field > label {
  width: 74px;
  white-space: nowrap;
}

/* 物流商下拉：收窄，删除按钮右对齐 */
.od-carrier .ms-menu { padding: 4px; }
.od-carrier .ms-item { padding: 6px 8px; }
.od-carrier .ms-item > span:first-of-type {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.od-carrier-del {
  flex: 0 0 auto; margin-left: auto;
  width: 16px; text-align: center;
  color: #c3c9d6; font-size: 14px; line-height: 1;
}
.od-carrier-del:hover { color: #d3153a; }

/* 利润弹窗：文字放大、与输入框垂直居中、固定项整块不再被挤 */
#modalProfit .pf-cell { gap: 12px; }
#modalProfit .pf-cell label {
  font-size: 14px;
  height: 32px;
  line-height: 32px;
  display: flex; align-items: center; justify-content: flex-end;
  flex: 0 0 96px;
}
#modalProfit .pf-cell .mini-input { height: 32px; padding: 6px 10px; }

#modalProfit .pf-fixed-field { align-items: flex-start; margin: 18px 0 0; }
#modalProfit .pf-fixed-field > label {
  font-size: 14px; height: 32px; line-height: 32px;
  display: flex; align-items: center; justify-content: flex-end;
  width: 96px; flex: 0 0 96px;
}
#modalProfit .pf-fixed-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#modalProfit .pf-fixed-body .mini-input { height: 30px; }
#modalProfit .pf-note { font-size: 12px; margin-top: 10px; }

/* 利润弹窗：所有项目标签统一字体/对齐 */
#modalProfit .pf-cell label,
#modalProfit .ms-field > label {
  font-size: 14px;
  font-weight: 500;
  color: #384152;
  line-height: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}
/* 固定项那一行的输入框保持固定宽度，不要被拉伸 */
#modalProfit .pf-fixed-body .path-row { align-items: center; gap: 8px; flex-wrap: nowrap; }
#modalProfit .pf-fixed-body .path-row .mini-input { flex: 0 0 auto; }

/* 固定项那一行的「删除」紧跟金额，不要被推到最右 */
#modalProfit .pf-fixed-body .btn-ghost.mini { margin-left: 0; }

/* ---------- 图片查看器 ---------- */
.img-viewer {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(15, 23, 42, .82);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 40px;
}
.img-viewer[hidden] { display: none; }
.img-viewer img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 8px; background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  object-fit: contain;
}
.img-viewer-close {
  position: absolute; top: 18px; right: 26px;
  font-size: 30px; color: #e5e7eb; line-height: 1;
  cursor: pointer; user-select: none;
}
.img-viewer-close:hover { color: #fff; }
.img-viewer-tip {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; font-size: 12px; color: rgba(255,255,255,.65);
}
img.od-thumb { cursor: zoom-in; }

/* 筛选条：分隔符改深色，更显眼 */
.od-filters .dash { color: #1f2937 !important; font-weight: 600; font-size: 13px; }

/* 日期框：未选时显示「开始时间/结束时间」，隐藏浏览器自带的 yyyy/mm/日 */
.od-date { position: relative; display: inline-flex; align-items: center; }
.od-date .od-date-ph {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 12px; color: #b3bacb;
  pointer-events: none; white-space: nowrap;
}
.od-date:not(.has-value) input[type=date]::-webkit-datetime-edit { color: transparent; }
.od-date.has-value .od-date-ph { display: none; }

/* 日期框始终隐藏 Windows 原生日期文本，改用自己的中文显示 */
.od-date input[type=date]::-webkit-datetime-edit { color: transparent !important; }
.od-date.has-value .od-date-ph {
  display: block; color: #1f2937; font-weight: 500; font-size: 12.5px;
}

/* 滚动中的轻提示：松手后才渲染 */
.od-scroll-hint {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  z-index: 25; pointer-events: none;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #e3e8ee; border-radius: 20px;
  padding: 8px 16px; font-size: 12.5px; color: #4b5563;
  box-shadow: 0 6px 20px rgba(15, 30, 60, .12);
  display: flex; align-items: center; gap: 8px;
}
.od-scroll-hint[hidden] { display: none; }
.od-scroll-hint::before {
  content: ''; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #d7dbe6; border-top-color: #635bff;
  animation: od-spin .7s linear infinite;
}

/* 订单表固定列宽：重建窗口时表格宽度不会塌陷，横向滚动位置才稳 */
#odTable { table-layout: fixed; width: 100%; min-width: 1300px; }
#odTable th, #odTable td { overflow: hidden; text-overflow: ellipsis; }
#odBody tr.od-pad td { padding: 0 !important; border: 0 !important; }

/* 大表格性能：屏幕外的行浏览器直接跳过布局/绘制（聚水潭同款做法），2000 行也不卡 */
#odBody tr[data-i] {
  height: 36px;                        /* 固定行高：虚拟滚动按它算位置 */
  content-visibility: auto;
  contain-intrinsic-size: auto 36px;
}
#odTable th, #odTable td { white-space: nowrap; }   /* 不换行，行高才恒定 */

/* 订单页标题行：条数 / 上次同步时间 挪到标题右侧，一行显示 */
.od-head-left {
  display: flex; align-items: center; gap: 14px;
  flex: 0 0 auto; min-width: 0; flex-wrap: nowrap;
}
.od-head-left h2 { margin: 0; white-space: nowrap; }
.od-head-left .view-desc {
  margin: 0; font-size: 12.5px; color: #6b7280; white-space: nowrap;
}
.od-head-left .od-sync-hint {
  font-size: 12px; color: #9aa1b1; white-space: nowrap;
}
/* 标题区更紧凑，筛选条自然上移 */
#view-orders .view-head { margin-bottom: 10px; align-items: center; }
#view-orders .od-filters { margin-bottom: 8px; }

/* 标题右侧信息：再紧凑些，别被右侧按钮挤掉 */
.od-head-left { gap: 10px; overflow: hidden; }
.od-head-left .view-desc { font-size: 12px; }
.od-head-left .od-sync-hint {
  font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
#view-orders .head-actions { flex: 1 1 0 !important; }

/* 标题右侧的文字不许被压缩 */
.od-head-left > * { flex: 0 0 auto !important; }
.od-head-left { flex: 0 0 auto; }

/* 标题右侧：条数/同步时间竖排两小行，省横向空间 */
.od-head-left { align-items: center; gap: 12px; }
.od-head-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.od-head-meta .view-desc { font-size: 12px; color: #6b7280; }
.od-head-meta .od-sync-hint { font-size: 11.5px; color: #9aa1b1; max-width: none; }

/* 订单页再压缩上下留白：整体上移、表格贴近底部 */
#view-orders { margin-top: -10px; margin-bottom: -34px; }
#view-orders .view-head { margin-bottom: 6px; }
#view-orders .od-filters { margin-bottom: 6px; padding: 8px 14px; }
#view-orders .od-pager { padding: 8px 14px; }

/* 让订单卡片真正吃到窗口底部：高度补足被负 margin 吃掉的部分 */
#view-orders { height: calc(100% + 26px); margin-bottom: -26px; }

/* 订单主表头：加高、加大字号、纯黑（与明细表头观感一致） */
#odTable thead th {
  height: 40px !important;
  padding: 10px 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #000 !important;
  vertical-align: middle !important;
  line-height: 1.2 !important;
  letter-spacing: .01em;
}
#odTable thead tr { height: 40px !important; }

/* 线上订单号旁的复制小图标 */
#odBody td.od-link { position: relative; padding-right: 36px !important; }
.od-copy {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border-radius: 4px;
  color: #c3c9d6; cursor: pointer; text-decoration: none !important;
  transition: color .12s, background .12s;
}
.od-copy:hover { color: #2563eb; background: #eef2ff; }
.od-copy.done { color: #16a34a; }
.od-edit {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border-radius: 4px;
  color: #c3c9d6; cursor: pointer; text-decoration: none !important;
  transition: color .12s, background .12s;
}
.od-edit:hover { color: #c77000; background: #fff4e6; }

/* 标题右侧两行：压紧行距，上下与「订单管理」的顶/底对齐 */
.od-head-left { align-items: stretch; }
.od-head-left h2 { display: flex; align-items: center; }
.od-head-meta {
  display: flex; flex-direction: column;
  justify-content: space-between; gap: 0;
  align-self: stretch; padding: 1px 0;
}
.od-head-meta .view-desc { font-size: 11.5px; line-height: 1; color: #6b7280; }
.od-head-meta .od-sync-hint { font-size: 11px; line-height: 1; color: #9aa1b1; }

/* 订单表：取消最小宽度，15 列按比例塞进一屏 */
#odTable { min-width: 0 !important; width: 100% !important; table-layout: fixed; }
#odTable th, #odTable td {
  padding-left: 2px !important; padding-right: 2px !important;
  font-size: 11px !important;
}
#odTable thead th { font-size: 12px !important; padding: 8px 2px !important; }
#odTable col.c-seq { width: 3.5%; }
#odTable col.c-so { width: 13%; }
#odTable col.c-shop { width: 8%; }
#odTable col.c-status { width: 6%; }
#odTable col.c-od { width: 8%; }
#odTable col.c-sd { width: 8%; }
#odTable col.c-iid { width: 13%; }
#odTable col.c-qty { width: 3.5%; }
#odTable col.c-cost { width: 5%; }
#odTable col.c-fee { width: 4.5%; }
#odTable col.c-amt { width: 5.5%; }
#odTable col.c-pro { width: 5%; }
#odTable col.c-car { width: 5.5%; }
#odTable col.c-wt { width: 4.5%; }
#odTable col.c-rm { width: 6%; }

/* 重新分配列宽：保证表头最长的「跨境物流商」「商品成本」「结算金额」都能一行显示 */
#odTable col.c-seq    { width: 3.5%; }
#odTable col.c-so     { width: 12.5%; }
#odTable col.c-shop   { width: 7.5%; }
#odTable col.c-status { width: 6%; }
#odTable col.c-od     { width: 8%; }
#odTable col.c-sd     { width: 8%; }
#odTable col.c-iid    { width: 12.5%; }
#odTable col.c-qty    { width: 3.5%; }
#odTable col.c-cost   { width: 6%; }
#odTable col.c-fee    { width: 4.5%; }
#odTable col.c-amt    { width: 6%; }
#odTable col.c-pro    { width: 5%; }
#odTable col.c-car    { width: 7%; }
#odTable col.c-wt     { width: 4.5%; }
#odTable col.c-rm     { width: 5.5%; }

/* 表头一律单行，绝不换行 */
#odTable thead th {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: clip;
}

/* 线上单号/链接ID 再多给一点，保证 19 位数字完整显示 */
#odTable col.c-so     { width: 14%; }
#odTable col.c-iid    { width: 13%; }
#odTable col.c-shop   { width: 6.5%; }
#odTable col.c-pro    { width: 4.5%; }
#odTable col.c-rm     { width: 5%; }

/* 链接ID 列也要给复制图标留位置 */
#odBody td.od-iid { position: relative; padding-right: 20px !important; }

/* 复制成功的浮层提示 */
.od-toast {
  position: fixed; left: 50%; top: 16%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(17, 24, 39, .92); color: #fff;
  padding: 9px 18px; border-radius: 9px; font-size: 13px;
  z-index: 99998; opacity: 0; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: opacity .16s ease, transform .16s ease;
}
.od-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 按内容实际需要重新分列，再整体放大字号 */
#odTable col.c-seq    { width: 3.5%; }
#odTable col.c-so     { width: 15.5%; }
#odTable col.c-shop   { width: 6.5%; }
#odTable col.c-status { width: 7%; }
#odTable col.c-od     { width: 7%; }
#odTable col.c-sd     { width: 7%; }
#odTable col.c-cb     { width: 11%; }
#odTable col.c-pdd    { width: 7%; }
#odTable col.c-iid    { width: 15.5%; }
#odTable col.c-qty    { width: 3%; }
#odTable col.c-cost   { width: 5%; }
#odTable col.c-fee    { width: 4.5%; }
#odTable col.c-amt    { width: 5%; }
#odTable col.c-pro    { width: 5%; }
#odTable col.c-car    { width: 6.5%; }
#odTable col.c-wt     { width: 4%; }
#odTable col.c-rm     { width: 4.5%; }

#odTable td { font-size: 11.5px !important; }
#odTable thead th { font-size: 12px !important; }

/* 给表头较长的三列补宽，单号/链接ID 稍收 */
#odTable col.c-so  { width: 14.5%; }
#odTable col.c-iid { width: 14.5%; }
#odTable col.c-cost { width: 5.5%; }
#odTable col.c-amt  { width: 5.5%; }
#odTable col.c-car  { width: 7%; }

/* 再给「商品成本/结算金额」挤一点宽度，冲刺 12px 字号 */
#odTable col.c-shop { width: 5.5%; }
#odTable col.c-rm   { width: 3.5%; }
#odTable col.c-cost { width: 6.5%; }
#odTable col.c-amt  { width: 6.5%; }
#odTable col.c-qty  { width: 3.5%; }
#odTable td { font-size: 12px !important; }
#odTable thead th { font-size: 12px !important; }

/* 终端权限管理 */
.cli-list { display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow-y: auto; margin-top: 6px; }
.cli-row {
  border: 1px solid #e6e9f0; border-radius: 10px; padding: 10px 12px; background: #fff;
}
.cli-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cli-note { width: 150px; padding: 6px 9px; font-size: 12.5px; }
.cli-meta { font-size: 11.5px; color: #9aa1b1; }
.cli-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #374151; cursor: pointer; }
.cli-del { margin-left: auto; color: #c3c9d6; cursor: pointer; font-size: 12px; }
.cli-del:hover { color: #d3153a; }
.cli-shops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cli-shop {
  padding: 5px 13px; border-radius: 16px; font-size: 12.5px; cursor: pointer;
  background: #f5f7fb; color: #5b6472; border: 1px solid #e8ecf3;
  transition: all .15s ease; user-select: none; white-space: nowrap;
}
.cli-shop:hover { border-color: #b9b2ff; color: #4c46c9; background: #f6f5ff; }
.cli-shop.on { background: #4c46c9; border-color: #4c46c9; color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(76,70,201,.22); }
.cli-empty { font-size: 12.5px; color: #9aa1b1; padding: 18px; text-align: center; }

/* ---------- 登录页 ---------- */
#loginMask {
  position: fixed; inset: 0; z-index: 999999;
  background: linear-gradient(160deg, #eef1fe 0%, #f7f8fc 45%, #eaf0ff 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  width: 372px; background: #fff; border-radius: 16px; padding: 30px 30px 22px;
  border: 1px solid #eef0f7;
  box-shadow: 0 18px 50px rgba(28, 40, 80, .12), 0 2px 8px rgba(28, 40, 80, .05);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand img { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; }
.login-brand h1 { font-size: 17px; font-weight: 700; letter-spacing: .3px; color: var(--text); }
.login-brand p { font-size: 11.5px; color: var(--muted); margin-top: 3px; letter-spacing: .6px; }
.login-field { margin-bottom: 13px; }
.login-field label { display: block; font-size: 12px; color: #5b6178; margin-bottom: 6px; }
.login-field input {
  width: 100%; height: 40px; padding: 0 12px; font-size: 13.5px; font-family: inherit;
  border: 1px solid #e3e8ee; border-radius: 8px; outline: none; background: #fbfcfe;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-field input:focus {
  border-color: #a9b6f8; background: #fff; box-shadow: 0 0 0 3px rgba(75, 107, 251, .1);
}
.login-remember {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5b6178;
  cursor: pointer; margin: 2px 0 10px;
}
.login-remember input { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }
.login-err { min-height: 17px; font-size: 12px; line-height: 1.5; color: var(--err); margin-bottom: 6px; }
.login-btn {
  width: 100%; height: 42px; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 14.5px; font-weight: 600;
  font-family: inherit; letter-spacing: 2px;
  transition: background .16s, transform .06s;
}
.login-btn:hover { background: var(--primary-hover); }
.login-btn:active { transform: translateY(1px); }
.login-btn:disabled { background: #b9c2e8; cursor: default; }
.login-foot { margin-top: 15px; text-align: center; font-size: 11.5px; color: #a8aec2; }

/* ---------- 用户管理 ---------- */
.um-table { table-layout: fixed; width: 100%; }
.um-table th {
  white-space: nowrap; text-align: center;
  height: 40px; font-size: 13px; font-weight: 600; color: #000;
}
.um-table td {
  font-size: 13px; padding-top: 11px; padding-bottom: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center; color: #2b3350;
}
.um-tag {
  background: #eef1fe; color: #4c46c9; font-size: 10.5px; padding: 1px 6px;
  border-radius: 4px; vertical-align: 1px; font-weight: 600;
}
.um-on { color: var(--ok); }
.um-off { color: #9aa1b1; }
.um-muted { color: #9aa1b1; }
.um-empty { text-align: center; color: #9aa1b1; padding: 26px; font-size: 12.5px; }
.um-act { text-align: center; white-space: nowrap; }
.um-link {
  display: inline-block; padding: 3px 10px; border-radius: 5px;
  background: #f4f6fa; color: var(--primary);
  cursor: pointer; font-size: 12.5px; margin: 0 3px;
  transition: background .14s ease, color .14s ease;
}
.um-link:hover { background: #eef1ff; color: #4c46c9; text-decoration: none; }
.um-danger { color: var(--err); background: #fdf1f2; }
.um-danger:hover { background: #fbe3e5; color: #c0272f; }
.um-form {
  display: grid; grid-template-columns: 58px 1fr; gap: 10px 12px;
  align-items: center; margin: 16px 0 4px;
}
.um-form > label { font-size: 12.5px; color: #5b6178; text-align: right; }
.um-form .mini-input { width: 100%; height: 34px; padding: 0 10px; font-size: 13px; }
.um-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.um-opt {
  display: inline-flex; align-items: flex-start; gap: 9px;
  padding: 10px 14px; border: 1.5px solid #e5e9f2; border-radius: 10px;
  background: #fff; cursor: pointer; min-width: 0; flex: 1;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  box-shadow: 0 1px 2px rgba(20,30,60,.03);
}
.um-opt:hover { border-color: #c3cdf7; background: #f7f9ff; }
.um-opt input[type=checkbox] { margin-top: 1px; width: 15px; height: 15px; accent-color: #4c46c9; cursor: pointer; }
.um-opt span { font-size: 12.5px; color: #374151; line-height: 1.3; font-weight: 500; }
.um-opt em {
  display: block; font-style: normal; font-size: 11px;
  color: #9aa1b1; margin-top: 3px; white-space: nowrap; font-weight: 400;
}
.um-opt:has(input:checked) {
  border-color: #4c46c9; background: #f5f4ff; box-shadow: 0 3px 10px rgba(76,70,201,.13);
}
.um-opt:has(input:checked) span { color: #3d38b8; }
.um-sec { margin-top: 14px; padding: 12px 14px; border: 1px solid #eef1f6; border-radius: 10px; background: #fbfcfe; }
.um-sec-t { font-size: 13px; font-weight: 600; color: #1f2937; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.um-sec-t::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: #4c46c9; flex: none; }
.um-sec-h { font-weight: 400; color: #9aa1b1; font-size: 11.5px; }
.um-chips { display: flex; flex-wrap: wrap; gap: 7px; max-height: 150px; overflow-y: auto; padding: 2px; }
.um-chips .cli-shop { font-size: 12.5px; }
.um-chips .um-all { border-style: dashed; }

.um-btn-cur { font-size: 12px; color: #4c46c9; font-weight: 600; background: #eef1ff; border: 1px solid #dfdbff; border-radius: 6px; padding: 5px 10px; margin-bottom: 9px; display: inline-block; }
.um-btn-cur + .cli-shop { margin-top: 0; }
#umButtons .cli-shop.um-all { margin-left: 4px; }

/* 可操作按钮：按菜单归类分组 */
.um-btn-group { border: 1px solid #eef1f6; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.um-btn-group-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; background: #f8fafc; cursor: pointer; font-size: 12.5px; font-weight: 600; color: #374151; user-select: none; }
.um-btn-group-all { font-size: 11px; color: #4c46c9; cursor: pointer; font-weight: 500; padding: 2px 6px; }
.um-btn-group-all:hover { background: #eef1ff; border-radius: 4px; }
.um-btn-group-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 11px; border-top: 1px solid #f1f4f9; }
.um-btn-group-body .cli-shop { font-size: 12px; }


/* 差评监测：监测店铺多选 */
.rv-monitor {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 132px; overflow-y: auto; margin-top: 6px;
  padding: 2px;
}
.rv-monitor .cli-shop { font-size: 12px; }

/* ---------- 从备份恢复 ---------- */
.rs-list { max-height: 210px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.rs-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid #f1f3f8; cursor: pointer; font-size: 12.5px;
}
.rs-item:last-child { border-bottom: 0; }
.rs-item:hover { background: #f8faff; }
.rs-item.on { background: #f2f5ff; }
.rs-item b { font-weight: 600; color: #2b3350; }
.rs-item .rs-meta { color: #9aa1b1; font-size: 11.5px; margin-left: auto; }
.rs-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.rs-files .cli-shop { font-size: 12px; }
.rs-empty { padding: 20px; text-align: center; color: #9aa1b1; font-size: 12.5px; }

/* 系统商品 / 售后查询：表格撑满容器宽度，内容向右填充（不再右侧大片留白） */
.sp-table,
#view-refunds .data-table,
#view-freightbill .data-table,
#view-reviewanalysis .data-table,
#view-trend .data-table {
  width: 100% !important;
  table-layout: auto;
}
#view-sysproducts .table-wrap,
#view-refunds .table-wrap,
#view-freightbill .table-wrap,
#view-reviewanalysis .table-wrap,
#view-trend .table-wrap {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}
#view-trend .data-table thead th,
#view-trend .data-table td {
  text-align: center !important;
}
/* 链接ID / 款号：字体与店铺名一致（去掉全局 cell-pid 的等宽小字） */
#view-trend .cell-pid {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  margin-top: 0;
}
/* 筛选区输入框：占位文字与已输入值（日期/数字）居中显示 */
#view-trend .action-bar .txt {
  text-align: center;
}

/* ---------- 发版按钮（只在主控机显示） ---------- */
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.btn-publish {
  height: 26px; padding: 0 11px; border-radius: 6px; cursor: pointer;
  background: linear-gradient(135deg, #4b6bfb, #635bff); color: #fff; border: 0;
  font-size: 12px; font-weight: 600; font-family: inherit; letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(75, 107, 251, .28);
  transition: filter .14s ease, transform .06s ease;
}
.btn-publish:hover { filter: brightness(1.07); }
.btn-publish:active { transform: translateY(1px); }
.btn-publish:disabled { opacity: .6; cursor: default; }
.ui-ver {
  margin-left: auto; flex: 0 0 auto;
  align-self: flex-end; margin-bottom: 9px;      /* 往下移，和第二行对齐 */
  font-size: 10px; color: #7b8199; letter-spacing: .2px;
  padding: 1px 6px; border: 1px solid #e8ebf3; border-radius: 9px; background: #f7f8fc;
  font-weight: 600; white-space: nowrap;
}
.brand-txt p #curUser { color: #4b6bfb; font-weight: 600; letter-spacing: 0; text-transform: none; }
.btn-rollback {
  height: 26px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  background: #f4f6fa; color: #6b7280; border: 1px solid #e6e9f0;
  font-size: 12px; font-family: inherit;
}
.btn-rollback:hover { background: #eef1ff; color: #4c46c9; border-color: #c3cdf7; }

/* ---------- 在售商品（聚水潭店铺商品） ---------- */
#pdTable th, #pdTable td { font-size: 12.5px; }
#pdTable td { color: #425466; }
.pd-name {
  color: #6b7280 !important; font-size: 12px !important;
  max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pd-on { color: #16a34a; font-weight: 600; }
.pd-off { color: #9aa1b1; }
.pd-cnt { color: #9aa1b1; font-size: 11.5px; margin-left: auto; padding-left: 10px; }
#pdShopItems .ms-item { display: flex; align-items: center; }
.pd-link { color: #4b6bfb; cursor: pointer; font-weight: 600; }
.pd-link:hover { text-decoration: underline; }
.pd-sku-n { color: #9aa1b1; font-size: 11px; }
.pd-detail td { background: #f8fafc !important; padding: 10px 16px !important; }
.pd-detail-box { font-size: 12.5px; color: #425466; }
.pd-detail-h { font-weight: 600; margin-bottom: 8px; color: #2b3350; }
.pd-sub { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e8ebf3; border-radius: 8px; }
.pd-sub th { background: #f4f6fa; font-size: 11.5px; color: #6b7280; padding: 6px 10px; text-align: left; font-weight: 600; }
.pd-sub td { font-size: 12px; padding: 6px 10px; border-top: 1px solid #f1f3f8; }
.pd-shop-item { display: flex; align-items: center; gap: 8px; }
.pd-shop-item input[type=checkbox] { flex: 0 0 16px !important; width: 16px !important; height: 16px !important; min-width: 16px !important; }

/* 在售商品：表格撑满剩余高度，不再底部留白 */
#view-products { display: flex; flex-direction: column; height: 100%; min-height: 0; }
#view-products .view-head { flex: 0 0 auto; }
#view-products > .card {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}
#pdTableWrap {
  flex: 1 1 auto; min-height: 0;
  max-height: none !important;
  overflow: auto;
}

/* 在售商品：全部居中 */
#pdTable th { text-align: center !important; }
#pdTable td { text-align: center !important; }
#pdTable .pd-name { max-width: 420px; margin: 0 auto; }

/* 自动化任务的店铺选择行：整行可点 */
.at-store-row {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.at-store-row input[type=checkbox] { pointer-events: none; }

/* 重复差评：按买家交替底色 */
tr.rv-dup-a td { background: #fff6f6 !important; }
tr.rv-dup-b td { background: #f3f7ff !important; }
tr.rv-dup-a:hover td, tr.rv-dup-b:hover td { filter: brightness(0.975); }

/* ================= 物流账单：与订单查询同一套观感 ================= */
#view-freightbill {
  display: flex; flex-direction: column;
  height: calc(100% + 26px); min-height: 0;
  margin-top: -10px; margin-bottom: -26px;
}
#view-freightbill .view-head { flex: 0 0 auto; margin-bottom: 6px; }
#view-freightbill .od-table-card {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  margin-bottom: 0 !important;
}
#view-freightbill #fbTableWrap {
  flex: 1 1 auto; min-height: 0;
  max-height: none !important;
  overflow: auto;
}
#view-freightbill .od-pager { flex: 0 0 auto; padding: 8px 14px; }
#view-freightbill #fbTableWrap::-webkit-scrollbar { width: 12px; height: 12px; }

#fbTable { min-width: 0 !important; width: 100% !important; table-layout: fixed; }
#fbTable th, #fbTable td {
  padding: 11px 8px !important;            /* 与订单页 39px 行高对齐 */
  font-size: 12px !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#fbTable thead th {
  height: 40px !important; padding: 8px 8px !important;
  font-size: 12px !important; color: #000 !important;
  font-weight: 600;
}
#fbTable tbody tr:nth-child(odd) td { background: #ffffff; }
#fbTable tbody tr:nth-child(even) td { background: #fbfcfe; }
#fbTable tbody tr:hover td { background: #f4f7fc !important; }

/* 列宽：序号 / 店铺 / 物流商 / 物流渠道 / 物流单号 / 重量 / 邮费 / 订单号 / 时间 */
#fbTable col.c-seq  { width: 4.5%; }
#fbTable col.c-shop { width: 13%; }
#fbTable col.c-car  { width: 6.5%; }
#fbTable col.c-chan { width: 17%; }
#fbTable col.c-wb   { width: 16%; }
#fbTable col.c-wt   { width: 6%; }
#fbTable col.c-fee  { width: 6.5%; }
#fbTable col.c-so   { width: 15.5%; }
#fbTable col.c-sd   { width: 15%; }

/* 数字列右对齐，跟订单页的金额列一致 */
#fbTable th:nth-child(6), #fbTable td:nth-child(6),
#fbTable th:nth-child(7), #fbTable td:nth-child(7) { text-align: right; }
#fbTable th:nth-child(1), #fbTable td:nth-child(1) { text-align: center; }

/* 物流账单筛选条 */
.fb-fee-range {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: #6b7280; white-space: nowrap;
}
.fb-fee-range i { font-style: normal; color: #b0b7c9; }
.mini-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #4a5163; cursor: pointer; white-space: nowrap;
}

/* 「只看已有邮费」勾选框：显式画出勾选态。
   注意：文件后面还有一条 input[type=checkbox]:checked { background: var(--brand-500) }，
   它用的是 background 简写，会把这里画的勾（background-image）重置成 none，
   所以必须用 !important 把它钉住，否则点下去只有白底、看起来没勾上。 */
#fbOnlyPriced {
  width: 18px; height: 18px; flex: 0 0 18px;
  border: 1.5px solid #c9d2e0; border-radius: 4px;
  background-color: #fff;
}
#fbOnlyPriced:checked {
  background-color: #635bff !important;
  border-color: #635bff !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3.6 8.4l3 3 5.8-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 12px !important;
}

/* 订单查询：同时显示「结算金额」+「利润」两列；缩窄备注列腾宽度 */
#odTable.no-profit col.c-rm { width: 5% !important; }

/* ================= 售后查询：表头/字体/行高对齐订单查询 ================= */
#rfTable { width: 100% !important; table-layout: fixed; }
#rfTable th, #rfTable td {
  padding: 11px 8px !important;
  font-size: 12px !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#rfTable thead th {
  height: 40px !important;
  padding: 8px 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #000 !important;
  background: #FDECEC !important;
  border-bottom: 1px solid #F5C9C9 !important;
}
#rfTable tbody tr:nth-child(odd) td { background: #ffffff; }
#rfTable tbody tr:nth-child(even) td { background: #fbfcfe; }
#rfTable tbody tr:hover td { background: #f4f7fc !important; }
#rfTable col.c-shop { width: 15%; }
#rfTable col.c-so   { width: 18%; }
#rfTable col.c-sd   { width: 15%; }
#rfTable col.c-st   { width: 10%; }
#rfTable col.c-tp   { width: 10%; }
#rfTable col.c-ost  { width: 11%; }
#rfTable col.c-rm   { width: 21%; }

/* ================= 物流账单来源配置 ================= */
.bs-lab {
  flex: 0 0 96px; font-size: 12.5px; color: #5b6478; text-align: right;
}
#cardBillSrc .path-row input { flex: 1 1 auto; min-width: 0; }
.bs-table-wrap { margin-top: 10px; overflow-x: auto; }
.bs-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bs-table th {
  background: #f7f8fc; color: #47506b; font-size: 12px; font-weight: 600;
  padding: 8px 6px; text-align: left; border-bottom: 1px solid #e6e9f2;
}
.bs-table td { padding: 5px 6px; border-bottom: 1px solid #f0f2f7; vertical-align: middle; }
.bs-table input[type=text], .bs-table input[type=number] {
  width: 100%; box-sizing: border-box; padding: 6px 8px; font-size: 12.5px;
  border: 1px solid #dde2ee; border-radius: 6px; background: #fff; color: #2b3245;
}
.bs-table input:focus { outline: none; border-color: #635bff; box-shadow: 0 0 0 3px rgba(99,91,255,.12); }
.bs-name { font-weight: 600; color: #2b3245; font-size: 13px; }
.bs-note { font-size: 11.5px; color: #8a90ad; margin-top: 2px; line-height: 1.5; }

/* 利润分析：预估结算金额的标记 */
.od-est {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-size: 10.5px; line-height: 16px; font-weight: 500;
  color: #b3261e; background: #fdecea; border: 1px solid #f6cfca;
  border-radius: 4px; vertical-align: 1px; cursor: help;
}

/* 「利润」筛选项：只有利润分析页显示，订单查询隐藏（两页共用同一套筛选 DOM） */
#view-orders.hide-profit .od-profit-only { display: none !important; }

/* 利润分析页隐藏「最晚发货(8)」「揽收状态(17)」两列 */
#view-orders.hide-pickup-pdd col.c-pdd,
#view-orders.hide-pickup-pdd col.c-pickup { width: 0 !important; }
#view-orders.hide-pickup-pdd th:nth-child(8),
#view-orders.hide-pickup-pdd td:nth-child(8),
#view-orders.hide-pickup-pdd th:nth-child(17),
#view-orders.hide-pickup-pdd td:nth-child(17) {
  display: none !important;
  width: 0 !important; padding: 0 !important; border: 0 !important;
}
/* 隐藏两列后：参考订单查询页(no-profit)的机制——表格 width:auto + min-width:100%，备注列固定宽拉齐到右边 */
#view-orders.hide-pickup-pdd #odTable { width: auto !important; min-width: 100% !important; table-layout: fixed; }
#view-orders.hide-pickup-pdd #odTable col.c-rm { width: 240px !important; }
#view-orders.hide-pickup-pdd #odTable thead th:last-child { width: 240px !important; }
#view-orders.hide-pickup-pdd #odTable col.c-cost { width: 100px !important; }
#view-orders.hide-pickup-pdd #odTable thead th:nth-child(11) { width: 100px !important; }
#view-orders.hide-pickup-pdd #odTable col.c-car { width: 160px !important; }
#view-orders.hide-pickup-pdd #odTable thead th:nth-child(15) { width: 160px !important; }

/* ================= 结算单页面 ================= */
#stTable { width: 100% !important; table-layout: fixed; }
#stTable th, #stTable td { padding: 11px 8px !important; font-size: 12px !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#stTable thead th { height: 40px !important; padding: 8px 8px !important;
  font-size: 12px !important; font-weight: 600 !important; color: #000 !important; }
#stTable col.c-seq  { width: 4.5%; }
#stTable col.c-sd   { width: 12%; }
#stTable col.c-bill { width: 20%; }
#stTable col.c-shop { width: 14%; }
#stTable col.c-type { width: 14%; }
#stTable col.c-so   { width: 20%; }
#stTable col.c-amt  { width: 15.5%; }
#stTable th:nth-child(1), #stTable td:nth-child(1) { text-align: center; }
#stTable th:nth-child(7), #stTable td:nth-child(7) { text-align: right; }

/* 结算单配置弹窗 */
.st-cfg-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.st-cfg-row > label { flex: 0 0 104px; font-size: 12.5px; color: #5b6478; text-align: right; }
.st-cfg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 12px 0; }
.st-cfg-grid > div { display: flex; align-items: center; gap: 8px; }
.st-cfg-grid label { flex: 0 0 84px; font-size: 12.5px; color: #5b6478; text-align: right; }
.st-cfg-grid input { flex: 1 1 auto; min-width: 0; }

/* 备注列（最后一列）撑满右侧剩余宽度，直接拉伸到表格右边缘 */
/* 备注列吃掉右侧剩余宽度 + 表头居中 */
#odTable col.c-rm,
#odTable.no-profit col.c-rm { width: 24% !important; }
#odTable thead th:last-child,
#odTable.no-profit thead th:last-child {
  width: 24% !important;
  min-width: 160px;
  text-align: center !important;
}
#odTable tbody td:last-child { max-width: none; text-align: left; }

/* 订单查询页隐藏的两列（利润/跨境物流商）col 仍会占宽，清零后剩余给备注列 */
#odTable.no-profit col.c-pro,
#odTable.no-profit col.c-car { width: 0 !important; }

/* 店铺勾选列表：渲染时没加 class，直接按 label 命中。
   全局 input 样式会把复选框撑大，压住店名第一个字，这里强制回退到固定尺寸 */
#odPickerList > label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 7px !important;
  font-size: 12.5px !important;
  border-radius: 6px;
  cursor: pointer;
  overflow: visible !important;
  white-space: normal !important;
}
#odPickerList > label:hover { background: #f4f6fd; }
#odPickerList > label > input[type="checkbox"] {
  flex: 0 0 15px !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  /* 必须自己画：全局规则给了背景色/勾图，但没关掉原生外观，
     两者叠加会变成「白框看不到勾」 */
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1.5px solid #c8cede;
  border-radius: 4px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
}
#odPickerList > label > input[type="checkbox"]:checked {
  background-color: var(--brand-500, #635bff) !important;
  border-color: var(--brand-500, #635bff) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") !important;
}

/* 店名用 span 排，别再跟复选框抢位置 */
#odPickerList > label > span.pick-name {
  flex: 1 1 auto !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 订单查询：表格宽度跟着列走，别留右侧空白；备注列给足宽度 */
#odTable.no-profit { width: auto !important; min-width: 100% !important; }
#odTable.no-profit col.c-rm { width: 240px !important; }
#odTable.no-profit thead th:last-child { width: 240px !important; text-align: center !important; }

/* 结算单：参与店铺多选列表 */
#stShopList > label {
  display: flex !important; align-items: center !important; gap: 8px !important;
  padding: 5px 7px !important; font-size: 12.5px !important; border-radius: 6px; cursor: pointer;
}
#stShopList > label:hover { background: #f4f6fd; }
#stShopList > label > input[type="checkbox"] {
  flex: 0 0 15px !important; width: 15px !important; height: 15px !important;
  margin: 0 !important; padding: 0 !important; box-sizing: border-box;
  appearance: none !important; -webkit-appearance: none !important;
  border: 1.5px solid #c8cede; border-radius: 4px; background: #fff no-repeat center / 11px 11px;
}
#stShopList > label > input[type="checkbox"]:checked {
  background-color: var(--brand-500, #635bff) !important;
  border-color: var(--brand-500, #635bff) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/></svg>") !important;
}
#stShopList > label > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 评价管理「抓取范围」店铺多选（#pickerList）----------
   注意：这个列表的父级是 .ms-panel-static，不是 .picker-list，
   以前复用的是 .picker-list 的样式，结果根本没命中，
   勾选框用的是全局样式（contain:paint + will-change），点了不立即重绘，
   表现就是「勾了不显示 / 勾下一个才显示上一个」。这里单独写一套。 */
#pickerList label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 12.5px;
  color: #3c4360;
  border-radius: 5px;
  cursor: pointer;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  line-height: 1.6;
}
#pickerList label:hover { background: #eef1fb; }
#pickerList label input[type=checkbox] {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
  /* 关键：去掉这两个，勾选才会立即重绘 */
  contain: none !important;
  will-change: auto !important;
  transition: none !important;
}

/* ---------- 勾选框「勾了不显示」的最终修复 ----------
   现象：点一下不变色，点下一个时上一个才变。
   原因：勾选态写在 :checked 伪类里、靠 background-image 画对勾，
   Chromium 对这种伪类+背景图的变化在某些容器里不立即重绘。
   方案：JS 同步切换 .on 类名，样式走类名（类名变化一定触发重算，不会滞后）。 */
input[type=checkbox].on {
  background-color: #635bff !important;
  border-color: #635bff !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3.6 8.4l3 3 5.8-6'/%3E%3C/svg%3E") !important;
}

/* ---------- 侧栏「网页端」小开关 ---------- */
.brand-right {
  margin-left: auto; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.lan-switch {
  display: inline-flex; align-items: center; cursor: pointer;
  flex: 0 0 auto;
}
.lan-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.lan-switch-slider {
  width: 24px; height: 14px; border-radius: 8px; background: #cbd2e0;
  position: relative; transition: background .18s ease; display: block;
}
.lan-switch-slider::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
  transition: transform .18s ease; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.lan-switch input:checked + .lan-switch-slider { background: #5b6ee1; }
.lan-switch input:checked + .lan-switch-slider::after { transform: translateX(10px); }
.lan-switch input:disabled + .lan-switch-slider { opacity: .5; }

/* 品牌区标题不许换行（加了开关后容易被挤成竖排） */
.side-brand .brand-txt h1 { white-space: nowrap; }
.side-brand .brand-txt p { white-space: nowrap; }
.side-brand .brand-txt { min-width: 0; }

/* 品牌区：第三列（开关/版本号）只占一行高度，第二行账号文字不许压过去 */
.side-brand { align-items: flex-start; padding-top: 10px; }
.side-brand .logo { margin-top: 1px; }
.side-brand .brand-txt { flex: 1 1 auto; min-width: 0; padding-right: 6px; }
.side-brand .brand-txt p {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-brand .brand-right { align-self: flex-start; margin-top: -2px; }

/* 品牌区：YUNDAO 一行、账号名单独一行在下方，字号缩小 */
.side-brand { height: auto; min-height: 62px; padding: 8px 14px; }
.side-brand .brand-txt { line-height: 1.25; }
.side-brand .brand-txt h1 { font-size: 13px; }
.side-brand .brand-txt .brand-sub {
  font-size: 9px; letter-spacing: .8px; margin-top: 1px; color: #a3aec2;
}
.side-brand .brand-txt .brand-user {
  font-size: 9.5px; margin-top: 1px; color: #8792a2;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 店铺设置页：已禁用的店铺仍然列出（可重新启用），只是灰一点 */
.store-row.is-disabled { opacity: .55; }
.store-row.is-disabled:hover { opacity: .8; }

/* 利润分析：表格区域自适应高度，底部不留大片空白 */
#view-profitsum .rv-table-wrap { max-height: calc(100vh - 330px); overflow-y: auto; }

/* 日期框：未选值时隐藏 yyyy/mm/日 占位文字，日历按钮保留可点 */
.ps-date::-webkit-datetime-edit { opacity: 0; }
.ps-date:valid::-webkit-datetime-edit { opacity: 1; }
.ps-date { color: transparent; caret-color: transparent; }
.ps-date:valid { color: inherit; }
.ps-date::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
.ps-date:hover::-webkit-calendar-picker-indicator { opacity: 1; }

/* 利润分析：全部单元格居中；链接ID 不换行 */
#view-profitsum .rv-table th,
#view-profitsum .rv-table td { text-align: center !important; }
#view-profitsum .rv-table td { white-space: nowrap; }

/* 一级菜单：无论展开与否，字重/颜色保持一致，方便肉眼定位层级 */
.menu-group > .menu-lv1 { color: #0a2540 !important; font-weight: 600 !important; }
.menu-group > .menu-lv1 .ico { color: #635bff !important; }

/* 利润分析筛选栏：整体缩窄，一行排完 */
#view-profitsum .filter-row { gap: 6px !important; flex-wrap: nowrap !important; }
#view-profitsum .filter-label { font-size: 12px; white-space: nowrap; }
#view-profitsum .ps-dim { font-size: 12px; white-space: nowrap; }
#view-profitsum .filter-sep { margin: 0 1px; }
#view-profitsum #psDim { width: 104px !important; padding: 0 4px !important; }
#view-profitsum #psRate { width: 52px !important; padding: 0 4px !important; }
#view-profitsum .ps-date { width: 104px !important; }
#view-profitsum .ms-btn { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 利润分析：合计信息单独一行，放在表格上方，不挤底部翻页栏 */
#view-profitsum .ps-info-line {
  font-size: 12px; color: #697386; padding: 2px 2px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 库存页：表格撑满整屏，不留大片空白 */
#view-stock .card { display: flex; flex-direction: column; min-height: calc(100vh - 210px); }
#view-stock .rv-table-wrap { flex: 1 1 auto; max-height: none !important; overflow:auto; }
#view-stock .rv-table td { white-space: nowrap; }

/* 库存页：所有单元格文字居中 */
#view-stock .rv-table th,
#view-stock .rv-table td { text-align: center !important; }

/* 商品映射表格：固定列宽，输入框不再撑破导致横向滚动 */
#stMapMask .stmap-table { table-layout: fixed; width: 100%; font-size: 12.5px; }
#stMapMask .stmap-table th { text-align: center !important; font-weight: 600; color: #425466; }
#stMapMask .stmap-table td { text-align: center !important; overflow: hidden; padding: 3px 2px; }
#stMapMask .stmap-table input {
  width: 100% !important; min-width: 0 !important; box-sizing: border-box;
  padding: 5px 4px !important; font-size: 12px !important; text-align: center;
}
#stMapMask .modal { max-width: 96vw; }
#stMapMask .modal > div[style*="max-height"] { overflow-x: hidden !important; }

/* 商品映射：flex 行布局，宽度直接写死，杜绝被表格拉伸 */
#stMapMask .stmap-head,
#stMapMask .stmap-row {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 6px; box-sizing: border-box; width: 100%;
}
#stMapMask .stmap-head {
  background: #f7f9fc; border-bottom: 1px solid #eceff5;
  font-size: 12px; font-weight: 600; color: #425466;
}
#stMapMask .stmap-head span,
#stMapMask .stmap-row > * { text-align: center; }
#stMapMask .c-fi, #stMapMask .c-ti { width: 132px; flex: 0 0 132px; }
#stMapMask .c-fp, #stMapMask .c-tp { width: 96px;  flex: 0 0 96px; }
#stMapMask .c-ar { width: 18px;  flex: 0 0 18px; color: #635bff; font-weight: 700; }
#stMapMask .c-x  { width: 20px;  flex: 0 0 20px; }
#stMapMask .stmap-row input {
  width: 100% !important; min-width: 0 !important; box-sizing: border-box;
  padding: 4px 3px !important; font-size: 11.5px !important; text-align: center;
}
#stMapMask .stmap-row .stm-fp,
#stMapMask .stmap-row .stm-tp { width: 96px !important; flex: 0 0 96px; }
#stMapMask .stmap-row .stm-fi,
#stMapMask .stmap-row .stm-ti { width: 132px !important; flex: 0 0 132px; }

/* 商品映射表头筛选框 */
#stMapMask .stmap-head .stmap-filter {
  width: 46px; height: 18px; margin-left: 3px; padding: 0 3px;
  font-size: 11px; text-align: center; border-radius: 4px;
  border: 1px solid #dfe3ec; background: #fff; box-sizing: border-box;
}
#stMapMask .stmap-head .stmap-filter:focus { border-color: var(--brand-500); outline: none; }

/* 预警配置弹窗 */
#stPlanMask .stplan-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 2px; border-bottom: 1px dashed #f0f2f7;
}
#stPlanMask .stplan-row label { font-size: 13px; color: #425466; font-weight: 500; }

/* 库存预警：可用库存标黄 */
#view-stock .rv-table td.st-warn { color: #b7791f !important; background: #fffbe6; font-weight: 700; }
#view-stock .rv-table tr.st-style-warn > td { background: #fffbe6 !important; }

/* 供应商筛选弹窗：一行 5 个 */
#stSupMask .stsup-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 10px;
  max-height: 340px; overflow-y: auto; padding: 4px 2px;
}
#stSupMask .stsup-grid label {
  display: flex; align-items: center; gap: 5px; font-size: 12.5px;
  color: #425466; cursor: pointer; min-width: 0;
}
#stSupMask .stsup-grid label span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* FBT 管理占位 */
#view-fbt .fbt-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 320px; color: #98a2b3; gap: 10px;
}
#view-fbt .fbt-empty .big { font-size: 15px; color: #697386; font-weight: 500; }

/* 供应商弹窗复选框：强制关掉浏览器原生外观，避免"两个勾"叠在一起 */
#stSupMask input[type="checkbox"],
#stMapMask input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  accent-color: transparent !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #d8dce6 !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  background-image: none !important;
  background-size: 10px 10px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  box-sizing: border-box !important;
  cursor: pointer;
}
#stSupMask input[type="checkbox"]:checked,
#stMapMask input[type="checkbox"]:checked {
  background-color: #635bff !important;
  border-color: #635bff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") !important;
  background-size: 10px 10px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* 系统商品：上方按钮一行显示，不挤压换行 */
#view-sysproducts .head-actions { flex-wrap: nowrap; overflow-x: auto; align-items: center; }
#view-sysproducts .head-actions .btn-primary,
#view-sysproducts .head-actions .btn-secondary { white-space: nowrap; flex-shrink: 0; }

/* 店铺设置：店铺前面的序号 */
.store-seq {
  flex: 0 0 auto;
  min-width: 22px;
  font-size: 12px;
  color: #98a0b5;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ==================== 商品创建：拖图区 ==================== */
.lg-drop-row { display: flex; gap: 14px; align-items: stretch; }
.lg-drop-row-3 .lg-drop-zone { flex: 1 1 0; min-width: 0; }
.lg-drop-zone { flex: 1 1 0; min-width: 0; padding: 14px; }
.lg-drop-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.lg-drop-body {
  min-height: 220px; border: 2px dashed #d0d5e0; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; padding: 12px; background: #fafbfd;
  transition: border-color .15s, background .15s;
}
.lg-drop-body.drag-over { border-color: #4b6bfb; background: #f0f4ff; }
.lg-drop-hint { font-size: 12.5px; color: #98a0b5; }
.lg-drop-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: flex-start; }
.lg-drop-img { position: relative; width: 88px; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; cursor: grab; }
.lg-drop-img img { width: 100%; height: 70px; object-fit: cover; display: block; }
.lg-drop-img.dragging { opacity: .4; }
.lg-drop-img.drag-over { border-color: #4b6bfb; box-shadow: 0 0 0 2px rgba(75,107,251,.25); }
.lg-drop-name { width: 100%; box-sizing: border-box; border: none; border-top: 1px solid var(--line); font-size: 10.5px; padding: 3px 4px; text-align: center; background: #fff; color: #3c4360; outline: none; }
.lg-drop-name:focus { background: #f0f4ff; }
.lg-drop-zoom { position: absolute; right: 3px; bottom: 22px; font-size: 12px; cursor: pointer; background: rgba(255,255,255,.85); border-radius: 4px; padding: 1px 3px; line-height: 1; }
.lg-drop-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 18px; text-align: center; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; font-size: 12px; cursor: pointer; z-index: 2; }
.lg-drop-img.sel { border-color: #4b6bfb; box-shadow: 0 0 0 2px rgba(75,107,251,.3); }
.lg-drop-img.ins-before { box-shadow: -3px 0 0 #4b6bfb; }
.lg-drop-img.ins-after { box-shadow: 3px 0 0 #4b6bfb; }
.btn-mini { border: 1px solid var(--line); background: #fff; color: #4b6bfb; border-radius: 6px; font-size: 12px; padding: 2px 8px; cursor: pointer; }
.btn-mini:hover { background: #f0f4ff; }

/* ==================== 商品创建：SKU 规格 ==================== */
.sku-spec { display: flex; flex-direction: column; gap: 10px; }
.sku-spec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sku-spec-label { font-size: 13px; font-weight: 600; color: #e0343c; min-width: 50px; }
.sku-spec-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.sku-spec-chips-row { margin: 8px 0 0 58px; }
.sku-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sku-chip { display: inline-flex; align-items: center; gap: 4px; background: #eef1f6; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; }
.sku-chip-x { cursor: pointer; color: #98a0b5; font-style: normal; }
.sku-chip-x:hover { color: #e0343c; }
.sku-chip.dup { background: #fdeaea; border: 1px solid #e0343c; color: #e0343c; cursor: pointer; }
.sku-table th, .sku-table td { text-align: center; vertical-align: middle; border-left: 1px dashed #d5d9e2; border-right: 1px dashed #d5d9e2; }
.sku-table th:first-child, .sku-table td:first-child { border-left: none; }
.sku-table th:last-child, .sku-table td:last-child { border-right: none; }
.sku-center { text-align: center; }
.sku-cell { text-align: center; }
.sku-thumb { width: 100% !important; max-width: 120px; height: auto !important; min-height: 80px; object-fit: cover; border-radius: 6px; display: block; margin: 0 auto; }
.sku-inline-input { width: 90px; padding: 3px 8px; font-size: 12.5px; border: 1px solid #4b6bfb; border-radius: 14px; outline: none; }

/* ==================== 可搜索多选下拉 ==================== */
.ms-multi { position: relative; flex: 1 1 auto; }
.ms-multi-trigger { border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font-size: 13px; cursor: pointer; background: #fff; min-height: 20px; }
.ms-multi-trigger:hover { border-color: #b9c6f8; }
.ms-multi-panel { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); z-index: 30; padding: 8px; }
.ms-multi-search { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 12.5px; margin-bottom: 6px; outline: none; }
.ms-multi-all { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 2px; border-bottom: 1px solid #eef1f6; margin-bottom: 4px; cursor: pointer; }
.ms-multi-list { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.ms-multi-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.ms-multi-item:hover { background: #f5f7fb; }

/* ==================== 商品创建：款号工具栏 / 标题 ==================== */
.lg-mode-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.lg-mode-btn { padding: 6px 16px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #3c4360; cursor: pointer; }
.lg-mode-btn.active { background: #4b6bfb; color: #fff; border-color: #4b6bfb; }
#lgListMode th, #lgListMode td { text-align: center; }
.lg-list-c { text-align: center !important; vertical-align: middle; }
.lg-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; text-align: center; }
.lg-row-tag { display: inline-block; font-size: 10px; color: #fff; background: #8a94a0; border-radius: 3px; padding: 0 4px; line-height: 1.7; margin-top: 2px; white-space: nowrap; }
.lg-row-tag.ok { background: #1a9e4b; }
.lg-row-tag.fail { background: #e0343c; }
.lg-cat-dd { position: relative; }
.lg-cat-dd-trigger { border: 1px solid #e2e5ec; border-radius: 5px; padding: 6px 10px; font-size: 12.5px; color: #333; cursor: pointer; background: #fff; min-height: 30px; display: flex; align-items: center; justify-content: space-between; }
.lg-cat-dd-trigger:hover { border-color: #4b6bfb; }
.lg-cat-dd-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: #fff; border: 1px solid #e2e5ec; border-radius: 8px; max-height: 220px; overflow: auto; box-shadow: 0 6px 18px rgba(0,0,0,0.1); margin-top: 2px; padding: 3px; }
/* ★ 类目属性下拉：紧凑排版 + 小勾选框（不依赖浏览器原生大样式） */
.lg-cat-dd-panel { padding: 4px; border-radius: 8px; }
.lg-cat-dd-panel label { display: flex; align-items: center; gap: 6px; padding: 1px 8px; font-size: 12px; cursor: pointer; border-radius: 4px; line-height: 1.2; }
.lg-cat-dd-panel label:hover { background: #f2f5fb; }
.lg-cat-dd-panel input[type="checkbox"] { width: 13px !important; height: 13px !important; min-width: 13px !important; margin: 0 !important; padding: 0 !important; accent-color: #4b6bfb; flex: 0 0 auto; }
/* 多选/单选框统一细小样式（属性面板内） */
.lg-cat-attrs input[type="checkbox"], .lg-cat-attrs input[type="radio"] { width: 13px !important; height: 13px !important; min-width: 13px !important; margin: 0 2px 0 0 !important; accent-color: #4b6bfb; }
.lg-cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 10px; }
.lg-cat-cell { min-width: 0; }
.lg-cat-cell-name { font-size: 12.5px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-list-thumbs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.lg-list-thumbs img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.lg-list-more { width: 40px; height: 40px; border: 1px dashed var(--line); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; }
.lg-list-more-dots { font-size: 15px; color: #697386; line-height: 1; }
.lg-list-more-count { font-size: 10px; color: #697386; }
.lg-drop-more { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.lg-drop-more:hover { border-color: #4b6bfb; }
.lg-drop-more .lg-drop-more-dots { font-size: 18px; }
.vision-task-row { align-items: center; }
.vision-task-row label { margin: 0; }
.cmp-yes { color: #1a6b3c; }
.cmp-no { color: #c0392b; }
.topbar-tabs { display: flex; align-items: center; gap: 2px; margin-left: 10px; overflow-x: auto; max-width: 60vw; }
.topbar-tab { display: flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer; font-size: 12.5px; color: #4a5069; border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 6px 6px 0 0; }
.topbar-tab:hover { background: #f0f4ff; }
.topbar-tab.active { color: #4b6bfb; border-bottom-color: #4b6bfb; background: #eef1ff; }
.topbar-tab.pinned .topbar-tab-name { font-weight: 600; }
.topbar-tab-x { color: #909399; font-size: 14px; line-height: 1; padding: 0 2px; }
.topbar-tab-x:hover { color: #e0343c; }
.topbar-tab-pin { font-size: 11px; opacity: .6; }
.topbar-tab-pin:hover { opacity: 1; }
.home-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.home-card { text-align: center; padding: 20px 12px; border-radius: 12px; background: var(--card); box-shadow: 0 2px 10px rgba(23,27,46,.06); }
.home-card-num { font-size: 30px; font-weight: 700; color: #4b6bfb; line-height: 1.2; }
.home-card-label { font-size: 12.5px; color: #697386; margin-top: 6px; }
.home-chart-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.home-chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 8px; font-size: 12px; }
.home-legend-item { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.home-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.home-trend-tip { position: absolute; background: rgba(23,27,46,.92); color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.6; pointer-events: none; z-index: 5; white-space: nowrap; }
.lg-row-editor .lg-style { border: none; padding: 0; margin-bottom: 0; }
.lg-row-editor .lg-style-head { display: none; }
.ms-single-item { padding: 9px 12px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.ms-single-item:hover { background: #f0f4ff; }
.ms-single-item.active { background: #eef0ff; color: #4b6bfb; font-weight: 500; }
.ms-dropdown { position: relative; }
.ms-dropdown-trigger { border: 1px solid #dcdfe6; border-radius: 4px; padding: 8px 10px; font-size: 13px; cursor: pointer; background: #fff; white-space: nowrap; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; }
.ms-dropdown-trigger:hover { border-color: #c0c4cc; }
.ms-dropdown-trigger .ms-caret { color: #909399; font-size: 12px; }
.ms-dropdown-panel { position: fixed; z-index: 90; background: #fff; border: 1px solid #e2e5ec; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.1); max-height: 220px; overflow: auto; min-width: 240px; padding: 3px 0; }
.ms-dropdown-item { display: flex; align-items: center; gap: 6px; padding: 1px 10px; font-size: 12px; color: #333; cursor: pointer; min-height: 22px; box-sizing: border-box; line-height: 1.2; }
.ms-dropdown-item:hover { background: #f5f7fa; }
.ms-dropdown-item input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; width: 13px; height: 13px; border: 1px solid #d0d5dd; border-radius: 3px; margin: 0; cursor: pointer; background: #fff; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; box-sizing: border-box; }
.ms-dropdown-item input[type=checkbox]:hover { border-color: #5b5bd6; }
.ms-dropdown-item input[type=checkbox]:checked { border-color: #5b5bd6; background: #5b5bd6; }
.ms-dropdown-item input[type=checkbox]:checked::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(0, -1px); }
.ms-dropdown-search { width: calc(100% - 12px); margin: 5px 6px 4px; padding: 3px 8px; font-size: 12px; border: 1px solid #dcdfe6; border-radius: 6px; box-sizing: border-box; }
.ms-dropdown-opts { max-height: 320px; overflow: auto; }
.ms-dropdown-opts-3col { display: grid; grid-template-columns: repeat(3, 1fr); max-height: 320px; overflow: auto; }
.ms-dropdown-opts-3col .ms-dropdown-item { min-width: 0; padding: 7px 8px; }
.ms-dropdown-opts-5col { display: grid; grid-template-columns: repeat(5, 1fr); max-height: 320px; overflow-y: auto; padding-left: 9px; }
.ms-dropdown-opts-5col .ms-dropdown-item { min-width: 0; padding: 0 4px; min-height: 18px; justify-content: flex-start; text-align: left; align-items: center; }
.ms-dropdown-opts-5col .ms-dropdown-item span { margin-top: 1px; }
.ms-dropdown-opts-5col .ms-dropdown-item input[type=checkbox] { margin-right: 5px; }
.ms-dropdown-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 100%; }
.ms-model-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f2f7; }
.ms-model-item:hover { background: #f5f7fa; }
.lg-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.lg-style-seq { font-size: 15px; font-weight: 700; color: #4b6bfb; min-width: 20px; }
.lg-title-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
/* ★ 单款编辑：所有字段标签统一（宽度 72px / 12.5px / 常规字重 / 同色），与输入框垂直居中对齐 */
.lg-title-label { flex: 0 0 72px; width: 72px; white-space: nowrap; font-size: 12.5px; font-weight: 400; color: #3c4360; line-height: 1.5; }
.lg-title-row { display: flex; align-items: center; gap: 8px; }
.lg-style-title { flex: 1 1 auto; padding: 8px 11px; font-size: 13px; }

/* 多款 */
.lg-style { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 14px; }
.lg-style-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.lg-style-seq { font-size: 15px; font-weight: 700; color: #4b6bfb; min-width: 20px; }
.lg-from-yindao { font-size: 11px; color: #fff; background: #6b7cff; border-radius: 4px; padding: 1px 6px; line-height: 1.5; }
.lg-from-copy { font-size: 11px; color: #fff; background: #e0872f; border-radius: 4px; padding: 1px 6px; line-height: 1.5; }

/* 款导航悬浮窗 */
.lg-nav { position: fixed; right: 18px; top: 130px; width: 184px; max-height: 62vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(23,27,46,.12); z-index: 40; }
.lg-nav-head { padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: #4b6bfb; cursor: pointer; border-bottom: 1px solid #eef1f6; position: sticky; top: 0; background: #fff; }
.lg-nav-head:hover { background: #f5f7fb; }
.lg-nav-list { display: flex; flex-direction: column; }
.lg-nav-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: #3c4360; }
.lg-nav-item:hover { background: #f0f4ff; }
.lg-nav-seq { font-weight: 700; color: #4b6bfb; min-width: 18px; }
.lg-style-no { font-size: 14px; font-weight: 600; color: #1f2430; cursor: pointer; padding: 4px 10px; border-radius: 6px; border: 1px solid transparent; }
.lg-style-no:hover { border-color: #b9c6f8; background: #f5f7fb; }
.lg-sizechart-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.lg-sizechart-body { flex: 1 1 auto; min-height: 88px; border: 2px dashed #d0d5e0; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 10px; background: #fafbfd; }
.lg-sizechart-body.drag-over { border-color: #4b6bfb; background: #f0f4ff; }
.lg-sizechart-imgs { display: flex; gap: 8px; flex-wrap: wrap; }
.sku-prefix-label { font-size: 12.5px; cursor: pointer; display: flex; align-items: center; gap: 4px; white-space: nowrap; }


/* ★ 表格表头固定：滚动明细时表头不跟随（采集箱/发布列表等长表格） */
.rv-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f7f9fc !important;
  box-shadow: 0 1px 0 #e6ebf2, 0 4px 8px -6px rgba(0,0,0,.12);
}


/* ★ 类目歧义弹窗：单选改成小圆点，与文字高度对齐 */
input[type="radio"][name^="catamb_"] {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  margin: 0 7px 0 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  position: relative;
  top: -1px;
  accent-color: #3b5bdb;
  flex: 0 0 auto;
}



/* ★ 列表缩略图：悬浮显示放大镜状态（描边 + 轻微放大 + 放大镜图标） */
.lg-list-thumbs img[data-zoom] {
  transition: transform .12s ease, box-shadow .12s ease;
}
.lg-list-thumbs img[data-zoom]:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #3b5bdb, 0 4px 10px rgba(59,91,219,.25);
  position: relative;
  z-index: 2;
}


/* 操作下拉菜单项 */
.tcb-more-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.4;
  border: none;
  background: transparent;
  color: #3c4360;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
}
.tcb-more-item:hover { background: #f2f5fb; }


/* ★ 单款编辑：各字段 label 与输入框垂直居中 */
.ms-field { align-items: center; }
.ms-field > label { flex: 0 0 72px; width: 72px; white-space: nowrap; font-size: 12.5px; font-weight: 400; color: #3c4360; line-height: 1.5; }
/* ★ SKU 图片：等比放大撑满图片列画幅 */
.lg-drop-imgs img { object-fit: cover; width: 100%; height: 100%; }


/* ★ 单款编辑：标题行输入框与下面字段的输入框同高同字号 */
.lg-title-row .mini-input { height: 40px; padding: 8px 11px; font-size: 12.5px; }
.ms-field .mini-input, .ms-field textarea.mini-input { font-size: 12.5px; }


/* ★ 店铺多选下拉：参照类目属性下拉（紧凑 + 13px 勾选框 + 圆角） */
.ms-dropdown-panel { border-radius: 8px; padding: 4px; }
.ms-dropdown-panel label, .ms-dropdown-panel .ms-opt { padding: 3px 8px; font-size: 12.5px; line-height: 1.6; border-radius: 4px; }
.ms-dropdown-panel input[type="checkbox"] { width: 13px !important; height: 13px !important; min-width: 13px !important; margin: 0 2px 0 0 !important; accent-color: #4b6bfb; }
.ms-dropdown-panel .ms-search { padding: 5px 9px; font-size: 12.5px; }


/* ★ 属性名前的勾选框：与属性值下拉里的勾选框完全一致 */
.lg-cat-attr input[type="checkbox"],
.lg-cat-attrs label input[type="checkbox"],
.lg-cat-attrs .lg-attr-name input[type="checkbox"] {
  width: 13px !important; height: 13px !important; min-width: 13px !important;
  margin: 0 3px 0 0 !important; accent-color: #4b6bfb; flex: 0 0 auto;
}

/* ★ 2026-11-20：类目属性单选项 → 小圆点（原来浏览器默认 radio 显示过大） */
.lg-cat-dd-panel input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 14px !important; height: 14px !important; min-width: 14px !important;
  border: 1.5px solid #c0c6d0; border-radius: 50%;
  margin: 0 !important; padding: 0 !important;
  background: #fff; flex: 0 0 auto; cursor: pointer; position: relative;
}
.lg-cat-dd-panel input[type="radio"]:checked { border-color: #4b6bfb; }
.lg-cat-dd-panel input[type="radio"]:checked::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; border-radius: 50%; background: #4b6bfb;
  transform: translate(-50%, -50%);
}

/* 邮费分析页：表格、表头、筛选框全部居中（2026-12-02） */
#view-freightanalysis table.data-table th,
#view-freightanalysis table.data-table td {
  text-align: center !important;
}
#view-freightanalysis .action-bar input,
#view-freightanalysis .action-bar select,
#view-freightanalysis #frModal input,
#view-freightanalysis #frModal select {
  text-align: center !important;
}
#view-freightanalysis .action-bar input::placeholder,
#view-freightanalysis #frModal input::placeholder {
  text-align: center;
}
/* 弹窗是 fixed 定位挂在 section 内，用属性选择器兜底 */
#frModal input, #frModal select { text-align: center !important; }
#frModal input::placeholder { text-align: center; }
