/* ══════════════════════════════════════════════════════════════════════════
   Aurora UI · 项目级扩展（仅放本站特有的组合类）
   ──────────────────────────────────────────────────────────────────────────
   通用组件（按钮/表单/弹窗/表格…）一律用 css/aurora-ui.css（由设计典范生成）。
   本文件只补充典范未覆盖、且多个页面复用的组合类；新增前先确认典范里没有。

   颜色/圆角/间距统一取 themes.css 的令牌，禁止硬编码色值。
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 统计卡网格（用户统计等概览页） ─────────────────────────────── */
.au-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1rem;
}
.au-stat-card { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.125rem; }
.au-stat-label { font-size: var(--fs-1); color: var(--text-3); }
/* 单行统计卡：卡片数动态/浏览器缩放时不换行，靠压缩卡片宽度吸收（标签省略号兜底） */
.au-stat-grid--1row { display: flex; flex-wrap: nowrap; }
.au-stat-grid--1row > .au-stat-card { flex: 1 1 0; min-width: 0; }
.au-stat-grid--1row > .au-stat-card .au-stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-stat-grid--1row > .au-empty { flex: 1; }
.au-stat-value {
  font-size: var(--fs-5);
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* ── 图表网格（ECharts 容器） ────────────────────────────────────── */
.au-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .au-chart-grid { grid-template-columns: 1fr; } }

/* 高度由使用处显式指定（防 CLS），此处只约束宽度与最小高度 */
.au-chart-box { width: 100%; min-height: 12rem; }

/* 面板标题后的计数 / 说明后缀（标签类子元素不参与） */
.au-panel-title > span:not(.au-tag) {
  font-size: var(--fs-1);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--text-4);
}

/* ── 页面主体：Aurora 容器在 SPA 内容区的默认留白 ───────────────── */
.au-page { padding: clamp(1rem, 1.8vw, 1.75rem); padding-top: 0; } /* 顶距由 .content 统一给 33px（sect24），容器不再叠加 */

/* ── 详情布局：主区 + 右侧附件栏 ────────────────────────────────── */
.au-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1000px) { .au-detail-layout { grid-template-columns: 1fr; } }
/* 无右侧附件栏时（如暂存件对照详情）主区满宽，不留空 1fr 列 */
.au-detail-layout--solo { grid-template-columns: minmax(0, 1fr); }

/* ── 详情头：头像 + 姓名 + 标签 + 关键指标 ──────────────────────── */
.au-detail-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.au-detail-head .au-desc-list { margin-left: auto; }

/* ── 危险文字按钮（典范未定义，配套 .au-btn 使用） ──────────────── */
.au-btn-danger-text { background: transparent; color: var(--danger); padding: 0 .625rem; }
.au-btn-danger-text:hover { background: var(--danger-soft); }

/* ── 宽屏适配：内容区向两侧延伸，避免大屏两侧留白过大 ─────────────
   典范默认 --maxw:88rem 居中；本站宽屏（≥2560）逐级放大，
   与已上浮 2 号的根字号配合，保证 1K–4K 视觉密度一致。 */
:root { --maxw: 104rem; }
@media (min-width: 2560px) { :root { --maxw: 124rem; } }
@media (min-width: 3200px) { :root { --maxw: 144rem; } }
@media (min-width: 3840px) { :root { --maxw: 164rem; } }

/* 内容区在超宽屏下不再二次收窄（父级 .content 已是 flex:1 满宽） */
.au-container { width: min(100% - var(--gutter) * 2, var(--maxw)); }

/* ── 分页：整体靠右（含统计文案）；方向箭头用 SVG（‹ › 在等宽字体下发虚） ── */
.au-pagination { justify-content: flex-end; flex-wrap: wrap; row-gap: .5rem; }
.au-page-btn svg { width: .875rem; height: .875rem; }
.au-page-ellipsis { letter-spacing: .08em; font-size: var(--fs-2); }

/* ── 垂直节奏：上下组件之间留出呼吸空间，避免紧贴 ──────────────────
   ★ 容器级：.au-container.au-page 的直接子组件两两之间统一 0.75rem
     （此前只有「面板+面板」一种相邻情况有间距，章节头后跟网格/列表时会贴在一起） */
.au-container.au-page > * + * { margin-top: .75rem; }
.au-panel + .au-panel { margin-top: 1.5rem; }
.au-section-head { margin-bottom: 1.75rem; }
.au-section + .au-section { margin-top: 2rem; }
.au-stat-grid { gap: 1.25rem; }
.au-chart-grid { gap: 1.25rem; }
.au-detail-layout { gap: 1.25rem; }

/* ── 侧栏：菜单字号已随根字号（rem）缩放，行高同步避免拥挤 ───────── */
.sidebar .nav-item { line-height: 1.45; }
.sidebar .nav-child { line-height: 1.45; }

/* ── #content 子组件间距（SPA 内容区） ─────────────────────────── */
#content > * + * { margin-top: 1.25rem; }

/* ── 搜索表单 5 列布局（文件管理筛选区） ────────────────────────── */
.au-form-grid.au-form-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) { .au-form-grid.au-form-grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .au-form-grid.au-form-grid--5 { grid-template-columns: 1fr; } }

/* ── Segmented tab-item 风格（底部渐变下划线，去掉背景/边框） ──── */
.au-segmented.au-segmented--tabs {
  background: transparent; border: none; padding: 0; border-radius: 0;
  display: flex; gap: .5rem;
}
.au-segmented.au-segmented--tabs .au-segmented-item {
  padding: .75rem 1rem; border-radius: 0; background: none; box-shadow: none;
  position: relative; transform: none; color: var(--text-3);
}
.au-segmented.au-segmented--tabs .au-segmented-item:hover {
  color: var(--text-1); background: none; transform: none;
}
.au-segmented.au-segmented--tabs .au-segmented-item.au-is-active {
  background: none; box-shadow: none; transform: none; color: var(--accent-text);
}
.au-segmented.au-segmented--tabs .au-segmented-item.au-is-active::after {
  content: ''; position: absolute; left: .75rem; right: .75rem; bottom: -1px;
  height: 2px; border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
}
.au-segmented--tabs + .au-breadcrumb { white-space: nowrap; }

/* ── 献策谏言（sv-*）：Aurora 组件组合布局 ──────────────────────── */
.sv-page { display: flex; flex-direction: column; gap: 1.25rem; }
.sv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sv-title { font-size: var(--fs-3); font-weight: 700; color: var(--text-1); }
.sv-sub { font-size: var(--fs-2); color: var(--text-3); margin-top: .25rem; }
.sv-filter { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .875rem 1rem; }
.sv-filter-kw { flex: 1; min-width: 14rem; }
.sv-filter-sel { width: auto; min-width: 8rem; }
.sv-list { display: flex; flex-direction: column; gap: .75rem; }
.sv-card { padding: 1rem 1.125rem; cursor: pointer; }
.sv-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.sv-card-main { flex: 1; min-width: 0; }
.sv-badges { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.sv-code { font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-4); }
.sv-card-title { font-size: var(--fs-2); font-weight: 600; color: var(--text-1); }
.sv-card-content { font-size: var(--fs-2); color: var(--text-2); margin-top: .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sv-note { font-size: var(--fs-1); margin-top: .375rem; }
.sv-note--ok { color: var(--success); }
.sv-note--danger { color: var(--danger); }
.sv-card-side { text-align: right; flex-shrink: 0; font-size: var(--fs-1); color: var(--text-4); display: flex; flex-direction: column; gap: .25rem; }
.sv-stars { color: var(--warning); }
.sv-loading { display: flex; justify-content: center; padding: 2.5rem 0; }
.sv-form { display: flex; flex-direction: column; gap: 1rem; }
.sv-textarea { min-height: 8rem; resize: vertical; }
.sv-detail-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.sv-detail-content { font-size: var(--fs-2); color: var(--text-2); line-height: 1.7; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--border); padding: .75rem .875rem; border-radius: var(--r-md); margin-bottom: 1rem; }
.sv-sec-label { font-size: var(--fs-1); color: var(--text-3); margin-bottom: .5rem; }
.sv-rate-row { display: flex; gap: .375rem; margin-bottom: 1rem; }
.sv-admin { border-top: 1px solid var(--border); padding-top: .75rem; margin-top: .25rem; display: flex; flex-direction: column; gap: .5rem; }
.sv-admin-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.sv-admin-row .au-input { flex: 1; min-width: 9rem; }
/* 处理人联想：包裹层替输入框接住弹性宽度，名单（.tc-dd）相对包裹层定位 */
.sv-ac-wrap { flex: 1 1 9rem; min-width: 9rem; }
.sv-ac-wrap > .au-input { width: 100%; }
.sv-ac-meta { padding: .375rem .5rem; font-size: var(--fs-1); color: var(--text-4); }

/* ── 培训管理（tc-*）：课程中心 / 我的培训 / 培训统计 ─────────────── */
.tc-page { display: flex; flex-direction: column; gap: 1.25rem; }
.tc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .875rem 1rem; }
.tc-toolbar-l { display: flex; align-items: center; gap: .625rem; }
/* 行内图文图标：随字号缩放、颜色跟随 currentColor（禁止 emoji / HTML 实体） */
.tc-ico { display: inline-flex; align-items: center; justify-content: center; vertical-align: -.125em; }
.tc-ico svg { width: 1em; height: 1em; flex: none; }
/* 标签内图标：略大于标签字号，保证识别度 */
.au-tag .tc-ico { font-size: var(--fs-2); flex: none; }
.tc-toolbar-r { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.tc-toolbar-r-btn { margin-left: .25rem; }
.tc-toolbar-title { font-size: var(--fs-2); font-weight: 700; color: var(--text-1); }
.tc-search { width: 18rem; max-width: 100%; }
.tc-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .625rem 1rem; }
.tc-filter-label { font-size: var(--fs-1); font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; }
.tc-empty { grid-column: 1 / -1; }
.tc-course { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.tc-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.tc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-3) var(--ease-out); }
.tc-course:hover .tc-cover img { transform: scale(1.04); }
.tc-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); opacity: .88; }
.tc-cover-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.30), transparent 45%, rgba(0,0,0,.52)); }
.tc-cover-top { position: absolute; top: .5rem; left: .5rem; right: .5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: .375rem; }
.tc-cover-top .au-tag { backdrop-filter: blur(8px); }
.tc-timebar { position: absolute; bottom: 0; left: 0; right: 0; padding: .4375rem .625rem; background: rgba(12,14,20,.72); color: #fff; font-size: var(--fs-1); font-weight: 600; display: flex; gap: .5rem; flex-wrap: wrap; backdrop-filter: blur(4px); line-height: 1.4; }
.tc-timebar .sep { opacity: .35; }
.tc-body { padding: .75rem .875rem; display: flex; flex-direction: column; gap: .375rem; flex: 1; }
.tc-tags { display: flex; gap: .25rem; flex-wrap: wrap; }
.tc-title { font-size: var(--fs-2); font-weight: 700; line-height: 1.4; color: var(--text-1); }
.tc-desc { font-size: var(--fs-1); color: var(--text-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc-foot { margin-top: auto; padding: .625rem .875rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
.tc-foot-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.tc-meta { display: flex; gap: .625rem; align-items: center; font-size: var(--fs-1); color: var(--text-4); }
.tc-meta svg { width: .75rem; height: .75rem; opacity: .45; }
.tc-lecturer { display: flex; align-items: center; gap: .375rem; font-size: var(--fs-1); color: var(--text-2); }
.tc-lecturer-avatar { width: 1.25rem; height: 1.25rem; border-radius: .3125rem; display: grid; place-items: center; font-size: var(--fs-1); font-weight: 700; color: #fff; flex-shrink: 0; }
.tc-lecturer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9.375rem; }
.tc-list { display: flex; flex-direction: column; gap: .625rem; }
.tc-row { display: flex; align-items: center; gap: .875rem; padding: .75rem .875rem; }
.tc-row-cover { width: 3.75rem; height: 3.75rem; border-radius: var(--r-md); background: var(--surface-2); flex-shrink: 0; display: grid; place-items: center; overflow: hidden; font-size: var(--fs-3); }
.tc-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.tc-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .375rem; }
.tc-row-head { display: flex; align-items: center; gap: .375rem; flex-wrap: wrap; }
.tc-row-title { font-size: var(--fs-2); font-weight: 600; color: var(--text-1); }
.tc-row-meta { display: flex; align-items: center; gap: .75rem; font-size: var(--fs-1); color: var(--text-4); flex-wrap: wrap; }
.tc-row-acts { display: flex; gap: .375rem; flex-shrink: 0; flex-wrap: wrap; }
.tc-progress-wrap { display: flex; align-items: center; gap: .5rem; }
.tc-progress-wrap .au-progress { flex: 1; }
.tc-progress-pct { font-size: var(--fs-1); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.tc-progress-pct.done { color: var(--success); }
.tc-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1rem; }
.tc-stat-card { padding: 1rem 1.125rem; display: flex; flex-direction: column; gap: .25rem; }
.tc-stat-label { font-size: var(--fs-1); color: var(--text-3); }
.tc-stat-value { font-size: var(--fs-4); font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-stat-row { display: flex; align-items: center; gap: .625rem; padding: .5rem .625rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-1); }
.tc-stat-row .grow { flex: 1; min-width: 0; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-muted { color: var(--text-4); }
.tc-ok { color: var(--success); }
.tc-accent { color: var(--accent-text); }

/* 图标尺寸：emoji 已换成内联 SVG，统一随容器字号取 1em */
.tc-cover-fallback svg { width: 2.5rem; height: 2.5rem; }
.tc-row-cover .tc-ico { font-size: var(--fs-3); color: var(--text-4); }
.tc-stat-row .tc-ico { font-size: var(--fs-2); color: var(--text-4); flex: none; }
.tc-num { font-family: var(--font-mono); font-size: var(--fs-1); font-variant-numeric: tabular-nums; }

/* 讲师维度明细（授课老师统计） */
.tc-teach-list { display: flex; flex-direction: column; gap: .75rem; }
.tc-teach-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); padding: .75rem .875rem; }
.tc-teach-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tc-teach-name { font-size: var(--fs-2); font-weight: 600; color: var(--text-1); }
.tc-teach-time { margin-left: auto; }
.tc-teach-sub { display: flex; flex-direction: column; gap: .25rem; margin-top: .5rem; padding-left: 2.25rem; }
.tc-teach-line { display: flex; align-items: center; gap: .375rem; font-size: var(--fs-1); color: var(--text-2); min-width: 0; }
.tc-teach-line .tc-ico { font-size: var(--fs-1); }
.tc-teach-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 课程详情页（index.html#training-course-detail 兜底页） */
.tc-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .tc-detail-grid { grid-template-columns: 1fr; } }
.tc-detail-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.tc-detail-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 1rem; }
.tc-detail-cover img, .tc-detail-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-detail-title { font-size: var(--fs-3); font-weight: 700; line-height: 1.4; color: var(--text-1); margin-bottom: .625rem; }
.tc-detail-desc { font-size: var(--fs-2); line-height: 1.75; color: var(--text-2); }
/* au-input 固定高度，textarea 用 min-height 撑开（与 .pm-textarea 同一做法） */
.tc-textarea { min-height: 5rem; padding: .625rem .875rem; line-height: 1.7; resize: vertical; font-family: inherit; }
/* 播放区显式最小高度，避免内容注入造成布局跳动（CLS） */
.tc-player { min-height: 18rem; display: flex; flex-direction: column; }
.tc-player-empty { flex: 1; display: grid; place-items: center; }
.tc-player-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-bottom: .75rem; margin-bottom: .875rem; border-bottom: 1px solid var(--border); }
.tc-player-title { display: inline-flex; align-items: center; gap: .375rem; min-width: 0; font-size: var(--fs-2); font-weight: 600; color: var(--text-1); }
.tc-player-title .tc-ico { font-size: var(--fs-2); color: var(--accent); flex: none; }
.tc-player-r { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; }
/* 媒体内容：统一圆角描边，高度显式给定 */
.tc-media { display: block; width: 100%; height: auto; max-height: 26rem; border-radius: var(--r-md); background: var(--surface-3); }
.tc-frame { display: block; width: 100%; height: 26rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.tc-frame-img { display: block; width: 100%; height: auto; max-height: 26rem; object-fit: contain; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.tc-frame-audio { display: block; width: 100%; height: 2.5rem; }
.tc-chapters { display: flex; flex-direction: column; gap: .375rem; max-height: 22rem; overflow-y: auto; }
.tc-chapter { display: flex; align-items: center; gap: .625rem; padding: .5rem .625rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; transition: border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.tc-chapter:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.tc-chapter .tc-ch-num { font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-4); width: 1.5rem; flex: none; text-align: center; }
.tc-chapter .tc-ch-ico { font-size: var(--fs-2); color: var(--text-4); flex: none; }
.tc-chapter .tc-ch-title { flex: 1; min-width: 0; font-size: var(--fs-2); color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-chapter .tc-ch-time { font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-4); flex: none; }
.tc-chapter .tc-ch-done { color: var(--success); font-size: var(--fs-2); flex: none; }
/* 星级评分：SVG 星形，选中态由 au-is-on 控制 */
.tc-rate { display: inline-flex; gap: .25rem; }
.tc-rate .au-rate-star { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; background: none; }
.tc-rate .au-rate-star svg { width: 1.25rem; height: 1.25rem; }
.tc-rate .au-rate-star.au-is-on svg { fill: currentColor; }

/* ── 课程 新建/编辑 表单（弹窗内） ── */
.tc-form { display: flex; flex-direction: column; gap: 1.25rem; }
.tc-form-sec { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.125rem; }
.tc-form-sec > .au-panel-title { margin-bottom: 1rem; }
.tc-form-sec-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tc-form-sec-head > .au-panel-title { flex: 1; min-width: 8rem; margin-bottom: 0; }
.tc-range { display: flex; align-items: center; gap: .5rem; }
.tc-range > .au-input { flex: 1; min-width: 0; }
.tc-range-sep { font-size: var(--fs-1); color: var(--text-4); flex: none; }

/* 封面选择：隐藏原生 file input，用 au-btn 承担触发 */
.tc-file-pick { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
.tc-file-btn { position: relative; overflow: hidden; }
.tc-file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tc-file-name { font-size: var(--fs-1); color: var(--text-4); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.tc-thumb { display: none; margin-top: .625rem; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); }
.tc-thumb:not(:empty) { display: block; }
.tc-thumb img, .tc-thumb video { display: block; width: 100%; max-height: 10rem; object-fit: cover; }

/* 授课老师搜索下拉 */
.tc-dd-wrap { position: relative; }
.tc-dd { display: none; position: absolute; top: calc(100% + .25rem); left: 0; right: 0; z-index: 40; max-height: 14rem; overflow-y: auto; padding: .375rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.tc-dd.show { display: block; }
/* 浮层形态：弹窗正文 .au-modal-body 是 overflow:auto，板内绝对定位的名单会被祖先裁掉；
   挂到 body 上改 fixed 才不受裁切。定位/宽度/限高由调用方按锚点现量后内联写入。 */
.tc-dd--float { position: fixed; z-index: 1200; max-height: none; }
.tc-dd-item { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem; border-radius: var(--r-sm); cursor: pointer; transition: background var(--dur-2) var(--ease-out); }
.tc-dd-item:hover { background: var(--accent-soft); }
.tc-dd-name { font-size: var(--fs-2); color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-dd-dept { margin-left: auto; font-size: var(--fs-1); color: var(--text-4); flex: none; }

/* 章节编辑行 */
.tc-ch-editor { display: flex; flex-direction: column; gap: .5rem; }
.tc-ch-edit-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .625rem .75rem; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-sm); }
.tc-ch-edit-num { font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-4); width: 1.5rem; flex: none; text-align: center; }
.tc-ch-edit-row > .ch-title { flex: 2 1 12rem; min-width: 0; }
.tc-ch-edit-row > .ch-type { width: 6.5rem; flex: none; }
.tc-ch-edit-row > .ch-lecturer { flex: 1 1 11rem; min-width: 0; }
.tc-ch-edit-row > .ch-url { flex: 2 1 13rem; min-width: 0; }
.tc-ch-file-name { flex: 1 1 7rem; min-width: 0; font-size: var(--fs-1); color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 只读章节行（详情/我的课程）：不参与 hover 高亮 */
.tc-chapter--static { cursor: default; }
.tc-chapter--static:hover { border-color: var(--border); background: var(--surface-2); }
.tc-ch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1875rem; }
.tc-ch-main .tc-ch-title { flex: none; }
.tc-ch-sub { font-size: var(--fs-1); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-ch-acts { display: flex; align-items: center; gap: .375rem; flex: none; flex-wrap: wrap; }

/* 表格内「学员」单元格 */
.tc-user-cell { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.tc-user-name { font-size: var(--fs-2); color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 活动中心（ac-*）：活动管理 / 模板库 / 我的活动 / 活动统计 ───── */
.ac-page { display: flex; flex-direction: column; gap: 1.25rem; }
/* 统计条不是 .au-panel，全局「.au-panel + .au-panel」的间距规则接不上，需单独补 */
#activityStatsContent > .au-stat-grid + .au-panel { margin-top: 1.5rem; }
.ac-toolbar { display: flex; align-items: center; gap: 1rem; padding: .875rem 1rem; }
/* 搜索条件强制横排：全局 .au-select width:100% 会让下拉各占整行、换行后竖排 */
.ac-toolbar-filters { display: flex; align-items: center; gap: .75rem; flex-wrap: nowrap; }
.ac-toolbar-filters .au-select { width: auto; min-width: 8rem; flex: 0 1 auto; }
.ac-search { width: 14rem; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1rem; }
.ac-grid > .ac-grid-full,
.ac-tpl-grid > .ac-grid-full { grid-column: 1 / -1; }
.ac-card { position: relative; overflow: hidden; padding: 0; min-height: 15rem; cursor: pointer; display: flex; flex-direction: column; }
.ac-cover { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform var(--dur-3) var(--ease-out); }
.ac-card:hover .ac-cover { transform: scale(1.03); }
.ac-cover-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.14), rgba(0,0,0,.64)); }
.ac-body { position: relative; z-index: 1; min-height: 15rem; padding: 1rem; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.ac-status { position: absolute; top: 1rem; right: 1rem; }
.ac-title { font-size: var(--fs-3); font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); margin-bottom: .625rem; padding-right: 4rem; }
.ac-meta { font-size: var(--fs-1); color: rgba(255,255,255,.95); line-height: 1.9; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.ac-list { display: flex; flex-direction: column; gap: .625rem; }
.ac-row { display: flex; align-items: center; gap: .875rem; padding: .75rem .875rem; cursor: pointer; }
.ac-row-icon { width: 2.75rem; height: 2.75rem; border-radius: var(--r-md); background: var(--accent-soft); display: grid; place-items: center; font-size: var(--fs-3); flex-shrink: 0; }
.ac-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.ac-row-head { display: flex; align-items: center; gap: .375rem; flex-wrap: wrap; }
.ac-row-title { font-size: var(--fs-2); font-weight: 600; color: var(--text-1); }
.ac-row-meta { font-size: var(--fs-1); color: var(--text-4); }
.ac-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1rem; }
.ac-masthead { display: flex; flex-direction: column; gap: .75rem; }
.ac-masthead-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ac-masthead-tags { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ac-code { font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-4); }
.ac-masthead-title { font-size: var(--fs-4); font-weight: 800; color: var(--text-1); line-height: 1.35; }
.ac-chips { display: flex; gap: .375rem; flex-wrap: wrap; }
.ac-sub { font-size: var(--fs-2); font-weight: 600; color: var(--text-2); margin: 1rem 0 .5rem; }
.ac-prose { font-size: var(--fs-2); color: var(--text-2); line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ac-muted { color: var(--text-4); }
.ac-link { color: var(--accent-text); }
.ac-link:hover { text-decoration: underline; }
.ac-total { margin-top: .875rem; padding: .75rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); text-align: center; }
.ac-total-label { font-size: var(--fs-1); color: var(--text-4); }
.ac-total-value { font-size: var(--fs-3); font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* ── 活动 创建/编辑 表单（弹窗内） ── */
.ac-form { display: flex; flex-direction: column; gap: 1.25rem; }
.ac-form-sec { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.125rem; }
.ac-form-sec-title { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-2); font-weight: 600; color: var(--text-1); margin-bottom: 1rem; }
.ac-form-sub { margin-top: 1.25rem; }
.ac-form-sub > .au-field-label { margin-bottom: .5rem; }
.ac-textarea { min-height: 6rem; resize: vertical; }
.ac-textarea-sm { min-height: 3.5rem; resize: vertical; }
.ac-cover-drop { display: flex; flex-direction: column; align-items: center; gap: .5rem; border: 2px dashed var(--border-strong); border-radius: var(--r-md); padding: 1.25rem; cursor: pointer; text-align: center; transition: border-color var(--dur-2), background var(--dur-2); }
.ac-cover-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.ac-cover-drop input { display: none; }
.ac-cover-drop .u-title { font-size: var(--fs-2); color: var(--text-1); }
.ac-cover-drop .u-sub { font-size: var(--fs-1); color: var(--text-3); line-height: 1.6; }
.ac-staff-row { display: flex; gap: .625rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .625rem; }
.ac-staff-edit-row { display: flex; gap: .375rem; align-items: center; }
.ac-staff-edit-row .au-input { flex: 1; min-width: 6rem; }
.ac-budget-total { display: flex; align-items: center; justify-content: space-between; padding: .625rem .875rem; background: var(--surface-3); border-radius: var(--r-sm); margin-bottom: .75rem; font-size: var(--fs-2); color: var(--text-2); }
.ac-budget-val { font-size: var(--fs-2); font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ac-budget-val small { font-size: var(--fs-1); font-weight: 400; color: var(--text-4); margin-left: .375rem; }
.ac-form .au-data-table td .au-input,
.ac-form .au-data-table td .au-select { width: 100%; min-width: 5.5rem; }
.ac-form .au-data-table td { vertical-align: middle; }
.ac-content-item { padding: .75rem; border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; gap: .5rem; background: var(--surface-2); }
.ac-content-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ac-content-row .au-input { flex: 1; min-width: 6rem; }
.ac-content-idx { font-size: var(--fs-1); font-weight: 700; color: var(--accent-text); flex: none; }

/* ── 兼容层：旧 .ai-overlay/.ai-modal 弹窗壳 → Aurora 视觉 ─────────
   历史培训/课程弹窗（pages-interactive.js）仍用 .ai-* 外壳，此处统一
   为 Aurora 弹窗观感；内部表单控件逐步迁移，不改动其结构。 */
.ai-overlay { background: var(--overlay); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.ai-modal {
  background: rgba(var(--modal-rgb), .92);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.ai-modal-header { padding: 1.375rem 1.75rem 1.125rem; }
.ai-modal-header h3 { font-family: inherit; font-size: var(--fs-2); font-weight: 700; letter-spacing: -.015em; }
.ai-modal-header .ai-icon { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff; }
.ai-modal-body { padding: 1.5rem 1.75rem; }
.ai-modal-footer { padding: 1rem 1.75rem; }
.ai-close { border-radius: .625rem; }
.ai-close:hover { background: var(--accent-soft); }
.ai-close svg { width: 1rem; height: 1rem; }

/* ── AI 模型管理（ml-*）：统计卡与模型卡 ─────────────────────────── */
.ml-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; }
@media (max-width: 900px) { .ml-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ml-stat-grid { grid-template-columns: 1fr; } }
.ml-stat-card { min-height: 5.5rem; height: 100%; justify-content: center; }
.ml-stat-sub { font-size: var(--fs-1); color: var(--text-3); margin-top: .125rem; }

/* 网格内卡片不应继承「相邻面板 margin-top」，否则第 2 张起会被下推导致错位 */
.au-stat-grid > .au-panel + .au-panel,
.ml-stat-grid > .au-panel + .au-panel,
.ml-grid > .au-panel + .au-panel,
.tc-grid > .au-panel + .au-panel,
.ac-grid > .au-panel + .au-panel,
.ac-tpl-grid > .au-panel + .au-panel,
.wf-task-grid > .au-panel + .au-panel { margin-top: 0; }

.ml-cat-sec { display: flex; flex-direction: column; gap: .875rem; }
.ml-cat-sec .au-section-head { margin-bottom: 0; padding-bottom: .5rem; gap: .5rem; align-items: center; }
.ml-cat-sec .au-section-title { letter-spacing: 0; line-height: 1.3; }
.ml-cat-icon { display: inline-flex; align-items: center; color: var(--ml-cat, var(--accent-text)); font-size: var(--fs-2); }
.ml-cat-icon svg { width: 1em; height: 1em; display: block; }
.ml-card-icon svg { width: 1.125rem; height: 1.125rem; }

/* ── 场景卡片（复用 ml-card 体系） ── */
.sv-card { cursor: pointer; }
.sv-card .ml-card-name,
.sv-card .ml-card-sub,
.sv-card .sv-card-content,
.sv-card .ml-spec,
.sv-card .ml-metric {
  font-family: var(--font-sans);
}
.sv-card .sv-card-content {
  font-size: var(--fs-2);
  font-weight: 400;
  color: var(--text-2);
  margin: .375rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.sv-list { display: flex; flex-direction: column; gap: .75rem; }
.sv-note-inline {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: var(--fs-1);
  padding: .125rem .5rem;
  border-radius: var(--r-sm);
  cursor: default;
}
.sv-note-inline.sv-note--ok { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.sv-note-inline.sv-note--danger { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

/* 悬浮提示（data-tip）：蓝底白字圆角，替代浏览器默认方框 tooltip */
.fm-tooltip {
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-md);
  padding: .375rem .625rem;
  font-size: var(--fs-1);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  border: none;
  max-width: 20rem;
  word-break: break-all;
}

/* 弹窗内状态/标签不折行（防止「连接失败」被挤成竖排） */
.au-tag { white-space: nowrap; }
.ml-test-status { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); font-size: var(--fs-1); color: var(--text-3); }
.ml-test-status .au-tag { flex: none; }

/* 确认弹窗紧凑化（≈模型卡片尺寸） */
.au-modal--sm .au-modal-head { padding: 1rem 1.375rem .875rem; }
.au-modal--sm .au-modal-body { padding: 1.125rem 1.375rem; }
.au-modal--sm .au-modal-foot { padding: .875rem 1.375rem; }
.au-modal--sm .au-confirm-body { gap: .75rem; padding: 0; }
.au-modal--sm .au-confirm-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--r-sm); }
.au-modal--sm .au-confirm-icon svg { width: 1.25rem; height: 1.25rem; }
.au-modal--sm .au-confirm-text h4 { font-size: var(--fs-2); margin-bottom: .25rem; }
.au-modal--sm .au-confirm-text p { line-height: 1.55; }

/* promptDialog（原生 prompt 的替换件，外壳复用 au-modal）：提示语与输入框之间留一行距 */
.au-prompt-input { margin-top: .625rem; }

/* 连通性测试弹窗内容 */
.ml-test-steps { display: flex; flex-direction: column; }
.ml-test-block { margin: .625rem 0 .375rem; }
.ml-test-block-t { font-size: var(--fs-1); color: var(--text-4); font-weight: 600; margin-bottom: .25rem; }
.ml-test-pre { margin: 0; padding: .625rem .75rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-2); line-height: 1.5; white-space: pre-wrap; word-break: break-all; max-height: 12.5rem; overflow: auto; }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 1rem; }

/* 分类主色（按模型用途）：卡片底色取其浅色混合 */
.ml-cat-CHAT       { --ml-cat: var(--info); }
.ml-cat-EMBEDDING  { --ml-cat: var(--accent); }
.ml-cat-OCR        { --ml-cat: var(--success); }
.ml-cat-ASR        { --ml-cat: var(--warning); }
.ml-cat-TTS        { --ml-cat: var(--danger); }
.ml-cat-VIDEO      { --ml-cat: color-mix(in srgb, var(--accent) 55%, var(--info)); }
.ml-cat-RERANK     { --ml-cat: color-mix(in srgb, var(--success) 55%, var(--info)); }
.ml-cat-OTHER      { --ml-cat: var(--text-3); }

.ml-card {
  --ml-card-bg: color-mix(in srgb, var(--ml-cat, var(--accent)) 12%, var(--surface));
  display: flex; flex-direction: column; gap: .5rem; padding: .875rem 1rem; height: 100%;
  background: var(--ml-card-bg);
  border: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.ml-card:hover { border: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ml-card.ml-card--offline { --ml-card-bg: var(--surface-2); }
.ml-card--offline .ml-card-icon { filter: grayscale(1); opacity: .5; }
.ml-card--offline .ml-card-name { color: var(--text-3); }
.ml-card--offline .ml-card-sub,
.ml-card--offline .ml-card-endpoint,
.ml-card--offline .sv-card-content,
.ml-card--offline .ml-card-specs,
.ml-card--offline .ml-card-metrics { color: var(--text-4); }

/* 启停按钮：开启=绿，关闭=红 */
.ml-act-on { background: var(--success); color: #fff; border-color: transparent; }
.ml-act-on:hover { background: color-mix(in srgb, var(--success) 86%, #000); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--success) 60%, transparent); }
.ml-act-off { background: var(--danger); color: #fff; border-color: transparent; }
.ml-act-off:hover { background: color-mix(in srgb, var(--danger) 86%, #000); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--danger) 60%, transparent); }
.ml-card-head { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ml-card-icon { width: 2rem; height: 2rem; border-radius: var(--r-sm); display: grid; place-items: center; font-size: var(--fs-2); background: var(--surface-3); flex: none; }
.ml-card-id { flex: 1; min-width: 0; }
.ml-card-name { font-size: var(--fs-2); font-weight: 700; color: var(--text-1); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-card-sub { font-size: var(--fs-1); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .0625rem; }
.ml-card-badges { display: flex; align-items: center; gap: .25rem; flex: none; }
.ml-card-badges .au-tag { height: 1.25rem; padding: 0 .4375rem; font-size: var(--fs-1); }
.ml-card-endpoint { font-family: var(--font-mono); font-size: var(--fs-1); color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xs); padding: .25rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-card--offline .ml-card-endpoint { background: var(--surface-3); }
.ml-muted { color: var(--text-4); font-family: var(--font-sans); }
.ml-card-specs { display: flex; flex-wrap: wrap; gap: .1875rem .75rem; font-size: var(--fs-1); color: var(--text-1); font-family: var(--font-mono); }
.ml-spec { white-space: nowrap; }
.ml-spec b { color: var(--text-4); font-weight: 500; font-family: var(--font-sans); margin-right: .25rem; }
.ml-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--border); }
.ml-card-metrics { display: flex; align-items: center; gap: .75rem; font-size: var(--fs-1); color: var(--text-1); font-family: var(--font-mono); min-width: 0; }
.ml-metric { white-space: nowrap; }
.ml-metric b { color: var(--text-4); font-weight: 500; font-family: var(--font-sans); margin-right: .25rem; }
.ml-card-actions { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.ml-card-actions .au-btn-icon { padding: 0; }
.ml-card-actions .au-btn-icon svg { width: .9375rem; height: .9375rem; }
.au-loading-center { display: flex; justify-content: center; padding: 2.5rem 0; }

/* ── 巡检弹窗（AI 模型管理页：文件解析链路 / chunks 重投结果） ──────── */
.ml-patrol-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ml-patrol-bar .au-tag { flex: none; }
.ml-patrol-cards { margin: .75rem 0 1rem; }
.ml-patrol-cards > .au-stat-card { align-items: center; gap: .125rem; padding: .625rem .5rem; text-align: center; }
.ml-patrol-cards > .au-stat-card .au-stat-value { font-size: var(--fs-4); }
.ml-patrol-title { font-size: var(--fs-2); margin-bottom: .375rem; }
.ml-patrol-reason { display: block; max-width: 18rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 活动工作台 - 类型分布柱状图 X 轴标签 */
.ac-bar-label { font-size: var(--fs-1); color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 业务页根容器自带 gap，抵消通用「相邻子元素 margin-top」避免双倍间距 */
.au-container.au-page.sv-page > * + *,
.au-container.au-page.tc-page > * + *,
.au-container.au-page.ac-page > * + *,
.au-container.au-page.pmv > * + * { margin-top: 0; }

/* 时间轴整行可点（消息中心等）：手型 + 悬停标题变色 + 键盘焦点环 */
.au-timeline-item[role="button"] { cursor: pointer; border-radius: var(--r-sm); }
.au-timeline-item[role="button"]:hover .au-timeline-title { color: var(--accent); }
.au-timeline-item[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: .125rem; }
