:root {
  --bg: #f2f3f5; --card: #fff; --prim: #07c160; --text: #1f1f1f;
  --muted: #8a8a8a; --line: #e6e6e6; --warn: #fa5151;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; }
.hidden { display: none !important; }
.screen { min-height: 100vh; }
.card { background: var(--card); border-radius: 12px; padding: 16px; margin: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); }

.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: var(--card); }
.who { font-weight: 600; }
.role-badge { display: inline-block; margin-top: 4px; font-size: 12px; color: #fff;
  background: var(--prim); padding: 2px 8px; border-radius: 10px; }
.link-btn { background: none; border: none; color: var(--prim); font-size: 14px; }

.tabs { display: flex; position: sticky; top: 0; background: var(--card);
  border-bottom: 1px solid var(--line); z-index: 5;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* 桌面均分、窄屏不收缩可横滑：页签从 3 个增到 6 个后，手机上不能靠挤压，否则整页被撑宽 */
.tab { flex: 1 0 auto; text-align: center; padding: 12px 13px; color: var(--muted);
  font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--prim); border-bottom-color: var(--prim); font-weight: 600; }

.field { display: block; margin: 12px 0; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; color: #333; }
.req { color: var(--warn); font-style: normal; margin-left: 2px; }
.field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; background: #fafafa; }
.primary { width: 100%; padding: 13px; margin-top: 8px; border: none; border-radius: 8px;
  background: var(--prim); color: #fff; font-size: 16px; font-weight: 600; }
.primary:active { opacity: .85; }

.list { padding: 8px; }
.item { background: var(--card); border-radius: 10px; padding: 12px; margin: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.item-head { display: flex; justify-content: space-between; font-weight: 600; }
.kvs { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0; }
.kv { font-size: 13px; color: #444; }
.item-foot { font-size: 12px; color: var(--muted); }
.st { font-size: 12px; padding: 2px 8px; border-radius: 9px; }
.st-pending { background: #fff3d6; color: #ad6800; }
.st-approved { background: #e3f7ea; color: #07a04a; }
.st-rejected { background: #fde6e6; color: #d23b3b; }
.row-actions { display: flex; gap: 8px; margin-top: 8px; }
.mini { flex: 1; padding: 8px; border: none; border-radius: 6px; font-size: 14px; }
.mini.ok { background: var(--prim); color: #fff; }
.mini.no { background: #fde6e6; color: var(--warn); }

.mini-form input, .mini-form select { width: 100%; padding: 9px 10px; margin: 6px 0;
  border: 1px solid var(--line); border-radius: 6px; }
.li { display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 8px; }
.li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.li > small, .li > select, .li > b { flex: none; }
.li select { padding: 5px; border-radius: 6px; border: 1px solid var(--line); }

.big-icon { font-size: 48px; text-align: center; margin: 10px 0; }
#noPerm .card { text-align: center; margin-top: 30%; }
#noPerm h2 { margin: 6px 0; }
#noPerm p { color: var(--muted); line-height: 1.6; }

.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 12px 18px; border-radius: 8px;
  font-size: 14px; z-index: 99; max-width: 80%; text-align: center; }
.toast.ok { background: rgba(7,193,96,.92); }
.toast.err { background: rgba(250,81,81,.94); }

/* ---------- 层级录入口（数据输入层级表） ---------- */
.today-bar { background: linear-gradient(135deg,#07c160,#05a850); color:#fff;
  padding: 16px; margin: 0; }
.tb-title { font-size: 13px; opacity: .9; margin-bottom: 10px; }
.tb-grid { display: flex; gap: 10px; }
.tb-cell { flex: 1; background: rgba(255,255,255,.16); border-radius: 10px;
  padding: 10px; text-align: center; }
.tb-cell b { display: block; font-size: 19px; line-height: 1.3; }
.tb-cell span { font-size: 11px; opacity: .9; }

.mod-grid { padding: 10px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mod-card { background: #fff; border-radius: 12px; padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); cursor: pointer; transition: .15s; }
.mod-card:active { transform: scale(.995); background: #fafafa; }
.mod-card.group { cursor: default; }
.mod-card.auto { background: #fbfdff; border: 1px dashed #cfe6ff; }
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mod-name { font-weight: 600; font-size: 16px; }
.mod-arrow { color: #bbb; font-size: 13px; }
.mod-sub { color: #7a7a7a; font-size: 12.5px; margin-top: 5px; line-height: 1.5; }
.mod-foot { color: #9a9a9a; font-size: 12px; margin-top: 8px; }
.mod-foot b { color: var(--prim); }

.tag { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 8px;
  background: #eef2f5; color: #666; flex: none; }
.tag.island { background: #fff1e6; color: #d46b08; }
.tag.auto { background: #e8f3ff; color: #1677ff; }
.mini-tag { font-style: normal; font-size: 10.5px; color: #d46b08; background: #fff1e6;
  padding: 1px 5px; border-radius: 6px; margin-left: 6px; }
.island-hint { margin-top: 8px; font-size: 11.5px; color: #d46b08;
  background: #fff8f1; border-radius: 8px; padding: 6px 8px; line-height: 1.5; }

.sub-list { margin-top: 10px; border-top: 1px solid var(--line); }
.sub-item { display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14.5px; }
.sub-item:last-child { border-bottom: none; }
.sub-item:active { background: #fafafa; }
.sub-count { color: #9a9a9a; font-size: 12px; }

.back-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.back-btn { background: none; border: none; color: var(--prim); font-size: 15px; padding: 4px 0; }
.crumb { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.form-note { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

input[readonly].auto-calc { background: #f3f7f4; color: #07a04a; font-weight: 600; }

.filter-bar { padding: 10px 12px 0; }
.filter-bar select, .filter-bar input { width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr));
  gap: 8px; margin-top: 10px; }
.stat { background: #f7f8fa; border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 16px; color: #1f1f1f; }
.stat span { font-size: 11px; color: #8a8a8a; display: block; margin-top: 3px; }
.board-note { margin-top: 10px; font-size: 11.5px; color: #8a8a8a; line-height: 1.6; }
.muted { color: #9a9a9a; }
h3 { font-size: 15px; margin: 4px 0 10px; }

/* ---------- 工序账号授权 ---------- */
.empty-perm { text-align: center; padding: 40px 20px; }
.empty-perm h2 { font-size: 17px; margin: 8px 0; }
.empty-perm p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.scope-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.scope-label { font-size: 13.5px; color: #333; flex: none; }
.seg { display: flex; flex: 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btn { flex: 1; padding: 8px 6px; border: none; background: #fafafa; font-size: 13px; color: #555; }
.seg-btn.on { background: var(--prim); color: #fff; font-weight: 600; }
.scope-tip { font-size: 12px; color: #8a8a8a; line-height: 1.6; background: #f7f8fa;
  border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }

.grant-tools { display: flex; gap: 8px; margin-bottom: 6px; }
.grant-tools input { flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.ghost-btn { flex: none; padding: 0 12px; border: 1px solid var(--prim); color: var(--prim);
  background: #fff; border-radius: 8px; font-size: 13px; }
.ghost-btn:disabled { opacity: .6; }

.grant-list { margin-top: 4px; }
.grant-item { border-bottom: 1px solid var(--line); }
.gi-head { display: flex; align-items: center; justify-content: space-between;
  padding: 11px 2px; cursor: pointer; }
.gi-who { display: flex; flex-direction: column; gap: 2px; }
.gi-who b { font-size: 14.5px; }
.gi-who small { font-size: 11.5px; color: var(--muted); }
.gi-right { display: flex; align-items: center; gap: 8px; }
.gi-tag { font-size: 11px; padding: 2px 7px; border-radius: 8px; }
.gi-tag.ok { background: #e3f7ea; color: #07a04a; }
.gi-tag.none { background: #f2f3f5; color: #9a9a9a; }
.gi-tag.all { background: #e8f3ff; color: #1677ff; }
.gi-tag.lead { background: #fff3d6; color: #ad6800; }
.gi-body { padding: 2px 2px 12px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 12.5px; padding: 5px 10px; border-radius: 15px; background: #f2f3f5;
  color: #555; border: 1px solid transparent; }
.chip.on { background: #e3f7ea; color: #07a04a; border-color: #b7e8ca; font-weight: 600; }
.chip-tip { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }

/* 筛选行 + 工序覆盖 */
.grant-filters { display: flex; gap: 6px; margin: 8px 0; }
.grant-filters select { flex: 1; padding: 8px 6px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; background: #fff; min-width: 0; }
.grant-filters .ghost-btn { font-size: 12.5px; padding: 0 10px; }

.coverage { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 0;
  border-bottom: 1px solid var(--line); }
.cov { font-size: 11px; color: #666; background: #f2f3f5; border-radius: 7px;
  padding: 3px 7px; display: inline-flex; gap: 4px; align-items: center; }
.cov b { color: #07a04a; font-weight: 600; }
.cov.cov-zero { background: #fde6e6; color: #d23b3b; }
.cov.cov-zero b { color: #d23b3b; }

.gi-pick { width: 18px; height: 18px; flex: none; accent-color: #07c160; }

/* 批量分配操作条 */
.batch-bar { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--prim);
  border-radius: 12px; padding: 10px 12px; margin-top: 10px;
  box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
.bb-row { display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #333; margin-bottom: 8px; }
.bb-row b { color: var(--prim); font-size: 15px; }
.bb-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini.ghost { background: #f2f3f5; color: #555; }

/* ---------- 收集表式品类录入 ---------- */
.collect { margin: 14px 0 6px; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #fff; }
.collect-head { display: flex; justify-content: space-between; padding: 9px 12px;
  background: #f7f8fa; font-size: 12.5px; color: #666; font-weight: 600;
  border-bottom: 1px solid var(--line); }
.collect-row { display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; border-bottom: 1px solid #f0f1f3; }
.collect-row:last-child { border-bottom: none; }
.ci-name { font-size: 14.5px; color: #333; padding: 12px 0; }
.ci-input { width: 110px; text-align: right; padding: 8px 10px; margin: 6px 0;
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fafafa; }
.ci-input:focus { outline: none; border-color: var(--prim); background: #fff; }
.collect-total { background: #f3f7f4; }
.collect-total span { font-size: 14px; font-weight: 600; color: #2b6b45; padding: 12px 0; }
.collect-total b { font-size: 18px; color: #07a04a; }

.kv-total b { color: #07a04a; }
.report-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.report-cats em { font-style: normal; font-size: 11px; color: #7a7a7a;
  background: #f2f3f5; border-radius: 6px; padding: 2px 6px; }

/* ---------- 客户完成看板（齐套） ---------- */
.tabs .tab { font-size: 13.5px; padding: 12px 2px; white-space: nowrap; }

/* 首页顶部齐套小条 */
.done-strip { display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.ds-txt b { color: #07a04a; font-size: 15px; }
.ds-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 9px; }
.ds-tag.ok { background: #e3f7ea; color: #07a04a; }
.ds-tag.warn { background: #fff1f0; color: #d23b3b; }
.ds-go { margin-left: auto; color: var(--prim); font-size: 12.5px; }

.done-bar { display: flex; gap: 8px; padding: 10px 12px 0; align-items: center; }
.done-bar > input { flex: none; width: 140px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13.5px; background: #fff; }
.done-bar .seg { flex: 1; }
.done-tools { padding: 8px 12px 0; text-align: right; }
.done-tools .ghost-btn { padding: 7px 12px; }

.done-sum { margin-top: 10px; }
.ds-row { display: flex; gap: 8px; }
.ds { flex: 1; background: #f7f8fa; border-radius: 10px; padding: 10px 4px; text-align: center; }
.ds b { display: block; font-size: 18px; }
.ds span { font-size: 11px; color: #8a8a8a; }
.ds.ok b { color: #07a04a; }
.ds.warn b { color: #d23b3b; }
.ds-bar { height: 6px; background: #eef0f2; border-radius: 3px; margin: 12px 0 8px; overflow: hidden; }
.ds-bar i { display: block; height: 100%; background: linear-gradient(90deg, #07c160, #4cd964);
  border-radius: 3px; transition: width .3s; }
.ds-note { font-size: 11.5px; color: #8a8a8a; line-height: 1.6; }

/* 客户卡 */
.cust-card { background: #fff; border-radius: 12px; margin: 10px 12px; padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); border-left: 4px solid #e6e6e6; }
.cust-card.done { border-left-color: var(--prim); background: linear-gradient(180deg, #f4fdf7, #fff 60%); }
.cust-card.notstart { border-left-color: #d9d9d9; }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.cc-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cc-title b { font-size: 15.5px; overflow-wrap: anywhere; }
.cc-title small { font-size: 11.5px; color: var(--muted); flex: none; }
.cc-right { display: flex; align-items: center; gap: 6px; flex: none; }
.cc-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 9px; font-weight: 600; }
.cc-badge.ok { background: #e3f7ea; color: #07a04a; }
.cc-badge.warn { background: #fff1f0; color: #d23b3b; }
.cc-badge.idle { background: #f2f3f5; color: #9a9a9a; font-weight: 400; }

.cc-progress { height: 5px; background: #eef0f2; border-radius: 3px; margin: 10px 0 9px; overflow: hidden; }
.cc-progress i { display: block; height: 100%; background: #07c160; border-radius: 3px; }
.cust-card.done .cc-progress i { background: linear-gradient(90deg, #07c160, #34d97b); }

.cc-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.cat { font-size: 11.5px; padding: 3px 7px; border-radius: 7px; display: inline-flex;
  align-items: center; gap: 3px; line-height: 1.3; }
.cat em { font-style: normal; font-size: 10.5px; opacity: .85; }
.cat.on { background: #e3f7ea; color: #07a04a; }
.cat.miss { background: #fff1f0; color: #d23b3b; border: 1px dashed #f5b5b0; }
.cat.off { background: #f5f6f7; color: #b5b5b5; text-decoration: line-through; }

.cc-meta { margin-top: 9px; font-size: 12.5px; line-height: 1.5; }
.cc-ok { color: #07a04a; font-weight: 600; }
.cc-warn { color: #d23b3b; }
.cc-dim { color: var(--muted); }
.cc-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cc-kv { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: #555; margin-bottom: 6px; }
.cc-kv b { color: #07a04a; }
.cc-note { font-size: 11.5px; color: #8a8a8a; background: #f7f8fa; border-radius: 7px;
  padding: 6px 8px; margin-bottom: 6px; line-height: 1.5; }
.cc-actions { display: flex; gap: 8px; margin-top: 8px; }
.cc-actions .mini.ghost { flex: none; padding: 7px 12px; }

/* 录入页：客户今日缺口提示 */
.cust-progress { background: #fff8f1; border: 1px solid #ffe0bd; border-radius: 9px;
  padding: 9px 11px; margin-bottom: 4px; }
.cust-progress.all-done { background: #eefbf3; border-color: #b7e8ca; }
.cp-head { font-size: 12.5px; color: #8a5a12; line-height: 1.5; }
.cust-progress.all-done .cp-head { color: #07a04a; font-weight: 600; }
.cp-head b { color: #d23b3b; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cp-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 8px; background: #fff; }
.cp-chip.miss { color: #d23b3b; border: 1px dashed #f5b5b0; }
.cp-chip.on { color: #07a04a; background: #e3f7ea; }

/* ---------- 弹层 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center; }
.modal-box { background: #fff; width: 100%; max-width: 560px; max-height: 86vh;
  border-radius: 14px 14px 0 0; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 640px) {
  .modal-mask { align-items: center; }
  .modal-box { border-radius: 14px; }
}
.modal-head { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.modal-head b { font-size: 15px; }
.modal-body { padding: 14px 16px 20px; overflow-y: auto; }
.ms-tip { font-size: 12px; color: #8a8a8a; line-height: 1.6; background: #f7f8fa;
  border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
.ms-sec { font-size: 13px; font-weight: 600; margin: 16px 0 8px; }
.ms-search { width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; margin-bottom: 10px; }
.ms-members { max-height: 240px; overflow-y: auto; }
.ms-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.ms-actions .mini.ghost { padding: 9px; }

.or-list { max-height: 46vh; overflow-y: auto; margin-bottom: 4px; }
.or-item { display: flex; align-items: center; gap: 9px; padding: 9px 2px;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.or-item input { width: 18px; height: 18px; accent-color: #07c160; flex: none; }
.or-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.or-item small { color: var(--muted); font-size: 11.5px; flex: none; }

/* ---------- 看板：线路筛选 / 历史欠账 / 线路分组 ---------- */
.done-bar { flex-direction: column; align-items: stretch; gap: 8px; }
.db-row { display: flex; gap: 8px; align-items: center; }
.db-row > input { flex: none; width: 138px; }
.done-route { flex: 1; min-width: 0; padding: 9px 8px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; background: #fff; }
.done-bar .seg { width: 100%; }

/* 历史欠账累积卡 */
.bl-card { margin: 10px 12px 0; background: #fff; border-radius: 12px; padding: 12px 14px;
  border: 1px solid #ffd9d4; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.bl-card.clean { border-color: #d8f0e2; background: #f7fdfa; }
.bl-card.severe { border-color: #f0a9a2; }
.bl-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bl-title { font-size: 14.5px; font-weight: 600; color: #c9302c; }
.bl-card.clean .bl-title { color: #07a04a; }
.bl-badge { font-size: 11.5px; background: #fff1f0; color: #d23b3b; padding: 2px 8px; border-radius: 9px; font-weight: 600; }
.bl-arrow { margin-left: auto; color: #bbb; font-size: 12px; }
.bl-sub { font-size: 11.5px; color: #8a8a8a; margin-top: 5px; line-height: 1.6; }
.bl-sub b { color: #d23b3b; }
.bl-sev { color: #c9302c; }
.bl-items { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.bl-item { font-size: 11.5px; background: #fff1f0; color: #c9302c; border-radius: 7px; padding: 2px 7px; }
.bl-item em { font-style: normal; font-size: 10.5px; opacity: .8; margin-left: 2px; }
.bl-hint { font-size: 11px; color: #b5b5b5; margin-top: 8px; }
.bl-list { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.bl-row { padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.bl-row:last-child { border-bottom: none; }
.bl-cust { cursor: pointer; }
.bl-cust b { font-size: 14px; }
.bl-cust small { display: block; color: #8a8a8a; font-size: 11.5px; margin-top: 2px; }
.bl-tag { display: inline-block; font-size: 11px; color: #c9302c; margin-top: 3px; }
.bl-days { margin: 8px 0 2px 10px; padding-left: 10px; border-left: 2px solid #f0f0f0; }
.bl-day { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.bld-date { flex: none; color: #666; width: 76px; }
.bld-miss { flex: 1; min-width: 0; color: #d23b3b; overflow-wrap: anywhere; }
.bl-day .mini { flex: none; padding: 4px 10px; font-size: 12px; }

/* 线路分组 */
.route-group { margin: 12px 0 4px; }
.rg-head { display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px 6px; }
.rg-name { font-size: 14px; font-weight: 600; }
.rg-stat { font-size: 12px; color: #07a04a; font-weight: 600; }
.rg-bar { height: 4px; background: #e9ebee; border-radius: 2px; margin: 0 14px 5px; overflow: hidden; }
.rg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #07c160, #4cd964); }
.rg-sub { display: flex; gap: 12px; padding: 0 14px 8px; font-size: 11.5px; color: #8a8a8a; }
.rg-warn { color: #d23b3b; }
.route-group .cust-card { margin: 0 12px 8px; }

/* 客户卡：历史欠账 */
.cust-card.has-hist { border-left-color: #f0a9a2; }
.cc-badge.hist { background: #fff1f0; color: #c9302c; border: 1px solid #f7c9c4; font-weight: 600; }
.cc-badge.hist.sev { background: #c9302c; color: #fff; border-color: #c9302c; }
.cc-hist { background: #fffafa; border: 1px dashed #f5d5d1; border-radius: 9px;
  padding: 9px 10px; margin-bottom: 8px; }
.cc-hist-head { font-size: 12px; color: #c9302c; font-weight: 600; }
.cc-hist-items { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.cc-hist-items .hi { font-size: 11px; background: #fff; border: 1px solid #f5d5d1;
  color: #c9302c; border-radius: 7px; padding: 1px 6px; }
.cc-hist-items em { font-style: normal; opacity: .75; margin-left: 2px; }
.cc-hist-days { border-top: 1px dashed #f5d5d1; padding-top: 5px; }
.hd-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 12px; }
.hd-date { flex: none; width: 74px; color: #666; }
.hd-miss { flex: 1; min-width: 0; color: #d23b3b; overflow-wrap: anywhere; }
.hd-row .mini { flex: none; padding: 3px 9px; font-size: 11.5px; }
.hd-more { font-size: 11px; color: #b5b5b5; padding-top: 4px; }

/* 录入页：历史欠账提示 */
.cust-progress.has-hist { background: #fff5f4; border-color: #f5c9c4; }
.cp-hist { margin-top: 9px; padding-top: 8px; border-top: 1px dashed #f5c9c4; }
.cp-hist-head { font-size: 12px; color: #c9302c; font-weight: 600; }
.cp-hist-days { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cp-hd { font-size: 11px; background: #fff; color: #c9302c;
  border: 1px solid #f5d5d1; border-radius: 7px; padding: 1px 7px; }
.cp-hd.more { color: #b5b5b5; border-color: #eee; }
.cp-hist-tip { font-size: 11px; color: #a06a66; margin-top: 6px; }

/* 首页：历史欠账条 */
.done-strip.hist { background: #fff5f4; border: 1px solid #f7d5d1; margin-top: -4px; }
.done-strip.hist .ds-txt { color: #c9302c; }

/* ---------- 配送流转打卡 ---------- */
.flow-bar { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 0; }
.flow-sum { margin-top: 10px; }
.flow-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 8px 0 6px;
  font-size: 11px; color: #8a8a8a; line-height: 1.6; }
.fc-node { background: #f2f4f6; border-radius: 6px; padding: 2px 6px; }
.fc-arrow { font-style: normal; color: #ccc; margin: 0 2px; }
.fc-loop { color: #07a04a; margin-left: 3px; }

.flow-card { background: #fff; border-radius: 12px; margin: 10px 12px; padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); border-left: 4px solid #e6e6e6; }
.flow-card.done { border-left-color: var(--prim); background: linear-gradient(180deg,#f4fdf7,#fff 55%); }
.flow-card.stuck { border-left-color: #f5a623; background: linear-gradient(180deg,#fffcf5,#fff 55%); }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.fc-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.fc-title b { font-size: 15.5px; overflow-wrap: anywhere; }
.fc-title small { font-size: 11.5px; color: var(--muted); flex: none; }
.fc-right { display: flex; align-items: center; gap: 6px; flex: none; }
.cc-badge.go { background: #eaf2ff; color: #2b6cd4; }

.fc-dots { display: flex; align-items: center; gap: 0; margin: 12px 0 10px; }
.fd { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11.5px; background: #f0f1f3; color: #aaa; flex: none; }
.fd.ok { background: #07c160; color: #fff; font-weight: 600; }
.fd.bad { background: #fa5151; color: #fff; font-weight: 600; }
.fd.now { background: #fff; color: #07c160; border: 2px solid #07c160; font-weight: 600;
  box-shadow: 0 0 0 3px rgba(7,193,96,.12); }
.fd-line { flex: 1; height: 2px; background: #eef0f2; margin: 0 3px; }

.fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-next { font-size: 12.5px; color: #666; }
.fc-next b { color: #d97706; }
.fc-foot .mini.prim { background: var(--prim); color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.fc-alert { margin-top: 8px; font-size: 11.5px; color: #c9302c; background: #fff5f4;
  border-radius: 7px; padding: 5px 9px; }
.fc-body { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.fs-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 12.5px;
  border-bottom: 1px solid #f6f6f6; }
.fs-row:last-child { border-bottom: none; }
.fs-row.on .fs-name { color: #07a04a; font-weight: 600; }
.fs-idx { width: 18px; height: 18px; border-radius: 50%; background: #f0f1f3; color: #999;
  font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fs-row.on .fs-idx { background: #e3f7ea; color: #07a04a; }
.fs-name { flex: none; width: 68px; }
.fs-info { flex: 1; min-width: 0; color: #8a8a8a; font-size: 11.5px; overflow-wrap: anywhere; }
.fs-info i { color: #c0c0c0; font-style: normal; }
.fs-photo { font-size: 11.5px; color: #2b6cd4; flex: none; }
.fs-nophoto { font-size: 11px; color: #c0a060; flex: none; }
.fs-wait { font-size: 11px; color: #ccc; flex: none; }
.fs-row .mini { flex: none; padding: 4px 12px; font-size: 12px; background: var(--prim);
  color: #fff; border: none; border-radius: 8px; }

/* 打卡弹层 */
.ps-tip { font-size: 12px; color: #8a8a8a; background: #f7f8fa; border-radius: 8px;
  padding: 8px 10px; margin-bottom: 12px; line-height: 1.6; }
.ps-geo { border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px;
  background: #f7f8fa; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ps-geo.ok { background: #eefbf3; color: #07a04a; }
.ps-geo.bad { background: #fff5f4; color: #c9302c; }
.ps-geo b { font-size: 13px; }
.ps-loading { color: #8a8a8a; }
.ps-ok { color: #07a04a; }
.ps-bad { color: #c9302c; font-weight: 600; }
.ps-dim { color: #9a9a9a; }
.ps-photo-box { margin-bottom: 12px; }
.ps-shot { width: 100%; padding: 13px; border: 1px dashed #cfd4d9; border-radius: 10px;
  background: #fafbfc; font-size: 14.5px; color: #333; font-weight: 600; }
.ps-preview { margin-top: 10px; text-align: center; font-size: 12px; color: #9a9a9a; }
.ps-preview img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; display: block; }
.ps-pmeta { font-size: 11.5px; color: #8a8a8a; margin-top: 6px; }
.ps-field { display: block; margin-bottom: 14px; }
.ps-field > span { display: block; font-size: 12.5px; color: #555; margin-bottom: 6px; }
.ps-field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; background: #fafafa; }
#psSubmit { width: 100%; padding: 13px; border: none; border-radius: 10px;
  background: var(--prim); color: #fff; font-size: 15.5px; font-weight: 600; }
#psSubmit:disabled { background: #d8dbdf; color: #fff; }
#psNoGeo { width: 100%; margin-top: 8px; padding: 10px; }
.fd-line.ok { background: #b7e8ca; }
.fd-line.bad { background: #f7c9c4; }

/* 管理页：客户配送路线 / 参数 */
.rt-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.rt-tag { font-size: 11.5px; background: #eefbf3; color: #07a04a; border-radius: 8px;
  padding: 3px 8px; font-weight: 600; }
.rt-tag b { margin-left: 4px; }
.rt-tag.none { background: #f3f4f6; color: #8a8a8a; }
.rt-row { display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid #f5f5f5; font-size: 13.5px; }
.rt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-name small { color: #a0a0a0; font-size: 11px; margin-left: 5px; }
.rt-sel { flex: none; width: 122px; padding: 7px 6px; border: 1px solid var(--line);
  border-radius: 7px; font-size: 12.5px; background: #fafafa; }
.num-in { width: 78px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 14px; text-align: center; }
.rt-tag { cursor: pointer; }
.rt-tag.cur { background: #07c160; color: #fff; }
.rt-bulk { display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
  background: #f7f8fa; border-radius: 9px; padding: 8px 10px; }
.rt-bulk-txt { flex: 1; font-size: 11.5px; color: #8a8a8a; }
.rt-bulk .rt-sel { width: 112px; }
.rt-bulk .mini { flex: none; padding: 6px 11px; font-size: 12.5px; background: var(--prim);
  color: #fff; border: none; border-radius: 7px; }
.rt-pick { width: 17px; height: 17px; accent-color: #07c160; flex: none; }

/* ============ 总看板（三块合一） ============ */
.ab-hint { font-size: 12px; color: var(--muted); margin-left: 8px; }
.ab-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 12px 12px; min-width: 0; }
@media (min-width: 760px) { .ab-grid { grid-template-columns: repeat(3, 1fr); } }
.ab-card { background: #fff; border-radius: 12px; padding: 14px 15px 12px; min-width: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 9px; }
.ab-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ab-name { font-size: 14.5px; font-weight: 700; }
.ab-badge { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.ab-badge.ok { background: #e7f8ef; color: #07a04a; }
.ab-badge.warn { background: #fdeceb; color: #d9363e; }
.ab-num { display: flex; align-items: baseline; gap: 6px; }
.ab-num b { font-size: 30px; line-height: 1; color: #07a04a; letter-spacing: -.5px; }
.ab-num span { font-size: 12px; color: var(--muted); }
.ab-bar { height: 6px; background: #f0f2f4; border-radius: 6px; overflow: hidden; }
.ab-bar i.ok { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #07c160, #4ed99a); }
.ab-chips { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--muted); }
.ab-chips.muted { color: #a5adb5; }
.ab-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: #f4f6f8; color: #5b6570; }
.ab-chip.warn { background: #fff6e8; color: #b06a00; }
.ab-chip.bad { background: #fdeceb; color: #d9363e; font-weight: 600; }
.ab-chip.more { background: #eef1f4; color: #8a939c; }
.ab-foot { font-size: 11.5px; color: var(--muted); margin-top: auto; }
.ab-go { text-align: center; font-size: 13px; font-weight: 600; color: var(--prim);
  background: #f2fbf6; border-radius: 9px; padding: 9px; cursor: pointer; }

/* ============ 独立看板：录入进度 ============ */
.eb-card { background: #fff; margin: 0 12px 12px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.eb-head { display: grid; grid-template-columns: 1fr 70px 52px 76px; align-items: center;
  padding: 10px 14px 10px 34px; background: #f7f8fa; font-size: 11.5px; color: var(--muted);
  font-weight: 600; }
.eb-row { display: grid; grid-template-columns: 14px 1fr 70px 52px 76px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid #f5f5f5; font-size: 13.5px; }
.eb-row:last-child { border-bottom: none; }
.eb-row.off { background: #fffaf7; }
.eb-dot { width: 7px; height: 7px; border-radius: 50%; background: #cfd6dd; }
.eb-row.on .eb-dot { background: #07c160; }
.eb-row.off .eb-dot { background: #fa5151; }
.eb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-name small { display: block; font-size: 10.5px; color: #a8a8a8; font-weight: 400; }
.eb-stat b { color: #07a04a; }
.eb-stat i { color: #d9363e; font-style: normal; font-size: 12px; }
.eb-time, .eb-who { font-size: 12px; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* 独立看板模式：去掉顶部账号栏，整屏留给看板 */
body.board-only .topbar { display: none; }
.board-back { position: fixed; right: 14px; bottom: 14px; z-index: 20;
  background: rgba(0,0,0,.62); color: #fff; font-size: 12.5px; padding: 8px 14px;
  border-radius: 20px; text-decoration: none; }

/* 管理页：看板地址 */
.lnk-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.lnk { display: flex; align-items: center; gap: 8px; background: #f7f8fa;
  border-radius: 9px; padding: 9px 10px; }
.lnk-t { flex: 1; min-width: 0; }
.lnk-t b { font-size: 13.5px; }
.lnk-t small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.lnk code { font-size: 11px; color: #07a04a; background: #eefbf3; padding: 3px 7px;
  border-radius: 6px; white-space: nowrap; }
.lnk .mini { flex: none; }
@media (max-width: 430px) { .lnk code { display: none; } }

/* ================= 网页登录页（2026-11-08） ================= */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 16px;
  background-color: #f4f6f7;
  background-image:
    radial-gradient(circle at 12% -10%, rgba(7,193,96,.16) 0%, rgba(7,193,96,0) 42%),
    radial-gradient(circle at 92% 108%, rgba(23,116,214,.10) 0%, rgba(23,116,214,0) 40%);
  background-attachment: fixed; }
.login-wrap { width: 100%; max-width: 392px; }
.login-card { position: relative; overflow: hidden; background: #fff; border-radius: 16px;
  padding: 30px 26px 22px; border: 1px solid #eef0f2;
  box-shadow: 0 10px 34px rgba(17,34,26,.10), 0 2px 6px rgba(17,34,26,.04); }
.login-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #0e7a42, #07c160 55%, #35d689); }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-logo { display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px; background: #eefbf3; color: #07a04a;
  font-size: 17px; font-weight: 700; letter-spacing: .5px; margin-bottom: 10px; }
.login-brand h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.login-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.login-field { display: block; margin-bottom: 14px; }
.login-field > span { display: block; font-size: 12.5px; color: #555; margin-bottom: 6px; }
.login-field input { width: 100%; padding: 13px 14px; border: 1px solid #dcdfe6;
  border-radius: 10px; font-size: 15px; background: #fafbfc; transition: border-color .15s, background .15s; }
.login-field input:focus { outline: none; border-color: #07c160; background: #fff;
  box-shadow: 0 0 0 3px rgba(7,193,96,.12); }

.pwd-box { position: relative; }
.pwd-box input { padding-right: 58px; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: #07a04a; font-size: 13px; padding: 8px 10px; }

.login-btn { width: 100%; padding: 14px; margin-top: 4px; border: none; border-radius: 10px;
  background: #07c160; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: opacity .15s, transform .06s; }
.login-btn:hover { opacity: .92; }
.login-btn:active { transform: scale(.99); }
.login-btn:disabled { opacity: .6; cursor: default; }

.login-remember { display: flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 12.5px; color: #666; }
.login-remember input { width: 15px; height: 15px; accent-color: #07c160; }

.login-err { margin-top: 10px; padding: 10px 12px; border-radius: 9px;
  background: #fff1f0; border: 1px solid #ffd6d3; color: #d93026; font-size: 13px; line-height: 1.5; }

.or-line { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px;
  color: #b6b6b6; font-size: 12px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: #ececec; }
.wecom-btn { display: block; width: 100%; text-align: center; padding: 12px;
  border-radius: 10px; border: 1px solid #d8e6dd; background: #f7fdf9; color: #07854a;
  font-size: 14.5px; font-weight: 600; text-decoration: none; }
.wecom-btn:active { background: #eefaf3; }
.login-tip { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; }

.login-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #f0f0f0;
  font-size: 11.5px; color: #999; line-height: 1.7; text-align: center; }
.login-copy { text-align: center; color: #9aa3a8; font-size: 11.5px; margin-top: 14px; letter-spacing: .3px; }
@media (max-width: 430px) { .login-card { padding: 26px 20px 18px; border-radius: 14px; } }

/* 管理页：成员行（角色 + 网页登录状态） */
.member-row { display: block; }
.mr-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.mr-who { min-width: 0; }
.mr-who b { font-size: 14px; }
.mr-who small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.mr-head select { flex: none; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 7px; background: #fafafa; font-size: 13px; }
.mr-pwd { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pwd-state { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; }
.pwd-state.on { background: #eefbf3; color: #07854a; }
.pwd-state.off { background: #f4f4f4; color: #999; }
.pwd-lock { font-style: normal; color: #d93026; margin-left: 9px; padding-left: 9px;
  border-left: 1px solid #f3cfcc; }
.mr-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mr-acts .mini { padding: 5px 10px; font-size: 12px; border-radius: 7px; white-space: nowrap;
  border: 1px solid #d8e6dd; background: #f7fdf9; color: #07854a; }
.mr-acts .mini.ghost { background: #fff; color: #888; border-color: #e6e6e6; }
.small { font-size: 12px; line-height: 1.6; }
