/* ============================================================
   门店运营助手 · 运营总后台  —  设计系统 v3
   ------------------------------------------------------------
   主色基准 = 京东红 #E1251B（与小程序 BD 工作台同源）。
   桌面端范式：固定左侧栏 + 顶栏 + 卡片网格 + 高密度表格，
   表格密度/行内筛选贴近美团·饿了么商家后台；
   圆角、阴影、间距与小程序共用同一套 token 阶梯。
   ============================================================ */
/* hidden 属性必须永远生效（组件 display 规则不得覆盖它） */
[hidden] { display: none !important; }

/* 商户详情页：门店头图头像（显示在门店名称前） */
.mch-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mch-avatar {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover;
  flex: 0 0 auto; background: #eef1f6;
  border: 1px solid rgba(20, 30, 60, .06);
}
.mch-avatar--ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #8a94a6;
  background: linear-gradient(135deg, #eef2f8, #e3e9f3);
}

:root {
  /* —— 中性 —— */
  --bg: #F5F6F8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --side: #ffffff;
  --side-2: #f4f1f1;
  --line: #EDEFF4;
  --line-2: #F4F5F8;
  --text: #1a1d26;
  --text-2: #4e5566;
  --text-3: #8B93A5;
  --text-4: #86909C;           /* 辅助说明：视图里原来散写 23 处 #86909C */

  /* —— 品牌基准：京东红 —— */
  --brand: #E1251B;
  --brand-d: #B81B12;
  --brand-w: #FFF1EF;
  --brand-bd: #F8C9C4;
  --brand-1: #FF7A45;          /* 渐变浅端 */
  --brand-2: #E1251B;          /* 渐变基准 */
  --brand-3: #9E120B;          /* 渐变深端 */
  --brand-grad: linear-gradient(135deg, #FF6A3D 0%, #E1251B 52%, #B81B12 100%);
  --brand-shadow: 0 6px 18px rgba(225, 37, 27, .22);

  /* —— 语义色（涨跌按国内习惯：涨红跌绿）—— */
  --ok: #12b76a;
  --ok-w: #e8f8f0;
  --warn: #f79009;
  --warn-w: #fef4e6;
  --danger: #f04438;
  --danger-w: #feecea;
  --info: #1D6FE0;             /* 信息蓝：视图里原来散写 20 处 #1D6FE0 */
  --info-w: #EAF2FE;
  --jd: #E1251B;

  /* —— 圆角 / 阴影阶梯（与小程序同源：6/8/10/12）—— */
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 14px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .03);
  --sh-2: 0 1px 2px rgba(16, 24, 40, .03), 0 6px 16px rgba(16, 24, 40, .04);
  --sh-3: 0 12px 32px rgba(16, 24, 40, .12);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3d8e0; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9c0cb; }

/* ---------- 启动 / 登录 ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 14px; justify-items: center; }
.boot-spin { width: 30px; height: 30px; border: 3px solid #dfe4ec; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.boot-txt { color: var(--text-3); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-wrap {
  position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(180deg, #FFF2F0 0%, #f4f5f7 46%, #f4f5f7 100%);
}
.login-card {
  position: relative; width: 400px; max-width: calc(100vw - 32px);
  background: var(--surface); border-radius: var(--r-xl); padding: 36px 32px 28px;
  box-shadow: var(--sh-3); display: grid; gap: 16px;
  animation: rise .5s cubic-bezier(.2,.7,.3,1);
  border: 1px solid rgba(232, 234, 240, .8);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; background: var(--brand-grad); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px; letter-spacing: .3px;
  box-shadow: var(--brand-shadow); flex: 0 0 auto;
}
.brand-mark.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; box-shadow: none; }
.brand-txt { display: grid; }
.brand-txt b { font-size: 16px; }
.brand-txt i { font-style: normal; font-size: 12px; color: var(--text-3); }
.fld { display: grid; gap: 6px; }
.fld > span { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); outline: none; transition: .16s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225,37,27,.11); }
.pwd-wrap { position: relative; display: block; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.pwd-eye:hover { color: var(--brand); background: var(--brand-w); }
.login-msg { background: var(--danger-w); color: #b42318; border-radius: var(--r); padding: 9px 12px; font-size: 13px; }
.login-foot { margin: 0; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm); border: 1px solid #dcdfe6;
  background: var(--surface); cursor: pointer; font-weight: 500; font-size: 13px;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f6c9c5; background: #fff; }
.btn-danger:hover { background: var(--danger-w); border-color: var(--danger); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--side-2); color: var(--text); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; padding: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { border: 0; background: none; color: var(--text-2); cursor: pointer; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { color: var(--brand); background: var(--side-2); }
.link-btn.danger:hover { color: var(--danger); background: var(--danger-w); }

/* ---------- 骨架 ---------- */
.shell { display: grid; grid-template-columns: 216px 1fr; height: 100vh; overflow: hidden; }
.side { background: var(--side); color: var(--text-2); display: flex; flex-direction: column; padding: 16px 10px 10px; border-right: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; color: var(--text); font-size: 14.5px; font-weight: 600; }
/* ★ 2026-10-19：flex 子项默认 min-height:auto，内容超高时不会收缩，
   overflow-y:auto 就永远不触发 —— 侧栏底部菜单被裁掉、也没有滚动条。
   必须显式 min-height:0 才能真正滚动。 */
.nav {
  display: grid; gap: 2px; overflow-y: auto; flex: 1;
  min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #C9CEDB transparent;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #C9CEDB; border-radius: 3px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: var(--r-sm);
  color: var(--text-2); cursor: pointer; font-size: 13.5px; border: 0; background: none; text-align: left; width: 100%;
  transition: .14s;
}
.nav-item:hover { background: var(--side-2); color: var(--text); }
.nav-item.on { background: var(--brand-w); color: var(--brand-d); font-weight: 600; }
.nav-ico { width: 16px; height: 16px; flex: 0 0 auto; opacity: .85; }
.nav-sec { padding: 12px 11px 5px; font-size: 11px; letter-spacing: .06em; color: var(--text-3); }
.side-foot { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: 0 0 auto; }
.me-txt { display: grid; min-width: 0; }
.me-txt b { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-txt i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.side-acts { display: flex; gap: 4px; padding: 2px 6px 0; }
.side-meta { display: flex; align-items: center; gap: 6px; padding: 6px 8px 2px; font-size: 11.5px; color: var(--text-3); }
.side-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: #c3c9d4; flex: 0 0 auto; }
.side-meta .dot.ok { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.16); }
.side-meta .dot.warn { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.16); }

.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 24px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.topbar h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.topbar p { margin: 1px 0 0; font-size: 12px; color: var(--text-3); }
.tb-right { display: flex; gap: 8px; align-items: center; }
/* 每次渲染新建的工具栏槽位（切页后老页面写的是已摘掉的节点，不会盖到当前页） */
.tb-slot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.view { padding: 16px 24px 40px; overflow-y: auto; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-hd h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-hd p { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }
.card-bd { padding: 14px 16px; }
.card-bd.flush { padding: 0; }
.grid { display: grid; gap: 12px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-2, .g-3 { grid-template-columns: 1fr; } }
/* g-4 是 4 张窄统计卡，到 980px 才收成两列，别跟 g-2/g-3 一起塌成单列 */
@media (max-width: 980px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g-4 { grid-template-columns: 1fr; } }
/* 任务中心那排统计卡：一行放完，收紧内边距，别再让数字下面拖一大片空白 */
.g-4 > .kpi { padding: 9px 13px 8px; }
.g-4 > .kpi .kpi-t { font-size: 11.5px; }
.g-4 > .kpi .kpi-v { font-size: 21px; margin-top: 1px; }
.g-4 > .kpi .kpi-s { margin-top: 0; }

/* KPI 卡片：全站唯一一套（原来 214 行与 850 行各定义一次，字号 24/26/21 三种并存） */
.kpi { padding: 14px 16px 13px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: none; position: relative; overflow: hidden; }
.kpi-t { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.kpi-v { font-size: 26px; font-weight: 700; letter-spacing: -.025em; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi-s { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.kpi-v small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 2px; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; padding: 9px 12px; background: var(--surface-2); color: var(--text-2);
  font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #f8fafd; }
table.tbl tbody tr.sel { background: var(--brand-w); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.mono { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
table.tbl .sname { font-weight: 500; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.tbl .nl-note { max-width: 280px; line-height: 1.5; word-break: break-all; }
.rowlink { color: var(--brand); cursor: pointer; text-decoration: none; }
.rowlink:hover { text-decoration: underline; }
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 标签 / 徽标 ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.8; }
.pill-ok { background: var(--ok-w); color: #067647; }
.pill-warn { background: var(--warn-w); color: #b54708; }
.pill-off { background: #f0f1f4; color: #667085; }
.pill-info { background: var(--brand-w); color: var(--brand-d); }
.pill-brand { background: var(--brand); color: #fff; }
.pill-danger { background: var(--danger-w); color: #b42318; }
/* 2026-10-28：分站「掉线」标签以前写了 .pill-bad 但样式表里没有，等于白标 → 补上 */
.pill-bad { background: var(--danger-w); color: #b42318; }
.pill-plain { background: #f0f1f4; color: #667085; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; border: 1px solid; line-height: 1.7; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 12.5px; transition: .14s; user-select: none; }
.chip:hover { border-color: #c3cbd8; }
.chip.on { background: var(--brand-w); border-color: var(--brand-bd); color: var(--brand-d); font-weight: 500; }
.chip-x { opacity: .5; font-size: 14px; line-height: 1; }
.chip-x:hover { opacity: 1; }

/* ---------- 商户分层标签（头部/腰部/尾部/废店，与小程序 utils/tier.js 同口径） ---------- */
.tier-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.8; border: 1px solid; }
.tier-pill.tier-head  { background: rgba(225,37,27,.12);  color: #E1251B; border-color: rgba(225,37,27,.45); }
.tier-pill.tier-waist { background: rgba(247,144,9,.14);   color: #B54708; border-color: rgba(247,144,9,.45); }
.tier-pill.tier-tail  { background: rgba(22,93,255,.12);   color: #1D4ED8; border-color: rgba(22,93,255,.45); }
.tier-pill.tier-waste { background: rgba(134,144,156,.14); color: #475467; border-color: rgba(134,144,156,.45); }
.mz-tier-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- 表单 / 筛选（行内布局：标签 + 控件同一行，贴近美团/饿了么后台） ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.toolbar .grow { flex: 1; min-width: 160px; }
.inp { padding: 6px 10px; border: 1px solid #dcdfe6; border-radius: var(--r-sm); background: var(--surface); outline: none; transition: .15s; min-width: 0; font-size: 13px; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225,37,27,.11); }
.search { position: relative; }
.search .inp { padding-left: 32px; width: 100%; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.fgroup { display: flex; flex-direction: row; align-items: center; gap: 7px; min-width: 0; }
.fgroup > span { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.fgroup select { padding: 6px 8px; border: 1px solid #dcdfe6; border-radius: var(--r-sm); background: var(--surface); outline: none; font-size: 13px; min-width: 104px; max-width: 230px; }
.fgroup select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225,37,27,.11); }
.fgroup input { padding: 6px 8px; border: 1px solid #dcdfe6; border-radius: var(--r-sm); background: var(--surface); outline: none; font-size: 13px; }
.fgroup input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225,37,27,.11); }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.pager .pgs { display: flex; gap: 4px; align-items: center; }
.pg { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid #dcdfe6; background: #fff; border-radius: var(--r-sm); cursor: pointer; font-size: 12.5px; }
.pg:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.36); backdrop-filter: blur(2px); z-index: 60; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 560px; max-width: calc(100vw - 28px); max-height: calc(100vh - 60px);
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  display: flex; flex-direction: column; animation: pop .2s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%,-46%) scale(.97); } }
.modal.wide { width: 760px; }
/* 平台登录态：外卖卫士式「直接弹窗」——内嵌云端浏览器投屏页（2026-11-05）。
   全局单例，页面加载时不建 iframe，点按钮才建；关闭即销毁，ws 随之断开。 */
.modal.ss-login-modal {
  width: min(1180px, calc(100vw - 40px));
  height: min(820px, calc(100vh - 56px));
  max-height: calc(100vh - 40px);
}
.modal.ss-login-modal .modal-bd {
  flex: 1; min-height: 0; padding: 0; overflow: hidden;
  background: #111; border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.ss-frame-wrap { position: relative; width: 100%; height: 100%; min-height: 480px; }
.ss-frame { display: block; width: 100%; height: 100%; border: 0; background: #111; }
.ss-frame-tip {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 1; padding: 10px 16px; border-radius: 8px; background: #1c1c1c;
  color: #ddd; text-align: center; line-height: 1.7; pointer-events: none;
}
.ss-frame-wrap.ready .ss-frame-tip { display: none; }
/* 全屏：点「全屏」把弹窗铺满视口，云端画面跟着变大（login.html 会重设 screencast 分辨率） */
.modal.ss-login-modal.is-max {
  left: 0; top: 0; transform: none;
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  border-radius: 0;
}
.modal.ss-login-modal.is-max .modal-bd { border-radius: 0; }
.modal.ss-login-modal.is-max .ss-frame-wrap { min-height: 0; }
body.ss-modal-max { overflow: hidden; }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line-2); }
.modal-hd h3 { margin: 0; font-size: 15px; }
.modal-bd { padding: 16px 18px; overflow-y: auto; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.close-x { border: 0; background: none; cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.close-x:hover { background: var(--line-2); color: var(--text); }

.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: 620px; max-width: 96vw; background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; animation: slidein .24s cubic-bezier(.2,.8,.3,1); }
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } }

/* ---------- 提示 ---------- */
.toasts { position: fixed; z-index: 90; right: 20px; top: 18px; display: grid; gap: 8px; }
.toast { background: #1f2430; color: #fff; padding: 10px 14px; border-radius: var(--r); font-size: 13.5px; box-shadow: var(--sh-3); display: flex; gap: 9px; align-items: flex-start; max-width: 380px; animation: pop .18s; }
.toast.ok { background: #054f31; } .toast.err { background: #7a271a; } .toast.warn { background: #7a2e0e; }
.toast small { display: block; opacity: .8; font-size: 12px; margin-top: 2px; }

/* ---------- 其它 ---------- */
.progress { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .25s ease; }
.bar-row { display: grid; grid-template-columns: 108px 1fr 62px; gap: 10px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.bar-row .bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-row .bv { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.bar-track { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--brand); transition: width .4s cubic-bezier(.2,.8,.3,1); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-2); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hr { height: 1px; background: var(--line-2); margin: 12px 0; }
.drop { border: 1px dashed #ccd4e0; border-radius: var(--r-lg); padding: 30px 20px; text-align: center; background: var(--surface-2); cursor: pointer; transition: .16s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-w); }
.drop b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.drop span { color: var(--text-3); font-size: 12.5px; }
.stat-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- 账号管理：登录设备区块 ---------- */
.dev-box {
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: #FAFBFC;
}
.dev-box-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.dev-box .btn { margin-top: 10px; }
.dev-tip { font-size: 12px; line-height: 1.65; color: var(--muted); margin: 8px 0 0; }
/* 表格「最近登录」下方那行机型：比正文更轻，不抢主信息 */
td .dev-tip { font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.hide { display: none !important; }
.sec-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 2px 0 6px; }
/* 大盘分区标题：蓝色竖条 + 加粗，层级清晰 */
.dash-sec { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; color: var(--text); margin: 8px 0 0; }
.dash-sec::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); flex: 0 0 auto; }
.dash-sec small { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
/* ---------- 窄屏导航开关（≤860px 侧栏变抽屉） ---------- */
.side-toggle { display: none; }
.side-mask { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 232px; z-index: 90;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 12px 40px rgba(16, 24, 40, .18);
  }
  .side.open { transform: none; }
  .view, .topbar { padding-left: 14px; padding-right: 14px; }

  /* 汉堡按钮：三横线，点击区 40×40，圆角与 .btn 一致 */
  .side-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 36px; height: 36px; padding: 0 8px; margin-right: 10px; flex: 0 0 auto;
    border: 1px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer;
  }
  .side-toggle i { display: block; height: 2px; border-radius: 1px; background: var(--text-2); }
  .side-toggle:active { background: var(--surface-2); }

  /* 抽屉遮罩：点空白处收起 */
  .side-mask { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(16, 24, 40, .32); }
  .side-mask[hidden] { display: none; }

  .topbar { display: flex; align-items: center; gap: 2px; }
  .tb-left { min-width: 0; }
  .tb-left h1 { font-size: 15px; }
  .tb-left p { display: none; }
}

/* ---------- 新开门店页 ---------- */
.row-del td { color: #98a2b3; text-decoration: line-through; }
.row-del td .small, .row-del td .pill { text-decoration: none; }
.seg-days { display: flex; gap: 8px; margin-bottom: 12px; }
/* 数据备份页：左筛选 / 右操作 */
.bk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bk-bar .seg-days { margin-bottom: 0; }
/* 增量涨跌：国内习惯 涨红跌绿 */
.delta { font-weight: 600; }
.delta.up { color: #D92D20; }
.delta.down { color: #12B76A; }
.delta.flat { color: #667085; }
/* 核心数据卡片的「日 / 周」小标签 */
.d-lb { margin-left: 10px; color: var(--text-3); font-size: 10.5px; font-weight: 500; }
.d-lb:first-child { margin-left: 0; }
.kpi-s .delta { margin-left: 3px; font-size: 11px; }
.kpi.k-core::before { background: var(--brand-1); }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: flex-start; }

/* 餐饮新开门店：品类口径切换（全部 / 餐饮 / 零售 / 药品 / 未识别） */
.ns-cats { justify-content: flex-end; }
.ns-cats .btn b { font-weight: 700; opacity: .7; margin-left: 6px; font-size: 11px; }
.c-cat-food { background: #fff1e8; border-color: #ffd6bd; color: #b23a00; }
.c-cat-retail { background: #eef4ff; border-color: #c6d9ff; color: #1d4fd7; }
.c-cat-pharm { background: #e9f9f0; border-color: #bfe9d2; color: #067647; }

/* ---------- 数据导入 · 列映射校对 ---------- */
.map-panel summary { cursor: pointer; font-weight: 600; color: var(--text-2); font-size: 13px; }
.map-panel summary:hover { color: var(--brand); }
.map-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.map-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid transparent; }
.map-row.map-exact { border-left-color: var(--ok); }
.map-row.map-mem { border-left-color: var(--brand); }
.map-row.map-fuzzy { border-left-color: #7c5cff; }
.map-row.map-manual { border-left-color: #0891b2; }
.map-row.map-none { border-left-color: var(--warn); background: var(--warn-w); }
.map-src { flex: 0 0 170px; max-width: 170px; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-arrow { color: var(--text-3); flex: 0 0 auto; }
.map-sel { flex: 1 1 auto; max-width: 260px; }
.map-tag { flex: 0 0 auto; font-size: 11px; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.map-row.map-exact .map-tag { background: var(--ok-w); color: #067647; }
.map-row.map-mem .map-tag { background: var(--brand-w); color: var(--brand-d); }
.map-row.map-fuzzy .map-tag { background: #f0edff; color: #5b3fd4; }
.map-row.map-manual .map-tag { background: #e0f6fc; color: #0e7490; }
.map-row.map-none .map-tag { background: var(--warn-w); color: #b45309; }

/* ====== 大盘：新签 / 异常 / 分组对比 / TOP ====== */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  border: 1px solid #dcdfe6; background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 3px 13px; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: .14s;
}
.seg-btn:hover { border-color: var(--brand); color: var(--brand); }
.seg-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.ns-custom { display: flex; align-items: center; gap: 8px; padding: 10px 16px 0; }
.ns-custom input[type="date"] { border: 1px solid #dcdfe6; border-radius: 8px; padding: 5px 8px; font-size: 13px; }

.ns-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ns-g { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.ns-gt { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.ns-gt b { font-size: 16px; color: var(--text); margin-left: 2px; }
.ns-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ns-c span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.ns-c b { font-size: 16px; color: var(--text); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; background: #fff; text-align: left; transition: .14s; }
.tile:hover { border-color: var(--brand-bd); }
.tile.open { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(225, 37, 27, .12); }
.tile.warn .t-v { color: #D92D20; }
.tile .t-t { font-size: 13px; color: var(--text-2); }
.tile .t-v { font-size: 24px; font-weight: 700; color: var(--text); margin: 4px 0 2px; }
.tile .t-v small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.tile .t-s { font-size: 12px; color: var(--text-3); }
.ab-detail { margin-top: 14px; }

.tbl2 th, .tbl2 td { white-space: nowrap; }
.c-ok { color: #067647; font-weight: 600; }
.c-bad { color: #D92D20; font-weight: 600; }

/* ====== 三表固定入口 ====== */
.fix-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; background: #fff;
}
.fix-card-t { font-size: 15px; font-weight: 600; color: var(--text); }
.fix-card-d { font-size: 12px; color: var(--text-3); line-height: 1.5; min-height: 36px; }
.fix-card .btn-block { margin-top: auto; }

/* ====== 登录中心（系统自检页内） ====== */
.lc-card { gap: 6px; }
.lc-hd { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); }
.lc-sub { font-size: 12px; color: var(--text-3); line-height: 1.45; min-height: 32px; }
.lc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 24px; }
.lc-detail { font-size: 11px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.lc-card .btn-block { margin-top: 8px; }
.lc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.lc-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.lc-input {
  width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 8px;
  border: 1px solid var(--line, #e6e6e6); background: var(--bg-2, #fafafa);
  color: var(--text); font-size: 12px; line-height: 1.45; font-family: inherit; resize: vertical;
}
.lc-input:focus { outline: none; border-color: var(--brand, #e1251b); background: #fff; }
.lc-note { font-size: 11px; color: var(--text-4); line-height: 1.5; margin-top: 2px; }
.lc-fold { margin-top: 4px; }
.lc-fold > summary { font-size: 11px; color: var(--brand, #e1251b); cursor: pointer; outline: none; }

/* ====== 一键导入 ====== */
.fix-hero { border: 1px solid var(--brand-bd); background: linear-gradient(180deg, #FFF6F4, #ffffff); }
.fix-cta { font-size: 16px; padding: 14px; font-weight: 600; }
.fix-steps { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.fix-step { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.fix-step > b {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand, #E1251B);
  color: #fff; text-align: center; line-height: 22px; font-size: 12px; font-weight: 700; margin-top: 1px;
}
.fix-step span b { color: var(--text); }

/* ---------- 打卡日报 ---------- */
.ck-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ck-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line, #E5E6EB);
  cursor: pointer;
  background: #F2F3F5;
}
.ck-photo:hover {
  border-color: #F53F3F;
}
/* 照片没取到（签名失败）时给个明确的破图态，别留一块空白让人以为加载中 */
.ck-photo-bad {
  background: repeating-linear-gradient(45deg, #F2F3F5, #F2F3F5 6px, #E8E9ED 6px, #E8E9ED 12px);
  border-style: dashed;
}
/* ---------- 照片灯箱（点缩略图看大图） ---------- */
.ck-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 14, 0);
  transition: background .16s ease;
  padding: 24px;
}
.ck-lb.on { background: rgba(8, 10, 14, .82); }
.ck-lb-box {
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: scale(.97);
  transition: transform .16s ease;
}
.ck-lb.on .ck-lb-box { transform: scale(1); }
.ck-lb-img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}
.ck-lb-bar { display: flex; gap: 10px; }
.ck-lb-bar .btn {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.ck-lb-bar .btn:hover { background: rgba(255, 255, 255, .26); }
/* 当日 BD 情况：一人一卡，一眼看清谁打了多少卡、覆盖多少店、时间跨度 */
.bd-sum {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.bd-sum-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 11px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.bd-sum-cell:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(225, 37, 27, .1); }
.bd-sum-cell.on {
  border-color: var(--brand);
  background: var(--brand-w);
  box-shadow: 0 0 0 2px rgba(225, 37, 27, .12) inset;
}
.bsc-on {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  vertical-align: 1px;
}
.bsc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bsc-v {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.bsc-v span { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.bsc-s, .bsc-t { margin-top: 3px; font-size: 12px; color: var(--text-3); }
.bsc-t { font-variant-numeric: tabular-nums; }
.bsc-bar { margin-top: 8px; height: 4px; border-radius: 2px; background: #ECEDF0; overflow: hidden; }
.bsc-bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }

/* ---------- 团队实时动态 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
  background: #eef0f3;
}
.lv-av-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
}
.lv-nm { vertical-align: middle; font-weight: 500; }
.lv-acts { display: flex; flex-direction: column; gap: 3px; }
.lv-act { display: flex; align-items: baseline; gap: 6px; font-size: 12px; line-height: 1.6; }
.lv-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; margin-top: 5px; }
.lv-at { color: #98A2B3; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.lv-k { flex: 0 0 auto; font-weight: 500; }
.lv-tx { color: #475467; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-green { color: #067647; }
.a-green.lv-dot { background: #12B76A; }
.a-blue { color: var(--brand-d); }
.a-blue.lv-dot { background: var(--brand); }
.a-orange { color: #b54708; }
.a-orange.lv-dot { background: #F79009; }

/* ============================================================
   v3 新增：结构组件（红色基准）
   ============================================================ */

/* ---------- 顶部概览条：一屏内拿到最关键的门店盘子 ---------- */
.ov-strip {
  display: flex; flex-wrap: wrap; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); overflow: hidden;
}
.ov-cell { flex: 1 1 132px; min-width: 118px; padding: 12px 16px; border-right: 1px solid var(--line-2); }
.ov-cell:last-child { border-right: 0; }
.ov-cell.lead { background: linear-gradient(135deg, #FFF6F4, #FFFFFF 70%); }
.ov-k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.ov-v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.25; }
.ov-v small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.ov-s { font-size: 11.5px; color: var(--text-3); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.ov-cell.lead .ov-v { color: var(--brand-d); }

/* ---------- 可折叠分区（大盘 / 长页面用） ---------- */
.dash-sec.foldable { cursor: pointer; user-select: none; padding: 4px 0; }
.dash-sec.foldable:hover { color: var(--brand-d); }
.dash-sec .fold-ico {
  margin-left: 2px; color: var(--text-3); font-size: 11px; font-weight: 500;
  transition: transform .18s ease; display: inline-block;
}
.dash-sec.closed .fold-ico { transform: rotate(-90deg); }
.dash-sec .fold-n {
  font-size: 11px; font-weight: 500; color: var(--text-3); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; line-height: 1.7;
}

/* ---------- 顶部页签式分段控件（替代散落的小按钮） ---------- */
.seg-tabs {
  display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--r); flex-wrap: wrap;
}
.seg-tabs button {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font-size: 12.5px; padding: 4px 12px; border-radius: var(--r-sm); transition: .14s; white-space: nowrap;
}
.seg-tabs button:hover { color: var(--brand-d); }
.seg-tabs button.on { background: var(--surface); color: var(--brand-d); font-weight: 600; box-shadow: var(--sh-1); }

/* ---------- 提示条 ---------- */
.hint-bar {
  display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.6;
  background: var(--brand-w); border: 1px solid var(--brand-bd); color: #8A1A12;
  border-radius: var(--r); padding: 9px 12px;
}
.hint-bar b { color: var(--brand-d); }
.hint-bar.warn { background: var(--warn-w); border-color: #FBD9A8; color: #7A4A00; }
.hint-bar.plain { background: var(--surface-2); border-color: var(--line-2); color: var(--text-2); }

/* ---------- 表格：长文本列自动收窄 + 关键列强调 ---------- */
table.tbl td.tight, table.tbl th.tight { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.tbl th.sortable { cursor: pointer; user-select: none; }
table.tbl th.sortable:hover { color: var(--brand-d); }
table.tbl tbody tr:nth-child(even) { background: #fcfcfd; }
table.tbl tbody tr:nth-child(even):hover { background: #f8fafd; }
.zebra-off table.tbl tbody tr:nth-child(even) { background: transparent; }

/* ---------- 侧栏：选中项左侧红条 ---------- */
.nav-item { position: relative; }
.nav-item.on::before {
  content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}

/* ---------- 卡片标题栏：允许折叠交互 ---------- */
.card-hd.clickable { cursor: pointer; user-select: none; }
.card-hd.clickable:hover h3 { color: var(--brand-d); }
.card-hd .hd-fold { color: var(--text-3); font-size: 11px; margin-left: 8px; transition: transform .18s ease; display: inline-block; }
.card-hd.closed .hd-fold { transform: rotate(-90deg); }

/* ---------- 空态升级 ---------- */
.empty.tall { padding: 64px 20px; }
.empty .e-ico { font-size: 26px; opacity: .5; display: block; margin-bottom: 8px; }

/* ==========================================================================
   v4 精修（2026-10-19）——目标：简洁、清晰、耐看
   --------------------------------------------------------------------------
   只做视觉层收口，不动任何类名与布局骨架：
   · 侧栏/顶栏去掉多余层次，让「内容」而不是「容器」占视觉
   · 卡片改细描边、去阴影，表格行高与字号统一，长表格更好扫
   · KPI 去掉顶部彩色横条，改「数字主导 + 小字标签」，一屏能看更多
   ========================================================================== */

/* ★ 2026-11-06：这里原来有第二个 :root，把 --bg/--line/--r-lg/--sh-* 全部覆盖一遍，
   同一变量存在两套真值（改一处忘一处）。已把生效值合并回文件顶部的唯一 :root。 */

/* ---------- 侧栏 ---------- */
.shell { grid-template-columns: 226px 1fr; }
.side { padding: 14px 10px 10px; border-right: 1px solid var(--line); }
.side-brand { padding: 0 8px 14px; font-size: 15px; letter-spacing: .01em; }
.nav { gap: 1px; }
.nav-item {
  height: 36px; padding: 0 10px; border-radius: 8px;
  font-size: 13.5px; gap: 10px;
}
.nav-item:hover { background: #F6F7F9; }
.nav-item.on { background: var(--brand-w); color: var(--brand-d); font-weight: 600; }

/* ---------- 侧栏分段可折叠（25 个入口按段收起来） ---------- */
.nav-grp { display: grid; gap: 1px; }
.nav-grp-b { display: grid; gap: 1px; }
.nav-grp.is-fold .nav-grp-b { display: none; }
/* 段标题变成可点的行：原来只是行灰字，占位一样高却什么也不能做 */
.nav-sec {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 12px 10px 5px; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 11px; letter-spacing: .06em; color: var(--text-3); text-align: left;
}
.nav-sec:hover { color: var(--text-2); }
.nav-car {
  width: 6px; height: 6px; flex: 0 0 auto; margin-right: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease;
}
.nav-grp.is-fold .nav-car { transform: rotate(-45deg) translate(-1px, 1px); }
.nav-ver { opacity: .6; cursor: default; padding-top: 10px; }
.nav-item.on::before { left: -10px; top: 9px; bottom: 9px; width: 3px; }
.nav-sec { padding: 14px 10px 6px; font-size: 10.5px; letter-spacing: .08em; color: #9AA1B1; }

/* ---------- 侧栏三级菜单（2026-11-06）----------
   段(sec) → 组(nav-grp-h) → 页(nav-item.lv3)。
   组头是可点的行：点了直接落到它的 pid 页（原「批量操作 / 考核指标」），右侧小箭头只是视觉提示。 */
.nav-grp-h {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  cursor: pointer; text-align: left;
}
.nav-grp-h:hover { background: #F6F7F9; color: var(--text); }
.nav-grp-h.on { background: var(--brand-w); color: var(--brand-d); }
.nav-grp-h[data-noop] { cursor: default; }
.nav-grp-h[data-noop]:hover { background: none; color: var(--text-2); }
.nav-sub-car {
  margin-left: auto; width: 6px; height: 6px; flex: 0 0 auto;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); opacity: .4;
  transition: transform .15s ease, opacity .15s ease;
}
/* ★ 2026-11-07：多功能三级子组可折叠（默认折叠「店铺装修」）。
   箭头单独可点：点箭头只折叠子项，不触发组头跳转；折叠时箭头转为朝右。 */
.nav-sub-car[data-grp-fold] { cursor: pointer; padding: 6px; margin: -6px -4px -6px auto;
  width: 5px; height: 5px; box-sizing: content-box; }
.nav-sub-car[data-grp-fold]:hover { opacity: .85; }
.nav-sub-car.is-fold { transform: rotate(-45deg) translate(-1px, 1px); }
.nav-sub { display: grid; gap: 1px; }
.nav-sub.is-fold { display: none; }
/* 嵌套子组（店铺装修）的组头再缩进一级，弱化成小标题 */
.nav-grp-h.lv2 { padding-left: 22px; font-weight: 500; font-size: 12px; height: 30px; color: var(--text-3); }
.nav-grp-h.lv2 .nav-ico { width: 13px; height: 13px; opacity: .7; }
.nav-item.lv3 { height: 32px; padding-left: 26px; font-size: 12.5px; gap: 9px; color: var(--text-2); }
.nav-item.lv3 .nav-ico { width: 14px; height: 14px; opacity: .8; }
.nav-item.lv3.on::before { left: 8px; top: 8px; bottom: 8px; }
/* 子组内项（店铺装修 5 个功能）再深一级 */
.nav-item.lv4 { padding-left: 42px; font-size: 12px; }
.nav-item.lv4 .nav-ico { width: 13px; height: 13px; opacity: .65; }
.nav-item.lv4.on::before { left: 20px; }
.side-foot { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-2); }

/* ---------- 顶栏 / 内容区 ---------- */
.topbar { padding: 14px 24px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 17px; letter-spacing: -.01em; }
.topbar p { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.view { padding: 20px 24px 56px; }
.view > .stack { gap: 14px; }

/* ---------- 卡片：细描边 + 无阴影 ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: none;
  transition: box-shadow .16s ease, border-color .16s ease;
}
.card:hover { border-color: #E3E7EF; box-shadow: var(--sh-1); }
.card-hd { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-hd h3 { font-size: 14.5px; letter-spacing: -.005em; }
.card-hd p { font-size: 12px; color: var(--text-3); }
.card-bd { padding: 16px 18px; }


/* ---------- 表格：统一行高，表头更轻 ---------- */
table.tbl th {
  padding: 10px 12px; background: #fff; color: var(--text-3);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
/* 长店名/长备注原来没有上限，一行能撑到 2-3 倍高，表格扫不动。
   默认两行截断（需要完整的单元格用 .no-clamp 覆盖），省掉每页手写 max-width。 */
table.tbl td { max-width: 340px; }
table.tbl td.wrap-all, table.tbl td.no-clamp { max-width: none; white-space: normal; }
table.tbl td:not(.no-clamp) { overflow-wrap: anywhere; }
/* ★ 划店提报 / 围栏门店（csdata）：18 列，备注一长就竖排成一列字、整页被撑到几千像素。
   统一单行省略，全文放 td 的 title，鼠标悬停可看；操作列不裁。 */
table.tbl.cd-tbl td { max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.tbl.cd-tbl td:last-child { max-width: none; overflow: visible; }
table.tbl.cd-tbl td .pill { vertical-align: middle; }
table.tbl tbody tr:nth-child(even) { background: #FCFCFD; }
table.tbl tbody tr:hover { background: #F7F9FC; }
.tbl-wrap { border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---------- 工具条 / 筛选 ---------- */
.toolbar { padding: 12px 18px; gap: 8px; border-bottom: 1px solid var(--line-2); }
.filter-bar { padding: 12px 18px; gap: 10px 16px; border-bottom: 1px solid var(--line-2); }
.inp, .fgroup select, .fgroup input { border-radius: 8px; border-color: #E1E5EC; }
.btn { border-radius: var(--r); border-color: var(--line); }
.btn-sm { border-radius: 6px; }
.seg-tabs { background: #F5F6F8; border-color: var(--line); border-radius: 10px; }
.seg-tabs button { border-radius: 7px; }
.chip { border-radius: 8px; }
.pager { padding: 12px 18px; }
.pg { border-radius: 6px; }

/* ---------- 概览条 / 分区标题 ---------- */
.ov-strip { border-radius: var(--r-lg); box-shadow: none; }
.ov-cell { padding: 13px 16px; }
.ov-v { font-size: 21px; }
.dash-sec { font-size: 14px; letter-spacing: -.005em; margin: 10px 0 2px; }
.dash-sec::before { width: 3px; height: 14px; border-radius: 2px; }

/* ---------- 弹层 ---------- */
.modal { border-radius: 14px; }
.modal-hd { padding: 16px 18px; }
.modal-bd { padding: 16px 18px; }
.modal-ft { padding: 13px 18px; }
.hint-bar { border-radius: 8px; }

/* ---------- 侧栏底部版本号：一眼确认是不是新包 ---------- */
.side-meta { font-size: 11px; color: #A0A7B6; padding: 6px 8px 2px; }

/* ============================================================
   2026-10-19e：账号权限 UI + 滚动修复
   ============================================================ */

/* —— 账号编辑：可访问模块勾选 —— */
.perm-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fafbfc; }
.perm-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.perm-hd .small { flex: 1 1 180px; min-width: 0; }
.perm-sec { font-size: 11.5px; color: var(--text-3); margin: 10px 0 6px; letter-spacing: .04em; }
/* 三级权限分组标题（与侧栏的三级菜单同构） */
.perm-sub { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 6px; }
.perm-chip {
  justify-content: flex-start; padding: 7px 10px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; border-radius: 8px;
}
.perm-chip:hover { border-color: var(--brand-bd); background: var(--brand-w); }
.perm-chip input { margin: 0 4px 0 0; flex: 0 0 auto; }

/* —— 滚动修复 ——
   1) 移动端 100vh 是「大视口」高度（含地址栏/工具栏），实际可视更矮，
      滚到底会像被截断；100dvh 取真实可视高度。
   2) 桌面继续让 .view 内部滚动；窄屏改成整页滚动（body 滚），触屏最稳，
      避免 iOS 上「嵌套 overflow 容器吞掉手势」导致的下拉无反应。
   3) 表格横向滚动容器不要抢纵向手势。 */
.shell { height: 100vh; height: 100dvh; }
/* ★ 根因修复：grid 默认行高是 max-content，侧栏 20 多项菜单加起来可能超过一屏，
   这一行就被撑高 → 主内容区跟着变高 → 底部滚到一半被 .shell 的 overflow:hidden 裁掉，
   表现就是「往下拉拉不动」。minmax(0,1fr) 把行高锁死在容器内，两侧各自滚动。 */
.shell { grid-template-rows: minmax(0, 1fr); }
.side, .main { min-height: 0; }
.view { overscroll-behavior-y: contain; }
.tbl-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

@media (max-width: 860px) {
  html, body { height: auto; }
  body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .shell { height: auto; min-height: 100dvh; overflow: visible; }
  /* ★ 2026-10-27：窄屏侧栏是 position:fixed（脱离网格），但后面 226px 1fr 那条
     同优先级规则写在更下面，把 @media 里的 1fr 覆盖掉了 → 主内容被塞进 226px 那一列，
     整页挤成一条 200px 宽的竖条（860px 窗口必现）。这里在文件末尾再压一次。 */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main { overflow: visible; }
  .view { overflow: visible; flex: none; min-height: 0; padding-bottom: 76px; }
  .side { height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
}

/* ==========================================================================
   仪表盘 KPI 行（2026-10-20）
   --------------------------------------------------------------------------
   之前 `.kpi-row` 这个类名根本没有样式，4 张 KPI 卡就竖着堆成 4 条大白长条，
   数字孤零零贴在左边（用户截图「这运营后台 UI 不行啊」）。
   现在统一成自适应网格：窄屏 2 列、宽屏 3~5 列，卡片带强调条 + 可选进度条。
   ========================================================================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.kpi-row > .kpi {
  padding: 12px 14px 13px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #fff, #fcfdff);
  border: 1px solid var(--line);
  box-shadow: none;
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.kpi-row > .kpi:hover { box-shadow: var(--sh-1); transform: translateY(-1px); border-color: #dbe3ef; }
.kpi-hd { display: flex; align-items: center; gap: 6px; }
.kpi-dot { width: 6px; height: 6px; border-radius: 50%; background: #c3cbd8; flex: none; }
.kpi.k-ok .kpi-dot { background: var(--ok); }
.kpi.k-warn .kpi-dot { background: var(--warn); }
.kpi.k-danger .kpi-dot { background: var(--danger); }
.kpi.k-core .kpi-dot { background: var(--brand); }
.kpi-row .kpi-t { font-size: 12px; color: var(--text-3); font-weight: 500; }
.kpi-tag {
  margin-left: auto; font-size: 11px; color: var(--text-3);
  background: var(--surface-2); border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.kpi-row .kpi-v { font-size: 27px; line-height: 1.15; margin-top: 3px; }
.kpi-bar { height: 4px; border-radius: 3px; background: #eef1f6; margin-top: 9px; overflow: hidden; }
.kpi-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .5s ease; }
.kpi.k-ok .kpi-bar > i { background: var(--ok); }
.kpi.k-warn .kpi-bar > i { background: var(--warn); }
.kpi.k-danger .kpi-bar > i { background: var(--danger); }
.kpi-row .kpi-s { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

/* 空状态：给一个圆形图标 + 主副文案，别再只有一行小灰字 */
.empty-card { padding: 46px 20px; text-align: center; }
.empty-ico {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-4); font-size: 20px;
}
.empty-t { font-size: 14px; color: var(--text-2); font-weight: 500; }
.empty-d { font-size: 12.5px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
.empty-d b { color: var(--brand); font-weight: 600; }

@media (max-width: 720px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-row .kpi-v { font-size: 23px; }
}

/* ============================================================
   拍照上菜单（views/menuai.js）
   —— BD 会拿手机拍，所以这里所有控件都按「手指能点到」做（>=38px），
      表格在窄屏可以横向滚，不允许把卡片撑破。
   ============================================================ */
.ma-steps {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0 16px; border-bottom: 1px dashed var(--line); margin-bottom: 14px;
}
.ma-step {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line);
}
.ma-step b {
  width: 18px; height: 18px; border-radius: 50%; background: #dfe3ec; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
.ma-step.on { background: #fdeceb; color: var(--brand); border-color: #f7c9c6; }
.ma-step.on b { background: var(--brand); }
.ma-arrow { color: var(--text-4); font-size: 12px; }

.ma-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.ma-lb { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ma-in {
  height: 36px; padding: 0 10px; font-size: 13px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none;
}
.ma-in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225, 37, 27, .08); }

.ma-drop {
  border: 1.5px dashed #d7dce6; border-radius: 12px; padding: 16px;
  text-align: center; background: #fbfcfe; transition: .15s;
  margin-bottom: 10px;
}
.ma-drop2 { padding: 12px; }
.ma-drop.over { border-color: var(--brand); background: #fdf3f2; }
.ma-drop-t { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ma-drop-btns { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }

/* 「AI 自动识别」：和拍照/选图并排，但要一眼看出它是不一样的那个动作
   （2026-10-20 用户要求：菜单图那里要能直接 AI 识别，不用往下翻找按钮） */
.ma-ocr-btn {
  border-color: #cfd8ff; background: #f3f5ff; color: #2b3ea8;
  box-shadow: 0 1px 2px rgba(43, 62, 168, .08);
}
.ma-ocr-btn:hover { background: #e9edff; border-color: #b9c5ff; }
.ma-ocr-btn.none { opacity: .55; }
.ma-ocr-tip { margin-top: 8px; }

.ma-shots { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.ma-shot {
  position: relative; width: 108px; height: 108px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #f2f4f7;
}
.ma-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-shot.dish { box-shadow: inset 0 0 0 2px #cfe8d6; }
.ma-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; line-height: 1;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ma-tag {
  position: absolute; left: 0; bottom: 0; right: 0; font-size: 10.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); padding: 8px 5px 3px; text-align: center;
}

.ma-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ma-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ma-count { margin-left: auto; font-size: 12.5px; color: var(--text-2); }
.ma-count b { color: var(--brand); }

.ma-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.ma-tbl { width: 100%; border-collapse: collapse; min-width: 900px; font-size: 12.5px; }
.ma-tbl th {
  background: var(--surface-2); font-weight: 600; color: var(--text-2);
  padding: 8px 6px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line);
}
.ma-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.ma-tbl tr:last-child td { border-bottom: 0; }
.ma-c { text-align: center; color: var(--text-3); }
.ma-cell {
  width: 100%; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  font-size: 12.5px; color: var(--text); background: transparent; outline: none;
}
.ma-cell:hover { border-color: var(--line); background: #fff; }
.ma-cell:focus { border-color: var(--brand); background: #fff; }
.ma-wide { min-width: 150px; }
.ma-num { width: 66px; text-align: right; }
.ma-sel { width: 108px; height: 32px; border-color: var(--line); background: #fff; }
/* 多规格：一格塞下「小份 ¥9.9 · 大份 ¥15.9」，点开可改（单规格仍是普通输入框） */
.ma-spec-btn {
  max-width: 168px; display: inline-block; padding: 4px 8px; border-radius: 6px;
  border: 1px dashed #d9dde6; background: var(--surface-2); color: var(--text-2);
  font-size: 11.5px; line-height: 1.35; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.ma-spec-btn:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
/* AI 认出来的类目属性：挂在菜名下面一行小字，不占列 */
.ma-attr-tip {
  font-size: 10.5px; color: var(--text-3); margin: 1px 0 0 4px; line-height: 1.3;
  max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ma-x {
  width: 24px; height: 24px; border: 0; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--text-4); font-size: 15px; line-height: 1;
}
.ma-x:hover { background: #fdeceb; color: var(--brand); }
.ma-imgurl { font-size: 10.5px; color: var(--success, #17803d); margin-top: 2px; }

.ma-empty { padding: 34px 10px; text-align: center; color: var(--text-3); font-size: 13px; }
.ma-tip {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); line-height: 1.75;
}
.ma-tip code {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 0 4px; font-size: 12px; color: var(--brand-d);
}
.ma-aistate {
  font-size: 12.5px; padding: 8px 10px; border-radius: 8px; margin-bottom: 10px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
}
.ma-aistate.ok { background: #eef8f1; border-color: #cfe8d6; color: #17803d; }
.ma-aistate.bad { background: #fff8ec; border-color: #f6e0b8; color: #a86612; }

/* ===== 导菜单：选来源的卡片 ===== */
.ma-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ma-mode {
  position: relative; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; transition: all .15s;
}
.ma-mode:hover { border-color: var(--brand-bd); background: #fffaf9; }
.ma-mode.on { border-color: var(--brand); background: var(--brand-w); box-shadow: 0 0 0 3px rgba(225, 37, 27, .08); }
.ma-mode-t { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.ma-mode.on .ma-mode-t { color: var(--brand-d); }
.ma-mode-d { font-size: 12px; color: var(--text-3); line-height: 1.55; }
.ma-mode-tag {
  position: absolute; top: 9px; right: 10px; font-size: 10.5px; padding: 1px 6px;
  border-radius: 20px; background: var(--brand); color: #fff; font-weight: 600;
}
.ma-mode.on .ma-mode-tag { background: var(--brand-d); }
.ma-panel { margin-top: 14px; }
.ma-pick-hint {
  padding: 26px 10px; text-align: center; color: var(--text-3); font-size: 13px;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2);
}

/* ===== 导菜单：登录态抓取面板 ===== */
.ma-live { display: block; }
.ma-live-t { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ma-bm {
  display: inline-block; padding: 9px 18px; border-radius: 8px; cursor: grab;
  background: var(--brand-grad); color: #fff; font-size: 13.5px; font-weight: 600;
  text-decoration: none; box-shadow: var(--brand-shadow); user-select: none;
}
.ma-bm:active { cursor: grabbing; }
.ma-bm:visited { color: #fff; }
.ma-paste {
  width: 100%; box-sizing: border-box; height: 74px; margin-top: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; font: 12px/1.5 ui-monospace, monospace;
  color: var(--text-2); resize: vertical; background: var(--surface-2);
}
.ma-paste:focus { outline: 0; border-color: var(--brand); background: #fff; }

/* ===== 导菜单：分类汇总 / 目标店状态 ===== */
.ma-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ma-cat {
  font-size: 12px; padding: 2px 8px; border-radius: 20px;
  background: var(--brand-w); border: 1px solid var(--brand-bd); color: var(--brand-d);
}
.ma-cat i { font-style: normal; opacity: .65; margin-left: 5px; }
.ma-tstate { display: block; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.ma-tstate.warn { color: #a86612; }
.ma-tstate.ok { color: #17803d; }
.ma-tstate b { color: inherit; }
.ma-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.ma-chk input { width: 14px; height: 14px; accent-color: var(--brand); }

/* ===== 导菜单：差异计划 ===== */
.ma-planwrap { margin-top: 14px; }
.ma-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.ma-stat {
  padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
}
.ma-stat.hi { background: var(--brand-w); border-color: var(--brand-bd); }
.ma-stat.ok { background: #eef8f1; border-color: #cfe8d6; }
.ma-stat .v { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.15; }
.ma-stat.hi .v { color: var(--brand); }
.ma-stat.ok .v { color: #17803d; }
.ma-stat .l { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ma-subtabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ma-subtab {
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.ma-subtab.on { background: var(--brand-w); border-color: var(--brand-bd); color: var(--brand-d); font-weight: 600; }
.ma-planbody { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.ma-pcat {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1;
}
.ma-pcat .nm { font-size: 13px; font-weight: 600; color: var(--text); }
.ma-pcat .b { font-size: 11.5px; padding: 1px 7px; border-radius: 4px; }
.ma-pcat .b.new { background: var(--brand-w); color: var(--brand-d); }
.ma-pcat .b.old { background: #eef2f7; color: var(--text-3); }
.ma-prow {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  border-bottom: 1px solid var(--line-2); font-size: 12.5px;
}
.ma-prow:last-child { border-bottom: 0; }
.ma-prow .nm { flex: 1; color: var(--text); }
.ma-prow .nm i { font-style: normal; font-size: 11px; color: var(--brand); margin-left: 6px; }
.ma-prow .sp { width: 78px; color: var(--text-3); }
.ma-prow .pr { width: 108px; text-align: right; color: var(--text-2); }
.ma-prow .pr s { color: var(--text-4); font-size: 11.5px; }
.ma-prow .pr b { color: var(--brand); }
.ma-prow .st { width: 66px; text-align: right; }
.ma-prow .badge { font-size: 11px; padding: 1px 7px; border-radius: 4px; }
.ma-prow .badge.new { background: var(--brand-w); color: var(--brand-d); }
.ma-prow .badge.upd { background: #fff8ec; color: #a86612; }
.ma-prow .badge.dup { background: #eef2f7; color: var(--text-3); }

@media (max-width: 980px) {
  .ma-modes { grid-template-columns: repeat(2, 1fr); }
  .ma-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .ma-drop { padding: 12px; }
  .ma-shot { width: 86px; height: 86px; }
  .ma-actions .btn, .ma-tools .btn { flex: 1 1 auto; }
  .ma-in { flex: 1 1 120px; width: auto !important; }
  .ma-modes { grid-template-columns: 1fr; }
  .ma-prow .sp { display: none; }
}

/* ---------- 导菜单 · 平台搬店（全自动） ---------- */
.ma-auto{display:block}
.ma-auto-grid{display:grid;grid-template-columns:96px 1fr;gap:12px 14px;align-items:center;max-width:720px}
.ma-auto-lb{font-size:13px;color:var(--text-2,#666);text-align:right;font-weight:600}
.ma-auto-ctl{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ma-sel{height:34px;padding:0 10px;border:1px solid var(--line,#e3e5e9);border-radius:8px;background:#fff;font-size:13px;color:inherit;min-width:110px}
.ma-sel-w{min-width:240px;flex:1 1 240px;max-width:340px}
.ma-runlog{margin-top:14px;max-height:240px;overflow:auto;background:var(--bg-2,#f7f8fa);border:1px solid var(--line,#e3e5e9);border-radius:10px;padding:10px 12px;font-size:12.5px;line-height:1.9;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.ma-runlog:empty{display:none}
.ma-runlog-i{color:#4a5160;white-space:pre-wrap;word-break:break-all}
.ma-runlog-i.err{color:#d4380d}
@media (max-width:720px){
  .ma-auto-grid{grid-template-columns:1fr}
  .ma-auto-lb{text-align:left}
  .ma-sel-w{max-width:none}
}

/* ---------- 导菜单 · 门店选择器（可搜） ---------- */
.ma-pick{position:relative;display:inline-block;flex:1 1 240px;min-width:240px;max-width:340px}
.ma-pick-in{width:100%;height:34px;padding:0 26px 0 10px;box-sizing:border-box;text-overflow:ellipsis}
.ma-pick-in:disabled{background:var(--bg-2,#f7f8fa);color:var(--text-2,#999)}
.ma-pick-ar{position:absolute;right:9px;top:50%;transform:translateY(-50%);font-size:10px;color:var(--text-2,#9aa0aa);pointer-events:none}
.ma-pick-pop{position:absolute;z-index:80;left:0;top:calc(100% + 4px);width:100%;max-height:290px;overflow:auto;background:#fff;border:1px solid var(--line,#e3e5e9);border-radius:10px;box-shadow:0 14px 34px rgba(16,24,40,.14);padding:4px}
.ma-pick-o{display:block;padding:7px 9px;border-radius:7px;cursor:pointer;font-size:13px;line-height:1.4}
/* 第一行：门店名（主）+ 门店ID + 掉线标；商家名换到第二行，
   否则 360px 宽的下拉里两段长中文互相挤压，门店名反而被截成「越南河粉（中嘉…」 */
.ma-pick-l{display:flex;align-items:baseline;gap:8px}
.ma-pick-o:hover{background:#f4f6fa}
.ma-pick-o i{font-style:normal;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ma-pick-o em{font-style:normal;color:#9aa0aa;font-size:11px;font-variant-numeric:tabular-nums}
/* 商家名：京东一个商家号下可挂多个门店，门店名才是用户认识的那个名字，
   商家名退成第二行小字（灰、可截断），不抢主标题 */
.ma-pick-v{display:block;margin-top:1px;padding-left:0;font-size:11px;line-height:1.3;color:#8b93a1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 已掉线的店：名字变灰 + 红标「掉线」。不藏起来 —— 藏了会让人以为这家没登过 */
.ma-pick-o.is-dead i{color:#98a1ad}
.ma-dead-tag{flex:none;font-style:normal;font-weight:600;font-size:10px;line-height:1;padding:3px 5px;border-radius:4px;color:#d4380d;background:#fff1ee;border:1px solid #ffd6cc;cursor:pointer}
/* 点「掉线」= 直接去重登（菜单页 2026-10-27）：hover 给个明确的可点反馈 */
.ma-dead-tag:hover{background:#d4380d;color:#fff;border-color:#d4380d}
.ma-pick-none{padding:12px 8px;color:#9aa0aa;font-size:12px;text-align:center}

/* ---------- 导菜单 · 店铺导入进度 / 明细 ---------- */
.ma-job-wrap{margin-top:14px}
.ma-job{border:1px solid var(--line,#e3e5e9);border-radius:12px;padding:12px 14px;background:#fff}
.ma-job-empty{border:1px dashed var(--line,#e3e5e9);border-radius:12px;padding:14px;color:var(--text-2,#8b93a1);font-size:12.5px;text-align:center}
.ma-job-hd{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13.5px}
.ma-job-hd b{font-weight:700}
.ma-job-hd em{font-style:normal;color:#9aa0aa;font-size:11.5px;font-variant-numeric:tabular-nums}
.ma-job-at{margin-left:auto;color:#9aa0aa;font-size:11.5px}
.ma-jb{font-size:11px;padding:1px 7px;border-radius:20px;background:#eef1f5;color:#5a6273}
.ma-jb.ok{background:#e8f7ee;color:#1a7f45}
.ma-jb.err{background:#fdeceb;color:#c0392b}
.ma-jb.warn{background:#fff4e5;color:#a35a00}
.ma-jb.run{background:#e8f0ff;color:#1a4fbf}
.ma-bar{height:8px;border-radius:20px;background:#eef1f5;margin:9px 0 8px;overflow:hidden}
.ma-bar i{display:block;height:100%;border-radius:20px;background:var(--brand,#E1251B);transition:width .45s ease}
.ma-bar i.run{background:linear-gradient(90deg,#E1251B,#ff7a45)}
.ma-bar i.err{background:#c0392b}
/* 拍照识别的进度条：复用上面 .ma-bar 那条 8px 圆角条，这里只补留白/文案/成功绿。
 * 识别中按时间估算平滑走，只有真拿到结果才 100%；失败/生图中断停在当前刻度变红。 */
.ma-prog{margin:12px 0 4px;max-width:720px}
.ma-prog .ma-bar{margin:0 0 6px}
.ma-prog-t{font-size:12px;color:var(--text-2);font-variant-numeric:tabular-nums}
.ma-prog.err .ma-prog-t{color:#c0392b}
.ma-prog .ma-bar i.ok{background:#1a7f45}
/* 拍照识别顶部的「导到这家店」：单列，别占用 live 那条五列网格的列宽。
 * ★ 2026-10-26 用户截图：门店下拉被挤成 ~40px 只显示半截 ID。根因是这里写成单类选择器
 *   且排在 .ma-row1 前面 —— 同优先级后者赢，实际仍是五列网格，pick 落进一列 40px 的窄格。
 *   修法：选择器提到 0,2,0（两个类），与顺序无关；再给 pick 一个可读下限。 */
.ma-row1.ma-row1-dst{grid-template-columns:minmax(0,1fr);max-width:560px;margin-bottom:12px}
/* .ma-slot-ctl .ma-pick 有 min-width:0（0,2,0），这里用 0,3,0 压住，否则还能被压到 0 宽 */
.ma-row1-dst .ma-slot-ctl .ma-pick{min-width:220px}
.ma-dst-none{margin:-4px 0 10px}
/* 拍照识别后的主 CTA：识别完直接把「建进京东」摆在眼前（原来藏在高级设置里，
 * 用户对着 22 个菜不知道下一步点哪）。红框浅底，和 primary 按钮同一主色。 */
.ma-cta{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin:16px 0 2px;padding:12px 14px;border:1px solid #f6d5d2;border-radius:12px;background:#fff7f6;
}
.ma-cta-t{font-size:13px;color:#7a2a24}
.ma-cta-t b{font-size:16px;color:#e1251b;font-variant-numeric:tabular-nums;margin:0 2px}
.ma-cta-btn{height:38px;padding:0 18px;font-weight:600}
.ma-cta-sub{font-size:12px;color:var(--text-3)}
.ma-job-sum{display:flex;gap:14px;align-items:center;font-size:12.5px;flex-wrap:wrap}
.ma-job-sum .ok{color:#1a7f45}
.ma-job-sum .dup{color:#8b93a1}
.ma-job-sum .err{color:#c0392b}
.ma-job-stage{margin-left:auto;color:var(--text-2,#8b93a1);font-size:12px}
.ma-job-list{margin-top:10px;max-height:280px;overflow:auto;border-top:1px dashed var(--line,#eceff3);padding-top:6px}
.ma-jrow{display:flex;gap:8px;align-items:baseline;font-size:12.5px;line-height:1.9;border-bottom:1px solid #f5f6f8}
.ma-jrow .t{flex:0 0 34px;font-size:11px;text-align:center;border-radius:5px;padding:0 4px}
.ma-jrow.ok .t{background:#e8f7ee;color:#1a7f45}
.ma-jrow.dup .t{background:#eef1f5;color:#6b7280}
.ma-jrow.err .t{background:#fdeceb;color:#c0392b}
.ma-jrow .c{flex:0 0 96px;color:#8b93a1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ma-jrow .n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ma-jrow .p{flex:0 0 62px;text-align:right;font-variant-numeric:tabular-nums;color:#4a5160}
.ma-jrow .w{flex:0 0 130px;color:#a35a00;font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ma-job-more{text-align:center;color:#9aa0aa;font-size:12px;padding:8px 0}


/* ---------------- 需求提报：紧凑表格（2026-10-20） ----------------
   用户反馈「一页就能看到几个 后面都是空白」——
   原来一条提报一张大卡片，四五行高度。改成一行一条的表格，
   一屏能看十几条；内容列最多两行，超出省略。 */
table.rq-tbl th { white-space: nowrap; background: #FAFBFC; }
table.rq-tbl td { padding: 8px 12px; vertical-align: top; }
table.rq-tbl tbody tr:hover { background: #FFF9F8; }
.rq-clip {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.45; word-break: break-word;
}

/* ★ 2026-10-28 用户：「没显示提报的项目」「这个图片点不开，而且做直接显示，
   点过去可以放大，点一下也可以单独跳转照片」。
   内容列从 2 行放宽到 3 行（再长就悬停看 title）；
   图片从「一串灰色 URL」改成缩略图墙，点开走灯箱。 */
.rq-body {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5; word-break: break-word; min-width: 200px; max-width: 420px;
}
.rq-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-thumb {
  display: block; width: 92px; height: 92px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #F7F8FA; cursor: zoom-in; position: relative;
}
.rq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 图片真地址还在取（photo:<id> 走 RPC）时的占位文字 */
.rq-thumb .rq-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-3); text-align: center; padding: 6px;
}
.rq-thumb:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(225, 37, 27, .18); }
.rq-thumb.bad {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-3); padding: 6px; text-align: center;
}

/* 图片灯箱：点缩略图看大图，图里再点「新窗口打开」拿原图 */
.rq-lb {
  position: fixed; inset: 0; z-index: 9998; background: rgba(12, 14, 18, .88);
  display: flex; align-items: center; justify-content: center; padding: 32px;
  animation: rqLbIn .16s ease-out;
}
@keyframes rqLbIn { from { opacity: 0 } to { opacity: 1 } }
.rq-lb img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 12px 48px rgba(0, 0, 0, .55); }
.rq-lb-bar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 10px; }
.rq-lb-bar .btn { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.rq-lb-bar .btn:hover { background: rgba(255, 255, 255, .24); }
.rq-lb-x {
  position: absolute; right: 20px; top: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.rq-lb-x:hover { background: rgba(255, 255, 255, .3); }

/* 任务中心明细照片缩略图（2026-10-28：点开弹大图） */
.tk-ph {
  display: inline-block; width: 46px; height: 46px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); background: #F7F8FA; cursor: zoom-in; padding: 0; margin: 2px;
  vertical-align: middle;
}
.tk-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-ph:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(225, 37, 27, .2); }

/* ====== 财务管理（2026-10-21） ====== */
.kpi-mini {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #FAFBFC; min-width: 128px;
}
.km-k { font-size: 11px; color: var(--text-3); }
.km-v { font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.fin-check {
  font-size: 12px; padding: 8px 12px; border-radius: 8px; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.fin-check.ok { background: #ECFDF3; color: #067647; border: 1px solid #ABEFC6; }
.fin-check.warn { background: #FFFAEB; color: #B54708; border: 1px solid #FEDF89; }

.fin-unmatched { border: 1px dashed #E1E5EC; border-radius: 10px; padding: 10px 12px; }
.fu-t { font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.fu-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid #F2F3F5; }
.fu-n { font-size: 13px; min-width: 220px; }
.fu-s { font-size: 11px; color: var(--text-3); margin-left: 8px; }
.fu-row .inp { max-width: 210px; }

/* 月度规则表（2026-10-21）：一行一个 BD，输入框收窄，应发列加底色 */
.fin-rule-tbl td { vertical-align: middle; }
.fin-rule-tbl .inp { padding: 4px 6px; font-size: 13px; text-align: right; }
.fin-rule-tbl .fr-total b { color: #E1251B; font-size: 14px; font-variant-numeric: tabular-nums; }
.fin-rule-tbl tbody tr:hover { background: #FAFBFC; }

/* 2026-10-21：月度规则「应发」列 —— 没设置规则的 BD 不显示数字，避免拿默认 100% 的假数糊人 */
.fr-none { color: #C0C4CC; font-size: 12px; }
.fr-est {
  display: inline-block; margin-right: 4px; padding: 0 4px;
  font-size: 10px; line-height: 15px; color: #B26A00;
  background: #FFF7E8; border: 1px solid #FFE0A3; border-radius: 4px;
  vertical-align: middle;
}

/* ---------- 语音提醒（顶栏 chip + 超时角标，见 assets/voice.js） ---------- */
.vt-chip { white-space: nowrap; }
.vt-chip.warn { border-color: #f0b429; background: #FFF8E6; color: #8a5a00; }
.vt-chip.warn:hover { border-color: #d99b12; }
.vt-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 2px;
  border-radius: 999px; background: #E1251B; color: #fff;
  font-size: 10.5px; font-weight: 600; line-height: 1;
}
.vt-dot.warn { background: #D98300; }

/* ==========================================================================
   导菜单 · 简化版（2026-10-24）
   --------------------------------------------------------------------------
   目标：首屏只有「两个下拉 + 一个按钮 + 一行结果」，其余全部下沉。
   骨架：.ma-hero（主操作带）→ #ma-result（结果条）→ .ma-fold（高级设置，一条横杠）
   命名全部 ma- 前缀，只新增、不覆盖上面的既有类（.ma-pick / .ma-tbl 沿用）。
   ========================================================================== */

/* ---------- 主操作带 ---------- */
.ma-hero .card-bd { padding: 14px 18px 16px; }
.ma-seg {
  display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 14px;
  background: var(--surface-2); border-radius: 999px;
}
.ma-seg-b {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font-size: 13px; padding: 5px 15px; border-radius: 999px; transition: .14s;
}
.ma-seg-b:hover { color: var(--brand-d); }
.ma-seg-b.on { background: var(--surface); color: var(--brand-d); font-weight: 600; box-shadow: var(--sh-1); }

/* ---------- 一键预设（淘宝闪购 → 京东 / 美团 → 京东）----------
 * 2026-11-05：来源平台默认是美团，想搬淘宝的人得自己去改下拉，容易漏。
 * 两个胶囊直接切好源/目标平台；没有该平台登录态时按钮仍可点，但会提示去登录。 */
.ma-preset {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.ma-preset-lb { font-size: 12px; color: var(--text-3); }
.ma-pre {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-size: 12.5px; padding: 4px 12px; border-radius: 999px; cursor: pointer; transition: .14s;
}
.ma-pre:hover { border-color: var(--brand); color: var(--brand-d); }
.ma-pre.on { border-color: var(--brand); background: rgba(225, 37, 27, .07); color: var(--brand-d); font-weight: 600; }
.ma-pre-x {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 4px;
  background: #F3F4F6; color: var(--text-3); font-size: 10px; font-weight: 400;
}

/* 主操作带用网格而不是 flex：列宽固定，「开始搬店」不会被下拉内容或提示换行挤动。
 * 2026-10-24 设计师走查 F1（P0）：空态按钮垂直位移 88px、有数据态右侧留白 174px，都是 flex 按内容算宽高的后果。
 * 2026-10-27 修：模板原来写了 5 列（… 12px 200px），但 .ma-row1 里只有 4 个子元素，
 * 于是「开始搬店」落进了那个 12px 的占位列 → 200px 的按钮溢出、批量多店被压成竖排单字。
 * 去掉占位列，按钮列固定 200px，按钮吃满整列。 */
.ma-row1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 188px;
  align-items: end;
  column-gap: 12px;
}
.ma-slot { min-width: 0; }
.ma-slot-lb { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.ma-slot-ctl { display: flex; gap: 8px; align-items: center; }
/* 主操作带里的店铺选择器要吃掉剩余宽度（默认 .ma-pick 限了 240~340） */
.ma-slot-ctl .ma-pick { flex: 1 1 auto; min-width: 0; max-width: none; }
.ma-slot-ctl .ma-pick-in { height: 40px; }
.ma-sel-xs { width: 76px; height: 40px; flex: none; padding: 0 6px; }
.ma-ar1 { flex: none; color: var(--text-3); font-size: 17px; padding-bottom: 11px; }
.ma-go { flex: none; align-self: end; }
.ma-run-btn { width: 100%; height: 40px; font-size: 14px; font-weight: 600; }
/* 卡头里的「批量多店 →」靠右，和模式胶囊排在一起。
 * 两个都带 margin-left:auto 会把空白对半分（按钮飘到中间）→ 有按钮时胶囊交还 auto。 */
.ma-hd .ma-chtog { margin-left: auto; flex: none; white-space: nowrap; }
.ma-hd .ma-chtog + .ma-seg { margin-left: 0; }

.ma-line { height: 1px; background: var(--line); margin: 14px 0 0; }
.ma-row2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; font-size: 12.5px; }
.ma-p { color: var(--text-2); }
.ma-p-hint { margin-left: auto; color: var(--text-3); }
.ma-in-xs { width: 68px; height: 28px; padding: 0 8px; }
.ma-chip {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  font-size: 12px; padding: 2px 9px; border-radius: 999px; cursor: pointer; transition: .14s;
}
.ma-chip:hover { border-color: var(--brand-bd); color: var(--brand-d); background: var(--brand-w); }

/* ---------- 批量搬店（一次导多个菜单）----------
 * 每条 = 一个 源店 → 目标店。和主操作带同一套控件，只是缩到 32px 高排成一行。
 * 列宽固定，跑的时候只有最右状态格在变 → 行不会因为状态文字长短左右跳。 */
.ma-batch { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); padding: 12px 12px 10px; }
.ma-bhd { display: flex; align-items: baseline; gap: 8px; }
.ma-bhd b { font-size: 13.5px; }
.ma-bsub { font-size: 12px; color: var(--text-3); }
.ma-bhd .ma-chtog { margin-left: auto; }
.ma-chtog { border: 0; background: none; color: var(--brand-d); font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: var(--r-sm); }
.ma-chtog:hover { background: var(--brand-w); }
.ma-chtog:disabled { color: var(--text-3); cursor: not-allowed; background: none; }
.ma-blist { display: flex; flex-direction: column; }
.ma-brow {
  display: grid;
  grid-template-columns: 22px 80px minmax(0, 1fr) 16px 80px minmax(0, 1fr) 132px 22px;
  align-items: center; column-gap: 8px;
  margin-top: 8px; padding: 6px 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
}
.ma-brow.is-run { border-color: var(--brand-bd); background: var(--brand-w); }
.ma-brow.is-fail { border-color: var(--danger); }
.ma-brow .ma-sel-xs { width: auto; height: 32px; font-size: 12.5px; }
.ma-brow .ma-pick { max-width: none; }
.ma-brow .ma-pick-in { height: 32px; font-size: 12.5px; }
.ma-bno { font-size: 12px; color: var(--text-3); text-align: center; }
.ma-brow .ma-bar { color: var(--text-3); font-size: 14px; text-align: center; }
.ma-bst { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-brow.is-ok .ma-bst { color: var(--ok); }
.ma-brow.is-run .ma-bst { color: var(--brand-d); }
.ma-brow.is-fail .ma-bst { color: var(--danger); }
.ma-bdel { border: 0; background: none; color: var(--text-3); font-size: 17px; line-height: 1; cursor: pointer; border-radius: var(--r-sm); padding: 0 2px; }
.ma-bdel:hover { color: var(--danger); background: var(--danger-w); }
.ma-bdel:disabled { color: var(--line); cursor: not-allowed; background: none; }
.ma-bnote { font-size: 12px; color: var(--text-3); padding: 3px 0 0 38px; }
.ma-bnote.err { color: var(--danger); }
.ma-bfoot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ma-bfoot .ma-run-btn { width: auto; min-width: 176px; padding: 0 18px; }
.ma-bp { font-size: 12px; color: var(--text-3); margin-left: auto; }
@media (max-width: 900px) {
  .ma-brow { grid-template-columns: 20px minmax(0, 1fr) 20px; row-gap: 6px; }
  .ma-brow .ma-bst { grid-column: 2 / 4; }
  .ma-bfoot { flex-wrap: wrap; }
  .ma-bp { margin-left: 0; }
}

/* ---------- 结果条 ---------- */
.ma-res-empty { font-size: 13px; color: var(--text-3); padding: 4px 2px 14px; }
.ma-res {
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: var(--r); padding: 12px 16px; margin: 12px 0 4px;
}
.ma-res.ok { border-color: #C8E6C9; background: #F6FBF7; }
.ma-res.warn { border-color: #FFE0B2; background: #FFFBF3; }
.ma-res.err { border-color: #FFCDD2; background: #FEF6F5; border-left: 3px solid var(--brand); }
.ma-res.run { border-color: #BBDEFB; background: #F6FAFF; }
.ma-res-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ma-res-ico { font-size: 13px; color: var(--text-2); }
.ma-res.ok .ma-res-ico { color: #1F8A4C; }
/* 有未完成项也要一眼分得出来：底色是浅黄、图标还挂默认灰的话，和"全成"几乎看不出差别
 * （PM 2026-10-25 实测两者底色只差几度色相）。三档图标三档颜色：绿✓ / 橙! / 红✗ */
.ma-res.warn .ma-res-ico { color: #B26A00; }
.ma-res.err .ma-res-ico { color: var(--brand); }
.ma-res-t { font-size: 14px; font-weight: 600; color: var(--text); }
.ma-res-nums { display: flex; gap: 10px; font-size: 13px; font-style: normal; }
/* em 自带 UA 的 italic，父级 font-style 压不住，必须落到 em 上 */
.ma-res-nums em { font-style: normal; }
.ma-res-nums .ok { color: #1F8A4C; font-weight: 600; }
.ma-res-nums .dup { color: #8A91A3; font-weight: 600; }
.ma-res-nums .err { color: #D93025; font-weight: 600; }
.ma-res-stage { font-size: 12px; color: var(--text-3); }
.ma-res-bar { margin-top: 10px; height: 3px; background: rgba(0, 0, 0, .06); border-radius: 2px; overflow: hidden; }
.ma-res-bar i { display: block; height: 100%; background: linear-gradient(90deg, #FF6A3D, #E1251B); transition: width .3s; }

/* ---------- 高级设置：一条横杠 + 内部平铺分区 ---------- */
.ma-fold { margin: 6px 0 0; }
.ma-fold-all { border-radius: var(--r); background: var(--surface-2); }
.ma-fold > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; font-size: 13px; color: var(--text-2); transition: .14s;
}
.ma-fold > summary::-webkit-details-marker { display: none; }
.ma-fold > summary:hover { color: var(--brand-d); }
.ma-fold-t { font-weight: 600; flex: none; }
.ma-fold-sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-fold-ico { margin-left: auto; flex: none; font-size: 11px; color: var(--text-3); font-style: normal; transition: transform .18s; }
.ma-fold[open] > summary { color: var(--brand-d); }
.ma-fold[open] .ma-fold-ico { transform: rotate(180deg); }
.ma-fold-bd {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px 18px;
}

/* 分区标题（① 来源与规则 / ② 菜品明细 / ③ 目标店 / 上次结果） */
.ma-flat-sec { margin-bottom: 20px; }
.ma-flat-sec:last-child { margin-bottom: 0; }
.ma-flat-t {
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line-2);
}

/* 备用通道进出 */
.ma-link { border: 0; background: none; padding: 0; color: var(--brand); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.ma-row-end { justify-content: space-between; margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.ma-danger-ghost { color: #C62828; border-color: #FFCDD2; background: var(--surface); }
.ma-danger-ghost:hover { background: #FEF6F5; border-color: #EF9A9A; }
.ma-back { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }

/* ---------- 失败明细（只在结果卡里，就地折叠） ---------- */
.ma-fails { margin-top: 10px; }
.ma-fails > summary { cursor: pointer; font-size: 12.5px; color: #D93025; }
.ma-job-list { margin-top: 8px; max-height: 260px; overflow: auto; }

/* ---------- 上次结果（只读一行摘要） ---------- */
.ma-job-ro { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); }
.ma-job-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.ma-job-hd b { color: var(--text); }
.ma-job-at { color: var(--text-3); font-size: 12px; }
.ma-job-sum2 { margin-left: auto; color: var(--text-2); font-size: 12.5px; }
.ma-job-why { margin-top: 6px; font-size: 12px; color: #5A6070; }

/* ---------- 清单表格：限高滚动 + 表头吸顶 + 失败行标记 ---------- */
.ma-tablewrap { max-height: 360px; overflow: auto; }
.ma-tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.ma-tbl tr.is-fail > td:first-child { color: #D93025; font-weight: 700; }
.ma-tbl tr.is-fail > td { background: #FFF8F7; }
.ma-has-img { color: #1F8A4C; font-weight: 700; }
.ma-no-img { color: #C9CDD6; }

/* ---------- 缺图：汇总行可点 → 明细筛出缺图行 ----------
 * 汇总「新建 42」只说明数量，不说明能不能卖。缺图的那几道建进去也只能下架，
 * 所以数字旁边必须有一个能点到行的入口（2026-10-24 设计师走查 P12）。 */
.ma-res-noimg {
  margin-left: 10px; padding: 2px 9px; height: 22px; line-height: 18px;
  border: 1px solid #F0C36D; border-radius: 11px; background: #FFF8E8;
  color: #8A5A00; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.ma-res-noimg:hover { background: #FFF1D2; border-color: #E0A93C; }
.ma-tbl-bar { padding: 7px 10px; font-size: 12px; color: var(--text-2); background: #FAFBFC; border-bottom: 1px solid var(--line); }
.ma-tbl-bar b { color: #8A5A00; }
.ma-tbl-bar .ma-link { font-size: 12px; margin-left: 6px; }
.ma-tablewrap.only-noimg .ma-tbl tr:not(.is-noimg) { display: none; }
.ma-tbl tr.is-noimg > td { background: #FFFBF2; }

/* 「重名」是第二种跳过：色相取蓝灰，和缺图的橙、失败的粉红都不撞 */
.ma-res-dup {
  margin-left: 6px; padding: 2px 9px; height: 22px; line-height: 18px;
  border: 1px solid #C7D2E4; border-radius: 11px; background: #F3F6FB;
  color: #40587C; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.ma-res-dup:hover { background: #E8EFF9; border-color: #A9BAD4; }
.ma-tbl-bar-dup { background: #F7F9FC; }
.ma-tbl-bar-dup b { color: #40587C; }
.ma-tablewrap.only-dupbatch .ma-tbl tr:not(.is-dupbatch) { display: none; }
.ma-tbl tr.is-dupbatch > td { background: #F7F9FC; }

/* ---------- 窄屏：两个下拉各占一行，按钮通栏 ---------- */
@media (max-width: 900px) {
  .ma-row1 { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .ma-slot { min-width: 0; }
  .ma-ar1 { display: none; }
  .ma-go { width: 100%; }
  .ma-run-btn { width: 100%; }
  .ma-p-hint { margin-left: 0; flex: 1 1 100%; }
  .ma-fold-sub { display: none; }
}

/* ===== 通话计时浮条（后台拨号后出现，挂断写时长） ===== */
.call-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 1200;
  display: flex; align-items: center; gap: 16px; background: #1D2129; color: #fff;
  border-radius: 14px; padding: 12px 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  min-width: 430px; max-width: 92vw;
}
.call-bar .cb-l { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.call-bar .cb-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ADE80; display: inline-block; flex: none; }
.call-bar .cb-t { font-size: 14px; font-weight: 700; color: #fff; }
.call-bar .cb-s { font-size: 12px; color: #A9AEB8; margin-top: 2px; }
.call-bar .cb-acts { display: flex; gap: 8px; flex: none; }
.call-bar .btn { border-color: transparent; }

/* ===== 拜访 / 通话时间线（商户详情） ===== */
.vt-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #EEF0F3; }
.vt-row:last-child { border-bottom: 0; }
.vt-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: #2E62FF; }
.vt-dot.admin { background: #D97A00; }
.vt-dot.call { background: #0E9384; }
.vt-dot.note { background: #86909C; }
.vt-main { flex: 1; min-width: 0; }
.vt-top { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #86909C; flex-wrap: wrap; }
.vt-who { color: #1D2129; font-weight: 600; }
.vt-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #EAF1FF; color: #2E62FF; }
.vt-tag.admin { background: #FFF3E0; color: #D97A00; }
.vt-tag.call { background: #E6F7F5; color: #0E9384; }
.vt-tag.note { background: #F2F3F5; color: #86909C; }
.vt-body { font-size: 12px; color: #4E5969; margin-top: 3px; white-space: pre-wrap; word-break: break-all; }
.vt-dur { font-size: 11px; color: #0E9384; background: #E6F7F5; border-radius: 4px; padding: 1px 6px; }
.vt-dur.miss { color: #86909C; background: #F2F3F5; }

/* ---------- 卡头（F5/F6：标题 + 一次性副标题 + 胶囊靠右） ---------- */
.ma-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ma-hd-t { font-size: 14px; font-weight: 700; color: var(--text); flex: none; }
.ma-hd-s {
  font-size: 12.5px; color: var(--text-3); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ma-hd .ma-seg { margin-bottom: 0; margin-left: auto; flex: none; }

/* ---------- 状态列：只读判定 chip（F12：原来是个骗人的下拉） ---------- */
.ma-st {
  display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11.5px;
  line-height: 17px; background: var(--surface-2, #f2f4f7); color: var(--text-2);
  white-space: nowrap;
}
.ma-st.ok { background: #EAF6EE; color: #1F8A4C; }
.ma-st.err { background: #FDECEA; color: #D93025; }
.ma-st.warn { background: #FFF6E5; color: #8A5A00; }
.ma-st.dup { background: #F0F4FB; color: #40587C; }

/* 四项之外的差额（其他 N）—— 中性灰，不抢红黄 */
.ma-res-nums .oth { color: #6B7280; font-weight: 600; }
.ma-fails-nodetail {
  padding: 8px 12px; font-size: 12px; color: #8A5A00;
  background: #FFF8E8; border-top: 1px solid #F0E0BE;
}

/* 危险区独立成行（F15） */
.ma-danger-row { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); text-align: right; }

/* 「其他 N」= 没提交成功的（名字空/价格≤0），色相用红灰，跟失败区分但不刺眼 */
.ma-res-oth {
  padding: 2px 9px; height: 22px; line-height: 18px; border-radius: 11px;
  border: 1px solid transparent; background: #F1F2F5; color: #8A91A3;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.ma-res-oth:hover { background: #E7E9EF; }
.ma-tbl-bar-oth { background: #F7F8FA; }
.ma-tbl-bar-t { color: var(--text-2); }
.ma-tbl-bar { display: flex; align-items: center; gap: 10px; }
.ma-tbl-bar-x { margin-left: auto; }
.ma-tablewrap.only-other .ma-tbl tr:not(.is-other) { display: none; }
.ma-tbl tr.is-other > td { background: #F7F8FA; }

/* ---------- 摘要四个分项全部可点（PM 第 3 条） ---------- */
.ma-res-num {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  border-bottom: 1px dashed transparent;
}
.ma-res-num.ok { color: #1F8A4C; }
.ma-res-num.err { color: #D93025; }
.ma-res-num:hover { border-bottom-color: currentColor; }

/* ---------- 跑前预检提示（价格空 / 菜名空） ---------- */
.ma-pre {
  margin-top: 12px; padding: 9px 12px; border-radius: 9px;
  background: #FFF8E8; border: 1px solid #F0E0BE; color: #8A5A00;
  font-size: 12.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ma-pre b { color: #A05E00; }
.ma-pre .ma-link { color: #A05E00; text-decoration: underline; font-size: 12.5px; }

.ma-tbl-bar-ok { background: #F3FAF5; }
.ma-tbl-bar-pre { background: #FFF8E8; }
.ma-tablewrap.only-pre .ma-tbl tr:not(.is-pre) { display: none; }
.ma-tablewrap.only-create .ma-tbl tr:not(.is-create) { display: none; }
.ma-tablewrap.only-fail .ma-tbl tr:not(.is-fail) { display: none; }
.ma-tbl tr.is-pre > td { background: #FFFBF0; }
.ma-tbl tr.is-create > td { background: #F6FBF7; }

/* ---------- 筛选 chip（一条横排，不再一类一行） ---------- */
.ma-tbl-chips {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 7px 10px;
  background: #FAFBFC; border-bottom: 1px solid var(--line);
}
.ma-fchip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  border-radius: 11px; padding: 2px 9px; font-size: 12px; font-family: inherit;
  cursor: pointer; line-height: 17px;
}
.ma-fchip:hover { border-color: #C7CEDA; color: var(--text); }
.ma-fchip.pre { color: #A05E00; border-color: #F0E0BE; background: #FFFBF0; }
.ma-fchip.oth, .ma-fchip.fail { color: #A33A2C; border-color: #EED6D2; background: #FDF6F5; }
.ma-fchip.dup, .ma-fchip.ex { color: #40587C; border-color: #D8E0EC; background: #F7F9FC; }
.ma-fchip.ok { color: #1F8A4C; border-color: #CFE8D8; background: #F5FBF7; }
.ma-tbl-bar-act { background: #F2F4F8; }

/* 摘要分母 + 结论句里的数字 */
.ma-res-den { font-size: 12.5px; color: var(--text-3); margin-right: 2px; }

/* 禁用态要灰下去，别只是"点了没反应"（设计师 F7）
 * ★ 必须显式 opacity:1 —— 全局 .btn:disabled 上有 opacity:.5（第 139 行），
 *   半透明会把 #8A91A3 的灰字实际渲染成约 #BDC1CC，看起来像"根本没调色"。
 *   （实测：computed color 是对的，像素不是 —— 只查 CSS 值会漏掉这一层。） */
.ma-run-btn:disabled, .btn-primary:disabled {
  background: #F1F2F5 !important; color: #7C8496 !important;
  border-color: #E3E5E9 !important; cursor: not-allowed; box-shadow: none !important;
  opacity: 1 !important;
}

/* ---------- 主操作带右侧提示格：固定 200×32、不换行、四句等长 ---------- */
.ma-row2 { align-items: center; }
.ma-p-hint, .ma-hint-act {
  width: 200px; height: 32px; flex: none;
  display: inline-flex; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12.5px;
}
.ma-p-hint { color: var(--text-3); }
/* 可点的那两句要给"像链接"的确定性：下划线 + 品牌色 + hover 加深 */
.ma-hint-act {
  border: 0; background: transparent; padding: 0; font-family: inherit;
  color: var(--brand-d, #C0392B); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.ma-hint-act:hover { color: var(--brand, #D93025); }
.ma-hint-act:focus-visible { outline: 2px solid var(--brand, #D93025); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   校园送免密直达（2026-10-26）：侧栏里的外链条目
   和普通 nav-item 同一套观感，右侧多一个「↗」提示这是新窗口打开
   ============================================================ */
.nav-item.nav-ext { text-decoration: none; }
.nav-ext .nav-out {
  margin-left: auto; width: 11px; height: 11px; flex: 0 0 auto; opacity: .35;
  background: currentColor;
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7zM19 19H5V5h7V3H3v18h18v-9h-2v7z'/%3E%3C/svg%3E");
          mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7zM19 19H5V5h7V3H3v18h18v-9h-2v7z'/%3E%3C/svg%3E");
}
.nav-ext:hover .nav-out { opacity: .8; }

/* ============================================================
   京东校园送 · 数据总览（2026-10-26 后台合并第二阶段）
   ============================================================ */
.cs-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cs-day {
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 12px; transition: .14s;
}
.cs-day:hover { border-color: var(--brand); color: var(--brand); }
.cs-day.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.cs-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1500px) { .cs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .cs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cs-tbl th, .cs-tbl td { white-space: nowrap; }
.cs-tbl .r, .cs-tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.cs-tbl td.up { color: var(--ok); }
.cs-tbl td.down { color: var(--danger); }

/* 两行表头：第一行是分组（完成情况 / 配送时效 / 运营 / 赔付 / 扣罚） */
.cs-tbl thead tr.cs-grp th {
  text-align: center; font-size: 11.5px; font-weight: 600; letter-spacing: .4px;
  color: #5A6B85; background: #F5F8FC; padding: 4px 8px;
}
.cs-tbl thead tr.cs-grp th[data-k="fence"] { text-align: left; vertical-align: bottom; }
.cs-tbl thead tr.cs-grp + tr th { background: #FAFBFD; }
.cs-tbl tbody tr.cf-row.sel td { background: #F2F7FF; }

/* 合计行（围栏表最上面一行，方便对账） */
.cs-tbl tr.cf-sum td {
  background: #F5F8FC; font-weight: 600; color: #1A1D24;
  border-bottom: 1px solid #E6EBF2; border-top: 1px solid #E6EBF2;
}
.cs-tbl tr.cf-sum td .cs-rate { font-weight: 700; }

/* 「未归属围栏」行（调整单 + 围栏外）：让「账单合计 − 未归属 = 围栏相加」闭合 */
.cs-tbl tr.cf-una td {
  background: #FCFCFE; color: #5A6B85; font-size: 12px;
  border-bottom: 1px dashed #E3E8F0; border-top: 1px dashed #E3E8F0;
}
.cs-tbl tr.cf-una td:first-child { color: #8A91A3; }
.cs-tbl tr.cf-una:hover td { background: #F7F9FD; }
.cs-caret { display: inline-block; width: 13px; color: #A8B0C0; font-size: 10px; margin-right: 2px; }

/* 未归属明细（表格外层的展开块：调整单 / 围栏外订单两张小表） */
.una-card { background: #FAFBFE; border-bottom: 1px solid #EDF0F5; padding: 10px 14px 14px; }
.una-wrap { display: flex; flex-direction: column; gap: 10px; }
.una-sec { border: 1px solid #E6EBF2; border-radius: 8px; background: #fff; padding: 8px 10px 6px; }
.una-hd { font-size: 12.5px; font-weight: 600; color: #1A1D24; margin-bottom: 6px; }
.una-scroll { overflow-x: auto; }
.una-tbl { width: max-content; min-width: 100%; }
.una-tbl th, .una-tbl td { padding: 4px 6px; font-size: 12px; white-space: nowrap; }
.una-tbl thead th { background: #F5F8FC; color: #5A6B85; font-weight: 600; }
.una-tbl tfoot td { background: #F7F9FD; border-top: 1px solid #E6EBF2; }
.una-tbl td .mono { font-family: var(--mono); font-size: 11.5px; color: #5A6B85; }
.una-tbl td.clip { overflow: hidden; text-overflow: ellipsis; }
.una-tbl .cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.una-neg { color: var(--ok); }

/* 围栏宽表（16 列）：收紧内边距 + 略小字号，1440/1680 屏也能把最右「总扣罚」放进可视区 */
.cs-tbl.cs-fence th, .cs-tbl.cs-fence td { padding-left: 7px; padding-right: 7px; font-size: 12.5px; }
.cs-tbl.cs-fence th:first-child, .cs-tbl.cs-fence td:first-child { padding-left: 14px; padding-right: 10px; }
.cs-tbl.cs-fence thead tr.cs-grp th { padding: 4px 7px; }
.cs-tbl.cs-fence td:first-child b { font-size: 13px; }
.cs-tbl.cs-fence .cs-bar { width: 44px; margin-right: 6px; }

/* 系统围栏多选（一个账单围栏可绑多个系统围栏） */
.cf-bind { position: relative; display: inline-block; max-width: 100%; }
.cf-bind-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.cf-bind-btn .cf-bind-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.cf-bind-btn .cf-caret { font-style: normal; color: var(--text-3); font-size: 11px; }
.cf-bind-pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 390px; max-width: 90vw;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .13); padding: 8px;
}
.cf-bind-list { max-height: 250px; overflow: auto; }
.cf-opt { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.cf-opt:hover { background: #F5F8FC; }
.cf-opt.on { background: #EAF3FF; }
.cf-opt input { margin-top: 2px; flex: none; }
.cf-opt-t { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.45; color: #1A1D24; }
.cf-opt-t i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.cf-bind-act { display: flex; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--line-2); margin-top: 6px; }


.cs-bar {
  display: inline-block; width: 54px; height: 6px; border-radius: 3px;
  background: #EEF1F5; overflow: hidden; vertical-align: middle; margin-right: 7px;
}
.cs-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.cs-bar i.ok { background: var(--ok); }
.cs-bar i.warn { background: var(--warn); }
.cs-bar i.bad { background: var(--danger); }
.cs-rate { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cs-rate.ok { color: var(--ok); font-weight: 600; }
.cs-rate.bad { color: var(--danger); font-weight: 600; }

.cs-alert {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 11px; border-radius: 8px; margin-top: 6px; font-size: 12.5px;
}
.cs-alert.bad { background: #FFF1F0; color: #B42318; }
.cs-alert.warn { background: #FFFAEB; color: #B54708; }
.cs-alert.info { background: #F5F7FA; color: var(--text-2); }
.flex1 { flex: 1 1 auto; }

/* ============================================================
   搬店进度（服务端持久队列，2026-10-27）
   ------------------------------------------------------------
   放在搬店页最下方。任务落盘在服务端，关掉页面也继续跑，
   所以这里只是一块「只读进度板 + 暂停/继续/删」。
   表格化排列（时间｜哪家店→哪家店｜进度条｜数量｜状态｜操作），
   一眼扫的是「哪条在跑、跑到第几个」，不是读文字。
   ============================================================ */
.ma-q { margin-top: 16px; }
.ma-q-hd { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 8px; flex-wrap: wrap; }
.ma-q-hd b { font-size: 13.5px; }
.ma-q-sub { font-size: 12px; color: var(--text-3); }
/* 记录区右上角的「清空」类操作：低调放着，别抢搬店主按钮的视觉重量 */
.ma-q-tools { margin-left: auto; display: flex; gap: 6px; align-self: center; }

.ma-q-empty {
  padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--text-3);
  font-size: 12.5px; text-align: center;
}

.ma-q-list {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.ma-q-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 108px 56px 60px auto;
  align-items: center; column-gap: 10px;
  padding: 8px 12px; border-top: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--text-2);
}
.ma-q-row:first-child { border-top: 0; }

.ma-q-t { color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ma-q-who {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-2);
}
.ma-q-who i {
  font-style: normal; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0 4px; margin-left: 6px; vertical-align: 1px;
}

.ma-q-bar { height: 6px; border-radius: 3px; background: #eef1f5; overflow: hidden; }
.ma-q-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .3s; }

.ma-q-num { font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }

.ma-q-st {
  font-size: 11.5px; border-radius: 999px; padding: 1px 8px;
  background: var(--surface-2); color: var(--text-3);
  border: 1px solid var(--line); white-space: nowrap; text-align: center;
}
.ma-q-act { display: flex; gap: 6px; justify-content: flex-end; }
.ma-q-b {
  height: 24px; padding: 0 9px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-2);
}
.ma-q-b:hover { border-color: var(--brand-bd); color: var(--brand-d); background: var(--brand-w); }
.ma-q-b:disabled { opacity: .5; cursor: default; }
.ma-q-b.is-stop:hover { color: var(--warn); border-color: var(--warn); background: var(--warn-w); }
.ma-q-b.is-del:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-w); }
/* 「删这批 / 清空某店商品」是真删京东商品，hover 就给红，别让人误以为只是删记录 */
.ma-q-b.is-warn:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-w); }
/* 清理记录（删商品）和搬运记录区分开：左边加个小色条 */
.ma-q-who.is-purge { color: #b42318; }
.ma-q-who.is-purge i { background: var(--danger-w); color: #b42318; border-color: #fbd0cb; }

/* 建品通道 / 待补主图标签：一眼看出这店走的是哪条路、卡在哪 */
.ma-q-ch {
  font-style: normal; font-size: 10.5px; line-height: 16px; border-radius: 4px;
  padding: 0 4px; margin-left: 5px; vertical-align: 1px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--text-3); background: var(--surface-2);
}
.ma-q-ch.is-old { color: #8a5a00; background: #fff7e6; border-color: #f5d79a; }
.ma-q-ch.is-new { color: #0b6b3a; background: #eafaf1; border-color: #b7e4c9; }
.ma-q-ch.is-bad { color: #b42318; background: #fef3f2; border-color: #fbd0cb; }
.ma-q-ch.is-warn { color: #8a5a00; background: #fff7e6; border-color: #f5d79a; }
.ma-q-now.is-fail { color: #b42318; }

/* 跑动中那一条的当前动作（子进程实时日志最后一行） */
.ma-q-now {
  padding: 0 12px 7px 96px; margin-top: -2px;
  font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* —— 状态着色 —— */
.ma-q-row.is-run .ma-q-st { color: var(--brand-d); background: var(--brand-w); border-color: var(--brand-bd); }
.ma-q-row.is-run .ma-q-who { color: var(--text); }
.ma-q-row.is-ok .ma-q-st { color: #0b7a47; background: var(--ok-w); border-color: #b7ecd3; }
.ma-q-row.is-ok .ma-q-bar i { background: var(--ok); }
.ma-q-row.is-fail .ma-q-st { color: #b42318; background: var(--danger-w); border-color: #fbd0cb; }
.ma-q-row.is-fail .ma-q-bar i { background: var(--danger); }
.ma-q-row.is-pause .ma-q-st { color: #b54708; background: var(--warn-w); border-color: #fbe0b8; }
.ma-q-row.is-pause .ma-q-bar i { background: var(--warn); }

@media (max-width: 900px) {
  /* 窄屏去掉进度条（数字 24/40 已经说明进度），但时间列必须留够宽 ——
     原来给 62px，而「10-27 14:31」实际约 68px，会顶到门店名上。 */
  .ma-q-row { grid-template-columns: 76px minmax(0, 1fr) 52px 58px auto; row-gap: 4px; }
  .ma-q-bar { display: none; }
  .ma-q-now { padding-left: 98px; }
}

/* 团队动态动作类型色（2026-11-02：动作从 3 种扩到 7 种，提报=紫、删除=红） */
.a-red { color: #B42318; }
.a-red.lv-dot { background: #F04438; }
.a-purple { color: #5925DC; }
.a-purple.lv-dot { background: #7A5AF8; }

/* ===== 2026-11-03 打卡日报 · 当日成果（系统自动统计 8 项） ===== */
.ck-res { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ck-res-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 11px;
  background: var(--surface-2);
}
.crc-v { font-size: 22px; font-weight: 700; color: var(--text-4); font-variant-numeric: tabular-nums; line-height: 1.2; }
.crc-v.on { color: var(--text-1); }
.crc-v span { font-size: 11px; font-weight: 500; color: var(--text-4); margin-left: 3px; }
.crc-k { margin-top: 4px; font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) { .ck-res { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== 2026-11-05 校园送数据表（后台直管 + Excel 导入） ===== */
.cd-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.cd-stat { display: flex; flex-direction: column; min-width: 86px; padding-right: 14px; border-right: 1px solid var(--line-2); }
.cd-stat b { font-size: 20px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; line-height: 1.25; }
.cd-stat span { font-size: 12px; color: var(--text-3); }
.cd-note { flex: 1; min-width: 230px; font-size: 12px; line-height: 1.7; color: var(--text-3); }
.cd-tabs { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.cd-tab {
  padding: 7px 15px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text-2);
}
.cd-tab:hover { border-color: var(--brand-bd); color: var(--brand-d); }
.cd-tab.on { background: var(--brand-w); border-color: var(--brand-bd); color: var(--brand-d); font-weight: 600; }
.cd-drop {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 28px 18px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--surface-2);
}
.cd-drop:hover { border-color: var(--brand); background: var(--brand-w); }
.cd-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.cd-form .fld { min-width: 0; }
.cd-form .inp { width: 100%; }
.cd-log {
  margin-top: 14px; max-height: 210px; overflow: auto; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
  font-size: 12px; line-height: 1.9; color: var(--text-2); font-family: var(--mono);
}
@media (max-width: 720px) { .cd-form { grid-template-columns: 1fr; } }
