/* 企业内部学习平台 - 简洁直观样式 */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f4f6f9;
  color: #1f2733;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 20px;
  background: #1f3a5f; color: #fff; padding: 6px 24px; min-height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #fff; text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; color: #fff; }
/* 企业 logo：深色顶栏使用白色字身版，保留品牌砖红点缀 */
.brand-logo { height: 30px; width: auto; display: block; }
.brand-text { font-size: 13px; font-weight: 500; letter-spacing: .4px; color: #c6d5e9;
  padding-left: 10px; border-left: 1px solid rgba(255,255,255,.28); white-space: nowrap; }
/* 顶栏空间不足时优先保留 logo，逐级收紧导航内边距与字号 */
@media (max-width: 1440px) {
  .nav-item a { padding: 8px 7px; font-size: 13.5px; }
  .brand-text { font-size: 12px; padding-left: 8px; }
  .topbar { gap: 14px; }
}
/* 1280 及以下收起品牌文字，保证 11 项管理导航单行排布 */
@media (max-width: 1320px) {
  .brand-text { display: none; }
}
@media (max-width: 820px) {
  .topbar { gap: 12px; padding: 6px 12px; }
  .brand-logo { height: 24px; }
}
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item a { color: #dbe6f5; padding: 8px 12px; border-radius: 6px; display: inline-block; white-space: nowrap; }
.nav-item a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.role-badge { background: #3b82f6; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.logout { color: #ffd; }

.container { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.footer { text-align: center; color: #98a2b3; font-size: 12px; padding: 24px; }

/* ============ 首页品牌横幅（参考 beite.hk 视觉：全幅品牌插画 + 居中柔光卡片） ============ */
.home-hero {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: #f3ede6;
}
.home-hero__bg {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* 轻微柔光蒙版：统一画面、托起卡片，同时保留品牌插画质感 */
.home-hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.08) 42%, rgba(31,58,95,.06) 100%),
    radial-gradient(120% 90% at 50% 24%, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 60%);
}
.home-hero__inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.home-hero__panel {
  pointer-events: auto;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  padding: 26px 40px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(31,58,95,.2);
  max-width: 90%;
}
/* 卡片内只有主标题时：收紧纵向留白，让卡片更贴近那一行字 */
.home-hero__panel--solo { padding: 24px 46px; }
.home-hero__eyebrow {
  margin: 0 0 10px;
  color: #d76647;
  font-size: 13px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
}
.home-hero__title {
  margin: 0;
  font-size: 40px; font-weight: 800; line-height: 1.15;
  color: #1f2733; letter-spacing: .02em;
}
.home-hero__rule {
  display: block; width: 56px; height: 4px;
  margin: 14px auto; border-radius: 2px;
  background: #d76647;
}
.home-hero__subtitle {
  margin: 0;
  font-size: 15px; color: #5a6573; letter-spacing: .04em;
}
@media (max-width: 768px) {
  .home-hero { height: 200px; }
  .home-hero__inner { padding: 0 16px; }
  .home-hero__panel { padding: 18px 24px; border-radius: 14px; }
  .home-hero__eyebrow { font-size: 11px; letter-spacing: .16em; margin-bottom: 8px; }
  .home-hero__title { font-size: 26px; }
  .home-hero__rule { width: 38px; height: 3px; margin: 10px auto; }
  .home-hero__subtitle { font-size: 13px; }
}
@media (max-width: 420px) {
  .home-hero { height: 170px; }
  .home-hero__title { font-size: 22px; }
}

/* 学员端首页：banner 插画按原始比例「完整显示」，不被左右裁切。
   hero.jpg 是 1920×284（6.76:1）的长插画，contain 后上下留白用插画主色补齐。 */
.home-hero--full { background: #f7c677; }
.home-hero--full .home-hero__bg {
  background-size: contain;
  background-color: #f7c677;
}

/* ============ 学员端首页：进入欢迎动画（完整 banner 插画 + 欢迎词） ============ */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%,
              #fde7c0 0%, #f7c677 58%, #ef9f57 100%);
  animation: welcomeOut .55s ease 2.7s forwards;
}
/* 插画带与图片同比例，contain 即完整呈现，不裁掉任何一段人物与场景 */
.welcome-art {
  position: absolute; left: 0; right: 0; top: 50%;
  width: 100%; aspect-ratio: 1920 / 284;
  transform: translateY(-50%);
  background: url('/static/img/hero.jpg') center / contain no-repeat;
  animation: welcomeArt 1.5s cubic-bezier(.2,.7,.3,1) both;
}
.welcome-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.32) 0%,
              rgba(255,255,255,.16) 45%, rgba(255,255,255,.32) 100%);
}
.welcome-panel {
  position: relative; z-index: 2; text-align: center;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px;
  padding: 30px 52px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(31,58,95,.22);
  animation: welcomeRise .7s cubic-bezier(.2,.7,.3,1) .25s both;
}
.welcome-eyebrow {
  margin: 0 0 10px; color: #d76647;
  font-size: 12px; font-weight: 600; letter-spacing: .22em;
}
.welcome-title {
  margin: 0; font-size: 34px; font-weight: 800; line-height: 1.35;
  color: #1f2733; letter-spacing: .02em;
}
.welcome-sub { margin: 10px 0 0; font-size: 15px; color: #5a6573; }
.welcome-rule {
  display: block; width: 56px; height: 4px; margin: 16px auto 0;
  border-radius: 2px; background: #d76647;
}
.welcome-skip {
  position: absolute; right: 22px; bottom: 22px; z-index: 3;
  padding: 8px 16px; font-size: 13px; color: #1f3a5f; cursor: pointer;
  background: rgba(255,255,255,.85); border: 1px solid rgba(31,58,95,.15);
  border-radius: 999px; box-shadow: 0 4px 14px rgba(31,58,95,.12);
}
.welcome-skip:hover { background: #fff; }
.welcome-bar {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: rgba(255,255,255,.45); z-index: 3;
}
.welcome-bar i {
  display: block; height: 100%; width: 0;
  background: #d76647; animation: welcomeBar 2.7s linear forwards;
}
/* 点击跳过 / 同一会话已播过：立即收起 */
.welcome-overlay.is-dismissed {
  animation: none; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s;
}
@keyframes welcomeArt {
  from { opacity: 0; transform: translateY(-50%) scale(1.06); }
  to   { opacity: 1; transform: translateY(-50%) scale(1); }
}
@keyframes welcomeRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes welcomeBar { from { width: 0; } to { width: 100%; } }
@keyframes welcomeOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (max-width: 640px) {
  .welcome-panel { padding: 22px 26px; }
  .welcome-title { font-size: 22px; line-height: 1.4; }
  .welcome-sub { font-size: 13px; }
  .welcome-skip { right: 14px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-overlay { animation-delay: .5s; }
  .welcome-art, .welcome-panel, .welcome-bar i { animation-duration: .01s; }
}
/* 管理端首页：手动预览学员端欢迎动画的低调入口 */
.welcome-preview-link { margin: 18px 0 6px; font-size: 13px; }
.welcome-preview-link a { color: #1f3a5f; text-decoration: underline; }

/* 卡片 */
.cards { display: flex; gap: 16px; margin: 16px 0; }
.card { background: #fff; border-radius: 10px; padding: 20px; flex: 1; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card .num { font-size: 28px; font-weight: 700; color: #1f3a5f; }
.card .lbl { color: #667085; font-size: 13px; margin-top: 4px; }
/* 窄屏：统计卡片换行成两列，避免文字被压成竖排 */
@media (max-width: 720px) {
  .cards { flex-wrap: wrap; gap: 10px; }
  .cards .card { flex: 1 0 calc(50% - 5px); padding: 14px 10px; }
  .cards .card .num { font-size: 22px; }
}

/* 学员端首页：8 个关键字段合并为单一板块（桌面 4 列 × 2 行，窄屏 2 列）。
   独立 class，避免与 .cards 的 flex 规则互相干扰。 */
.cards-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 14px;
}
.cards-overview .card { flex: none; min-width: 0; }
@media (max-width: 720px) {
  .cards-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards-overview .card { padding: 14px 10px; }
  .cards-overview .card .num { font-size: 22px; }
}

/* 管理端：考核中心分类标签（考核列表 / 题库管理 / 成绩统计） */
.assess-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 18px;
  padding-bottom: 0; border-bottom: 1px solid #e4e8ef; }
.assess-tab { display: inline-block; padding: 9px 18px; font-size: 14px; color: #475467;
  text-decoration: none; border-radius: 8px 8px 0 0; border: 1px solid transparent;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.assess-tab:hover { color: #1f3a5f; background: #f4f6fa; }
.assess-tab.is-active { color: #1f3a5f; font-weight: 600; background: #fff;
  border-color: #e4e8ef; border-bottom-color: #2563eb; }
@media (max-width: 640px) {
  .assess-tab { padding: 8px 12px; font-size: 13px; }
}

/* 学位排名 */
.rank-heading { display: flex; align-items: baseline; justify-content: space-between; }
.rank-heading h3 { margin-bottom: 0; }
.rank-more { font-size: 13px; color: #2563eb; text-decoration: none; white-space: nowrap; }
.rank-more:hover { text-decoration: underline; }
.card .sub { margin-top: 4px; font-size: 12px; color: #98a2b3; }
.card .num.rank-num { font-size: 22px; }
.rank-note { margin: -4px 0 12px; font-size: 13px; line-height: 1.7; }
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 4px 0 8px; }
.rank-card { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.rank-head b { font-size: 15px; color: #1f2937; }
.rank-head .muted { font-size: 12px; }
.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; font-size: 14px; }
.rank-row + .rank-row { border-top: 1px dashed #eef1f5; }
.rank-row.is-me { background: #eff6ff; }
.rank-no { flex: none; width: 22px; text-align: center; font-size: 13px; font-weight: 700; color: #98a2b3; }
.rank-no.is-top { color: #2563eb; }
.rank-name { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; color: #1f2937; }
.rank-name small { flex: none; font-size: 12px; font-weight: 400; color: #98a2b3; }
.rank-val { flex: none; font-weight: 700; color: #1f3a5f; }
.rank-val small { margin-left: 5px; font-size: 12px; font-weight: 600; color: #98a2b3; }
.rank-foot { margin-top: 8px; padding-top: 10px; border-top: 1px solid #eef1f5; font-size: 13px; color: #667085; }
.rank-empty { padding: 22px 8px; font-size: 13px; color: #98a2b3; text-align: center; }
.rank-gap { padding: 2px 0; font-size: 12px; color: #cbd5e1; text-align: center; }
@media (max-width: 820px) { .rank-grid { grid-template-columns: 1fr; } }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.course-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); display: block; color: inherit; }
.course-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); text-decoration: none; }
.course-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.course-desc { color: #475467; font-size: 13px; min-height: 36px; }
.course-meta { color: #98a2b3; font-size: 12px; margin-top: 10px; }

/* 课程封面 */
.course-cover { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #eef2f7; margin-bottom: 12px; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-cover-empty { display: flex; align-items: center; justify-content: center; color: #98a2b3; font-size: 13px; }
.detail-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin: 12px 0 16px; display: block; background: #eef2f7; }
.mini-cover { max-width: 96px; max-height: 64px; border-radius: 6px; object-fit: cover; display: block; }
.col-cover { width: 110px; }
.cover-preview-box { margin: 4px 0 8px; }
.cover-preview { max-width: 220px; max-height: 140px; border-radius: 8px; object-fit: cover; display: block; border: 1px solid #eef1f5; }
.cover-empty { color: #98a2b3; font-size: 13px; padding: 8px 0; }
.chk { font-weight: 400; color: #475467; display: flex; align-items: center; gap: 6px; margin: 2px 0; }
input[type="file"] { padding: 8px; background: #f8fafc; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef1f5; font-size: 14px; }
.tbl th { background: #f0f4fa; color: #344054; font-weight: 600; }
.tbl tr:last-child td { border-bottom: none; }

/* 表单 */
.form-col { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }

/* 一行两列表单栅格（课程新增/编辑页使用） */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: start;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.form-grid .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-grid .field-full { grid-column: 1 / -1; }
.form-grid .field-span-2 { grid-column: span 2; }
/* 一行三列变体（指派学习任务页使用） */
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 一行四列变体（课程新增/编辑页：标题·类别·时长·状态 同一行） */
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid label { font-size: 13px; font-weight: 600; color: #344054; }
.form-grid input,
.form-grid select,
.form-grid textarea { width: 100%; }
.form-grid textarea { min-height: 120px; }
.form-grid input[type="file"] { padding: 8px; background: #f8fafc; }
.form-grid input[type="checkbox"],
.form-grid input[type="radio"] { width: auto; flex: 0 0 auto; }
.form-grid .hint { margin: 0; font-size: 12px; color: #98a2b3; }
/* 适用岗位两级选择：部门 → 岗位 → 已选标签 */
.pos-picker { display: flex; flex-direction: column; gap: 10px; }
.pos-picker-row { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 10px; }
.pos-picker-row select { width: 100%; }
.pos-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eff4ff; color: #1d4ed8; border: 1px solid #dbe6ff;
  border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 13px;
}
.pos-chip-x {
  background: none; border: none; padding: 0 2px; cursor: pointer;
  color: #7d9cd8; font-size: 14px; line-height: 1;
}
.pos-chip-x:hover { background: none; color: #d92d20; }
.pos-foot { display: flex; align-items: center; gap: 12px; }
.pos-count { font-size: 12px; color: #667085; }
.pos-clear {
  background: none; color: #2563eb; border: 0; padding: 0;
  font-size: 12px; cursor: pointer;
}
.pos-clear:hover { background: none; text-decoration: underline; }
.pos-empty-tip { margin: 0; }
/* 课程内容：按课件生成大纲 */
.ai-outline-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-outline-bar .btn { padding: 6px 12px; font-size: 13px; }
.ai-outline-tip { font-size: 12px; color: #98a2b3; }
.ai-outline-tip.is-err { color: #d92d20; }
.ai-outline-tip.is-ok { color: #067647; }
.ai-fill-banner { margin-top: 8px; padding: 8px 12px; border-radius: 8px; font-size: 13px;
  background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.ai-fill-banner.is-err { background: #fef3f2; color: #d92d20; border-color: #fecdca; }
.ai-fill-banner[hidden] { display: none; }
.form-actions { flex-direction: row; align-items: center; gap: 10px; margin-top: 4px; }
.form-grid .field.form-actions { flex-direction: row; align-items: center; justify-content: flex-start; }
.form-actions .btn { text-decoration: none; }
/* 任务详情页「新增课程任务项」：学员 / 课程 / 期限 / 按钮 同一行 */
.form-grid.task-add-row { align-items: start; }
.form-grid .field-actions-end { justify-content: flex-end; }
.form-grid .field-actions-end button { width: 100%; white-space: nowrap; }
.form-grid .label-ghost { visibility: hidden; }
@media (max-width: 1024px) {
  .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .form-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .field-span-2 { grid-column: span 1; }
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
  .form-grid.cols-4 { grid-template-columns: 1fr; }
}
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.bulk-form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.bulk-form textarea {
  width: 100%; min-height: 130px; font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}
.bulk-form .form-row { margin: 0; }
.bulk-file-tip { font-size: 12px; color: #667085; max-width: 320px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.bulk-file-tip.is-ok { color: #067647; }
.bulk-file-tip.is-warn { color: #b42318; font-weight: 600; }
.bulk-paste { margin-top: 2px; }
.bulk-paste > summary { cursor: pointer; font-size: 13px; color: #2563eb; padding: 4px 0; }
/* 用户管理：「批量增加」按钮展开的导入面板 */
.bulk-panel {
  margin: 12px 0 18px; padding: 14px 16px;
  background: #f8fafc; border: 1px solid #e4e7ec; border-radius: 10px;
}
.bulk-panel[hidden] { display: none !important; }
.bulk-panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.bulk-panel-head b { font-size: 14px; color: #1f3a5f; }
.bulk-panel-head .muted { font-size: 12px; }
.bulk-panel .bulk-form { margin: 4px 0 0; }
.bulk-panel .hint { margin: 4px 0 0; }
#btn-bulk-add { white-space: nowrap; }
.bulk-paste textarea { margin-top: 6px; }
label { font-size: 13px; color: #344054; font-weight: 600; }
input, select, textarea {
  padding: 8px 10px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 14px; font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
button, .btn {
  background: #2563eb; color: #fff; border: none; padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
button:hover, .btn:hover { background: #1d4ed8; }
.btn-ghost { background: #fff; color: #2563eb; border: 1px solid #2563eb; }
.btn-ghost:hover { background: #eff4ff; }
.link-danger { background: none; color: #d92d20; padding: 0; cursor: pointer; border: none; font-size: 13px; }
.link-danger:hover { text-decoration: underline; }

/* 登录 */
.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 70vh; }
.login-card { background: #fff; padding: 32px; border-radius: 12px; width: 340px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.login-logo { height: 40px; width: auto; display: block; margin-bottom: 20px; }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.login-card label { font-size: 12px; }
.muted { color: #667085; font-size: 13px; }
.hint { font-size: 12px; color: #98a2b3; margin-top: 12px; }

/* 考核 */
.question { background: #fff; border-radius: 8px; padding: 16px; margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.q-head { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #667085; margin-bottom: 6px; }
.q-no { font-weight: 700; color: #1f3a5f; }
.q-type { background: #eef4ff; color: #2563eb; padding: 1px 8px; border-radius: 8px; }
.q-score { margin-left: auto; }
.q-text { font-size: 15px; margin-bottom: 10px; font-weight: 600; }
.q-opts { display: flex; flex-direction: column; gap: 6px; }
.opt { font-size: 14px; font-weight: 400; display: flex; align-items: center; gap: 8px; cursor: pointer; }

.result-card { background: #fff; border-radius: 12px; padding: 28px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.result-card.pass { border-top: 4px solid #12b76a; }
.result-card.fail { border-top: 4px solid #f04438; }
.result-score { font-size: 40px; font-weight: 800; color: #1f3a5f; }
.result-score span { font-size: 18px; color: #98a2b3; }
.result-meta { color: #667085; margin-top: 6px; }
.result-allright { display: inline-block; color: #027a48; font-size: 14px; margin: 0 10px 6px 0; }

/* 错题回顾 */
.review-summary {
  display: flex; gap: 22px; align-items: center;
  background: #fff; border-radius: 12px; padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06); margin: 12px 0 4px;
}
.review-summary-score {
  font-size: 34px; font-weight: 800; color: #1f3a5f; line-height: 1.1; white-space: nowrap;
}
.review-summary-score span { font-size: 16px; font-weight: 600; color: #98a2b3; }
.review-summary-body { min-width: 0; }
.review-summary-title { font-size: 16px; font-weight: 700; color: #1f3a5f; margin-bottom: 4px; }
.review-summary-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag-bad { background: #fef3f2; color: #b42318; }
.tag-ok { background: #ecfdf3; color: #027a48; }
.tag-who { background: #eef4ff; color: #1d4ed8; font-weight: 600; }

.review-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.review-tab {
  font-size: 13px; padding: 6px 14px; border-radius: 8px;
  background: #fff; border: 1px solid #e4e7ec; color: #475467; text-decoration: none;
}
.review-tab:hover { border-color: #c7d3e3; color: #1f3a5f; }
.review-tab.is-on { background: #1f3a5f; border-color: #1f3a5f; color: #fff; font-weight: 600; }

.review-list { margin-top: 8px; }
.review-item {
  background: #fff; border-radius: 10px; padding: 16px 18px; margin: 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); border-left: 3px solid transparent;
}
.review-item.is-wrong { border-left-color: #f04438; }
.review-flag { font-size: 12px; padding: 1px 8px; border-radius: 8px; }
.review-flag.ok { background: #ecfdf3; color: #027a48; }
.review-flag.bad { background: #fef3f2; color: #b42318; }
.review-flag.blank { background: #fffaeb; color: #b54708; }

.review-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.review-opt {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 12px; border-radius: 6px; background: #f9fafb;
  font-size: 14px; color: #344054;
}
.review-opt.is-picked { background: #fef3f2; color: #b42318; }
.review-opt.is-correct { background: #ecfdf3; color: #027a48; }
.opt-key { flex: none; width: 16px; font-weight: 700; text-align: center; }
.opt-text { flex: 1; line-height: 1.6; word-break: break-word; }
.opt-tag {
  flex: none; align-self: center; font-size: 11px; line-height: 1.8;
  padding: 0 7px; border-radius: 8px; white-space: nowrap;
}
.opt-tag.ok { background: #d1fadf; color: #027a48; }
.opt-tag.bad { background: #fee4e2; color: #b42318; }

.review-ans {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e4e7ec;
  font-size: 13px; color: #667085;
}
.review-ans b { font-weight: 600; }
.rev-ok { color: #027a48; }
.rev-bad { color: #b42318; }
.review-empty {
  background: #fff; border-radius: 10px; padding: 26px 20px; margin: 12px 0;
  color: #667085; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.review-empty a { margin-left: 8px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 640px) {
  .review-summary { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; }
  .review-summary-score { font-size: 28px; }
  .review-ans { flex-direction: column; gap: 4px; }
  .review-item { padding: 14px; }
}

.course-content { background: #fff; border-radius: 8px; padding: 20px; line-height: 1.8; font-size: 15px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.progress-bar { background: #e4e7ec; border-radius: 8px; height: 10px; overflow: hidden; margin: 8px 0; }
.progress-fill { background: #12b76a; height: 100%; }
.q-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; border: 1px solid #eef1f5; padding: 10px; border-radius: 8px; }
.q-list-title { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: #344054; }
.opt.is-locked { cursor: default; align-items: flex-start; color: #475467; }
.opt .tag { flex: none; font-size: 11px; color: #175cd3; background: #eff8ff;
  border-radius: 4px; padding: 1px 6px; }

.alert { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.alert-info { background: #eff4ff; color: #1d4ed8; }
.alert-success { background: #ecfdf3; color: #027a48; }
.alert-error { background: #fef3f2; color: #b42318; }
.alert-warn { background: #fff4ec; color: #b54708; }

/* 试题批量工具栏 */
.batch-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.batch-import { display: inline-flex; gap: 8px; align-items: center; }
.batch-import input[type=file] { font-size: 13px; }

/* ---------- 课程类别 / 适用岗位 ---------- */
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.tag {
  display: inline-block; font-size: 12px; line-height: 1.7;
  padding: 1px 8px; border-radius: 10px; white-space: nowrap;
}
.tag-cat { background: #eef4ff; color: #1d4ed8; font-weight: 600; }
.tag-pos { background: #f2f4f7; color: #475467; }
.tag-more { background: #f2f4f7; color: #98a2b3; }

/* 筛选栏（课程中心 / 课程管理） */
.filter-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 12px 14px; margin: 12px 0 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.bar-gap { flex: 1; min-width: 8px; }
/* 用户管理：姓名 / 部门 / 岗位检索栏 */
.user-filter input[type="search"] { width: 200px; }
.user-filter select { width: 150px; }
.user-filter #user-filter-count { margin-left: auto; font-size: 13px; }
.tbl-users tbody tr.is-hidden { display: none; }
@media (max-width: 640px) {
  .user-filter input[type="search"], .user-filter select { width: 100%; }
  .user-filter #user-filter-count { margin-left: 0; }
}
.req { color: #d92d20; }
.nowrap { white-space: nowrap; }

/* 课程类别快捷筛选：一行类别 chips + 右侧岗位筛选 */
.course-filter {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  justify-content: space-between;
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 10px 14px; margin: 12px 0 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px; font-size: 13px; line-height: 1.6;
  background: #f5f7fa; border: 1px solid transparent; color: #475467;
  text-decoration: none; white-space: nowrap;
}
.cat-chip:hover { background: #e9eef5; color: #1f3a5f; border-color: #d7e0ea; text-decoration: none; }
.cat-chip .n { font-size: 12px; color: #98a2b3; }
.cat-chip.is-active { background: #1f3a5f; border-color: #1f3a5f; color: #fff; }
.cat-chip.is-active .n { color: rgba(255,255,255,.72); }
.course-filter-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.course-filter-form select { min-width: 118px; }

/* 工具栏行（新增按钮 / 筛选说明 + 右侧操作） */
.toolbar-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 0;
}
/* 新增课程面板：默认折叠，触发后展开 */
.add-panel {
  margin: 14px 0; padding: 16px 18px;
  border: 1px solid #e4e7ec; border-radius: 10px; background: #fbfcfe;
}

/* 多选控件组（适用岗位） */
.chk-group {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  border: 1px solid #d0d5dd; border-radius: 6px; padding: 10px 12px; background: #f8fafc;
}
.chk-group .chk { font-weight: 400; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.col-pick { width: 40px; text-align: center; }
.col-cat { width: 110px; }
.col-dept { width: 150px; }
.dept-inline { width: 100%; min-width: 120px; padding: 6px 8px; font-size: 13px; }
.col-pos { min-width: 160px; }
.col-desc { max-width: 220px; color: #475467; }
/* 学习路径：适用对象单元格（部门/公司全员 + 覆盖规模副行） */
.col-scope { min-width: 150px; }
.col-scope .scope-main { font-weight: 600; color: #1f3a5f; }
.col-scope .muted { line-height: 1.7; }
/* 学习路径列表：固定列宽，避免长描述把「期限/状态/操作」挤成竖排 */
.tbl-paths { table-layout: fixed; }
.tbl-paths th:nth-child(1) { width: 27%; }
.tbl-paths th:nth-child(2) { width: 20%; }
.tbl-paths th:nth-child(3) { width: 27%; }
.tbl-paths th:nth-child(4) { width: 9%; }
.tbl-paths th:nth-child(5) { width: 7%; }
.tbl-paths th:nth-child(6) { width: 9%; }
.tbl-paths td:nth-child(4), .tbl-paths td:nth-child(5) { white-space: nowrap; }
.tbl-paths th { white-space: nowrap; }
.tbl-paths td:nth-child(1) .muted { max-width: 100%; line-height: 1.7; }

/* 数据字典维护：分类折叠（默认收起，点标题展开） */
.dict-block {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 0 16px 4px; margin: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.dict-block > summary {
  display: flex; align-items: center; gap: 10px;
  list-style: none; cursor: pointer; padding: 14px 0; user-select: none;
}
.dict-block > summary::-webkit-details-marker { display: none; }
.dict-block > summary:hover .dict-title { color: #2563eb; }
.dict-caret {
  width: 0; height: 0; flex: none;
  border-left: 6px solid #98a2b3;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .15s;
}
.dict-block[open] > summary .dict-caret { transform: rotate(90deg); }
.dict-title { font-size: 15px; font-weight: 600; color: #1f2937; }
.dict-count { margin-left: auto; font-size: 12px; color: #98a2b3; }
.dict-block[open] > summary { padding-bottom: 10px; border-bottom: 1px solid #f1f4f8; margin-bottom: 10px; }
.dict-block:hover { border-color: #dbe4ef; }
.dict-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dict-edit input[name="name"] { flex: 1; min-width: 140px; }
/* 题库管理：同样按课程折叠，标题带题量角标 */
.bank-tag {
  font-size: 12px; font-weight: 500; color: #2563eb; background: #eff4ff;
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.bank-tbl { box-shadow: none; border: 1px solid #f1f4f8; margin: 0 0 10px; }
.bank-tbl th { background: #f7f9fc; font-size: 13px; }
.bank-tbl th:nth-child(1), .bank-tbl td:nth-child(1) { width: 88px; }
.bank-tbl th:nth-child(3), .bank-tbl td:nth-child(3) { width: 150px; }
.bank-tbl th:nth-child(4), .bank-tbl td:nth-child(4) { width: 64px; }
.bank-tbl th:nth-child(5), .bank-tbl td:nth-child(5) { width: 110px; white-space: nowrap; }
.bank-block > summary .dict-count { white-space: nowrap; }
@media (max-width: 720px) {
  .bank-block > summary { flex-wrap: wrap; }
  .bank-block > summary .dict-count { margin-left: 0; flex-basis: 100%; }
}
.dict-add {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 10px 0; padding: 12px 14px; background: #fff;
  border: 1px solid #eef1f5; border-radius: 8px;
}
.num-sm { width: 72px; text-align: center; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* 课件管理列表 */
.mat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mat-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #eef1f5; border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.mat-item .mat-icon { font-size: 18px; }
.mat-item .mat-name { font-weight: 600; }
.mat-item .mat-type { color: #667085; font-size: 12px; background: #f2f4f7; padding: 2px 8px; border-radius: 8px; }
.mat-item .mat-size { color: #98a2b3; font-size: 12px; margin-left: auto; }
.mat-item form, .mat-item a { margin-left: 4px; }
.mat-item { flex-wrap: wrap; }
.mat-preview-wrap { width: 100%; margin-top: 6px; border-top: 1px dashed #eef1f5; padding-top: 8px; }
.mat-preview-wrap summary { list-style: none; cursor: pointer; display: inline-block; }
.mat-preview-wrap summary::-webkit-details-marker { display: none; }
.mat-preview { margin-top: 10px; }
.mat-media, .mat-frame { width: 100%; max-width: 760px; border: 1px solid #eef1f5; border-radius: 8px; background: #000; }
.mat-media { max-height: 420px; }
.mat-frame { height: 520px; }
.mat-img { max-width: 100%; max-height: 480px; border-radius: 8px; border: 1px solid #eef1f5; }

/* 学习页课件展示 */
.materials { margin-top: 20px; }
.material { background: #fff; border: 1px solid #eef1f5; border-radius: 10px; padding: 16px; margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.mat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mat-head .mat-icon { font-size: 20px; }
.mat-head .mat-title { font-weight: 700; font-size: 15px; }
.mat-head .mat-badge { font-size: 12px; color: #2563eb; background: #eef4ff; padding: 2px 10px; border-radius: 10px; }
.mat-video { width: 100%; max-height: 420px; border-radius: 8px; background: #000; }
.mat-pdf { width: 100%; height: 560px; border: 1px solid #e4e7ec; border-radius: 8px; }
.mat-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.mat-actions .mat-size { color: #98a2b3; font-size: 12px; }
.mat-nodl { color: #98a2b3; font-size: 12px; }
/* 多课件课程：课件条目折叠，展开后才加载内嵌阅读器 */
.mat-fold { background: #fff; border: 1px solid #eef1f5; border-radius: 10px; padding: 14px 16px; margin: 10px 0; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.mat-fold > summary { list-style: none; cursor: pointer; margin: 0; }
.mat-fold > summary::-webkit-details-marker { display: none; }
.mat-fold > summary.mat-head { margin-bottom: 0; }
.mat-fold > summary .mat-title { flex: 1; min-width: 0; }
.mat-fold > summary .mat-size { color: #98a2b3; font-size: 12px; flex: none; }
.mat-fold > summary .mat-caret { width: 0; height: 0; flex: none;
  border-left: 6px solid #98a2b3; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform .15s; margin-left: 4px; }
.mat-fold[open] > summary .mat-caret { transform: rotate(90deg); }
.mat-fold[open] > summary { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f1f4f8; }
.mat-fold:hover { border-color: #dbe4ef; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* ---------- PDF 在线预览组件（上下滚动连续翻页） ---------- */
.pdf-viewer {
  border: 1px solid #e4e7ec; border-radius: 8px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column;
}
.pv-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid #e4e7ec;
}
.pv-btn {
  background: #fff; color: #344054; border: 1px solid #d0d5dd; border-radius: 6px;
  padding: 4px 10px; font-size: 13px; cursor: pointer; line-height: 1.6;
}
.pv-btn:hover { background: #eff4ff; color: #1d4ed8; border-color: #b2ccff; }
.pv-btn:disabled { opacity: .4; cursor: default; background: #fff; color: #667085; border-color: #e4e7ec; }
.pv-dl { text-decoration: none; }
.pv-dl:hover { text-decoration: none; }
.pv-pager { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #475467; }
.pv-page-input { width: 58px; padding: 4px 6px; font-size: 13px; text-align: center; }
.pv-zoom { font-size: 13px; color: #475467; min-width: 44px; text-align: center; }
.pv-gap { flex: 1; }
.pv-hint { font-size: 12px; color: #98a2b3; white-space: nowrap; }
/* 翻页 / 缩放各成一组，工具栏不再是一排散落的按钮 */
.pv-group { display: inline-flex; align-items: center; gap: 6px; }
.pv-unit { font-size: 12px; color: #98a2b3; white-space: nowrap; }
/* 连续滚动舞台：纵向滚动逐页往下读，页码随视口自动更新 */
.pv-stage {
  position: relative; height: 560px; overflow-y: auto; overflow-x: auto;
  background: #e9edf2; cursor: default; outline: none;
  padding: 12px 0; touch-action: pan-y; -webkit-overflow-scrolling: touch;
}
.pv-stage::-webkit-scrollbar { width: 10px; height: 10px; }
.pv-stage::-webkit-scrollbar-thumb { background: #c3cbd8; border-radius: 6px; }
.pv-stage::-webkit-scrollbar-thumb:hover { background: #aab4c4; }
.pv-stage::-webkit-scrollbar-track { background: transparent; }
/* 页面纵向堆叠：不放大时按容器宽度居中，放大后可左右滚动 */
.pv-pages {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: max-content; min-width: 100%;
}
.pv-page {
  position: relative; flex: none; background: #fff; border-radius: 2px;
  box-shadow: 0 2px 14px rgba(16, 24, 40, .18); overflow: hidden;
}
.pv-page-canvas { display: block; width: 100%; height: 100%; background: #fff; }
/* 该页还没画完：给一行浅色提示，避免长文档滚太快时看着像空白页 */
.pv-page.is-pending::after {
  content: '正在渲染…'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #b0b8c4; font-size: 13px; letter-spacing: .04em; pointer-events: none;
}
.pv-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #667085; font-size: 13px; background: #eef1f5; z-index: 2;
}
.pdf-viewer.is-ready .pv-loading { display: none; }
.pv-reopen { display: none; margin: 10px; }
.pdf-viewer.is-collapsed .pv-bar,
.pdf-viewer.is-collapsed .pv-stage { display: none; }
.pdf-viewer.is-collapsed .pv-reopen { display: inline-block; }

/* 全屏（原生 Fullscreen API） */
.pdf-viewer:fullscreen { border: 0; border-radius: 0; height: 100%; }
.pdf-viewer:fullscreen .pv-stage { flex: 1; height: auto; min-height: 0; }
.pdf-viewer:-webkit-full-screen { border: 0; border-radius: 0; height: 100%; }
.pdf-viewer:-webkit-full-screen .pv-stage { flex: 1; height: auto; min-height: 0; }
/* 降级：浏览器不支持 Fullscreen API 时铺满窗口 */
.pdf-viewer.is-max {
  position: fixed; inset: 0; z-index: 9999; border: 0; border-radius: 0;
  box-shadow: 0 0 0 100vmax #f4f6f9;
}
.pdf-viewer.is-max .pv-stage { flex: 1; height: auto; min-height: 0; }

@media (max-width: 640px) {
  /* 窄屏：竖屏下按宽度铺满更接近手机看文档的体验 */
  .pv-stage { height: 400px; }
  .pv-hint { display: none; }
  .study-overlay .pv-stage { height: auto; }
}

/* ---------- 学习进度可视化 ---------- */
.status-badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 12px; font-weight: 600; line-height: 1.7;
}
.st-idle { background: #f2f4f7; color: #667085; }
.st-doing { background: #eff4ff; color: #1d4ed8; }
.st-done { background: #ecfdf3; color: #027a48; }
.progress-fill.fill-not_started { background: #98a2b3; }
.progress-fill.fill-in_progress { background: #2563eb; }
.progress-fill.fill-completed { background: #12b76a; }
.st-num-idle { color: #667085; }
.st-num-doing { color: #2563eb; }
.st-num-done { color: #12b76a; }

.progress-panel {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 16px 18px; margin: 14px 0; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.pp-head { display: flex; align-items: center; gap: 12px; }
.pp-head h3 { margin: 0; font-size: 15px; }
.sec-list { list-style: none; margin: 10px 0 0; padding: 0; }
.sec-list li {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 6px 0; border-top: 1px dashed #eef1f5;
}
.sec-list li:first-child { border-top: none; }
.sec-mark { width: 16px; text-align: center; }
.sec-done .sec-mark { color: #12b76a; }
.sec-todo .sec-mark { color: #98a2b3; }
.sec-name { font-weight: 600; min-width: 140px; }
.sec-detail { color: #667085; }
.sec-done .sec-name { color: #027a48; }

.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.prog-card { background: #fff; border: 1px solid #eef1f5; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.prog-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-weight: 700; }

.rules { margin-top: 12px; border-top: 1px dashed #eef1f5; padding-top: 10px; }
.rules summary { cursor: pointer; font-size: 13px; color: #2563eb; }
.rules-list { margin: 8px 0 0; padding-left: 20px; font-size: 13px; color: #475467; line-height: 1.9; }
.rules-list b { color: #344054; }

/* ---------- 顶栏自适应（菜单项增多后可换行） ---------- */
.topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 24px; }
.nav { flex-wrap: wrap; row-gap: 2px; }
.nav-item a { padding: 6px 9px; font-size: 14px; }

/* ---------- 标准学习路径 / 学习任务 ---------- */
.add-panel .form-grid { border: 0; box-shadow: none; background: transparent; padding: 0; margin-top: 12px; }
/* 学习内容（课程）：表单内摘要 + 弹窗选课排序 */
.course-picker { margin-top: 2px; }
.pick-current { border: 1px solid #e4e7ec; border-radius: 8px; background: #fbfcfe; padding: 10px 12px; }
.pick-current .pick-empty { margin: 0; color: #98a2b3; font-size: 13px; }
.pick-summary { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pick-summary li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: #1f2733; }
.pick-summary .n {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 4px;
  background: #e8effc; color: #1d4ed8; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.pick-summary .t { font-weight: 500; }
.pick-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

/* 通用弹窗 */
.modal { position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.45); }
.modal-panel {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: 100%; max-width: 940px; max-height: 86vh;
  background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24);
  overflow: hidden;
}
.modal-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #e4e7ec;
}
.modal-head h3 { margin: 0; font-size: 15px; color: #101828; }
.modal-x {
  width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent;
  font-size: 18px; line-height: 1; color: #667085; cursor: pointer;
}
.modal-x:hover { background: #f2f4f7; color: #101828; }
.modal-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.modal-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-top: 1px solid #e4e7ec; background: #fbfcfe;
}
.modal-foot-ops { display: flex; gap: 8px; }
body.modal-lock { overflow: hidden; }

/* 弹窗左栏：按类别分组勾选 */
.picker-left, .picker-right { min-width: 0; display: flex; flex-direction: column; }
.picker-left { border-right: 1px solid #e4e7ec; }
.picker-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid #eef1f5;
  font-size: 13px; color: #344054;
}
.picker-bar input[type="search"] {
  width: 100%; padding: 7px 10px; font-size: 13px; border: 1px solid #d0d5dd; border-radius: 6px;
}
.pick-groups { flex: 1; min-height: 0; overflow: auto; padding: 6px 0 12px; }
.pick-group { border-bottom: 1px solid #f2f4f7; }
.pick-group:last-child { border-bottom: 0; }
.pick-group.is-hidden { display: none; }
.pick-group > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; font-size: 13px; font-weight: 600; color: #1f3a5f;
  cursor: pointer; list-style: none; user-select: none;
}
.pick-group > summary::-webkit-details-marker { display: none; }
.pick-group > summary:hover { background: #f8fafc; }
.pick-group > summary .g-name { display: inline-flex; align-items: center; gap: 6px; }
.pick-group > summary .g-name::before {
  content: ""; width: 0; height: 0; border-left: 4px solid #98a2b3;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform 0.12s ease;
}
.pick-group[open] > summary .g-name::before { transform: rotate(90deg); }
.pick-group > summary .g-count {
  font-weight: 400; color: #98a2b3; font-size: 12px; font-variant-numeric: tabular-nums;
}
.pick-items { list-style: none; margin: 0; padding: 0 14px 8px 26px; }
.pick-item {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px;
  border-radius: 6px; font-size: 13px; color: #344054; cursor: pointer;
}
.pick-item:hover { background: #f5f8fd; }
.pick-item.is-hidden { display: none; }
.pick-item input[type="checkbox"] { flex: 0 0 auto; }
.pick-item .pick-title { line-height: 1.5; }

/* 弹窗右栏：已选顺序 */
.picked-list { flex: 1; min-height: 0; overflow: auto; list-style: none; margin: 0; padding: 10px 14px 16px; }
.picked-empty { color: #98a2b3; font-size: 13px; padding: 10px 2px; }
.picked-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid #e4e7ec; border-radius: 8px; background: #fff;
  font-size: 13px; cursor: grab;
}
.picked-item:hover { border-color: #c7d7fe; background: #fcfdff; }
.picked-item.is-dragging { opacity: 0.45; }
.picked-no {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px;
  background: #e8effc; color: #1d4ed8; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.picked-title { flex: 1; min-width: 0; color: #1f2733; }
.picked-cat { flex: 0 0 auto; color: #98a2b3; font-size: 12px; }
.picked-ops { flex: 0 0 auto; display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.picked-item:hover .picked-ops, .picked-item:focus-within .picked-ops { opacity: 1; }
.picked-ops .mini {
  width: 22px; height: 22px; padding: 0; border: 1px solid #e4e7ec; border-radius: 5px;
  background: #fff; color: #475467; font-size: 12px; line-height: 1; cursor: pointer;
}
.picked-ops .mini:hover { border-color: #c7d7fe; color: #1d4ed8; background: #f5f8fd; }
.picked-ops .mini.x:hover { border-color: #fda29b; color: #b42318; background: #fef3f2; }
@media (hover: none) { .picked-ops { opacity: 1; } }
@media (max-width: 760px) {
  .modal { padding: 0; }
  .modal-panel { max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .modal-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .picker-left { border-right: 0; border-bottom: 1px solid #e4e7ec; }
  .picker-right { max-height: 46vh; }
}
.row-ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form select, .inline-form input[type="date"] { padding: 4px 6px; font-size: 13px; }
/* 任务列表操作列：查看进度 + 删除 同排居中，纵向对齐 */
.task-ops { display: inline-flex; align-items: center; gap: 10px; }
.task-ops form { margin: 0; }
.btn-mini {
  padding: 3px 9px; font-size: 12px; background: #fff; color: #2563eb;
  border: 1px solid #c7d7fe; border-radius: 6px; cursor: pointer;
}
.btn-mini:hover { background: #eff4ff; }
.col-progress { width: 150px; }
.overdue-txt { color: #b42318; font-size: 12px; }
.st-exempt { background: #fff4e5; color: #b54708; }
.st-overdue { background: #fef3f2; color: #b42318; }

/* 指派页：员工筛选与勾选 */
.assign-filter { margin: 8px 0; display: block; }
.assign-filter-caption { font-size: 13px; color: #667085; margin-bottom: 6px; }
.assign-filter-cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.assign-filter-cols select { width: 100%; }
.assign-filter-foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 10px;
}
.assign-filter-foot .chk { margin: 0; }
.assign-filter-foot #assign-count { margin-left: auto; }
@media (max-width: 720px) {
  .assign-filter-cols { grid-template-columns: 1fr; }
}
.assign-tbl tbody tr.is-hidden { display: none; }
.assign-tbl td { vertical-align: middle; }
.assign-tbl .muted { font-size: 12px; }
.task-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 18px; }
/* ---------- 任务详情页：精简头部 / 紧凑指标 / 操作收纳 ---------- */
.task-hero { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.task-hero-title { margin: 0; font-size: 19px; }
.task-hero-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0 0; font-size: 13px; }
.task-meta b { color: #344054; font-weight: 600; }
.task-note { margin: 6px 0 0; font-size: 13px; }
.cards.cards-tight { gap: 12px; margin: 14px 0 4px; }
.cards.cards-tight .card { padding: 14px 12px; }
.cards.cards-tight .card .num { font-size: 24px; line-height: 1.2; }
.cards.cards-tight .card .lbl { font-size: 12px; margin-top: 2px; }
.st-num-overdue { color: #b42318; }
.task-actions .action-label { font-size: 13px; color: #475467; }
.more-ops { position: relative; }
.more-ops > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.more-ops > summary::-webkit-details-marker { display: none; }
.more-ops[open] > summary { background: #eff4ff; }
.more-ops .caret { font-size: 10px; color: #667085; }
.more-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; min-width: 186px;
  display: flex; flex-direction: column; background: #fff; border: 1px solid #e4e7ec;
  border-radius: 10px; padding: 6px; box-shadow: 0 10px 24px rgba(16,24,40,.12);
}
.more-panel form { margin: 0; }
.more-panel button, .more-panel a {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: #344054; padding: 8px 10px; border-radius: 6px; font-size: 13px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.more-panel button:hover, .more-panel a:hover { background: #f4f6fa; color: #1d4ed8; }
.more-panel .link-danger { color: #b42318; }
.more-panel .link-danger:hover { background: #fef3f2; color: #b42318; }
.h3-sub { margin-left: 8px; font-size: 13px; font-weight: 400; color: #667085; }
.tbl-members td { vertical-align: middle; }
.cell-strong { font-weight: 600; color: #1f3a5f; }
.cell-sub { font-size: 12px; margin-top: 2px; }
.cell-progress-txt { margin-top: 4px; font-size: 12px; }
/* 学员明细页：返回链接 / 折叠的追加课程表单 */
.page-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title-row h2 { margin: 0; }
.back-link { font-size: 13px; color: #2563eb; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.muted.small { font-size: 13px; }
details.add-course { margin: 8px 0 12px; }
details.add-course > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
details.add-course > summary::-webkit-details-marker { display: none; }
details.add-course[open] > summary { background: #eff4ff; }
details.add-course > form { margin-top: 10px; }

/* 员工端：我的学习任务 */
.task-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.task-card {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.task-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-head h3 { margin: 0; font-size: 16px; }
/* 任务标题处统一的学习入口（开始/继续/再次学习），靠右对齐 */
.task-path-cta { margin-left: auto; white-space: nowrap; }
.task-card p { margin: 6px 0; }
.task-course-list { list-style: none; margin: 8px 0 0; padding: 0; }
.task-course {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 0; border-top: 1px dashed #eef1f5; font-size: 13px;
}
.task-course:first-child { border-top: none; }
.task-course-name { font-weight: 600; min-width: 180px; }
.task-course-act { margin-left: auto; }

/* 员工端：考核待办（学完自动生成） */
.exam-todo-box {
  background: #fff; border: 1px solid #f3e3d8; border-left: 3px solid #c4674b;
  border-radius: 10px; padding: 14px 18px; margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.exam-todo-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.exam-todo-head h3 { margin: 0; font-size: 15px; }
.exam-todo-list { list-style: none; margin: 8px 0 0; padding: 0; }
.exam-todo-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px dashed #f0e2da; font-size: 13px;
}
.exam-todo-row:first-child { border-top: none; }
.exam-todo-main { flex: 1; min-width: 220px; }
.exam-todo-sub { font-size: 12px; margin-top: 3px; }
.exam-todo-act { flex: none; }
/* 考核页卡片上的待办标记 */
.todo-flag {
  display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 4px;
  background: #fff4ec; color: #b54708; font-size: 12px; font-weight: 600;
}
.todo-flag.done { background: #ecfdf3; color: #067647; }
.input-sm { padding: 5px 8px; font-size: 13px; width: 150px; }

/* 顶栏未读提醒角标 */
.nav-badge {
  display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px;
  background: #d92d20; color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 16px; text-align: center; font-weight: 600;
}

/* 信息提醒 */
.notice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.notice {
  background: #fff; border: 1px solid #eef1f5; border-left: 3px solid #e4e7ec;
  border-radius: 10px; padding: 13px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.notice-unread { border-left-color: #2563eb; background: #fbfdff; }
.notice-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-head b { font-size: 14px; color: #101828; }
.notice-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #d92d20; flex: none;
}
.notice-kind {
  font-size: 11px; color: #2563eb; background: #eff4ff;
  border-radius: 4px; padding: 1px 6px;
}
.notice-time { margin-left: auto; font-size: 12px; }
.notice-body { margin: 8px 0 0; font-size: 13px; color: #475467; line-height: 1.7; }
.notice-act { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.link-plain {
  background: none; border: 0; padding: 0; color: #667085;
  font-size: 12px; cursor: pointer; text-decoration: underline;
}
.link-plain:hover { color: #2563eb; }
.unread-num { color: #d92d20; }

/* 管理员端信息提醒：按提醒类型着色 + 类型筛选 */
.notice-kind.tag-assign { color: #2563eb; background: #eff4ff; }
.notice-kind.tag-progress { color: #067647; background: #ecfdf3; }
.notice-kind.tag-exam { color: #b54708; background: #fff4ec; }
.notice-kind.tag-overdue { color: #b42318; background: #fef3f2; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ftab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 1px solid #e4e7ec; border-radius: 999px;
  font-size: 13px; color: #475467; background: #fff; text-decoration: none;
}
.ftab:hover { border-color: #b2ccff; color: #2563eb; text-decoration: none; }
.ftab.active { background: #eff4ff; border-color: #b2ccff; color: #2563eb; font-weight: 600; }
.ftab-cnt { font-size: 12px; color: #98a2b3; font-weight: 400; }
.ftab-dot {
  min-width: 16px; padding: 0 5px; background: #d92d20; color: #fff;
  border-radius: 9px; font-size: 11px; line-height: 16px; text-align: center;
}

/* 用户管理：新增行高亮与操作区附注 */
.row-new td { background: #f0f7ff; }
.row-sub { width: 100%; font-size: 12px; }
.row-sub a { font-size: 12px; }

/* ============ 管理员首页：培训运营仪表盘 ============ */
.container-wide { max-width: 1180px; }

.page-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 4px; }
.page-head h2 { margin: 0 0 6px; }
.page-head .muted { max-width: 720px; line-height: 1.7; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

/* 核心指标卡 */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 18px 0 4px; }
/* 概览页：8 项关键指标按 2 行 × 4 列排布 */
.kpi-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 8px; }
.kpi {
  background: #fff; border-radius: 10px; padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 3px solid #2563eb;
}
.kpi-warn { border-left-color: #f04438; }
.kpi-warn .kpi-value { color: #b42318; }
.kpi-label { font-size: 13px; color: #667085; }
.kpi-value { font-size: 26px; font-weight: 700; color: #1f3a5f; margin-top: 8px; line-height: 1.15; }
.kpi-value small { font-size: 13px; font-weight: 600; color: #98a2b3; margin-left: 3px; }
.kpi-sub { font-size: 12px; color: #98a2b3; margin-top: 6px; line-height: 1.5; }
.kpi-sub b { color: #344054; }
.kpi-warn-txt { color: #d92d20; }

/* 区块 */
.dash-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dash-2col > * { min-width: 0; }
.dash-section {
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); margin: 16px 0;
}
.dash-section h3 { margin: 0; font-size: 15px; color: #1f3a5f; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-head .muted { font-size: 12px; }
.dash-section .tbl { box-shadow: none; }
.dash-section .tbl th { background: #f7f9fc; font-size: 13px; white-space: nowrap; }
.dash-section .tbl td { font-size: 13px; }
.danger { color: #d92d20; }

/* 待关注事项：同一行排列，超出自动换行 */
.todo-line { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: #475467; line-height: 1.9; }
.todo-item { position: relative; }
.todo-line > .todo-item + .todo-item::before {
  content: "·"; position: absolute; left: -13px; color: #c7ccd6;
}
.todo-line a { font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* 迷你进度条 */
.mini-bar { display: inline-block; width: 64px; height: 6px; background: #eef1f5; border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.mini-bar i { display: block; height: 100%; background: #2563eb; border-radius: 3px; }
.mini-bar i.ok { background: #12b76a; }
.mini-bar i.warn { background: #f04438; }

/* 学习动态列表 */
.rec-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.rec-list li { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed #eef1f5; }
.rec-list li:last-child { border-bottom: none; }
.rec-name { font-weight: 600; color: #344054; min-width: 52px; }
.rec-course { color: #475467; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-time { font-size: 12px; }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 13px 14px; }
  .kpi-value { font-size: 22px; }
  .dash-2col { grid-template-columns: 1fr; }
  .dash-section { padding: 14px 14px; }
  /* 窄屏顶栏：改为可横向滚动，避免菜单撑成竖排 */
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 14px; gap: 10px 16px; }
  /* 第一行放 logo + 用户区，导航整行下移并横向滚动 */
  .brand { order: 0; }
  .userbox { order: 1; margin-left: auto; }
  .nav { order: 2; flex: 1 0 100%; min-width: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .nav-item a { white-space: nowrap; }
}

/* 仪表盘表格：窄屏横向滚动，避免列被压扁 */
.tbl-wrap { overflow-x: auto; }
.tbl-wrap .tbl { min-width: 560px; }
/* 学习路径表列更多，窄屏保留更宽的最小宽度，防止表头/操作被挤成竖排 */
@media (max-width: 900px) { .tbl-wrap .tbl-paths { min-width: 860px; } }
/* 用户管理七列内容在窄屏易被压成竖排，改为容器内横向滚动 */
@media (max-width: 900px) { .tbl-wrap .tbl-users { min-width: 780px; } }
@media (min-width: 901px) { .tbl-wrap .tbl { min-width: 0; } }

/* ---------------- 学完即考：完成弹窗 ---------------- */
/* 学习任务里的课程学完后浮出，二选一：开始考核 / 再次学习。层级高于学习层（900）。 */
.exam-prompt { position: fixed; inset: 0; z-index: 1000; display: none; }
.exam-prompt.is-open { display: flex; align-items: center; justify-content: center; padding: 20px; }
body.exam-lock { overflow: hidden; }
.exam-prompt-mask {
  position: absolute; inset: 0;
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(2px);
}
.exam-prompt-card {
  position: relative; z-index: 1;
  width: min(440px, 100%);
  background: #fff; border-radius: 16px;
  padding: 30px 28px 22px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .28);
  text-align: center;
  animation: examPopup .24s ease-out;
}
@keyframes examPopup {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.exam-prompt-icon {
  width: 54px; height: 54px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; border-radius: 50%;
  background: #fdf1ec; border: 1px solid #f6d9cf;
}
.exam-prompt-card h3 { margin: 0 0 8px; font-size: 19px; color: #1f2733; }
.exam-prompt-lead { margin: 0 0 18px; color: #475467; font-size: 14px; line-height: 1.65; }
.exam-prompt-meta {
  list-style: none; margin: 0 0 20px; padding: 12px 14px;
  background: #f7f8fa; border-radius: 10px;
  display: grid; gap: 8px;
}
.exam-prompt-meta li { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.exam-prompt-meta span { color: #98a2b3; }
.exam-prompt-meta b { color: #1f2733; font-weight: 600; text-align: right; }
.exam-prompt-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.exam-prompt-acts .btn { min-width: 122px; justify-content: center; }
.exam-prompt-tip { margin: 14px 0 0; color: #98a2b3; font-size: 12px; line-height: 1.6; }
.exam-entry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exam-passed-note { color: #027a48; font-size: 14px; }
.exam-hint { font-size: 12px; }
/* 任务详情「课程明细」：员工/课程列不换行，给考核小字留出宽度 */
/* 学员课程明细表：课程 / 当前状态 / 期限 / 状态与期限 / 替换课程 */
.tbl-task-items td:nth-child(1) { min-width: 200px; }
.tbl-task-items td:nth-child(2) .muted { white-space: nowrap; }
.tbl-task-items td:nth-child(3) { white-space: nowrap; }
.tbl-task-items td:nth-child(4) .inline-form select[name="op"] { flex: 1 0 100%; }
.tbl-task-items td:nth-child(4) .inline-form input[type="date"] { width: 118px; }
.tbl-task-items td:nth-child(5) .inline-form select[name="course_id"] { flex: 1 0 100%; }
@media (max-width: 480px) {
  .exam-prompt-card { padding: 24px 18px 18px; }
  .exam-prompt-acts { flex-direction: column-reverse; }
  .exam-prompt-acts .btn { width: 100%; }
}

/* ---------------- 沉浸式学习层（开始学习 → 课件全屏） ---------------- */
/* 进入后整层固定铺满视口，只有课件本体 + 顶部一条操作栏，不设左侧列表。 */
.study-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 14px; }
.study-cta-tip { color: #98a2b3; font-size: 12px; }
.study-start { padding: 9px 22px; font-weight: 600; border-radius: 8px; }

.study-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: none; flex-direction: column;
  background: #0d1520;
}
.study-overlay.is-open { display: flex; }
body.study-lock { overflow: hidden; }

.study-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 16px; flex-wrap: wrap;
  background: #16233a; border-bottom: 1px solid #24344f; color: #dbe6f5;
}
.study-btn {
  background: #22324d; color: #e6eefb; border: 1px solid #334867;
  padding: 6px 12px; border-radius: 7px; font-size: 13px; cursor: pointer;
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.study-btn:hover { background: #2d4166; color: #fff; text-decoration: none; }
.study-exit { background: #3a2230; border-color: #5c3547; color: #ffd9e2; }
.study-exit:hover { background: #4c2b3c; color: #fff; }
.study-sep { width: 1px; height: 18px; background: #334867; }
.study-course { font-weight: 700; font-size: 14px; color: #fff; }
.study-mat { font-size: 13px; color: #93a8c8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-gap { flex: 1; }
/* 顶部条按「操作 / 标题 / 学习控制」三组归拢，不再十来个元素平铺一行 */
.study-group { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.study-group-left, .study-group-right { flex: 0 0 auto; }
.study-group-title { flex: 0 1 auto; min-width: 0; }
.study-title-arrow { flex: 0 0 auto; color: #5c7396; font-size: 14px; }
/* 顶部右侧：把「计时器 + 课件位置」归为学习状态一组，与翻页 / 完成按钮用竖线分隔 */
.study-state { display: inline-flex; align-items: center; gap: 8px; }
.study-sep-right { margin: 0 2px; }
/* 独立常驻学习计时器：显示当前课件已学时长 / 最低要求，不随「我已学完」按钮状态消失 */
.study-timer {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  border: 1px solid #33445c; background: #1b2737; color: #9fb0c6;
}
.study-timer[hidden] { display: none; }
.study-timer.is-pending { color: #f2c97d; border-color: #5c4a2a; background: #2a2417; }
.study-timer.is-ok,
.study-timer.is-done { color: #8ee0a8; border-color: #2f5c40; background: #16281d; }
.study-pos { font-size: 12px; color: #93a8c8; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 与 PDF 工具栏的「x / y 页」区分：这里标的是第几份课件 */
.study-pos::before { content: '课件 '; color: #6f88ab; }
.study-dl { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.study-dl:hover { background: #2563eb; border-color: #2563eb; }
/* 学习层内：直接跳转到「我的任务」界面的入口 */
.study-tasks-btn { background: #1f3a2e; border-color: #2c6b4a; color: #d7ffe9; }
.study-tasks-btn:hover { background: #27503f; color: #fff; text-decoration: none; }

/* 学习层：学完课件后的轻提示，提供「前往我的任务」快捷入口 */
.study-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 920; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 11px 16px; border-radius: 999px;
  background: rgba(20, 32, 52, .96); border: 1px solid #2c6b4a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color: #e6eefb; font-size: 14px;
  animation: studyToastIn .25s ease;
}
.study-toast[hidden] { display: none; }
.study-toast-ic { color: #4ade80; font-weight: 700; }
.study-toast-tx { color: #dbe6f5; }
.study-toast-link {
  color: #fff; background: #2c6b4a; border: 1px solid #3a8a5f;
  padding: 5px 12px; border-radius: 999px; text-decoration: none;
  font-weight: 600; white-space: nowrap;
}
.study-toast-link:hover { background: #338157; color: #fff; text-decoration: none; }
.study-toast-cancel {
  background: transparent; border: 1px solid #46607f; color: #b9c9de;
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.study-toast-cancel:hover { background: #24364f; color: #fff; }
.study-toast-cancel[hidden] { display: none; }
@keyframes studyToastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .study-toast { animation: none; } }

.study-body { position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; background: #0d1520; }
.study-pane { display: none; flex: 1; min-width: 0; min-height: 0; align-items: center; justify-content: center; padding: 0; }
.study-pane.is-active { display: flex; }
.study-text { overflow: auto; align-items: flex-start; background: #fff; }
.study-article { max-width: 900px; margin: 0 auto; padding: 40px 32px 80px; line-height: 1.9; color: #1f2733; font-size: 15px; }
.study-video { width: 100%; height: 100%; max-height: 100%; background: #000; object-fit: contain; }

/* ---- 视频课件学习约束：只读进度条 + 播放/暂停 + 倍速档位 ----
   不渲染原生 controls（原生时间线可拖拽快进）；禁拖 / 倍速上限 / 自动播放
   由 static/app.js 的 bindGuardedVideo() 与学习层 activate() 保证。 */
.lp-video {
  position: relative; width: 100%; height: 100%; min-height: 0;
  align-self: stretch; display: flex; flex-direction: column;
  background: #000; overflow: hidden;
}
.lp-video-el { flex: 1 1 auto; min-height: 0; width: 100%; background: #000; object-fit: contain; }
/* 课程详情页「课件资料」折叠区：给固定高度，避免撑破卡片 */
.lp-video--block { height: 420px; }
.lp-video-tap {
  position: absolute; inset: 0 0 44px 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; background: rgba(6, 12, 22, .72); color: #e8eefb; text-align: center;
}
.lp-video-tap[hidden] { display: none; }
.lp-video-tap p { margin: 0; font-size: 13px; color: #b9c9de; }
.lp-video-tap-btn {
  border: 0; border-radius: 999px; padding: 12px 26px; font-size: 15px;
  font-weight: 600; cursor: pointer; color: #fff; background: #2563eb;
}
.lp-video-tap-btn:hover { background: #1d4ed8; }
.lp-video-ctl {
  flex: 0 0 auto; height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: #111a28; border-top: 1px solid #243349;
  color: #dbe6f5; font-size: 12px;
}
.lp-v-toggle {
  flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #3b5373;
  border-radius: 6px; background: #1b2940; color: #e8eefb;
  font-size: 13px; cursor: pointer; line-height: 1;
}
.lp-v-toggle:hover { background: #25385a; }
.lp-v-track {
  flex: 1 1 auto; min-width: 40px; height: 6px; border-radius: 999px;
  background: #2a3b55; overflow: hidden; cursor: default;
}
.lp-v-fill { height: 100%; width: 0; border-radius: 999px; background: #3b82f6; transition: width .15s linear; }
.lp-v-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: #a9bbd3; white-space: nowrap; }
.lp-v-rates { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.lp-v-rates-lb { color: #8ea3c0; margin-right: 2px; }
.lp-v-rate {
  border: 1px solid #3b5373; background: transparent; color: #c6d6ee;
  border-radius: 5px; padding: 3px 8px; font-size: 12px; cursor: pointer;
}
.lp-v-rate:hover { border-color: #6b8fc9; color: #fff; }
.lp-v-rate.is-on { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.lp-v-hint { flex: 0 0 auto; color: #8ea3c0; white-space: nowrap; }
@media (max-width: 900px) {
  .lp-v-hint { display: none; }
  .lp-video--block { height: 320px; }
}
.study-img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; }
.study-office { width: 100%; height: 100%; border: 0; background: #f4f6f9; }
.study-fallback { color: #dbe6f5; text-align: center; padding: 40px; }

/* 学习层内的 PDF 组件：撑满视口高度，去掉圆角与页内留白 */
.study-overlay .pdf-viewer {
  width: 100%; height: 100%; align-self: stretch; min-height: 0;
  border: 0; border-radius: 0; box-shadow: none;
}
.study-overlay .pv-bar { background: #fff; border-bottom: 1px solid #e4e7ec; flex: 0 0 auto; gap: 10px; }
.study-overlay .pv-stage { flex: 1; height: auto; min-height: 0; }
/* 学习层：翻页 / 缩放各成一块浅底功能组，中间留白不再是散落控件 */
.study-overlay .pv-group-page,
.study-overlay .pv-group-zoom {
  background: #f1f5f9; border: 1px solid #e4e7ec; border-radius: 8px; padding: 3px;
}
.study-overlay .pv-group .pv-btn { background: transparent; border-color: transparent; }
.study-overlay .pv-group .pv-btn:hover { background: #fff; border-color: #b2ccff; color: #1d4ed8; }
.study-overlay .pv-group .pv-btn:disabled { background: transparent; border-color: transparent; }
.study-overlay .pv-page-input { background: #fff; }
/* 学习层已是全屏：隐藏 PDF 工具栏里重复的「全屏 / 关闭 / 下载」，
   以及被挤到边缘截断的「点击放大 · 左右键翻页」提示（详情说明见课程页） */
.study-overlay .pv-bar [data-act="fullscreen"],
.study-overlay .pv-bar [data-act="close"],
.study-overlay .pv-bar .pv-dl,
.study-overlay .pv-hint { display: none; }

@media (max-width: 900px) {
  .study-bar { gap: 6px; padding: 6px 10px; }
  .study-course, .study-sep, .study-title-arrow { display: none; }
  .study-group { gap: 6px; }
  .study-btn { padding: 5px 9px; font-size: 12px; }
  .study-timer { font-size: 11px; padding: 3px 7px; }
}

/* 学习层：人工兜底「我已学完」 */
.study-done-btn { background: #16452f; border-color: #2c6b4a; color: #d7ffe9; }
.study-done-btn:hover { background: #1c5a3d; color: #fff; }
.study-done-btn:disabled { opacity: .6; cursor: default; }
/* 未达到最低学习时长：按钮置灰，只显示还差多久，不可点击 */
.study-done-btn.is-gated { background: #1b2737; border-color: #33445c; color: #9fb0c6;
  opacity: 1; cursor: not-allowed; font-variant-numeric: tabular-nums; }
.study-done-btn.is-gated:hover { background: #1b2737; color: #9fb0c6; }

/* 课件完成后居中浮出的「继续下一课件学习」：不遮挡课件翻阅，由学员主动点击才跳转 */
.study-continue {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.study-continue[hidden] { display: none; }
.study-continue-card {
  pointer-events: auto;
  min-width: 330px; max-width: min(88vw, 460px);
  padding: 22px 30px 24px; border-radius: 14px; text-align: center;
  background: rgba(17, 28, 46, .975); border: 1px solid #3a8a5f;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  color: #e6eefb; animation: studyContinueIn .25s ease;
}
.study-continue-ic { font-size: 26px; color: #4ade80; font-weight: 700; line-height: 1; }
.study-continue-title { margin-top: 10px; font-size: 16px; font-weight: 700; color: #fff; }
.study-continue-sub { margin-top: 8px; font-size: 13px; color: #bdd0e8; line-height: 1.7; }
.study-continue-btn {
  margin-top: 16px; padding: 9px 20px; font-size: 14px; font-weight: 600;
  background: #2c6b4a; border-color: #3a8a5f; color: #fff; cursor: pointer;
}
.study-continue-btn:hover { background: #338157; color: #fff; }
@keyframes studyContinueIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .study-continue-card { animation: none; } }
@media (max-width: 900px) {
  .study-continue-card { min-width: 0; padding: 16px 18px 18px; }
  .study-continue-sub { font-size: 11px; }
}

/* ---------- 成绩记录：首考 / 补考成绩链 ---------- */
.tag-warn { background: #fffaeb; color: #b54708; font-weight: 600; }
.score-now {
  display: block; font-size: 15px; font-weight: 700; color: #1f3a5f;
  line-height: 1.3; white-space: nowrap;
}
.score-now small { font-size: 12px; font-weight: 600; color: #98a2b3; margin-left: 2px; }
.score-sub { display: block; font-size: 12px; color: #98a2b3; line-height: 1.6; margin-top: 2px; }
.score-sub.is-ok { color: #027a48; font-weight: 600; }
.score-sub.is-bad { color: #b42318; font-weight: 600; }
.score-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.score-chip {
  font-size: 12px; line-height: 1.7; padding: 1px 8px; border-radius: 10px;
  background: #f2f4f7; color: #475467; white-space: nowrap;
}
.score-chip.is-pass { background: #ecfdf3; color: #027a48; }
.score-chip.is-fail { background: #fef3f2; color: #b42318; }
.score-chip.is-fix { background: #eef4ff; color: #1d4ed8; }
.score-note { margin-top: 14px; line-height: 1.7; }

/* ---------- 我的任务：指标 + 学习任务 + 考核任务分区 ---------- */
.section-title {
  margin: 26px 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #1f2733;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #2f6bff;
}

/* ---------- 我的考核：可参加考核 + 成绩记录合并卡片 ---------- */
.exam-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.exam-card {
  background: #fff; border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 3px solid #e4e7ec;
}
.exam-card-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.exam-card-title { font-size: 16px; font-weight: 700; color: #1f3a5f; }
.exam-card-sub { font-size: 13px; color: #667085; margin-top: 5px; line-height: 1.6; }
.exam-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exam-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-top: 14px; padding: 12px 14px; background: #f9fafb; border-radius: 10px;
}
.exam-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exam-stat .k { font-size: 12px; color: #667085; }
.exam-stat .v { font-size: 19px; font-weight: 700; color: #1f3a5f; line-height: 1.25; white-space: nowrap; }
.exam-stat .v small { font-size: 12px; font-weight: 600; color: #98a2b3; margin-left: 2px; }
.exam-stat .s { font-size: 12px; color: #98a2b3; line-height: 1.5; }
.exam-card .score-chips { margin-top: 10px; }
.exam-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.exam-done { font-size: 13px; color: #027a48; font-weight: 600; }
.exam-history { margin-top: 12px; border-top: 1px dashed #e4e7ec; padding-top: 10px; }
.exam-history > summary { cursor: pointer; font-size: 13px; color: #1d4ed8; list-style: none; }
.exam-history > summary::-webkit-details-marker { display: none; }
.exam-history > summary::before { content: "▸ "; }
.exam-history[open] > summary::before { content: "▾ "; }
.exam-history .tbl { margin-top: 10px; }
@media (max-width: 640px) {
  .exam-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-card { padding: 14px 15px; }
}
.exam-stats.is-single { grid-template-columns: 1fr; }
.exam-stat .s.is-ok { color: #027a48; font-weight: 600; }
.exam-stat .s.is-bad { color: #b42318; font-weight: 600; }

/* ---------- 知识点：补考分组 / 掌握标签 ---------- */
.q-kp {
  font-size: 11px; line-height: 1.7; padding: 0 7px; border-radius: 9px;
  background: #eef4ff; color: #1d4ed8; font-weight: 600; white-space: nowrap;
}
.kp-block { margin: 18px 0 22px; }
.kp-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  flex-wrap: wrap; padding: 9px 14px; border-radius: 9px;
  background: #f4f7fb; border-left: 3px solid #1f3a5f; margin-bottom: 10px;
}
.kp-name { font-size: 14px; font-weight: 700; color: #1f3a5f; }
.kp-meta { font-size: 12px; color: #667085; display: flex; gap: 6px; align-items: center; }
.kp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kp-chip {
  font-size: 12px; line-height: 1.9; padding: 0 9px; border-radius: 10px;
  background: #f2f4f7; color: #475467; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
}
.kp-chip.is-ok { background: #ecfdf3; color: #027a48; }
.kp-chip.is-bad { background: #fef3f2; color: #b42318; border-color: #fecdca; }
a.kp-chip.is-bad:hover { background: #fee4e2; }
.result-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 4px;
}
.result-cell {
  background: #fff; border-radius: 10px; padding: 12px 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 2px;
}
.result-cell span { font-size: 12px; color: #667085; }
.result-cell b { font-size: 19px; color: #1f3a5f; line-height: 1.3; }
.result-cell b.is-ok { color: #027a48; }
.result-cell b.is-bad { color: #b42318; }
.result-cell small { font-size: 12px; color: #98a2b3; }
@media (max-width: 640px) {
  .result-grid { grid-template-columns: 1fr; }
}

/* 结果卡：及格但知识点未掌握（待补考）用琥珀色，与「未通过」的红色区分 */
.result-card.pending { border-top: 4px solid #f79009; }


/* 部门培训情况：部门名下钻链接与口径说明 */
.dept-link { font-weight: 600; }
.dept-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; }


/* ---------------------------------------------------------------------------
   学习完成海报浮层（方案 A 深蓝金）：学习任务全部达标后自动弹出
   --------------------------------------------------------------------------- */
.poster-overlay {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 16px;
}
.poster-overlay.is-open { display: flex; }
.poster-mask { position: absolute; inset: 0; background: rgba(4, 11, 28, .84); }
.poster-wrap {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  align-items: center; max-height: 100%;
}
.poster-stage {
  height: min(720px, calc(100vh - 170px)); aspect-ratio: 3 / 5;
  max-width: calc(100vw - 32px);
}
.poster-stage svg {
  width: 100%; height: 100%; display: block; border-radius: 12px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
}
.poster-acts {
  display: flex; gap: 12px; margin-top: 16px;
  flex-wrap: wrap; justify-content: center;
}
.poster-acts .btn { min-width: 140px; justify-content: center; }
.poster-tip { margin: 8px 0 0; font-size: 12px; color: rgba(255, 255, 255, .62); }
@media (max-width: 520px) {
  .poster-stage { height: min(560px, calc(100vh - 190px)); }
  .poster-acts .btn { min-width: 0; flex: 1; }
}

/* ---------------------------------------------------------------------------
   课件防泄露水印：服务端注入「名称 + 当天日期」，平铺斜向覆盖课件画面。
   pointer-events:none 保证不拦截翻页 / 缩放 / 播放 / 标记完成等任何操作；
   白色文字 + 深色描边，浅色 PDF 与深色视频背景上都能辨识。
   与 app.py 的 WATERMARK_CSS 保持一致（独立预览页内联使用）。
   --------------------------------------------------------------------------- */
.wm-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  user-select: none; -webkit-user-select: none; z-index: 30; }
.wm-layer--study { z-index: 30; }
.wm-layer--block { z-index: 5; }
.wm-layer--page { position: fixed; z-index: 2147483000; }
.wm-grid { position: absolute; left: -45%; top: -45%; width: 190%; height: 190%;
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(84px, 1fr); align-items: center; justify-items: center;
  transform: rotate(-24deg); transform-origin: center center; }
.wm-grid span { font-size: 15px; font-weight: 500; letter-spacing: 1.5px;
  white-space: nowrap; color: rgba(255,255,255,.20);
  -webkit-text-stroke: .3px rgba(0,0,0,.13);
  text-shadow: 0 0 1px rgba(0,0,0,.10); }
/* 课程详情页「课件资料」区块作为水印定位锚点 */
.materials.wm-anchor { position: relative; }

/* ---------------------------------------------------------------------------
   课件顺序解锁（2026-11-11）：未解锁课件在学习层与课件资料目录里均为
   不可操作的锁定占位；拦截只提示、不改变任何学习进度。
   --------------------------------------------------------------------------- */
/* 只给锁定 pane 加定位上下文，避免影响正常 pane 内 PDF 阅读器的绝对定位参照 */
.study-pane[data-locked="1"] { position: relative; }
.study-lock-cover {
  position: absolute; inset: 0; z-index: 40; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(13, 21, 32, .96); color: #e8eef7;
}
.study-lock-card { max-width: 460px; text-align: center; }
.study-lock-ic { font-size: 42px; margin-bottom: 12px; }
.study-lock-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.study-lock-card p { margin: 0; font-size: 14px; line-height: 1.75; color: #aab8cc; }

/* 「下一个」越界时只置灰，不使用 disabled：点击仍要弹出明确提示 */
.study-btn.is-lock-next { opacity: .45; }

/* 课程详情页「课件资料」目录里的锁定条目 */
.material.is-locked { background: #f7f9fc; border-style: dashed; opacity: .86; }
.material.is-locked .mat-head { margin-bottom: 4px; }
.material.is-locked .mat-icon { filter: grayscale(1); }
.mat-badge.mat-badge-locked { background: #eceff4; color: #667085; }
.mat-locked-tip { margin: 0; font-size: 13px; line-height: 1.65; color: #667085; }

/* 直接访问未解锁课件时的 403 提示页 */
.unlock-denied { max-width: 660px; margin: 28px auto; padding: 32px; text-align: center;
  background: #fff; border: 1px solid #eef1f5; border-radius: 12px; }
.unlock-denied-ic { font-size: 48px; margin-bottom: 12px; }
.unlock-denied-msg { margin: 12px 0 18px; font-size: 16px; line-height: 1.8; color: #344054; }
.unlock-denied p.muted { line-height: 1.8; }

/* ---------------- 指派学习任务：多类别指派（路径 / 课程 / 课件） ---------------- */
/* 2026-11-13：一次指派可选「按路径 / 指定课程 / 指定课件」三种口径 */
.assign-mode { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.assign-mode .chk { font-weight: 400; }
.assign-panel { border: 1px solid #e7ebf2; border-radius: 10px; padding: 12px 14px;
  background: #fbfcfe; margin-top: 8px; }
.assign-panel > label { display: block; font-size: 13px; color: #475467; margin-bottom: 6px; }
.assign-panel select { max-width: 520px; }
.pick-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 10px; font-size: 13px; }
.pick-list { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 2px;
  padding: 2px; }
.pick-item { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px;
  font-size: 13.5px; font-weight: 400; cursor: pointer; background: #fff;
  border: 1px solid transparent; }
.pick-item:hover { background: #f2f6fd; border-color: #dbe6f7; }
.pick-item input { width: 15px; height: 15px; accent-color: #1b62c9; margin: 0; flex: none; }
.pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.pick-meta { flex: none; font-size: 12px; }
.mat-group { background: #fff; border: 1px solid #e7ebf2; border-radius: 8px;
  margin-bottom: 6px; overflow: hidden; }
.mat-group > summary { cursor: pointer; padding: 9px 11px; font-size: 13.5px;
  display: flex; align-items: center; gap: 6px; list-style: none; }
.mat-group > summary::-webkit-details-marker { display: none; }
.mat-group > summary::before { content: "▸"; color: #98a2b3; font-size: 11px; }
.mat-group[open] > summary::before { content: "▾"; }
.mat-group > summary .mat-all { margin-left: auto; font-size: 12px; color: #1b62c9;
  text-decoration: none; padding: 2px 6px; border-radius: 5px; }
.mat-group > summary .mat-all:hover { background: #eaf1fc; }
.mat-list { padding: 2px 8px 8px; display: flex; flex-direction: column; gap: 1px; }
.mat-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px;
  font-size: 13px; font-weight: 400; }
.mat-item:hover { background: #f5f8fd; }
.mat-item input { width: 14px; height: 14px; accent-color: #1b62c9; margin: 0; flex: none; }
/* 非路径模式下，「自动匹配路径」列不再有意义，弱化显示 */
table.assign-tbl.dim-path th:nth-child(5),
table.assign-tbl.dim-path td:nth-child(5) { opacity: .45; }
/* 学员任务行里的「指定课件 N/M」标签 */
.scope-tag { font-size: 12px; background: #eef3fb; color: #35507a; border-radius: 999px;
  padding: 2px 8px; }
/* 2026-11-13：指定课件任务把「只需学哪几份」写在卡片 / 课程页上 */
.task-scope-hint { margin: 2px 0 8px; font-size: 12px; line-height: 1.6;
  color: #35507a; background: #f3f7fd; border-left: 3px solid #1b62c9;
  border-radius: 4px; padding: 6px 10px; }
.task-scope-note { margin: 10px 0 4px; font-size: 13px; line-height: 1.7;
  color: #35507a; background: #f3f7fd; border-left: 3px solid #1b62c9;
  border-radius: 4px; padding: 8px 12px; }

/* 2026-11-13：手机端学习层排版修正
   1) 学完提示条原本是 left:50% 的收缩宽度 + flex 子项可压缩，
      窄屏下文本被压成一字一行、圆角 999px 撑成大圆，挡住半个屏幕；
      改为左右贴边、可换行、方一点的圆角。
   2) PDF 工具栏在窄屏压紧一档，少占阅读高度。 */
@media (max-width: 640px) {
  .study-toast {
    left: 12px; right: 12px; bottom: 14px; transform: none;
    width: auto; max-width: none; border-radius: 14px;
    flex-wrap: wrap; justify-content: flex-start; gap: 8px 10px;
    padding: 12px 14px; font-size: 13px; animation: none;
  }
  .study-toast-ic { flex: 0 0 auto; }
  .study-toast-tx { flex: 1 1 60%; min-width: 120px; white-space: normal; line-height: 1.65; }
  .study-toast-link { margin-left: auto; }
  .pv-bar { padding: 6px 8px; gap: 4px; }
  .pv-group { gap: 4px; }
  .pv-btn { padding: 3px 7px; font-size: 12px; }
  .pv-page-input { width: 46px; padding: 3px 4px; }
}

/* ==========================================================================
   2026-11-13：指派学习任务页「简化」—— 三步分区 + 分段方式控件
   仅作用于 .assign-page，不改动 .form-grid / .filter-bar 等全局规则，
   保证其它表单页面（课程新增/编辑、用户管理等）不受影响。
   ========================================================================== */
.assign-page__head { margin-bottom: 16px; }
.assign-page__head h2 { margin: 0 0 4px; font-size: 22px; }
.assign-page__head p { margin: 0; font-size: 13px; }

/* 分区卡片：取代原来单一大边框表单，形成「1 基本信息 / 2 指派内容 / 3 目标员工」 */
.assign-sec {
  background: #fff; border: 1px solid #e9edf4; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
  margin-bottom: 16px; overflow: hidden;
}
.assign-sec__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid #eef1f5;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
}
.assign-sec__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none;
  border-radius: 50%; background: #1b62c9; color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1;
}
.assign-sec__head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1f3a5f; }
.assign-sec__tip { margin-left: auto; font-size: 12px; }
.assign-sec__body { padding: 16px 18px 18px; }

/* 基本信息：2 列，任务名称与考核待办各占整行 */
.assign-basic {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px; align-items: start;
}
.assign-basic > .field--wide { grid-column: 1 / -1; }
.assign-page .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.assign-page .field > label { font-size: 13px; font-weight: 600; color: #344054; }
.assign-page .field--check > label { margin-bottom: 2px; }
.assign-page .field input:not([type="checkbox"]):not([type="radio"]),
.assign-page .field select,
.assign-page .field textarea { width: 100%; box-sizing: border-box; }
.assign-page .hint { margin: 2px 0 0; font-size: 12px; line-height: 1.6; color: #98a2b3; }

/* 指派方式：三段式卡片单选（选中态纯 CSS，不依赖 :has()，不改 JS） */
.assign-page .assign-mode {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin: 0;
}
.assign-page .assign-seg { position: relative; display: block; cursor: pointer; }
.assign-page .assign-seg > input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
.assign-page .assign-seg__inner {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border: 1.5px solid #e4e9f2; border-radius: 10px;
  background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
}
.assign-page .assign-seg:hover .assign-seg__inner { border-color: #b9cdf5; background: #fafcff; }
.assign-page .assign-seg > input:checked + .assign-seg__inner {
  border-color: #1b62c9; background: #f2f7ff;
  box-shadow: 0 0 0 3px rgba(27, 98, 201, .10);
}
.assign-page .assign-seg > input:focus-visible + .assign-seg__inner {
  outline: 2px solid #1b62c9; outline-offset: 2px;
}
.assign-page .assign-seg__title { font-size: 14px; font-weight: 600; color: #344054; }
.assign-page .assign-seg__desc { font-size: 12px; color: #98a2b3; line-height: 1.4; }
.assign-page .assign-seg > input:checked + .assign-seg__inner .assign-seg__title { color: #1b4fa8; }

/* 面板：去掉嵌套边框，只留一条虚线分隔；[hidden] 仍由 JS 切换 */
.assign-page .assign-panel {
  border: 0; border-top: 1px dashed #e7ebf2; border-radius: 0;
  background: transparent; padding: 14px 0 0; margin-top: 14px;
}
.assign-page .assign-panel[hidden] { display: none; }
.assign-page .assign-panel > label { font-size: 13px; font-weight: 600; color: #344054; }
.assign-page .assign-panel select { max-width: 100%; }
.assign-page .pick-head { justify-content: space-between; margin-bottom: 8px; }
.assign-page .pick-list {
  background: #fbfcfe; border: 1px solid #eef1f5; border-radius: 8px;
  padding: 6px; max-height: 300px;
}

/* 目标员工：单行筛选栏（两个下拉 + 两个开关 + 计数靠右） */
.assign-page .assign-filter { margin: 0 0 12px; }
.assign-page .assign-filter__row {
  display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  background: #f8fafc; border: 1px solid #eef1f5; border-radius: 8px;
  padding: 10px 12px;
}
.assign-page .assign-filter__label { font-size: 12px; font-weight: 600; color: #667085; flex: none; }
.assign-page .assign-filter select {
  width: auto; min-width: 150px; padding: 6px 8px; font-size: 13px;
}
.assign-page .assign-filter__sep { width: 1px; height: 18px; background: #e4e7ec; flex: none; }
.assign-page .assign-filter .chk { font-size: 12.5px; white-space: nowrap; }
.assign-page .assign-filter__count { margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.assign-page .assign-tbl-wrap { width: 100%; }

/* 底部操作条：汇总 + 按钮，置于三步之后，正常文档流不遮挡内容 */
.assign-page .assign-submit {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e9edf4; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, .07);
  padding: 14px 18px;
}
.assign-page .assign-submit__summary { display: flex; flex-direction: column; gap: 3px; }
.assign-page .assign-submit__summary .muted { font-size: 12px; }
.assign-page .assign-submit__summary strong { font-size: 14px; color: #1f3a5f; }
.assign-page .assign-submit__actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 720px) {
  .assign-sec__body { padding: 14px; }
  .assign-basic { grid-template-columns: 1fr; }
  .assign-page .assign-mode { grid-template-columns: 1fr; }
  .assign-page .assign-seg__inner { flex-direction: row; align-items: baseline; gap: 8px; padding: 10px 12px; }
  .assign-page .assign-seg__title { font-size: 13.5px; }
  .assign-page .assign-filter select { min-width: 0; flex: 1 1 140px; }
  .assign-page .assign-filter__sep { display: none; }
  .assign-page .assign-filter__count { margin-left: 0; }
  /* 窄屏员工表横向滚动，列不被压成竖排 */
  .assign-page .assign-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .assign-page .assign-tbl { min-width: 560px; }
}

/* ==========================================================================
   2026-11-16：考题导出（按课程 / 课件 / 题型 / 知识点 / 关键词筛选）
   仅作用于 .qexport-page，不影响其它页面。
   ========================================================================== */
.qexport-head { margin-bottom: 16px; }
.qexport-head h2 { margin: 0 0 4px; font-size: 22px; }
.qexport-head p { margin: 0; font-size: 13px; }
.qe-sec {
  background: #fff; border: 1px solid #e9edf4; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
  margin-bottom: 16px; overflow: hidden;
}
.qe-sec__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid #eef1f5;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
}
.qe-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: #1b62c9; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.qe-sec__head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1f3a5f; }
.qe-tip { margin-left: auto; font-size: 12px; }
.qe-sec__body { padding: 16px 18px 18px; }
.qe-label { font-size: 13px; font-weight: 600; color: #344054; margin: 0 0 8px; }
.qe-label--sub { margin-top: 16px; }
.qe-opts { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.qe-check {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; background: #fbfcfe; border: 1px solid #e7ebf2;
  border-radius: 8px; font-size: 13px; font-weight: 400; color: #344054; cursor: pointer;
}
.qe-check:hover { border-color: #b9cdf5; background: #f2f7ff; }
.qe-check input { width: 15px; height: 15px; margin: 0; accent-color: #1b62c9; flex: none; }
.qe-num {
  font-size: 11px; color: #98a2b3; background: #fff;
  border-radius: 999px; padding: 1px 6px;
}
.qe-mats { display: flex; flex-direction: column; gap: 8px; }
.qe-group { border: 1px solid #eef1f5; border-radius: 8px; background: #fff; }
.qe-group > summary {
  cursor: pointer; list-style: none; padding: 9px 11px;
  font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.qe-group > summary::-webkit-details-marker { display: none; }
.qe-group > summary::before { content: "▸"; color: #98a2b3; font-size: 11px; }
.qe-group[open] > summary::before { content: "▾"; }
.qe-group > summary .qe-mat-all {
  margin-left: auto; font-size: 12px; color: #1b62c9; text-decoration: none;
}
.qe-group > summary .qe-mat-all:hover { text-decoration: underline; }
.qe-mat-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px 24px; }
.qe-mat { padding: 5px 9px; font-size: 12.5px; }
.qe-keyword { width: 100%; max-width: 420px; box-sizing: border-box; }
.qe-summary {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; background: #f2f7ff; border-radius: 8px; margin-bottom: 12px;
}
.qe-summary strong { font-size: 15px; color: #1b4fa8; }
.qe-summary .muted { font-size: 12px; }
.qe-preview {
  max-height: 220px; overflow: auto; border: 1px solid #eef1f5;
  border-radius: 8px; padding: 6px 10px; background: #fbfcfe;
}
.qe-item {
  display: flex; align-items: baseline; gap: 9px; padding: 6px 2px;
  border-bottom: 1px dashed #eef1f5; font-size: 13px;
}
.qe-item:last-child { border-bottom: 0; }
.qe-item-no { flex: none; width: 18px; color: #98a2b3; font-size: 12px; }
.qe-item-tx { flex: 1; min-width: 0; color: #344054; }
.qe-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.qe-primary {
  background: #1b62c9; color: #fff; border: none;
  padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.qe-primary:hover { background: #154fa6; }
.qe-footnote { margin: 10px 0 0; font-size: 12px; }
@media (max-width: 720px) {
  .qe-sec__body { padding: 14px; }
  .qe-opts { gap: 6px; }
  .qe-check { font-size: 12.5px; padding: 6px 9px; }
  .qe-mat-list { padding-left: 12px; }
  .qe-summary { gap: 6px; }
  .qe-actions .qe-primary { width: 100%; }
}

/* 独立考核任务：选卷 + 选人后直接生成考核待办 */
.et-page .et-create > summary { cursor: pointer; }
.et-page .et-create[open] > summary { border-bottom: 1px solid #e9edf4; margin-bottom: 14px; padding-bottom: 12px; }
.et-page .et-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; background: #f7f9fc; border: 1px solid #e9edf4; border-radius: 8px;
}
.et-page .et-filter select, .et-page .et-filter input { width: auto; min-width: 120px; }
.et-page .et-filter .chk { margin: 0; white-space: nowrap; font-size: 13px; }
.et-page .et-users {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px; max-height: 260px; overflow: auto; margin-top: 10px;
  padding: 8px 10px; background: #fbfcfe; border: 1px solid #eef1f5; border-radius: 8px;
}
.et-page .et-user {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  border: 1px solid #eef1f5; border-radius: 6px; background: #fff; font-size: 13px; cursor: pointer;
}
.et-page .et-user:hover { border-color: #c8d9f2; background: #f5f9ff; }
.et-page .et-user.is-hidden { display: none; }
.et-page .et-user b { font-weight: 600; color: #344054; }
.et-page .et-user .muted { font-size: 12px; margin-left: auto; }
@media (max-width: 720px) {
  .et-page .et-users { grid-template-columns: 1fr; }
  .et-page .et-filter select, .et-page .et-filter input { flex: 1 1 100%; }
}

/* 组卷选题筛选：大类 / 题型多选下拉（同类并集、跨类交集） */
#exam-form .q-multi { position: relative; }
#exam-form .q-multi__btn {
  min-width: 148px; max-width: 220px; text-align: left; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  background: #fff; border: 1px solid #d0d5dd; border-radius: 6px;
  padding: 6px 10px; font-size: 13px; color: #344054; cursor: pointer;
}
#exam-form .q-multi__btn:hover { border-color: #1b62c9; }
#exam-form .q-multi__btn .caret { float: right; margin-left: 8px; color: #98a2b3; }
#exam-form .q-multi__pop {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0;
  min-width: 230px; max-height: 280px; overflow: auto;
  background: #fff; border: 1px solid #d0d5dd; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12); padding: 8px;
}
#exam-form .q-multi__ops {
  display: flex; gap: 10px; padding: 0 4px 6px;
  border-bottom: 1px solid #eef1f5; margin-bottom: 4px;
}
#exam-form .q-multi__ops button {
  background: none; border: none; padding: 2px 0; cursor: pointer;
  color: #1b62c9; font-size: 12px;
}
#exam-form .q-multi__opt {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px; border-radius: 4px; font-size: 13px; cursor: pointer;
}
#exam-form .q-multi__opt:hover { background: #f5f9ff; }
