:root {
  --bg: #eef2f8;
  --panel: #ffffff;
  --panel2: #f1f5f9;
  --well: #f4f7fb;
  --text: #16202e;
  --muted: #64748b;
  --line: #e4e9f1;
  --line2: #cdd6e4;
  --accent: #ff4d40;
  --green: #16a34a;
  --red: #e11d48;
  --amber: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 8% -8%, rgba(255, 77, 64, .06), transparent 60%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  line-height: 1.6;
}
.app { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
header { text-align: center; margin-bottom: 24px; position: relative; }
header h1 { margin: 0 0 4px; font-size: 26px; }
.sub { color: var(--muted); margin: 0; }

/* 用户条 */
.user-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.user-bar #user-info { display: inline-flex; align-items: center; gap: 8px; }
.user-bar button { padding: 6px 14px; font-size: 14px; }
.my-region { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.my-region .mr-label { color: var(--text); }
.my-region a { color: var(--accent); text-decoration: none; font-size: 12px; }
.my-region a:hover { text-decoration: underline; }
.my-region select { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; font-family: inherit; max-width: 240px; }
.role-badge { font-size: 12px; padding: 2px 10px; border-radius: 20px; }
.role-badge.trainee { background: #e6efff; color: #1d4ed8; }
.role-badge.coach { background: #e3f6e9; color: #15803d; }
.role-badge.admin { background: #fdf0dd; color: #b45309; }

/* 入口工具栏 */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

/* ===== 登录页（浅色 · 专业风）===== */
.login-page {
  overflow: hidden;
  /* 专业字体栈：Inter（拉丁/数字）+ 苹方/雅黑/思源（中文）*/
  --lg-ink: #16202e;
  --lg-muted: #64748b;
  --lg-line: #e4e9f1;
  --lg-accent: #ff4d40;
  --lg-accent-2: #ff8a4d;
  font-family: "Inter", -apple-system, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
}
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  color: var(--lg-ink);
  background:
    radial-gradient(820px 520px at 8% -10%, rgba(255, 77, 64, .12), transparent 60%),
    radial-gradient(760px 560px at 108% 112%, rgba(255, 138, 80, .10), transparent 58%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%);
}
/* 背景柔光 */
.login-aurora {
  position: absolute; left: -10%; right: -10%; top: -26%; height: 70%;
  background: conic-gradient(from 130deg at 50% 50%,
    rgba(255, 77, 64, 0), rgba(255, 77, 64, .16),
    rgba(255, 138, 80, .14), rgba(63, 185, 80, .06), rgba(255, 77, 64, 0));
  filter: blur(96px);
  opacity: .7;
  pointer-events: none;
  animation: auroraFloat 18s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
  from { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1.05); }
  to   { transform: translate3d(4%, 3%, 0) rotate(12deg) scale(1.16); }
}

.login-card {
  position: relative; z-index: 1;
  max-width: 404px; width: 100%;
  padding: 40px 36px 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 30px 60px -28px rgba(31, 50, 90, .35),
    0 12px 28px -18px rgba(31, 50, 90, .22);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  animation: cardIn .55s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo {
  width: 60px; height: 60px; margin: 0 auto 16px;
  display: grid; place-items: center; color: #fff;
  border-radius: 17px;
  background: linear-gradient(140deg, var(--lg-accent), var(--lg-accent-2));
  box-shadow: 0 12px 26px -8px rgba(255, 77, 64, .5), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.login-logo svg { width: 32px; height: 32px; }
.login-title {
  margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: .2px;
  color: var(--lg-ink);
}
.login-tagline { margin: 0; color: var(--lg-muted); font-size: 13.5px; }

.login-form { display: flex; flex-direction: column; gap: 15px; text-align: left; }
.login-form:not(.hidden) { animation: formIn .35s ease both; }
@keyframes formIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; color: var(--lg-muted); font-weight: 600; padding-left: 2px; }
.input-wrap { position: relative; display: block; }
.input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: #94a3b8; pointer-events: none;
  transition: color .15s;
}
.login-form input {
  width: 100%;
  background: #f4f7fb;
  border: 1px solid var(--lg-line);
  border-radius: 12px;
  padding: 12px 14px 12px 42px;
  color: var(--lg-ink); font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-form input::placeholder { color: #9aa7b8; }
.login-form input:focus {
  outline: none;
  background: #fff;
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3.5px rgba(255, 77, 64, .14);
}
.input-wrap:focus-within .input-icon { color: var(--lg-accent); }
.btn-block { width: 100%; }
.login-form .primary {
  margin-top: 8px; letter-spacing: 2px; color: #fff;
  border-radius: 12px; padding: 12px 22px;
  background: linear-gradient(135deg, var(--lg-accent), #ff6a3d);
  box-shadow: 0 12px 24px -10px rgba(255, 77, 64, .6);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.login-form .primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 30px -10px rgba(255, 77, 64, .72);
  transform: translateY(-1px);
}
.login-form .primary:active { transform: translateY(0); }
.login-form .err { color: var(--red); font-size: 13px; margin: 0; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--lg-muted); font-size: 12.5px; margin: 20px 0; }
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lg-line), transparent);
}
.wecom-btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: #fff; color: #334155; border: 1px solid var(--lg-line);
  border-radius: 12px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.wecom-btn:hover { background: #f8fafc; border-color: #cdd6e4; box-shadow: 0 6px 16px -10px rgba(31, 50, 90, .3); }
.wecom-btn .btn-icon { width: 19px; height: 19px; color: #07c160; }

.toggle-line { text-align: center; font-size: 13.5px; margin: 18px 0 0; color: var(--lg-muted); }
.toggle-line a { color: var(--lg-muted); text-decoration: none; }
.toggle-line a strong { color: var(--lg-accent); font-weight: 600; }
.toggle-line a:hover strong { text-decoration: underline; }
.login-card .hint { text-align: center; color: var(--lg-muted); }
@media (prefers-reduced-motion: reduce) {
  .login-aurora, .login-card, .login-form:not(.hidden) { animation: none; }
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px -20px rgba(31, 50, 90, .28), 0 1px 2px rgba(31, 50, 90, .04);
}
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.hidden { display: none !important; } /* 始终压过后面定义的 display 规则（如 .modal/.voice-controls）*/
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.persona-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.persona-card {
  background: var(--panel2);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.persona-card:hover { border-color: var(--line2); box-shadow: 0 6px 16px -12px rgba(31, 50, 90, .3); }
.persona-card.selected { border-color: var(--accent); }
.persona-card .label { font-weight: 600; }
.persona-card .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tag {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 20px;
  background: #e9eef6; color: var(--muted); margin-left: 6px;
}

/* 场景选择（电话 / 当面） */
.scene-picker { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.scene-opt {
  flex: 1; min-width: 200px; background: var(--panel2); border: 2px solid transparent;
  border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.scene-opt:hover { border-color: var(--line2); box-shadow: 0 6px 16px -12px rgba(31, 50, 90, .3); }
.scene-opt.selected { border-color: var(--accent); }
.scene-opt-top { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.scene-icon { font-size: 20px; }
.scene-tag { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* 本校区客群画像横幅 */
.campus-banner {
  background: linear-gradient(135deg, #fff3ef, #fff8f0);
  border: 1px solid #ffd9d3; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px;
}
.cb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cb-pin { font-size: 16px; }
.cb-name { font-size: 16px; font-weight: 700; color: var(--text); }
.cb-tag { font-size: 11px; font-weight: 600; color: #fff; background: var(--accent);
  border-radius: 20px; padding: 2px 9px; }
.cb-tag-alt { background: #d97706; }
.cb-switch-wrap { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cb-switch-lbl { font-size: 12px; color: var(--muted); }
.cb-sel { background: #fff; color: var(--text); border: 1px solid #ffd9d3;
  border-radius: 8px; padding: 5px 8px; font-size: 13px; font-family: inherit; max-width: 120px; }
.cb-sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 64, .14); }
.cb-switch-wrap a { color: var(--accent); text-decoration: none; font-size: 12px; }
.cb-summary { font-size: 13px; color: var(--text); margin-bottom: 8px; }
.cb-traits { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-trait { font-size: 12px; color: #c23b2e; background: #ffe9e6; border-radius: 8px; padding: 3px 9px; }
.cb-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.cb-nearby-bar { margin-top: 10px; }
.cb-nearby-btn {
  background: #fff; color: var(--accent); border: 1px solid #ffd9d3; border-radius: 20px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cb-nearby-btn:hover { background: #fff3ef; }
.campus-nearby { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.nearby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nearby-col h4 { margin: 0 0 8px; font-size: 14px; }
.poi-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.poi-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.poi-list li:last-child { border-bottom: none; }
.poi-name { color: var(--text); }
.poi-dist { color: var(--muted); flex: none; font-size: 12px; }
.poi-right { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.nearby-tip { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.tier-badge { font-size: 11px; font-weight: 600; border-radius: 20px; padding: 1px 8px; white-space: nowrap; }
.tier-低端 { background: #eef1f5; color: #64748b; }
.tier-中端 { background: #e6efff; color: #1d4ed8; }
.tier-高端 { background: #fff0e0; color: #c8721a; }
.tier-豪宅 { background: #f3e8ff; color: #7c3aed; }
.tier-sel { font-size: 12px; font-family: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; color: var(--text); background: #fff; }
.nearby-foot { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.nearby-foot a, .campus-nearby a { color: var(--accent); text-decoration: none; }
@media (max-width: 560px) { .nearby-grid { grid-template-columns: 1fr; } }
.econ-hint {
  font-size: 12.5px; color: var(--ink); margin: 10px 0 0; padding: 8px 10px;
  background: #fff8f6; border: 1px solid #ffe1d8; border-radius: 8px;
}
/* 校区校历 / 本地考情 */
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-head h4 { margin: 0; font-size: 14px; }
.cal-list { list-style: none; margin: 0 0 10px; padding: 0; }
.cal-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cal-row:last-child { border-bottom: none; }
.cal-row.cal-now { background: #fff8f6; border-radius: 6px; }
.cal-mon { flex: 0 0 auto; font-weight: 600; color: var(--accent); width: 38px; }
.cal-kind { flex: 0 0 auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cal-title { flex: 1 1 auto; }
.cal-grades { font-size: 11px; color: var(--muted); margin-left: 6px; }
.cal-note { display: block; font-size: 11.5px; color: var(--muted); }
.cal-del { flex: 0 0 auto; color: var(--muted) !important; text-decoration: none; font-size: 12px; }
.cal-del:hover { color: #d33 !important; }
.cal-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.cal-form select, .cal-form input { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }
.cal-form input[name="title"] { flex: 1 1 180px; }
.cal-form input[name="note"] { flex: 1 1 160px; }
.cal-grades-pick { flex: 0 0 auto; font-size: 12px; }
.cal-grades-pick summary { cursor: pointer; color: var(--accent); }
.cal-grade-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; max-width: 360px; }
.cal-grade-chips label { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.fit-badge {
  font-size: 11px; font-weight: 600; color: #fff; background: var(--accent);
  border-radius: 20px; padding: 1px 8px; margin-left: 4px; vertical-align: middle;
}

/* 个性化训练推荐 */
.reco {
  background: linear-gradient(135deg, #fff3ef, #fff8f4);
  border: 1px solid #ffd9d3; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
}
.reco-head { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.reco-sub { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.reco-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.reco-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column;
}
.reco-card-label { font-weight: 600; font-size: 14px; }
.reco-meta { color: var(--muted); font-size: 12px; margin: 4px 0 6px; }
.reco-reason { font-size: 12.5px; color: var(--text); line-height: 1.5; flex: 1; margin-bottom: 10px; }
.reco-card .reco-go { align-self: flex-start; padding: 7px 18px; }

/* 时间轴（横向时间节点，点击筛选） */
.picker-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.picker-bar-label { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.timeline {
  display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: thin;
}
.tl-node {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 64px; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  background: var(--panel2); border: 1.5px solid transparent; color: var(--text);
  font-weight: 600; font-size: 14px; position: relative; transition: border-color .15s, background .15s;
}
.tl-cal { white-space: nowrap; }
.tl-node:hover { border-color: var(--line2); }
.tl-node.active { background: #fff; border-color: var(--accent); box-shadow: 0 6px 16px -10px rgba(255, 77, 64, .5); }
.tl-node.active .tl-name { color: var(--accent); }
.tl-cal { font-size: 11px; color: var(--muted); font-weight: 400; }
.tl-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--well); border-radius: 20px; padding: 0 7px; margin-top: 2px;
}
.tl-node.active .tl-count { color: #fff; background: var(--accent); }
/* 节点之间用细连接线，做出"轴"的感觉 */
.tl-node:not(:last-child)::after {
  content: ""; position: absolute; right: -8px; top: 50%; width: 8px; height: 1.5px;
  background: var(--line); z-index: 0;
}

/* 筛选下拉行 */
.persona-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.persona-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.persona-filters select {
  background: var(--well); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 12px; font-size: 14px; font-family: inherit; min-width: 130px;
}
.persona-filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 64, .14); }

.tag-timing { background: #ffe9e6; color: #c23b2e; }
.empty-hint { color: var(--muted); font-size: 14px; padding: 18px 4px; }
.list-hint { color: var(--muted); font-size: 13px; margin: 0 0 10px; padding: 8px 12px; background: var(--surface-2, #f6f7f9); border-radius: 8px; }
.list-hint b { color: var(--text); }

/* 当前月份节点（即便没选中也标出"本月"） */
.tl-node.is-current { padding-top: 16px; }
.tl-now {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: #fff; background: var(--accent);
  border-radius: 20px; padding: 1px 7px; white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(255, 77, 64, .6);
}
.tl-node.is-current:not(.active) { border-color: #ffc7c0; }

/* 当前/所选月份的"家长特性"说明条（按小学/初中/高中分学段） */
.timing-info {
  background: linear-gradient(180deg, #fff6f4, #fff);
  border: 1px solid #ffd9d3; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px;
}
.ti-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ti-month { font-weight: 700; font-size: 16px; color: var(--accent); white-space: nowrap; }
.ti-theme { font-size: 12px; font-weight: 600; color: #c23b2e; margin-left: 6px;
  background: #ffe9e6; border-radius: 20px; padding: 1px 8px; }
.ti-mind { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ti-stages { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed #ffd9d3; }
.ti-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; }
.ti-stage {
  flex: none; width: 38px; text-align: center; font-size: 12px; font-weight: 600;
  border-radius: 6px; padding: 2px 0; margin-top: 1px;
}
.ti-小学 { background: #e3f2ff; color: #1d6fd1; }
.ti-初中 { background: #e6f7ec; color: #1c9c54; }
.ti-高中 { background: #fff0e0; color: #c8721a; }
.ti-text { color: var(--text); }

/* 对练前提示（结合当月+该家长学段的共性） */
.practice-tip {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(180deg, #fff6f4, #fff);
  border: 1px solid #ffd9d3; border-radius: 12px;
  padding: 12px 14px; margin: 14px 0 4px;
}
.pt-icon { font-size: 18px; line-height: 1.4; flex: none; }
.pt-head { font-size: 13px; color: var(--text); margin-bottom: 3px; }
.pt-head b { color: var(--accent); }
.pt-text { font-size: 13px; color: var(--text); line-height: 1.5; }
.pt-sub { color: var(--muted); margin-top: 2px; }

button {
  font-size: 15px; font-family: inherit; border: none; border-radius: 10px;
  padding: 11px 22px; cursor: pointer; font-weight: 600;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 20px -12px rgba(255, 77, 64, .6); }
.danger { background: var(--red); color: #fff; }
.secondary { background: var(--panel); color: var(--text); border: 1px solid var(--line2); }
.secondary:hover { background: var(--panel2); }
.setup-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.call-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.call-head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hint-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.setting-row { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.setting-row input { width: 16px; height: 16px; }
.setting-state { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.setting-state.on { color: #0a7d3c; background: #e6f6ec; }
.setting-state.off { color: var(--muted); background: var(--surface-2, #f1f2f4); }

/* 实时教练提示条 */
.coach-hint {
  display: flex; align-items: center; gap: 10px;
  border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
  font-size: 14px; border: 1px solid var(--line); animation: hintIn .25s ease both;
}
@keyframes hintIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.coach-hint .ch-icon { font-size: 18px; flex: none; }
.coach-hint .ch-badge { flex: none; font-size: 11px; font-weight: 700; color: #fff; border-radius: 20px; padding: 1px 8px; }
.coach-hint .ch-text { color: var(--text); }
.coach-hint .ch-text.muted { color: var(--muted); }
.coach-hint.ch-tip { background: #eef4ff; border-color: #d4e2ff; }
.coach-hint.ch-tip .ch-badge { background: #2f6bff; }
.coach-hint.ch-op { background: #e7f7ec; border-color: #c5ebd2; }
.coach-hint.ch-op .ch-badge { background: var(--green); }
.coach-hint.ch-warn { background: #fdeef0; border-color: #f7d4da; }
.coach-hint.ch-warn .ch-badge { background: var(--red); }
.status { color: var(--muted); font-size: 14px; }
.status.live { color: var(--green); }
.status.live::before { content: "● "; }

/* 对练舞台（电话 / 当面 两种形态） */
.call-stage { margin-bottom: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.call-stage .stage-name { text-align: center; font-weight: 600; font-size: 17px; margin-top: 10px; }
.call-stage .stage-scene { text-align: center; color: var(--muted); font-size: 13px; margin-top: 2px; padding-bottom: 12px; }

/* 电话：音频感——脉冲圆环 + 听筒，看不到脸 */
.call-stage.phone { background: radial-gradient(circle at 50% 35%, #e6efff, #f4f7fb); padding-top: 22px; }
.phone-av { position: relative; width: 110px; height: 110px; margin: 0 auto; }
.phone-av .disc {
  position: absolute; inset: 22px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  box-shadow: 0 10px 22px -8px rgba(255, 77, 64, .55);
}
.phone-av .ring {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0;
}
.call-stage.phone.talking .ring { animation: pulse 1.4s ease-out infinite; }
.call-stage.phone.talking .ring.r2 { animation-delay: .7s; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.2); opacity: 0; } }

/* 当面：门店背景 + 表情头像 */
.call-stage.inperson { background: linear-gradient(160deg, #eaf0fb 0%, #f4f7fb 100%); padding-top: 18px; }
.call-stage.inperson .store {
  width: 180px; height: 150px; margin: 0 auto; position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  border-bottom: 3px solid var(--line2);
}
.call-stage.inperson .store::before {
  content: "🏫"; position: absolute; top: 4px; left: 14px; font-size: 22px; opacity: .45;
}
.call-stage.inperson .store::after {
  content: ""; position: absolute; right: 16px; top: 10px; width: 34px; height: 46px;
  background: #dbe3ef; border-radius: 4px; opacity: .7;
}
.avatar { width: 150px; height: 150px; position: relative; }
.avatar .face { width: 100%; height: 100%; transition: filter .2s; }

/* 写实数字人肖像 */
.dh-face {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 150px; height: 150px; object-fit: cover; border-radius: 14px;
  box-shadow: 0 12px 28px -12px rgba(0,0,0,.35); transition: filter .25s;
}
.dh-emotion {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; color: var(--muted);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px;
}
.call-stage.inperson.talking .dh-face { animation: dhTalk 1.1s ease-in-out infinite; }
@keyframes dhTalk { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.025); } }
/* 情绪 → 写实肖像的色调/动效呈现 */
.dh-face.em-happy { filter: brightness(1.07) saturate(1.12); }
.dh-face.em-sad { filter: grayscale(.3) brightness(.93); }
.dh-face.em-angry { filter: saturate(1.35) contrast(1.08) hue-rotate(-8deg); }
.dh-face.em-fearful { filter: contrast(1.06) brightness(.97); animation: dhTremble .5s ease-in-out infinite; }
.dh-face.em-surprised { filter: brightness(1.04); transform: translateX(-50%) scale(1.04); }
.dh-face.em-disgusted { filter: saturate(.85) hue-rotate(10deg); }
@keyframes dhTremble { 0%,100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 1.5px)); } 75% { transform: translateX(calc(-50% + 1.5px)); } }
.mouth { transform-box: fill-box; transform-origin: center; }
.call-stage.inperson.talking .mouth { animation: talk .28s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scaleY(.6); } to { transform: scaleY(1.15); } }

.transcript {
  background: var(--well); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 220px;
  max-height: 50vh; overflow-y: auto;
}
.line { margin-bottom: 10px; }
.line .who { font-size: 12px; color: var(--muted); }
.line.user .bubble { color: #1d4ed8; }
.line.assistant .bubble { color: #b45309; }
.bubble { white-space: pre-wrap; }

.voice-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.voice-controls .hint { margin: 0; }
#mic-btn { white-space: nowrap; }
#mic-btn:disabled { opacity: .5; }
.text-input { display: flex; gap: 8px; margin-top: 12px; }
.text-input input {
  flex: 1; background: var(--well); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; color: var(--text); font-size: 15px; font-family: inherit;
}
.text-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 64, .14); }

/* 评分报告 */
.score-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.big-score { font-size: 40px; font-weight: 700; color: var(--accent); }
.dim { margin: 10px 0; }
.dim-top { display: flex; justify-content: space-between; font-size: 14px; }
.barwrap { background: #e8edf5; border-radius: 6px; height: 8px; overflow: hidden; margin: 4px 0; }
.bar { height: 100%; background: var(--accent); }
.dim-comment { color: var(--muted); font-size: 13px; }
.review-block { margin-top: 16px; }
.review-block h3 { font-size: 15px; margin: 0 0 6px; }
.review-block ul { margin: 0; padding-left: 20px; }
.review-block li { margin-bottom: 6px; }
.pill { font-size: 13px; padding: 2px 10px; border-radius: 20px; }
.pill.高 { background: #e3f6e9; color: #15803d; }
.pill.中 { background: #fdf0dd; color: #b45309; }
.pill.低 { background: #fde4ea; color: #be123c; }
.err { color: var(--red); }

/* 学员姓名行 */
.trainee-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.trainee-row label { color: var(--muted); }
.trainee-row input {
  flex: 1; min-width: 160px; background: var(--well); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; color: var(--text); font-size: 15px; font-family: inherit;
}
.trainee-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 64, .14); }

/* 历史档案 */
.archive-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.archive-controls select {
  background: var(--well); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 14px; font-family: inherit;
}
.stat-line { background: var(--panel2); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.tbl { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl th { color: var(--muted); font-weight: 500; }
.trow { cursor: pointer; }
.trow:hover { background: var(--panel2); }

.trend { display: flex; align-items: flex-end; gap: 6px; height: 130px; background: var(--well);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 14px; overflow-x: auto; }
.tb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%; min-width: 28px; }
.tb-fill { width: 18px; background: var(--accent); border-radius: 4px 4px 0 0; }
.tb span { font-size: 11px; color: var(--muted); margin-top: 4px; }

.sess-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--panel2); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: background .15s; }
.sess-row:hover { background: #e7edf6; }
.sess-score { font-size: 20px; font-weight: 700; color: var(--accent); min-width: 40px; }
.sess-meta { color: var(--muted); font-size: 14px; }
#sess-detail:not(:empty) { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }

/* AI–教练评分一致性 */
.cons-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin: 12px 0 6px; background: var(--well); }
.cons-seg { min-width: 2px; }
.cons-aihigh { background: #f0506e; }
.cons-close { background: #3fb950; }
.cons-ailow { background: #d29922; }
.cons-legend { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cons-k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.cons-h4 { margin: 12px 0 6px; font-size: 14px; }
.cons-up { color: var(--green); font-weight: 600; }
.cons-down { color: var(--red); font-weight: 600; }

/* 学员能力雷达 */
.radar-wrap { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; text-align: center; margin-bottom: 14px; }
.radar-svg { width: 100%; max-width: 360px; height: auto; }
.radar-legend { font-size: 12px; color: var(--muted); margin-top: 4px; }
.radar-legend .rl { font-weight: 600; margin-right: 10px; }
.radar-legend .rl-recent { color: var(--accent); }
.radar-legend .rl-recent::before { content: "━ "; }
.radar-legend .rl-early { color: #94a3b8; }
.radar-legend .rl-early::before { content: "┄ "; }

/* 学员错题本 */
.mistake-book {
  background: linear-gradient(180deg, #fff7f4, #fff); border: 1px solid #ffd9d3;
  border-radius: 14px; padding: 14px 16px; margin: 16px 0;
}
.mistake-book > h3 { margin: 0 0 8px; }
.mk-sub { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.mk-weak { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.mk-block { margin-top: 10px; }
.mk-block h4 { margin: 0 0 6px; font-size: 14px; }
.mk-list { list-style: none; margin: 0; padding: 0; }
.mk-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.mk-item:last-child { border-bottom: none; }
.mk-head { display: flex; align-items: flex-start; gap: 8px; }
.mk-count { flex: none; font-size: 12px; font-weight: 700; color: #fff; border-radius: 20px; padding: 1px 8px; }
.mk-count.mk-red { background: var(--red); }
.mk-count.mk-amber { background: var(--amber); }
.mk-text { font-size: 14px; color: var(--text); line-height: 1.5; }
.mk-sessions { font-size: 12px; color: var(--muted); margin: 4px 0 0 36px; }
.mk-sessions .mk-sess { color: var(--accent); text-decoration: none; margin-right: 8px; white-space: nowrap; }
.mk-sessions .mk-sess:hover { text-decoration: underline; }

/* 运营后台 */
.dash-filters { margin-bottom: 16px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filter-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filter-row select, .filter-row input {
  background: var(--well); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 14px; font-family: inherit;
}
.filter-row .num { width: 64px; }
.filter-row input[type="date"] { color-scheme: light; }
.btn-like { display: inline-flex; align-items: center; text-decoration: none; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.kpi-num { font-size: 30px; font-weight: 700; color: var(--accent); }
.kpi-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-block { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.dash-block h3 { margin: 0 0 10px; font-size: 15px; }

.mb { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.mb-key { min-width: 72px; color: var(--muted); }
.mb-bar { flex: 1; background: #e8edf5; border-radius: 6px; height: 10px; overflow: hidden; }
.mb-fill { height: 100%; background: var(--accent); }
.mb-val { min-width: 96px; text-align: right; color: var(--muted); }

.bar.weak { background: var(--red); }
.count-list { margin: 0; padding-left: 4px; list-style: none; }
.count-list li { margin-bottom: 8px; font-size: 14px; }
.cl-count { display: inline-block; min-width: 34px; color: var(--amber); font-weight: 600; }

.tbl-wrap { overflow-x: auto; }

/* 训练课程 / 关卡 */
.curr-list { display: flex; flex-direction: column; gap: 10px; }
.curr-card { display: flex; align-items: center; gap: 10px; background: var(--panel2);
  border: 2px solid transparent; border-radius: 10px; padding: 12px 14px; transition: border-color .15s; }
.curr-card:hover { border-color: var(--line2); }
.curr-card-main { flex: 1; cursor: pointer; }
.curr-del { padding: 6px 12px; }

.lvl-path { display: flex; flex-direction: column; gap: 10px; }
.lvl { display: flex; align-items: stretch; gap: 12px; background: var(--panel2);
  border-radius: 12px; padding: 12px 14px; border-left: 4px solid var(--line2); }
.lvl.passed { border-left-color: var(--green); }
.lvl.available { border-left-color: var(--accent); }
.lvl.locked { border-left-color: var(--line2); opacity: .6; }
.lvl-status { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 56px; font-size: 22px; }
.lvl-status span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lvl-main { flex: 1; }
.lvl-goal { color: var(--muted); font-size: 13px; margin: 2px 0 4px; }
.lvl-action { display: flex; align-items: center; }

.lvl-result { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }
.lvl-result.pass { background: #e3f6e9; border: 1px solid var(--green); }
.lvl-result.fail { background: #fdf0dd; border: 1px solid var(--amber); }
.lvl-result button { margin-left: 10px; padding: 6px 14px; }

/* 课程编辑器 */
.ce-input { width: 100%; background: var(--well); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; color: var(--text); font-size: 14px; font-family: inherit; margin-bottom: 10px; }
.edit-lvl { background: var(--panel2); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.edit-lvl-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 8px; }
.edit-lvl-head .lvl-rm { padding: 4px 10px; font-size: 13px; }
.edit-lvl input, .edit-lvl select { background: var(--well); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; color: var(--text); font-size: 14px; font-family: inherit; margin-bottom: 8px; width: 100%; }
.edit-lvl-row { display: flex; gap: 8px; }
.edit-lvl-row .el-persona { flex: 2; }
.edit-lvl-row .el-scene { flex: 1; }
.edit-lvl-row .el-pass { width: 80px; flex: none; }
.ce-actions { display: flex; gap: 10px; margin-top: 12px; }

/* 训练任务（派发与提醒）*/
.nav-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 20px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; vertical-align: middle;
}
.nav-badge.badge-overdue { background: var(--red); }
.task-reminder {
  background: #fff6f4; border: 1px solid #ffd9d3; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 14px; color: var(--text);
}
.task-reminder a { color: var(--accent); text-decoration: none; font-weight: 600; }
.overdue-text { color: var(--red); }
.task-card {
  background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
.task-card.overdue { border-left-color: var(--red); }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; }
.task-meta { color: var(--muted); font-size: 13px; margin: 4px 0; }
.task-note { font-size: 13px; color: var(--text); margin: 6px 0; }
.task-prog { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.task-bar { flex: 1; max-width: 280px; height: 8px; background: #e8edf5; border-radius: 6px; overflow: hidden; }
.task-bar-fill { display: block; height: 100%; background: var(--accent); }
.task-summary { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.task-trainees { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0; }
.task-trainees .chk { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text); }
.task-trainees .muted { color: var(--muted); font-size: 12px; }

/* 咨询经理批注 / 人工复核 */
.coach-banner { background: #e3f6e9; border: 1px solid var(--green); border-radius: 10px;
  padding: 12px 14px; margin: 12px 0; }
.coach-banner .score-head { margin-bottom: 4px; }
.coach-banner .big-score { color: var(--green); }
.ai-strike { color: var(--muted); font-size: 13px; }
.coach-by { color: var(--muted); font-size: 13px; }
.coach-comment { margin-top: 8px; white-space: pre-wrap; }

.coach-form { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.coach-form h3 { margin: 0 0 10px; font-size: 15px; }
.coach-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.coach-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.coach-row input { background: var(--well); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; color: var(--text); font-size: 14px; font-family: inherit; }
.coach-row label:first-child { flex: 1; min-width: 140px; }
.coach-row label:first-child input { width: 100%; }
.coach-form textarea { width: 100%; min-height: 76px; background: var(--well); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit; resize: vertical; }
.coach-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.coach-mark { color: var(--green); font-size: 13px; }

/* 详情弹层 */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); display: flex;
  align-items: flex-start; justify-content: center; padding: 30px 16px; z-index: 50; overflow-y: auto;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; max-width: 720px; width: 100%; position: relative;
  box-shadow: 0 30px 70px -30px rgba(15, 23, 42, .5); }
.modal-close { position: sticky; top: 0; float: right; margin-bottom: 8px; }

@media (max-width: 560px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
