/* 拉伽瑜伽 · 爆单系统 品牌样式 */
:root {
  --brand: #e8365a;          /* 拉伽品牌红 */
  --brand-deep: #c92548;
  --brand-soft: #fdeef2;
  --ink: #22242a;
  --ink-2: #6b7080;
  --line: #ececf0;
  --bg: #f6f6f8;
  --card: #ffffff;
  --ok: #2ba471;
  --warn: #f59e0b;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* 顶栏（固定定位 · 白底 + 品牌红点缀 · LOGO 与标题同行 · 紧凑） */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; border-bottom: 3px solid var(--brand);
}
.topbar .tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .logo { height: 30px; max-width: 160px; display: block; flex-shrink: 0; object-fit: contain; }
.topbar .tb-titles { min-width: 0; }
.topbar h1 { font-size: 16px; font-weight: 800; color: var(--brand); letter-spacing: .5px; margin: 0; line-height: 1.15; white-space: nowrap; }
.topbar .sub { font-size: 11px; color: var(--ink-2); margin-top: 1px; display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.topbar .tb-account { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar .tb-account .who { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.topbar .tb-account .who b { color: var(--ink); }
.btn-logout { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; background: #fff; color: var(--brand); border: 1px solid var(--brand); cursor: pointer; flex-shrink: 0; }
.btn-logout:active { background: var(--brand-soft); }
@media (min-width: 760px) { .topbar .sub { display: block; } }
/* 窄屏顶栏：收敛标题与账号区宽度，防止「管理后台」标题被账号文字压盖 */
@media (max-width: 520px) {
  .topbar { padding: 8px 10px; gap: 8px; }
  .topbar .logo { height: 26px; }
  .topbar h1 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
  .topbar .tb-left { gap: 8px; }
  .topbar .tb-account { min-width: 0; gap: 6px; }
  .topbar .tb-account .who { display: inline-block; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  /* 窄屏只留姓名，角色名（如「CW数据管理员」较长）隐藏，避免压盖标题 */
  .topbar .tb-account .who-role { display: none; }
  .topbar .tb-store { display: none; }
  .btn-logout { padding: 0 10px; }
}

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 58px;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 50; padding-bottom: env(safe-area-inset-bottom);
}
/* V2.5.0：底部导航文字加强可读性（所有角色通用）
 * 字号 11 → 12.5、字重 600（选中 800），图标略收 20 → 18 以抵消增大后的高度；
 * 导航条高度锁定 58px 不变，页面底部留白也不变 —— 只让文字更醒目，不挤占内容区。 */
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px; color: var(--ink-2); gap: 1px;
  line-height: 1.15; white-space: nowrap;
}
.tabbar a .ic { font-size: 18px; line-height: 1; }
.tabbar a.on { color: var(--brand); font-weight: 800; }
.tabbar a.on .ic { font-size: 19px; }
.page { padding: 58px 14px 90px; max-width: 560px; margin: 0 auto; }
.page.pull-up { margin-top: 0; }

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-top: 14px;
  box-shadow: 0 1px 4px rgba(30, 30, 60, .05);
}
.card h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h2::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--brand); }
.card .sub-h { font-size: 14px; font-weight: 700; color: var(--ink); margin: 6px 0 4px; }
.card hr.sep { border: none; border-top: 1px dashed var(--line); margin: 16px 0; }
.greet { font-size: 14px; font-weight: 700; line-height: 1.6; color: var(--brand); }

/* 表单 */
.field { margin-top: 14px; }
.field > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
select, input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="tel"], textarea {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; font-size: 15px; background: #fafafb; color: var(--ink);
  outline: none; appearance: none;
}
textarea { height: auto; padding: 10px 12px; }
select:focus, input:focus, textarea:focus { border-color: var(--brand); background: #fff; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 20px; border: none; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; width: 100%;
}
.btn:active { transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { height: 34px; font-size: 13px; border-radius: 9px; width: auto; padding: 0 14px; }
.btn.gray { background: #f1f1f4; color: var(--ink-2); }
.btn:disabled { opacity: .5; }
.btn.copied { background: #2f9e63; }
.btn.srt { padding: 0 9px; min-width: 32px; margin: 0 2px; }

/* 新增类表单：放大字号与输入框，优化间距、对齐与可读性 */
.add-form .add-title { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.add-grid { display: flex; flex-direction: column; gap: 14px; }
.add-item { display: flex; flex-direction: column; gap: 7px; }
.add-item > label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.add-grid input, .add-grid select {
  width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; font-size: 16px; background: #fafafb; color: var(--ink); outline: none;
}
.add-grid input:focus, .add-grid select:focus { border-color: var(--brand); background: #fff; }
.add-hint { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
/* 强化版新增表单（新增门店）：再放大一档字号与输入框 */
.add-form-lg .add-item > label { font-size: 15px; }
.add-form-lg .add-grid input, .add-form-lg .add-grid select { height: 54px; font-size: 17px; border-radius: 13px; }
.add-form-lg .btn { height: 52px; font-size: 16px; }
@media (min-width: 860px) {
  .add-form-lg .add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
}

/* 板块大标题：门店管理 / 新增门店 */
.card h2.sec-h-lg { font-size: 21px; letter-spacing: .3px; }
.card h2.sec-h-lg::before { height: 20px; width: 5px; }
.add-chk-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chk-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink);
  background: #f3f4f7; padding: 9px 13px; border-radius: 10px; cursor: pointer; user-select: none;
  border: 1px solid transparent;
}
.chk-pill input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.chk-pill.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* 可搜索长列表下拉（替代原生 select：门店 / 员工 / 馆主督导 等数量庞大时仍可完整浏览与选择） */
.ss-wrap { position: relative; width: 100%; box-sizing: border-box; }
.ss-wrap *, .ss-panel * { box-sizing: border-box; }
.ss-trigger {
  width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 15px;
  background: #fafafb; color: var(--ink); cursor: pointer; text-align: left; font-family: inherit;
}
.ss-trigger.open, .ss-trigger:focus { border-color: var(--brand); background: #fff; outline: none; }
.ss-trigger.disabled { opacity: .55; cursor: not-allowed; }
.ss-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ss-label.ss-ph { color: #9aa0ab; }
.ss-caret { color: #999; font-size: 12px; flex-shrink: 0; transition: transform .15s; }
.ss-trigger.open .ss-caret { transform: rotate(180deg); }
.ss-panel {
  position: fixed; z-index: 9999; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20,20,30,.18); overflow: hidden; display: none;
}
.ss-search {
  width: 100%; height: 42px; border: none; border-bottom: 1px solid var(--line); padding: 0 14px;
  font-size: 14px; outline: none; background: #fafafb; color: var(--ink);
}
.ss-search::placeholder { color: #9aa0ab; }
.ss-list { max-height: 50vh; overflow-y: auto; padding: 6px; -webkit-overflow-scrolling: touch; }
.ss-opt { padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-opt:hover { background: var(--brand-soft); }
.ss-opt.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.ss-opt.active { background: #eef0f4; }
.ss-empty { padding: 18px; text-align: center; color: var(--ink-2); font-size: 13px; }
/* 紧凑模式（如员工名单每行门店选择）*/
.ss-wrap.ss-compact { flex: 0 0 130px; width: 130px; }
.ss-wrap.ss-compact .ss-trigger { height: 34px; font-size: 13px; border-radius: 8px; padding: 0 10px; }
/* 业绩填报 · 拆分行内的开单人员下拉：继承原 select 的栅格占比 */
.split-row .ss-wrap { flex: 1.4; min-width: 0; }
/* 管辖门店（馆主 / 督导多选）：门店较多时内部滚动，避免把页面撑得过长 */
#na-managed-box, #app-managed-box { max-height: 220px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge.red { background: var(--brand-soft); color: var(--brand); }
.badge.green { background: #e8f7f0; color: var(--ok); }
.badge.gray { background: #f1f1f4; color: var(--ink-2); }
/* 营销活动门店徽标（不参与业绩目标 / 排名） */
.badge.campaign { background: #fff5e6; color: #a8531f; border: 1px solid #ffd9a8; }
/* V2.7.3：营销活动门店只保留「营销活动」标记，不再整行置灰 ——
 * 门店在做活动、暂不填报业绩，但它仍是一家正常营业的门店，数据用正常字色读起来更清楚。
 * （原先的 .store-excl 灰字规则已移除，类名仍留在 DOM 上以便将来区分） */
/* 爆单填写页「本店本月进度」卡片里的营销活动门店：保持原来的弱化展示（只在那一处生效，
 * 排行榜 / 进度表不再置灰）。 */
.goal-item.store-excl { color: #9aa0ab; background: #fafafa; }
.goal-item.store-excl .name, .goal-item.store-excl .pct { color: #9aa0ab; }

/* 目标进度条 */
.goal-item { margin-top: 14px; }
.goal-item .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goal-item .name { font-size: 14px; font-weight: 600; }
.goal-item .pct { font-size: 18px; font-weight: 800; color: var(--brand); }
.goal-item .nums { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.bar { height: 10px; background: #f1f1f4; border-radius: 5px; margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand), #f27392); transition: width .5s; }
.bar > i.full { background: linear-gradient(90deg, #35b37e, var(--ok)); }

/* 本店本月实时进度：团队贡献 + 全区排名 */
.team-contrib { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e6e8ee; }
.team-contrib .tc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.team-contrib .tc-row > b { font-size: 15px; color: var(--ink); font-weight: 700; }
.team-contrib .tc-rank { margin-top: 8px; font-size: 13px; color: #a8531f; background: #fff5ec; border: 1px solid #ffe0c2; border-radius: 8px; padding: 7px 10px; line-height: 1.5; }
.team-contrib .tc-rank > b { color: var(--brand); font-size: 15px; }

/* 开单喜报文本框 */
.report-box {
  white-space: pre-wrap; word-break: break-word;
  background: #fff7f0; border: 1px solid var(--brand-soft); border-radius: 10px;
  padding: 12px; font-size: 14px; line-height: 1.75; color: var(--ink);
  /* V2.3.7：喜报文字必须可选中（部分手机浏览器默认禁选，导致无法手动复制） */
  -webkit-user-select: text; user-select: text; cursor: text;
  -webkit-touch-callout: default;
}
.report-box.selected {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 2px var(--brand-soft);
}

/* 排行榜表格（白底 · 清爽） */
.board-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: #fff; border-radius: 10px; overflow: hidden;
  border: 1px solid #cdd4e0;
  box-shadow: 0 1px 4px rgba(30, 30, 60, .05);
}
.board-table thead th {
  background: var(--brand); color: #fff; font-weight: 700;
  border-bottom: 2px solid var(--brand-deep);
  border-right: 1px solid rgba(255, 255, 255, .26);
}
.board-table thead th:last-child { border-right: none; }
/* 行列框线：颜色比 --line 深一档，手机上不放大也能看清格与格的分界 */
.board-table th, .board-table td {
  padding: 11px 8px; text-align: center; white-space: nowrap;
  border-bottom: 1px solid #c5cedd; border-right: 1px solid #c5cedd;
}
.board-table th:last-child, .board-table td:last-child { border-right: none; }
.board-table tbody tr:last-child td { border-bottom: none; }
/* 列数较多（如个人榜 7 列）时允许容器横向滑动，避免中文被压成竖排 */
#boardTable { -webkit-overflow-scrolling: touch; }
#boardTable .board-table { min-width: 520px; }
.board-table td.name { font-weight: 600; color: var(--ink); text-align: left; }
.board-table td.target { color: var(--ink); font-weight: 700; }
.board-table td.actual { color: var(--ink); font-weight: 800; }
.board-table td.pct { font-weight: 800; }
.board-table tr.row-top { background: #fcecf2; }
.board-table tbody tr:nth-child(even):not(.row-top) td { background: #fafbfc; }
.board-table tr.rank-last td.name, .board-table tr.rank-last .pct { color: var(--brand); }
.c-rank, .board-table th:first-child { width: 46px; }
/* ---------- 前三名：冠 / 亚 / 季（V2.7.6） ----------
 * 沿用原来那块金属圆牌（金 / 银 / 铜渐变 + 高光 + 外沿），只把 1 2 3 换成 冠 亚 季；
 * 牌面比原来放大一档：25px / 12px 字 → 28px / 15.5px 字，「冠」这种多笔画的字才不糊。
 * 金色、铜色牌面用白字；银色牌面白字对比度只有 2.4:1，改用深墨字 #2b3440。
 * 高光 / 投影全部用 box-shadow 叠出来，不额外加图片，手机端也不掉帧。 */
.rk-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; vertical-align: middle;
  font-size: 15.5px; font-weight: 900; line-height: 1; letter-spacing: 0;
  color: #fff;
  box-shadow: 0 1px 3px rgba(20, 24, 32, .26),
              inset 0 -2px 3px rgba(0, 0, 0, .18),
              inset 0 2px 3px rgba(255, 255, 255, .45);
}
.rk-b1 {
  background: linear-gradient(155deg, #ffd451 0%, #d79b12 55%, #a26a05 100%);
  text-shadow: 0 1px 1px rgba(90, 55, 0, .55);
}
.rk-b2 {
  background: linear-gradient(155deg, #ffffff 0%, #b9c5d2 55%, #8794a3 100%);
  color: #2b3440;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.rk-b3 {
  background: linear-gradient(155deg, #f0c193 0%, #b96f33 55%, #8a4a1a 100%);
  text-shadow: 0 1px 1px rgba(80, 40, 10, .55);
}
.rank-n { color: var(--ink); font-weight: 700; }
/* 目标缺口：负（未达成）红 / 正（超额）绿 */
.board-table td.gap { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.board-table td.gap-neg { color: #d92b45; font-weight: 800; font-variant-numeric: tabular-nums; }
.board-table td.gap-pos { color: #0f8a4f; font-weight: 800; font-variant-numeric: tabular-nums; }
/* 冲刺排行榜：每个冲刺目标一张表 */
.sprint-block + .sprint-block { margin-top: 18px; }
.sprint-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 8px; flex-wrap: wrap; }
.sprint-head .muted { font-weight: 400; }
/* 出图结果：一次只展示一张，各自单独下载 */
.img-sheet { max-width: 640px; }
.img-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.img-tab {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.img-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.img-item { padding: 12px 0; text-align: center; }
.img-item-h { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.img-item img { max-width: 100%; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* 分配行 */
.split-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.split-row select { flex: 1.4; }
.split-row input { flex: 1; text-align: right; }
.split-row .amt { width: 76px; text-align: right; font-size: 13px; color: var(--brand); font-weight: 700; flex-shrink: 0; }
.split-row .del { width: 30px; height: 30px; border-radius: 8px; border: none; background: #f6e7eb; color: var(--brand); font-size: 16px; cursor: pointer; flex-shrink: 0; }

/* 未破蛋名单 */
.nosale-store { padding: 10px 0; border-bottom: 1px solid var(--line); }
.nosale-store:last-child { border-bottom: none; }
.nosale-head { font-weight: 700; font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.nosale-people { display: flex; flex-wrap: wrap; gap: 6px; }
.nosale-tag { background: #fdeef2; color: var(--brand); border-radius: 6px; padding: 3px 10px; font-size: 13px; }

/* 分段控件 */
.seg { display: flex; gap: 8px; }
.seg-btn { flex: 1; height: 40px; border: 1px solid var(--line); background: #fafafb; border-radius: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }

/* 只读账户横幅 */
.ro-banner { background: #fff7f0; border: 1px solid var(--brand-soft); color: var(--brand); font-size: 13px; padding: 10px 14px; border-radius: 10px; margin-top: 14px; }
/* 重要提示：输入框外部的红色强调文案（不使用 placeholder 承载提示） */
.warn-tip { background: #fff1f3; border: 1px solid #ffd0d8; color: #d81e3f; font-size: 13px; line-height: 1.7; padding: 9px 12px; border-radius: 9px; margin-top: 8px; }
.warn-tip b { color: #b8122f; }
body.readonly .only-admin { display: none !important; }
body.readonly .g-vis { display: none !important; }
/* 店长专属隐藏：门店管理 / 冲刺目标 等对馆主、督导可见，对店长不可见 */
body.role-store .not-store { display: none !important; }
.tg-group { border: 1px solid #eeeef2; border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.tg-group > summary { padding: 10px 12px; font-size: 14px; font-weight: 600; cursor: pointer; background: #fafafb; }
.tg-group > summary span.muted { font-weight: 400; }
.tg-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid #f4f4f7; }
.tg-row .tg-name { flex: 1 1 auto; min-width: 0; }
.tg-row input[type="number"] { width: 104px; height: 34px; }
/* 本月业绩目标：蓝色高亮突出 */
.tg-target-label { color: #1f6fe0; font-weight: 700; }
.tg-excl { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); margin-left: 6px; }
/* 督导 / 馆主：员工管理仅分门店只读展示，隐藏账号名单与新增员工入口 */
body.mode-manager #staffListBlock { display: none !important; }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: flex-end; justify-content: center; z-index: 100; }
.mask.show { display: flex; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 85dvh; overflow: auto; }
.sheet h3 { text-align: center; font-size: 16px; margin-bottom: 12px; }
/* 桌面端宽弹窗（业绩记录修改：字段多，两列排布，底部操作按钮吸底常驻） */
@media (min-width: 760px) {
  .sheet.sheet-lg { max-width: 760px; border-radius: 18px; margin-bottom: 20px; max-height: 88dvh; }
  .sheet-lg .em-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .sheet-lg .em-grid .field { margin-top: 12px; }
}
.sheet .modal-actions {
  position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom));
  background: #fff; padding: 10px 0 4px; box-shadow: 0 -6px 12px rgba(0,0,0,.04);
}

/* toast */
#toast {
  position: fixed; top: 18%; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,40,.86); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 200; display: none; max-width: 80vw; text-align: center;
}

/* 管理后台桌面布局 */
@media (min-width: 760px) {
  .page { max-width: 760px; }
  body.admin-body .page { max-width: 960px; }
}
/* 宽屏：管理后台表格列多（门店 7 列 / 账户 6 列 / 目标 7 列），放宽容器让每列都有呼吸空间 */
@media (min-width: 1240px) {
  body.admin-body .page { max-width: 1180px; }
}
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .muted { color: var(--ink-2); font-size: 12px; }

/* 门店管理表格：表头行明确区分「门店保底业绩」与「月目标业绩」两列 */.store-table { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-x: auto; overflow-y: hidden; }
.store-thead, .store-row {
  display: grid;
  grid-template-columns: minmax(146px, 1.6fr) 108px 108px 92px 108px 66px 174px;
  gap: 10px; align-items: center; padding: 10px 14px;
}
.store-table.mgr .store-thead, .store-table.mgr .store-row {
  grid-template-columns: minmax(160px, 1.6fr) 132px 132px 196px;
}
.store-thead {
  background: #f5f6f9; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.store-thead > span:nth-child(2), .store-thead > span:nth-child(3) { text-align: right; padding-right: 8px; }
.store-thead > span:last-child { text-align: right; }
.store-row { border-bottom: 1px solid var(--line); font-size: 14px; }
.store-row:last-child { border-bottom: none; }
.store-row:hover { background: #fcfcfd; }
.store-row .st-cell { min-width: 0; }
.store-row .st-name b { font-size: 15px; }
.store-row .st-name .muted { color: var(--ink-2); font-size: 12px; margin-top: 3px; }
.store-row input:not([type="checkbox"]), .store-row select { height: 38px; font-size: 15px; border-radius: 9px; padding: 0 10px; }
.store-row input[type="number"] { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.store-row input.sm-base { color: #237a55; background: #f5fbf7; border-color: #cfe9db; }
.store-row input.sm-target { color: #1f5fc0; background: #f5f8fe; border-color: #cfe0f8; }
.st-ro { display: block; font-weight: 700; color: #237a55; text-align: right; font-variant-numeric: tabular-nums; }
.store-row .st-excl { display: flex; align-items: center; }
.store-row .st-excl .chk { gap: 0; }
.store-row .st-ops { display: flex; gap: 5px; justify-content: flex-end; align-items: center; }
.store-row .st-ops .btn { padding: 0 9px; }

/* 手机 / 窄屏：表头隐藏，每行转「标签在上、控件在下」的两列布局，不必横向滚动 */
@media (max-width: 900px) {
  .store-thead { display: none; }
  .store-row, .store-table.mgr .store-row {
    grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 14px;
  }
  .store-row .st-cell { display: flex; flex-direction: column; gap: 5px; }
  .store-row .st-cell::before {
    content: attr(data-l); font-size: 12px; font-weight: 600; color: var(--ink-2);
  }
  .store-row .st-name, .store-row .st-ops { grid-column: 1 / -1; }
  .store-row .st-ops { flex-direction: row; justify-content: flex-start; }
  .store-row .st-ops::before { content: none; }
  .store-row input:not([type="checkbox"]), .store-row select, .st-ro { text-align: left; }
  .store-row input:not([type="checkbox"]), .store-row select { height: 44px; font-size: 16px; }
}
.switch { position: relative; display: inline-block; vertical-align: middle; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch em { position: absolute; inset: 0; background: #d8d8de; border-radius: 13px; transition: .2s; cursor: pointer; }
.switch em::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + em { background: var(--ok); }
.switch input:checked + em::after { left: 20px; }
.section-tip { font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.7; }

/* ===== 管理后台通用列表（员工 / 账户 / 冲刺目标）：与门店管理同一套视觉 ===== */
.adm-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-toolbar .adm-flt {
  height: 44px; font-size: 15px; border-radius: 11px; border: 1px solid var(--line);
  background: #fafafb; padding: 0 12px; color: var(--ink); font-family: inherit; outline: none;
  width: auto; /* 覆盖全局 select/input 的 width:100%，否则每个筛选都会独占一行 */
}
.adm-toolbar select.adm-flt { flex: 0 0 auto; min-width: 168px; }
.adm-toolbar input.adm-flt { flex: 1 1 220px; min-width: 160px; }
.adm-toolbar .adm-flt:focus { border-color: var(--brand); background: #fff; }
.adm-count { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

.adm-table { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-x: auto; }
.adm-thead, .adm-row { display: grid; gap: 12px; align-items: center; padding: 12px 14px; }
.adm-thead {
  background: #f5f6f9; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.adm-row { border-bottom: 1px solid var(--line); font-size: 15px; }
.adm-row:last-child { border-bottom: none; }
.adm-row:hover { background: #fcfcfd; }
.adm-row .adm-cell { min-width: 0; }
.adm-row .adm-name { font-size: 16px; font-weight: 700; }
.adm-row .adm-name .muted { font-size: 12px; font-weight: 400; margin-top: 3px; color: var(--ink-2); }
.adm-row input:not([type="checkbox"]), .adm-row select { height: 44px; font-size: 16px; border-radius: 10px; padding: 0 12px; }
.adm-row input[type="number"] { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-row .adm-ops { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.adm-row .adm-ops .btn { height: 36px; font-size: 14px; padding: 0 12px; }
.adm-empty { padding: 22px 14px; text-align: center; color: var(--ink-2); font-size: 14px; }

/* 员工表：姓名 / 所属门店 / 本月目标 / 不参与 / 操作 */
.adm-table.staff .adm-thead, .adm-table.staff .adm-row {
  grid-template-columns: minmax(132px, 1fr) minmax(176px, 1.45fr) 116px 104px 186px;
}
/* 行内门店下拉：字号略小，保证「松山湖佳纷天地会馆」这类长名完整显示 */
.adm-row select.sf-store { font-size: 14px; height: 40px; padding: 0 10px; background-position: right 9px center; }
/* 行内可搜索下拉（门店 / 人员）：铺满列宽，高度与行内输入框一致 */
.adm-row .ss-wrap, .adm-row .ss-wrap.ss-compact { flex: 1 1 100%; width: 100%; }
.adm-row .ss-wrap .ss-trigger { height: 40px; font-size: 15px; border-radius: 10px; }
/* 账户表：姓名 / 手机号 / 角色 / 状态 / 归属 / 操作 */
.adm-table.acc .adm-thead, .adm-table.acc .adm-row {
  grid-template-columns: minmax(110px, 1.1fr) 132px 84px 78px minmax(110px, 1fr) 224px;
}
/* 目标表：名称 / 金额 / 范围 / 起止 / 完成 / 展示 / 操作 */
.adm-table.goal .adm-thead, .adm-table.goal .adm-row {
  grid-template-columns: minmax(130px, 1.4fr) 104px minmax(130px, 1.2fr) 168px 92px 64px 72px;
}
/* 业绩记录表：日期 / 门店 / 会员名称 / 整单 / 分配明细 / 操作 */
.adm-table.entry .adm-thead, .adm-table.entry .adm-row {
  grid-template-columns: 92px minmax(100px, 0.8fr) minmax(90px, 0.7fr) 104px minmax(200px, 1.7fr) 140px;
  align-items: start;
}
.adm-cell.adm-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-cell.adm-pct { font-weight: 800; }
.adm-sub { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); margin-top: 3px; }
/* 业绩记录里的分配明细 */
.entry-split { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.entry-split .sp {
  display: inline-flex; align-items: center; gap: 5px; background: #f5f6f9; border-radius: 8px;
  padding: 3px 9px; font-size: 13px; color: var(--ink);
}
.entry-split .sp b { color: var(--brand); font-variant-numeric: tabular-nums; }
.entry-split .sp em { font-style: normal; color: var(--ink-2); font-size: 12px; }
.entry-line { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 1.6; }

/* 门店管理（督导 / 馆主）：勾选「修改」前两项目标为只读态 */
.store-row.mgr input:disabled { background: #f6f7f9; border-color: var(--line); color: var(--ink-2); }

/* 操作日志：每条一块，详情整段可读（业绩分配明细较长） */
.oplog-row {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff;
}
.oplog-row.entry { border-left: 3px solid var(--brand); }
.oplog-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.oplog-h b { color: var(--ink); }
.oplog-tag { font-size: 13px; font-weight: 700; }
.oplog-t { margin-left: auto; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.oplog-target { font-size: 14px; color: var(--ink); margin-top: 4px; }
.oplog-detail {
  font-size: 13.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}
.oplog-who { font-size: 12px; color: var(--ink-2); margin-top: 5px; }

/* ===== 历史开单看板（V2.3.3） ===== */
.req { color: var(--brand); font-size: 11px; font-weight: 700; margin-left: 2px; vertical-align: 1px; }

/* V2.3.5 业绩填报：填报项标题突出显示 —— 左侧品牌色条 + 加粗放大，逐项扫读更清晰 */
.entry-form .field > label {
  display: block; font-size: 15px; font-weight: 800; color: var(--ink);
  padding: 5px 10px; margin-bottom: 8px;
  border-left: 4px solid var(--brand);
  border-radius: 0 6px 6px 0;
  background: rgba(127, 127, 127, 0.09);
  letter-spacing: .2px;
}
/* 客户来源下拉：来源项较多，保证展开后完整可滚动选择 */
.entry-form select#source { width: 100%; font-size: 15px; }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 6px; }
@media (min-width: 760px) { .kpi-row { grid-template-columns: repeat(6, 1fr); } }
.kpi-card {
  background: var(--brand-soft); border: 1px solid #f7d9e1; border-radius: 12px;
  padding: 12px 10px; text-align: center;
}
.kpi-card .k { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.kpi-card .v { font-size: 17px; font-weight: 800; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.table-wrap { margin: 6px 0 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.dash-table th, .dash-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dash-table th { background: #fafafb; color: var(--ink-2); font-weight: 700; font-size: 13px; position: sticky; top: 0; }
.dash-table td { color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-table tbody tr:hover { background: #fcfcfd; }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table td.muted { color: var(--ink-2); }
.dash-range > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.dash-stores > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
#dash-store-box .chk { background: #fafafb; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
#dash-store-box .chk input { width: 15px; height: 15px; margin: 0 4px 0 0; accent-color: var(--brand); vertical-align: -2px; }

@media (max-width: 900px) {
  .adm-thead { display: none; }
  .adm-table.staff .adm-row, .adm-table.acc .adm-row, .adm-table.goal .adm-row,
  .adm-table.entry .adm-row {
    grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 14px;
  }
  .adm-row .adm-cell { display: flex; flex-direction: column; gap: 5px; }
  .adm-row .adm-cell::before {
    content: attr(data-l); font-size: 12px; font-weight: 600; color: var(--ink-2);
  }
  .adm-row .adm-name, .adm-row .adm-ops { grid-column: 1 / -1; }
  /* 业绩分配明细内容较长：手机端独占整行，避免与整单金额挤在一起（新增会员名称列后为第 5 格） */
  .adm-table.entry .adm-cell:nth-child(5) { grid-column: 1 / -1; }
  .adm-row .adm-ops { flex-direction: row; justify-content: flex-start; }
  .adm-row .adm-ops::before { content: none; }
  .adm-row .adm-cell input, .adm-row .adm-cell select { text-align: left; }
  .adm-cell.adm-num { text-align: left; }
  .adm-toolbar select.adm-flt, .adm-toolbar input.adm-flt { flex: 1 1 100%; min-width: 0; }
}

/* 只读账户：隐藏所有写操作控件 */
body.readonly .only-admin { display: none !important; }
body.readonly .g-vis { display: none !important; }

/* ============ 每日业绩核对（V2.5.0） ============
 * 桌面端一屏多行、行高紧凑；手机端把每一行折叠成「日期 → 金额 → 输入 → 结论」四段，
 * 不需要横向滚动，也不会出现双滚动条（只有日期区间过长时列表内部才有滚动）。 */
.page.rc-page { max-width: 1400px; padding: 58px 16px 88px; background: #f6f7fa; }
.rc-toolbar { position: sticky; top: 52px; z-index: 20; padding: 12px 14px; }
.rc-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.rc-tool { display: flex; flex-direction: column; gap: 4px; min-width: 148px; }
.rc-tool label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.rc-tool input, .rc-tool select {
  height: 36px; padding: 0 10px; border: 1px solid #dfe2ea; border-radius: 10px;
  font-size: 13.5px; color: var(--ink); background: #fff; font-family: inherit; min-width: 0;
}
.rc-tool-btn { min-width: 0; }
.rc-tool-btn .btn { height: 36px; }

.rc-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rc-q {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 12px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.rc-q:active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.rc-rpt {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line);
}
.rc-rpt-label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.rc-rpt input {
  height: 32px; padding: 0 8px; border: 1px solid #dfe2ea; border-radius: 9px;
  font-size: 13px; background: #fff; color: var(--ink); font-family: inherit;
}

.rc-summary { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.rc-sum-item {
  background: #eef2f8; border: 1px solid #e2e8f1; border-radius: 10px; padding: 5px 11px;
  display: flex; flex-direction: column; gap: 2px; min-width: 78px;
}
.rc-sum-item span { font-size: 11px; font-weight: 700; color: #5b6478; letter-spacing: .3px; }
.rc-sum-item b { font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1f2430; }
.rc-sum-item.ok b { color: #1f9e57; }
.rc-sum-item.diff b { color: #d6455f; }
.rc-sum-item.rc-sum-po { background: #e9f1fc; border-color: #c9ddf7; }
.rc-sum-item.rc-sum-po span { color: #2f5fc0; }
.rc-sum-item.rc-sum-po b { color: #1d4fb0; }

/* 卡片 */
.rc-card {
  background: var(--card); border: 1px solid #d7dce8; border-radius: 14px; margin-top: 14px;
  box-shadow: 0 2px 10px rgba(30, 30, 60, .08); overflow: hidden;
}
/* 多门店时，卡片之间用更明显的边框 + 间距区分，避免相邻门店混在一起 */
.rc-card + .rc-card { margin-top: 16px; border-color: #c3ccdd; }
.rc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.rc-title { font-size: 15px; font-weight: 800; }
.rc-sub { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.rc-red { color: var(--brand); }
.rc-kpis { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-kpi {
  background: #f3f5f9; border: 1px solid #e6e9f0; border-radius: 8px;
  padding: 4px 9px; display: flex; gap: 5px; align-items: baseline;
}
.rc-kpi i { font-style: normal; font-size: 11px; font-weight: 600; color: #50596b; white-space: nowrap; }
.rc-kpi b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #2a2f3a; }
.rc-kpi b.ok { color: var(--ok); }
.rc-kpi b.diff { color: var(--brand); }
.rc-kpi b.idle { color: var(--ink-2); }
/* POS+其他总计：重点列，用单一蓝色强调，便于核对人员一眼定位 */
.rc-kpi.rc-kpi-po { background: #eaf2fd; border-color: #cfe0f7; }
.rc-kpi.rc-kpi-po i { color: #2f5fc0; font-weight: 700; }
.rc-kpi.rc-kpi-po b { color: #1d4fb0; }
.rc-cw { color: #2a2f3a; }

/* 逐日表格：紧凑行距 */
.rc-days { overflow: auto; }
.rc-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rc-tbl thead th {
  position: sticky; top: 0; z-index: 2; background: #f2f4f8;
  font-size: 11.5px; font-weight: 800; color: #3a4150;
  padding: 8px 8px; text-align: left; border-bottom: 2px solid #d7dbe6; white-space: nowrap;
}
.rc-tbl td { padding: 2px 8px; border-bottom: 1px solid #f2f3f7; vertical-align: middle; height: 32px; }
.rc-tbl tr:last-child td { border-bottom: none; }
.rc-tbl tbody tr:hover { background: #fcfcfe; }
.rc-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== V2.7.3 单店流水（rc-flow-card）：小字放大突出 + 完整表格线 + 整笔业绩加粗 ===== */
/* ① 标题下那行「2026-11 · 共 6 笔 · 业绩合计 ¥23,329」原来是 11.5px 灰字，逐笔核对时几乎看不见，
 *    改成浅色块 + 左侧品牌色竖条，数字用品牌色加粗，一眼能读到笔数与合计 */
.rc-flow-card .rc-sub {
  font-size: 14px; font-weight: 700; color: #2a2f3a;
  margin-top: 6px; padding: 8px 12px; line-height: 1.5;
  background: #f4f7fc; border: 1px solid #d7e0ee; border-left: 3px solid var(--brand);
  border-radius: 8px; letter-spacing: .2px;
}
.rc-flow-card .rc-sub b { color: var(--brand); font-size: 15.5px; font-weight: 800; }
/* ② 流水表恢复完整表格线：外框 + 每一列的竖线 + 每一行的横线，颜色比原来的 #f2f3f7 深两档 */
table.rc-tbl.rc-ftbl { border-collapse: collapse; border: 1px solid #b9c4d6; }
table.rc-tbl.rc-ftbl thead th { background: #eef1f7; border-right: 1px solid #c8d2e2; border-bottom: 2px solid #b9c4d6; }
table.rc-tbl.rc-ftbl tbody td { border-right: 1px solid #d3dbe8; border-bottom: 1px solid #d3dbe8; }
table.rc-tbl.rc-ftbl thead th:last-child,
table.rc-tbl.rc-ftbl tbody td:last-child { border-right: none; }
table.rc-tbl.rc-ftbl tbody tr:last-child td { border-bottom: none; }
/* ③ 整笔业绩是核对的锚点，加粗放大一档 */
table.rc-tbl.rc-ftbl td.rc-amt { font-weight: 800; color: #1f2430; font-size: 13px; }
.rc-date { white-space: nowrap; font-weight: 700; }
.rc-wd { color: var(--ink-2); font-weight: 400; font-size: 10.5px; margin-left: 5px; }
.rc-cnt { display: block; font-size: 10px; color: var(--ink-2); font-weight: 400; }
.rc-date b { display: inline-block; }

/* 行内输入
 * 注意：必须写成 input.rc-in —— 全局「select, input[type=text|number] {height:44px;font-size:15px}」
 * 的特异性是 (0,1,1)，只写 .rc-in (0,1,0) 会被它压住，导致行内输入框一直 44px 撑高表格行。 */
input.rc-in {
  width: 92px; height: 26px; padding: 0 6px; border: 1px solid #b3c0d8; border-radius: 7px;
  font-size: 12.5px; text-align: right; color: #1f2430; background: #fcfdff;
  font-variant-numeric: tabular-nums; font-family: inherit;
}
input.rc-in::placeholder { color: #9aa3b5; }
input.rc-in:focus { border-color: #2f5fc0; outline: none; box-shadow: 0 0 0 2px rgba(47, 95, 192, .16); }
input.rc-note-in { width: 100%; min-width: 130px; text-align: left; }
.rc-num { color: var(--ink); font-variant-numeric: tabular-nums; }
.rc-note-txt { color: var(--ink-2); font-size: 12px; }
.rc-po-td { background: #f1f6ff; font-weight: 700; color: #1d4fb0; }
.rc-po-td b { color: #1d4fb0; }

/* 核对结论 */
.rc-vd { min-width: 170px; }
.rc-badge {
  display: inline-block; font-size: 11.5px; line-height: 1.5; padding: 2px 7px;
  border-radius: 6px; background: #f4f5f8; color: var(--ink-2);
}
.rc-badge.ok { background: #eaf7f0; color: var(--ok); font-weight: 700; }
.rc-badge.diff { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.rc-at { display: block; font-size: 10px; color: #a4a9b6; margin-top: 1px; }
.rc-act { text-align: right; white-space: nowrap; }
.rc-act .btn { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }

/* ===== 数据核对 V2.5.2：双子模块 + 门店多选 + 当日本店汇总 + 月度核对说明 ===== */
.rc-mod { margin-top: 4px; }
.rc-mod-h {
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800;
  color: var(--ink); margin: 16px 2px 8px;
}
.rc-mod-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px; background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 800; flex: 0 0 auto;
}
/* 明显区分线：① 按日核对 与 ② 月度核对关账 之间 */
.rc-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0 4px;
  color: var(--brand); font-weight: 800; font-size: 13px;
}
.rc-divider::before, .rc-divider::after {
  content: ''; flex: 1 1 auto; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 40%, var(--brand));
}
.rc-divider::after { background: linear-gradient(90deg, var(--brand), var(--brand) 60%, transparent); }
.rc-divider span { flex: 0 1 auto; text-align: center; line-height: 1.35; padding: 0 4px; }

/* 门店多选（自写组件，ssUpgrade 仅单选） */
.rc-tool-stores { flex: 1 1 220px; min-width: 180px; }
.rc-multi { position: relative; }
.rc-multi-trigger {
  width: 100%; height: 36px; padding: 0 32px 0 10px; border: 1px solid #dfe2ea; border-radius: 10px;
  background: #fff; font-size: 13.5px; color: var(--ink); font-family: inherit; text-align: left;
  position: relative; cursor: pointer;
}
.rc-multi-trigger .rc-multi-caret {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none;
}
.rc-multi-label.ph { color: #9aa3b5; }
.rc-multi-panel {
  position: fixed; z-index: 9999; display: none; background: #fff; border: 1px solid #e2e8f1;
  border-radius: 12px; box-shadow: 0 8px 28px rgba(20, 30, 60, .18); padding: 8px; max-height: 60vh; overflow: auto;
}
.rc-multi-search {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid #dfe2ea; border-radius: 8px;
  font-size: 13px; font-family: inherit; margin-bottom: 6px; box-sizing: border-box;
}
.rc-multi-bar { display: flex; gap: 6px; margin-bottom: 6px; }
.rc-multi-act {
  flex: 1 1 0; border: 1px solid var(--line); background: #f6f7fa; border-radius: 8px;
  padding: 5px 0; font-size: 12px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.rc-multi-act:active { border-color: var(--brand); color: var(--brand); }
.rc-multi-list { display: flex; flex-direction: column; }
.rc-multi-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px;
  font-size: 13px; cursor: pointer;
}
.rc-multi-opt:hover { background: #f6f7fa; }
.rc-multi-opt input { width: 16px; height: 16px; flex: 0 0 auto; }
.rc-multi-empty { text-align: center; color: var(--ink-2); font-size: 12px; padding: 8px; }

/* 当日本店（当日）汇总：门店名后小字换行 */
.rc-ds { padding: 8px 12px 10px; background: #fafbff; border-bottom: 1px solid var(--line); }
.rc-ds-h { font-size: 11.5px; font-weight: 700; color: var(--brand-deep); margin-bottom: 6px; }
.rc-ds-items { display: flex; flex-wrap: wrap; gap: 5px 8px; }
.rc-ds-i {
  background: #fff; border: 1px solid #e6ebf4; border-left: 3px solid #c9d8f0; border-radius: 7px;
  padding: 3px 8px; display: flex; flex-direction: column; min-width: 0;
}
.rc-ds-i i { font-style: normal; font-size: 10.5px; font-weight: 600; color: #5b6478; white-space: nowrap; }
.rc-ds-i b { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1f2430; line-height: 1.2; }
.rc-ds-i.ok b { color: var(--ok); }
.rc-ds-i.diff b { color: var(--brand); }
.rc-ds-i.rc-ds-po { border-left-color: #2f5fc0; background: #eef4ff; }
.rc-ds-i.rc-ds-po i { color: #2f5fc0; font-weight: 700; }
.rc-ds-i.rc-ds-po b { color: #1d4fb0; }

/* 本月度汇总 */
.rc-month-sum { padding: 8px 12px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.rc-ms-h { font-size: 11.5px; font-weight: 700; color: var(--brand-deep); margin-bottom: 6px; }
.rc-ms-items { display: flex; flex-wrap: wrap; gap: 5px 8px; }
.rc-ms-i {
  background: #f7f8fb; border: 1px solid #e6e9f0; border-left: 3px solid #c9d8f0; border-radius: 7px;
  padding: 3px 8px; display: flex; flex-direction: column; min-width: 0;
}
.rc-ms-i i { font-style: normal; font-size: 10.5px; font-weight: 600; color: #5b6478; white-space: nowrap; }
.rc-ms-i b { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1f2430; line-height: 1.2; }
.rc-ms-i.ok b { color: var(--ok); }
.rc-ms-i.diff b { color: var(--brand); }
.rc-ms-i.rc-ms-po { border-left-color: #2f5fc0; background: #eef4ff; }
.rc-ms-i.rc-ms-po i { color: #2f5fc0; font-weight: 700; }
.rc-ms-i.rc-ms-po b { color: #1d4fb0; }

/* 月度核对说明卡片 */
.rc-note-card { margin: 10px 12px; border: 1px dashed #cdd8ea; background: #fbfcff; border-radius: 10px; padding: 9px 11px; }
.rc-note-h { font-size: 11.5px; font-weight: 700; color: var(--brand-deep); margin-bottom: 5px; }
.rc-note-body { font-size: 12.5px; line-height: 1.7; color: #2a2f3a; white-space: pre-wrap; word-break: break-word; }

/* V2.5.5 月度备注说明（CW数据管理员 手工填写，位于月度核对说明之下） */
.rc-remark-card { border-style: solid; border-color: #c9d9f0; background: #f7faff; }
.rc-remark-tip { display: block; font-size: 10.5px; font-weight: 400; color: #8a93a6; margin-top: 2px; }
.rc-remark-ta { width: 100%; min-height: 72px; margin-top: 4px; padding: 8px 10px; border: 1px solid #d7dce8; border-radius: 8px; background: #fff; font-size: 12.5px; line-height: 1.6; color: #2a2f3a; resize: vertical; box-sizing: border-box; font-family: inherit; }
.rc-remark-ta:focus { outline: none; border-color: var(--brand); }
.rc-remark-meta { font-size: 10.5px; color: #8a93a6; margin-top: 4px; }
.rc-remark-actions { padding: 8px 0 0; }

/* 状态条 */
.rc-status { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; }
.rc-status-warn { background: #fff6e8; color: #9a6a12; border: 1px solid #f0d9a8; }
.rc-status-open { background: #eef4ff; color: #23509e; border: 1px solid #cfe0f7; }
.rc-status-closed { background: #eaf7f0; color: #1f7a4d; border: 1px solid #bfe3cd; }

/* 底部操作区 */
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 14px 14px; }
.rc-actions .btn { height: 38px; padding: 0 18px; font-size: 13.5px; border-radius: 10px; font-weight: 700; }
.btn.danger { background: var(--brand); color: #fff; border: none; }
.btn.danger:active { background: var(--brand-deep); }
.btn.primary { background: #2f5fc0; color: #fff; border: none; }
.btn.primary:active { background: #244a96; }
.btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }

/* 逐笔业绩明细（V2.5.4） */
.rc-entries { border-top: 8px solid #f5f6fa; padding: 10px 12px 4px; }
.rc-entries-h { font-size: 13px; font-weight: 700; color: var(--ink); margin: 2px 0 8px; }
.rc-entries-tool { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-entry-search { flex: 1 1 220px; min-width: 0; }
.rc-entries-cnt { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.rc-etbl thead th { white-space: nowrap; }
.rc-etbl td { font-size: 12px; }
.rc-etbl td b { color: var(--ink); }

/* 关账二次确认弹窗 */
.rc-confirm-sheet { max-width: 360px; text-align: center; padding: 22px 20px 18px; }
.rc-confirm-ic { font-size: 30px; margin-bottom: 8px; }
.rc-confirm-text { font-size: 14px; line-height: 1.6; color: var(--ink); margin: 0 0 16px; font-weight: 600; }
.rc-confirm-btns { display: flex; gap: 10px; }
.rc-confirm-btns .btn { flex: 1 1 0; height: 38px; border-radius: 10px; font-weight: 700; }
/* V2.5.9：提交爆单两次确认弹窗 —— 左对齐的提示正文与核对摘要（复用 .rc-confirm-sheet 居中容器） */
.subm-confirm-text { text-align: left; font-size: 14px; line-height: 1.7; color: var(--ink); font-weight: 600; margin: 0 0 12px; }
.subm-confirm-text p { margin: 0 0 4px; }
.subm-summary { text-align: left; background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 0 0 16px; word-break: break-all; }
.subm-summary b { color: var(--ink); }
.subm-summary .subm-row + .subm-row { margin-top: 4px; }

/* 月度汇总（按门店） */
.rc-month { margin-top: 16px; }
.rc-month-h { font-size: 14px; font-weight: 800; margin: 0 0 8px 2px; }
.rc-month-wrap {
  background: var(--card); border-radius: 14px; box-shadow: 0 1px 4px rgba(30, 30, 60, .06); overflow: auto;
}
.rc-month-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 720px; }
.rc-month-tbl th {
  background: #f2f4f8; font-size: 11.5px; font-weight: 800; color: #3a4150;
  padding: 9px 9px; text-align: left; border-bottom: 2px solid #d7dbe6; white-space: nowrap;
}
.rc-month-tbl td { padding: 6px 9px; border-bottom: 1px solid #f2f3f7; }
.rc-month-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.rc-month-tbl td.ok { color: var(--ok); font-weight: 700; }
.rc-month-tbl td.diff { color: var(--brand); font-weight: 700; }
.rc-month-tbl tfoot td { background: #fbfbfd; font-weight: 800; border-top: 1px solid var(--line); border-bottom: none; }

/* 手机端：表格折叠为逐日卡片，彻底避免横向滚动
 * 每个「日」占 4~5 个紧凑行：日期 → 业绩/POS/其他/CW总（2×2）→ 结论 → 备注 → 保存，
 * 单行高度约 160~180px，一屏可看 3~4 天，不必左右拖动。 */
@media (max-width: 760px) {
  .page.rc-page { padding: 54px 10px 82px; }
  .rc-toolbar { position: static; padding: 9px 10px; }
  .rc-tools { gap: 6px; }
  /* 两行搞定筛选：起 | 止 → 门店 | 刷新（原来刷新独占一行，白吃掉 54px 竖向空间） */
  .rc-tool { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .rc-tool input, .rc-tool select { height: 34px; font-size: 13px; }
  .rc-tool-btn { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .rc-tool-btn .btn { width: 100%; height: 34px; }
  .rc-quick { margin-top: 7px; gap: 5px; }
  .rc-q { padding: 4px 10px; font-size: 11.5px; }
  .rc-rpt { margin-top: 7px; padding-top: 7px; gap: 6px; }
  .rc-rpt input { height: 30px; }
  .rc-rpt .btn { flex: 1 1 100%; height: 32px; }
  .rc-summary { gap: 6px; margin-top: 8px; }
  .rc-sum-item { padding: 3px 7px; min-width: 0; }
  .rc-sum-item span { font-size: 10px; }
  .rc-sum-item b { font-size: 12.5px; }
  .rc-tip-extra { display: none; }          /* 手机端省掉「记录永久保存」这句，口径说明保留 */
  .rc-head { padding: 9px 11px; }
  .rc-kpi { padding: 2px 7px; }

  .rc-tbl thead { display: none; }
  .rc-tbl, .rc-tbl tbody { display: block; }
  .rc-tbl tr {
    /* minmax(0,1fr) 而不是 1fr：1fr 的最小值取 min-content，输入框的内在宽度会把列撑到
       199+203px，整行溢出卡片（右侧出现细滚动条）。minmax(0,…) 强制列宽严格按容器均分。 */
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 9px;
    padding: 6px 10px 7px; border-bottom: 1px solid #f0f1f5;
  }
  .rc-tbl td {
    display: flex; align-items: center; justify-content: flex-start; gap: 4px;
    border: none; padding: 0; height: auto; min-height: 28px; font-size: 12px;
  }
  .rc-tbl td > * { margin-left: auto; }          /* 数值一律靠右，标签靠左 */
  .rc-tbl td::before {
    content: attr(data-l); font-size: 11px; font-weight: 700; color: #4a5160;
    white-space: nowrap; flex: 0 0 auto;
  }
  .rc-tbl td.rc-date, .rc-tbl td.rc-vd, .rc-tbl td.rc-note-td, .rc-tbl td.rc-act { grid-column: 1 / -1; }
  .rc-tbl td.rc-date { justify-content: flex-start; gap: 7px; min-height: 20px; }
  .rc-tbl td.rc-date::before { display: none; }
  .rc-tbl td.rc-vd { justify-content: flex-start; gap: 6px; min-height: 22px; }
  .rc-tbl td.rc-vd::before { display: none; }
  .rc-tbl td.rc-vd > * { margin-left: 0; }
  .rc-tbl td.rc-vd .rc-at { margin: 0; }
  .rc-tbl td.rc-note-td { min-height: 30px; }
  .rc-tbl td.rc-act { justify-content: flex-end; min-height: 28px; }
  .rc-tbl td.rc-act::before { display: none; }
  .rc-cnt { display: inline; margin-left: 4px; }
  input.rc-in { width: auto; flex: 1 1 auto; min-width: 0; max-width: none; height: 28px; padding: 0 6px; }
  input.rc-in.rc-note-in { width: 100%; }
  .rc-act .btn { height: 28px; padding: 0 14px; }
  .rc-month-tbl { min-width: 640px; }
  .rc-tool-stores { flex: 1 1 100%; }
  .rc-mod-h { margin: 14px 2px 6px; font-size: 14px; }
  .rc-divider { margin: 18px 0 2px; font-size: 12px; }
  .rc-actions { padding: 10px; }
  .rc-actions .btn { flex: 1 1 auto; min-width: 130px; }
  /* 逐笔业绩明细：移动端 2 列标签化，长字段整行 */
  .rc-etbl tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rc-etbl td.rc-e-date { grid-column: 1 / -1; }
  .rc-etbl td[data-l="会员名称"], .rc-etbl td[data-l="开单人员"], .rc-etbl td[data-l="备注"] { grid-column: 1 / -1; }
  /* V2.7.3：手机端流水表变成「一条一卡」的卡片式，桌面那套表格线要撤掉，
   * 改成给每张卡片描边（否则卡片里会冒出一堆竖线） */
  table.rc-tbl.rc-ftbl,
  table.rc-tbl.rc-ftbl thead th,
  table.rc-tbl.rc-ftbl tbody td { border: none; }
  table.rc-tbl.rc-ftbl tbody tr {
    border: 1px solid #ccd5e2; border-bottom: 1px solid #ccd5e2; border-radius: 9px;
    margin-bottom: 8px; background: #fcfdff;
  }
}

/* ============ 业绩修改强警告弹窗（V2.5.0） ============ */
.warn-sheet { max-width: 400px; text-align: center; }
@media (min-width: 760px) {
  /* 桌面端不要贴着屏幕最底边（和业绩修改弹窗 sheet-lg 的处理保持一致） */
  .sheet.warn-sheet { border-radius: 18px; margin-bottom: 24px; padding: 22px 18px; }
}
.warn-ic { font-size: 34px; line-height: 1; margin: 2px 0 6px; }
.warn-title { color: var(--brand); font-size: 19px; margin: 0 0 8px; letter-spacing: 1px; }
.warn-text {
  font-size: 15px; font-weight: 700; line-height: 1.65; color: var(--ink);
  background: var(--brand-soft); border-radius: 10px; padding: 11px 12px;
}
.warn-sub { font-size: 11.5px; color: var(--ink-2); line-height: 1.6; margin-top: 9px; }
.req-field label { color: var(--brand-deep); }
.req-star { color: var(--brand); font-weight: 800; }
#em-editNote { border-color: #f0c3cd; }
#em-editNote:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

/* ==================================================================
   V2.6.0
   ================================================================== */

/* ---------- 最近喜报（爆单填写页） ---------- */
.recent-rep {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.recent-rep:last-child { border-bottom: none; }
.recent-rep .rr-main { flex: 1 1 auto; min-width: 0; }
.recent-rep .rr-t1 {
  font-size: 14.5px; font-weight: 800; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-rep .rr-t2 {
  /* V2.6.1：管理员多一个「填报人」尾巴，单行会截断成「…」，改为最多两行自动换行 */
  margin-top: 3px; font-size: 12px; color: var(--ink-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-rep .rr-btn { flex: 0 0 auto; }

/* ---------- 个人爆单榜：挂蛋行 ---------- */
/* V2.7.5：挂蛋标签去掉淡红底纹，只留红字（满屏红块太吵） */
.egg-tag {
  display: inline-block; padding: 0 2px;
  color: #d92b45;
  font-size: 12.5px; font-weight: 800; letter-spacing: .5px;
}
.board-table tr.row-egg td { color: var(--ink-2); }
.board-table tr.row-egg td.actual { color: var(--brand-deep); }
/* V2.7.4：挂蛋人员客单价列由「加油💪」改为「未破蛋」，红色字体（自带 color，父行灰字不会覆盖） */
.egg-none { color: #d92b45; font-weight: 800; font-size: 12.5px; letter-spacing: .5px; }

/* ---------- 历史开单分析报告：KPI / 紧凑表格 ---------- */
.dash-store-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; }
.dash-table-tight { min-width: 100%; font-size: 13.5px; }
.dash-table-tight th, .dash-table-tight td {
  padding: 7px 10px;                 /* 行距收紧：手机上一屏能看更多行 */
  border-right: 1px solid var(--line);  /* 列框线：相邻列不再糊在一起 */
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.dash-table-tight th:last-child, .dash-table-tight td:last-child { border-right: none; }
.dash-table-tight tbody tr:last-child td { border-bottom: none; }
.dash-table-tight th { background: #f6f7fa; font-size: 13px; }
.dash-table-tight tbody tr:nth-child(even) { background: #fbfcfe; }
/* 兼容旧的 .dash-table（客户来源 / 卡项类型列表也复用） */
.dash-tbl-wrap .dash-table { min-width: 100%; }

/* ---------- 单店月度流水核对：工具栏与搜索框 ---------- */
.rc-tools-flow { align-items: flex-end; }
.rc-tool-month { flex: 0 0 190px; min-width: 160px; }
.rc-tool-store { flex: 0 1 320px; min-width: 220px; }
.rc-tool-store select { width: 100%; }
/* 刷新按钮：主色实心，一眼可见 */
.rc-refresh-btn {
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  height: 38px; padding: 0 18px; border-radius: 10px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(232, 54, 90, .22);
}
.rc-refresh-btn:hover { background: var(--brand-deep, #c92a4b); }
.rc-refresh-btn:active { transform: translateY(1px); }
/* 搜索框：加图标、加粗边框、底色高亮 */
.rc-entries-tool-strong {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid #f0c3cd; border-radius: 12px;
  padding: 8px 10px; margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(232, 54, 90, .08);
}
.rc-entries-tool-strong:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.rc-search-ic { flex: 0 0 auto; font-size: 15px; line-height: 1; }
/* 注意：全局 input.rc-in 是右对齐（数值输入用），这里必须写成 input.rc-search-strong
 * 才压得住它的 (0,1,1) 特异性，否则搜索框提示文字会靠右显示。 */
input.rc-search-strong {
  border: none !important; background: transparent !important;
  font-size: 14px; font-weight: 600; padding: 4px 0 !important;
  box-shadow: none !important; flex: 1 1 auto; min-width: 0;
  text-align: left;
}
.rc-search-strong::placeholder { color: #9aa1ae; font-weight: 500; }
.rc-entries-tool-strong .rc-entries-cnt { flex: 0 0 auto; border-left: 1px solid var(--line); padding-left: 8px; margin-left: 2px; color: #6b7280; }

/* ---------- 业绩分析报告弹层 ---------- */
#repImgBox img { display: block; margin: 0 auto; }
@media (max-width: 760px) {
  .rc-tool-month, .rc-tool-store { flex: 1 1 100%; min-width: 0; }
  .rc-refresh-btn { width: 100%; }
  .recent-rep { gap: 8px; }
}
/* 手机版面：把 5 列清单压进一屏，避免最后一列被切掉还要横向拖 */
@media (max-width: 480px) {
  .dash-table-tight { font-size: 12px; }
  .dash-table-tight th { font-size: 11.5px; }
  .dash-table-tight th, .dash-table-tight td { padding: 6px 5px; }

  /* 卡项类型：手机上改成「名称一行 + 操作一行」，否则删除按钮被挤出屏幕 */
  #ctList table, #ctList thead, #ctList tbody, #ctList tr, #ctList td { display: block; }
  #ctList thead { display: none; }
  #ctList tr { padding: 7px 2px; border-bottom: 1px solid var(--line); }
  #ctList tr:last-child { border-bottom: none; }
  #ctList td { border: none !important; padding: 2px 8px !important; text-align: left !important; }
  #ctList td:first-child { font-size: 13.5px; font-weight: 700; }
  #ctList td:nth-child(2), #ctList td:nth-child(3) { display: inline-block; }
  #ctList .srt { padding: 0 7px; min-width: 26px; }
}

/* ============ V2.6.1：业绩记录里的备注 / 修改痕迹 ============
 * 备注单独一块（浅灰），业绩修改说明整块标红（浅红底 + 红字 + 左侧红条），
 * 这样后台列表一眼就能看出「这单被改过、为什么改、谁改的、什么时候改的」。 */
.tip-red { color: #d92d20; }
.adm-chk {
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px;
  background: #fafafb; font-size: 14px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; user-select: none; white-space: nowrap; flex: 0 0 auto;
}
.adm-chk input {
  width: 17px; height: 17px; margin: 0; accent-color: var(--brand); cursor: pointer;
}
.adm-chk:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep);
}
.adm-chk:has(input:checked) input { accent-color: var(--brand-deep); }

/* 收单日期旁的「已修改」标记 */
.adm-edited-tag {
  display: inline-block; width: fit-content; max-width: 100%; align-self: flex-start;
  margin-left: 6px; padding: 1px 7px; border-radius: 7px;
  background: #fdecea; color: #d92d20; border: 1px solid #f7c9c5;
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px; vertical-align: 1px;
}

/* 备注：浅灰块，带「备注」小标签 */
.entry-note {
  margin-top: 6px; padding: 7px 10px; border-radius: 9px;
  background: #f5f6f9; border: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.55; word-break: break-word;
}
.entry-note .en-k {
  display: inline-block; margin-right: 7px; padding: 0 6px; border-radius: 6px;
  background: #e8eaef; color: #5a6070; font-size: 11.5px; font-weight: 800;
}

/* 业绩修改说明：整块标红 */
.entry-editbox {
  margin-top: 7px; padding: 9px 11px; border-radius: 10px;
  background: #fef4f3; border: 1px solid #f7c9c5; border-left: 4px solid #e5484d;
}
.entry-editnote {
  font-size: 14px; font-weight: 800; color: #c81e1e; line-height: 1.55; word-break: break-word;
}
.entry-editnote .ee-k {
  display: inline-block; margin-right: 7px; padding: 0 6px; border-radius: 6px;
  background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
}
.entry-edittime {
  margin-top: 5px; font-size: 12.5px; color: #a33a3a; line-height: 1.5;
}
.entry-edittime b { color: #c81e1e; }

/* 多次修改：原生 details 展开，零脚本、手机端也能点 */
.ee-log { margin-top: 6px; }
.ee-log > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 700; color: #c81e1e;
  padding: 3px 0; list-style: none;
}
.ee-log > summary::-webkit-details-marker { display: none; }
.ee-log > summary::before { content: '▸ '; }
.ee-log[open] > summary::before { content: '▾ '; }
.ee-li {
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed #f0b9b4;
  font-size: 12.5px; color: #7a3b3b; line-height: 1.55;
}
.ee-li-h { font-weight: 800; color: #a33a3a; }
.ee-li-n { margin-top: 2px; color: #c81e1e; font-weight: 700; word-break: break-word; }
.ee-li-d { margin-top: 3px; color: #9a7b7b; font-size: 12px; word-break: break-word; }

@media (max-width: 760px) {
  .adm-chk { height: 42px; padding: 0 12px; font-size: 13.5px; }
  .entry-note, .entry-editbox { padding: 7px 9px; }
  .entry-editnote { font-size: 13.5px; }
  .entry-edittime { font-size: 12px; }
}

/* ============ V2.7.0：排行榜「选择单个门店 / PK游戏门店」 ============ */
.pk-pick {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 700; cursor: pointer; text-align: left;
}
.pk-pick:active { background: #fafafb; }
.pk-pick i { font-style: normal; color: #9aa1ae; font-size: 20px; font-weight: 400; line-height: 1; }
.pk-sheet { max-width: 560px; display: flex; flex-direction: column; }
.pk-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pk-cnt { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--brand); }
.pk-list {
  flex: 1 1 auto; overflow-y: auto; max-height: 52dvh;
  border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #fafafb;
}
.pk-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 9px;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none;
}
.pk-item + .pk-item { border-top: 1px solid #eef0f4; }
.pk-item input { width: 19px; height: 19px; margin: 0; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.pk-item:has(input:checked) { background: var(--brand-soft); color: var(--brand-deep); }
.pk-foot { display: flex; gap: 10px; margin-top: 14px; }
.pk-foot .btn { flex: 1 1 0; }

/* ============ V2.7.0：历史爆单数据导入 ============ */
.adm-imp-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #fbf7f8; border: 1px solid #f3e2e6;
}
.adm-imp-tip { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; flex: 1 1 240px; }

.imp-sheet { max-width: 760px; }
.imp-steps { display: flex; flex-direction: column; gap: 10px; }
.imp-step { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.imp-no {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--brand);
  color: #fff; font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.imp-step-body { flex: 1 1 auto; min-width: 0; }
.imp-step-t { font-size: 14px; font-weight: 800; color: var(--ink); }
.imp-step-d { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.imp-step .btn { margin-top: 8px; }
.imp-file-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.imp-file-row input[type="file"] {
  flex: 1 1 200px; min-width: 0; font-size: 13px; padding: 8px 10px;
  border: 1px dashed var(--line); border-radius: 10px; background: #fff;
}

/* 统计卡 */
.imp-sum {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; margin-top: 12px;
}
.imp-k {
  padding: 9px 6px; border-radius: 10px; background: #f5f6f9; border: 1px solid var(--line);
  text-align: center;
}
.imp-k b { display: block; font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.imp-k span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-2); }
.imp-k.ok { background: #eef9f2; border-color: #cdebd9; }
.imp-k.ok b { color: #1c7d4d; }
.imp-k.warn { background: #fffaf0; border-color: #f4e3c2; }
.imp-k.warn b { color: #a06a08; }
.imp-k.bad { background: #fdf2f2; border-color: #f7cdcd; }
.imp-k.bad b { color: #c81e1e; }

/* 分区 */
.imp-sec { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.imp-sec-t { font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.imp-sec-t.bad { color: #c81e1e; }
.imp-sec-t.warn { color: #a06a08; }
.imp-errs { margin: 0; padding-left: 18px; max-height: 190px; overflow: auto; }
.imp-errs li { font-size: 12.5px; color: #b42318; line-height: 1.7; }
.imp-errs li b { color: #7a1c1c; }
.imp-unm { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.imp-tag {
  display: inline-block; padding: 3px 8px; border-radius: 8px; background: #f2f4f7;
  color: var(--ink-2); font-size: 12px; font-weight: 600;
}
.imp-hint { margin-top: 6px; font-size: 12px; color: #8b93a1; line-height: 1.6; }

/* 明细表 */
.imp-tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.imp-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.imp-tbl th, .imp-tbl td { padding: 7px 8px; border-bottom: 1px solid #eef0f4; border-right: 1px solid #f3f5f8; white-space: nowrap; }
.imp-tbl th { background: #f7f8fa; font-weight: 800; color: var(--ink-2); text-align: left; }
.imp-tbl td.num { text-align: right; }
.imp-tbl tr.imp-warn td { background: #fffaf0; }
.imp-tbl tr.imp-bad td { background: #fdf2f2; color: #b42318; }

/* 卡型映射 */
.imp-map { margin-top: 12px; }
.imp-map > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--brand); padding: 4px 0; }
.imp-map-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* 完成态 */
.imp-done { margin-top: 12px; padding: 12px; border-radius: 12px; background: #f3fbf6; border: 1px solid #cdebd9; }
.imp-done-t { font-size: 15px; font-weight: 800; color: #1c7d4d; }

@media (max-width: 760px) {
  .imp-sheet { max-width: 100%; }
  .imp-sum { grid-template-columns: repeat(3, 1fr); }
  .imp-k b { font-size: 15.5px; }
  .adm-imp-bar { padding: 9px 10px; }
  .adm-imp-tip { font-size: 12px; }
}

/* ============ V2.7.1：拉伽周业绩进度表（门店爆单榜 / 个人爆单榜 下方） ============
 * 9 列在手机上必须横向滑动：给表格设 min-width，容器横向滚动，不把中文压成竖排 */
.wk-sub { margin: -4px 0 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.wk-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wk-table { width: 690px; table-layout: fixed; }
/* V2.7.5：② 个人业绩进度榜 12 列（多了上月业绩 / 前三月平均），表宽要跟着放开到 848，
 * 否则 table-layout:fixed 会把 12 列硬压进 678 宽，列头被挤成竖排看不清 */
.wk-table.wk-hist { width: 860px; }
/* 10 列每格都很窄：去掉基础表格的 11px 竖内边距，并允许中文在格内折行（数字不会断） */
.wk-table th, .wk-table td { padding-left: 6px; padding-right: 6px; white-space: normal; }
.wk-table th.wk-th { line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.wk-table th.wk-th i {
  display: block; font-style: normal; font-weight: 600;
  font-size: 11px; opacity: .88; margin-top: 1px;
}
/* V2.7.5：拉伽周格子里的金额一律不加粗、走斜体 ——
 * 10 列并排时满屏粗体数字会糊成一片，斜体既保留"数据"的分量，又不和表头抢视觉 */
.wk-table td.wk-num { font-variant-numeric: tabular-nums; font-weight: 400; font-style: italic; color: var(--ink); }
.wk-table td.wk-zero { color: #9aa0ab; font-weight: 400; font-style: italic; font-variant-numeric: tabular-nums; }
.wk-table td.wk-off { color: #b6bcc7; font-weight: 400; font-style: italic; }
/* 挂蛋：只标红字，不加红底 —— 一列全是红块会像报错，红字已经足够醒目
 * 选择器带上 .board-table：全局「偶数行浅灰底」是 (0,3,1)，这里必须同级且更靠后，
 * 否则挂蛋格在偶数行会被灰底盖掉 */
table.board-table.wk-table tbody td.wk-egg {
  color: #d92b45; font-weight: 700; font-size: 12.5px;
  letter-spacing: .5px;
}
/* V2.7.5：门店名不加粗（姓名字重不变，门店只是归属信息） */
.board-table.wk-table td.name.wk-store { font-weight: 400; }
table.board-table.wk-table tbody tr.wk-total td { background: #fdeef3; font-weight: 800; border-top: 2px solid var(--brand); }
.wk-table tr.wk-total td.name { text-align: center; }
.wk-table td.name .wk-nm { font-weight: 700; }
.wk-table td.name .wk-st { font-size: 11px; color: var(--ink-2); font-weight: 400; margin-top: 1px; }
.wk-legend { margin-top: 10px; font-size: 12px; color: #8b93a1; line-height: 1.7; }
.wk-legend b { color: var(--brand); white-space: nowrap; } /* V2.7.3：高亮词不折行，避免「已 / 完成比例」被拆开 */

@media (max-width: 760px) {
  .wk-sub { font-size: 12px; }
  .wk-table { font-size: 12.5px; }
  .wk-table th, .wk-table td { padding: 9px 4px; }
  .wk-legend { font-size: 11.5px; }
}

/* 进度表横向滑动提示：只在真的溢出时出现（renderWeekly 里判断 scrollWidth） */
.wk-hint { display: none; margin-top: 8px; text-align: center; font-size: 11.5px; color: #98a0ae; }
.wk-hint.on { display: block; }

/* ---------- V2.7.4 全站页脚 · 网站备案信息 ----------
 * 工信部要求：备案号在网站底部显著位置标注，并可点击跳转备案查询系统。
 * 文字用 12.5px / #6b7080（对比度 ≥ 4.5:1），不用更浅的灰，避免被判为「不显著」。 */
.site-foot {
  margin: 26px 0 0;
  padding: 14px 8px 6px;
  border-top: 1px dashed #e2e6ee;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.85;
  color: #6b7080;
  word-break: break-all;
}
.site-foot .sf-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.site-foot a { color: #6b7080; text-decoration: none; border-bottom: 1px solid transparent; }
.site-foot a:hover, .site-foot a:focus-visible { color: var(--brand); border-bottom-color: var(--brand); }
.site-foot .sf-sep { color: #ccd1dc; }
@media (max-width: 480px) {
  .site-foot { font-size: 12px; margin-top: 20px; }
}

/* ---------- V2.7.5 排行榜三榜改版 ----------
 * 三个页签名变成 7 个字（门店业绩进度榜 / 个人业绩进度榜 / 个人业绩风云榜），
 * flex 三等分放不下会挤成两行 → 改成 grid 三等分 + 允许两行，字号降到 12.5px，
 * 既不折字也不把按钮撑高得离谱。 */
.seg.seg-tab3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.seg-tab3 .seg-btn {
  height: auto; min-height: 44px; padding: 6px 4px; line-height: 1.35;
  font-size: 12.5px; font-weight: 700; letter-spacing: .2px; white-space: normal;
  /* 中文必须允许断行：keep-all 会让「③ 个人业绩风云榜」的 min-width 等于整串文字宽度，
   * 三个等分列撑不下就往右溢出，手机端第三个页签直接被卡片裁掉 */
  word-break: normal; overflow-wrap: anywhere;
}
@media (min-width: 760px) {
  .seg.seg-tab3 .seg-btn { font-size: 14px; min-height: 42px; padding: 4px 8px; }
}

/* ---------- V2.7.6 榜单标题放大 / 斜杠突出 ----------
 * 同一条版式给页面与弹层复用：① 序号单独放大上色，标题本体加粗放大，
 * 括号里的统计区间降一档 —— 一眼分清「这是哪一榜 + 算的是哪段时间」。 */
#boardTitle { font-size: 19px; font-weight: 900; letter-spacing: .4px; }
#boardTitle::before { height: 20px; width: 5px; }
.t-ord {
  font-style: normal; font-weight: 900; color: var(--brand);
  letter-spacing: 0; margin-right: 3px; line-height: 1;
}
#boardTitle .t-ord { font-size: 22px; }
#boardTitle .t-range { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
/* 说明文字里的「/」：品牌色 + 加粗 + 大一号，把三段周次 / 三张表分开，不糊成一串 */
.sl {
  font-style: normal; font-weight: 900; color: var(--brand);
  font-size: 1.14em; padding: 0 1px;
}
.seg.seg-tab3 .seg-btn .t-ord { font-size: 1.15em; margin-right: 2px; }
.seg.seg-tab3 .seg-btn.on .t-ord { color: #fff; }

/* 出图弹层：标题里直接写清「右键点击图片可直接复制发送」，红底胶囊，最短操作路径一眼看到 */
#imgTitle { line-height: 1.55; }
.img-head-range { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.img-tip-hl {
  display: block; margin-top: 8px; text-align: center;
  background: #fdeef3; color: var(--brand); border: 1px dashed #f3b9c8;
  border-radius: 8px; padding: 7px 10px;
  font-size: 13px; font-weight: 800; letter-spacing: .2px;
}

/* 「一键生成榜单图片」：挪到三个页签按钮正下方，整行主色实心，手指一点就到 */
.btn.gen-all { display: block; width: 100%; margin-top: 12px; }

/* ③ 个人业绩风云榜：卡片内三张表，每张一个带序号的小标题块 */
.storm-block { margin-top: 18px; }
.storm-block:first-child { margin-top: 4px; }
.storm-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14.5px; font-weight: 800; color: var(--ink);
  padding: 8px 10px; margin-bottom: 8px;
  background: #f6f8fc; border-left: 3px solid var(--brand); border-radius: 8px;
}
.storm-k {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
}
.storm-tag {
  margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--brand);
  background: #fdeef3; border-radius: 20px; padding: 2px 9px; white-space: nowrap;
}
.storm-tip { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin: 0 0 8px 2px; }
.storm-tip b { color: #d92b45; }
.storm-empty { text-align: center; color: #98a0ae; font-size: 13px; padding: 14px 6px; }
.egg-days { color: #d92b45; font-weight: 700; }
/* 挂蛋行整行是浅灰字（.board-table tr.row-egg td），「挂蛋时间」要抢回红色 */
.board-table tr.row-egg td.egg-days { color: #d92b45; font-weight: 700; }
/* ③ TOP10 / 后 10 名末尾两列（上月业绩 / 前三月平均）：参考值，灰字不加粗，
 * 别和「业绩总额」抢注意力；选择器写在 row-egg 之后，抢过整行浅灰的规则 */
.board-table td.refc {
  color: #7b8291; font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.storm-block .board-table { min-width: 600px; }

/* ② 个人业绩进度榜末尾两列（上月业绩 / 前三月平均）：只是参考值，不加粗 + 灰字 */
table.board-table.wk-table tbody td.wk-hist {
  color: #7b8291; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums;
}
table.board-table.wk-table thead th.wk-hist { font-weight: 600; }

@media (max-width: 480px) {
  .seg.seg-tab3 .seg-btn { font-size: 11.5px; min-height: 42px; padding: 5px 2px; }
  .storm-head { font-size: 13.5px; }
  .storm-tip { font-size: 11.5px; }
}

/* ==================== V2.7.7：目标周期（业绩目标按时间段设置） ====================
 * 门店管理 / 员工管理顶部的「年 / 月」选择条，以及行内「时段」弹层。
 * 目的：一眼看清「现在改的是哪个月」，切到历史月份时给出明显提示，避免误改当月。 */
.tp-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin: 0 0 12px; font-size: 13px;
}
.tp-name { font-weight: 800; color: var(--ink); flex: 0 0 auto; }
.tp-sel {
  width: auto !important; flex: 0 0 auto;
  height: 34px; min-width: 76px; padding: 0 8px;
  border: 1px solid #ccd4e0; border-radius: 8px; background: #fff;
  font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
}
.tp-unit { color: var(--ink-2); font-size: 12.5px; }
.tp-note { color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.tp-note-hl { color: var(--brand); font-weight: 700; }

.tp-tabs { display: flex; gap: 8px; margin: 10px 0 8px; flex-wrap: wrap; }
.tp-tab {
  height: 32px; padding: 0 14px; border-radius: 8px;
  border: 1px solid #d5dbe6; background: #f7f8fa; color: #5a6270;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.tp-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.tp-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp-date {
  /* 起止两个日期要并排在一行：给 flex 基准 + 允许收缩，否则日期控件的固有宽度会把「至」挤到单独一行 */
  width: auto; flex: 1 1 140px; min-width: 0;
  height: 36px; padding: 0 10px; border: 1px solid #ccd4e0; border-radius: 8px;
  font-size: 13.5px; background: #fff; color: var(--ink);
}

.tp-list { max-height: 232px; overflow: auto; margin: 4px 0 6px; }
.tp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  margin-bottom: 6px; background: #fafbfc; font-size: 13px;
}
.tp-row-d { flex: 1; color: #3a3f4b; font-variant-numeric: tabular-nums; }
.tp-row-a { flex: 0 0 auto; color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-row .btn { flex: 0 0 auto; }

/* 员工姓名：可编辑输入框，视觉上仍像文字，点进去才像输入 */
.nm-input {
  width: 100%; max-width: 152px; height: 34px; padding: 0 9px;
  border: 1px solid #ccd4e0; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink); background: #fff;
}
.nm-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 54, 90, .12); }

/* 门店行的「馆主 / 督导」输入框没写 type 属性 → 拿不到全局 input[type="text"] 的宽度与描边，
 * 浏览器按默认 size 撑到 216px 顶进「营销活动」列，边框也变成默认深灰。这里补齐宽度与描边。 */
.store-row input.sm-owner {
  width: 100%; min-width: 0;
  border: 1px solid var(--line); background: #fafafb; color: var(--ink);
  appearance: none;
}
.store-row input.sm-owner:focus { border-color: var(--brand); background: #fff; }

@media (max-width: 560px) {
  .tp-bar { padding: 9px 11px; gap: 6px; }
  .tp-sel { min-width: 66px; height: 32px; }
  .tp-note { flex-basis: 100%; margin-top: 2px; }
  .tp-row { flex-wrap: wrap; }
  .tp-row-d { flex-basis: 100%; }
  .tp-date { min-width: 0; flex: 1 1 120px; }
  .nm-input { max-width: 100%; }
}

/* 「时段」弹层底部按钮吸底：内容长时滚动也能随时点到 */
.tp-actions {
  position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom));
  background: #fff; padding: 10px 0 4px; margin-top: 12px;
}
