/* ==========================================================================
   学到汇AI 客户端 UI 设计系统（v1.2.0-alpha2 重设计）
   参考 Kimi / Claude / 豆包 2025 风格：浅色暖灰底、白色卡片、靛蓝紫主色
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --brand: #5b5bd6;
  --brand-hover: #4c4cc9;
  --brand-light: rgba(91, 91, 214, 0.09);
  --brand-border: rgba(91, 91, 214, 0.35);
  --text-1: #1f2329;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --bg-page: #f7f7f5;
  --bg-sidebar: #f9f9f8;
  --bg-hover: #efefeb;
  --border: #e5e7eb;
  --border-light: #eeeeeb;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(31, 35, 41, 0.04), 0 8px 24px rgba(31, 35, 41, 0.05);
  --shadow-lift: 0 4px 8px rgba(31, 35, 41, 0.05), 0 14px 32px rgba(31, 35, 41, 0.09);
  --shadow-input: 0 2px 10px rgba(31, 35, 41, 0.05);
  --bg-card: #ffffff;
  --bg-chip: #f3f3f0;
  --bg-table-head: #fafaf8;
  --scrollbar: rgba(31, 35, 41, 0.14);
  --scrollbar-hover: rgba(31, 35, 41, 0.24);
  --checkin-bg: linear-gradient(135deg, #fffaf0 0%, #fffdf7 100%);
  --checkin-border: #f3e3bd;
  --transition: all 0.18s ease;

  /* Element Plus 主题覆盖 */
  --el-color-primary: #5b5bd6;
  --el-color-primary-light-3: #8585e1;
  --el-color-primary-light-5: #adadea;
  --el-color-primary-light-7: #cbcbf2;
  --el-color-primary-light-8: #ddddf7;
  --el-color-primary-light-9: #eeeeFB;
  --el-color-primary-dark-2: #4a4ab8;
  --el-border-radius-base: 8px;
  --el-border-radius-round: 22px;
  --el-dialog-border-radius: 14px;
  --el-messagebox-border-radius: 14px;
  --el-text-color-primary: #1f2329;
  --el-text-color-regular: #4b5563;
  --el-border-color: #e5e7eb;
  --el-border-color-light: #ebebeb;
  --el-border-color-lighter: #f0f0ee;
  --el-fill-color-light: #f4f4f2;
}

/* ---------- 暗黑主题（设置页切换，documentElement[data-theme="dark"]） ---------- */
[data-theme="dark"] {
  --brand: #6c6ce0;
  --brand-hover: #7c7ce8;
  --brand-light: rgba(108, 108, 224, 0.16);
  --brand-border: rgba(108, 108, 224, 0.45);
  --text-1: #e5e7eb;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --bg-page: #1a1a1d;
  --bg-sidebar: #151517;
  --bg-hover: #2e2e33;
  --bg-card: #26262a;
  --bg-chip: #2c2c31;
  --bg-table-head: #232326;
  --border: #3a3a3f;
  --border-light: #333338;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 4px 8px rgba(0, 0, 0, 0.30), 0 14px 32px rgba(0, 0, 0, 0.40);
  --shadow-input: 0 2px 10px rgba(0, 0, 0, 0.30);
  --scrollbar: rgba(255, 255, 255, 0.16);
  --scrollbar-hover: rgba(255, 255, 255, 0.28);
  --checkin-bg: linear-gradient(135deg, rgba(212, 136, 6, 0.14) 0%, rgba(212, 136, 6, 0.06) 100%);
  --checkin-border: rgba(212, 136, 6, 0.35);

  /* Element Plus 暗色覆盖 */
  --el-color-primary: #6c6ce0;
  --el-color-primary-light-3: #8b8be8;
  --el-color-primary-light-5: #aaaaf0;
  --el-color-primary-light-7: #3a3a55;
  --el-color-primary-light-8: #30304a;
  --el-color-primary-light-9: #28283e;
  --el-color-primary-dark-2: #7c7ce8;
  --el-bg-color: #26262a;
  --el-bg-color-page: #1a1a1d;
  --el-bg-color-overlay: #2b2b30;
  --el-fill-color-blank: #26262a;
  --el-fill-color: #2a2a2f;
  --el-fill-color-light: #2e2e33;
  --el-fill-color-dark: #333338;
  --el-fill-color-extra-light: #232326;
  --el-text-color-primary: #e5e7eb;
  --el-text-color-regular: #c0c4cc;
  --el-text-color-secondary: #9ca3af;
  --el-text-color-placeholder: #6b7280;
  --el-text-color-disabled: #5b6068;
  --el-border-color: #3a3a3f;
  --el-border-color-light: #35353a;
  --el-border-color-lighter: #303035;
  --el-border-color-extra-light: #2c2c31;
  --el-disabled-bg-color: #2e2e33;
  --el-disabled-text-color: #6b7280;
  --el-disabled-border-color: #3a3a3f;
  --el-mask-color: rgba(0, 0, 0, 0.65);
  --el-box-shadow: 0 12px 32px 4px rgba(0, 0, 0, 0.36), 0 8px 20px rgba(0, 0, 0, 0.40);
  --el-box-shadow-light: 0 0 12px rgba(0, 0, 0, 0.35);
  --el-box-shadow-lighter: 0 0 6px rgba(0, 0, 0, 0.30);
  --el-box-shadow-dark: 0 16px 48px 16px rgba(0, 0, 0, 0.50), 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ---------- 全局 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app {
  height: 100%;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-1);
}
body { overflow: hidden; background: var(--bg-page); }

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

/* ============ 登录页 ============ */
.login-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(91, 91, 214, 0.10), transparent 60%),
    radial-gradient(760px 420px at 95% 110%, rgba(91, 91, 214, 0.08), transparent 60%),
    var(--bg-page);
}
.login-card {
  width: 392px;
  padding: 0 36px 36px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.login-brand-bar {
  height: 4px;
  margin: 0 -36px 34px;
  background: linear-gradient(90deg, var(--brand) 0%, #9a9ae9 100%);
}
.login-lang { text-align: right; font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.login-lang span { cursor: pointer; padding: 0 2px; transition: var(--transition); }
.login-lang span:hover { color: var(--text-1); }
.login-lang span.on { color: var(--brand); font-weight: 600; }
.login-lang i { margin: 0 2px; font-style: normal; }
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 1px;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(91, 91, 214, 0.28);
}
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 10px 0 28px; }
/* 批次1.5补充 联合品牌：合作方 logo 图（登录页/侧栏，与主名并列） */
.partner-logo { height: 24px; max-width: 140px; object-fit: contain; flex-shrink: 0; }
.partner-logo-sm { height: 20px; max-width: 100px; }
.login-input { margin-bottom: 14px; }
.code-row { display: flex; gap: 10px; }
.code-btn { width: 130px; flex-shrink: 0; }
.login-tip { font-size: 12px; color: #d48806; margin: 12px 0 20px; }
.login-btn { width: 100%; font-weight: 600; }

/* ============ 主界面布局 ============ */
.main-page { height: 100%; display: flex; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 14px;
}
.logo-text { font-size: 17px; font-weight: 700; color: var(--text-1); letter-spacing: 0.5px; }
.logo .logo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.ver-badge {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  background: var(--bg-hover);
  border-radius: 8px;
  padding: 2px 6px;
  margin-left: 2px;
  letter-spacing: 0;
}
.sidebar-scroll { flex: 1; overflow-y: auto; padding-bottom: 8px; }

.new-chat {
  margin: 2px 14px 14px;
  padding: 10px 0;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  transition: var(--transition);
}
.new-chat:hover { border-color: var(--brand-border); color: var(--brand); box-shadow: 0 2px 8px rgba(91, 91, 214, 0.10); }

.func-list { padding: 0; }
.func-item {
  margin: 0 8px 2px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  transition: var(--transition);
}
.func-item:hover { background: var(--bg-hover); color: var(--text-1); }
.func-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }

.nav-group {
  padding: 16px 20px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-3);
}
.sidebar-scroll > .func-item { margin: 0 8px 2px; }

/* 会话列表 */
.conv-list { margin: 0 8px 6px; max-height: 260px; overflow-y: auto; }
.conv-loading { padding: 8px 14px; font-size: 12px; color: var(--text-3); }
.conv-item {
  display: flex;
  align-items: center;
  padding: 7px 10px 7px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  transition: var(--transition);
}
.conv-item:hover { background: var(--bg-hover); color: var(--text-1); }
.conv-item.active { background: var(--brand-light); color: var(--text-1); font-weight: 500; }
.conv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-ops { display: none; flex-shrink: 0; margin-left: 6px; }
.conv-item:hover .conv-ops { display: inline-flex; gap: 6px; }
.conv-op { font-size: 12px; opacity: 0.6; }
.conv-op:hover { opacity: 1; }

/* 侧边栏底部用户卡片 */
.sidebar-bottom {
  margin: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 13px;
}
.points-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.points-text { color: var(--text-2); }
.points-text b { color: var(--brand); font-size: 16px; }
.points-log-link { color: var(--text-3); cursor: pointer; margin-bottom: 12px; font-size: 12px; }
.points-log-link:hover { color: var(--text-2); text-decoration: underline; }
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-2);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}
.user-entry { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.user-entry:hover .phone { color: var(--brand); }
.avatar-mini {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--brand-light);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.user-entry .phone { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: var(--transition); }
.logout { cursor: pointer; font-size: 12px; color: var(--text-3); transition: var(--transition); }
.logout:hover { color: #f56c6c; }

/* ---------- 聊天区 ---------- */
.chat-area { flex: 1; display: flex; flex-direction: column; background: var(--bg-page); min-width: 0; padding-bottom: 44px; /* H5：给固定底栏合规页脚让位 */ }
.chat-header {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
}
.func-name { font-size: 16px; font-weight: 600; color: var(--text-1); }
.model-name {
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-hover);
  padding: 3px 10px;
  border-radius: 10px;
}
.conv-current {
  font-size: 13px;
  color: var(--text-2);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.export-btn { margin-left: auto; }

.msg-list { flex: 1; overflow-y: auto; padding: 20px 32px 8px; }
.empty-hint { text-align: center; color: var(--text-3); margin-top: 140px; font-size: 14px; }
.empty-hint::before { content: '✨'; display: block; font-size: 34px; margin-bottom: 14px; opacity: 0.6; }
.msg-row { display: flex; gap: 12px; max-width: 760px; margin: 0 auto 24px; }
.msg-row.user { justify-content: flex-end; }
.msg-row.assistant { justify-content: flex-start; }
.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, #8b8be6 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.bubble { max-width: 78%; min-width: 0; }
.msg-row.assistant .bubble { max-width: calc(100% - 44px); }
.msg-content {
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-row.user .msg-content {
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  line-height: 1.65;
}
.msg-row.assistant .msg-content { color: var(--text-1); padding: 4px 0; }
.msg-content .md-h1 { font-size: 16px; font-weight: 700; margin: 12px 0 6px; color: var(--text-1); }
.msg-content .md-h2 { font-size: 14px; font-weight: 600; margin: 10px 0 4px; color: var(--text-1); }
.msg-content .md-li { padding-left: 14px; margin: 2px 0; }
.msg-content .md-code { background: var(--bg-2, #f2f3f5); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.msg-meta { font-size: 11px; color: var(--text-3); margin-top: 6px; padding-left: 2px; }
.attach-file-card {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; margin: 2px 6px 2px 0;
  background: var(--bg-2, #f2f3f5); border: 1px solid var(--border, #e4e7ed);
  border-radius: 8px; text-decoration: none; color: var(--text-1);
  font-size: 13px; cursor: pointer; transition: background .15s;
}
.attach-file-card:hover { background: var(--bg-3, #e8eaee); }
.attach-file-icon { font-size: 15px; }
.attach-file-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-file-meta { color: var(--text-3); font-size: 12px; }
.thinking { color: var(--text-3); }
.dots { animation: blink 1.2s infinite; }
@keyframes blink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* 消息内附件/图片 */
.msg-attach { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.msg-attach-item { font-size: 12px; color: #fff; background: rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 2px 8px; }
.msg-images { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.msg-image { max-width: 200px; max-height: 200px; border-radius: 8px; object-fit: cover; display: block; }

/* ---------- 输入区 ---------- */
.input-wrap { flex-shrink: 0; padding: 8px 32px 22px; display: flex; justify-content: center; }
.input-card {
  width: 100%;
  max-width: 760px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px 8px;
  box-shadow: var(--shadow-input);
  transition: var(--transition);
}
.input-card:focus-within {
  border-color: var(--brand-border);
  box-shadow: 0 4px 20px rgba(91, 91, 214, 0.12);
}
.input-card textarea,
.gen-input-card textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--text-1);
  background: transparent;
}
.input-card textarea::placeholder,
.gen-input-card textarea::placeholder { color: var(--text-3); }
.input-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; padding-top: 6px; }
.input-actions .icon-btn.el-button {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-2);
  transition: var(--transition);
}
.input-actions .icon-btn.el-button:hover { background: var(--bg-hover); color: var(--text-1); }
.input-actions .icon-btn.el-button.is-disabled { color: var(--text-3); }
.doc-mode-select { width: 116px; flex-shrink: 0; }

/* 输入区附件/图片 chip */
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; }
.attach-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-1);
}
.attach-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-size { color: var(--text-3); }
.attach-parsed {
  font-size: 10px;
  color: var(--brand);
  background: rgba(91, 91, 214, 0.12);
  border-radius: 6px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.attach-remove { cursor: pointer; color: var(--text-3); font-size: 14px; line-height: 1; }
.attach-remove:hover { color: #f56c6c; }
.img-chip {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.img-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.img-remove:hover { background: #f56c6c; }

/* 文档生成卡片（聊天气泡内） */
.doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
}
.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.doc-card-icon.word { background: #e8f0fe; }
.doc-card-icon.excel { background: #e6f4ea; }
.doc-card-icon.ppt { background: #fdeee8; }
.doc-card-icon.pdf { background: #fde8e8; }
.doc-card-info { flex: 1; min-width: 0; }
.doc-card-title { font-size: 14px; font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-card-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 通用页面区（创作/作品/活动/个人中心/设置） ============ */
.page-area { flex: 1; display: flex; flex-direction: column; background: var(--bg-page); min-width: 0; padding-bottom: 44px; /* H5：给固定底栏合规页脚让位 */ }
.page-body { flex: 1; overflow-y: auto; padding: 20px 32px 28px; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text-1); margin: 26px 0 12px; }
.empty-hint-sm { text-align: center; color: var(--text-3); padding: 48px 0; font-size: 13px; }
.empty-hint-sm::before { content: '🗂️'; display: block; font-size: 30px; margin-bottom: 10px; opacity: 0.5; }

/* 创作输入卡片 */
.gen-input-card {
  max-width: 860px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px 10px;
  box-shadow: var(--shadow-input);
  transition: var(--transition);
}
.gen-input-card:focus-within { border-color: var(--brand-border); box-shadow: 0 4px 20px rgba(91, 91, 214, 0.12); }
.gen-input-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-top: 6px; }
.gen-cost-tip { font-size: 12px; color: #d48806; }

/* 作品卡片网格 */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.work-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.work-thumb { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--bg-chip); }
.work-file-box { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 46px; background: var(--bg-chip); }
.work-info { padding: 10px 12px 12px; }
.work-title { font-size: 13px; font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ============ 课件工坊 ============ */
.cw-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; margin: 0 0 10px; }
.cw-result-card {
  margin-top: 16px;
  max-width: 860px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}
.cw-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cw-result-title { font-size: 16px; font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-result-meta { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.cw-result-files { margin-top: 12px; }
.cw-files-label { font-size: 13px; color: var(--text-2); }
.cw-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cw-file-item {
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  padding: 3px 10px;
}
.cw-download-btn { margin-top: 18px; width: 100%; font-weight: 600; }

/* 批K：大纲确认页 */
.outline-card { border-color: var(--brand-border); }
.outline-free-tip { font-size: 12px; color: #d48806; flex-shrink: 0; }
.outline-skip-link { font-size: 12px; color: var(--text-3); cursor: pointer; text-decoration: underline; }
.outline-skip-link:hover { color: var(--brand); }
.outline-error {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 14px;
  font-size: 13px; color: #d4380d;
  background: #fff2e8; border: 1px solid #ffbb96; border-radius: var(--radius-sm);
}
.outline-raw-toggle {
  margin-top: 14px; font-size: 12px; color: var(--brand); cursor: pointer; user-select: none;
}
.outline-raw-text {
  width: 100%; margin-top: 8px; padding: 10px 12px;
  font-size: 12px; font-family: monospace; line-height: 1.6;
  color: var(--text-2); background: var(--bg-chip);
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  box-sizing: border-box; resize: vertical;
}
.outline-page-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.outline-page-card {
  display: flex; gap: 12px;
  background: var(--bg-chip);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.outline-page-no {
  flex-shrink: 0; width: 26px; height: 26px; margin-top: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-light); border: 1px solid var(--brand-border); border-radius: 50%;
}
.outline-page-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.outline-field { display: flex; align-items: flex-start; gap: 8px; }
.outline-field-label {
  flex-shrink: 0; width: 76px; padding-top: 5px;
  font-size: 12px; color: var(--text-2); text-align: right;
}
/* M2：大纲媒体类型徽标（数学动画/AI视频/图片，只读） */
.media-type-badge {
  flex-shrink: 0; margin-top: 3px; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; line-height: 18px; white-space: nowrap;
}
.media-type-badge.mt-manim { background: #e6f4ff; color: #0958d9; border: 1px solid #91caff; }
.media-type-badge.mt-ai_video { background: #f9f0ff; color: #531dab; border: 1px solid #d3adf7; }
.media-type-badge.mt-image { background: #f6ffed; color: #237804; border: 1px solid #b7eb8f; }
.outline-field .el-input, .outline-field .el-textarea { flex: 1; }
.outline-actions { margin-top: 16px; }

/* ============ 活动 ============ */
.comp-list { display: flex; flex-direction: column; gap: 14px; }
.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  transition: var(--transition);
}
.comp-card:hover { box-shadow: var(--shadow-lift); }
.comp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comp-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.comp-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-top: 8px; }
.comp-meta { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.comp-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.comp-ended-tip { font-size: 12px; color: var(--text-3); }
.comp-dialog-target { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.comp-work-list { min-height: 120px; }
.comp-work-item { padding: 4px 0; }
.comp-work-meta { font-size: 12px; color: var(--text-3); margin-left: 8px; }
.comp-file-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; }
.comp-file-name { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 个人中心 ============ */
.checkin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--checkin-bg);
  border: 1px solid var(--checkin-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 16px;
}
.checkin-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.checkin-days { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  box-shadow: var(--shadow-card);
}
.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
  transition: var(--transition);
}
.profile-avatar:hover { border-color: var(--brand); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-fields { flex: 1; min-width: 0; }
.profile-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; color: var(--text-1); }
.profile-row:last-child { margin-bottom: 0; }
.profile-label { width: 64px; flex-shrink: 0; color: var(--text-3); font-size: 13px; }
.points-card {
  flex-shrink: 0;
  text-align: center;
  background: linear-gradient(135deg, var(--brand) 0%, #8383e3 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  box-shadow: 0 8px 20px rgba(91, 91, 214, 0.25);
}
.points-card-num { font-size: 30px; font-weight: 700; }
.points-card-label { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.points-card-total { font-size: 11px; opacity: 0.75; margin-top: 8px; }
.profile-tabs { margin-top: 20px; background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 6px 20px 16px; }

/* ============ 设置 ============ */
.settings-card {
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px 24px;
  box-shadow: var(--shadow-card);
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--text-1);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { width: 140px; flex-shrink: 0; color: var(--text-2); }
.update-last { font-size: 12px; color: var(--text-3); }

/* ============ 关于我们 ============ */
.about-body { text-align: center; padding: 6px 0 10px; }
.about-logo { font-size: 24px; font-weight: 700; color: var(--text-1); letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.about-ver { font-size: 12px; color: var(--text-3); margin: 8px 0 14px; }
.about-text { font-size: 13px; color: var(--text-2); line-height: 1.8; text-align: left; }

/* ============ 充值弹窗 ============ */
.pkg-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.pkg-card {
  width: calc(33.333% - 8px);
  min-width: 160px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.pkg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--brand-border); }
.pkg-card.active { border-color: var(--brand); background: var(--brand-light); }
.pkg-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.pkg-points { font-size: 13px; color: var(--brand); margin: 8px 0; }
.pkg-points .gift { color: #d48806; font-size: 11px; }
.pkg-amount { font-size: 18px; font-weight: 700; color: #f56c6c; }
.pay-channel { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; }
.dialog-actions { display: flex; justify-content: center; gap: 12px; }
.mock-pay { text-align: center; padding: 10px 0; font-size: 14px; color: var(--text-1); }
.mock-pay p { margin-bottom: 10px; }
.mock-tip { color: #d48806; font-size: 13px; }

/* ============ Element Plus 细节统一 ============ */
.profile-tabs-toolbar { display: flex; justify-content: flex-end; margin: 14px 4px -4px; }
.checkin-info { min-width: 0; }
.comp-dialog-body { padding: 0 2px; }
.el-table th.el-table__cell { background: var(--bg-table-head); color: var(--text-2); font-weight: 600; }
.el-dialog { border-radius: var(--radius-lg); }
.el-message-box { border-radius: var(--radius-lg); }
.el-pagination { --el-pagination-button-bg-color: var(--bg-card); }

/* 主题切换过渡（避免闪烁） */
body, .sidebar, .chat-area, .page-area, .login-card, .new-chat, .sidebar-bottom,
.input-card, .gen-input-card, .doc-card, .work-card, .cw-result-card, .comp-card,
.profile-card, .profile-tabs, .settings-card, .checkin-card, .pkg-card {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ============ v1.2.0-alpha5：滑块安全验证 ============ */
.slider-captcha { padding: 4px 2px 12px; }
.slider-track {
  position: relative;
  height: 44px;
  border-radius: 22px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  overflow: hidden;
  user-select: none;
}
.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--brand-light);
  border-radius: 22px;
}
.slider-track.resetting .slider-fill { transition: width 0.25s ease; }
.slider-track.done .slider-fill { background: rgba(103, 194, 58, 0.16); }
.slider-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-3);
  pointer-events: none;
}
.slider-track.done .slider-tip { color: #67c23a; font-weight: 600; }
.slider-handle {
  position: absolute;
  top: 2px;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--brand);
  cursor: grab;
  z-index: 2;
  touch-action: none;
}
.slider-track.resetting .slider-handle { transition: left 0.25s ease; }
.slider-track.done .slider-handle {
  background: #67c23a;
  border-color: #67c23a;
  color: #fff;
  cursor: default;
}
.captcha-aliyun {
  padding: 34px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ============ v1.3.0-alpha1：用户协议 ============ */
.agree-row { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.public-pc-row { margin-top: 8px; }
.public-pc-row .agree-text { color: var(--text-3); }
.agree-text { font-size: 12px; color: var(--text-2); }
.agree-link { color: var(--brand); cursor: pointer; transition: var(--transition); }
.agree-link:hover { text-decoration: underline; }
.agreement-body { padding: 0 4px; }
.agreement-ver { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.agreement-content {
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.9;
  padding-right: 8px;
}
.agreement-content p { margin-bottom: 10px; }

/* ============ v1.3.0-alpha2：视频生成参数面板（即梦风格） ============ */
.video-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.video-panel {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 0;
}
.video-panel textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.7;
  font-family: inherit;
  color: var(--text-1);
  background: transparent;
}
.video-panel textarea::placeholder { color: var(--text-3); }
.vp-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.vp-label { font-size: 12px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.vp-ratios { display: flex; gap: 10px; }
.vp-ratio {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-2);
}
.vp-ratio:hover { border-color: var(--brand-border); }
.vp-ratio.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.vp-ratio-box { display: block; border: 1.5px solid currentColor; border-radius: 3px; }
.vp-ratio-box.r16x9 { width: 28px; height: 16px; }
.vp-ratio-box.r9x16 { width: 14px; height: 24px; }
.vp-ratio-box.r1x1 { width: 20px; height: 20px; }
.vp-ratio-text { font-size: 12px; }
.vp-cost { margin-top: 16px; font-size: 13px; color: var(--text-2); }
.vp-cost b { color: var(--brand); font-size: 18px; }
.vp-generate { width: 100%; margin-top: 10px; font-weight: 600; }

.video-result { flex: 1; min-width: 0; }
.video-latest {
  display: flex;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.video-latest-box {
  position: relative;
  width: 320px;
  height: 180px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--bg-chip);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-latest-icon { font-size: 52px; }
.video-params-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  padding: 2px 8px;
}
.video-params-badge.sm { font-size: 10px; padding: 1px 6px; }
.video-hist-box { position: relative; }
.video-latest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.video-latest-title { font-size: 15px; font-weight: 600; color: var(--text-1); line-height: 1.5; }

/* 窄窗口下视频页上下排布 */
@media (max-width: 1100px) {
  .video-layout { flex-direction: column; }
  .video-panel { width: 100%; position: static; }
}

/* ============ v1.3.0-alpha4：图片生成参数面板与多图结果 ============ */
.vp-ratio-box.r4x3 { width: 24px; height: 18px; }
.vp-ratio-box.r3x4 { width: 16px; height: 21px; }

.img-latest {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.img-latest-grid { display: grid; gap: 10px; }
.img-latest-grid.n1 { grid-template-columns: minmax(0, 420px); }
.img-latest-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.img-latest-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-chip);
}
.img-latest-item img { width: 100%; height: 100%; max-height: 400px; object-fit: cover; display: block; }
.img-dl {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.img-dl:hover { background: var(--brand); }
.img-latest-info { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.work-thumb-wrap { position: relative; }

/* ============ 媒体预览（图片查看 / 视频播放） ============ */
.clickable { cursor: pointer; }
.work-thumb-wrap video.work-thumb { object-fit: cover; background: #000; }
.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.play-badge.lg { width: 56px; height: 56px; font-size: 22px; }
.video-latest-thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.media-preview-body { display: flex; justify-content: center; background: #000; border-radius: 8px; overflow: hidden; }
.media-preview-video { width: 100%; max-height: 65vh; }
.media-preview-img { max-width: 100%; max-height: 65vh; object-fit: contain; }

/* ============ v1.4.0-alpha1：AI 教案 / 课程维度选择 ============ */
.dim-label { font-size: 12px; color: var(--text-2); margin: 2px 0 8px; font-weight: 600; }
.dim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.dim-row .el-select { flex: 1; min-width: 150px; }
.cw-withlp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  font-size: 13px;
  color: var(--text-1);
}
.cw-withlp-tip { font-size: 12px; color: var(--text-3); }
/* W2：教案先行双模式 */
.cw-mode-switch { margin-bottom: 12px; }
.cw-lesson-picker { margin-bottom: 12px; }
.cw-lp-summary {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--brand-border, rgba(34, 211, 238, 0.3));
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.06);
  font-size: 13px;
  color: var(--text-1);
}
.cw-lp-summary-title { font-weight: 600; margin-bottom: 2px; }
.cw-lp-summary-meta { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.cw-lp-summary-prompt {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cw-lp-refine-tip { margin-left: 12px; }
/* W3a：参考资料上传 */
.ref-upload-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.ref-upload-tip { font-size: 12px; color: var(--text-3); }
.ref-list { margin-bottom: 10px; }
/* W3c：三档计费 */
.cw-tier-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cw-tier-card {
  flex: 1;
  min-width: 130px;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}
.cw-tier-card:hover { border-color: var(--brand-border, rgba(34, 211, 238, 0.4)); }
.cw-tier-card.active {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}
.cw-tier-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.cw-tier-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cw-tier-price { font-size: 12px; color: #22d3ee; margin-top: 4px; min-height: 16px; }
.cw-custom-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cw-custom-label { font-size: 13px; color: var(--text-2); }
.cw-est-tip { font-size: 12px; color: #d48806; margin-bottom: 8px; }
.cw-billing { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.lp-result-card { border-color: var(--brand-border); }
.lp-error-tip {
  max-width: 860px;
  margin-top: 12px;
  font-size: 13px;
  color: #d48806;
  background: rgba(212, 136, 6, 0.08);
  border: 1px solid rgba(212, 136, 6, 0.3);
  border-radius: var(--radius);
  padding: 10px 16px;
}
.lp-sections { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.lp-section {
  background: var(--bg-chip);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.lp-sec-name { font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.lp-sec-content { font-size: 13px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; }
.lp-no-preview { color: var(--text-3); }
.work-cat { display: inline-block; font-size: 11px; color: var(--brand); background: var(--brand-light); border-radius: 8px; padding: 1px 8px; margin-right: 6px; }
.work-tags { font-size: 11px; color: var(--text-3); }

/* 组织 MVP-C：我的单位 */
.org-join-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.org-join-tip { font-size: 12px; color: var(--text-3); margin: 0; line-height: 1.7; }
.org-card .work-meta { display: flex; align-items: center; }
.org-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.org-brief-card { cursor: pointer; }

/* 关于我们-备案信息 */
.about-compliance { margin-top: 16px; border-top: 1px solid var(--border, #eee); padding-top: 12px; }
.about-compliance p { font-size: 12px; color: var(--text-3, #909399); line-height: 1.9; margin: 0; }

/* W4a：生成进度步骤条 */
.cw-progress-card { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--border, rgba(0,0,0,.08));
  border-radius: 10px; background: rgba(34, 211, 238, 0.04); }

/* 生成进度条（阶段文案 + 伪进度百分比，大纲/教研/学情解析等单请求生成过程复用） */
.gen-prog { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--brand-border, rgba(34, 211, 238, .35));
  border-radius: 10px; background: rgba(34, 211, 238, 0.04); }
.gen-prog-stage { font-size: 13px; color: var(--text-2, #606266); margin-bottom: 8px; }

/* AI 教研 */
.rs-free-tag { font-size: 11px; color: #67c23a; border: 1px solid #67c23a; border-radius: 10px; padding: 1px 8px; margin-left: 8px; font-weight: 400; }
.rs-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rs-filter-row .el-select { width: 140px; }
.rs-filter-row .el-input { width: 180px; }
.rs-svc-list { margin-top: 4px; }
.rs-svc-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.rs-svc-cost { font-size: 12px; color: #d48806; margin-left: 10px; }
.rs-svc-list textarea { width: 100%; margin-top: 10px; border: 1px solid var(--border-light); border-radius: var(--radius); outline: none; resize: vertical; box-sizing: border-box; padding: 10px 12px; font-size: 13px; line-height: 1.6; font-family: inherit; color: var(--text-1); background: transparent; }
.rs-svc-list textarea::placeholder { color: var(--text-3); }
.rs-report-card { margin-top: 14px; }
.rs-report { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.7; color: var(--text-1); background: var(--bg-chip); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 14px; margin: 0; max-height: 420px; overflow-y: auto; }
.rs-saved-tip { font-size: 12px; color: #67c23a; margin-top: 8px; }
.rs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cw-pool-row { align-items: center; gap: 8px; margin-top: 6px; }
.cw-pool-label { font-size: 12px; color: var(--text-2); }
.rs-demo-iframe { width: 100%; height: 70vh; border: 0; border-radius: 8px; background: #fff; }

/* 作品修订（教案/课件三层修改） */
.rv-work-name { font-size: 13px; color: var(--text-2); margin-left: 12px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-svc-list textarea.rv-code { font-family: Consolas, 'Courier New', monospace; font-size: 12px; line-height: 1.5; }
.rv-page-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.rv-preview { width: 100%; height: 82vh; border: 1px solid var(--border-light); border-radius: 8px; background: #fff; }
.rv-preview:fullscreen { width: 100vw; height: 100vh; border: none; border-radius: 0; }
.rv-degraded-warn { font-size: 12px; color: #e6a23c; margin-top: 8px; }

/* T4：学情分析（录入 → 老师确认 → 报告） */
.sa-steps { margin-bottom: 18px; }
.sa-card { max-width: 980px; }
.sa-tab-row { margin-bottom: 10px; }
.sa-warnings { background: #fdf6ec; border: 1px solid #f5dab1; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.sa-warning-item { font-size: 12px; color: #e6a23c; line-height: 1.7; }
.sa-class-row { align-items: center; margin-bottom: 10px; }
.sa-table-wrap { overflow-x: auto; margin-bottom: 10px; }
.sa-table { border-collapse: collapse; width: 100%; }
.sa-table th, .sa-table td { border: 1px solid var(--border-light); padding: 4px 6px; font-size: 12px; color: var(--text-1); text-align: center; }
.sa-table th { background: var(--bg-chip); font-weight: 600; white-space: nowrap; }
.sa-th-name { min-width: 110px; }
.sa-th-op { min-width: 64px; }
.sa-subject-input { width: 96px; }
.sa-score-input { width: 88px; }
[data-theme="dark"] .sa-warnings { background: rgba(230, 162, 60, 0.12); border-color: rgba(230, 162, 60, 0.4); }

/* T4 升级：学情驱动备课（推荐引导 / 卷面结构 / 薄弱点补救行动） */
.sa-recommend { color: var(--el-color-primary); font-weight: 600; }
.sa-max-item { display: inline-flex; align-items: center; gap: 4px; }
.sa-max-name { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.sa-th-point { min-width: 220px; }
.sa-weak-area { margin-bottom: 14px; }
.sa-weak-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sa-weak-card { border: 1px solid var(--border-light); border-radius: var(--radius); padding: 12px; background: var(--bg-chip); }
.sa-weak-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sa-weak-name { font-weight: 600; font-size: 13px; color: var(--text-1); }
.sa-sev { font-size: 11px; line-height: 1.4; padding: 1px 8px; border-radius: 999px; color: #fff; white-space: nowrap; }
.sa-sev-high { background: #f56c6c; }
.sa-sev-mid { background: #e6a23c; }
.sa-sev-low { background: #409eff; }
.sa-weak-suggestion { font-size: 12px; color: var(--text-1); line-height: 1.6; margin-bottom: 8px; }
.sa-weak-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* 上传试卷读题：题目内容列 + 推断薄弱点警示 */
.sa-th-content { min-width: 260px; }
.sa-inferred-warn { font-size: 12px; color: #e6a23c; line-height: 1.6; margin-bottom: 8px; }

/* 消息中心（限定 .page-area，避免误伤聊天区 .chat-area 的 .msg-list：聊天消息列表需与输入卡同 32px 侧距、760px 居中） */
.unread-badge { background: #f56c6c; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.promote-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f56c6c; margin-left: 6px; vertical-align: 2px; }
.page-area .msg-list { padding: 16px 24px; max-width: 860px; }
.msg-item { background: var(--card-bg, #fff); border: 1px solid #ebeef5; border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; cursor: pointer; }
.msg-item.unread { border-left: 3px solid #409eff; }
.msg-head { display: flex; align-items: center; gap: 8px; }
.msg-title { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-unread-dot { color: #f56c6c; font-size: 12px; }
.msg-time { color: #909399; font-size: 12px; }
.msg-preview { color: #606266; font-size: 13px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-tip { color: #909399; text-align: center; padding: 60px 0; }
/* 扫码支付 */
.qr-pay { text-align: center; padding: 8px 0; }
.qr-box img { width: 220px; height: 220px; }

/* ============ H5：登录页双 tab + 微信扫码 ============ */
/* 登录页改为纵向布局：卡片居中，合规页脚沉底 */
.login-page { flex-direction: column; }
.login-page .login-card { margin: auto; }
.login-page .site-footer { width: 100%; }
.login-tabs { margin-top: 4px; }
.login-tabs .el-tabs__item { font-size: 15px; }

.wx-empty { text-align: center; padding: 12px 0 4px; }
.wx-tip { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.wx-box { display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
/* 微信官方 WxLogin 组件 iframe（300×400），小屏适当缩放 */
.wx-login-box { width: 300px; height: 400px; margin: -40px 0 -46px; overflow: hidden; }
.wx-login-box iframe { transform: scale(0.92); transform-origin: top center; }
.wx-fallback { padding: 30px 0; }
.wx-guide { margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.7; max-width: 300px; text-align: center; }
.wx-status { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.wx-actions { margin-top: 8px; display: flex; gap: 18px; }
/* 常驻明文授权链接：弹窗被拦截时的最终兜底 */
.wx-raw-link { margin-top: 6px; font-size: 12px; color: var(--text-3); text-decoration: underline; word-break: break-all; }

/* ============ K5 合规页脚（读 /public/about，空不显示） ============ */
.site-footer {
  padding: 14px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.9;
}
/* 主界面：固定底栏（sidebar 宽 248px），实底背景不挡内容 */
.main-page .site-footer {
  position: fixed;
  left: 248px;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 4px 16px;
  line-height: 1.6;
  background: var(--bg-page);
  pointer-events: none;
}
.main-page .site-footer a { pointer-events: auto; }
.sf-text { margin-bottom: 2px; color: #b0b4bc; }
.sf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.sf-links a { color: var(--text-3); text-decoration: none; }
.sf-links a:hover { color: var(--brand); }
/* 任务C：警徽图标与公安备案号作为一个整体参与换行（inline-flex + nowrap），图标不再单独串行 */
.sf-beian-link { display: inline-flex; align-items: center; white-space: nowrap; }
.sf-beian-icon { width: 14px; height: 14px; margin-right: 4px; }
.sf-copy { margin-top: 2px; color: #b0b4bc; }

/* ============ 批L-1：HTML 产物实时预览面板 ============ */
.pv-mask { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 2000; }
.pv-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 55%; min-width: 480px; background: var(--card-bg, #fff); z-index: 2001; display: flex; flex-direction: column; box-shadow: -4px 0 16px rgba(0,0,0,.12); }
.pv-panel:fullscreen { width: 100%; min-width: 0; }
.pv-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border-light, #ebeef5); flex-shrink: 0; }
.pv-title { font-size: 13px; font-weight: 600; color: var(--text-1, #303133); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-modes { display: flex; gap: 4px; }
.pv-mode { font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; color: var(--text-3, #909399); border: 1px solid var(--border-light, #ebeef5); }
.pv-mode.active { color: #fff; background: var(--brand, #409eff); border-color: var(--brand, #409eff); }
.pv-tool { font-size: 15px; cursor: pointer; color: var(--text-3, #909399); padding: 2px 6px; }
.pv-tool:hover { color: var(--brand, #409eff); }
.pv-body { flex: 1; overflow: auto; display: flex; justify-content: center; background: var(--bg-chip, #f5f7fa); }
.pv-frame { border: none; height: 100%; background: #fff; }
.pv-desktop .pv-frame { width: 100%; }
.pv-tablet .pv-frame { width: 768px; max-width: 100%; box-shadow: 0 0 12px rgba(0,0,0,.08); }
/* 预览 iframe 容器：三端切换复用同一 iframe 元素；手机模式虚拟宽度渲染 + transform scale（宽高由 pvScaledFrameStyle 内联给出） */
.pv-frame-wrap { width: 100%; height: 100%; display: flex; justify-content: center; }
.pv-fw-mobile { overflow: hidden; background: #fff; box-shadow: 0 0 12px rgba(0,0,0,.08); justify-content: flex-start; }
.pv-fw-mobile .pv-frame { flex: none; }
.pv-tip { padding: 40px 20px; text-align: center; color: var(--text-3, #909399); font-size: 13px; line-height: 1.8; align-self: flex-start; width: 100%; }
.msg-pv-entry { margin-top: 8px; }
.attach-pv-link { font-size: 12px; color: var(--brand, #409eff); margin-left: 8px; white-space: nowrap; }

/* ============ 批L-1修复：AI 回复代码框（围栏代码块渲染 + 一键复制） ============ */
.code-box { margin: 8px 0; border-radius: 8px; overflow: hidden; background: #1e293b; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.code-box-bar { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; background: #0f172a; }
.code-box-lang { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; }
.code-copy-btn { font-size: 12px; color: #cbd5e1; background: transparent; border: 1px solid #334155; border-radius: 6px; padding: 2px 10px; cursor: pointer; }
.code-copy-btn:hover { color: #fff; border-color: #64748b; background: #1e293b; }
.code-box-pre { margin: 0; padding: 12px 14px; overflow: auto; max-height: 420px; font-size: 12px; line-height: 1.6; color: #e2e8f0; font-family: Consolas, Monaco, 'Courier New', monospace; }
.code-box-pre code { font-family: inherit; white-space: pre; }

/* ============ 批L-2：教案澄清面板 ============ */
.clarify-tip { font-size: 12px; color: #d48806; line-height: 1.6; margin: 0 0 12px; }
.clarify-item { margin-bottom: 14px; }
.clarify-q { font-size: 13px; font-weight: 600; color: var(--text-1, #303133); margin-bottom: 6px; }
.clarify-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 4px; }

/* ============ 批L-4：按钮预估积分 ============ */
.est-inline { font-size: 12px; color: #d48806; margin-right: auto; }
.est-insufficient { color: #f56c6c; font-weight: 600; }
.chat-est-tip { font-size: 11px; color: var(--text-3, #909399); margin-top: 6px; text-align: right; }

/* 思考过程折叠区（assistant 消息 reasoning 非空才渲染，默认折叠） */
.reason-box { margin-bottom: 6px; font-size: 12px; }
.reason-toggle { color: var(--text-3); cursor: pointer; user-select: none; }
.reason-toggle:hover { color: var(--text-2); }
.reason-content { margin-top: 4px; padding: 8px 10px; background: var(--bg-chip); border-radius: 6px; color: var(--text-3); white-space: pre-wrap; line-height: 1.6; max-height: 240px; overflow-y: auto; }
/* 流式输出光标：正文逐字追加时末尾闪烁竖线 */
.stream-live::after { content: '▍'; color: var(--text-3); animation: blink 1s infinite; }
/* 流式中断失败条（未扣积分，可重试） */
.msg-failed { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e6a23c; }

/* 协议确认弹窗里的可点链接（dangerouslyUseHTMLString 渲染，样式全局生效） */
.agree-dlg-link { color: var(--el-color-primary, #409eff); cursor: pointer; text-decoration: underline; }

/* 推广中心（批次0：推广有礼） */
.promote-top { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; margin-bottom: 14px; }
.promote-invite-card { flex: 1; min-width: 320px; }
.promote-qr-card { width: 220px; text-align: center; }
.promote-qr-box { display: flex; justify-content: center; padding: 6px 0 2px; }
.promote-qr-box img { border-radius: 8px; max-width: 100%; }
.promote-code-row { display: flex; align-items: center; gap: 12px; }
.promote-code { font-size: 28px; font-weight: 700; letter-spacing: 2px; color: var(--brand, #4f7cff); }
.promote-link-row { display: flex; align-items: center; gap: 8px; }
.promote-stats { display: flex; gap: 32px; padding: 8px 0 6px; flex-wrap: wrap; }
.promote-stat-num { font-size: 24px; font-weight: 700; color: var(--text-1); }
.promote-stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.promote-wd-tip { margin-left: 10px; font-size: 12px; color: var(--text-3); }
.promote-wd-min-tip { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-top: 4px; }
.promote-become-tip { font-size: 12px; color: var(--text-3); padding: 4px 2px; }
/* 窄屏适配：邀请码/链接行允许换行，二维码卡占满 */
@media (max-width: 720px) {
  .promote-code-row, .promote-link-row { flex-wrap: wrap; }
  .promote-code { font-size: 22px; }
  .promote-qr-card { width: 100%; }
}
