/* ============================================================
   TrainingBot 全局样式 V5 —— 移动优先，电信蓝主题
   手机端基准 375px，桌面端 768px+ 适配
   ============================================================ */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { height:100%; -webkit-text-size-adjust:100%; }
body {
  font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  background:#eef2f7; color:#22303f; display:flex; flex-direction:column; min-height:100vh;
}
.hidden { display:none !important; }

/* ===== 顶部栏 ===== */
.topbar {
  background:linear-gradient(135deg,#0066ff,#00a2ff); color:#fff;
  padding:10px 12px; display:flex; align-items:center; gap:8px;
  position:sticky; top:0; z-index:30; box-shadow:0 2px 10px rgba(0,80,200,.25);
}
.topbar-right { margin-left:auto; display:flex; align-items:center; gap:6px; flex:none; }
.topbar-actions { display:flex; flex-direction:column; gap:3px; }
.topbar-actions .nav-link { font-size:11px; padding:3px 8px; }
.titles { min-width:0; }
.titles .t1 { font-size:14px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.titles .t2 { font-size:10px; opacity:.85; margin-top:1px; }
.badge { font-size:10px; padding:3px 8px; border-radius:999px;
  background:rgba(255,255,255,.2); border:1px solid rgba(255,255,255,.4); white-space:nowrap; flex:none; }
#user-badge { background:rgba(255,255,255,.25); max-width:100px; overflow:hidden; text-overflow:ellipsis; }
.nav-link { font-size:12px; color:rgba(255,255,255,.9); text-decoration:none;
  padding:4px 10px; border-radius:8px; background:rgba(255,255,255,.15); white-space:nowrap; flex:none; border:none; cursor:pointer; }
.nav-link:active { background:rgba(255,255,255,.3); }

main { flex:1; width:100%; max-width:720px; margin:0 auto; display:flex; flex-direction:column; }
.view { flex:1; display:flex; flex-direction:column; overflow:hidden; }

/* ===== 登录页 ===== */
#view-login { display:flex; align-items:center; justify-content:center; padding:24px 16px; }
.login-box { background:#fff; border-radius:16px; padding:28px 24px; width:100%; max-width:360px;
  box-shadow:0 4px 24px rgba(30,60,110,.12); }
.login-box h2 { font-size:20px; color:#0f1e33; margin-bottom:6px; text-align:center; }
.login-hint { font-size:12px; color:#8296ad; text-align:center; margin-bottom:18px; }
.login-error { font-size:12px; color:#e0413f; text-align:center; margin-bottom:10px; padding:8px; background:#fff0f0; border-radius:8px; }
.login-btn { width:100%; padding:12px; font-size:16px; margin-top:6px; }

/* ===== 训练页三Tab ===== */
#view-home { overflow-y:auto; -webkit-overflow-scrolling:touch; }
.train-tabs { display:flex; background:#fff; box-shadow:0 1px 4px rgba(30,60,110,.08);
  position:sticky; top:0; z-index:5; }
.train-tab { flex:1; border:none; background:transparent; padding:12px 4px; font-size:13px;
  font-weight:600; color:#51637a; cursor:pointer; border-bottom:3px solid transparent; transition:all .15s; text-align:center; }
.train-tab.active { color:#0066ff; border-bottom-color:#0066ff; background:#f7faff; }
.train-tab-right { border:none; background:transparent; padding:12px 10px; font-size:12px;
  color:#0066ff; cursor:pointer; white-space:nowrap; flex:none; }
.train-panel { display:none; }
.train-panel.active { display:block; }

/* ===== 情景对练：场景列表 ===== */
.hint-bar { background:#fff; border-radius:12px; padding:10px 12px; font-size:12px;
  color:#51637a; line-height:1.7; box-shadow:0 1px 4px rgba(30,60,110,.08); margin:10px 10px 8px; }
.hint-bar b { color:#0066ff; }
.filter-bar { display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  background:#fff; border-radius:10px; padding:10px 12px; box-shadow:0 1px 4px rgba(30,60,110,.06); margin:0 10px 10px; }
.filter-bar label { font-size:11px; color:#51637a; white-space:nowrap; }
.filter-bar select { border:1px solid #dbe4ee; border-radius:8px; padding:6px 8px; font-size:12px;
  background:#f7f9fc; color:#22303f; outline:none; max-width:90px; }
.filter-bar select:focus { border-color:#0066ff; }
.btn-ghost-sm { border:1px solid #c9dbf5; background:#fff; color:#0066ff; border-radius:8px;
  padding:6px 10px; font-size:12px; cursor:pointer; white-space:nowrap; }
.cards { padding:0 10px 16px; display:flex; flex-direction:column; gap:10px; }
.card { background:#fff; border-radius:12px; padding:14px; box-shadow:0 1px 6px rgba(30,60,110,.08); }
.card .c-top { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.card .c-name { font-size:15px; font-weight:700; }
.tag { font-size:10px; color:#0066ff; background:#e8f1ff; padding:2px 6px; border-radius:6px; }
.tag.diff { color:#e67e22; background:#fdf3e7; }
.c-tags2 { display:flex; gap:5px; margin:8px 0; }
.mini-tag { font-size:10px; color:#51637a; background:#f0f4fa; padding:2px 7px; border-radius:6px; }
.card .c-persona { font-size:12px; color:#51637a; margin:8px 0 10px; line-height:1.6;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.card .c-btn { width:100%; padding:10px; border:none; border-radius:10px; background:#0066ff; color:#fff;
  font-size:14px; font-weight:600; cursor:pointer; }
.card .c-btn:active { background:#0052cc; }

/* ===== 异议/口诀 Quiz ===== */
.quiz-start { background:#fff; border-radius:12px; padding:28px 20px; text-align:center;
  box-shadow:0 1px 6px rgba(30,60,110,.08); margin:10px; }
.quiz-start h3 { font-size:18px; color:#0f1e33; margin-bottom:6px; }
.quiz-start p { font-size:13px; color:#51637a; margin-bottom:16px; line-height:1.6; }
.quiz-start .form-group { max-width:260px; margin:0 auto 14px; text-align:left; }
.quiz-start .btn-primary { width:100%; max-width:260px; padding:12px; font-size:15px; }
.quiz-area { background:#fff; border-radius:12px; padding:16px 14px;
  box-shadow:0 1px 6px rgba(30,60,110,.08); margin:10px; min-height:280px; }
.quiz-question { background:#f7faff; border-left:3px solid #0066ff; border-radius:8px; padding:14px; margin-bottom:14px; }
.q-cat { font-size:11px; color:#0066ff; font-weight:700; margin-bottom:5px; }
.q-text { font-size:15px; color:#0f1e33; line-height:1.7; font-weight:600; }
.q-hint { font-size:11px; color:#8296ad; margin-top:6px; }
.quiz-input-bar { display:flex; gap:6px; margin:12px 0; }
.quiz-input-bar input { flex:1; border:1px solid #dbe4ee; border-radius:10px; padding:10px 10px;
  font-size:14px; background:#f7f9fc; outline:none; min-width:0; }
.quiz-input-bar input:focus { border-color:#0066ff; background:#fff; }
.quiz-input-bar .send { border:none; background:#0066ff; color:#fff; border-radius:10px;
  padding:0 16px; font-size:14px; font-weight:700; cursor:pointer; flex:none; }
.quiz-result { margin-top:14px; }
.quiz-loading { text-align:center; padding:20px; color:#8296ad; font-size:13px; }
.quiz-error { color:#e0413f; padding:10px; background:#fff0f0; border-radius:8px; font-size:13px; }
.quiz-score-bar { display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.quiz-score { font-size:28px; font-weight:800; flex:none; }
.quiz-grade { font-size:12px; color:#fff; padding:3px 10px; border-radius:999px; font-weight:700; flex:none; }
.quiz-ref { flex:1 1 100%; background:#f7faff; border-radius:8px; padding:10px; margin-top:4px; }
.quiz-ref-label { font-size:10px; color:#0066ff; font-weight:700; margin-bottom:4px; }
.quiz-ref-text { font-size:12px; color:#3d4f63; line-height:1.7; }
.quiz-feedback { background:#fff8f0; border-left:3px solid #d97706; border-radius:8px;
  padding:12px; font-size:12px; color:#3d4f63; line-height:1.8; white-space:pre-wrap; margin-bottom:10px; }
.quiz-actions { display:flex; gap:8px; justify-content:center; }
.quiz-next-btn { padding:10px 28px; font-size:14px; }
.quiz-finish-btn { padding:10px 20px; font-size:14px; border:1px solid #c9dbf5; background:#fff; color:#0066ff; border-radius:10px; cursor:pointer; }
.quiz-finish-btn:active { background:#f0f7ff; }
.quiz-round-info { font-size:11px; color:#0066ff; background:#e8f1ff; padding:3px 8px; border-radius:6px; margin-top:6px; display:inline-block; }
.quiz-type-tag { font-size:10px; padding:2px 6px; border-radius:6px; background:#e8f1ff; color:#0066ff; white-space:nowrap; }

/* ===== 对练页 ===== */
.chat-top { display:flex; align-items:center; gap:8px; padding:8px 10px; background:#fff;
  border-bottom:1px solid #e8edf4; }
.back { border:none; background:#f0f4fa; width:32px; height:32px; border-radius:8px;
  font-size:16px; color:#22303f; cursor:pointer; flex:none; }
.chat-title { flex:1; font-size:14px; font-weight:700; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.trainee-tag { font-size:11px; color:#0066ff; background:#e8f1ff; padding:2px 8px; border-radius:6px; flex:none; }
.end-btn { border:none; background:#ffe9e9; color:#e0413f; font-size:12px; padding:6px 10px;
  border-radius:8px; cursor:pointer; font-weight:600; flex:none; white-space:nowrap; }

.stage-bar { background:#fff; padding:7px 10px 8px; border-bottom:1px solid #e8edf4; }
.stage-track { display:flex; gap:4px; }
.stage-dot { flex:1; height:4px; border-radius:2px; background:#e2e9f2; }
.stage-dot.done { background:#34c38f; }
.stage-dot.now { background:#0066ff; }
.stage-name { font-size:11px; color:#0066ff; font-weight:700; margin-top:5px; }
.stage-name span { color:#8296ad; font-weight:400; }

.chat-area { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:12px 10px; display:flex; flex-direction:column; gap:10px; }
.bubble-row { display:flex; gap:7px; }
.bubble-row.me { flex-direction:row-reverse; }
.avatar { width:30px; height:30px; border-radius:8px; flex:none;
  display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }
.avatar.customer { background:linear-gradient(135deg,#ff9a56,#ff6a3d); }
.avatar.me { background:linear-gradient(135deg,#0066ff,#00a2ff); }
.bubble { max-width:78%; position:relative; }
.bubble .txt { padding:9px 11px; border-radius:12px; font-size:14px; line-height:1.6; }
.customer .txt { background:#fff; border-top-left-radius:4px; }
.me .txt { background:linear-gradient(135deg,#0066ff,#2b7fff); color:#fff; border-top-right-radius:4px; }
.replay { font-size:10px; color:#8296ad; margin-top:3px; cursor:pointer; user-select:none; }
.replay:active { color:#0066ff; }
.sysline { align-self:center; font-size:11px; color:#8296ad; background:#e8edf4;
  padding:4px 10px; border-radius:999px; }
.typing { padding:6px 12px; font-size:12px; color:#8296ad; }

.prompt-card { background:#fffbe8; border-top:1px solid #f2e6bb; padding:8px 12px 10px; max-height:180px; overflow-y:auto; }
.pc-head { font-size:12px; font-weight:700; color:#9a7b1f; }
.pc-head span { font-weight:400; font-size:10px; color:#b39b55; }
#prompt-list { list-style:none; margin-top:6px; display:flex; flex-direction:column; gap:5px; }
#prompt-list li { font-size:12px; color:#6b5b1e; background:#fff; border:1px solid #f0e2b6;
  padding:7px 9px; border-radius:8px; cursor:pointer; line-height:1.5; }
#prompt-list li.checked { text-decoration:line-through; color:#b7a877; background:#faf5e4; }
#prompt-list li.checked::before { content:"已做 "; color:#34c38f; font-weight:700; text-decoration:none; }
#prompt-list li:not(.checked)::before { content:"未做 "; color:#d9534f; font-weight:700; }

.input-bar { display:flex; gap:6px; padding:8px 10px 12px; background:#fff; border-top:1px solid #e8edf4; }
#text-input { flex:1; border:1px solid #dbe4ee; border-radius:10px; padding:10px 10px; font-size:14px;
  background:#f7f9fc; outline:none; min-width:0; }
#text-input:focus { border-color:#0066ff; background:#fff; }
.send { border:none; background:#0066ff; color:#fff; border-radius:10px; padding:0 16px;
  font-size:14px; font-weight:700; cursor:pointer; flex:none; }
.send:disabled { background:#a9c6ef; }

/* ===== 语音按钮 ===== */
.voice-btn { border:1px solid #dbe4ee; background:#f7f9fc; border-radius:10px;
  padding:0 12px; font-size:18px; cursor:pointer; line-height:1; transition:all .15s; flex:none; }
.voice-btn:active { background:#e8f1ff; }
.voice-btn.voice-active { background:#0066ff; color:#fff; border-color:#0066ff; animation: voice-pulse 1.2s infinite; }
@keyframes voice-pulse { 0%,100% { box-shadow:0 0 0 0 rgba(0,102,255,.3); } 50% { box-shadow:0 0 0 6px rgba(0,102,255,0); } }

/* ===== 演练人输入 ===== */
#view-trainee { display:flex; align-items:center; justify-content:center; padding:24px 16px; }
.customer-intro-box { background:#f0f7ff; border:1px dashed #0066ff; border-radius:12px; padding:12px; margin-bottom:4px; }
.ci-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.ci-head span { font-size:13px; font-weight:700; color:#0066ff; }
.ci-body { font-size:12px; color:#3d4f63; line-height:1.7; }
.ci-item { margin-bottom:8px; }
.ci-item:last-child { margin-bottom:0; }
.ci-label { display:inline-block; font-size:10px; color:#0066ff; background:#e8f1ff; padding:1px 6px; border-radius:4px; margin-right:6px; }
.ci-item div { display:inline; }
.ci-net-switch { display:flex; gap:4px; }
.net-btn { border:1px solid #c9dbf5; background:#fff; color:#0066ff; border-radius:999px;
  padding:3px 10px; font-size:11px; cursor:pointer; white-space:nowrap; }
.net-btn.active { background:#0066ff; color:#fff; border-color:#0066ff; }

/* ===== 报告页 ===== */
#view-report { padding:12px 10px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.r-total { background:linear-gradient(135deg,#0066ff,#00a2ff); color:#fff; border-radius:14px;
  padding:18px; text-align:center; box-shadow:0 4px 14px rgba(0,80,200,.3); margin-bottom:12px; }
.r-total .score { font-size:42px; font-weight:800; }
.r-total .grade { display:inline-block; margin-top:5px; background:rgba(255,255,255,.2);
  border:1px solid rgba(255,255,255,.45); padding:3px 12px; border-radius:999px; font-size:12px; }
.r-total .close-desc { font-size:11px; opacity:.9; margin-top:6px; }
.r-card { background:#fff; border-radius:12px; padding:14px; box-shadow:0 1px 6px rgba(30,60,110,.08); margin-bottom:12px; }
.r-card h3 { font-size:13px; margin-bottom:10px; }
.bar-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.bar-row .b-name { width:62px; font-size:12px; color:#51637a; flex:none; }
.bar-row .b-track { flex:1; height:7px; background:#eef2f7; border-radius:4px; overflow:hidden; }
.bar-row .b-fill { height:100%; background:linear-gradient(90deg,#0066ff,#00a2ff); border-radius:4px; }
.bar-row .b-val { width:38px; text-align:right; font-size:12px; font-weight:700; flex:none; }
.stage-detail { border-bottom:1px dashed #e8edf4; padding:8px 0; }
.stage-detail:last-child { border-bottom:none; }
.sd-name { font-size:13px; font-weight:700; margin-bottom:5px; }
.sd-name .no { color:#d9534f; font-size:11px; font-weight:400; }
.pt { font-size:12px; padding:2px 0; }
.pt.ok::before { content:"√ "; color:#34c38f; font-weight:800; }
.pt.miss::before { content:"× "; color:#d9534f; font-weight:800; }
.pt.miss { color:#96a3b4; }
.coach { font-size:12px; line-height:1.8; color:#3d4f63; white-space:pre-wrap; word-break:break-word; overflow-wrap:anywhere; }
.report-actions { display:flex; gap:8px; }
.report-actions button { flex:1; padding:12px; border-radius:10px; font-size:14px; font-weight:700; cursor:pointer; border:none; }
.report-actions .primary { background:#0066ff; color:#fff; }
.report-actions .ghost { background:#fff; color:#0066ff; border:1px solid #c9dbf5; }

/* ===== 演练记录页 ===== */
#view-records { padding:10px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.records-bar { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.records-bar h2 { font-size:16px; color:#0f1e33; }
.rec-filter-bar { display:flex; align-items:center; gap:6px; flex-wrap:nowrap;
  background:#fff; border-radius:10px; padding:8px 10px; margin-bottom:10px; box-shadow:0 1px 4px rgba(30,60,110,.08); }
.rec-filter-group { display:flex; align-items:center; gap:4px; }
.rec-filter-group label { font-size:12px; color:#51637a; white-space:nowrap; }
.rec-filter-group select, .rec-filter-group input {
  border:1px solid #dbe4ee; border-radius:8px; padding:5px 6px; font-size:12px;
  background:#f7f9fc; color:#22303f; outline:none; max-width:120px; }
.rec-filter-group select:focus, .rec-filter-group input:focus { border-color:#0066ff; background:#fff; }
.autocomplete-wrap { position:relative; flex:1; min-width:100px; }
.rec-filter-bar .rec-filter-group:last-child { flex:1; }
.rec-filter-bar .autocomplete-wrap input { width:100%; }
.suggest-list { position:absolute; top:100%; left:0; right:0; z-index:50;
  background:#fff; border:1px solid #dbe4ee; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.1);
  max-height:180px; overflow-y:auto; margin-top:2px; }
.suggest-item { padding:8px 10px; font-size:13px; color:#3d4f63; cursor:pointer; }
.suggest-item:active { background:#e8f1ff; color:#0066ff; }

/* 演练记录表格：手机宽度内自适应 */
/* 演练记录表格：可横向滚动 */
.rec-table { table-layout:auto; min-width:600px; }
.rec-table th, .rec-table td { padding:7px 8px; font-size:12px; white-space:nowrap; }
.rec-table th { white-space:nowrap; }
.rec-table td.cell-ops-vertical { white-space:normal; }

.stats-grid { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.stat-card { flex:1 1 calc(50% - 4px); min-width:150px; background:#fff; border-radius:10px;
  padding:12px; box-shadow:0 1px 6px rgba(30,60,110,.08); border-top:3px solid #0066ff; cursor:default; transition:box-shadow .15s; }
.stat-card[onclick] { cursor:pointer; }
.stat-card[onclick]:active { box-shadow:0 2px 16px rgba(0,102,255,.2); }
.stat-card.active { border-top-color:#e67e22; background:#fff8f0; }
.stat-card .stat-name { font-size:14px; font-weight:700; color:#0f1e33; margin-bottom:6px; }
.stat-card .stat-row { display:flex; justify-content:space-between; font-size:12px; padding:2px 0; color:#51637a; }
.stat-card .stat-row b { color:#0f1e33; }
.stat-click { font-size:10px; color:#0066ff; font-weight:400; }

.data-table { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.data-table table { width:100%; border-collapse:collapse; font-size:12px; background:#fff;
  border-radius:10px; overflow:hidden; box-shadow:0 1px 6px rgba(30,60,110,.08); }
.data-table th { padding:8px 10px; text-align:left; background:#f0f4fa; color:#22303f;
  font-weight:700; border-bottom:2px solid #e8edf4; white-space:nowrap; }
.data-table td { padding:8px 10px; border-bottom:1px solid #f0f4fa; color:#3d4f63; vertical-align:top; }
.data-table tr:last-child td { border-bottom:none; }
.cell-name { font-weight:600; color:#22303f; }
.cell-ops { white-space:nowrap; }

/* ===== 管理后台表格：手机宽度内自适应 ===== */
.admin-page .data-table { overflow:hidden; }
.admin-page .data-table table { table-layout:fixed; }
.admin-page .data-table th, .admin-page .data-table td {
  padding:7px 5px; font-size:11px; overflow:hidden; text-overflow:ellipsis; word-break:break-all; }
.admin-page .data-table th { white-space:nowrap; }
.admin-page .data-table td.cell-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-page .data-table td.cell-ops, .admin-page .data-table td.cell-ops-vertical { overflow:visible; white-space:normal; }
.admin-page .data-table td.cell-ops-h { overflow:visible; white-space:nowrap; display:flex; gap:3px; flex-wrap:wrap; justify-content:flex-start; align-items:center; }
.admin-page .data-table td.cell-ops-h button { border:1px solid #dbe4ee; background:#fff; color:#0066ff; border-radius:6px;
  padding:3px 8px; font-size:11px; cursor:pointer; white-space:nowrap; }
.admin-page .data-table td.cell-ops-h button.del { color:#e0413f; border-color:#f0ccca; }
.admin-page .data-table td.cell-ops-h button:disabled { opacity:.4; cursor:default; }
.admin-page .data-table td.cell-ops-h button:active:not(:disabled) { background:#f7f9fc; }
.admin-page .data-table td.td-center { text-align:center; }
.admin-page .data-table td.td-detail { font-size:10px; color:#7a8ba0; line-height:1.4; }
.arrow-btn { min-width:24px !important; padding:2px 6px !important; font-size:13px !important; }
.admin-page .topbar .nav-link { margin-left:auto; }
.rec-btn { border:1px solid #dbe4ee; background:#fff; color:#0066ff; border-radius:6px;
  padding:3px 8px; font-size:11px; cursor:pointer; margin-right:3px; }
.rec-btn.del { color:#e0413f; border-color:#f0ccca; }
.rec-btn:active { background:#f7f9fc; }

/* ===== 弹窗 ===== */
.modal { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:16px; }
.modal-mask { position:absolute; inset:0; background:rgba(0,0,0,.4); }
.modal-box { position:relative; background:#fff; border-radius:14px; width:100%; max-width:520px;
  max-height:85vh; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 8px 40px rgba(0,0,0,.2); }
.modal-head { display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid #e8edf4; }
.modal-head span { font-size:15px; font-weight:700; color:#22303f; }
.modal-head button { border:none; background:#f0f4fa; width:30px; height:30px; border-radius:8px;
  font-size:18px; cursor:pointer; color:#51637a; }
.modal-body { padding:16px; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* ===== 表单 ===== */
.form-group { margin-bottom:12px; }
.form-group label { display:block; font-size:12px; font-weight:600; color:#3d4f63; margin-bottom:4px; }
.form-group input, .form-group select, .form-group textarea {
  width:100%; border:1px solid #dbe4ee; border-radius:8px; padding:8px 10px; font-size:14px;
  background:#f7f9fc; color:#22303f; outline:none; font-family:inherit; resize:vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color:#0066ff; background:#fff; }
.form-row { display:flex; gap:10px; }
.form-row .form-group { flex:1; }
.form-actions { display:flex; gap:8px; margin-top:14px; }
.form-actions button { flex:1; }

/* ===== 按钮 ===== */
.btn-primary { border:none; background:#0066ff; color:#fff; border-radius:10px;
  padding:9px 16px; font-size:14px; font-weight:600; cursor:pointer; }
.btn-primary:disabled { background:#a9c6ef; }
.btn-ghost { border:1px solid #c9dbf5; background:#fff; color:#0066ff; border-radius:10px;
  padding:9px 16px; font-size:14px; cursor:pointer; }

/* ===== 管理后台 ===== */
body.admin-page { background:#f0f2f7; }
.admin-page main { max-width:960px; padding:0 12px 40px; }
.tabs { display:flex; gap:0; padding:0 8px; background:#fff; border-bottom:2px solid #e8edf4;
  position:sticky; top:56px; z-index:10; overflow-x:auto; }
.tab { border:none; background:transparent; padding:10px 12px; font-size:13px; font-weight:600;
  color:#51637a; cursor:pointer; border-bottom:3px solid transparent; white-space:nowrap; }
.tab.active { color:#0066ff; border-bottom-color:#0066ff; }
.tab-content { display:none; padding:14px 0; }
.tab-content.active { display:block; }
.toolbar { display:flex; align-items:center; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.toolbar label { font-size:12px; color:#51637a; }
.toolbar select { border:1px solid #dbe4ee; border-radius:8px; padding:6px 8px; font-size:12px; background:#f7f9fc; max-width:160px; }
.cell-ops button { border:1px solid #dbe4ee; background:#fff; color:#0066ff; border-radius:6px;
  padding:4px 8px; font-size:11px; cursor:pointer; margin-right:3px; }
.cell-ops button.del { color:#e0413f; border-color:#f0ccca; }
.cell-ops button:active { background:#f7f9fc; }
.cell-ops-vertical { display:flex; flex-direction:column; gap:4px; }
.cell-ops-vertical button { border:1px solid #dbe4ee; background:#fff; color:#0066ff; border-radius:6px;
  padding:5px 10px; font-size:12px; cursor:pointer; min-width:52px; text-align:center; white-space:nowrap; }
.cell-ops-vertical button.del { color:#e0413f; border-color:#f0ccca; }
.cell-ops-vertical button:disabled { opacity:.4; cursor:default; }
.cell-ops-vertical button:active:not(:disabled) { background:#f7f9fc; }

/* ===== 桌面端适配（768px+） ===== */
@media screen and (min-width:768px) {
  .topbar { padding:14px 24px; }
  .titles .t1 { font-size:16px; }
  .titles .t2 { font-size:11px; }
  .badge { font-size:11px; }
  .nav-link { font-size:13px; }
  .topbar-actions { flex-direction:row; gap:6px; }
  main { max-width:720px; }
  .hint-bar { margin:14px 0 10px; padding:12px 16px; font-size:13px; }
  .filter-bar { margin:0 0 10px; padding:12px 16px; }
  .filter-bar select { font-size:13px; max-width:none; }
  .cards { padding:0 0 16px; gap:12px; }
  .card { padding:16px; }
  .card .c-name { font-size:16px; }
  .card .c-persona { font-size:13px; -webkit-line-clamp:3; }
  .card .c-btn { font-size:15px; }
  .train-tab { padding:14px 8px; font-size:15px; }
  .train-tab-right { padding:14px 12px; font-size:13px; }
  .quiz-start { margin:14px; padding:32px 24px; }
  .quiz-area { margin:14px; padding:20px 18px; }
  .quiz-question { padding:16px; }
  .q-text { font-size:16px; }
  .quiz-input-bar input { font-size:15px; }
  .quiz-input-bar .send { font-size:15px; }
  .chat-area { padding:14px 12px; gap:12px; }
  .avatar { width:34px; height:34px; font-size:12px; }
  .bubble .txt { padding:10px 12px; font-size:14px; }
  #text-input { font-size:15px; }
  .send { font-size:15px; padding:0 18px; }
  .stage-name { font-size:12px; }
  #view-report { padding:14px; }
  .r-total { padding:20px; }
  .r-total .score { font-size:46px; }
  .r-card { padding:16px; }
  .r-card h3 { font-size:14px; }
  .bar-row .b-name { width:74px; font-size:13px; }
  .bar-row .b-val { width:44px; font-size:13px; }
  .pt { font-size:13px; }
  .coach { font-size:13px; line-height:1.9; }
  .report-actions button { font-size:15px; padding:13px; }
  #view-records { padding:14px; }
  .stat-card { flex:1 1 calc(25% - 9px); min-width:180px; padding:14px; }
  .stat-card .stat-name { font-size:16px; }
  .stat-card .stat-row { font-size:13px; }
  .data-table table { font-size:13px; }
  .data-table th { padding:10px 14px; }
  .data-table td { padding:10px 14px; }
  .rec-btn { font-size:12px; padding:3px 10px; }
  .stats-grid { gap:12px; }
  .modal-box { max-width:560px; }
  .modal-head { padding:16px 20px; }
  .modal-head span { font-size:16px; }
  .modal-body { padding:20px; }
  .form-group label { font-size:13px; }
  .admin-page main { max-width:960px; padding:0 16px 40px; }
  .tabs { padding:0 16px; }
  .tab { padding:12px 18px; font-size:14px; }
  .toolbar select { font-size:13px; max-width:none; }
  .cell-ops button { font-size:12px; padding:4px 10px; }
}

/* ===== 批量导入区域 ===== */
.import-result { margin-top:16px; }
.import-success { background:#f0fdf4; border:1px solid #bbf7d0; border-radius:8px; padding:16px; }
.import-success h3 { color:#15803d; margin-bottom:10px; font-size:16px; }
.import-success .data-table { background:#fff; }
.import-error { background:#fef2f2; border:1px solid #fecaca; border-radius:8px; padding:14px; color:#dc2626; font-size:14px; }

/* ===== AI辅助按钮 ===== */
.btn-ai {
  display:inline-block; width:100%; margin-bottom:6px; padding:8px 12px;
  background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff;
  border:none; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer;
}
.btn-ai:hover { opacity:.9; }
.btn-ai:disabled { opacity:.6; cursor:wait; }
.form-group label + .btn-ai { margin-top:6px; }

/* ===== 整体预判按钮 ===== */
.btn-ai-sm {
  display:inline-block; padding:8px 14px;
  background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff;
  border:none; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap;
}
.btn-ai-sm:disabled { opacity:.5; cursor:default; }
.btn-ai-sm:active:not(:disabled) { opacity:.9; }