/* ========================================
   电商客服模拟接待 · 样式
   主题：白蓝绿 浅色清新
======================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #eef4f8;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-elevated: #f5f9fc;
  --bg-input: #f1f5f9;
  --border: rgba(37, 99, 235, 0.15);
  --border-hover: rgba(37, 99, 235, 0.35);
  --text-primary: #0f2a43;
  --text-secondary: #4a6b88;
  --text-muted: #8aa3bd;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.25);
  --accent-green: #10b981;
  --gradient-purple: linear-gradient(135deg, #2563eb 0%, #3b82f6 45%, #10b981 100%);
  --gradient-pink:   linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  --gradient-cyan:   linear-gradient(135deg, #06b6d4 0%, #67e8f9 100%);
  --gradient-green:  linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-red:    linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --shadow-md: 0 4px 20px rgba(37, 99, 235, 0.08);
  --shadow-lg: 0 8px 40px rgba(37, 99, 235, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

html, body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

body {
  background: #f6f8fb;
  background-attachment: fixed;
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

button { cursor: pointer; }

/* ===== 顶部导航 ===== */
.topbar {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 60%, #0891b2 100%);
  border-bottom: none;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .18);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
}
.topbar .logo-mark { display: inline-flex; align-items: center; }
.topbar .nav-tabs {
  display: flex;
  gap: 8px;
}
.topbar .nav-tab {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.topbar .nav-tab:hover { background: rgba(255, 255, 255, 0.25); }
.topbar .nav-tab.active { background: white; color: var(--accent); font-weight: 600; }

/* 智能助手下拉（合并 SPU 查询 + 判定决策树入口） */
.topbar .nav-dropdown { position: relative; }
.topbar .nav-dropdown-menu {
  display: none; position: absolute; top: 110%; left: 0; min-width: 150px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 6px; z-index: 2000;
}
.topbar .nav-dropdown.open .nav-dropdown-menu { display: block; }
.topbar .nav-dropdown-item {
  padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text-primary);
  cursor: pointer; white-space: nowrap;
}
.topbar .nav-dropdown-item:hover { background: var(--bg-hover); color: var(--accent); }

/* ===== 主容器 ===== */
.app { max-width: 1440px; margin: 0 auto; padding: 24px; }

/* ===== 统计卡片 ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.stat-card .num {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.stat-card .label { color: var(--text-secondary); font-size: 13px; }

/* ===== 主体三栏布局 ===== */
.main-grid {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 16px;
}

/* ===== 卡片通用 ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(8px);
  margin-bottom: 16px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.card-title .icon { color: var(--accent-light); }

/* ===== 训练设置 - 难度选项 ===== */
.difficulty-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.difficulty-item {
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.difficulty-item:hover { border-color: var(--border-hover); }
.difficulty-item.active {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.difficulty-item .diff-badge {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .5px;
}
.difficulty-item .diff-badge.badge-bronze { background: #b4844f; }
.difficulty-item .diff-badge.badge-silver { background: #8a8a99; }
.difficulty-item .diff-badge.badge-king   { background: #ef4444; }
.difficulty-item .info { flex: 1; }
.difficulty-item .name { font-size: 14px; font-weight: 600; }
.difficulty-item .desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.difficulty-item .tag {
  display: inline-block;
  background: rgba(37, 99, 235, 0.2);
  color: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 4px;
}
.difficulty-item .check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent);
  font-size: 16px;
  display: none;
}
.difficulty-item.active .check { display: block; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 12px; }
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a78bfa'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
}

/* ===== 客服三要素 ===== */
.factor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.factor-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}
.factor-item .icon { font-size: 16px; }
.factor-item .info { flex: 1; }
.factor-item .name { font-size: 13px; font-weight: 500; }
.factor-item .desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== 中间：模拟接待工作台 ===== */
.workspace {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}
.workspace-icon {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 16px var(--accent-glow));
}
.workspace h2 {
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 22px;
  margin-bottom: 8px;
}
.workspace p {
  color: var(--text-secondary);
  font-size: 13px;
  max-width: 360px;
  line-height: 1.7;
}
.service-types {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.service-type {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.service-type:hover { border-color: var(--accent); }
.service-type.active { background: var(--gradient-purple); color: white; }

.scene-tag {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.workspace .btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* ===== 按钮 ===== */
.btn {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-hover); }
.btn-primary { background: var(--gradient-purple); border: none; }
.btn-primary:hover { box-shadow: 0 4px 16px var(--accent-glow); }
.btn-secondary { background: var(--bg-input); }
.btn-success { background: var(--gradient-green); border: none; }
.btn-danger  { background: var(--gradient-red); border: none; }
.btn-warn   { background: linear-gradient(135deg,#f59e0b,#f97316); border: none; color: #fff; }
.btn-ghost   { background: transparent; }
.btn-sm      { padding: 6px 12px; font-size: 12px; }
.btn-lg      { padding: 14px 28px; font-size: 15px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.workspace .note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 评分标准 ===== */
.score-dim {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.score-dim:last-child { border-bottom: none; }
.score-dim .icon { font-size: 16px; }
.score-dim .info { flex: 1; }
.score-dim .name { font-size: 13px; font-weight: 500; }
.score-dim .desc { font-size: 11px; color: var(--text-muted); }
.score-dim .pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
}
.score-dim.basic .pct { color: var(--text-muted); font-size: 11px; }

/* ===== 规则考点 ===== */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.rule-item .icon { font-size: 16px; }
.rule-item .info { flex: 1; }
.rule-item .name { font-weight: 600; color: var(--accent-light); }
.rule-item .desc { color: var(--text-secondary); margin-top: 2px; font-size: 11px; }

/* ===== 快速开始 ===== */
.quick-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.quick-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 8px;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.quick-item .icon { font-size: 24px; margin-bottom: 6px; }
.quick-item .name { font-size: 12px; color: var(--text-secondary); }

/* ===== 弹层 / 模态 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 11000;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal.wide { max-width: 1000px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 600; }
.modal-close {
  background: var(--bg-input);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.modal-close:hover { background: var(--gradient-red); color: white; }

/* ===== 聊天对话 ===== */
.chat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 70vh;
  display: flex;
  flex-direction: column;
}
.chat-header {
  padding: 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 700;
}
.chat-info { flex: 1; }
.chat-info .name { font-weight: 600; }
.chat-info .tag { font-size: 11px; color: var(--text-muted); }
.chat-timer {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg {
  display: flex;
  gap: 8px;
  max-width: 80%;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.msg.customer .msg-avatar { background: var(--gradient-pink); color: white; }
.msg.system .msg-avatar { background: var(--gradient-cyan); color: white; }
.msg.agent   .msg-avatar { background: var(--gradient-purple); color: white; }
.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.msg.customer .msg-bubble {
  background: var(--bg-elevated);
  border-top-left-radius: 4px;
}
/* 顾客判定徽标：橘色顾客气泡上识别客服上一条回复「对不对」 */
.judge-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 9px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.judge-badge.j-good { background: #e7f7ed; color: #15803d; border: 1px solid #86efac; }
.judge-badge.j-bad  { background: #fde8e8; color: #b91c1c; border: 1px solid #fca5a5; }
.judge-badge.j-warn { background: #fff4e5; color: #b45309; border: 1px solid #fcd34d; }
.msg.system .msg-bubble {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #0891b2;
  font-size: 12px;
}
.msg.agent .msg-bubble {
  background: var(--gradient-purple);
  color: white;
  border-top-right-radius: 4px;
}
.msg.self { align-self: flex-end; flex-direction: row-reverse; }
.msg.system { align-self: center; max-width: 90%; }
.msg.coach .msg-avatar { background: linear-gradient(135deg, #22d3ee, #3b82f6); color: white; }
.msg.coach { align-self: stretch; max-width: 100%; margin: 4px 0; }
.msg.coach .msg-bubble {
  background: rgba(34, 211, 238, 0.08);
  border: 1px dashed rgba(34, 211, 238, 0.45);
  color: #0e7490;
  font-size: 12.5px;
  font-weight: 600;
}

.chat-input {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg-elevated);
  border-radius: 0 0 var(--radius) var(--radius);
}
.chat-input input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 13px;
}
.chat-input input:focus { border-color: var(--accent); }

.chat-toolbar {
  padding: 8px 16px;
  background: var(--bg-card);
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: flex-start;
  max-height: 132px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.qr-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qr-label {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: rgba(37,99,235,0.08); padding: 2px 7px; border-radius: 8px;
  flex: 0 0 auto;
}
.toolbar-tag {
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.toolbar-tag:hover { background: var(--accent); color: white; }

/* ===== 模拟订单卡 ===== */
.order-card {
  margin: 0 16px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.order-card .oc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oc-icon { font-size: 16px; }
.oc-no { font-weight: 600; font-size: 13px; color: var(--text); }
.oc-status {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px;
}
.oc-unpaid { background: #fef3c7; color: #b45309; }
.oc-paid { background: #dbeafe; color: #1d4ed8; }
.oc-shipping { background: #d1fae5; color: #047857; }
.oc-signed { background: #e5e7eb; color: #374151; }
.oc-toggle {
  margin-left: auto; border: none; background: transparent; color: var(--accent);
  cursor: pointer; font-size: 12px; padding: 2px 4px;
}
.oc-row { display: flex; gap: 8px; font-size: 12px; margin-top: 6px; color: var(--text-muted); }
.oc-row b { color: var(--text); font-weight: 500; }
.oc-time { margin-left: auto; }
.oc-logistics { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.oc-node { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.oc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: 0 0 auto; }
.oc-t { font-size: 11px; color: var(--text-muted); }
.oc-s { font-size: 12px; color: var(--text); }


/* ===== 评分报告 ===== */
.report-grade {
  text-align: center;
  padding: 20px 0;
}
.grade-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  color: white;
  position: relative;
}
.grade-circle.A { background: var(--gradient-green); }
.grade-circle.B { background: var(--gradient-cyan); }
.grade-circle.C { background: var(--gradient-orange); }
.grade-circle.D { background: var(--gradient-red); }
.grade-text { font-size: 18px; font-weight: 600; }
.grade-num {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0;
}

.report-section { margin-bottom: 20px; }
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.score-bar {
  margin-bottom: 10px;
}
.score-bar-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.score-bar-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* 雷达图容器 */
.radar-wrap { display: flex; justify-content: center; padding: 16px 0; }

/* 红线命中 */
.violation {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.violation .head { color: #fca5a5; font-weight: 600; margin-bottom: 4px; }
.violation .body { color: var(--text-secondary); }

/* 亮点 */
.highlight {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.highlight .head { color: #6ee7b7; font-weight: 600; margin-bottom: 4px; }
.highlight .body { color: var(--text-secondary); }

/* 学员档案列表 */
.student-list { display: flex; flex-direction: column; gap: 8px; }
.student-item {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.student-item:hover { border-color: var(--border-hover); }
.student-item.active { border-color: var(--accent); background: rgba(37, 99, 235, 0.1); }
.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.student-info { flex: 1; }
.student-info .name { font-size: 13px; font-weight: 600; }
.student-info .meta { font-size: 11px; color: var(--text-muted); }
.student-score { text-align: right; }
.student-score .num { font-size: 18px; font-weight: 700; color: var(--accent-light); }
.student-score .label { font-size: 10px; color: var(--text-muted); }

/* 排行榜 */
.ranking-list { display: flex; flex-direction: column; gap: 6px; }
.rank-item {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rank-item .rank-no {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-item.top1 .rank-no { background: var(--gradient-orange); color: white; }
.rank-item.top2 .rank-no { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: white; }
.rank-item.top3 .rank-no { background: linear-gradient(135deg, #b45309, #d97706); color: white; }
.rank-item .name { flex: 1; font-size: 13px; }
.rank-item .score { font-size: 14px; font-weight: 700; color: var(--accent-light); }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.tbl th { color: var(--text-secondary); font-weight: 500; }
.tbl tr:hover td { background: var(--bg-input); }

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }

/* 标签徽章 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.badge-bronze { background: rgba(180, 132, 79, 0.2); color: #d4a574; }
.badge-silver { background: rgba(180, 180, 191, 0.2); color: #c0c0cf; }
.badge-king   { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge-pre    { background: rgba(34, 197, 94, 0.2); color: #6ee7b7; }
.badge-after  { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-mix    { background: rgba(37, 99, 235, 0.15); color: #1e40af; }

/* 小提示 */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: none;
}
.toast.show { display: block; animation: toastIn 0.3s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* 响应式 */
@media (max-width: 1200px) {
  .main-grid { grid-template-columns: 260px 1fr 280px; }
}
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* 平台话术提示条（对话窗内） */
.platform-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 12px;
  background: rgba(37, 99, 235, 0.08);
  border-left: 3px solid var(--accent);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.platform-tip .pt-emoji { font-size: 15px; line-height: 1.2; }

/* 知识库速查 tabs */
.kb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.kb-tab {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.kb-tab:hover { color: var(--text-primary); }
.kb-tab.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent);
  border-color: var(--accent);
}
#kb-body .tbl { margin: 0; }
#kb-body th, #kb-body td { padding: 6px 8px; font-size: 11.5px; }

/* 子标题 */
.subhead {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 16px 0 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.rule-item.watch .icon { filter: none; }
.rule-item.wl { border-left: 3px solid #34d399; background: rgba(52, 211, 153, 0.06); }
.rule-item.wl .icon { filter: none; }

/* 平台选择器 */
#sel-platform { max-width: 100%; }

/* ===== 登录 / 注册 / 后台 ===== */
.logged-out .nav-tabs, .logged-out #user-box { display: none !important; }
/* 未登录：隐藏整个侧栏与顶栏导航（登录页独立布局） */
body.logged-out .sidebar { display: none !important; }
body.logged-out .topbar { display: none !important; }
body.logged-out .app { margin-left: 0 !important; padding: 0 !important; }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.user-box .ub-name { font-weight: 600; color: var(--text-primary); }
.user-box .btn { padding: 4px 12px; font-size: 12px; }

/* ===== 登录页：左侧品牌 + 右侧登录 ===== */
.auth-wrap { display: flex; width: 100%; min-height: 100vh; margin: 0; padding: 0; background: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #22d3ee 100%); }
.auth-brand { flex: 1.6; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 56px; color: #fff; }
.auth-brand .ab-logo { font-size: 104px; line-height: 1; margin-bottom: 32px; }
.auth-brand .ab-title { font-size: 72px; font-weight: 800; letter-spacing: 4px; margin-bottom: 22px; text-shadow: 0 4px 24px rgba(0,0,0,.22); }
.auth-brand .ab-sub { font-size: 22px; opacity: .95; max-width: 560px; text-align: center; line-height: 2; }
.auth-side { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 40px 32px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid #eef0f3; border-radius: 16px; padding: 36px 32px; box-shadow: 0 8px 30px rgba(15, 23, 42, .06); }
.auth-card .auth-title { font-size: 26px; font-weight: 700; color: #1d2129; margin-bottom: 8px; }
.auth-card .auth-sub { font-size: 14px; color: #86909c; margin-bottom: 24px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab { flex: 1; padding: 9px; text-align: center; border-radius: var(--radius-sm); cursor: pointer; background: var(--bg-input); color: var(--text-secondary); font-size: 14px; border: 1px solid var(--border); }
.auth-tab:hover { background: #e2e8f0; color: var(--text-primary); }
.auth-tab.active { background: var(--accent); color: #fff; font-weight: 600; border-color: var(--accent); }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.auth-field input { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-input); color: var(--text-primary); }
.auth-field input:focus { border-color: var(--accent); background: #fff; }
.auth-hint { font-size: 12px; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }
.auth-err { color: #ef4444; font-size: 12px; margin-top: 8px; min-height: 16px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.admin-table th, .admin-table td { border: 1px solid var(--border); padding: 9px 10px; text-align: left; }
.admin-table th { background: var(--bg-input); color: var(--text-secondary); font-weight: 600; }
.admin-table tr:nth-child(even) td { background: var(--bg-card); }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: #fff; }
.rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.rank-3 { background: linear-gradient(135deg, #d97706, #fbbf24); }
.muted { color: var(--text-muted); }
.tag-ok { color: var(--accent-green); font-weight: 600; }
.tag-off { color: #ef4444; font-weight: 600; }
.tag-on { display: inline-block; padding: 1px 5px; margin-left: 4px; font-size: 11px; color: #fff; background: var(--accent-green); border-radius: 4px; vertical-align: middle; }
.admin-create { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin-input { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-input); color: var(--text-primary); min-width: 180px; flex: 1; }
.admin-input:focus { border-color: var(--accent); background: #fff; outline: none; }
.reply-limit { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-input); border-top: 1px solid var(--border); }
.reply-timer { font-size: 12px; color: var(--accent); white-space: nowrap; font-weight: 600; }
.reply-bar { flex: 1; height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.reply-bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent-green), var(--accent)); transition: width .25s linear; }

/* ===== 题库测验 ===== */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.quiz-paper { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--bg-card); cursor: pointer; transition: all .2s; }
.quiz-paper:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(37,99,235,.12); transform: translateY(-2px); }
.qp-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.qp-meta { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.qp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.qp-go { color: var(--accent); font-size: 13px; font-weight: 600; }
.dim-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dim-tag { background: var(--bg-input); border: 1px solid var(--border); padding: 5px 12px; border-radius: 14px; font-size: 12px; color: var(--text-secondary); cursor: pointer; transition: all .2s; }
.dim-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.dim-tag i { font-style: normal; opacity: .7; margin-left: 3px; }
.quiz-card { max-width: 760px; margin: 0 auto; }
.quiz-progress { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.quiz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-green)); transition: width .3s; }
.quiz-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.quiz-count { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.quiz-q { font-size: 16px; line-height: 1.8; color: var(--text-primary); font-weight: 600; margin-bottom: 16px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .15s; background: var(--bg-card); }
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt.selected { border-color: var(--accent); background: rgba(37,99,235,.08); }
.qo-key { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.quiz-opt.selected .qo-key { background: var(--accent); color: #fff; }
.qo-text { flex: 1; font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.quiz-subj { display: flex; flex-direction: column; gap: 12px; }
.quiz-subj-tip { font-size: 12px; color: var(--text-muted); background: rgba(100,116,139,.08); border: 1px dashed rgba(100,116,139,.3); border-radius: var(--radius-sm); padding: 8px 12px; }
.quiz-textarea { width: 100%; min-height: 140px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; resize: vertical; background: var(--bg-input); color: var(--text-primary); }
.quiz-textarea:focus { border-color: var(--accent); outline: none; }
.quiz-answer { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.3); border-radius: var(--radius-sm); padding: 12px 14px; }
.qa-label { font-size: 12px; font-weight: 700; color: var(--accent-green); margin-bottom: 6px; }
.qa-text { font-size: 13px; color: var(--text-primary); line-height: 1.8; white-space: pre-wrap; }
.result-head { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: var(--radius); }
.result-head.pass { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); }
.result-head.fail { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); }
.result-score { font-size: 48px; font-weight: 800; color: var(--accent); line-height: 1; }
.result-score span { font-size: 18px; font-weight: 600; margin-left: 4px; }
.result-info { font-size: 13px; line-height: 1.9; }
.qr-item { border-top: 1px solid var(--border); padding: 16px 0; }
.qr-item:first-child { border-top: none; }
.qr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.qr-no { font-weight: 700; color: var(--text-primary); }
.qr-q { font-size: 14px; color: var(--text-primary); line-height: 1.7; margin-bottom: 10px; }
.qr-opt { display: flex; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 4px; }
.qr-opt.qr-correct { background: rgba(16,185,129,.12); }
.qr-opt.qr-wrong { background: rgba(239,68,68,.1); }
.qr-ref { font-size: 12px; color: var(--text-secondary); line-height: 1.8; margin-top: 8px; background: var(--bg-input); padding: 8px 10px; border-radius: var(--radius-sm); }
.qr-ans { font-size: 13px; color: var(--text-primary); line-height: 1.7; margin-bottom: 8px; }
.qr-label { font-weight: 700; color: var(--accent); margin-right: 4px; }
.badge-ok { background: rgba(16,185,129,.15); color: var(--accent-green); }
.badge-bad { background: rgba(239,68,68,.12); color: #ef4444; }
.badge-king { background: rgba(168,85,247,.15); color: #a855f7; }

/* ===== 解析培训（错题闪卡） ===== */
.tr-opt { display: flex; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 6px; background: var(--bg-input); border: 1px solid var(--border); }
.tr-opt.qr-correct { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.4); }
.tr-reveal { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }

/* ===== 我的题库 - 题库测验题目同步查看 ===== */
.bank-paper { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: var(--bg-card); }
.bank-paper-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; transition: background .15s; }
.bank-paper-head:hover { background: var(--bg-input); }
.bp-title { font-weight: 700; font-size: 14px; color: var(--text-primary); flex: 0 0 auto; }
.bp-meta { font-size: 12px; flex: 1 1 auto; }
.qr-opts { list-style: none; padding: 0; margin: 0 0 6px 0; }
.qr-opts li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 4px; background: var(--bg-input); }
.qr-opts li.qr-correct { background: rgba(16,185,129,.12); }
.qr-opts .qo-key { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.qr-opts li.qr-correct .qo-key { background: var(--accent-green); color: #fff; }
.qr-opts .qo-text { flex: 1; color: var(--text-primary); line-height: 1.6; }
.bank-paper-body { padding: 4px 16px 14px; border-top: 1px dashed var(--border); }

/* 题库类目标签 */
.badge-cat { background: rgba(37,99,235,.12); color: var(--accent); border: 1px solid rgba(37,99,235,.25); }
.qp-name .badge-cat, .bp-title .badge-cat { margin-right: 4px; vertical-align: middle; }

/* 主观题 AI 参考评分明细 */
.qr-breakdown { margin: 6px 0 0; padding-left: 18px; }
.qr-breakdown li { font-size: 13px; line-height: 1.7; margin: 2px 0; }
.qr-breakdown li.qr-correct { color: #15803d; }
.qr-breakdown li.qr-wrong { color: #b91c1c; }

/* 学习素材库 */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.mat-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-card); display: flex; flex-direction: column; }
.mat-prev { height: 140px; background: #0f172a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mat-media { max-width: 100%; max-height: 140px; object-fit: contain; background: #000; }
.mat-doc { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 140px; color: var(--accent); text-decoration: none; font-size: 13px; text-align: center; padding: 8px; }
.mat-doc .muted { color: var(--text-muted); font-size: 11px; margin-top: 6px; }
.mat-name { font-size: 13px; font-weight: 600; padding: 8px 10px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-meta { font-size: 11px; color: var(--text-muted); padding: 2px 10px 8px; }
.mat-card .btn { margin: 0 10px 10px; }

/* ===== 斐乐手表知识库抽屉 ===== */
.kb-mask{ position:fixed; inset:0; background:rgba(15,23,42,.62); display:flex; align-items:center; justify-content:center; z-index:2000; backdrop-filter:blur(3px); }
.kb-drawer{ width:min(1200px,95vw); height:88vh; background:var(--bg-card-solid,#fff); border:1px solid var(--border); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,.35); }
.kb-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--border); }
.kb-title{ font-size:16px; font-weight:700; color:var(--text-primary); }
.kb-quiz-btn{ padding:6px 12px; border:1px solid var(--accent); background:linear-gradient(135deg,#1677ff,#4096ff); color:#fff; border-radius:16px; cursor:pointer; font-size:12px; font-weight:600; transition:all .15s; }
.kb-quiz-btn:hover{ transform:translateY(-1px); box-shadow:0 4px 12px rgba(22,119,255,.35); }
.kb-close{ width:32px; height:32px; border-radius:50%; border:none; background:var(--bg-input); font-size:18px; cursor:pointer; color:var(--text-secondary); }
.kb-close:hover{ background:var(--gradient-red,#ef4444); color:#fff; }
.kb-search{ padding:10px 18px; border-bottom:1px solid var(--border); }
.kb-input{ width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px; font-size:14px; background:var(--bg-input); color:var(--text-primary); box-sizing:border-box; direction:ltr; text-align:left; unicode-bidi:plaintext; }
.kb-input:focus{ outline:none; border-color:var(--accent); }
.kb-input::placeholder{ direction:ltr; text-align:left; }
.kb-body{ flex:1; display:flex; overflow:hidden; }
.kb-list{ width:280px; flex:0 0 280px; overflow-y:auto; border-right:1px solid var(--border); padding:8px; }
.kb-item{ padding:10px 12px; border-radius:8px; cursor:pointer; margin-bottom:4px; border:1px solid transparent; }
.kb-item:hover{ background:var(--bg-input); }
.kb-item.active{ background:rgba(37,99,235,.1); border-color:rgba(37,99,235,.3); }
.kb-item-name{ font-size:14px; font-weight:600; color:var(--text-primary); }
.kb-item-meta{ font-size:12px; color:var(--text-muted); margin-top:2px; }
.kb-detail{ flex:1; overflow-y:auto; padding:18px 22px; }
.kb-empty{ color:var(--text-muted); font-size:13px; padding:24px; text-align:center; }
.kb-d-title{ font-size:18px; font-weight:700; color:var(--text-primary); }
.kb-d-code{ font-size:12px; font-weight:500; color:var(--text-muted); background:var(--bg-input); padding:2px 8px; border-radius:6px; margin-left:6px; }
.kb-d-web{ margin-left:8px; padding:5px 12px; border:1px solid #0d9488; background:linear-gradient(135deg,#0f766e,#0d9488); color:#fff; border-radius:14px; cursor:pointer; font-size:12px; font-weight:600; }
.kb-d-web:hover{ transform:translateY(-1px); box-shadow:0 4px 12px rgba(13,148,136,.35); }
.kb-d-imgwrap{ margin:14px 0; }
.kb-d-img{ max-width:220px; max-height:220px; border-radius:10px; border:1px solid var(--border); display:block; }
.kb-sec-title{ font-size:14px; font-weight:700; color:var(--accent); margin:18px 0 8px; padding-left:10px; border-left:3px solid var(--accent); }
.kb-table{ width:100%; border-collapse:collapse; font-size:13px; margin-bottom:4px; }
.kb-table td{ border:1px solid var(--border); padding:7px 10px; color:var(--text-primary); vertical-align:top; }
.kb-table .kb-k{ width:110px; background:var(--bg-input); color:var(--text-secondary); font-weight:600; }
.kb-faq{ display:flex; flex-direction:column; gap:8px; }
.kb-faq-item{ border:1px solid var(--border); border-radius:8px; padding:10px 12px; background:var(--bg-card); }
.kb-faq-q{ font-size:13px; font-weight:600; color:var(--text-primary); margin-bottom:4px; }
.kb-faq-a{ font-size:13px; line-height:1.7; color:var(--text-secondary); white-space:pre-wrap; }
.kb-faq-strategy{ font-size:12px; color:var(--accent); margin-top:4px; }
.kb-faq-img{ max-width:200px; max-height:160px; margin-top:6px; border-radius:8px; border:1px solid var(--border); display:block; }
.kb-qa{ border:1px solid var(--border); border-radius:10px; background:var(--bg-input); margin-top:6px; overflow:hidden; }
.kb-qa-hist{ max-height:240px; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:8px; }
.kb-qa-row{ display:flex; }
.kb-qa-row.u{ justify-content:flex-end; }
.kb-qa-row.a{ justify-content:flex-start; }
.kb-qa-bub{ max-width:85%; padding:8px 11px; border-radius:12px; font-size:13px; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.kb-qa-row.u .kb-qa-bub{ background:var(--accent); color:#fff; border-bottom-right-radius:3px; }
.kb-qa-row.a .kb-qa-bub{ background:var(--bg-card); color:var(--text-primary); border:1px solid var(--border); border-bottom-left-radius:3px; }
.kb-qa-bub.warn{ background:#fff7e6; color:#ad6800; border-color:#ffe0a3; }
.kb-qa-bub.typing{ display:inline-flex; gap:4px; align-items:center; }
.kb-qa-bub.typing .dot{ width:6px; height:6px; border-radius:50%; background:var(--text-muted); animation:ct-blink 1.2s infinite; }
.kb-qa-bub.typing .dot:nth-child(2){ animation-delay:.2s; }
.kb-qa-bub.typing .dot:nth-child(3){ animation-delay:.4s; }
.kb-qa-input{ display:flex; gap:8px; padding:8px; border-top:1px solid var(--border); background:var(--bg-card); }
.kb-qa-in{ flex:1; box-sizing:border-box; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--bg-input); color:var(--text); font-size:13px; outline:none; direction:ltr; text-align:left; unicode-bidi:plaintext; }
.kb-qa-in:focus{ border-color:var(--accent); }
.kb-qa-in::placeholder{ direction:ltr; text-align:left; }
.kb-qa-btn{ padding:8px 16px; border:none; border-radius:8px; background:var(--accent); color:#fff; font-size:13px; font-weight:600; cursor:pointer; }
.kb-qa-btn:hover{ opacity:.9; }

/* ===== 学习中心（部门/类目分组素材库）===== */
.lc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lc-group { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--bg-card); cursor: pointer; transition: .15s; display: flex; flex-direction: column; gap: 6px; }
.lc-group:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(37,99,235,.12); transform: translateY(-2px); }
.lc-group-sm { padding: 12px; }
.lc-g-icon { font-size: 30px; }
.lc-g-name { font-size: 15px; font-weight: 700; }
.lc-g-desc { font-size: 12px; color: var(--text-secondary); flex: 1; }
.lc-g-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.lc-g-go { font-size: 12px; color: var(--accent); font-weight: 600; }
.lc-search { margin: 4px 0 14px; }
.input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-card); color: var(--text); font-size: 13px; outline: none; }
.input:focus { border-color: var(--accent); }
.lc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.lc-item, .lc-hit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); cursor: pointer; transition: .12s; }
.lc-item:hover, .lc-hit:hover { border-color: var(--accent); background: rgba(37,99,235,.04); }
.lc-hit-icon { font-size: 18px; width: 22px; text-align: center; }
.lc-hit-title { font-weight: 600; font-size: 14px; flex: 1; }
/* 分组编辑 / 素材操作 按钮 */
.lc-g-acts { position: absolute; top: 8px; right: 8px; display: none; gap: 4px; }
.lc-group { position: relative; }
.lc-group:hover .lc-g-acts { display: flex; }
.lc-item-acts { display: none; gap: 4px; margin-left: auto; }
.lc-item:hover .lc-item-acts { display: flex; }
.ic-btn { border: 1px solid var(--border); background: var(--bg-card); border-radius: 7px; padding: 3px 7px; font-size: 13px; cursor: pointer; line-height: 1; transition: .12s; }
.ic-btn:hover { border-color: var(--accent); background: rgba(37,99,235,.08); }
.ic-del:hover { border-color: #ef4444; background: rgba(239,68,68,.08); }
.price { color: #ef4444; font-weight: 700; }
/* 知识库表格 / 红线 / 产品详情 */
.kb-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.kb-table th, .kb-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.kb-table th { background: rgba(37,99,235,.08); font-weight: 700; }
.kb-note { font-size: 12px; color: #b45309; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); padding: 8px 10px; border-radius: 8px; margin-top: 8px; }
.kb-redline { padding: 4px 0; }
.kb-rl-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.kb-rl-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.kb-prod-head { border-bottom: 1px dashed var(--border); padding-bottom: 10px; margin-bottom: 4px; }
.kb-prod-model { display: inline-block; background: rgba(180,132,79,.18); color: #d4a574; font-weight: 700; padding: 2px 10px; border-radius: 20px; font-size: 13px; }
.kb-prod-name { font-size: 16px; font-weight: 700; margin: 8px 0 4px; }
.kb-prod-price { font-size: 15px; }
.kb-k { color: var(--text-secondary); width: 92px; font-weight: 600; vertical-align: top; }
.kb-scenes { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-secondary); }

/* ===== 顾客「考虑时间」打字气泡 + 情绪胶囊 ===== */
.msg.customer.thinking .msg-avatar, .qn-msg.cust .av { flex: 0 0 auto; }
.msg-bubble.typing, .qn-msg.cust .bub.typing {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-secondary); font-size: 13px; min-height: 22px;
}
.msg-bubble.typing .dot, .qn-msg.cust .bub.typing .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #86909c; opacity: .35;
  animation: ct-blink 1.2s infinite ease-in-out;
}
.msg-bubble.typing .dot:nth-child(2), .qn-msg.cust .bub.typing .dot:nth-child(2) { animation-delay: .2s; }
.msg-bubble.typing .dot:nth-child(3), .qn-msg.cust .bub.typing .dot:nth-child(3) { animation-delay: .4s; }
.think-txt { margin-left: 4px; }
@keyframes ct-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* 情绪胶囊：贴在顾客气泡末尾，体现角色扮演情绪 */
.mood-chip {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 11px;
  font-size: 11px; line-height: 1.6; white-space: nowrap;
  background: #fff1f0; color: #cf1322; border: 1px solid #ffccc7; vertical-align: middle;
}
.mood-chip.mood-neutral   { background: #f0f0f0; color: #595959; border-color: #d9d9d9; }
.mood-chip.mood-curious   { background: #e6f7ff; color: #0958d9; border-color: #91caff; }
.mood-chip.mood-doubtful  { background: #fffbe6; color: #ad6800; border-color: #ffe58f; }
.mood-chip.mood-hesitant  { background: #fff7e6; color: #ad6800; border-color: #ffd591; }
.mood-chip.mood-urgent    { background: #fff2e8; color: #d4380d; border-color: #ffbb96; }
.mood-chip.mood-angry     { background: #fff1f0; color: #cf1322; border-color: #ffccc7; }
.mood-chip.mood-trusting  { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
.mood-chip.mood-satisfied { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
.chat-mood, .qn-mood {
  font-size: 12px; color: var(--text-secondary); margin-top: 3px;
}
.qn-mood {
  padding: 4px 10px; background: rgba(37,99,235,.06);
  border-radius: 8px; margin: 6px 0 2px; display: inline-block;
}

/* ===== AI 顾客状态标识（仿真头部常驻）===== */
.ai-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-top: 3px;
  border: 1px solid transparent;
}
.ai-badge.ai-on { color: #0f8a3c; background: rgba(15,138,60,.10); border-color: rgba(15,138,60,.30); }
.ai-badge.ai-off { color: #b06a00; background: rgba(176,106,0,.10); border-color: rgba(176,106,0,.30); }
.ai-status { font-size: 13px; font-weight: 600; }
.ai-status-on { color: #0f8a3c; }
.ai-status-off { color: #c0392b; }
.ai-badge.ai-bad { color: #c0392b; background: rgba(192,57,43,.12); border-color: rgba(192,57,43,.35); }
.ai-status-bad { color: #c0392b; font-weight: 600; }

/* ===== AI 知识库出题 ===== */
.qz-modal{ display:flex; flex-direction:column; min-width:560px; max-width:780px; max-height:78vh; padding:0; }
.qz-head{ position:relative; padding:14px 18px 8px; border-bottom:1px solid var(--border); }
.qz-head .qz-title{ font-size:16px; font-weight:700; color:var(--text-primary); }
.qz-head .qz-sub{ display:block; margin-top:4px; font-size:12px; color:var(--text-secondary); }
.qz-head .qz-close{ position:absolute; top:10px; right:14px; font-size:22px; color:var(--text-secondary); cursor:pointer; line-height:1; }
.qz-head .qz-close:hover{ color:var(--text-primary); }
.qz-cfg{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid var(--border); background:var(--bg-input); }
.qz-cfg label{ font-size:13px; color:var(--text-secondary); display:flex; align-items:center; gap:6px; }
.qz-cfg .input{ padding:5px 8px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); color:var(--text-primary); font-size:12px; font-family:inherit; }
.qz-go{ padding:6px 14px; border:1px solid var(--accent); background:var(--accent); color:#fff; border-radius:6px; cursor:pointer; font-size:12px; font-weight:600; cursor:pointer; }
.qz-go:hover{ background:var(--accent-hover,#4096ff); }
.qz-status{ font-size:12px; color:var(--accent); }
.qz-body{ flex:1; overflow-y:auto; padding:14px 18px; }
.qz-empty{ padding:30px 20px; text-align:center; color:var(--text-muted); font-size:13px; border:1px dashed var(--border); border-radius:8px; background:var(--bg-input); }
.qz-empty.warn{ color:#fa8c16; border-color:#ffd591; background:#fff7e6; }
.qz-loading{ padding:20px; text-align:center; color:var(--text-secondary); font-size:13px; }
.qz-loading .dot{ display:inline-block; width:6px; height:6px; margin:0 2px; border-radius:50%; background:var(--accent); animation:qzDot 1.2s infinite ease-in-out; }
.qz-loading .dot:nth-child(2){ animation-delay:.15s; }
.qz-loading .dot:nth-child(3){ animation-delay:.3s; }
@keyframes qzDot{ 0%,80%,100%{ transform:scale(.7); opacity:.4; } 40%{ transform:scale(1); opacity:1; } }
.qz-score{ padding:10px 14px; margin-bottom:14px; border:1px solid #b7eb8f; border-radius:8px; background:#f6ffed; color:#389e0d; font-size:14px; }
.qz-score b{ font-size:18px; margin:0 4px; color:#cf1322; }
.qz-list{ display:flex; flex-direction:column; gap:14px; }
.qz-item{ padding:14px 16px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); }
.qz-q{ font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:10px; line-height:1.5; }
.qz-opts{ display:flex; flex-direction:column; gap:6px; }
.qz-opt{ display:flex; align-items:flex-start; gap:8px; padding:8px 10px; border:1px solid var(--border); border-radius:6px; cursor:pointer; font-size:13px; color:var(--text-primary); background:var(--bg-input); transition:all .15s; }
.qz-opt:hover{ border-color:var(--accent); background:rgba(22,119,255,.04); }
.qz-opt input{ margin:3px 0 0 0; cursor:pointer; }
.qz-opt .qz-key{ display:inline-block; min-width:22px; padding:2px 0; border:1px solid var(--border); border-radius:4px; background:var(--bg-card); text-align:center; font-weight:600; color:var(--accent); font-size:12px; }
.qz-opt .qz-txt{ flex:1; line-height:1.4; }
.qz-opt.right{ border-color:#52c41a; background:#f6ffed; }
.qz-opt.right .qz-key{ background:#52c41a; color:#fff; border-color:#52c41a; }
.qz-opt.wrong{ border-color:#ff4d4f; background:#fff1f0; }
.qz-opt.wrong .qz-key{ background:#ff4d4f; color:#fff; border-color:#ff4d4f; }
.qz-ans{ margin-top:10px; padding:10px 12px; border-left:3px solid var(--accent); border-radius:0 6px 6px 0; background:var(--bg-input); font-size:13px; }
.qz-mark{ display:inline-block; margin-right:4px; font-weight:700; }
.qz-mark.ok{ color:#52c41a; }
.qz-atext{ color:var(--text-primary); font-weight:600; }
.qz-explain{ margin-top:6px; color:var(--text-secondary); font-size:12px; line-height:1.6; }
.qz-foot{ display:flex; gap:10px; padding:12px 18px; border-top:1px solid var(--border); margin:14px -18px -14px; background:var(--bg-input); position:sticky; bottom:0; }
.qz-submit{ padding:8px 18px; border:none; background:linear-gradient(135deg,#1677ff,#4096ff); color:#fff; border-radius:6px; cursor:pointer; font-size:13px; font-weight:600; }
.qz-reset{ padding:8px 18px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); border-radius:6px; cursor:pointer; font-size:13px; }

/* ===== 知识库悬浮窗（可拖动 + 贴边吸附） ===== */
.kb-float{ position:fixed; top:84px; right:24px; width:min(520px,92vw); height:min(640px,82vh); background:var(--bg-card-solid,#fff); border:1px solid var(--border); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 18px 50px rgba(0,0,0,.42); z-index:2100; }
.kb-float-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 14px; border-bottom:1px solid var(--border); cursor:move; background:linear-gradient(135deg,#1f2937,#374151); color:#fff; user-select:none; }
.kb-float-title{ font-size:14px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kb-float-acts{ display:flex; gap:6px; align-items:center; }
.kb-f-btn{ width:28px; height:28px; border-radius:6px; border:none; background:rgba(255,255,255,.16); color:#fff; font-size:16px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.kb-f-btn:hover{ background:rgba(255,255,255,.32); }
.kb-launcher{ position:fixed; right:18px; bottom:18px; width:50px; height:50px; border-radius:50%; background:linear-gradient(135deg,#1677ff,#4096ff); color:#fff; display:none; align-items:center; justify-content:center; font-size:22px; cursor:pointer; box-shadow:0 8px 24px rgba(22,119,255,.45); z-index:2100; }
.kb-launcher:hover{ transform:translateY(-1px); }
body.kb-dragging{ user-select:none; cursor:move !important; }
/* AI 出题模态需高于知识库悬浮窗 */
#qz-modal.modal-mask{ z-index:2300; }

/* ===== 工作台自由悬浮窗（可拖动 / 缩放 / 最小化） ===== */
.qn-float{
  position:fixed; z-index:1500; display:flex; flex-direction:column;
  background:var(--bg-card-solid,#fff); border:1px solid var(--border);
  border-radius:12px; overflow:hidden; box-shadow:0 24px 70px rgba(0,0,0,.45);
}
/* 全屏模式：铺满整个浏览器窗口，沉浸式还原平台工作台 */
.qn-float.qn-fullscreen{
  inset:0; width:100vw; height:100vh; border-radius:0; border:none;
  z-index:9999; box-shadow:none; cursor:default;
}
.qn-float.qn-fullscreen .modal-header{ display:none; }
.qn-float-bar{
  position:fixed; top:10px; right:14px; z-index:10001; display:flex; gap:8px;
  opacity:.72; transition:opacity .15s;
}
.qn-float-bar:hover{ opacity:1; }
.qn-float.qn-min{ display:none; }
/* 窗口标题栏（兼作拖拽手柄） */
.qn-float .modal-header{
  margin:0; padding:9px 14px; cursor:move; user-select:none;
  background:linear-gradient(180deg,#ffffff,#f2f4f7); border-bottom:1px solid #e5e6eb;
  border-radius:12px 12px 0 0;
}
.qn-float .modal-header .modal-title{ font-size:15px; }
.qn-win-btn{
  width:30px; height:30px; border-radius:50%; border:none; background:var(--bg-input,#f2f3f5);
  color:#4e5969; font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.qn-win-btn:hover{ background:#ffd666; color:#874d00; }
.qn-think-sel{
  margin-left:10px; padding:3px 8px; border:1px solid #e5e6eb; border-radius:6px;
  background:#fff; color:#1f2329; font-size:12px; cursor:pointer; outline:none;
}
.qn-think-sel:hover{ border-color:#1677ff; }
/* 右下角缩放手柄 */
.qn-resize-corner{
  position:absolute; right:0; bottom:0; width:18px; height:18px; cursor:nwse-resize; z-index:40;
  background:linear-gradient(135deg,transparent 50%,rgba(22,119,255,.45) 50%,rgba(22,119,255,.45) 60%,transparent 60%,transparent 72%,rgba(22,119,255,.45) 72%,rgba(22,119,255,.45) 82%,transparent 82%);
}
.qn-resize-corner:hover{ background-color:rgba(22,119,255,.10); }
/* 最小化后的悬浮启动器（右下角） */
.qn-launch{
  position:fixed; right:20px; bottom:20px; z-index:1600; display:flex; align-items:center; gap:10px;
  padding:10px 14px 10px 12px; min-width:190px; max-width:240px; cursor:pointer;
  background:linear-gradient(135deg,#1677ff,#4096ff); color:#fff; border-radius:12px;
  box-shadow:0 12px 30px rgba(22,119,255,.45); transition:transform .15s, box-shadow .15s;
}
.qn-launch:hover{ transform:translateY(-2px); box-shadow:0 16px 38px rgba(22,119,255,.55); }
.qn-launch-av{ width:38px; height:38px; border-radius:10px; background:rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.qn-launch-txt{ flex:1; min-width:0; }
.qn-launch-txt .t1{ font-size:13px; font-weight:700; }
.qn-launch-txt .t2{ font-size:11px; opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.qn-launch-badge{
  min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:#ff4d4f; color:#fff;
  font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
/* 右下角新消息通知弹窗 */
.qn-notify{
  position:fixed; right:20px; bottom:84px; z-index:1700; width:320px; max-width:90vw;
  display:flex; align-items:flex-start; gap:10px; padding:12px 14px;
  background:#fff; border:1px solid var(--border); border-left:4px solid #ff4d4f; border-radius:10px;
  box-shadow:0 12px 34px rgba(0,0,0,.22); animation:qnNotifyIn .25s ease;
}
@keyframes qnNotifyIn{ from{ transform:translateY(12px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
.qn-notify-hide{ opacity:0; transform:translateY(12px); transition:all .3s ease; pointer-events:none; }
.qn-notify-av{ width:34px; height:34px; border-radius:9px; background:#fff1f0; color:#ff4d4f; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.qn-notify-body{ flex:1; min-width:0; }
.qn-notify-title{ font-size:13px; font-weight:700; color:#cf1322; margin-bottom:3px; }
.qn-notify-text{ font-size:13px; color:#1f2329; line-height:1.5; word-break:break-word; }
.qn-notify-btn{ align-self:center; padding:5px 12px; border:none; background:#1677ff; color:#fff; border-radius:6px; cursor:pointer; font-size:12px; font-weight:600; flex-shrink:0; }
.qn-notify-btn:hover{ background:#4096ff; }
.qn-notify-x{ align-self:flex-start; width:22px; height:22px; border:none; background:transparent; color:#86909c; font-size:16px; cursor:pointer; line-height:1; flex-shrink:0; }
.qn-notify-x:hover{ color:#ff4d4f; }

/* ===== 内置浏览器悬浮窗 ===== */
.web-float{ position:fixed; top:96px; right:24px; width:min(720px,80vw); height:min(560px,78vh); background:#fff; border:1px solid var(--border); border-radius:12px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 18px 50px rgba(0,0,0,.42); z-index:2050; }
.web-float-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 12px; border-bottom:1px solid var(--border); cursor:move; background:linear-gradient(135deg,#0f766e,#0d9488); color:#fff; user-select:none; }
.web-float-title{ font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.web-float-acts{ display:flex; gap:6px; align-items:center; }
.web-f-btn{ width:26px; height:26px; border-radius:6px; border:none; background:rgba(255,255,255,.16); color:#fff; font-size:14px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.web-f-btn:hover{ background:rgba(255,255,255,.32); }
.web-toolbar{ display:flex; gap:6px; padding:8px 10px; border-bottom:1px solid var(--border); background:#f7f8fa; align-items:center; }
.web-addr{ flex:1; display:flex; gap:6px; }
.web-addr input{ flex:1; box-sizing:border-box; padding:7px 10px; border:1px solid #d9d9d9; border-radius:7px; font-size:13px; background:#fff; direction:ltr; text-align:left; unicode-bidi:plaintext; }
.web-addr input:focus{ outline:none; border-color:#0d9488; }
.web-go{ padding:7px 14px; border:none; border-radius:7px; background:#0d9488; color:#fff; font-size:13px; font-weight:600; cursor:pointer; }
.web-go:hover{ background:#0f766e; }
.web-nav{ display:flex; gap:4px; }
.web-nav button{ width:30px; height:30px; border-radius:6px; border:1px solid #d9d9d9; background:#fff; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; }
.web-nav button:hover{ background:#f0f0f0; }
.web-nav button:disabled{ opacity:.4; cursor:not-allowed; }
.web-frame{ flex:1; border:0; background:#fff; }
.web-tip{ padding:6px 10px; background:#fffbe6; color:#ad6800; border-bottom:1px solid #ffe58f; font-size:12px; }
.web-launcher{ position:fixed; right:18px; bottom:80px; width:50px; height:50px; border-radius:50%; background:linear-gradient(135deg,#0f766e,#0d9488); color:#fff; display:none; align-items:center; justify-content:center; font-size:22px; cursor:pointer; box-shadow:0 8px 24px rgba(15,118,110,.45); z-index:2050; }
.web-launcher:hover{ transform:translateY(-1px); }

/* 独立窗口被浏览器拦截时的降级小卡（不画大浮窗，避免卡屏） */
.popup-blocked-tip{ position:fixed; right:24px; bottom:24px; width:340px; padding:14px 16px; background:#fff; border:1px solid #ffe58f; border-left:4px solid #faad14; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.18); z-index:2090; font-size:13px; color:var(--text-primary); }
.popup-blocked-tip .pbt-title{ font-size:14px; font-weight:700; color:#ad6800; margin-bottom:6px; }
.popup-blocked-tip .pbt-desc{ font-size:12px; line-height:1.6; color:var(--text-secondary); margin-bottom:10px; }
.popup-blocked-tip .pbt-row{ display:flex; gap:6px; flex-wrap:wrap; }
.popup-blocked-tip .pbt-btn{ flex:1; min-width:80px; padding:7px 10px; border:1px solid #d9d9d9; background:#fff; color:var(--text-primary); border-radius:6px; font-size:12px; cursor:pointer; }
.popup-blocked-tip .pbt-btn:hover{ border-color:#0d9488; color:#0d9488; }
.popup-blocked-tip .pbt-btn.primary{ background:#0d9488; color:#fff; border-color:#0d9488; font-weight:600; }
.popup-blocked-tip .pbt-btn.primary:hover{ background:#0f766e; }
.popup-blocked-tip .pbt-btn.ghost{ flex:0; padding:7px 10px; background:transparent; border-color:transparent; color:var(--text-muted); }

/* ===== kb-float 顶部 Tab + 判定决策树 ===== */
.kb-tabs{ display:flex; gap:6px; padding:8px 14px; border-bottom:1px solid var(--border); background:var(--bg-card); }
.kb-tab{ padding:6px 14px; border:1px solid var(--border); background:var(--bg-input); color:var(--text-secondary); border-radius:6px; cursor:pointer; font-size:13px; }
.kb-tab:hover{ background:var(--bg-elevated); }
.kb-tab.on{ background:var(--accent); color:#fff; border-color:var(--accent); }

.dt-wrap{ padding:14px 18px; overflow-y:auto; flex:1; }
.dt-head{ margin-bottom:14px; }
.dt-tree-name{ font-size:18px; font-weight:700; color:var(--text-primary); display:flex; align-items:center; gap:8px; }
.dt-cat{ font-size:11px; font-weight:500; padding:2px 8px; border-radius:10px; background:var(--accent); color:#fff; }
.dt-tree-desc{ font-size:13px; color:var(--text-secondary); margin-top:6px; line-height:1.6; }
.dt-bread{ font-size:12px; color:var(--text-muted); margin-top:8px; padding:6px 10px; background:var(--bg-input); border-radius:6px; }

.dt-step-bar{ display:flex; gap:10px; justify-content:center; padding:8px 0 16px; }
.dt-dot{ width:36px; height:4px; border-radius:2px; background:var(--border); }
.dt-dot.on{ background:var(--accent); }

.dt-question{ text-align:center; }
.dt-q-text{ font-size:16px; font-weight:600; color:var(--text-primary); margin-bottom:14px; }
.dt-options{ display:flex; flex-direction:column; gap:10px; align-items:stretch; max-width:520px; margin:0 auto; }
.dt-opt{ padding:12px 16px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-primary); border-radius:8px; cursor:pointer; font-size:14px; text-align:left; transition:all .15s; }
.dt-opt:hover{ background:var(--accent); color:#fff; border-color:var(--accent); transform:translateY(-1px); }
.dt-back{ margin-top:16px; text-align:center; }
.dt-back-btn{ padding:6px 14px; border:1px solid var(--border); background:var(--bg-input); color:var(--text-secondary); border-radius:6px; cursor:pointer; font-size:13px; }
.dt-back-btn:hover{ background:var(--bg-elevated); }

.dt-result{ text-align:center; padding:20px; border-radius:12px; max-width:600px; margin:0 auto; }
.dt-r-good{ background:linear-gradient(135deg,#f6ffed,#d9f7be); border:1px solid #b7eb8f; }
.dt-r-warn{ background:linear-gradient(135deg,#fffbe6,#ffe58f); border:1px solid #ffd666; }
.dt-r-bad{ background:linear-gradient(135deg,#fff1f0,#ffadd2); border:1px solid #ffa39e; }
.dt-r-info{ background:linear-gradient(135deg,#e6f7ff,#91d5ff); border:1px solid #91d5ff; }
.dt-result-icon{ width:60px; height:60px; border-radius:50%; background:rgba(255,255,255,.7); display:flex; align-items:center; justify-content:center; margin:0 auto 12px; font-size:30px; font-weight:700; color:#52c41a; }
.dt-r-warn .dt-result-icon{ color:#faad14; }
.dt-r-bad .dt-result-icon{ color:#f5222d; }
.dt-r-info .dt-result-icon{ color:#1890ff; }
.dt-result-label{ font-size:22px; font-weight:700; color:var(--text-primary); margin-bottom:6px; }
.dt-result-desc{ font-size:13px; color:var(--text-secondary); margin-bottom:16px; line-height:1.6; }

.dt-result-actions{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-bottom:14px; }
.dt-action{ padding:8px 16px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-primary); border-radius:6px; cursor:pointer; font-size:13px; }
.dt-action:hover{ background:var(--accent); color:#fff; border-color:var(--accent); }
.dt-action.primary{ background:var(--accent); color:#fff; border-color:var(--accent); }
.dt-action.primary:hover{ background:#1677ff; border-color:#1677ff; }

.dt-talks,.dt-perm{ margin-top:14px; padding:14px; background:var(--bg-card); border:1px solid var(--border); border-radius:8px; text-align:left; }
.dt-section-title{ font-size:13px; font-weight:600; color:var(--text-primary); margin-bottom:10px; padding-bottom:6px; border-bottom:1px solid var(--border); }
.dt-talk-item{ display:flex; gap:8px; align-items:flex-start; padding:8px; background:var(--bg-input); border-radius:6px; margin-bottom:8px; }
.dt-talk-text{ flex:1; font-size:13px; color:var(--text-primary); line-height:1.6; }
.dt-copy-btn{ padding:3px 8px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); border-radius:4px; cursor:pointer; font-size:11px; flex-shrink:0; }
.dt-copy-btn:hover{ background:var(--accent); color:#fff; border-color:var(--accent); }

.dt-perm-item{ display:flex; gap:8px; padding:6px 8px; font-size:13px; border-bottom:1px dashed var(--border); }
.dt-perm-item:last-child{ border-bottom:0; }
.dt-perm-level{ font-weight:600; padding:2px 8px; border-radius:4px; background:#f0f0f0; color:#555; font-size:11px; flex-shrink:0; align-self:flex-start; }
.dt-perm-text{ color:var(--text-primary); line-height:1.6; }

.dt-empty{ text-align:center; padding:30px; color:var(--text-muted); font-size:13px; }
.dt-switch{ padding:6px 12px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-primary); border-radius:6px; cursor:pointer; margin:0 4px; }

/* ===== 决策树 · 项目分组选择器 ===== */
.dt-group-picker{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-bottom:12px; padding:8px 10px; background:var(--bg-input); border:1px solid var(--border); border-radius:8px; }
.dt-group-label{ font-size:12px; color:var(--text-secondary); font-weight:600; margin-right:4px; }
.dt-group-tab{ padding:5px 12px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); border-radius:6px; cursor:pointer; font-size:12px; font-weight:600; transition:all .15s; }
.dt-group-tab.on{ background:var(--accent); color:#fff; border-color:var(--accent); }
.dt-group-tab:hover:not(.on){ border-color:var(--accent); color:var(--accent); }
.dt-group-current{ font-size:13px; color:var(--text-primary); font-weight:600; }
.dt-group-tag{ display:inline-block; padding:1px 6px; background:#52c41a; color:#fff; border-radius:4px; font-size:10px; margin-left:4px; vertical-align:middle; }

/* ===== 决策树 · 场景方案 ===== */
.dt-mode-tabs{ display:flex; gap:6px; margin:12px 0 10px; }
.dt-mode-tab{ flex:1; padding:9px 0; border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); border-radius:8px; cursor:pointer; font-size:13px; font-weight:600; transition:all .15s; }
.dt-mode-tab.on{ background:var(--accent); color:#fff; border-color:var(--accent); }
.dt-mode-tab:hover:not(.on){ background:var(--bg-elevated); }

.dt-scenario{ padding:4px 2px 8px; }
.dt-sc-tip{ font-size:12.5px; color:var(--text-secondary); line-height:1.7; background:var(--bg-input); border-radius:8px; padding:10px 12px; margin-bottom:10px; }
.dt-sc-tip b{ color:var(--accent); }
.dt-sc-input{ width:100%; min-height:96px; padding:12px 14px; border:1px solid var(--border); border-radius:10px; font-size:14px; font-family:inherit; line-height:1.6; outline:none; resize:vertical; background:var(--bg-card); color:var(--text-primary); box-shadow:var(--shadow-card,0 1px 4px rgba(0,0,0,.04)); }
.dt-sc-input:focus{ border-color:var(--accent); }
.dt-sc-actions{ display:flex; align-items:center; gap:10px; margin:10px 0 4px; }
.dt-sc-btn{ padding:10px 22px; border:none; border-radius:9px; background:linear-gradient(120deg,#fa8c16,#fa541c); color:#fff; font-size:14px; font-weight:700; cursor:pointer; box-shadow:0 2px 8px rgba(250,84,28,.25); }
.dt-sc-btn:hover{ filter:brightness(1.05); }
.dt-sc-clear{ padding:8px 14px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary); border-radius:8px; cursor:pointer; font-size:13px; }
.dt-sc-clear:hover{ background:var(--bg-elevated); }
.dt-sc-count{ font-size:12px; color:var(--text-muted); margin-left:auto; }
.dt-sc-note{ font-size:12px; color:#fa541c; background:#fff2e8; border:1px solid #ffbb96; border-radius:8px; padding:8px 12px; margin:14px 0 8px; line-height:1.6; }
.dt-sc-multi{ margin-top:14px; padding:14px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; }
.dt-sc-multi-tip{ font-size:13px; color:var(--text-secondary); margin-bottom:10px; }
/* 场景速选卡片 */
.dt-scenes{ padding:4px 2px 8px; }
.dt-scenes-tip{ font-size:12.5px; color:var(--text-secondary); line-height:1.7; background:var(--bg-input); border-radius:8px; padding:10px 12px; margin-bottom:10px; }
.dt-scenes-title{ font-size:13px; font-weight:600; color:var(--text-secondary); margin:12px 0 6px; }
.dt-scene-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.dt-scene{ position:relative; text-align:left; background:var(--bg-card); border:1px solid var(--border); border-left:3px solid #bbb; border-radius:8px; padding:10px 12px; cursor:pointer; transition:all .15s; font-family:inherit; display:block; }
.dt-scene:hover{ box-shadow:0 2px 8px rgba(0,0,0,.08); transform:translateY(-1px); }
.dt-scene-cat{ display:inline-block; font-size:10px; padding:1px 6px; border-radius:4px; background:#f0f0f0; color:#666; margin-bottom:4px; }
.dt-scene-label{ display:block; font-size:13px; font-weight:600; color:var(--text-primary); }
.dt-scene-sub{ display:block; font-size:11px; color:var(--text-muted); margin-top:2px; line-height:1.4; }
.dt-scene-lv{ position:absolute; top:8px; right:8px; font-size:10px; padding:1px 6px; border-radius:4px; color:#fff; }
.dt-scene-lv.dt-r-good{ background:#52c41a; }.dt-scene-lv.dt-r-warn{ background:#faad14; }.dt-scene-lv.dt-r-bad{ background:#f5222d; }.dt-scene-lv.dt-r-info{ background:#1890ff; }
.dt-cat-质量{ border-left-color:#1890ff; }.dt-cat-质量 .dt-scene-cat{ background:#e6f4ff; color:#1890ff; }
.dt-cat-人为{ border-left-color:#fa8c16; }.dt-cat-人为 .dt-scene-cat{ background:#fff3e6; color:#fa8c16; }
.dt-cat-使用{ border-left-color:#52c41a; }.dt-cat-使用 .dt-scene-cat{ background:#f0fbe6; color:#52a50e; }
.dt-cat-物流{ border-left-color:#722ed1; }.dt-cat-物流 .dt-scene-cat{ background:#f5e6ff; color:#722ed1; }
.dt-cat-挽单{ border-left-color:#eb2f96; }.dt-cat-挽单 .dt-scene-cat{ background:#fde4f2; color:#eb2f96; }

/* ===== 退款挽单专项页 ===== */
.retain-intro{ font-size:13px; color:var(--text-secondary); line-height:1.8; background:var(--bg-input); border-radius:8px; padding:12px 14px; }
.retain-intro b{ color:var(--accent-light); }
.retain-section{ margin-top:22px; }
.retain-h{ font-size:15px; font-weight:700; margin:0 0 12px; display:flex; align-items:center; gap:8px; }
.retain-2col{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.retain-3col{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.retain-5col{ display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
.retain-card{ background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.retain-card h4{ margin:0 0 6px; font-size:13px; color:var(--text-primary); }
.retain-boundary .owner{ font-size:11px; color:var(--text-muted); }
.retain-example{ font-size:12px; color:var(--text-secondary); line-height:1.6; }
.retain-tag{ display:inline-block; font-size:11px; padding:1px 7px; border-radius:10px; margin-right:4px; }
.tag-recov{ background:#e6f7e6; color:#389e0d; }
.tag-unrecov{ background:#fff1f0; color:#cf1322; }
.retain-step-no{ width:22px; height:22px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; font-weight:600; }
.retain-step-ex{ font-size:11px; color:var(--text-secondary); margin-top:4px; background:var(--bg-input); padding:6px 8px; border-radius:6px; }
.retain-ul,.retain-ol{ margin:6px 0 0; padding-left:18px; font-size:12px; color:var(--text-secondary); line-height:1.7; }
.retain-ul li,.retain-ol li{ margin-bottom:3px; }
.retain-good{ background:#f6ffed; border-color:#b7eb8f; }
.retain-bad{ background:#fff1f0; border-color:#ffccc7; }
.retain-rank-no{ font-size:18px; font-weight:800; color:var(--accent-light); }
.retain-rank-reason{ font-size:13px; font-weight:600; margin-top:2px; }
.retain-rank-share{ font-size:12px; color:var(--text-muted); margin:2px 0 6px; }
.retain-scenario-head{ display:flex; gap:6px; margin-bottom:6px; flex-wrap:wrap; }
.retain-scenario-title{ font-size:13px; font-weight:600; color:var(--text-primary); margin-bottom:6px; }
.retain-auth{ font-size:11px; color:var(--text-muted); margin-top:6px; background:var(--bg-input); padding:6px 8px; border-radius:6px; }
.retain-case-sub{ font-size:11px; color:var(--text-muted); margin:8px 0 2px; font-weight:600; }
.retain-reply{ font-size:12px; color:var(--text-secondary); line-height:1.6; padding:8px 10px; border-radius:8px; margin-top:6px; }
@media (max-width:1100px){ .retain-5col{ grid-template-columns:repeat(2,1fr);} .retain-3col{ grid-template-columns:repeat(2,1fr);} }
@media (max-width:760px){ .retain-2col,.retain-3col,.retain-5col{ grid-template-columns:1fr; } }
.dt-sc-multi-item{ display:flex; align-items:center; gap:8px; width:100%; padding:10px 12px; margin-bottom:8px; border:1px solid var(--border); background:var(--bg-input); border-radius:8px; cursor:pointer; font-size:13px; color:var(--text-primary); text-align:left; }
.dt-sc-multi-item:hover{ border-color:var(--accent); background:var(--bg-elevated); }
.dt-r-dot{ width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.dt-r-dot.dt-r-good{ background:#52c41a; }
.dt-r-dot.dt-r-warn{ background:#faad14; }
.dt-r-dot.dt-r-bad{ background:#f5222d; }
.dt-r-dot.dt-r-info{ background:#1890ff; }

/* 场景方案 · 无匹配引导（用户已运行但未识别到结果时显示） */
.dt-sc-empty{ margin-top:14px; padding:24px 18px; background:var(--bg-input); border:1px dashed #faad14; border-radius:10px; text-align:center; }
.dt-sc-empty-icon{ font-size:36px; margin-bottom:8px; opacity:.7; }
.dt-sc-empty-title{ font-size:14px; font-weight:700; color:var(--text-primary); margin-bottom:6px; }
.dt-sc-empty-desc{ font-size:12.5px; color:var(--text-secondary); line-height:1.7; margin-bottom:14px; max-width:380px; margin-left:auto; margin-right:auto; }
.dt-sc-empty-actions{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-bottom:12px; }
.dt-sc-empty-btn{ padding:8px 16px; border:1px solid var(--border); background:var(--bg-card); color:var(--text-primary); border-radius:7px; cursor:pointer; font-size:13px; font-weight:600; }
.dt-sc-empty-btn:hover{ border-color:var(--accent); color:var(--accent); }
.dt-sc-empty-btn.primary{ background:var(--accent); color:#fff; border-color:var(--accent); }
.dt-sc-empty-btn.primary:hover{ filter:brightness(1.05); color:#fff; }
.dt-sc-empty-tip{ font-size:11.5px; color:var(--text-muted); line-height:1.7; max-width:480px; margin:0 auto; }

/* ===== 开关 toggle (admin/student-features) ===== */
.switch{ position:relative; display:inline-block; width:42px; height:22px; }
.switch input{ opacity:0; width:0; height:0; }
.slider{ position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#d9d9d9; border-radius:22px; transition:.2s; }
.slider:before{ content:""; position:absolute; height:18px; width:18px; left:2px; top:2px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider{ background:var(--accent); }
.switch input:checked + .slider:before{ transform:translateX(20px); }

/* ===== WebFloat SPU 查询内容（替代原 iframe） ===== */
.web-body{ flex:1; overflow-y:auto; background:#fafbfc; padding:14px 18px; }
.web-list-head{ font-size:13px; color:var(--text-secondary); padding:8px 12px; background:var(--bg-card); border-radius:6px; margin-bottom:10px; border:1px solid var(--border); }
.web-list{ display:flex; flex-direction:column; gap:6px; }
.web-list-item{ padding:10px 12px; background:var(--bg-card); border:1px solid var(--border); border-radius:6px; cursor:pointer; }
.web-list-item:hover{ background:var(--bg-elevated); border-color:var(--accent); }
.web-list-name{ font-size:14px; font-weight:600; color:var(--text-primary); display:flex; justify-content:space-between; align-items:center; }
.web-list-code{ font-size:11px; color:var(--text-muted); font-weight:400; background:var(--bg-input); padding:1px 6px; border-radius:4px; }
.web-list-meta{ font-size:12px; color:var(--text-secondary); margin-top:3px; }
.web-spu-title{ font-size:18px; font-weight:700; color:var(--text-primary); display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.web-spu-code{ font-size:12px; color:var(--text-muted); background:var(--bg-input); padding:2px 8px; border-radius:6px; font-weight:400; }
.web-spu-img{ text-align:center; margin-bottom:14px; }
.web-spu-img img{ max-width:100%; max-height:240px; border-radius:6px; }
.web-spu-tbl{ width:100%; border-collapse:collapse; margin-bottom:12px; background:var(--bg-card); border-radius:6px; overflow:hidden; }
.web-spu-tbl .k{ padding:6px 10px; background:var(--bg-input); color:var(--text-secondary); font-weight:500; width:30%; border-bottom:1px solid var(--border); font-size:13px; }
.web-spu-tbl .v{ padding:6px 10px; color:var(--text-primary); border-bottom:1px solid var(--border); font-size:13px; }
.web-spu-sell{ padding:10px 12px; background:#fffbe6; border-left:3px solid #faad14; color:#ad6800; font-size:13px; border-radius:4px; line-height:1.6; }
.web-empty{ padding:30px; text-align:center; color:var(--text-muted); }
.web-link{ padding:2px 8px; border:1px solid var(--border); background:var(--bg-card); color:var(--accent); border-radius:4px; cursor:pointer; }

/* ===== 手表 SPU 详情块（订单面板 / 发送商品链接共用） ===== */
.spu-detail{ background:#fbfcfe; border:1px solid var(--border); border-radius:8px; padding:10px; margin-top:8px; }
.spu-dt-head{ display:flex; gap:12px; align-items:flex-start; }
.spu-dt-imgwrap{ width:84px; height:84px; flex:0 0 auto; border-radius:8px; overflow:hidden; background:#fff; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; }
.spu-dt-img{ max-width:100%; max-height:100%; object-fit:contain; }
.spu-dt-meta{ flex:1; min-width:0; }
.spu-dt-title{ font-size:15px; font-weight:700; color:var(--text-primary); }
.spu-dt-code{ font-size:12px; color:var(--text-muted); margin-top:2px; }
.spu-dt-grid{ display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; margin-top:10px; }
.spu-dt-row{ display:flex; justify-content:space-between; gap:8px; font-size:12px; border-bottom:1px dashed #eef0f3; padding:3px 0; }
.spu-dt-row .k{ color:var(--text-secondary); }
.spu-dt-row b{ color:var(--text-primary); font-weight:600; text-align:right; }
.order-watch-toggle{ cursor:pointer; color:var(--accent); font-size:12px; user-select:none; margin-top:6px; display:inline-block; }
.order-watch-detail{ display:none; }
.order-watch-detail.open{ display:block; }

/* ===== 聊天中发送的「模拟商品链接」卡片 ===== */
.msg.product{ justify-content:flex-end; }
.msg.product .msg-bubble{ background:transparent; border:none; padding:0; }
.prod-card{ width:260px; border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.prod-card .pc-img{ width:100%; height:130px; background:#f5f6f8; display:flex; align-items:center; justify-content:center; }
.prod-card .pc-img img{ max-width:100%; max-height:100%; object-fit:contain; }
.prod-card .pc-body{ padding:8px 10px; }
.prod-card .pc-title{ font-size:13px; font-weight:600; color:var(--text-primary); line-height:1.4; }
.prod-card .pc-code{ font-size:11px; color:var(--text-muted); margin-top:2px; }
.prod-card .pc-btn{ display:inline-block; margin-top:8px; padding:5px 12px; background:var(--accent); color:#fff; border-radius:6px; font-size:12px; text-decoration:none; }
.qn-msg.prod .bub{ background:transparent; border:none; padding:0; }
.qn-msg.prod .pc-img{ height:120px; }

/* ===== 账号状态（在线/挂起/离线） ===== */
.qn-status.online .qn-dot{ background:#52c41a; box-shadow:0 0 0 2px rgba(82,196,26,.18); }
.qn-status.suspended .qn-dot{ background:#faad14; box-shadow:0 0 0 2px rgba(250,173,20,.18); }
.qn-status.offline .qn-dot{ background:#c9cdd4; }
.qn-status-menu{ position:absolute; z-index:50; background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,.12); min-width:150px; overflow:hidden; }
.qn-status-menu div{ padding:8px 12px; cursor:pointer; font-size:13px; display:flex; align-items:center; gap:8px; }
.qn-status-menu div:hover{ background:#f0f7ff; }
.qn-status-menu .dot{ width:8px; height:8px; border-radius:50%; }
.qn-status-menu .on{ background:#52c41a; } .qn-status-menu .su{ background:#faad14; } .qn-status-menu .of{ background:#c9cdd4; }
.qn-offline-banner{ display:none; padding:8px 14px; background:#fff1f0; border-bottom:1px solid #ffccc7; color:#cf1322; font-size:12px; }
.qn-offline-banner.show{ display:block; }
.qn-buyer.locked{ opacity:.5; cursor:not-allowed; }

/* ===== 打字测速窗口 ===== */
.tt-modal{ width:720px; max-width:94vw; }
.tt-head{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.tt-head h3{ margin:0; font-size:16px; }
.tt-stats{ display:flex; gap:18px; margin:10px 0; flex-wrap:wrap; }
.tt-stat{ background:var(--bg-input); border-radius:8px; padding:8px 14px; text-align:center; min-width:90px; }
.tt-stat .v{ font-size:20px; font-weight:700; color:var(--accent); }
.tt-stat .l{ font-size:11px; color:var(--text-secondary); }
.tt-src{ background:#fbfbfc; border:1px solid var(--border); border-radius:8px; padding:12px 14px; font-size:15px; line-height:1.9; color:var(--text-primary); white-space:pre-wrap; margin-bottom:10px; }
.tt-src .done{ background:#b7eb8f; border-radius:3px; }
.tt-src .cur{ background:#ffd666; border-radius:3px; }
.tt-input{ width:100%; height:110px; padding:12px; border:1px solid var(--border); border-radius:8px; font-size:15px; line-height:1.7; resize:vertical; outline:none; }
.tt-input:focus{ border-color:var(--accent); }
.tt-actions{ display:flex; gap:10px; margin-top:12px; align-items:center; }

/* ===== 数据看板 ===== */
.dash-stats{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:4px; }
.dash-stat{ flex:1; min-width:120px; background:var(--bg-input); border-radius:10px; padding:14px; text-align:center; }
.dash-stat .n{ font-size:26px; font-weight:800; color:var(--accent); }
.dash-stat .l{ font-size:12px; color:var(--text-secondary); margin-top:2px; }
.heat-bar{ display:flex; align-items:center; gap:8px; margin:5px 0; font-size:12px; }
.heat-label{ width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-secondary); }
.heat-track{ flex:1; height:10px; background:#eef2f7; border-radius:6px; overflow:hidden; }
.heat-fill{ display:block; height:100%; background:linear-gradient(90deg,#60a5fa,#3b82f6); }
.heat-num{ width:30px; text-align:right; color:var(--text-secondary); }

/* ===== 学员分组 / 训练计划 ===== */
.grp-list{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:6px; }
.grp-item{ display:flex; align-items:center; gap:8px; background:var(--bg-input); border-radius:8px; padding:6px 10px; font-size:13px; }
.grp-item .grp-name{ font-weight:600; }
.grp-item .grp-meta{ color:var(--text-secondary); font-size:12px; }
.plan-list{ display:flex; flex-direction:column; gap:12px; margin-top:8px; }
.plan-card{ border:1px solid var(--border); border-radius:10px; padding:12px 14px; background:#fff; }
.plan-card.required{ border-color:#fca5a5; background:#fff7f7; }
.plan-card-head{ display:flex; align-items:center; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
.plan-progress{ height:8px; background:#eef2f7; border-radius:6px; overflow:hidden; }
.plan-bar{ display:block; height:100%; background:linear-gradient(90deg,#34d399,#10b981); }
.mt-items{ margin:0; padding-left:18px; }
.mt-items li{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:4px 0; font-size:13px; border-bottom:1px dashed #f0f1f3; }
.plan-item-preview{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.plan-items{ margin:6px 0 0; padding-left:18px; font-size:13px; color:var(--text-secondary); }
.tag{ display:inline-block; padding:1px 8px; border-radius:10px; font-size:11px; background:#eef2f7; color:var(--text-secondary); }
.tag-ok{ background:#dcfce7; color:#15803d; }
.tag-warn{ background:#fef3c7; color:#b45309; }
.tag-red{ background:#fee2e2; color:#b91c1c; }

/* ===== 我的任务（学员端）===== */
.page-head{ margin-bottom:14px; }
.page-head h2{ margin:0 0 4px; font-size:20px; }
.plan-card .muted{ font-size:12px; }
.tt-timer{ margin-left:auto; font-variant-numeric:tabular-nums; color:var(--text-secondary); font-size:13px; }

/* ===== 红线实时拦截弹窗 ===== */
.rl-modal{ max-width:520px; }
.rl-head{ font-size:16px; font-weight:700; color:#dc2626; margin-bottom:10px; }
.rl-body{ font-size:14px; line-height:1.7; }
.rl-item{ background:#fef2f2; border:1px solid #fecaca; border-radius:8px; padding:6px 10px; margin:6px 0; color:#b91c1c; }

/* ═══════════════════════════════════════════════════════════
   UI v2 · 视觉升级层（2026-08-07）
   说明：只做覆盖，不改上方任何原有规则。整段删除即可完整回滚。
   风格：有活力的靛蓝→青色品牌色 + 精致排版 + 克制动效
═══════════════════════════════════════════════════════════ */

:root {
  /* ---- 品牌色（活力靛蓝 → 青） ---- */
  --accent:        #4f46e5;
  --accent-light:  #6366f1;
  --accent-glow:   rgba(79, 70, 229, 0.28);
  --accent-green:  #10b981;

  --gradient-purple: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #22d3ee 100%);
  --gradient-brand:  linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --gradient-topbar: linear-gradient(115deg, #312e81 0%, #4338ca 42%, #0e7490 100%);

  /* ---- 底色与层次 ---- */
  --bg-primary:  #f4f6fb;
  --bg-card:     #ffffff;
  --bg-elevated: #f8fafc;
  --bg-input:    #f1f5f9;
  --bg-hover:    #eef2ff;

  --border:       rgba(79, 70, 229, 0.13);
  --border-hover: rgba(79, 70, 229, 0.34);
  --border-soft:  rgba(15, 42, 67, 0.07);

  --text-primary:   #111c33;
  --text-secondary: #4a5a73;
  --text-muted:     #8b9bb0;

  /* ---- 阴影：分层柔和 ---- */
  --shadow-xs: 0 1px 2px rgba(17, 28, 51, 0.05);
  --shadow-sm: 0 1px 3px rgba(17, 28, 51, 0.06), 0 1px 2px rgba(17, 28, 51, 0.04);
  --shadow-md: 0 4px 12px rgba(17, 28, 51, 0.07), 0 2px 4px rgba(17, 28, 51, 0.04);
  --shadow-lg: 0 12px 32px rgba(17, 28, 51, 0.10), 0 4px 8px rgba(17, 28, 51, 0.04);
  --shadow-brand: 0 6px 20px rgba(79, 70, 229, 0.22);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
}

html, body { font-size: 14px; -webkit-font-smoothing: antialiased; letter-spacing: 0.1px; }
body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(99, 102, 241, 0.10) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(34, 211, 238, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #f6f8fd 0%, #f2f5fa 100%);
  background-attachment: fixed;
}

/* ═══ 顶部导航 ═══ */
.topbar {
  background: var(--gradient-topbar);
  padding: 8px 26px;
  min-height: 60px;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 6px 24px rgba(17, 28, 51, 0.16);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #6366f1, #22d3ee, #10b981, #6366f1);
  background-size: 300% 100%;
  animation: v2Flow 14s linear infinite;
  opacity: .85;
}
@keyframes v2Flow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

.topbar .nav-tabs { gap: 4px; align-items: center; flex-wrap: wrap; }
.topbar .nav-tab {
  background: transparent;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  backdrop-filter: none;
  transition: background .18s, color .18s, transform .18s;
}
.topbar .nav-tab:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  transform: translateY(-1px);
}
.topbar .nav-tab.active {
  background: rgba(255,255,255,0.96);
  color: #4338ca;
  font-weight: 650;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

/* 下拉面板 */
.topbar .nav-dropdown-menu {
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 7px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: v2Drop .16s ease-out;
}
@keyframes v2Drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.topbar .nav-dropdown-item {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s, padding-left .15s;
}
.topbar .nav-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--accent);
  padding-left: 16px;
}

/* ═══ 主容器与页头 ═══ */
.app { max-width: none; padding: 20px 20px 48px; animation: v2Rise .3s ease-out; }
@keyframes v2Rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 20px; }
.page-head h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.2px;
  display: flex; align-items: center; gap: 10px;
}
.page-head h2::before {
  content: "";
  width: 4px; height: 20px; border-radius: 3px;
  background: var(--gradient-purple); flex: none;
}

/* ═══ 统计卡片 ═══ */
.stats-row { gap: 14px; margin-bottom: 22px; }
.stat-card {
  position: relative;
  padding: 18px 20px 17px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.2,.8,.3,1), box-shadow .2s, border-color .2s;
}
.stat-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-purple); opacity: .9;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}
.stat-card .num {
  font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}
.stat-card .label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }

/* ═══ 卡片 ═══ */
.main-grid { gap: 18px; }
.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
  font-size: 14.5px; font-weight: 650; letter-spacing: -0.1px;
  margin-bottom: 14px; padding-bottom: 11px;
  border-bottom: 1px solid var(--border-soft);
}
.card-title .icon {
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(34,211,238,.12));
  font-size: 14px; flex: none;
}

/* ═══ 按钮 ═══ */
.btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 550;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xs);
  transition: transform .15s, box-shadow .18s, filter .18s, background .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary,
.btn-success,
.btn-danger,
.btn-warn { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.14); }
.btn-primary { background: var(--gradient-purple); box-shadow: var(--shadow-brand); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--border-hover); }
.btn-ghost { box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .45; box-shadow: none; }

/* ═══ 表格 ═══ */
.admin-table { border-radius: var(--radius-sm); overflow: hidden; }
.admin-table th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  font-size: 12.5px; font-weight: 650; color: var(--text-secondary);
  letter-spacing: .2px; white-space: nowrap;
}
.admin-table tr:hover { background: var(--bg-hover); }
.admin-table td { font-variant-numeric: tabular-nums; }

/* ═══ 管理后台 Tab 面板 ═══ */
.adm-tabs {
  gap: 6px; padding: 6px; margin-bottom: 18px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 72px; z-index: 20;
}
.adm-tab {
  border: none; background: transparent; color: var(--text-secondary);
  font-size: 13px; font-weight: 550; padding: 9px 16px; border-radius: 10px;
  transition: background .16s, color .16s, box-shadow .16s;
}
.adm-tab:hover { background: var(--bg-hover); color: var(--accent); }
.adm-tab.on {
  background: var(--gradient-purple); color: #fff;
  box-shadow: var(--shadow-brand);
}
.adm-tab-n {
  display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  background: rgba(79,70,229,.10); color: var(--accent);
}
.adm-tab.on .adm-tab-n { background: rgba(255,255,255,.24); color: #fff; }
.adm-pane { animation: v2Rise .24s ease-out; }

/* ═══ 表单控件 ═══ */
.admin-input, .auth-field input, input[type="text"], input[type="password"], select, textarea {
  border-radius: 10px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.admin-input:focus, .auth-field input:focus,
input[type="text"]:focus, input[type="password"]:focus,
select:focus, textarea:focus {
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

/* ═══ 难度选项 / 徽章 ═══ */
.difficulty-item { border-radius: var(--radius-sm); transition: transform .16s, box-shadow .16s, background .16s; }
.difficulty-item:hover { transform: translateX(2px); }
.difficulty-item.active { box-shadow: 0 0 0 2px var(--accent-light) inset, var(--shadow-sm); }
.badge { border-radius: 20px; font-weight: 600; letter-spacing: .2px; }

.auth-title { letter-spacing: -0.3px; }
/* 激活页签保持白字（勿覆盖为 accent 色，否则蓝底蓝字看不清） */
.auth-tab.active { color: #fff; }

/* ═══ 聊天区 ═══ */
.chat-box { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.chat-header { border-bottom: 1px solid var(--border-soft); }
.chat-input input:focus { box-shadow: 0 0 0 3px rgba(99,102,241,.14); }

/* ═══ 滚动条 / 选中 ═══ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.20);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(79, 70, 229, 0.38); background-clip: content-box; }
::selection { background: rgba(99, 102, 241, 0.22); }

/* ═══ 窄屏适配 ═══ */
@media (max-width: 1280px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .main-grid { grid-template-columns: 250px 1fr; }
}
@media (max-width: 980px) {
  .topbar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .app { padding: 18px 14px 40px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .main-grid { grid-template-columns: 1fr; }
  .adm-tabs { position: static; overflow-x: auto; flex-wrap: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, .app, .adm-pane, .topbar::after { animation: none !important; transition: none !important; }
}

/* ═══ 训练舱首页重设计（2026-08-07） ═══ */
.train-grid { align-items: start; }

/* 统计卡 */
.stat-card { display: flex; align-items: center; gap: 12px; text-align: left; }
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}
.stat-card .stat-num { font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 设置折叠分组 */
.tp-group { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.tp-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; cursor: pointer; user-select: none;
  background: var(--bg-elevated);
  transition: background .15s;
}
.tp-head:hover { background: var(--bg-hover); }
.tp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tp-title { flex: 1; font-size: 13px; font-weight: 650; color: var(--text-primary); }
.tp-arrow { font-size: 12px; color: var(--text-muted); transition: transform .2s; }
.tp-group.open .tp-arrow { transform: rotate(0deg); }
.tp-body { padding: 14px 13px; background: var(--bg-card); }

/* 工作台 v2 */
.train-center { position: sticky; top: 74px; }
.workspace.v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
  padding: 32px 28px 26px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 320px at 80% -20%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(420px 260px at -10% 100%, rgba(34,211,238,0.10) 0%, transparent 55%),
    var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
}
.workspace.v2::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gradient-brand);
}
.workspace-hero { margin-bottom: 18px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.workspace.v2 .workspace-icon {
  width: 90px; height: 90px; border-radius: 50%;
  margin: 0 auto 16px;
  font-size: 44px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(34,211,238,0.14));
  box-shadow: 0 10px 30px rgba(79,70,229,0.18), inset 0 0 0 1px rgba(255,255,255,0.4);
  animation: v2Float 5s ease-in-out infinite;
}
@keyframes v2Float { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-5px);} }
.workspace.v2 h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.workspace.v2 p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.workspace.v2 .scene-tag {
  display: inline-block;
  padding: 8px 14px; border-radius: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 18px;
}
.workspace-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.workspace.v2 .workspace-hint { margin-top: auto; }
.btn-xl { padding: 15px 26px; font-size: 15px; border-radius: 12px; font-weight: 650; }
.workspace.v2 .btn-primary { box-shadow: 0 8px 22px rgba(79,70,229,0.28); }
.workspace-hint {
  padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(52,211,153,0.06));
  border: 1px solid rgba(16,185,129,0.18);
  color: var(--text-secondary); font-size: 12px; text-align: left;
  margin-bottom: 16px;
}
.workspace-tip {
  text-align: left;
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px dashed var(--border-soft);
}
.tip-title { font-size: 12px; font-weight: 650; color: var(--accent); margin-bottom: 5px; }
.tip-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* 服务类型 */
.service-types { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.service-type {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 20px;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all .15s;
}
.service-type:hover { border-color: var(--accent-light); color: var(--accent); }
.service-type.active { background: var(--gradient-purple); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }

/* 评分维度 */
.score-card .card-title { margin-bottom: 16px; }
.score-radar { margin-bottom: 16px; }
.score-bar-item { margin-bottom: 14px; }
.score-bar-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.score-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.score-name { flex: 1; font-size: 12.5px; font-weight: 650; color: var(--text-primary); }
.score-weight { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.score-bar-track { height: 6px; border-radius: 4px; background: var(--bg-input); overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.score-desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.grade-strip { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.grade-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 10px; border-radius: 10px; min-width: 46px;
}
.grade-pill .grade-label { font-size: 14px; font-weight: 700; }
.grade-pill .grade-range { font-size: 10px; opacity: .85; }

/* 快捷开始 */
.quick-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  cursor: pointer; transition: all .15s;
}
.quick-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.quick-item .icon { font-size: 20px; }
.quick-item .name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }

/* 训练设置卡片紧凑化 */
.train-settings .form-group { margin-bottom: 14px; }
.train-settings .form-group:last-child { margin-bottom: 0; }

/* 难度方案按钮 */
.diff-mode-row { display: flex; gap: 8px; }
.diff-mode {
  flex: 1; text-align: center; padding: 8px 0;
  border: 1.5px solid var(--border-soft); border-radius: 10px;
  background: var(--bg-card); font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: all .15s;
}
.diff-mode:hover { border-color: var(--accent-light); color: var(--accent); }
.diff-mode.on { background: var(--gradient-purple); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }

@media (max-width: 1280px) {
  .train-grid { grid-template-columns: 260px 1fr; }
  .train-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .train-center { position: static; }
}
@media (max-width: 980px) {
  .train-grid { grid-template-columns: 1fr; }
  .train-right { grid-column: auto; display: block; }
  .workspace-actions .btn-xl { width: 100%; }
  .stat-card { flex: 1 1 45%; }
}

/* ═══════════ UI v2 视觉升级层 结束 ═══════════ */

/* ═══════════════════════════════════════════════════════════
   主题配色系统（2026-08-07）
   用法：<html data-theme="indigo|ocean|sunset|forest|violet|graphite">
   切换由 Theme 对象控制，选择存 localStorage.ct_theme
   整段删除即可回滚到单一靛蓝配色
═══════════════════════════════════════════════════════════ */

/* ── ① 靛蓝青 indigo（默认） ── */
html[data-theme="indigo"] {
  --accent:        #4f46e5;
  --accent-light:  #6366f1;
  --accent-glow:   rgba(79, 70, 229, 0.28);
  --gradient-purple: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #22d3ee 100%);
  --gradient-brand:  linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --gradient-topbar: linear-gradient(115deg, #312e81 0%, #4338ca 42%, #0e7490 100%);
  --border:       rgba(79, 70, 229, 0.13);
  --border-hover: rgba(79, 70, 229, 0.34);
  --bg-hover:     #eef2ff;
  --shadow-brand: 0 6px 20px rgba(79, 70, 229, 0.22);
  --theme-c1: #6366f1; --theme-c2: #22d3ee;
  --topbar-flow: linear-gradient(90deg, #6366f1, #22d3ee, #10b981, #6366f1);
}
html[data-theme="indigo"] body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(99, 102, 241, 0.10) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(34, 211, 238, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #f6f8fd 0%, #f2f5fa 100%);
  background-attachment: fixed;
}
html[data-theme="indigo"] .lg-s1 { stop-color: #818cf8; }
html[data-theme="indigo"] .lg-s2 { stop-color: #6366f1; }
html[data-theme="indigo"] .lg-s3 { stop-color: #22d3ee; }

/* ── ② 商务墨蓝 ocean ── */
html[data-theme="ocean"] {
  --accent:        #0369a1;
  --accent-light:  #0284c7;
  --accent-glow:   rgba(3, 105, 161, 0.28);
  --gradient-purple: linear-gradient(135deg, #0369a1 0%, #0284c7 45%, #06b6d4 100%);
  --gradient-brand:  linear-gradient(135deg, #075985 0%, #0369a1 50%, #0891b2 100%);
  --gradient-topbar: linear-gradient(115deg, #0c4a6e 0%, #075985 45%, #0e7490 100%);
  --border:       rgba(3, 105, 161, 0.13);
  --border-hover: rgba(3, 105, 161, 0.34);
  --bg-hover:     #e0f2fe;
  --shadow-brand: 0 6px 20px rgba(3, 105, 161, 0.22);
  --theme-c1: #0284c7; --theme-c2: #06b6d4;
  --topbar-flow: linear-gradient(90deg, #0ea5e9, #06b6d4, #14b8a6, #0ea5e9);
}
html[data-theme="ocean"] body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(14, 165, 233, 0.10) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(6, 182, 212, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #f4f9fd 0%, #eff6fb 100%);
  background-attachment: fixed;
}
html[data-theme="ocean"] .lg-s1 { stop-color: #38bdf8; }
html[data-theme="ocean"] .lg-s2 { stop-color: #0284c7; }
html[data-theme="ocean"] .lg-s3 { stop-color: #06b6d4; }

/* ── ③ 活力橙 sunset ── */
html[data-theme="sunset"] {
  --accent:        #ea580c;
  --accent-light:  #f97316;
  --accent-glow:   rgba(234, 88, 12, 0.28);
  --gradient-purple: linear-gradient(135deg, #ea580c 0%, #f97316 45%, #fb7185 100%);
  --gradient-brand:  linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #f43f5e 100%);
  --gradient-topbar: linear-gradient(115deg, #7c2d12 0%, #c2410c 45%, #be123c 100%);
  --border:       rgba(234, 88, 12, 0.13);
  --border-hover: rgba(234, 88, 12, 0.34);
  --bg-hover:     #fff1e7;
  --shadow-brand: 0 6px 20px rgba(234, 88, 12, 0.22);
  --theme-c1: #f97316; --theme-c2: #fb7185;
  --topbar-flow: linear-gradient(90deg, #fb923c, #fb7185, #fbbf24, #fb923c);
}
html[data-theme="sunset"] body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(249, 115, 22, 0.10) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(251, 113, 133, 0.09) 0%, transparent 60%),
    linear-gradient(180deg, #fdf8f4 0%, #faf5f1 100%);
  background-attachment: fixed;
}
html[data-theme="sunset"] .lg-s1 { stop-color: #fdba74; }
html[data-theme="sunset"] .lg-s2 { stop-color: #f97316; }
html[data-theme="sunset"] .lg-s3 { stop-color: #fb7185; }

/* ── ④ 森林绿 forest ── */
html[data-theme="forest"] {
  --accent:        #059669;
  --accent-light:  #10b981;
  --accent-glow:   rgba(5, 150, 105, 0.28);
  --gradient-purple: linear-gradient(135deg, #059669 0%, #10b981 45%, #22d3ee 100%);
  --gradient-brand:  linear-gradient(135deg, #047857 0%, #059669 50%, #0d9488 100%);
  --gradient-topbar: linear-gradient(115deg, #064e3b 0%, #047857 45%, #0f766e 100%);
  --border:       rgba(5, 150, 105, 0.13);
  --border-hover: rgba(5, 150, 105, 0.34);
  --bg-hover:     #e6f7f0;
  --shadow-brand: 0 6px 20px rgba(5, 150, 105, 0.22);
  --theme-c1: #10b981; --theme-c2: #14b8a6;
  --topbar-flow: linear-gradient(90deg, #34d399, #14b8a6, #a3e635, #34d399);
}
html[data-theme="forest"] body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(16, 185, 129, 0.10) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(20, 184, 166, 0.09) 0%, transparent 60%),
    linear-gradient(180deg, #f4faf7 0%, #f0f7f4 100%);
  background-attachment: fixed;
}
html[data-theme="forest"] .lg-s1 { stop-color: #6ee7b7; }
html[data-theme="forest"] .lg-s2 { stop-color: #10b981; }
html[data-theme="forest"] .lg-s3 { stop-color: #14b8a6; }

/* ── ⑤ 紫罗兰 violet ── */
html[data-theme="violet"] {
  --accent:        #7c3aed;
  --accent-light:  #8b5cf6;
  --accent-glow:   rgba(124, 58, 237, 0.28);
  --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 45%, #d946ef 100%);
  --gradient-brand:  linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #c026d3 100%);
  --gradient-topbar: linear-gradient(115deg, #4c1d95 0%, #6d28d9 45%, #a21caf 100%);
  --border:       rgba(124, 58, 237, 0.13);
  --border-hover: rgba(124, 58, 237, 0.34);
  --bg-hover:     #f4ecfe;
  --shadow-brand: 0 6px 20px rgba(124, 58, 237, 0.22);
  --theme-c1: #8b5cf6; --theme-c2: #d946ef;
  --topbar-flow: linear-gradient(90deg, #a78bfa, #d946ef, #f472b6, #a78bfa);
}
html[data-theme="violet"] body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(139, 92, 246, 0.10) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(217, 70, 239, 0.09) 0%, transparent 60%),
    linear-gradient(180deg, #f9f6fd 0%, #f6f2fb 100%);
  background-attachment: fixed;
}
html[data-theme="violet"] .lg-s1 { stop-color: #c4b5fd; }
html[data-theme="violet"] .lg-s2 { stop-color: #8b5cf6; }
html[data-theme="violet"] .lg-s3 { stop-color: #d946ef; }

/* ── ⑥ 石墨灰 graphite（极简克制） ── */
html[data-theme="graphite"] {
  --accent:        #475569;
  --accent-light:  #64748b;
  --accent-glow:   rgba(71, 85, 105, 0.26);
  --gradient-purple: linear-gradient(135deg, #334155 0%, #475569 45%, #64748b 100%);
  --gradient-brand:  linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  --gradient-topbar: linear-gradient(115deg, #0f172a 0%, #1e293b 45%, #334155 100%);
  --border:       rgba(71, 85, 105, 0.14);
  --border-hover: rgba(71, 85, 105, 0.34);
  --bg-hover:     #eef1f5;
  --shadow-brand: 0 6px 20px rgba(71, 85, 105, 0.20);
  --theme-c1: #64748b; --theme-c2: #94a3b8;
  --topbar-flow: linear-gradient(90deg, #64748b, #94a3b8, #cbd5e1, #64748b);
}
html[data-theme="graphite"] body {
  background:
    radial-gradient(900px 520px at 8% -8%,  rgba(100, 116, 139, 0.08) 0%, transparent 62%),
    radial-gradient(760px 460px at 96% 4%,  rgba(148, 163, 184, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #f7f8fa 0%, #f3f5f8 100%);
  background-attachment: fixed;
}
html[data-theme="graphite"] .lg-s1 { stop-color: #94a3b8; }
html[data-theme="graphite"] .lg-s2 { stop-color: #475569; }
html[data-theme="graphite"] .lg-s3 { stop-color: #334155; }

/* 顶栏流光跟随主题 */
.topbar::after { background: var(--topbar-flow, linear-gradient(90deg, #6366f1, #22d3ee, #10b981, #6366f1)); background-size: 300% 100%; }

/* ── 主题切换器 UI ── */
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 修复：顶栏用户名原本继承深色文字（--text-primary），压在深色顶栏上看不清 */
.topbar .user-box { margin-left: 0; color: rgba(255,255,255,0.72); }
.topbar .user-box .ub-name { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.20); }
.topbar .user-box .btn {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff; box-shadow: none;
}
.topbar .user-box .btn:hover { background: rgba(255,255,255,0.24); color: #fff; }

.theme-wrap { position: relative; }
.theme-btn {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid #e0e6ef;
  background: #f1f5f9;
  color: #4a6b88; font-size: 16px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .16s, transform .16s;
}
.theme-btn:hover { background: #e8f0fe; transform: translateY(-1px) rotate(-8deg); }
.theme-panel {
  display: none;
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 250px; padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft, rgba(15,42,67,.07));
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(17, 28, 51, 0.16);
  z-index: 1200;
  animation: v2Drop .16s ease-out;
}
.theme-wrap.open .theme-panel { display: block; }
.theme-panel-hd {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  letter-spacing: .4px; margin-bottom: 10px; text-transform: uppercase;
}
.theme-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px; border-radius: 10px;
  border: 1.5px solid var(--border-soft, rgba(15,42,67,.07));
  background: var(--bg-card);
  cursor: pointer; transition: all .15s;
}
.theme-item:hover { border-color: var(--accent-light); transform: translateY(-1px); }
.theme-item.on { border-color: var(--accent); background: var(--bg-hover); }
.theme-swatch {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.16), inset 0 0 0 1px rgba(255,255,255,0.35);
}
.theme-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.theme-item.on .theme-name { color: var(--accent); }

/* ═══ 弱项专项练（训练实战错题本）═══ */
.wd-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px;}
.wd-chip{font-size:12px;padding:5px 10px;border-radius:14px;background:var(--accent);color:#fff;cursor:pointer;white-space:nowrap;box-shadow:0 1px 4px rgba(22,119,255,.18);}
.wd-chip:hover{filter:brightness(1.06);}
.wd-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid var(--border-soft,#eef0f3);border-radius:8px;margin-bottom:8px;background:var(--bg-card);}
.wd-dim{display:flex;align-items:center;gap:10px;}
.wd-badge{font-size:12px;font-weight:700;padding:2px 10px;border-radius:12px;background:#fff1f0;color:#cf1322;border:1px solid #ffccc7;}
.wd-row .muted{font-size:12px;}
.theme-panel-ft {
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid var(--border-soft, rgba(15,42,67,.07));
  font-size: 11px; color: var(--text-muted); line-height: 1.5;
}

@media (max-width: 980px) {
  .theme-panel { right: auto; left: 0; }
}
/* ═══════════ 主题配色系统 结束 ═══════════ */

/* ═══ 全真模拟工作台 · 操作规范校验（2026-08-07） ═══ */
.qn-op-status {
  margin: 8px 2px 2px; padding: 7px 10px; border-radius: 8px;
  font-size: 11.5px; line-height: 1.4; font-weight: 600;
  background: #fff7ed; color: #c2410c; border: 1px dashed #fdba74;
  transition: all .2s;
}
.qn-op-status.ok { background: #ecfdf5; color: #047857; border-color: #6ee7b7; border-style: solid; }
.qn-op-status.bad { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; border-style: solid; }
/* 操作按钮即时反馈（绿=规范 / 红=违规） */
.qn-ord-actions .btn-qn.op-ok { background: #10b981 !important; color: #fff !important; box-shadow: 0 0 0 2px rgba(16,185,129,.35); }
.qn-ord-actions .btn-qn.op-bad { background: #ef4444 !important; color: #fff !important; box-shadow: 0 0 0 2px rgba(239,68,68,.4); animation: opShake .4s; }
@keyframes opShake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-3px);} 75%{transform:translateX(3px);} }

/* ═══ 认证审批徽章 / 通知中心 / 即时消息（2026-08-07h） ═══ */
.tag-green { background: #dcfce7; color: #15803d; }
.notif-dot {
  display: inline-block; min-width: 16px; height: 16px; padding: 0 4px;
  background: #ef4444; color: #fff; border-radius: 9px; font-size: 11px;
  line-height: 16px; text-align: center; vertical-align: middle; margin-left: 3px;
}
.topbar-icon {
  position: relative; background: var(--bg-input, #f2f3f5); border: 1px solid var(--border, #e5e6eb);
  border-radius: 8px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; margin-left: 8px;
}
/* 深色顶栏：图标按钮半透明白，与品牌色协调 */
.topbar .topbar-icon {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.24);
}
.topbar .topbar-icon:hover { background: rgba(255,255,255,.26); }
.topbar-icon .notif-dot { position: absolute; top: -6px; right: -6px; margin: 0; }
.notif-item { padding: 10px 12px; border-bottom: 1px solid var(--border, #eef0f3); cursor: pointer; border-radius: 8px; }
.notif-item:hover { background: #f7f8fa; }
.notif-item.unread { background: #f0f6ff; }
.notif-title { font-weight: 600; font-size: 13px; }
.notif-body { font-size: 12px; color: var(--text-secondary, #4e5969); margin: 3px 0; }
.notif-time { font-size: 11px; color: #86909c; }

.chat-wrap { display: flex; height: 70vh; min-height: 420px; }
.chat-convs { width: 230px; border-right: 1px solid var(--border, #eef0f3); overflow: auto; padding: 8px; }
.chat-conv { padding: 10px; border-radius: 8px; cursor: pointer; }
.chat-conv:hover { background: #f7f8fa; }
.chat-conv.active { background: #eef4ff; }
.chat-conv-name { font-weight: 600; font-size: 13px; }
.chat-conv-last { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-thread-head { padding: 10px 12px; border-bottom: 1px solid var(--border, #eef0f3); font-weight: 600; }
.chat-msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f7f8fa; }
.chat-msg { display: flex; flex-direction: column; max-width: 76%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.chat-msg.mine .chat-bubble { background: var(--accent, #165dff); color: #fff; }
.chat-msg.theirs .chat-bubble { background: #fff; border: 1px solid var(--border, #e5e6eb); }
.chat-pic { max-width: 180px; max-height: 160px; border-radius: 8px; margin-bottom: 4px; }
.chat-time { font-size: 10px; color: #86909c; margin-top: 2px; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border, #eef0f3); }
.chat-input .admin-input { flex: 1; }

/* ===== 千牛表情包 & 标准话术库（新人大礼包） ===== */
.chat-emoji { display: inline-block; width: 22px; height: 22px; vertical-align: middle; margin: 0 1px; border-radius: 4px; object-fit: contain; }
.qn-msg .chat-emoji, .msg .chat-emoji { width: 20px; height: 20px; }
.emo-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.emo-modal { width: 460px; max-width: 92vw; max-height: 72vh; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.2); display: flex; flex-direction: column; overflow: hidden; }
.emo-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #eef0f3; font-weight: 600; }
.emo-close { cursor: pointer; font-size: 20px; line-height: 1; color: #86909c; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 12px; overflow: auto; }
.emo-item { width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 6px; cursor: pointer; background: #f7f8fa; padding: 3px; }
.emo-item:hover { background: #e8f0ff; transform: scale(1.06); }
.emo-foot { padding: 8px 14px; font-size: 12px; color: #86909c; border-top: 1px solid #eef0f3; }
.pb-wrap { display: flex; flex-direction: column; gap: 16px; }
.pb-section { background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px; padding: 12px; }
.pb-sec-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: #1d2129; }
.pb-cat { margin-bottom: 14px; }
.pb-cat-head { font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #165dff; }
.pb-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-item { background: #fff; border: 1px solid #e5e6eb; border-radius: 8px; padding: 6px 10px; font-size: 12px; line-height: 1.4; cursor: pointer; max-width: 100%; word-break: break-word; }
.pb-item:hover { border-color: #165dff; background: #f0f6ff; }
.pb-forb { background: #fff1f0; border: 1px solid #ffccc7; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-bottom: 6px; }
.pb-forb b { color: #cf1322; }

/* 账号角色徽章（人员与权限 / 学员账号列表） */
.role-badge { display: inline-block; padding: 2px 10px; border-radius: 11px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.rb-manager { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.rb-hr { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.rb-student { background: #f2f3f5; color: #6b7280; border: 1px solid #e5e7eb; }
.rb-icon { margin-right: 3px; font-size: 11px; }

/* 账号列表操作按钮组 */
.action-group { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.action-group .btn { padding: 3px 9px; font-size: 12px; }
.btn-manager { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.btn-manager:hover { background: #4338ca; color: #fff; }
.btn-hr { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.btn-hr:hover { background: #0e7490; color: #fff; }
.btn-student { background: #f2f3f5; color: #374151; border: 1px solid #e5e7eb; }
.btn-student:hover { background: #e5e7eb; }
.emp-id { background: #f5f5f7; padding: 1px 6px; border-radius: 5px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #4b5563; }

/* ===== 知识库分层（P2）===== */
.kbl-wrap { display: flex; gap: 16px; align-items: flex-start; }
.kbl-side { width: 280px; flex: 0 0 280px; position: sticky; top: 16px; }
.kbl-tree { background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.kbl-node { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.kbl-node:hover { background: #f5f7ff; }
.kbl-node.on { background: linear-gradient(135deg, #eef2ff, #ecfeff); box-shadow: inset 0 0 0 1px #c7d2fe; }
.kbl-node-ic { font-size: 20px; width: 30px; text-align: center; }
.kbl-node-nm { font-weight: 600; font-size: 14px; color: #1f2937; }
.kbl-node-ds { font-size: 11px; color: #6b7280; margin-top: 2px; }
.kbl-content { flex: 1 1 auto; min-width: 0; }
.kbl-head { margin-bottom: 14px; }
.kbl-head-t { font-size: 20px; font-weight: 700; color: #111827; }
.kbl-head-s { font-size: 13px; color: #6b7280; margin-top: 4px; }
.kbl-search { margin-bottom: 14px; }
.kbl-search .input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border, #e5e7eb); }
.kbl-articles { display: flex; flex-direction: column; gap: 16px; }
.kbl-sec { background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 16px; }
.kbl-sec-h { font-size: 16px; font-weight: 700; color: #1f2937; }
.kbl-sec-ds { font-size: 12px; color: #6b7280; margin: 4px 0 12px; }
.kbl-article { background: #fafbff; border: 1px solid #eef0f6; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.kbl-article:last-child { margin-bottom: 0; }
.kbl-article-t { font-weight: 600; font-size: 14px; color: #111827; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kbl-article-b p { margin: 0 0 6px; font-size: 13px; line-height: 1.7; color: #374151; white-space: pre-wrap; }
.kbl-tag { background: #eef2ff; color: #4338ca; border-radius: 6px; padding: 1px 8px; font-size: 11px; font-weight: 500; }
.kbl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 4px; }
.kbl-card { background: #fff; border: 1px solid #eef0f6; border-radius: 10px; padding: 12px 14px; cursor: default; transition: box-shadow .15s, transform .1s; }
.kbl-phrase { cursor: pointer; }
.kbl-phrase:hover { box-shadow: 0 4px 14px rgba(79,70,229,.15); transform: translateY(-1px); }
.kbl-card-t { font-size: 13px; font-weight: 600; color: #111827; }
.kbl-card-s { font-size: 12px; color: #6b7280; margin-top: 4px; }
.kbl-card-m { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.kbl-card-copy { font-size: 11px; color: #4f46e5; margin-top: 8px; font-weight: 600; }
.kbl-case-chat { background: #f8fafc; border-radius: 8px; padding: 10px; margin: 8px 0; font-size: 13px; }
.kbl-chat-row { padding: 3px 0; color: #374151; }
.kbl-chat-row.ag b { color: #0e7490; }
.kbl-chat-row.cu b { color: #b45309; }
.kbl-case-std { font-size: 13px; color: #374151; line-height: 1.7; }
.kbl-case-kp { font-size: 13px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 760px) { .kbl-wrap { flex-direction: column; } .kbl-side { width: 100%; flex: none; position: static; } }


/* ===== 顾客生动画像标识（v20260807r 新增）===== */
.persona-chip{
  display:inline-flex;align-items:center;gap:4px;
  font-size:11px;line-height:1;padding:3px 8px;border-radius:999px;
  background:linear-gradient(135deg,#fff7ed,#ffedd5);
  color:#b45309;border:1px solid #fed7aa;font-weight:600;
  max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.persona-chip .pc-emoji{font-size:12px;}
.qn-mood + .persona-chip{margin-left:8px;}

/* ===== 多会话并发接待 Tab（v20260807v 新增）===== */
.conv-tabs{ display:flex; gap:6px; padding:8px 10px; overflow-x:auto; background:var(--bg-elevated,#f5f6f8); border-bottom:1px solid var(--border,#e5e6eb); }
.conv-tab{ flex:0 0 auto; display:flex; align-items:center; gap:4px; padding:5px 10px; border-radius:999px; background:#fff; border:1px solid var(--border,#e5e6eb); cursor:pointer; font-size:12px; color:var(--text-secondary,#475467); position:relative; max-width:170px; }
.conv-tab .ct-name{ font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-tab .ct-tag{ font-size:10px; color:var(--text-muted,#86909c); }
.conv-tab.active{ background:linear-gradient(135deg,#165dff,#4080ff); color:#fff; border-color:transparent; }
.conv-tab.active .ct-tag{ color:rgba(255,255,255,.85); }
.conv-tab .ct-badge{ position:absolute; top:-5px; right:-5px; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:#f53f3f; color:#fff; font-size:10px; line-height:16px; text-align:center; }
/* 新用户进线提示横幅 */
.incoming-banner{ position:fixed; top:16px; left:50%; transform:translateX(-50%); z-index:9999; display:flex; align-items:center; gap:10px; padding:10px 14px; background:#fff; border:1px solid #fed7aa; box-shadow:0 8px 24px rgba(0,0,0,.16); border-radius:12px; max-width:92vw; }
.incoming-banner .ib-ico{ font-size:20px; }
.incoming-banner .ib-txt{ font-size:13px; color:#1f2937; }
.incoming-banner .ib-go{ margin-left:6px; padding:5px 12px; border:none; border-radius:8px; background:linear-gradient(135deg,#165dff,#4080ff); color:#fff; cursor:pointer; font-size:12px; font-weight:600; }
.incoming-banner .ib-x{ margin-left:2px; border:none; background:transparent; font-size:16px; color:#86909c; cursor:pointer; }

/* 会话栏 + 加顾客按钮 */
.conv-bar{ display:flex; align-items:center; gap:8px; padding:6px 10px; background:var(--bg-elevated,#f5f6f8); border-bottom:1px solid var(--border,#e5e6eb); }
.conv-bar .conv-tabs{ flex:1 1 auto; border-bottom:none; padding:0; background:transparent; }
.conv-add{ flex:0 0 auto; padding:5px 12px; border:none; border-radius:8px; background:linear-gradient(135deg,#165dff,#4080ff); color:#fff; cursor:pointer; font-size:12px; font-weight:600; white-space:nowrap; }
.conv-add:hover{ filter:brightness(1.06); }
.tk-grp-cell{ white-space:nowrap; }
.tk-grp-sel{ margin-left:6px; padding:2px 4px; font-size:12px; border:1px solid var(--border,#e5e6eb); border-radius:6px; background:#fff; max-width:110px; cursor:pointer; }
.tk-grp-sel:focus{ outline:2px solid rgba(22,93,255,.25); }

/* 话术库运营：分组筛选 Tab + 分组徽章 */
.tk-grp-tabs{ display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.tk-grp-tab{ padding:5px 14px; border-radius:16px; font-size:13px; cursor:pointer; background:var(--bg-elevated,#f2f3f5); color:var(--text-secondary,#4e5969); border:1px solid transparent; user-select:none; }
.tk-grp-tab.on{ background:linear-gradient(135deg,#165dff,#4080ff); color:#fff; font-weight:600; }
.tk-grp-badge{ display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; font-weight:600; line-height:18px; }
.tk-grp-badge.grp-gen{ background:#eef2ff; color:#3a5bdc; }
.tk-grp-badge.grp-watch{ background:#e6f4ff; color:#0b6fc7; }
.tk-grp-badge.grp-bed{ background:#fff3e8; color:#c4621a; }

/* 学员侧话术库：分组筛选 Tab */
.kb-talk-tabs{ display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.kb-talk-tab{ padding:4px 12px; border-radius:14px; font-size:12px; cursor:pointer; background:var(--bg-elevated,#f2f3f5); color:var(--text-secondary,#4e5969); border:1px solid var(--border,#e5e6eb); user-select:none; }
.kb-talk-tab.on{ background:linear-gradient(135deg,#165dff,#4080ff); color:#fff; font-weight:600; border-color:transparent; }

/* ===== 项目分组（专项训练）===== */
.pg-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; padding:4px 2px; }
.pg-card{ border:1px solid var(--border,#e5e6eb); border-radius:12px; padding:14px; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.pg-card-top{ display:flex; flex-direction:column; gap:4px; }
.pg-card-name{ font-size:15px; font-weight:700; color:var(--text-primary,#1d2129); }
.pg-supervisor{ font-size:12px; color:var(--text-secondary,#4e5969); }
.pg-cats{ margin-top:8px; font-size:13px; color:var(--text-primary,#1d2129); line-height:1.5; }
.pg-meta{ margin-top:6px; font-size:12px; color:var(--text-secondary,#4e5969); }
.pg-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px dashed var(--border,#e5e6eb); }
.pg-row:last-child{ border-bottom:none; }
.pg-row-main{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.pg-row-actions{ display:flex; gap:6px; flex-shrink:0; }
.pg-cat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; max-height:220px; overflow:auto; padding:8px; background:var(--bg-elevated,#f7f8fa); border-radius:8px; }
.pg-cat-chip{ display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-primary,#1d2129); cursor:pointer; user-select:none; }
.pg-cat-chip input{ accent-color:#165dff; }

/* ===== AI 生成中心（场景 / 测试题）===== */
.ai-gen-tabs{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.ai-gen-tab{ border:1px solid var(--border,#e5e6eb); background:var(--bg-elevated,#f7f8fa); color:var(--text-secondary,#4e5969); padding:8px 14px; border-radius:20px; font-size:13px; cursor:pointer; transition:.15s; }
.ai-gen-tab.on{ background:linear-gradient(135deg,#4f46e5,#7c3aed); color:#fff; border-color:transparent; box-shadow:0 2px 8px rgba(79,70,229,.25); }
.ai-gen-form{ display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; margin-bottom:12px; }
.ai-gen-form label{ display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--text-secondary,#4e5969); }
.ai-gen-out{ font-size:13px; line-height:1.7; }
.ai-gen-out.ai-err{ color:#e54545; background:#fff1f0; border:1px solid #ffccc7; padding:10px 12px; border-radius:8px; }
.ai-gen-sum{ font-size:13px; margin-bottom:10px; }
.ai-gen-list{ display:flex; flex-direction:column; gap:8px; margin:6px 0 12px; max-height:360px; overflow:auto; }
.ai-gen-item{ border:1px solid var(--border,#e5e6eb); border-radius:8px; padding:8px 10px; background:var(--bg-elevated,#f7f8fa); }
.agi-t{ font-size:13px; font-weight:600; color:var(--text-primary,#1d2129); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.agi-d{ font-size:12px; margin-top:3px; }
.ai-gen-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }

/* ============================================================
   侧栏布局（v2 顶部导航 → 左侧导航）
   ============================================================ */
body.sidebar-layout { display: block; }
/* 顶部条：瘦身，只放 logo + 右侧工具 */
.topbar-slim { padding: 10px 24px; position: sticky; top: 0; z-index: 100; }
.topbar-slim .logo { cursor: pointer; }
/* 左侧导航栏 */
.sidebar {
  position: fixed;
  top: 58px; left: 0; bottom: 0;
  width: 208px;
  background: #ffffff;
  border-right: 1px solid #e8ecf2;
  box-shadow: 1px 0 10px rgba(15,42,67,.04);
  z-index: 90;
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
/* 一级导航项 */
.side-nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  color: #4a6b88;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
  border: none;
}
.side-nav-tab:hover { background: #eef4fb; color: #2563eb; }
.side-nav-tab.active { background: #e8f0fe; color: #2563eb; font-weight: 700; }
.side-arrow { margin-left: auto; font-size: 10px; opacity: .7; }
/* 下拉菜单（侧栏内展开） */
.side-nav-dropdown { position: relative; }
.side-dropdown-menu {
  display: none;
  margin: 2px 0 2px 14px;
  padding-left: 10px;
  border-left: 2px solid #dbe4f0;
}
.side-nav-dropdown.open .side-dropdown-menu { display: block; }
.side-dropdown-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  color: #4a6b88;
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
}
.side-dropdown-item:hover { background: #eef4fb; color: #2563eb; }
/* 内容区左移，为侧栏让位 */
.sidebar-layout .app { margin-left: 208px; max-width: none; }
/* 移动端：侧栏收成顶部横向滚动 */
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; top: auto; flex-direction: row; flex-wrap: wrap; padding: 8px 10px; gap: 4px; }
  .side-nav-tab { width: auto; padding: 7px 12px; font-size: 12.5px; }
  .side-nav-dropdown { position: relative; }
  .side-dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 160px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; z-index: 2000; }
  .side-dropdown-item { color: var(--text-primary); }
  .side-dropdown-item:hover { background: var(--bg-hover); color: var(--accent); }
  .sidebar-layout .app { margin-left: 0; }
}

/* ============================================================
   统一 Tab 样式（场景库 / 题库 / 学习中心 / 退款专项等）
   ============================================================ */
.sc-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sc-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 10px;
  background: #fff; border: 1px solid #e0e6ef;
  cursor: pointer; font-size: 13.5px; font-weight: 600;
  color: #4a6b88; transition: all .15s;
  box-shadow: 0 1px 3px rgba(15,42,67,.04);
}
.sc-tab:hover { border-color: #b7c6e8; color: #2563eb; transform: translateY(-1px); }
.sc-tab.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff; border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37,99,235,.28);
}

/* ============================================================
   统一页面头部（带渐变底色，更醒目）
   ============================================================ */
.page-head {
  margin-bottom: 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #e8f0fe 60%, #e6f7f6 100%);
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.page-head .page-title {
  font-size: 18px; font-weight: 700; color: #1e3a5f;
  display: flex; align-items: center; gap: 6px;
}
.page-head .page-title .icon { font-size: 20px; }
.page-head .page-sub { font-size: 12.5px; color: #4a6b88; margin-top: 3px; }
/* 兼容旧 h2 标题 */
.page-head h2 { margin: 0; font-size: 18px; color: #1e3a5f; }

/* ============================================================
   知识工具页面（kb-page）头部也统一配色
   ============================================================ */
.kb-page-head {
  background: linear-gradient(135deg, #eef2ff, #e8f0fe) !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 12px 12px 0 0 !important;
}
.kb-page-head .kb-p-title { color: #1e3a5f !important; }
