:root {
  /* ★ 20261020i 视觉升级（参考老板提供的靛蓝渐变 SaaS 风格参考稿）：
     暖灰纸感 → 冷灰蓝现代风。只动设计令牌 + 顶栏/卡片三处，全站组件经 var() 自动继承。
     主色 #1a4f8a 藏青 → #4b5cf0 靛蓝（参考稿主色），状态色同步提亮一档保持同一鲜艳度。 */
  --ink: #1e2130;
  --ink-2: #4e5468;
  --ink-3: #626b80;
  --line: #e8eaf2;
  --line-2: #d8dbe8;
  --bg: #f4f5fa;
  --card: #ffffff;
  --brand: #4b5cf0;
  --brand-soft: #eef0fe;
  --ok: #0e9f6e;
  --ok-soft: #e6f7f1;
  --warn: #b45309;
  --warn-soft: #fdf3e1;
  --risk: #dc2626;
  --risk-soft: #fdecec;
  --r: 10px;
  /* 品牌渐变（顶栏 / 主视觉）：参考稿紫→靛蓝的横向渐变 */
  --grad: linear-gradient(90deg, #7c5cff 0%, #4b5cf0 100%);
  /* 白卡软阴影：靛蓝基调的极淡投影，替代纯灰边框的「纸片感」 */
  --shadow: 0 2px 10px rgba(75, 92, 240, .07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.boot-logo { font-size: 22px; font-weight: 600; letter-spacing: .1em; }
.boot-text { font-size: 13px; color: var(--ink-3); }

/* ---------- layout ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
/* ★ 20261020i 顶栏改品牌渐变（参考稿顶部紫→靛蓝横条），文字翻白 */
.topbar {
  background: var(--grad); border-bottom: none;
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 20;
}
/* 品牌名改为「所味餐饮门店助手」（8 字）：禁止折行、不参与压缩，窄屏降字号 */
.topbar .brand { font-weight: 600; font-size: 15px; letter-spacing: .04em; white-space: nowrap; flex-shrink: 0; color: #fff; }
.topbar .who { font-size: 12.5px; color: rgba(255,255,255,.78); margin-left: auto; text-align: right; line-height: 1.35; }
.topbar .who b { color: #fff; font-weight: 600; }
.topbar > .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar .brand { flex: 1 0 100%; }
  .topbar .who { margin-left: 0; margin-right: auto; text-align: left; }
}

.tabs { display: flex; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  flex: 1 0 auto; min-width: 84px; background: none; border: none; cursor: pointer;
  padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); font-family: inherit;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }

.main { flex: 1; padding: 16px; max-width: 1180px; width: 100%; margin: 0 auto; }
.main.narrow { max-width: 680px; }

/* ---------- generic ---------- */
/* ★ 20261020i 白卡：细边框降为极淡线 + 靛蓝基调软阴影（参考稿的浮起卡片感） */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card > h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.card > .hint { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }
.card > .hint + .hint { margin-top: -8px; }
.card > .hint b { color: var(--ink-2); font-weight: 600; }
/* 字段内的说明行（2026-10-10 现场照片来源限制）。
   ★ 为什么必须单加一条：上面那条是 `.card > .hint`，**只对 .card 的直属子级生效**；
     我们把提示行放进了 .field 里（贴着上传入口），不加这条就完全没样式 ——
     而「只能现场拍照，不能从相册选历史照片」这句正是要让人一眼看到，没样式等于白写。 */
.field > .hint { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.sec-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.sec-title:first-child { margin-top: 0; }

label.f { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
label.f .req { color: var(--risk); }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: var(--card); color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.field { margin-bottom: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* ★ 2026-10-17 筛选条紧凑化：grid 已有 gap，去掉字段下边距避免双重留白 */
.row2.flt .field { margin-bottom: 0; }
.row2.flt .f { margin-bottom: 3px; font-size: 12px; }
.row2.flt select { padding: 6px 10px; font-size: 13px; }
/* ★ 2026-10-17 「门店晨会和日志」页顶部紧凑化：row3 紧排去下边距 + 缩小 select 与 label，
   让门店/日期/刷新压缩到更小占位（桌面/移动端都生效）。 */
.row3.flt { gap: 10px; }
.row3.flt .field { margin-bottom: 0; }
.row3.flt .f { margin-bottom: 3px; font-size: 12px; }
.row3.flt select { padding: 6px 10px; font-size: 13px; }
/* ★ 2026-10-17r 巡店页筛选 4 框同一行：.row2.cols4 覆盖为 4 列（gap 收紧），
   ≤900px 折 2×2，保持移动端可读。 */
.row2.cols4 { grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .row2.cols4 { grid-template-columns: 1fr 1fr; } }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr 1fr; } .topbar .brand { font-size: 13.5px; letter-spacing: 0; } }

/* 输入框 + 内联次要按钮并排（注册页「手机号 / 邮箱」与「获取验证码」，2026-10-09 老板指定）。
   ★ 输入框必须 min-width:0 —— flex 子项默认 min-width:auto，会被输入框的固有宽度顶住不收缩，
     窄屏（320px）上按钮就会被挤出卡片。按钮 side 用 nowrap，避免「重新获取验证码」被折行。
   ★ 不写死宽度：输入框 flex:1 1 auto 自适应，按钮按文案自撑 —— 密文↔明文、发送中↔重新获取
     这些文案变化都不会撑破版式。 */
.field-row { display: flex; gap: 8px; align-items: stretch; }
.field-row > input { flex: 1 1 auto; min-width: 0; }
.field-row > .btn { flex: 0 0 auto; white-space: nowrap; }

/* 密码框内的「眼睛」显隐开关（注册页 设置密码 / 确认密码） */
.pw-wrap { position: relative; }
.pw-wrap > input { padding-right: 44px; }
.pw-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border: none; background: none;
  color: var(--ink-3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pw-eye svg { width: 19px; height: 19px; display: block; }
.pw-eye .ic-on { display: none; }
.pw-eye.on { color: var(--brand); }
.pw-eye.on .ic-off { display: none; }
.pw-eye.on .ic-on { display: block; }

/* 内联字段校验错误（注册页两次密码不一致）。默认不占位，出错才出现 */
.field-err { display: none; margin-top: 6px; font-size: 12.5px; color: var(--risk); line-height: 1.5; }
/* 内联成功提示（账号设置·修改密码，2026-10-10j）。与 .field-err 同一套显隐约定 */
.field-ok { display: none; margin-top: 6px; font-size: 12.5px; color: var(--ok); line-height: 1.5; }
/* ★ 用 aria-invalid 而不是新造 .bad 类：`.dynrow.bad` 已有「整改动态行整行报错」的语义，
   再借同名类会让两处难以区分。属性选择器也与既有 input[type=...] 的写法一致。 */
input[aria-invalid="true"] { border-color: var(--risk); }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: 62px; padding: 8px 10px; border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; font-size: 13.5px; cursor: pointer; font-family: inherit; color: var(--ink-2);
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.seg button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ★ 20261020h UI 精致化（老板反馈：按钮过大过粗过笨重）：
   ① 主按钮 13px padding/15px 字/9px 圆角 → 10px 18px/14px/8px；
   ② 次要按钮 .gray 从灰底粗线（--line-2 + --bg 底）改白底细线（--line），更轻盈；
   ③ .btn-row 里按钮不再被 width:100% 撑成两条半屏大块，改为内容自适应 hug 内容，
      单按钮（:only-child）仍铺满整行保住表单主操作的视觉重量。 */
.btn {
  display: block; width: 100%; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  line-height: 1.4; transition: filter .12s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; filter: none; transform: none; }
.btn.ghost { background: var(--card); color: var(--brand); border: 1px solid var(--brand); }
.btn.gray { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.btn.sm { padding: 7px 12px; font-size: 13px; width: auto; display: inline-block; }
.btn.danger { background: var(--risk); }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn-row .btn { margin: 0; width: auto; flex: 0 1 auto; }
.btn-row .btn:only-child { flex: 1 1 auto; }

/* ★ 20261020k 问题归纳表（看板内嵌 + 打印导出共用）。 */
.sum-scroll { overflow-x: auto; }
table.sum-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; }
table.sum-table th { background: var(--brand-soft); text-align: left; padding: 7px 8px;
  border: 1px solid var(--line-2); font-weight: 600; color: var(--brand); white-space: nowrap; }
table.sum-table td { padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; word-break: break-word; }
img.sum-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); margin: 2px; cursor: zoom-in; background: var(--bg); }
.sm-range { color: var(--ink-3); font-size: 12px; margin-bottom: 12px; }
/* ★ 20261020n 被合并单元格（门店列/员工列/一级分类列锚格）：水平+垂直双居中；
   未合并单元格保持左对齐、顶端对齐，排版风格不变。 */
.sum-table td.sum-c { text-align: center; vertical-align: middle; }
/* ★ 20261020n 重复问题分组同色标注：同组整行同色（六色循环，与
   issue-summary.js 的 SUM_DUP_COLORS 同序），非重复行不着色。 */
.sum-table tr.dup-1 td { background: #fef3c7; }
.sum-table tr.dup-2 td { background: #fee2e2; }
.sum-table tr.dup-3 td { background: #dbeafe; }
.sum-table tr.dup-4 td { background: #dcfce7; }
.sum-table tr.dup-5 td { background: #ede9fe; }
.sum-table tr.dup-6 td { background: #fce7f3; }
/* 门店使用独立底色，避免合并格被首个重复问题组染色。 */
table.sum-table tr td.sum-store { background: #e8edf4; color: #334155; font-weight: 600;
  border-right: 2px solid #c3cddd; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.risk { background: var(--risk-soft); color: var(--risk); }
.pill.gray { background: var(--bg); color: var(--ink-3); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
/* ★ 2026-10-09：看板「需要关注」里的「关注」从纯展示 <span> 换成真 <button>。
   button 自带边框 / UA 字体 / 行高，直接换标签会把它撑成另一个样子，这里复位成 pill，
   再加 hover / active 反馈 —— 老板要一眼看出「这个能点」。
   ★ 只写 button.pill，不动 .pill 本身（别处还在用 span.pill）。
   font-size / font-weight 由 .pill 提供（类选择器压过 UA 的 button 样式），
   这里只把 UA 抢走的字体族与行高还回去。 */
button.pill {
  border: 0;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: filter .12s ease, transform .05s ease;
}
button.pill:hover { filter: brightness(.94); }
button.pill:active { transform: translateY(1px); }
button.pill[disabled] { cursor: default; opacity: .6; filter: none; }
/* 看板「我的重点关注（N）」：一行一条，右侧解除 */
.dash-focus-mine { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.dash-focus-mine .mine-hd { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.dash-focus-mine .frow {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.dash-focus-mine .frow:last-child { border-bottom: 0; }
.dash-focus-mine .ft { flex: 1 1 auto; color: var(--ink); }
.dash-focus-mine .fm { flex: none; color: var(--ink-3); font-size: 12px; }
/* 待改派：球在督导手上（门店退回、等督导裁定），用靛蓝与「待整改」的橙红区分（20261020i 随主色换新） */
.pill.info { background: var(--brand-soft); color: var(--brand); }
/* 诚信类单独标识（2026-10-05 老板要求）：制度 1.4.3 两次即依法解除且不付经济补偿，
   后果与普通红线（L3 直接处理）不同，用紫色区分，别混成一个红。判据走 isHonestSev()。 */
.pill.honest { background: #f3e8ff; color: #6b21a8; }

/* 整改责任人 / 来源标识：一眼看出「谁负责」「这条从哪来」 */
.pill.own-mgr { background: var(--brand-soft); color: var(--brand); }
.pill.own-chef { background: #fff1e0; color: #b26a00; }
.pill.src-insp { background: var(--bg); color: var(--ink-3); font-weight: 400; }
.pill.src-cust { background: #f3e8ff; color: #7b3fb0; font-weight: 400; }
.own-mgr-t { color: var(--brand); }
.own-chef-t { color: #b26a00; }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- list ---------- */
.item { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
/* ★ 20261017b：4 个日志列表行整行可点；data-detail-id 标记「点击进详情」；
   干净门店卡 / 客户反馈条等不含 data-detail-id 的 .item 仍维持系统默认光标（不误导可点）。
   用更具体的属性选择器，避免 .item 全部变 pointer 触发回归。 */
.item[data-detail-id] { cursor: pointer; transition: background 0.15s; }
.item[data-detail-id]:hover { background: var(--bg-2, #fafafa); }
.item .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.item .hd .t { font-weight: 600; font-size: 14.5px; }
.item .hd .r { margin-left: auto; }
.item .meta { font-size: 12.5px; color: var(--ink-3); }
/* ★ 2026-10-17u：巡店记录门店卡头第二行 —— 检查类型 pill + 巡店人 排一行。
   仅限 .ih-store，不动其它 .item 的通用 .meta（那些仍是纯文本行）。 */
.ih-store .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ih-store .meta .pill.gray { flex: none; }
.ih-store .meta .insp-who { color: var(--ink-3); font-size: 12.5px; }
.item .desc { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; white-space: pre-wrap; }

/* ---------- 巡店记录内嵌问题清单（2026-10-11g：表格化 + 行点击详情） ----------
   原来是每条问题一个 .ii-row div 横排；现在改成 7 列表格，横向扫读对齐、长描述不撑行。
   ★ 折叠语义不变：非全部模式默认只露最严重 1 条（.ii-fold[data-open="0"]），
     点门店头/「展开全部」控件展开收起；DOM 始终渲染全量行，只切 data-open、不重绘内容。
   ★ 表头灰底 sticky、列宽固定；描述列左缘 3px 色条按严重度着色（tone-*）。
   ★ 行带 cursor:pointer + hover 淡色，点击开详情弹层（见 bindInspIssueRows）。 */
.ii-fold { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; position: relative; }
/* 渐隐遮罩：只在折叠态出现，提示「下面还有」。
   ★ 20261016g：改为 bottom 锚定（贴在「展开」按钮上方 = 唯一可见行的下沿），
     原来 top:62px 是写死的像素值 —— Windows 字体更宽更高、行高变化时遮罩会压错位置，
     盖住该露的行（老板截图实锤）。bottom 锚定跟着按钮走，永远不错位。 */
.ii-fade { position: absolute; left: 0; right: 0; bottom: 34px; height: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0), var(--card) 78%); pointer-events: none; }
.ii-fold[data-open="1"] .ii-fade { display: none; }

/* 表格主体：列宽固定（严重度 76 / 类别 92 / 时间 64 / 责任人 72 / 状态 72），
   描述与整改要求自适应并单行省略，长描述不撑行。
   ★ 20261016g：去掉 min-width:720px —— 内容区约 1116px 本就够用；写死 720 后，
     Windows（滚动条常驻占位）或系统缩放下内容区不足 720 时 .tbl-wrap 会压出横向滚动条，
     正好盖住表格最后一行的下半截（老板截图实锤「展开后被遮盖」）。
     overflow-x:auto 保留作极端窄屏兜底。 */
.ih-tbl { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.ih-tbl thead th {
  position: sticky; top: 0; background: var(--bg); z-index: 1;
  text-align: left; padding: 8px 10px; border-bottom: 1.5px solid var(--line-2);
  color: var(--ink-2); font-weight: 600; white-space: nowrap;
}
.ih-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ih-tbl tbody tr { cursor: pointer; }
.ih-tbl tbody tr:hover { background: var(--bg); }
/* 红线行整行淡红底（沿用 ii-red 语义）；hover 时保持淡红不闪回灰 */
.ih-tbl tbody tr.ii-red { background: var(--risk-soft); }
.ih-tbl tbody tr.ii-red:hover { background: var(--risk-soft); }
.ih-tbl .c-sev { width: 76px; }
.ih-tbl .c-cat { width: 92px; }
.ih-tbl .c-time { width: 64px; }
.ih-tbl .c-owner { width: 72px; }
.ih-tbl .c-status { width: 72px; }

/* 严重度：色点 + 档位字 + 诚信红线 ◆（沿用 .pill.honest 紫） */
.ih-sev { white-space: nowrap; }
.ih-dot { margin-right: 4px; font-size: 12px; }
.ih-dot.risk { color: var(--risk); }
.ih-dot.warn { color: var(--warn); }
.ih-dot.gray { color: var(--ink-3); }
.ih-sev-t { font-weight: 600; }
.ih-sev .pill.honest { margin-left: 4px; padding: 1px 5px; }
/* 类别：过长截断出 title */
.ih-cat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 描述：左缘 3px 色条按严重度着色；flex 布局让描述单行省略、详情› 固定尾部 */
.ih-tbl tr.tone-risk td.ih-desc { border-left: 3px solid var(--risk); }
.ih-tbl tr.tone-warn td.ih-desc { border-left: 3px solid var(--warn); }
.ih-tbl tr.tone-gray td.ih-desc { border-left: 3px solid var(--line-2); }
.ih-desc { font-size: 13px; color: var(--ink-2); }
.ih-desc-flex { display: flex; align-items: center; min-width: 0; }
.ih-desc-content { flex: 1 1 auto; min-width: 0; }
.ih-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.ih-badges:empty { display: none; }
.ih-desc-flex .pill { flex: none; margin-right: 5px; }
.ih-desc-txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-width: 0; overflow: hidden; overflow-wrap: anywhere; }
.ih-more { flex: none; color: var(--brand); font: inherit; font-size: 12px; margin-left: 6px; white-space: nowrap; border: 0; border-radius: 4px; padding: 5px; background: transparent; cursor: pointer; }
/* 时间：等宽数字，脏数据已规范成 HH:MM */
.ih-time { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
/* 整改要求：单行省略号 */
.ih-req { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
.ih-owner { white-space: nowrap; }
.ih-status { white-space: nowrap; }

/* 折叠态只保留最严重那一条：靠行数隐藏，不靠高度截断（否则单条描述较长时会被切掉）。
   DOM 仍渲染全量行 —— 展开/收起只切 data-open，不重绘内容。 */
.ii-fold[data-open="0"] .ih-tbl tbody tr:nth-child(n+2) { display: none; }
/* 展开态恢复所有行 */
.ii-fold[data-open="1"] .ih-tbl tbody tr { display: table-row; }

.ii-toggle { margin-top: 8px; background: none; border: none; padding: 2px 0;
  color: var(--brand); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.ii-toggle:hover { text-decoration: underline; }
.ii-none { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 巡店记录：日期 → 门店 两级分组（2026-10-11c） ----------
   老板 2026-10-11 定：原来按单张巡店单平铺，同店同日多次巡店就是多张卡、问题散着；
   现在一天一段、一段里一店一卡，卡内聚齐当天全部问题，折叠态只露最严重那条。 */
.ih-day { margin-bottom: 4px; }
.ih-day-hd { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.ih-day-d { font-weight: 700; font-size: 15px; }
.ih-day-hd .r { margin-left: auto; }
/* 只有「有问题、可展开」的门店才给手型光标 —— 干净门店点了没反应，光标不该骗人 */
.ih-store.has-issues .hd { cursor: pointer; }
.ii-worst { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft);
  border-radius: 4px; padding: 1px 5px; margin-right: 4px; flex: none; white-space: nowrap; }
/* 小屏以带字段名的卡片阅读，避免七列表格把描述压成零宽度。 */
@media (max-width: 760px) {
  .ih-tbl, .ih-tbl tbody, .ih-tbl tbody tr { display: block; width: 100%; }
  .ih-tbl thead, .ih-tbl colgroup { display: none; }
  .ih-tbl td { display: block; width: 100%; padding: 5px 8px; border-bottom: 0; white-space: normal; }
  .ih-tbl td::before { content: attr(data-label); display: inline-block; width: 70px; color: var(--ink-3); font-size: 12px; }
  .ih-tbl td.ih-desc::before { display: block; margin-bottom: 3px; }
  .ih-tbl .ih-desc-txt { -webkit-line-clamp: 3; }
  .ih-tbl .ih-req { text-overflow: clip; overflow-wrap: anywhere; }
  .ii-fold[data-open="1"] .ih-tbl tbody tr { display: block; }
  .ih-tbl tbody tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .ii-fade { display: none; }
}

/* ---------- 巡检覆盖表格（2026-10-07o） ----------
   原来是逐行 .item 列表：十几家店要滚十几屏，老板要「一眼看到该巡哪家」就得来回找。
   现在改成紧凑表格 + 搜索 + 排序 + 分页。
   ★ 高危行复用已有的 tr.row-bad（淡红底），不另造一套配色，避免两处红色打架。 */
.cv-tools { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; }
.cv-q {
  flex: 1 1 220px; min-width: 0; padding: 7px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); color: var(--ink-2);
}
.cv-q:focus { border-color: var(--brand); outline: none; }
.cv-count { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
table.cv-tb { min-width: 640px; }
.cv-tb td { vertical-align: middle; }
.cv-tb th.cv-th { cursor: pointer; user-select: none; }
.cv-tb th.cv-th:hover { color: var(--ink-2); }
.cv-tb th.cv-th.on { color: var(--brand); }
.cv-name { font-weight: 600; font-size: 13.5px; }
.cv-risk.is-risk .pill { font-weight: 600; }
/* 叹号：不用整行红底也能扫到的高危标记，做成红色圆点比「!」字符更像徽标 */
.cv-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; background: var(--risk); color: #fff;
  font-size: 11px; font-weight: 700; margin-right: 5px; vertical-align: 1px;
}
.cv-why { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.cv-empty { text-align: center; color: var(--ink-3); padding: 30px 10px; font-size: 13px; }
.cv-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cv-pinfo, .cv-pnum { font-size: 12.5px; color: var(--ink-3); }
.cv-pbtns { display: flex; align-items: center; gap: 8px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { text-align: left; padding: 9px 10px; border-bottom: 1.5px solid var(--line-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
/* ★ 20261017b：grid-tight 用于详情页紧凑表（基础信息 2 行 1×4、营销、自评），行高 26px */
table.grid-tight th, table.grid-tight td { padding: 6px 8px; font-size: 12.5px; }
table.grid-tight th { background: var(--bg-2, #fafafa); }
.tbl-wrap { overflow-x: auto; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.stat .n { font-size: 22px; font-weight: 600; line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat.ok .n { color: var(--ok); }
.stat.warn .n { color: var(--warn); }
.stat.risk .n { color: var(--risk); }

/* ★ 20261021a：看板指标卡可点（跳页签 / 弹明细）。挂 .dash-tap 后整卡出现可点态。 */
.dash-tap .stat { cursor: pointer; transition: background .12s ease, border-color .12s ease, transform .05s ease; }
.dash-tap .stat:hover { background: var(--brand-soft); border-color: var(--brand); }
.dash-tap .stat:active { transform: translateY(1px); }
.dash-tap .stat .l { transition: color .12s ease; }
.dash-tap .stat:hover .l { color: var(--brand); }

.matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mcard { border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: var(--card); }
.mcard .nm { font-size: 14px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.mcard .sc { font-size: 20px; font-weight: 600; }
.mcard .dt { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mcard.g { border-left: 3px solid var(--ok); }
.mcard.y { border-left: 3px solid var(--warn); }
.mcard.r { border-left: 3px solid var(--risk); }
.mcard.n { border-left: 3px solid var(--line-2); }

/* ---------- login ---------- */
.login { max-width: 400px; margin: 0 auto; padding: 40px 20px; }
/* ★ 必须显式 display:block —— 全项目第 293 行有个**状态徽章**类也叫 `.lg`
     （display:inline-block; padding:1px 7px，用于 L1/L2/L3、达标这类小标签）。
     `.login .lg` 虽然特异性更高，但它只设了 text-align，没设 display，
     于是 inline-block 生效 → div 收缩到内容宽度、整块贴左，
     text-align:center 对自己内部的块不生效 → **标题看着没居中**。
     这就是「CSS 类名撞车」的典型：加 display 而不是去改那条徽章类。 */
.login .lg { display: block; text-align: center; margin-bottom: 26px; }
.login .lg .n { font-size: 21px; font-weight: 600; letter-spacing: .06em; }
.login .lg .s { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.login .switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.login .switch span { color: var(--brand); cursor: pointer; font-weight: 600; }

/* ---------- toast / modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(28,28,26,.94); color: #fff; padding: 11px 18px; border-radius: 8px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .22s; z-index: 200; max-width: 84vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* ★ 2026-10-13r：关键操作的结果反馈分色 —— 成功绿 / 失败红。
   老板实测复核驳回「看不到成功提示」：原来只有 2.2 秒一行的黑条，弹层一关就注意不到。 */
.toast.toast-ok { background: rgba(36,110,60,.96); }
.toast.toast-err { background: rgba(160,42,36,.96); }
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,20,18,.42); z-index: 300;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
  position: relative;
  background: var(--card); width: 100%; max-width: 620px; border-radius: 14px 14px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto;
}
@media (min-width: 700px) {
  .modal-mask { align-items: center; padding: 20px; }
  .modal { border-radius: 12px; }
}
.modal h3 { margin: 0 0 14px; padding-right: 36px; font-size: 16px; font-weight: 600; }
.modal-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 6px; background: var(--bg); color: var(--ink-2); cursor: pointer; font-size: 24px; line-height: 1; }
:is(button,input,select,textarea,a,[tabindex]):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---------- misc ---------- */
.uploader {
  border: 1.5px dashed var(--line-2); border-radius: 9px; padding: 18px; text-align: center;
  font-size: 13px; color: var(--ink-3); cursor: pointer; background: var(--bg);
}
.uploader.has { border-style: solid; border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.thumb { width: 100%; max-width: 220px; border-radius: 8px; border: 1px solid var(--line); margin-top: 10px; display: block; }
.dynrow { border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 10px; background: var(--bg); }
.dynrow .rh { display: flex; align-items: center; margin-bottom: 8px; }
.dynrow .rh .idx { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.dynrow .rh .del { margin-left: auto; background: none; border: none; color: var(--risk); font-size: 13px; cursor: pointer; font-family: inherit; }
/* 校验失败的问题行：整份提交被拦下时，把出问题的那一行标出来（R09）。
   ★ 用 --risk / --risk-soft —— 这两个变量在 :root 里确实存在
     （--ink 是不存在的，别顺手用它）。 */
.dynrow.bad { border-color: var(--risk); background: var(--risk-soft); }
.dynrow.bad .rh .idx { color: var(--risk); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 10px; }
.bars .b { flex: 1; background: var(--brand-soft); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.bars .b span { position: absolute; bottom: -19px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--ink-3); }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-3); }
.kv .v { font-weight: 500; text-align: right; max-width: 62%; }
.rpt { font-size: 14px; line-height: 1.85; }
.rpt h4 { margin: 14px 0 5px; font-size: 14px; font-weight: 600; color: var(--brand); }
.rpt h4:first-child { margin-top: 0; }
.rpt p { margin: 2px 0; line-height: 1.6; }
.rpt ul { margin: 4px 0; padding-left: 20px; }
.rpt li { margin: 3px 0; }

/* ---------- 身份体验 ---------- */
.admin-tag { display: inline-block; background: var(--brand-soft); color: var(--brand); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.va-badge { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0dcbb; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.notice { background: var(--brand-soft); color: var(--ink-2); border-left: 3px solid var(--brand); border-radius: 6px; padding: 10px 12px; font-size: 13px; margin: 10px 0 4px; line-height: 1.6; }
.notice b { color: var(--brand); }

/* ---------- 门店按品牌分组 ---------- */
.brand-group + .brand-group { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
  /* ★ 20261020n：品牌分类标题字号须大于组内门店名（14.5px），老板定稿口径 */
.brand-hd { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--brand); margin: 2px 0 8px; }
.brand-hd .cnt { font-size: 11.5px; font-weight: 500; color: var(--ink-3); background: var(--bg); border-radius: 999px; padding: 1px 8px; }

/* ---------- 报告：表格化呈现 ---------- */
.modal.wide { max-width: 1000px; }
@media (min-width: 1040px) { .modal.wide { max-width: 1000px; } }

.tbw { overflow-x: auto; margin: 6px 0 14px; -webkit-overflow-scrolling: touch; }
table.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.5; min-width: 520px; }
table.dt th {
  background: var(--bg); color: var(--ink-3); font-weight: 600; text-align: left;
  padding: 7px 9px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.dt td { padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.dt tbody tr:hover { background: var(--bg); }
table.dt td.ctr { text-align: center; }
table.dt td.num { text-align: right; font-variant-numeric: tabular-nums; }

.lg { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; }
.lg.ok { background: var(--ok-soft); color: var(--ok); }
.lg.warn { background: var(--warn-soft); color: var(--warn); }
.lg.bad { background: var(--risk-soft); color: var(--risk); }
.lg.gray { background: var(--bg); color: var(--ink-3); }

.up { color: var(--risk); font-weight: 600; }
.down { color: var(--ok); font-weight: 600; }
.ok-t { color: var(--ok); }
.no-t { color: var(--risk); font-weight: 600; }
.rpt .dim, table.dt .dim { color: var(--ink-3); }
b.g { color: var(--ok); }
b.y { color: var(--warn); }
b.r { color: var(--risk); }

.kvmini {
  display: flex; flex-wrap: wrap; gap: 5px 15px; font-size: 12.5px; color: var(--ink-3);
  background: var(--bg); border-radius: 8px; padding: 9px 12px; margin: 6px 0 12px;
}
.kvmini span b { color: var(--ink); font-weight: 700; margin-left: 3px; font-size: 13px; }
.kvmini.big { font-size: 13px; padding: 11px 13px; }
.kvmini.big span b { font-size: 14px; }

.rpt-top { border-bottom: 2px solid var(--brand); padding-bottom: 9px; margin-bottom: 14px; }
.rpt-ttl { font-size: 17px; font-weight: 700; }
.rpt-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

.brand-sec { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.bs-hd {
  font-size: 15.5px; font-weight: 700; margin: 0 0 9px; color: var(--ink);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.bs-sub { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.brand-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.brand-nav a {
  font-size: 12px; padding: 4px 11px; border-radius: 999px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand); text-decoration: none;
}

/* 报告中心按日期分组 */
.rp-day { border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; margin-bottom: 10px; }
.rp-dhd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-dhd .d { font-weight: 700; font-size: 14.5px; }
.rp-dhd .m { font-size: 12px; color: var(--ink-3); }
.rp-dhd .r { margin-left: auto; }
.rp-brands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }

/* ---------- 客户反馈：桌台配置 ---------- */
table.dt tr.row-off td { opacity: .55; }
table.dt td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink-3); }

/* ---------- 差评等级与瞒报考核 ---------- */
.notice.red { background: #fbe9e9; color: #8a2b2b; border-left-color: var(--risk); }
.notice.red b { color: #c0392b; }
.notice.warn { background: #fdf1dc; color: #7a5200; border-left-color: var(--warn); }
.notice.warn b { color: #a86a00; }
.notice.ok { background: #e8f4ea; color: #2f6b3c; border-left-color: var(--ok); }
.notice.ok b { color: #2f6b3c; }

/* ---------- AI 教练点评（2026-10-13 补：原缺样式，点评块渲染出来却几乎不可见） ----------
   .notice.coach 覆写 .notice 的默认米白底 + 品牌色左边框，换成教练点评专属的
   淡紫底 + 紫左边框 + 紫色标题，让「AI 教练点评」与普通「判定结论」一眼区分开；
   .coach-body 负责正文排版：独立背景、可换行、保留空格。 */
.notice.coach {
  background: #f3eefb; color: #3d3551; border-left: 3px solid #7c5cc4;
  padding: 12px 14px;
}
.notice.coach b { color: #6a48b8; }
.coach-body {
  background: #faf8ff; border-radius: 6px; padding: 8px 10px;
  color: #3d3551; white-space: normal; word-break: break-word;
}

/* ---------- mdLite：AI 点评的 markdown 渲染（2026-10-16b） ----------
   AI 点评是 markdown 文本，mdLite（ui.js）把它渲染成标题/表格/列表/段落，
   配色沿用教练点评的紫底系，表格风格对齐 .ih-tbl/.grid（细边框、表头浅底）。 */
.coach-body .md-h { font-weight: 600; color: #6a48b8; margin: 10px 0 4px; font-size: 14px; }
.coach-body .md-h:first-child { margin-top: 2px; }
/* 20261016c（QA F-2）：标题层级分档 —— # 主标题略大、### 小节略小，
   否则「晨会分析报告」与「三、存在的问题」渲染成完全一样，没有主次。 */
.coach-body .md-h1 { font-size: 15px; }
.coach-body .md-h2 { font-size: 14px; }
.coach-body .md-h3 { font-size: 13px; }
.coach-body .md-p { margin: 4px 0; font-size: 13px; line-height: 1.65; }
.coach-body .md-li { margin: 3px 0 3px 2px; font-size: 13px; line-height: 1.65; }
.coach-body .md-tbl {
  border-collapse: collapse; margin: 8px 0; width: 100%;
  font-size: 12.5px; line-height: 1.5; background: #fff;
}
.coach-body .md-tbl th,
.coach-body .md-tbl td {
  border: 1px solid #e4dcf2; padding: 5px 8px; text-align: left; vertical-align: top;
}
.coach-body .md-tbl th { background: #f0eaf9; color: #4a3a78; font-weight: 600; }
.coach-body .md-tbl td { color: #3d3551; }

/* ---------- 巡台：随巡随存 ---------- */
.pt-prog { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.pt-prog .bar { flex: 1; height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.pt-prog .bar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.pt-prog .lb { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pt-prog .lb b { font-size: 17px; color: var(--ink); }
.lvl-guide {
  background: var(--bg); border-radius: 7px; padding: 9px 11px; font-size: 12.5px;
  color: var(--ink-2); line-height: 1.65; border-left: 3px solid var(--warn);
}
.lvl-guide.red { background: #fbe9e9; border-left-color: var(--risk); }
.lvl-guide b { color: var(--ink); }
.lvl-guide .warn-t { color: var(--risk); font-weight: 600; }

/* ---------- 严重程度「等级说明」（2026-10-06）
   位置：巡店检查 → 严重程度选择器下方。常态只占一行（当前档判定 + 处理），
   点「五档对照表」展开五档全文（判定标准/影响范围/典型情形/处理要求/与相邻档分界）。
   配色沿用既有 token：L0 灰 → L1/L2 黄橙渐进 → L3 红 → L3-诚 紫（紫红必须分开）。
   ⚠️ 别把 L3-诚 改成红色：它与普通红线后果不同（2 次即解除且不给经济补偿），
      颜色混掉督导就会把造假记成普通红线。 */
/* ① 一行提示：待在「严重程度」那一栏里 */
.sev-guide-now {
  margin-top: 6px; background: var(--bg); border-radius: 7px; padding: 8px 10px;
  border-left: 3px solid var(--line-2); font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
}
.sev-guide-now .sev-say { display: block; }
.sev-guide-now .sev-say b { color: var(--ink); }
.sev-guide-now .sev-do { display: block; color: var(--ink-3); font-size: 12px; }

/* ② 五档对照表：整行宽度（放在 .row2 之外），两列排布便于横向比边界 */
.sev-guide { margin-top: 8px; }
.sev-bar { display: flex; align-items: center; gap: 8px; }
.sev-bar .sev-more {
  padding: 4px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--brand); border-radius: 6px; background: var(--card); color: var(--brand);
  white-space: nowrap;
}
.sev-bar .sev-tip { font-size: 12px; color: var(--ink-3); }
.sev-chip {
  display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 600;
  margin-right: 5px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line-2);
}
.sev-chip.tone-gray { background: #f1f0ed; color: #52514c; }
.sev-chip.tone-warn { background: var(--warn-soft); color: var(--warn); border-color: #e8cfa4; }
.sev-chip.tone-orange { background: #fdeedd; color: #a3520b; border-color: #ecc79b; }
.sev-chip.tone-risk { background: var(--risk-soft); color: var(--risk); border-color: #e5b9b8; }
.sev-chip.tone-honest { background: #f3e8ff; color: #6b21a8; border-color: #d9c2f2; }

.sev-panel { margin-top: 8px; }
/* ⚠️ 这里绝不能给 .sev-panel 设 display：panel 的收起靠 `.sev-panel[hidden]` 的 UA `display:none`，
   类选择器（.sev-panel{display:grid}）优先级更高会把它顶掉 → 表格永远收不起来。两列加在下层 .sev-grid。 */
.sev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sev-grid .sev-item { margin-bottom: 0; }
@media (max-width: 780px) { .sev-grid { grid-template-columns: 1fr; } }
.sev-quick {
  background: var(--brand-soft); border-radius: 7px; padding: 7px 10px; font-size: 12.5px;
  color: var(--ink-2); line-height: 1.9; margin-bottom: 8px;
}
.sev-quick b { color: var(--ink); }
.sev-q { display: inline-block; margin-right: 10px; white-space: nowrap; }
.sev-q i { font-style: normal; color: var(--ink-2); }
.sev-q b { color: var(--brand); }

.sev-item {
  position: relative;            /* 供 .cur 的「当前所选」角标定位 */
  border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 7px;
  padding: 8px 10px; margin-bottom: 7px; background: var(--card); font-size: 12.5px; line-height: 1.7;
}
.sev-item.tone-warn { border-left-color: var(--warn); }
.sev-item.tone-orange { border-left-color: #c2700f; }
.sev-item.tone-risk { border-left-color: var(--risk); }
.sev-item.tone-honest { border-left-color: #6b21a8; }
.sev-item.cur { background: #fbfaf7; box-shadow: 0 0 0 2px var(--brand-soft) inset; }
.sev-item.cur::after {
  content: '当前所选'; position: absolute; top: 7px; right: 9px;
  font-size: 11px; color: var(--brand); font-weight: 600;
}
.sev-item .sev-h { margin-bottom: 4px; }
.sev-item .sev-h .sev-do { color: var(--ink-2); font-size: 12px; }
.sev-item .sev-row { display: flex; gap: 6px; }
.sev-item .sev-k {
  flex: 0 0 62px; color: var(--ink-3); font-size: 12px;
}
.sev-item .sev-v { flex: 1 1 auto; color: var(--ink); }
/* 分界行是防混淆的关键，单独给底色，便于督导只看这一行 */
.sev-item .sev-bound { background: #f7f6f2; border-radius: 5px; padding: 2px 5px; margin-top: 3px; }
.sev-item .sev-bound .sev-v { font-weight: 600; }
.sev-item .sev-basis { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.sev-notes { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); line-height: 1.75; }
.sev-notes li { margin-bottom: 2px; }

/* ---------- 违纪判定控件（员工违纪一级类，2026-10-05）---------- */
.lvl-guide.grade-info { border-left-color: var(--brand); }
.lvl-guide.grade-ok { border-left-color: var(--ok); }
.lvl-guide.grade-warn { border-left-color: var(--warn); background: #fdf1dc; }
.lvl-guide.grade-risk { border-left-color: var(--risk); background: #fbe9e9; }
.lvl-guide select, .lvl-guide .pill { margin-right: 4px; }
/* 旧的原生 <select> 样式：现在 .isClause 只是组件里那个 hidden 取值框，
   保留此条是为了不删历史样式（真删了也无影响）。输入框自身的样式见 .cp-* */
.isClause {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: var(--ink); font-size: 13px;
}
.isClause:focus { outline: none; border-color: var(--brand); }

/* ---------- 违纪条款「可搜索下拉」（2026-10-06）----------
   77 条条款靠翻下拉太慢，改成可打字搜索。这里是纯样式：
   面板用绝对定位浮在字段下方 —— 已确认父级 .card / .dynrow 都没有 overflow:hidden，
   否则面板会被裁掉（这是这类组件最常见的翻车点）。 */
.cp { position: relative; }
.cp-field { position: relative; }
.cp-input {
  width: 100%; padding: 8px 32px 8px 10px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--ink);
  font-size: 13px; font-family: inherit;
}
.cp-input::placeholder { color: var(--ink-3); }
.cp-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cp.has .cp-input { font-weight: 500; }
/* 「原先选了条款、现在被改没了」：转黄提醒。这是最危险的状态 ——
   界面上像改过了，提交时要么被拦、要么写进旧条款，不能让它静默发生。 */
.cp.pending .cp-input { border-color: var(--warn); background: var(--warn-soft); }
.cp-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); color: var(--ink-2); font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cp-clear:hover { background: var(--line-2); color: var(--ink); }
.cp-clear[hidden] { display: none !important; }

.cp-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: #fff; border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: 0 10px 26px rgba(28, 28, 26, .14); overflow: hidden;
}
.cp-panel[hidden] { display: none !important; }
.cp-list { list-style: none; margin: 0; padding: 4px 0; max-height: 264px; overflow-y: auto; }
.cp-group {
  padding: 7px 10px 3px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-3); background: var(--bg);
}
.cp-item {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 10px;
  font-size: 13px; line-height: 1.45; color: var(--ink-2); cursor: pointer;
}
.cp-item.on { background: var(--brand-soft); }
/* 「其他」兜底项（2026-10-10）：它不是制度条款，视觉上要能一眼区分 ——
   上边框把它与上面的条款分隔开，编号用中性色（不是条款号的品牌蓝）。 */
.cp-item.cp-other { border-top: 1px dashed var(--line); }
.cp-item.cp-other .cp-no { color: var(--ink-3); font-family: inherit; }
.cp-no {
  flex: none; min-width: 36px; font-size: 12px; font-weight: 600; color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cp-title { flex: 1; color: var(--ink); }
.cp-fam { flex: none; font-size: 11px; color: var(--ink-3); }
.cp-title mark, .cp-no mark { background: #ffe9a8; color: inherit; border-radius: 2px; padding: 0 1px; }
.cp-empty { padding: 14px 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.cp-empty-tip { display: block; margin-top: 6px; font-size: 11.5px; }
.cp-empty[hidden], .cp-more[hidden] { display: none !important; }
.cp-more {
  padding: 6px 10px; font-size: 11.5px; text-align: center;
  color: var(--warn); background: var(--warn-soft);
}
.cp-hint {
  padding: 5px 10px; font-size: 11px; color: var(--ink-3);
  border-top: 1px solid var(--line); background: var(--bg);
}
@media (max-width: 720px) { .cp-fam { display: none; } }
.isSubSeg { margin-top: 6px; }
.isSubSeg button { font-size: 12px; padding: 5px 9px; }
.excl-box { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.excl-row {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2);
}
.excl-row:last-child { border-bottom: none; }
.excl-row.ok { background: #f2faf5; }
.excl-row.no { background: #fdf1dc; }
.excl-q { color: var(--ink); font-weight: 600; }
.excl-basis { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.excl-btns { display: flex; gap: 4px; }
.excl-btns button {
  border: 1px solid var(--line); background: #fff; border-radius: 5px;
  padding: 4px 9px; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.excl-btns button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.excl-row.ok .excl-btns button.on { background: var(--ok); border-color: var(--ok); }
.excl-row.no .excl-btns button.on { background: var(--warn); border-color: var(--warn); }
@media (max-width: 760px) {
  .excl-row { grid-template-columns: 1fr; }
}
.warn-line {
  background: #fdf1dc; color: #7a5200; border-left: 3px solid var(--warn);
  border-radius: 6px; padding: 9px 12px; font-size: 12.5px; line-height: 1.65; margin: 4px 0 10px;
}
.warn-line a { color: var(--brand); font-weight: 600; text-decoration: none; }
table.dt tr.row-bad td { background: #fbe9e9; }

/* ---------- 督导整改跟进 ---------- */
.item.row-bad { background: #fff8f8; border-left: 3px solid var(--risk); padding-left: 11px; }
.item .btn-row { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
table.dt td a { color: var(--brand); text-decoration: none; font-weight: 600; }
table.dt td a:hover { text-decoration: underline; }

/* ---------- 日报抄送与转发到群 ---------- */
.share-prev { max-height: 260px; overflow: auto; margin: 12px 0; }
.share-txt {
  margin: 0; padding: 12px 14px; background: var(--bg); border-radius: 8px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12.5px; line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.share-img { margin: 10px 0; text-align: center; }
.share-img img { width: 100%; max-width: 420px; border-radius: 8px; border: 1px solid var(--line); display: inline-block; }
.share-tip { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-bottom: 12px; }

/* ---------- 后台人员管理 ---------- */
.card .hd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.card .hd-row > h3 { margin: 0; font-size: 15px; font-weight: 600; }
.item .hd .r .btn + .btn { margin-left: 6px; }

/* ---------- 客户评价统计看板 ---------- */
.sub-h { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 4px 0 9px; }
.sub-h .meta { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
/* 线上差评按门店分组（2026-10-18）：门店块 + 卡内差评明细 */
.store-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--card); }
.store-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.store-hd .t { font-weight: 700; font-size: 15px; }
.store-hd .r { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.store-group .item { border-color: var(--line-2); }
.store-group .item:last-child { margin-bottom: 0; }
.br-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.br-thumbs .thumb { width: 96px; height: 96px; object-fit: cover; max-width: 96px; margin-top: 0; cursor: pointer; }
/* 线上差评 · 左文右图两栏（2026-10-18 老板指定排版） */
.br-cols { display: flex; gap: 18px; align-items: flex-start; margin-top: 6px; }
.br-text { flex: 1 1 auto; min-width: 0; }
.br-media { flex: 0 0 auto; max-width: 45%; }
.br-media .br-thumbs { margin-top: 0; justify-content: flex-end; }
.br-media .meta.dim { text-align: right; }
@media (max-width: 720px) { .br-cols { flex-direction: column; } .br-media { max-width: 100%; } .br-media .br-thumbs { justify-content: flex-start; } }
/* 图片放大预览模态（2026-10-18）：全屏遮罩 + 居中大图 + 右上角关闭 */
#imgLightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 32px; }
#imgLightbox .imglb-img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); background: #fff; object-fit: contain; }
#imgLightbox .imglb-close { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: #333; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
#imgLightbox .imglb-close:hover { background: #fff; }
.ai-sum { font-size: 14px; line-height: 1.7; color: var(--ink-2); background: var(--brand-soft); border-radius: 8px; padding: 12px 14px; margin-bottom: 4px; white-space: pre-wrap; }
.sbar { display: flex; align-items: center; gap: 9px; font-size: 12.5px; margin-bottom: 7px; }
.sbar .k { flex: 0 0 62px; color: var(--ink-2); white-space: nowrap; }
.sbar .track { flex: 1; height: 8px; background: var(--bg); border-radius: 5px; overflow: hidden; min-width: 60px; }
.sbar .track i { display: block; height: 100%; background: var(--brand); border-radius: 5px; transition: width .3s ease; }
.sbar .track i.ok { background: var(--ok); }
.sbar .track i.warn { background: #e0a83c; }
.sbar .track i.risk { background: var(--risk); }
.sbar .v { flex: 0 0 96px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.chip b { margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.risk { background: var(--risk-soft); color: var(--risk); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---------- 门店形象（对客展示：轮播图 / 介绍 / 坐标） ---------- */
.sp-wrap { margin-top: 4px; }
.sp-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.sp-sec:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.sp-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sp-hd > b { font-size: 14px; }
.sp-count { font-size: 12px; color: var(--ink-3); }
.sp-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.sp-thumb { position: relative; width: 110px; height: 82px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg); }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-thumb .sp-idx { position: absolute; left: 5px; top: 5px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 10px; }
.sp-thumb .sp-ops { position: absolute; right: 5px; top: 5px; display: flex; gap: 4px; }
.sp-mini { width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.sp-mini.sp-del { background: rgba(210,40,40,.78); }
.sp-empty { width: 100%; color: var(--ink-3); font-size: 13px; padding: 14px 4px; text-align: center;
  border: 1px dashed var(--line); border-radius: 8px; }
.sp-add { display: flex; align-items: center; gap: 10px; }
.sp-tip { font-size: 12px; color: var(--ink-3); }
.sp-file { display: none; }
.sp-textarea { width: 100%; min-height: 108px; resize: vertical; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-soft, #fff); color: var(--ink); font-size: 13.5px;
  line-height: 1.7; box-sizing: border-box; font-family: inherit; }
.sp-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* ---------- 顶部导航角标：人员待审核计数（boss.js refreshStaffBadge） ---------- */
.tab-badge { display: inline-block; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px;
  margin-left: 5px; border-radius: 9px; background: var(--risk, #c0392b); color: #fff;
  font-size: 11.5px; font-weight: 700; vertical-align: 1px; }

/* ---------- 条款归属徽标（v6 2026-10-07：五栏 = 纪律/食安/现场/服务/出品）---------- */
.pill.c4 { background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; }
.pill.c4.c4-disc { background: #fdecec; border-color: #f3b8b8; color: var(--risk, #c0392b); }
.pill.c4.c4-food { background: #fff4e2; border-color: #f2cfa0; color: #a35b00; }
.pill.c4.c4-clean { background: #eaf6ee; border-color: #b6ddc3; color: #20734a; }
.pill.c4.c4-serv { background: #eaf1fb; border-color: #b9cdea; color: #1f5fa8; }
/* v6 新增：出品/菜品（紫，与纪律红区分）与晨会培训（灰青） */
.pill.c4.c4-dish { background: #f3eefb; border-color: #d3c2ea; color: #5b3a8c; }
.pill.c4.c4-train { background: #eaf2f2; border-color: #b8d2d2; color: #2c5f5f; }
/* 条款下拉候选里的栏目徽标：小一号，排在家族标签后面 */
.cp-c4 {
  flex: 0 0 auto; font-size: 10.5px; line-height: 1.5; padding: 0 5px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--ink-3); background: var(--bg); white-space: nowrap;
}
.cp-c4.c4-disc { background: #fdecec; border-color: #f3b8b8; color: var(--risk, #c0392b); }
.cp-c4.c4-food { background: #fff4e2; border-color: #f2cfa0; color: #a35b00; }
.cp-c4.c4-clean { background: #eaf6ee; border-color: #b6ddc3; color: #20734a; }
.cp-c4.c4-serv { background: #eaf1fb; border-color: #b9cdea; color: #1f5fa8; }
.cp-c4.c4-dish { background: #f3eefb; border-color: #d3c2ea; color: #5b3a8c; }
.cp-c4.c4-train { background: #eaf2f2; border-color: #b8d2d2; color: #2c5f5f; }
.cp-c4.c4-dish { background: #f3eefb; border-color: #d3c2ea; color: #5b3a8c; }
.cp-c4.c4-train { background: #eaf2f2; border-color: #b8d2d2; color: #2c5f5f; }
.isCat4Seg button { font-size: 12.5px; }

/* 「电脑没开机 / 手工补录」兜底折叠区：正常流程不需要它，所以默认收起。
   放出来只是为了让督导在转写工人没跑的时候还有一条路，不至于卡死。 */
.mt-manual { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.mt-manual > summary { cursor: pointer; font-size: 13px; color: var(--ink-3); list-style: none; outline: none; }
.mt-manual > summary::-webkit-details-marker { display: none; }
.mt-manual > summary::before { content: '▸ '; }
.mt-manual[open] > summary::before { content: '▾ '; }
.mt-manual > .hint { margin-top: 10px; }
.mt-manual > .field, .mt-manual > .row2, .mt-manual > .btn-row { margin-top: 10px; }
/* 晨会评分横向对照表：滚动限于自身，不改变晨会列表或其它表格布局。 */
.meet-scorecard { margin: 10px 0; min-width: 0; max-width: 100%; }
.meet-score-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; }
.meet-score-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.meet-score-table { width: 100%; min-width: 860px; table-layout: fixed; border-collapse: collapse; font-size: 12px; line-height: 1.55; }
.meet-score-table caption { text-align: left; padding: 9px 10px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--bg); }
.meet-score-table th, .meet-score-table td { padding: 8px; text-align: left; vertical-align: top; border-right: 1px solid var(--line); border-top: 1px solid var(--line); word-break: break-word; white-space: normal; }
.meet-score-table th { background: var(--bg); font-weight: 600; color: var(--ink-2); }
.meet-score-table th:first-child { width: 68px; }
.meet-score-table th:last-child, .meet-score-table td:last-child { border-right: 0; }
.meet-score-max { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.meet-score-value { display: block; margin-bottom: 4px; color: var(--brand); font-size: 14px; font-variant-numeric: tabular-nums; }
.meet-score-evidence { margin-bottom: 8px; }
.meet-score-evidence small { display: block; color: var(--ink-3); margin-top: 3px; }
.meet-score-history { color: var(--warn); }
.meet-score-tip { display: none; }
@media (max-width: 760px) { .meet-score-tip { display: block; } }
/* 单店明细使用屏幕可用宽度，桌面评分表随弹窗换行，避免横向拖动。 */
.modal.meet-store-detail { max-width: 1280px; }
@media (min-width: 700px) {
  .modal.meet-store-detail .meet-score-table { min-width: 0; }
  .modal.meet-store-detail .meet-score-tip { display: none; }
}

/* ① 晨会音频：页内播放条（音频链接是 1 小时签名，不落库不外发） */
.mt-play { margin: 0 0 12px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.mt-play-hd { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.mt-play audio { width: 100%; }

/* ③ 巡台记录：按门店分组的逐桌行 */
.pt-store { margin-bottom: 14px; }
.pt-store:last-child { margin-bottom: 0; }
.pt-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pt-rows { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; container-type: inline-size; }
.pt-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; background: var(--card); }
.pt-time-col { width: 64px; }
.pt-table-col { width: 84px; }
.pt-photo-col { width: var(--pt-photo-width); }
.pt-table th, .pt-table td { padding: 10px 12px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); vertical-align: middle; overflow-wrap: anywhere; }
.pt-table th { background: var(--brand-soft); color: var(--ink-2); font-weight: 600; text-align: left; }
.pt-table th:last-child, .pt-table td:last-child { border-right: 0; }
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table tbody tr:nth-child(even) { background: #fafbfe; }
.pt-t { color: var(--ink-3); }
.pt-n { font-weight: 600; }
.pt-h { margin-top: 3px; color: var(--ink-3); }
.pt-photos { text-align: right; }
.pt-photos .patrol-history { justify-content: flex-end; }
.pt-photos .patrol-history .patrol-history-photos { max-width: 100%; }
.pt-table .pill { white-space: normal; }
@media (max-width: 560px) {
  .pt-time-col { width: 48px; }
  .pt-table-col { width: 56px; }
  .pt-table th, .pt-table td { padding: 8px 6px; }
}
@container (max-width: 560px) {
  .pt-time-col { width: 48px; }
  .pt-table-col { width: 56px; }
  .pt-table th, .pt-table td { padding: 8px 6px; }
}

/* 巡台逐条照片：只约束本条证据区，避免改变巡店、整改等上传表单。 */
.patrol-evidence { margin: 12px 0; font-size: 13px; }
.patrol-evidence .patrol-grade { display: flex; align-items: center; min-height: 44px; }
.patrol-evidence [data-patrol-photo-label] { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.patrol-evidence .patrol-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 480px; margin: 8px 0; }
.patrol-evidence .patrol-photo-item { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.patrol-evidence .patrol-photo-thumb { display: block; width: 100%; max-width: 130px; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; }
.patrol-evidence .patrol-photo-state { display: block; margin: 6px 0; color: var(--ink-3); }
.patrol-evidence .patrol-photo-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.patrol-evidence .patrol-photo-actions .btn { min-height: 36px; padding: 4px 8px; }
.patrol-evidence .patrol-photo-error { display: block; color: #b3261e; font-size: 12px; overflow-wrap: anywhere; margin: 6px 0; }
/* 历史记录：文字可收缩换行，照片始终在右侧同排，数量增加时让出文字空间。 */
.patrol-history { display: flex; align-items: center; gap: 16px; width: 100%; margin: 0; }
.patrol-history-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.patrol-history-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.patrol-history-status .hint { margin: 0; }
.patrol-history .patrol-history-photos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; flex: 0 0 auto; width: calc(var(--patrol-photo-count) * 88px - 8px); max-width: 48%; margin-left: auto; }
.patrol-history-photo { min-width: 0; overflow-wrap: anywhere; }
.patrol-history .patrol-photo-thumb { width: 100%; height: auto; max-width: 80px; }
.patrol-history-photo .btn { max-width: 100%; white-space: normal; padding: 4px; }
.patrol-entry textarea { min-height: 76px; }
@media (max-width: 560px) {
  .patrol-entry .row2, .patrol-evidence .row2 { grid-template-columns: minmax(0, 1fr); }
  .patrol-evidence .patrol-grade { min-height: 28px; }
  .patrol-evidence .patrol-photo-grid { gap: 6px; }
  .patrol-evidence .patrol-photo-item { padding: 5px; }
  .patrol-history { gap: 10px; }
  .patrol-history .patrol-history-photos { gap: 4px; }
}

/* ⑦ 系统管理：二级页签（比一级矮一点，视觉上从属于一级） */
.tabs.sub { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; }
.tabs.sub button { flex: none; padding: 8px 14px; }

/* ---------- 门店配置页（系统管理 → 门店列表 → 「配置」进入） ----------
   四组内容各一张卡；最后一张是危险操作（删除门店），左侧红条提示「这一块不可逆」。 */
.danger-zone { border-left: 3px solid var(--risk); }
.danger-zone h3 { color: var(--risk); }
.danger-zone .btn.danger { width: auto; display: inline-block; padding: 9px 14px; font-size: 13px; margin-top: 4px; }

/* ---------- 门店管理制度和培训资料（2026-10-07p） ----------
   一页一份资料，不做表格：制度文件要看的是「名称/说明/版本/生效日」这些文字，
   表格会把长说明挤成一行，反而看不清。 */
.doc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 8px; }
.doc-q { flex: 1; min-width: 200px; padding: 8px 11px; font-size: 13.5px; font-family: inherit;
  border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); color: var(--ink); }
.doc-q:focus { outline: none; border-color: var(--brand); }
.doc-item .desc { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; white-space: pre-wrap; }
.doc-item .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-item .btn-row .btn { width: auto; flex: none; }

/* ---------------- 市场部月度工作（2026-10-07r） ---------------- */
.mk-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 2px; }
.mk-state-hint { font-size: 12.5px; color: var(--ink-3); }
.mk-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 14px 0 6px; }
.mk-kpi > div { background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 8px; text-align: center; }
.mk-kpi b { display: block; font-size: 19px; line-height: 1.25; color: var(--brand); }
.mk-kpi span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.mk-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.mk-cmp-col { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; background: var(--card); }
.mk-cmp-col .hd { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.mk-cmp-col .sub { font-size: 12px; color: var(--ink-3); margin: 2px 0 10px; }
.mk-cmp-col .k { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.mk-cmp-col .k b { font-size: 15px; color: var(--brand); }
.mk-cmp-col .k span { font-size: 12.5px; color: var(--ink-3); }
.mk-cmp-col .st { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.mk-cmp-col .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-cmp-col .btn-row .btn { width: auto; flex: none; }
.mk-task .hd .pill.gray { flex: none; }
.mk-exp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-exp > div { display: flex; flex-direction: column; gap: 4px; }
.mk-exp label { font-size: 12px; color: var(--ink-3); }
.mk-y { width: 76px; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); color: var(--ink); }
.doc-tools input.mk-y { width: 90px; flex: 0 0 90px; }

/* ===== MARKET-INCREMENT-START（市场部 计划/总结 增量，2026-10-08）=====
   仅用于新增结构：周分组头、日志、来源 pill。
   ★ 只用已定义的变量（--ink-2 / --ink-3 / --line / --line-2 / --bg / --card / --brand）
     —— 不要在这里引用未定义的变量名。 */
.mk-week { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 16px 0 8px; padding: 6px 2px; border-bottom: 2px solid var(--line-2); }
.mk-week .t { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.mk-week-sum { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.mk-log-foot { margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--line-2);
  font-size: 12.5px; color: var(--ink-3); }
.mk-log-foot b { color: var(--brand); }
.mk-log-foot a { color: var(--brand); text-decoration: none; }
.mk-revise a { color: var(--brand); text-decoration: none; margin-left: 4px; }
.mk-log { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.mk-log-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); }
.mk-log-row .h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.mk-log-row .h b { color: var(--ink-2); font-weight: 600; }
.mk-log-row .mk-time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.mk-log-row .mk-by { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.mk-diff { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; white-space: pre-wrap; }
.mk-src-pill { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
/* ===== MARKET-INCREMENT-END ===== */

/* ★ 全部门店按门店分组折叠视图（2026-10-15e）。
   ★★ 20261017z 老板指令改为**门店名网格**：折叠列表（.ml-group）已由 .ml-grid/.ml-cell
   取代 —— 页面只以方格横向排列门店名，不显示二级信息；点格子弹窗看该店全部明细。
   .ml-group 旧样式保留（历史版本快照对照用，当前代码不再输出该结构）。 */
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ml-cell {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  padding: 14px 10px; font-size: 14px; font-weight: 600; color: var(--ink, inherit);
  text-align: center; cursor: pointer; overflow-wrap: anywhere;
  transition: border-color .15s, box-shadow .15s;
}
.ml-cell:hover { border-color: var(--brand, #4a6cf7); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
/* 弹窗内的分类区块：间距收紧（弹窗空间比页面小） */
#modal .ml-sec { margin-top: 10px; }
#modal .ml-sec:first-child { margin-top: 0; }
.ml-sec { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg, transparent); }
.ml-sec > summary { cursor: pointer; padding: 8px 12px; display: flex; align-items: center; gap: 8px; list-style: none; outline: none; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ml-sec > summary::-webkit-details-marker { display: none; }
.ml-sec > summary::before { content: '▸ '; color: var(--ink-3); }
.ml-sec[open] > summary::before { content: '▾ '; }
.ml-sec[open] > summary { border-bottom: 1px solid var(--line); }
.ml-sec-body { padding: 10px 12px 12px; }
.ml-sec-body .item:first-child { margin-top: 0; }
/* ★ 20261015g：条目内联播放器/分析结论容器（空时不占位，渲染后紧贴按钮行下方） */
.mt-inline:empty { display: none; }
.mt-inline { margin-top: 8px; }
