:root {
  --blue: #185FA5;
  --blue-dark: #0C447C;
  --blue-light: #E6F1FB;
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --line: #E3E7ED;
  --line-strong: #CFD6DF;
  --text: #1E2733;
  --muted: #6C7887;
  --muted-2: #98A2AF;
  --green: #1D9E75;
  --green-light: #E1F5EE;
  --amber: #BA7517;
  --amber-light: #FAEEDA;
  --red: #A32D2D;
  --red-light: #FCEBEB;
  --purple: #534AB7;
  --purple-light: #EEEDFE;
  --gold: #C9A227;
  --radius: 12px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- generic ---------- */
.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: #fff; border-color: var(--line-strong); color: var(--text); }
.btn.danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn.sm { height: 34px; font-size: 13px; padding: 0 12px; }
.btn.full { width: 100%; }
.btn.link {
  background: none; border: none; color: var(--blue);
  height: auto; padding: 0; font-size: 13px; text-decoration: underline;
}

/* ===== 助教模块（第 102 轮） ===== */
.ta-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.ta-chip { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-size: 13px; }
.ta-chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.ta-row { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ta-line:last-child { border-bottom: none; }
.ta-line .btn { flex: 0 0 auto; }
.ta-sub { font-size: 12px; color: var(--muted-2); }
.vocab-module { display: flex; flex-direction: column; align-items: flex-start; width: 100%; height: auto; text-align: left; padding: 14px 16px; margin-bottom: 8px; }
.vocab-module small { display: block; margin-top: 4px; font-weight: 400; color: var(--muted); }
.vocab-banner { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 12px; border: 1px solid var(--line); }
.vocab-qtop { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.vocab-clock { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; background: #fff; }
.vocab-horn { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: block; margin: 0 auto 8px; font-size: 15px; }
.vocab-horn-note { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.vocab-choice { display: block; width: 100%; margin-bottom: 8px; }
.vocab-word { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; }
.vocab-phon { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.vocab-mean { font-size: 16px; margin-bottom: 12px; }
.vocab-ex { font-size: 13px; line-height: 1.45; margin-bottom: 4px; }
.vocab-zh { font-size: 13px; color: var(--muted); line-height: 1.45; margin-bottom: 16px; }
.vocab-horn-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.vocab-horn-row .vocab-horn { width: 44px; height: 44px; margin: 0; font-size: 13px; }
.vocab-miss { color: var(--red); font-size: 12px; margin-bottom: 12px; }
.ta-kv { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.ta-sched-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ta-wd { width: 38px; font-size: 12.5px; color: var(--muted); }
.ta-slot { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 12.5px; color: var(--muted); }
.ta-slot.on { background: #eef4ff; border-color: #3b6ef5; color: #2c55c4; }

.field { margin-bottom: 14px; }
.field > label {
  display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
select { appearance: none; background-image: none; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 18px 0 8px;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}
.tag.gray { background: #F1EFE8; color: #5F5E5A; }
.tag.blue { background: var(--blue-light); color: var(--blue-dark); }
.tag.green { background: var(--green-light); color: #085041; }
.tag.amber { background: var(--amber-light); color: #854F0B; }
.tag.red { background: var(--red-light); color: var(--red); }
.tag.purple { background: var(--purple-light); color: #3C3489; }

.msg {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.msg.error { background: var(--red-light); color: var(--red); }
.msg.ok { background: var(--green-light); color: #085041; }
.msg.warn { background: var(--amber-light); color: #854F0B; }

.empty {
  text-align: center;
  color: var(--muted-2);
  padding: 48px 20px;
  font-size: 13px;
}

/* ---------- auth ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
}
.auth-box { width: 100%; max-width: 380px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 500; margin: 0 auto 12px;
}
.auth-brand h1 { font-size: 17px; font-weight: 500; margin: 0 0 4px; }
.auth-brand p { font-size: 13px; color: var(--muted); margin: 0; }

.seg {
  display: flex;
  background: #E9EDF2;
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 18px;
}
.seg button {
  flex: 1;
  height: 34px;
  border: none;
  background: none;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
}
.seg button.on { background: #fff; color: var(--text); font-weight: 500; }

.auth-foot { text-align: center; margin-top: 16px; }

/* ---------- shell ---------- */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) 16px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.app-bar .title { font-size: 15px; font-weight: 500; }
.app-bar .sub { font-size: 12px; color: var(--muted); }

.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 16px 92px;
}

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1;
  border: none;
  background: none;
  padding: 9px 0 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted-2);
  cursor: pointer;
}
.tabbar button .ic {
  display: block;
  width: 20px; height: 20px;
  margin: 0 auto 3px;
}
.tabbar button.on { color: var(--blue); }
.tabbar button .ic svg { display: block; margin: 0 auto; }

.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- list ---------- */
.search-bar { margin-bottom: 10px; }
.search-bar input { height: 40px; }

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
/* 第 91 轮：时间段筛选的日期控件（跟 chip 同高，横向滚动里不换行） */
.chips .date-range { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.chips .date-range input[type="date"] {
  height: 30px; border: 1px solid var(--line); border-radius: 15px; padding: 0 10px;
  font-size: 12.5px; font-family: inherit; color: var(--text); background: var(--card);
  -webkit-appearance: none; appearance: none;
}
.chips .date-range input[type="date"]:focus { outline: none; border-color: var(--blue); }
.chips .date-range .dr-sep { font-size: 12px; color: var(--muted-2); }
.chip {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.cust {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 9px;
  cursor: pointer;
}
.cust:active { background: #FAFBFC; }
.cust-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.cust-name { font-size: 15px; font-weight: 500; }
.cust-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cust-meta b { font-weight: 400; color: var(--muted-2); }
.cust-note {
  font-size: 12px; color: var(--muted);
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.overdue { color: var(--red); }

/* ---------- 第 49 轮：点「负责 xxx」看这个顾问在跟的学生 ---------- */
.owner-link {
  color: var(--blue);
  border-bottom: 1px dashed var(--line-strong);
  cursor: pointer;
}
.owner-link:active { opacity: .5; border-bottom-style: solid; }
/* 第 81 轮：录入人可点（独立类名，别复用 owner-link —— bindOwnerLinks 按 .owner-link 全局匹配会撞车） */
.cr-link { color: var(--blue); border-bottom: 1px dashed var(--line-strong); cursor: pointer; }
.cr-link:active { opacity: .5; border-bottom-style: solid; }
.own-sub { font-size: 12px; color: var(--muted-2); margin: -8px 0 12px; }
.own-sub b { font-weight: 500; color: var(--muted); }
.modal .cust:last-of-type { margin-bottom: 0; }

.list-summary {
  font-size: 12px; color: var(--muted-2);
  padding: 2px 2px 10px;
}

/* ---------- detail ---------- */
.detail-head { margin-bottom: 12px; }
.detail-head h2 { font-size: 19px; font-weight: 500; margin: 0 0 6px; }
.kv { display: flex; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 84px; flex: 0 0 auto; color: var(--muted); }
.kv .v { flex: 1; word-break: break-all; }

/* 金额卡两列（第 59 轮）：新签 / 续费 一行，新签退费 / 续费退费 一行 */
.kv-duo {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.kv-duo:last-child { border-bottom: none; }
.kv-duo > .kv { display: block; padding: 0; border-bottom: none; }
.kv-duo > .kv .k { width: auto; font-size: 12px; margin-bottom: 3px; }
.kv-duo > .kv .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv-duo > .kv .jd-by { display: block; margin: 2px 0 0; font-size: 11.5px; }

/* 时段开关旁边的范围说明（第 60 轮） */
.chips-note { flex: 0 0 auto; align-self: center; font-size: 12px; color: var(--muted-2); padding-left: 2px; }

/* 日报（第 63 轮）：一周 7 天的清单 + 管理员提交矩阵 */
.dy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dy-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dy-l { font-size: 13.5px; line-height: 1.5; }
.dy-w { font-size: 11.5px; color: var(--muted-2); margin-left: 4px; }
.dy-r { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dy-grid { display: grid; grid-template-columns: 62px repeat(7, 1fr) 44px; align-items: center; }
.dy-grid .hd { font-size: 11.5px; color: var(--muted-2); text-align: center; padding: 4px 0; }
.dy-cell { text-align: center; font-size: 13px; padding: 7px 0; }
.dy-cell .no { color: var(--muted-2); }
.dy-name { font-size: 13px; }
.dy-hit { border: 0; background: none; color: var(--green); font-weight: 600; font-size: 14px; line-height: 1; padding: 2px 6px; cursor: pointer; }
.dy-num { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 10px; }
.dy-num .dn label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.dy-num .dn input { width: 100%; }

/* 客户列表页最前面的「今日签约金额」（第 60 轮） */
.today-sign { padding: 12px 14px; }
.today-sign .ts-l { font-size: 12px; color: var(--muted); }
.today-sign .ts-n {
  font-size: 24px; font-weight: 600; line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.today-sign .ts-n.zero { color: var(--muted-2); }
.today-sign .ts-s { font-size: 12px; color: var(--muted-2); }

.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue);
}
.tl-time { font-size: 12px; color: var(--muted-2); margin-bottom: 2px; }
.tl-body { font-size: 13px; white-space: pre-wrap; }
.tl-next { font-size: 12px; color: var(--amber); margin-top: 3px; }

/* ---------- 提醒 ---------- */
.tabbar button { position: relative; }
.badge {
  position: absolute; top: 5px; left: 50%; margin-left: 6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; line-height: 17px; text-align: center;
}
.alert-strip {
  display: inline-block; background: var(--blue-light); color: var(--blue);
  font-size: 12px; padding: 3px 10px; border-radius: 20px; margin-bottom: 9px;
}
.assign-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 8px; margin-bottom: 10px;
}
.assign-grid .btn { width: 100%; }
.pending-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--amber-light); border: 1px solid #E6C28A;
  border-radius: var(--radius); padding: 9px 12px; margin-bottom: 10px;
  font-size: 13px; color: #854F0B;
}

/* ---------- 只读值 / 团队成员 ---------- */
.ro-value {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #FAFBFC;
  color: var(--muted);
  font-size: 14px;
}
.ro-warn {
  border-style: solid;
  border-color: var(--amber);
  background: var(--amber-light);
  color: var(--amber);
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.team-row:last-of-type { border-bottom: none; }
.team-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  color: var(--text);
}
.team-name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-row select {
  flex: 0 0 116px;
  width: 116px;
  height: 38px;
  padding: 0 8px;
  font-size: 13px;
}
/* 板块主管勾选：勾上后该成员能看本板块所有人录入的名单（只读） */
.team-lead {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}
.team-lead input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

/* ---------- 联系结果（有效 / 无效） ---------- */
.judge-card {
  border: 1px solid #B9D5EE;
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.judge-card.judge-wait { border-color: var(--line); background: #FAFBFC; }
.judge-title { font-size: 14px; font-weight: 500; color: var(--blue-dark); margin-bottom: 3px; }
.judge-sub { font-size: 12.5px; line-height: 1.6; color: var(--blue-dark); opacity: .85; }
.judge-card.judge-wait .judge-sub { color: var(--muted); opacity: 1; }
.judge-actions { display: flex; gap: 9px; margin-top: 11px; }
.judge-actions .btn { flex: 1; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.cust-tags { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.pending-bar.judge-bar { border-color: #B9D5EE; background: var(--blue-light); color: var(--blue-dark); }

.jd-name { font-size: 13px; color: var(--muted); margin: -8px 0 12px; }
.jd-by { color: var(--muted-2); font-size: 12px; margin-left: 6px; }
.jd-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 3px; white-space: pre-wrap; }
.modal .seg button { font-size: 12.5px; }

/* ---------- 到访（到校试听 / 面谈） ---------- */
.visit-card {
  border: 1px solid #A9DCC8;
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.visit-card.visit-wait { border-color: var(--line); background: #FAFBFC; }
.visit-card .judge-title { color: #085041; }
.visit-card .judge-sub { color: #085041; opacity: .85; }
.visit-card.visit-wait .judge-sub { color: var(--muted); opacity: 1; }
.pending-bar.visit-bar { border-color: #A9DCC8; background: var(--green-light); color: #085041; }

.visit-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.visit-item:first-child { padding-top: 0; }
.visit-item:last-child { border-bottom: none; padding-bottom: 0; }
.visit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.visit-at { font-size: 13px; font-weight: 500; }
.visit-by { font-size: 12px; color: var(--muted-2); }
.visit-del {
  background: none; border: none; padding: 0 2px; margin-left: 2px;
  color: var(--muted-2); font-size: 12px; font-family: inherit;
  text-decoration: underline; cursor: pointer;
}
.visit-note { font-size: 13px; white-space: pre-wrap; margin-top: 3px; }
.visit-profile {
  font-size: 12px; color: var(--muted); background: #F6F8FA;
  border-radius: 6px; padding: 5px 8px; margin-top: 6px; line-height: 1.6;
}

/* ---------- 方案：发出去等家长答复 ---------- */
.plan-card {
  border: 1px solid #F0D9A8;
  background: var(--amber-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.plan-card .judge-title { color: #854F0B; }
.plan-card .judge-sub { color: #854F0B; opacity: .9; }
.plan-card.plan-late { border-color: #F3C0B8; background: var(--red-light); }
.plan-card.plan-late .judge-title,
.plan-card.plan-late .judge-sub { color: var(--red); }
.pending-bar.decide-bar { border-color: #F0D9A8; background: var(--amber-light); color: #854F0B; }

/* ---------- 签约：勾课程 + 填金额 ---------- */
.deal-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.deal-row .deal-c { flex: 1; font-size: 13px; }
.deal-row input { flex: 0 0 132px; width: 132px; text-align: right; }
.deal-total {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--muted);
}
.deal-total b { font-size: 16px; font-weight: 500; color: var(--green); }

/* 到访记录里带出来的结果明细 */
.visit-deal, .visit-plan { font-size: 12.5px; line-height: 1.6; margin-top: 5px; }
.visit-deal { color: #085041; }
.visit-deal b { font-weight: 500; }
.visit-plan { color: #854F0B; }

/* ---------- 线索质量 ---------- */
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-n { font-size: 26px; font-weight: 500; line-height: 1.2; }
.q-l { font-size: 12px; color: var(--muted); }
.q-split { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- 查重 ---------- */
.dup-box {
  border: 1px solid #E6C28A; background: var(--amber-light);
  border-radius: 10px; padding: 10px 12px; margin: 0 0 14px;
}
.dup-box.dup-critical { border-color: #E3AEAE; background: var(--red-light); }
.dup-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #854F0B; margin-bottom: 6px; }
.dup-box.dup-critical .dup-head { color: var(--red); }
.dup-row { position: relative; padding: 3px 0 3px 11px; font-size: 12.5px; line-height: 1.55; color: #6B4A10; }
.dup-row::before { content: ""; position: absolute; left: 2px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; }
.dup-box.dup-critical .dup-row { color: #7A2626; }
.dup-foot { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(133, 79, 11, .16); font-size: 12px; line-height: 1.5; color: #8A6A2A; }
.dup-box.dup-critical .dup-foot { border-top-color: rgba(163, 45, 45, .16); color: #8A3A3A; }
.btn.warn { background: var(--amber); border-color: var(--amber); color: #fff; }
.dup-group { padding: 11px 0; border-top: 1px solid var(--line); }
.dup-group:first-of-type { border-top: 0; padding-top: 6px; }
.dup-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dup-key { font-size: 12px; color: var(--muted); }
.dup-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.dup-item:last-child { border-bottom: 0; }
.dup-item .di-l { flex: 1; min-width: 0; }
.dup-item .di-n { font-size: 13px; }
.dup-item .di-m { font-size: 11.5px; color: var(--muted-2); margin-top: 1px; }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 6px; }
.stat {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px;
}
.stat .n { font-size: 24px; font-weight: 500; line-height: 1.25; }
.stat .l { font-size: 12px; color: var(--muted); }

/* ---------- 部门整体看板（板块主管） ---------- */
.dp-card { border-color: #D9D5F3; }
.dp-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.dp-amt { font-size: 27px; font-weight: 500; line-height: 1.15; color: var(--purple); }
.dp-amt-l { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dp-grid {
  display: grid; grid-template-columns: 76px repeat(3, 1fr);
  align-items: center; gap: 3px 6px; margin-top: 12px;
}
.dp-grid .dp-h { font-size: 12px; color: var(--muted-2); text-align: center; }
.dp-grid .dp-l { font-size: 12.5px; color: var(--muted); }
.dp-n { font-size: 19px; font-weight: 500; line-height: 1.5; text-align: center; }

.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.bar-row .bl { width: 74px; flex: 0 0 auto; color: var(--muted); }
.bar-row .bt { flex: 1; height: 8px; background: #EEF1F5; border-radius: 4px; overflow: hidden; }
.bar-row .bf { height: 100%; background: var(--blue); border-radius: 4px; }
.bar-row .bn { width: 46px; flex: 0 0 auto; text-align: right; font-size: 12px; color: var(--muted); }
/* 第 46 轮：渠道占比块里，渠道名下面挂一行小字（金额） */
.bar-row .bl-sub { font-size: 10.5px; font-weight: 400; color: var(--muted-2); margin-top: 1px; }

/* ---------- modal ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(24, 32, 43, .42);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff;
  width: 100%; max-width: 560px;
  max-height: calc(90vh - env(safe-area-inset-top));
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
.modal h3 { font-size: 16px; font-weight: 500; margin: 0 0 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ---------- 在读学生 ---------- */
.stu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 9px;
  cursor: pointer;
}
.stu:active { background: #FAFBFC; }
.stu.stu-focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-light); }
.stu .cust-note { white-space: normal; }
.stu-miss { color: var(--amber); }
.modal select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

@media (min-width: 760px) {
  .modal-bg { align-items: center; }
  .modal { border-radius: 16px; max-height: 86vh; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .content { padding-bottom: 40px; }
  .tabbar {
    position: sticky; bottom: 0;
    max-width: 860px; margin: 0 auto;
    border-top: 1px solid var(--line);
  }
}

/* 全公司看板：当月目标进度条 */
.dp-goal { margin-top:10px; }
.dp-goal-bar { height:8px; border-radius:4px; background:var(--line); overflow:hidden; }
.dp-goal-bar i { display:block; height:100%; border-radius:4px; background:var(--purple); transition:width .3s; }
.dp-goal-l { display:flex; justify-content:space-between; align-items:center; margin-top:7px; font-size:12.5px; color:var(--muted); gap:8px; }
.dp-goal-l b { color:var(--text); font-weight:500; }

/* 市场板块数据页顶部的「本周」三格（第 36 轮）：窄屏也坚持 3 列 */
/* 第 45 轮：表头一行 + 三行数字，行间用细线分隔，像个迷你表格 */
.period-grid { display: grid; grid-template-columns: 42px repeat(3, 1fr) 1.34fr; gap: 0 4px; margin-bottom: 6px; align-items: center; }
.period-grid .pg-h { font-size: 10.5px; font-weight: 500; color: var(--muted-2); text-align: center; padding: 0 0 7px; }
.period-grid .pg-k { font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 9px 0; }
.period-grid .pg-v { font-size: 16px; font-weight: 600; text-align: center; padding: 9px 0; font-variant-numeric: tabular-nums; }
.period-grid .pg-v.money { font-size: 14.5px; }
.period-grid > *:nth-child(n+6) { border-top: 1px solid var(--line); }

/* ---------- 周报（第 41 轮） ---------- */
.wr-sec { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.wr-sec small { color: var(--muted-2); font-weight: 400; }
.wr-rowbox { border: 1px dashed #d9d9d9; border-radius: 10px; padding: 10px 10px 2px; margin-bottom: 8px; position: relative; }
.wr-rowdel { position: absolute; top: 6px; right: 8px; font-size: 11px; color: var(--red); background: none; border: none; padding: 2px 4px; }
.wr-addrow { margin: 2px 0 12px; }
.wr-metric { padding: 8px 0; border-bottom: 1px dashed #eee; }
.wr-metric:last-child { border-bottom: none; }
.wr-ml { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.wr-mg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wr-mg .field { margin: 0; }
.wr-grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wr-grid5 .field { margin: 0; }
.wr-grid5 .field label { font-size: 10.5px; }
.wr-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wr-table th, .wr-table td { border-bottom: 1px solid #f0f0f0; padding: 5px 4px; text-align: left; white-space: nowrap; }
.wr-table th { color: var(--muted); font-weight: 500; }
.weekly-bar { background: #fff7e6; }


/* ---------- 渠道方月度排行（第 52 轮） ---------- */
.chorg-head, .chorg-row { display: flex; align-items: center; gap: 6px; }
.chorg-head {
  font-size: 12px; color: var(--muted-2);
  padding: 0 0 6px; border-bottom: 1px solid var(--line);
}
.chorg-head .chorg-n, .chorg-head .chorg-amt { font-size: 12px; }
.chorg-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.chorg-row:last-child { border-bottom: 0; }
.chorg-name {
  flex: 1 1 auto; min-width: 0; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chorg-n { flex: 0 0 38px; text-align: right; font-size: 13.5px; }
.chorg-amt { flex: 0 0 84px; text-align: right; font-size: 13.5px; }
.chorg-total {
  font-weight: 600; border-top: 1px solid var(--line-strong); border-bottom: 0;
}
.mini {
  flex: 0 0 auto; height: 26px; padding: 0 9px; border-radius: 13px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--muted);
  font-size: 12px; font-family: inherit; cursor: pointer;
}
.mini.danger { color: var(--red); border-color: #E8C9C9; }

/* ---------- 第 68 轮：点顾问名字 → 他的到访记录 / 在跟客户 ---------- */
.cv-link {
  color: var(--blue);
  border-bottom: 1px dashed var(--line-strong);
  cursor: pointer;
}
.cv-link:active { opacity: .5; border-bottom-style: solid; }
.cv-seg { margin-bottom: 12px; }
.cv-per { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 10px; }
.cv-p {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
.cv-p.on { border-color: var(--blue); background: var(--blue-light); }
.cv-pn { font-size: 19px; font-weight: 500; line-height: 1.2; }
.cv-p.on .cv-pn { color: var(--blue); }
.cv-pl { font-size: 12px; color: var(--muted); }
.cv-pd { font-size: 11px; color: var(--muted-2); }

/* ---------- 第 69 轮：工资单 ---------- */
.wage-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wage-mlabel { font-size: 14px; font-weight: 500; }
.wage-flow { display: flex; gap: 6px; margin: 8px 0 6px; }
.wage-step { flex: 1; text-align: center; font-size: 12px; padding: 7px 4px; border-radius: 9px; background: var(--bg); color: var(--muted-2); line-height: 1.35; }
.wage-step.on { background: var(--blue-light); color: var(--blue); font-weight: 500; }
.wage-step.done { background: var(--green-light); color: var(--green); }
.wage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.wage-name { font-size: 14.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wage-total { font-size: 16px; font-weight: 500; color: var(--purple); white-space: nowrap; }
.wage-preview { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; }
.wage-prow { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 4px 0; gap: 10px; }
.wage-prow b { color: var(--text); font-weight: 500; text-align: right; }
.wage-pbig { border-top: 1px solid var(--line-strong); margin-top: 5px; padding-top: 8px; font-size: 13.5px; }
.wage-pbig b { color: var(--purple); font-size: 15px; }

/* ---------- 工资表格（第 70 轮：工资单 / 工资档案 由卡片改表格） ---------- */
.wage-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wage-tbl { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 940px; font-size: 12.5px; }
.wage-tbl th, .wage-tbl td { padding: 7px 9px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.wage-tbl thead th { font-weight: 500; font-size: 12px; color: var(--muted); background: var(--bg); position: sticky; top: 0; z-index: 1; }
.wage-tbl tbody td { background: var(--card); }
.wage-tbl tfoot th, .wage-tbl tfoot td { font-weight: 500; background: var(--bg); border-bottom: none; border-top: 1px solid var(--line-strong); }
.wage-tbl th.wt-l, .wage-tbl td.wt-l { text-align: left; }
.wage-tbl .wt-pin-l { position: sticky; left: 0; z-index: 2; }
.wage-tbl thead .wt-pin-l { z-index: 3; }
.wage-tbl .wt-pin-r { position: sticky; right: 0; z-index: 2; box-shadow: -7px 0 9px -8px rgba(30, 39, 51, .35); }
.wage-tbl thead .wt-pin-r { z-index: 3; }
.wage-tbl .wt-name { font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.wage-tbl .wt-sub { display: block; font-size: 11px; color: var(--muted-2); font-weight: 400; }
.wage-tbl .wt-total { color: var(--purple); font-weight: 500; font-size: 13px; }
.wage-tbl .wt-neg { color: var(--red); }
.wage-tbl tr.wt-row { cursor: pointer; }
.wage-tbl tr.wt-row:hover td { background: var(--blue-light); }

/* ---------- 第 93 轮：重要客户标记 ---------- */
.chip.star-chip { color: var(--gold); border-color: var(--line-strong); }
.chip.star-chip.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.cust-name .star { color: var(--gold); margin-right: 3px; }

/* 第 94 轮：「⏰ 已逾期」chip 与摘要红字直达（isOverdue 口径） */
.chip.od-chip { color: var(--red); border-color: #E8C9C9; }
.chip.od-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.od-link { cursor: pointer; }
.od-link:hover { text-decoration: underline; }

/* ---------- 第 107 轮：助教 · 固定学生 / 交接 / 搜索 ---------- */
.ta-row input[type="text"] { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 10px; font-size: 13.5px; background: #fff; color: var(--text); }
.ta-row input[type="text"]:focus { outline: none; border-color: #3b6ef5; }
details.ta-row > summary { cursor: pointer; font-size: 14px; list-style: none; }
details.ta-row > summary::-webkit-details-marker { display: none; }
details.ta-row > summary::before { content: "▸ "; color: var(--muted-2); }
details.ta-row[open] > summary::before { content: "▾ "; }

/* ---------- 第 108 轮：学生时段 / 交接推荐 / 学生总表 ---------- */
.ta-slots { display: inline-flex; gap: 4px; }
.ta-slots .ta-slot { padding: 1px 8px; font-size: 11.5px; }
.ta-slots .ta-slot[disabled] { opacity: .65; }
.ta-openstu { cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
.ta-openstu:hover { color: #2c55c4; }
.ho-row select { height: 32px; font-size: 12.5px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 6px; background: #fff; color: var(--text); }

/* ---------- 第 109 轮：主管班表维护 ---------- */
.shift-nav { display: flex; gap: 6px; margin-top: 8px; }
.shift-nav .btn { flex: 1; }
.shift-legend { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.shift-legend .shift-cell { width: 20px; height: 20px; font-size: 10.5px; cursor: default; }
.shift-grid { border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.shift-grid th, .shift-grid td { padding: 0; text-align: center; }
.shift-grid thead th { font-weight: 400; color: var(--muted); font-size: 11px; line-height: 1.35; padding-bottom: 2px; white-space: nowrap; }
.shift-grid thead th b { display: block; font-weight: 500; color: var(--text); font-size: 11.5px; }
.shift-grid thead th.wk b { color: #B4552D; }
.shift-grid th.nm { text-align: left; white-space: nowrap; font-weight: 500; font-size: 12px; padding-right: 6px; }
.shift-grid th.nm span { color: var(--muted); font-weight: 400; margin-right: 4px; }
.shift-cell { width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--muted); font-size: 11.5px; cursor: pointer; padding: 0; }
.shift-cell.bai { background: #EAF1FB; border-color: #C9DBF4; color: #2C55C4; }
.shift-cell.wan { background: #F3EEFB; border-color: #DDD2F2; color: #6B4FB0; }
.shift-cell.on { background: #EAF6EF; border-color: #CBE6D6; color: #3E7B4F; }
.shift-cell.off { background: #FCEEEA; border-color: #F3D3C8; color: #B4552D; }
