:root {
  --navy: #1B4F9C;
  --navy-d: #123A78;
  --blue: #2FB4E8;
  --ink: #0F2237;
  --ink2: #54697F;
  --ink3: #93A3B5;
  --bg: #EDF2F8;
  --card: #fff;
  --line: #E9EFF6;
  --green: #22A06B;
  --red: #E15B5B;
  --gold: #D99A2B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

/* ============ 登录页 ============ */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 100% at 50% -20%, #35B9EC, #14539B);
}
.login-box {
  width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 30px 60px -20px rgba(10, 30, 60, 0.5);
  text-align: center;
}
.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: block;
}
.login-title { font-size: 22px; font-weight: 800; color: var(--ink); }
.login-sub { font-size: 13px; color: var(--ink3); margin: 8px 0 28px; }
.login-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
}
.login-input:focus { border-color: var(--navy); }
.login-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2FB4E8, #1B4F9C);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.login-err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ============ 主界面布局 ============ */
.main-view { display: flex; min-height: 100vh; }
.side {
  width: 230px;
  background: linear-gradient(180deg, #14305E, #101C2E);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
}
.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.side-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.side-name { font-size: 15px; font-weight: 700; }
.side-menu { flex: 1; padding: 14px 0; }
.mi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.mi:hover { background: rgba(255,255,255,0.06); color: #fff; }
.mi.active { background: rgba(47,180,232,0.16); color: #fff; border-left: 3px solid var(--blue); }
.mi-ico { width: 20px; text-align: center; }
.side-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.logout { color: var(--red); cursor: pointer; }

/* ============ 内容区 ============ */
.content { flex: 1; margin-left: 230px; padding: 24px 28px; }
.page-title { font-size: 20px; font-weight: 800; margin-bottom: 18px; }
.page-body { }

/* 统计卡 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 20px -12px rgba(16,42,74,0.2);
}
/* 可点击穿透的统计卡片 */
.stat-card.stat-link {
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}
.stat-card.stat-link:hover {
  box-shadow: 0 12px 28px -10px rgba(16,42,74,0.35);
  transform: translateY(-2px);
}
.stat-card.stat-link:hover .stat-value { color: #1B4F9C; }
.stat-label { font-size: 13px; color: var(--ink3); }
.stat-value { font-size: 30px; font-weight: 800; color: var(--navy); margin-top: 8px; }
.stat-value small { font-size: 14px; font-weight: 500; color: var(--ink3); }
/* 待办提醒的数字：红色 */
.stat-value.todo-value { color: var(--red); }
/* 来源拆分说明 */
.stat-split { font-size: 12px; color: var(--ink3); margin-top: 8px; }


/* 子菜单 tab */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 2px solid #EEF2F7;
  padding-bottom: 0;
}
.sub-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--ink2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.sub-tab:hover { color: #1B4F9C; }
.sub-tab.active {
  color: #1B4F9C;
  font-weight: 700;
  border-bottom-color: #1B4F9C;
}

/* 工具栏 */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.toolbar input { width: 220px; }

/* 按钮 */
.btn {
  height: 36px;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink2);
}
.btn-primary { background: linear-gradient(135deg, #2FB4E8, #1B4F9C); color: #fff; border: none; }
.btn-danger { background: var(--red); color: #fff; border: none; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-link { background: none; border: none; color: var(--navy); cursor: pointer; font-size: 13px; padding: 0 6px; }
.btn-link.danger { color: var(--red); }
/* 明细列表时间列下钻链接 */
.drill-link { color: var(--navy); cursor: pointer; text-decoration: none; }
.drill-link:hover { color: #2FB4E8; text-decoration: underline; }

/* 趋势图点击跳转后高亮的列表行 */
.fin-active td { background: #FFF4E0 !important; }

/* 表格 */
.table-wrap { background: #fff; border-radius: 14px; box-shadow: 0 8px 20px -12px rgba(16,42,74,0.2); overflow: hidden; }
/* 长列表：高度随屏幕自适应，内部滚动，保证底部分页栏始终可见（不用滚到页底）
   适用于：登录日志、操作日志、学习专区反馈、待绑定订单 */
.table-wrap.fit-scroll {
  max-height: calc(100vh - 300px);
  min-height: 220px;
  overflow-y: auto;
}
.table-wrap.fit-scroll::-webkit-scrollbar { width: 8px; }
.table-wrap.fit-scroll::-webkit-scrollbar-thumb { background: #C4D0DC; border-radius: 4px; }
.table-wrap.fit-scroll::-webkit-scrollbar-thumb:hover { background: #A9B9C9; }
.table-wrap.fit-scroll::-webkit-scrollbar-track { background: #F1F5FA; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: center; font-size: 13px; border-bottom: 1px solid #F3F7FB; white-space: nowrap; }
th { background: #F7FAFD; color: var(--ink2); font-weight: 600; font-size: 12px; position: sticky; top: 0; z-index: 1; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFCFF; }
.empty { text-align: center; color: var(--ink3); padding: 40px 0; }

/* 可滚动表格容器（右侧滚动条） */
.scroll-table {
  overflow-y: auto;
  overflow-x: auto;
}
.scroll-table::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-table::-webkit-scrollbar-thumb { background: #C4D0DC; border-radius: 4px; }
.scroll-table::-webkit-scrollbar-thumb:hover { background: #A9B9C9; }
.scroll-table::-webkit-scrollbar-track { background: #F1F5FA; }
/* 订单列表：默认显示约 3 行数据，超出右侧滚动 */
.order-scroll { max-height: 196px; }
/* 兑换码列表：拉长展示，超出后内部滚动 */
.redeem-scroll { max-height: calc(100vh - 330px); min-height: 300px; }
/* 客户管理列表：超出屏幕高度内部滚动，保证底部分页栏始终可见
   高度扣除：页面内边距 + 标题 + 工具栏 + 顶部四格统计行 + 分页栏 */
#user-table {
  max-height: calc(100vh - 300px);
  min-height: 220px;
  overflow-y: auto;
}
#user-table::-webkit-scrollbar { width: 8px; }
#user-table::-webkit-scrollbar-thumb { background: #C4D0DC; border-radius: 4px; }
#user-table::-webkit-scrollbar-thumb:hover { background: #A9B9C9; }
#user-table::-webkit-scrollbar-track { background: #F1F5FA; }

/* 订单卡片：拉伸到页面底部 */
.order-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
}
.order-card .table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* 分页控件 */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 0 2px;
}
.pg-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #D6E0EA;
  border-radius: 8px;
  background: #fff;
  color: #1B2A3A;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.pg-btn:hover:not(:disabled):not(.active) { border-color: #1B4F9C; color: #1B4F9C; }
.pg-btn.active { background: #1B4F9C; border-color: #1B4F9C; color: #fff; }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-info { margin-left: 8px; font-size: 13px; color: var(--ink3); }
/* 分页左右分栏：左侧页码按钮，右侧统计与每页条数 */
.pg-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-right .pg-info { margin-left: 0; }
.pg-select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #D6E0EA;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #1B2A3A;
  cursor: pointer;
}

/* 小号复选框（正方形，与文字高度适配，垂直居中） */
.small-check {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #1B4F9C;
  vertical-align: middle;
  display: inline-block;
}
/* 兑换码复选框列：固定宽度，内容垂直居中 */
.check-col {
  width: 32px;
  text-align: center;
  vertical-align: middle;
}

/* 标签 */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill.green { background: #E9F7F0; color: #22A06B; }
.pill.blue { background: #EAF5FD; color: var(--navy); }
.pill.grey { background: #F1F5FA; color: var(--ink2); }
.pill.gold { background: #FFF7E8; color: #A9741A; }
.pill.red { background: #FDECEC; color: #C94B4B; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15,34,55,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  position: relative;
  max-height: 86vh;
  overflow-y: auto;
}
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 18px;
  font-size: 20px; color: #9AA7B5; cursor: pointer;
  line-height: 1; padding: 4px;
}
.modal-close:hover { color: #1B4F9C; }
.modal-row { margin-bottom: 16px; }
.modal-row label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.modal-row input, .modal-row select, .modal-row textarea {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.modal-row textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }

/* 反馈对话窗口 */
.fb-dialog-meta { font-size: 12px; color: #9AA7B5; margin-bottom: 12px; }
.fb-dialog-scroll {
  max-height: 320px;         /* 约显示 4 条消息 */
  overflow-y: auto;          /* 超出后右侧滚动条 */
  padding-right: 6px;
  margin-bottom: 16px;
}
.fb-dialog-scroll::-webkit-scrollbar { width: 6px; }
.fb-dialog-scroll::-webkit-scrollbar-thumb { background: #CDD6E0; border-radius: 3px; }
.fb-dialog-scroll::-webkit-scrollbar-track { background: transparent; }
.fb-msg { margin-bottom: 16px; }
.fb-msg-head { font-size: 12px; color: #9AA7B5; margin-bottom: 4px; }
/* 反馈列表内容列：最长约30字/行，超出换行显示 */
.fb-content-cell {
  max-width: 422px; /* 30字(约390px) + 左右padding(32px) */
  text-align: left;
  white-space: normal;
}
.fb-content-text {
  max-width: 390px; /* 约30个中文字符宽度 */
  white-space: normal;
  word-break: break-word;
  word-wrap: break-word;
  line-height: 1.6;
}
/* 内容列里标识「最新一条消息」是谁说的 */
.fb-last-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 17px;
  border-radius: 4px;
  vertical-align: 1px;
  white-space: nowrap;
}
.fb-last-tag.u { background: #FDEBEB; color: #C94B4B; }
.fb-last-tag.s { background: #EAF1FB; color: #2B6CB0; }
.fb-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.fb-bubble.customer { background: #F0F4F9; color: #1B2A3A; }
.fb-bubble.staff { background: #E8F1FB; color: #1B4F9C; border: 1px solid #CFE0F2; }
/* 反馈问题截图 */
.fb-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fb-img {
  width: 84px; height: 84px; object-fit: cover;
  border-radius: 8px; border: 1px solid #E9EFF6;
  cursor: zoom-in; background: #F7FAFD;
  transition: transform .12s;
}
.fb-img:hover { transform: scale(1.06); border-color: #B8DCF5; }
/* 列表中的图片数量徽标 */
.fb-img-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 11px;
  color: #1B79C4;
  background: #EAF5FD;
  border-radius: 10px;
  white-space: nowrap;
  flex: 0 0 auto;
}
/* 客户有新消息：列表行左侧红色竖条 + 状态列红标 */
.fb-row-new { background: #FFF9F9; }
.fb-row-new > td:first-child { box-shadow: inset 3px 0 0 #E15B5B; }
.fb-row-new:hover { background: #FFF3F3; }
.fb-new-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 11px;
  color: #fff;
  background: #E15B5B;
  border-radius: 10px;
  white-space: nowrap;
  animation: fbNewPulse 1.6s ease-in-out infinite;
}
@keyframes fbNewPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 91, 91, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(225, 91, 91, 0); }
}
/* 汇总卡里的「N 条有新消息」提示 */
.fb-new-sum {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #FFD9D9;
  letter-spacing: .2px;
}
/* 已关闭会话：弹窗底部只读提示（不再提供输入框） */
.fb-closed-tip {
  margin-top: 18px;
  padding: 14px 16px;
  text-align: center;
  font-size: 13px;
  color: #8895A7;
  background: #F5F8FB;
  border: 1px dashed #DFE7F0;
  border-radius: 10px;
}
/* 问题类型分布：整行可点击筛选反馈列表 */
.type-dist-row { cursor: pointer; transition: background .12s; }.type-dist-row:hover { background: #F0F7FD; }
.type-dist-row:hover td { color: #1B79C4; }
.type-dist-row.active { background: #EAF5FD; }
.type-dist-row.active td { color: #1B4F9C; font-weight: 700; }
.fb-reply-input { width: 100%; min-height: 90px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; resize: vertical; outline: none; box-sizing: border-box; }

/* 讲师详情 */
.t-detail-row { margin-bottom: 16px; }
.t-detail-row .lbl { display: block; font-size: 12px; color: #9AA7B5; margin-bottom: 4px; }
.t-detail-row .val { font-size: 14px; color: #1B2A3A; line-height: 1.6; white-space: pre-wrap; }
.t-detail-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}
.t-detail-avatar-img {
  width: 100%; height: 100%; object-fit: cover;
}

/* 讲师头像/证书上传预览 */
.t-avatar-preview {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.t-avatar-img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 1px solid #E4EBF2;
}
.t-avatar-char {
  width: 64px; height: 64px; border-radius: 50%;
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.t-certs-preview {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.t-cert-item {
  position: relative; width: 72px; height: 72px;
}
.t-cert-img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 8px; border: 1px solid #E4EBF2;
}
.t-cert-del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #E5484D; color: #fff; font-size: 13px; line-height: 20px;
  text-align: center; cursor: pointer;
}
.t-cert-add {
  width: 72px; height: 72px; border-radius: 8px;
  border: 2px dashed #C4D0DC; color: #9AA7B5;
  font-size: 28px; line-height: 68px; text-align: center; cursor: pointer;
}
.t-detail-section {
  font-size: 13px; font-weight: 700; color: #1B2A3A;
  margin: 16px 0 10px;
}
.t-certs-view {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.t-cert-img-big {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 8px; border: 1px solid #E4EBF2; cursor: zoom-in;
}

/* toast 提示 */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(15,34,55,0.9); color: #fff;
  padding: 10px 20px; border-radius: 8px; font-size: 14px;
  z-index: 999; max-width: 70vw;
}
.toast.success { background: rgba(34,160,107,0.95); }
.toast.error { background: rgba(225,91,91,0.95); }

/* 表单卡片 */
.form-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 8px 20px -12px rgba(16,42,74,0.2); max-width: 560px; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.form-item textarea { height: 90px; padding: 10px 12px; resize: vertical; }
.tip { font-size: 12px; color: var(--ink3); margin-top: 6px; }

/* 微信 ID 列 */
.openid {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
  border-bottom: 1px dashed var(--ink3);
}
.openid:hover { color: var(--blue); }

/* 脱敏文本（兑换码等）：等宽显示、虚线底、可点击复制完整值 */
.masked {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
  border-bottom: 1px dashed var(--ink3);
  letter-spacing: 0.5px;
}
.masked:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* 可点击复制的普通文本（手机号等）：虚线底 + 悬停变蓝 */
.copyable {
  color: var(--navy);
  cursor: pointer;
  border-bottom: 1px dashed var(--ink3);
}
.copyable:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* 用户详情 */
.detail-block {
  background: #F7FAFD;
  border-radius: 10px;
  padding: 6px 16px;
  margin-bottom: 16px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #EAF1F8;
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: var(--ink3); }
.detail-row b { font-weight: 600; }
.detail-section {
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--ink);
}

/* 角色权限勾选 */
.role-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.role-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink2);
  background: #F7FAFD;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

/* 兑换码结果 */
.code-list {
  background: #F7FAFD;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-family: Consolas, monospace;
  font-size: 13px;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.9;
}


/* ===== 客户管理顶部统计行：汇总卡(1.5fr) + 4 张分类卡(各1fr) ===== */
.user-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
/* 客户管理：总用户汇总卡更宽，下方小字能一行放下 */
.user-stats:has(.cm-sum) { grid-template-columns: 2fr repeat(5, 1fr); gap: 10px; }

/* 总用户汇总卡：深蓝渐变，与其它页面汇总卡统一 */
.user-stat.cm-sum {
  background: linear-gradient(140deg, #173E6E 0%, #1B4F9C 55%, #2464B8 100%);
  border-left-color: #FFD166;
  box-shadow: 0 10px 24px -14px rgba(27, 79, 156, 0.65);
}
.user-stat.cm-sum .user-stat-label { color: rgba(235, 245, 255, 0.78); }
.user-stat.cm-sum .user-stat-value { color: #FFFFFF; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
.user-stat.cm-sum .fb-sub { color: rgba(226, 240, 255, 0.82); margin-top: 5px; font-size: 10.5px; gap: 2px 8px; }

/* 汇总卡选中态：深色底需单独覆盖 */
.user-stat.cm-sum.clickable.active {
  background: linear-gradient(140deg, #1B4F9C 0%, #2464B8 58%, #2E7BD6 100%);
  box-shadow: 0 0 0 2px rgba(47, 216, 232, 0.55), 0 14px 30px -14px rgba(27, 79, 156, 0.75);
}
.user-stat.cm-sum.clickable.active::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10px;
  color: #0B2946;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 1px 6px;
}
.user-stat {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  border-left: 3px solid var(--line);
  box-shadow: 0 8px 20px -14px rgba(16, 42, 74, 0.28);
  transition: transform .18s, box-shadow .18s;
}
.user-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(16, 42, 74, 0.35);
}
.user-stat-label { font-size: 12px; color: var(--ink3); letter-spacing: .3px; }
.user-stat-value { font-size: 24px; font-weight: 800; margin-top: 5px; color: var(--navy); line-height: 1.1; }

.user-stat-active { border-left-color: #2B6CB0; }
.user-stat-active .user-stat-value { color: #2B6CB0; }
.user-stat-member { border-left-color: #2FA06B; }
.user-stat-member .user-stat-value { color: #2FA06B; }
.user-stat-canceled { border-left-color: #E15B5B; }
.user-stat-canceled .user-stat-value { color: #E15B5B; }
.user-stat-free { border-left-color: #93A3B5; }
.user-stat-free .user-stat-value { color: #64798C; }
.user-stat-disabled { border-left-color: #6B7A8C; }
.user-stat-disabled .user-stat-value { color: #4A5A6B; }

@media (max-width: 1400px) {
  .user-stats:has(.cm-sum) { grid-template-columns: 2fr repeat(3, 1fr); }
}
@media (max-width: 1280px) {
  .user-stats:has(.cm-sum) { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .user-stats { grid-template-columns: repeat(2, 1fr); }
  .user-stats:has(.cm-sum) { grid-template-columns: repeat(2, 1fr); }
}

/* 订单信息顶部统计：汇总卡(1.4fr) + 支付/退款(各1fr) */
.order-stats { grid-template-columns: 1.4fr repeat(2, 1fr); max-width: 880px; gap: 14px; }
.user-stat-paid { border-left-color: #2FA06B; }
.user-stat-paid .user-stat-value { color: #2FA06B; }
.user-stat-refunded { border-left-color: #E15B5B; }
.user-stat-refunded .user-stat-value { color: #E15B5B; }

/* 订单汇总卡：深蓝渐变，与其它页面汇总卡统一 */
.order-stats .od-sum {
  background: linear-gradient(140deg, #173E6E 0%, #1B4F9C 55%, #2464B8 100%);
  border-left-color: #FFD166;
  box-shadow: 0 10px 24px -14px rgba(27, 79, 156, 0.65);
}
.order-stats .od-sum .user-stat-label { color: rgba(235, 245, 255, 0.78); }
.order-stats .od-sum .user-stat-value { color: #FFFFFF; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
.order-stats .od-sum .fb-sub { color: rgba(226, 240, 255, 0.82); margin-top: 5px; }

/* 汇总卡选中态：深色底需单独覆盖 */
.order-stats .od-sum.clickable.active {
  background: linear-gradient(140deg, #1B4F9C 0%, #2464B8 58%, #2E7BD6 100%);
  box-shadow: 0 0 0 2px rgba(47, 216, 232, 0.55), 0 14px 30px -14px rgba(27, 79, 156, 0.75);
}
.order-stats .od-sum.clickable.active::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10px;
  color: #0B2946;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 1px 6px;
}

@media (max-width: 1100px) {
  .order-stats { max-width: none; grid-template-columns: repeat(3, 1fr); }
}

/* 兑换码顶部统计：汇总卡(1.6fr) + 5 张状态卡(各1fr)
   汇总卡更宽，5 种状态小字可一行放下，整行高度一致 */
.redeem-stats { grid-template-columns: 1.6fr repeat(5, 1fr); gap: 11px; }
.redeem-stats .user-stat { padding: 12px 14px; }
.redeem-stats .user-stat-value { font-size: 22px; }

/* 汇总卡：深蓝渐变突出 */
.redeem-stats .rc-sum {
  background: linear-gradient(140deg, #173E6E 0%, #1B4F9C 55%, #2464B8 100%);
  border-left-color: #FFD166;
  box-shadow: 0 10px 24px -14px rgba(27, 79, 156, 0.65);
}
.redeem-stats .rc-sum .user-stat-label { color: rgba(235, 245, 255, 0.78); }
.redeem-stats .rc-sum .user-stat-value { color: #FFFFFF; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
.redeem-stats .rc-sum .fb-sub { color: rgba(226, 240, 255, 0.82); font-size: 10.5px; gap: 2px 8px; margin-top: 5px; }

.user-stat-rc-unused { border-left-color: #2B6CB0; }
.user-stat-rc-unused .user-stat-value { color: #2B6CB0; }
.user-stat-rc-used { border-left-color: #2FA06B; }
.user-stat-rc-used .user-stat-value { color: #2FA06B; }
.user-stat-rc-invalidated { border-left-color: #E8963C; }
.user-stat-rc-invalidated .user-stat-value { color: #C97A22; }
.user-stat-rc-void { border-left-color: #E15B5B; }
.user-stat-rc-void .user-stat-value { color: #E15B5B; }
.user-stat-rc-canceled { border-left-color: #1B79C4; }
.user-stat-rc-canceled .user-stat-value { color: #1B79C4; }

@media (max-width: 1400px) {
  .redeem-stats { grid-template-columns: 1.6fr repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .redeem-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 待绑定订单顶部统计：汇总卡(1.8fr) + 3 张状态卡(各1fr) */
.pb-stats { grid-template-columns: 1.8fr repeat(3, 1fr); max-width: 980px; gap: 12px; }

/* 总单数汇总卡：深蓝渐变，与其它页面统一 */
.pb-stats .pb-sum {
  background: linear-gradient(140deg, #173E6E 0%, #1B4F9C 55%, #2464B8 100%);
  border-left-color: #FFD166;
  box-shadow: 0 10px 24px -14px rgba(27, 79, 156, 0.65);
}
.pb-stats .pb-sum .user-stat-label { color: rgba(235, 245, 255, 0.78); }
.pb-stats .pb-sum .user-stat-value { color: #FFFFFF; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
.pb-stats .pb-sum .fb-sub { color: rgba(226, 240, 255, 0.82); margin-top: 5px; }

/* 汇总卡选中态：深色底单独覆盖 */
.pb-stats .pb-sum.clickable.active {
  background: linear-gradient(140deg, #1B4F9C 0%, #2464B8 58%, #2E7BD6 100%);
  box-shadow: 0 0 0 2px rgba(47, 216, 232, 0.55), 0 14px 30px -14px rgba(27, 79, 156, 0.75);
}
.pb-stats .pb-sum.clickable.active::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10px;
  color: #0B2946;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 1px 6px;
}
.user-stat-pb-pending { border-left-color: #E8963C; }
.user-stat-pb-pending .user-stat-value { color: #C97A22; }
.user-stat-pb-done { border-left-color: #2FA06B; }
.user-stat-pb-done .user-stat-value { color: #2FA06B; }
.user-stat-pb-refunded { border-left-color: #E15B5B; }
.user-stat-pb-refunded .user-stat-value { color: #E15B5B; }
@media (max-width: 1280px) {
  .pb-stats { max-width: none; grid-template-columns: 1.8fr repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .pb-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 学习专区顶部统计：总问题数 + 5 类类型，共 6 列
   类型卡颜色由 JS 传入的 --accent 变量控制，便于类型增减时自适应 */
.fb-stats { grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.fb-stats .user-stat { padding: 12px 12px; border-left-width: 3px; }
.fb-stats .user-stat:not(.fb-sum) { border-left-color: var(--accent, #93A3B5); }
.fb-stats .user-stat:not(.fb-sum) .user-stat-value { color: var(--accent, var(--navy)); }
.fb-stats .user-stat-value { font-size: 21px; margin-top: 4px; }

/* 汇总卡：深蓝渐变突出，与类型卡区分 */
.fb-stats .fb-sum {
  background: linear-gradient(140deg, #173E6E 0%, #1B4F9C 55%, #2464B8 100%);
  border-left-color: #FFD166;
  box-shadow: 0 10px 24px -14px rgba(27, 79, 156, 0.65);
}
.fb-stats .fb-sum .user-stat-label { color: rgba(235, 245, 255, 0.78); }
.fb-stats .fb-sum .user-stat-value { color: #FFFFFF; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
.fb-stats .fb-sum .fb-sub { color: rgba(226, 240, 255, 0.82); }

/* 卡内状态细分：自动换行，窄卡片排成两行 */
.fb-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink3);
}
.fb-sub span { white-space: nowrap; }

@media (max-width: 1380px) {
  .fb-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .fb-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 学习专区反馈列表：比通用 fit-scroll 多扣顶部「反馈管理标题 + 类型统计行」的高度 */
#fb-table { max-height: calc(100vh - 395px); min-height: 200px; }

/* 客户管理统计卡：可点击筛选 + 选中态 */
.user-stat.clickable { cursor: pointer; position: relative; }
.user-stat.clickable:hover { border-left-width: 4px; }
.user-stat.clickable.active {
  background: linear-gradient(135deg, rgba(27, 79, 156, 0.06), rgba(47, 160, 107, 0.05));
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.35), 0 10px 22px -14px rgba(16, 42, 74, 0.4);
}
.user-stat.clickable.active::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10px;
  color: #2B6CB0;
  background: rgba(43, 108, 176, 0.1);
  border-radius: 6px;
  padding: 1px 6px;
}

/* 兑换码汇总卡选中态：深色底需单独覆盖（否则会被 .clickable.active 的浅底盖掉） */
.redeem-stats .rc-sum.clickable.active {
  background: linear-gradient(140deg, #1B4F9C 0%, #2464B8 58%, #2E7BD6 100%);
  box-shadow: 0 0 0 2px rgba(47, 216, 232, 0.55), 0 14px 30px -14px rgba(27, 79, 156, 0.75);
}
.redeem-stats .rc-sum.clickable.active::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10px;
  color: #0B2946;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 1px 6px;
}
.redeem-stats .rc-sum.clickable:hover { border-left-width: 4px; }

/* 学习专区统计划卡：类型卡选中态（浅色底 + 蓝色外圈 + 右上角标签） */
.fb-stats .user-stat.clickable.active:not(.fb-sum) {
  background: linear-gradient(135deg, rgba(43, 108, 176, 0.08), rgba(47, 160, 107, 0.05));
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.4), 0 10px 22px -14px rgba(16, 42, 74, 0.4);
}
.fb-stats .user-stat.clickable.active:not(.fb-sum)::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 8px;
  font-size: 10px;
  color: #2B6CB0;
  background: rgba(43, 108, 176, 0.12);
  border-radius: 6px;
  padding: 1px 5px;
}

/* 学习专区汇总卡选中态：深色底单独覆盖 */
.fb-stats .fb-sum.clickable.active {
  background: linear-gradient(140deg, #1B4F9C 0%, #2464B8 58%, #2E7BD6 100%);
  box-shadow: 0 0 0 2px rgba(47, 216, 232, 0.55), 0 14px 30px -14px rgba(27, 79, 156, 0.75);
}
.fb-stats .fb-sum.clickable.active::after {
  content: '筛选中';
  position: absolute;
  top: 8px; right: 8px;
  font-size: 10px;
  color: #0B2946;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  padding: 1px 5px;
}
.fb-stats .user-stat.clickable { position: relative; }
.fb-stats .user-stat.clickable:hover { border-left-width: 4px; }

/* ===== 讲师答疑对话弹窗：固定尺寸 + 消息区滚动 ===== */
/* 结构：头部固定 / 消息区 flex:1 滚动 / 底部输入固定，整体高度锁定不随内容变化 */
.consult-dialog {
  display: flex;
  flex-direction: column;
  height: 560px;              /* 固定窗口高度：打开即锁定，不随消息增减变化 */
  max-height: 76vh;           /* 小屏兜底（低于 560 时整体压缩，不做 min-height 以免覆盖上限） */
  overflow: hidden;
}
.consult-dialog .cd-head { flex-shrink: 0; }
.consult-dialog .cd-meta {
  font-size: 12px;
  color: #93A3B5;
  margin-bottom: 12px;
}
.consult-dialog .cd-body {
  flex: 1;
  min-height: 0;              /* 关键：允许 flex 子项收缩，否则撑破容器 */
  overflow-y: auto;
  background: #F7FAFD;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #EDF3F9;
}
.consult-dialog .cd-body::-webkit-scrollbar { width: 8px; }
.consult-dialog .cd-body::-webkit-scrollbar-thumb { background: #C4D0DC; border-radius: 4px; }
.consult-dialog .cd-body::-webkit-scrollbar-track { background: #F1F5FA; }

.consult-dialog .cd-foot { flex-shrink: 0; padding-top: 12px; }
.consult-dialog .cd-input {
  display: flex;
  gap: 8px;
}
.consult-dialog .cd-input input {
  flex: 1;
  height: 36px;
  border: 1px solid #DCE5EE;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}
.consult-dialog .cd-input input:focus { border-color: #2B6CB0; }

/* 讲师答疑：进行中的会话加浅绿底，和已结束的区分开 */
.consult-row-active { background: #F6FBF8; }
.consult-row-active:hover { background: #EFF8F3; }
.consult-row-active > td:first-child { box-shadow: inset 3px 0 0 #2FA36B; }

/* 讲师答疑：已结束会话的说明条（后台不能结束对话，这里说明结束来源） */
.cd-closed-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #93A3B5;
}
