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

:root {
  color-scheme: light;
  --bg: #EEF4FF;
  --bg-2: #E3EDFB;
  --panel: #FFFFFF;
  --panel-2: #F3F7FE;
  --panel-3: #E7EFFB;
  --line: rgba(28, 51, 110, 0.12);
  --line-strong: rgba(28, 51, 110, 0.26);
  --text: #22306A;
  --primary: #2C3E6B;
  --muted: #5C6C9C;
  --muted-2: #8A97BC;
  --gold: #F0A829;
  --gold-2: #FFD98A;
  --gold-3: #C98B18;
  --purple: #6C5CE7;
  --purple-2: #9C8CFF;
  --blue: #4C6FFF;
  --ok: #3DDC97;
  --warn: #FFB547;
  --danger: #FF6B6B;
  --shadow: 0 18px 44px rgba(80, 105, 190, 0.16);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html, body { min-height: 100%; }

body {
  background:
    radial-gradient(1200px 700px at 12% -10%, #2A1C63 0%, transparent 62%),
    radial-gradient(1000px 620px at 92% 0%, #123A63 0%, transparent 58%),
    radial-gradient(900px 700px at 50% 110%, #23124A 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select { font-family: var(--font); }

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 22px 34px, rgba(255, 255, 255, 0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 128px 88px, rgba(255, 255, 255, 0.32) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 64px 168px, rgba(255, 255, 255, 0.42) 50%, transparent 51%),
    radial-gradient(1px 1px at 190px 40px, rgba(255, 255, 255, 0.28) 50%, transparent 51%);
  background-size: 230px 230px, 270px 270px, 330px 330px, 210px 210px;
  opacity: 0.75;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- 通用 ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #2A1E05;
  font-size: 18px;
  background: linear-gradient(180deg, #FFE9A8, #F5C451 60%, #D9A22A);
  box-shadow: 0 4px 14px rgba(245, 196, 81, 0.35);
}
.brand.small { font-size: 20px; }
.brand.small .brand-mark { width: 36px; height: 36px; font-size: 19px; }

/* 常驻对话框式提示气泡 */
.brand-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2B3A66;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px 8px 16px;
  border-radius: 10px;
  margin-left: 14px;
  box-shadow: 0 4px 14px rgba(43,58,102,0.3);
  animation: bubbleIn 0.4s ease;
}
.brand-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #2B3A66;
}
.brand-bubble-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}
.brand-bubble-close:hover { background: rgba(255,255,255,0.35); }
.brand-bubble.hide { display: none; }

@keyframes bubbleIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.brand-sub {
  font-size: 1em;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: 1px;
}
.env {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px;
  padding: 1px 8px;
  letter-spacing: 0;
}

.input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: rgba(245, 196, 81, 0.55); background: rgba(255, 255, 255, 0.06); }
.select { padding-right: 28px; }
.num { width: 74px; text-align: center; }

.btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  color: #241A05;
  font-weight: 700;
  background: linear-gradient(180deg, #FFE6A0, #F5C451 58%, #DDA32A);
  box-shadow: 0 8px 22px rgba(245, 196, 81, 0.28);
}
.btn.primary:hover { box-shadow: 0 10px 28px rgba(245, 196, 81, 0.4); }
/* 校验通过后引导点击入库的脉动效果 */
.btn.btn-pulse {
  animation: btnPulse 1.2s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 22px rgba(245, 196, 81, 0.28);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 8px 36px rgba(245, 196, 81, 0.8), 0 0 0 8px rgba(245, 196, 81, 0.28);
  }
}
/* 列映射变化后提示重新生成报告 */
.btn.btn-hint {
  background: linear-gradient(180deg, #fff5e6, #ffe0b3);
  border-color: #DDA32A;
  color: #8C5A1E;
  font-weight: 600;
  animation: btnHint 1s ease-in-out infinite;
}
@keyframes btnHint {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(221, 163, 42, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(221, 163, 42, 0.2);
  }
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line-strong); }
.btn.gold-outline {
  color: var(--gold);
  border-color: rgba(245, 196, 81, 0.45);
  background: rgba(245, 196, 81, 0.06);
}
.btn.gold-outline:hover { background: rgba(245, 196, 81, 0.12); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }

.link {
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.link:hover { text-decoration: underline; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.tag.gold { color: var(--gold); border-color: rgba(245, 196, 81, 0.4); background: rgba(245, 196, 81, 0.08); }
.tag.warn { color: var(--warn); border-color: rgba(255, 181, 71, 0.4); background: rgba(255, 181, 71, 0.08); }

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(28, 35, 72, 0.92), rgba(17, 22, 49, 0.92));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.panel h3 { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head p { font-size: 12px; color: var(--muted); }

/* ---------- 登录 ---------- */
.login {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-glow {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.28), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 40px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(28, 35, 72, 0.92), rgba(12, 16, 38, 0.94));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.login-card .brand { margin-bottom: 28px; font-size: 24px; color: #fff; }
.login-card .brand-sub { color: rgba(255,255,255,0.7); }
.login-card h1 {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #FFFFFF, #C9CFF0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.field { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.field input {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.field input:focus { border-color: rgba(245, 196, 81, 0.55); }
#loginUser, #loginPass { color: #fff; caret-color: #fff; -webkit-text-fill-color: #fff; }
#loginUser::placeholder, #loginPass::placeholder { color: rgba(255,255,255,0.35); -webkit-text-fill-color: rgba(255,255,255,0.35); }
#loginUser:-webkit-autofill, #loginPass:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 1000px #20283d inset; }
#loginBtn { margin-top: 10px; height: 46px; font-size: 15px; }
.login-tip { margin-top: 16px; text-align: center; font-size: 11px; color: var(--muted-2); }
.auth-user { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* ---------- 顶栏 ---------- */
.app { position: relative; z-index: 1; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
  padding: 0 28px;
  background: rgba(8, 11, 26, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav { display: flex; gap: 4px; }
.nav-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: 0.15s;
}
.nav-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-btn.active {
  color: var(--gold);
  background: rgba(245, 196, 81, 0.1);
  border-color: rgba(245, 196, 81, 0.28);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
}
.icon-btn:hover {
  background: rgba(245, 196, 81, 0.12);
  border-color: rgba(245, 196, 81, 0.4);
  color: var(--gold);
}
.module-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.module-card.disabled:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.module-tag {
  margin-left: auto;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(120, 120, 140, 0.15);
  color: var(--muted);
  font-weight: 600;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.8);
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-2);
  background: linear-gradient(180deg, #3A3170, #242055);
  border: 1px solid rgba(245, 196, 81, 0.35);
}

/* ---------- 视图 ---------- */
main { padding: 26px 28px 60px; }
.view { max-width: 1440px; margin: 0 auto; animation: fadeUp 0.28s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h2 { font-size: 26px; font-weight: 700; letter-spacing: 0.5px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-head p b { color: var(--gold); font-weight: 600; }
.toolbar { display: flex; gap: 10px; }
.toolbar .input { width: 220px; }
#view-studentFeedback .page-head > .toolbar {
  width: 540px;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
}
#view-studentFeedback .sf-search-wrap {
  position: relative;
  flex: 1 1 280px;
  min-width: 100px;
  max-width: 100%;
}
#view-studentFeedback .page-head > .toolbar > .btn { flex-shrink: 0; white-space: nowrap; }
.last-update { font-size: 12px; color: var(--muted); }
.last-update b { color: var(--gold); font-weight: 500; }

/* ---------- 工作台模块入口 ---------- */
.workbench-head { margin-bottom: 48px; text-align: left; padding-top: 8px; }
.workbench-title {
  font-size: 44px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  margin: 0;
  color: #1A2744;
}
.workbench-sub {
  font-size: 16px !important;
  margin-top: 12px !important;
  color: #8A97BC;
  letter-spacing: 0.5px;
  font-weight: 400;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.module-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 26px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #FFFFFF;
  cursor: pointer;
  transition: 0.25s cubic-bezier(.2,.8,.2,1);
  min-height: 128px;
  height: 128px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04);
}
.module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05), 0 12px 28px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.1);
}
.module-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
  transition: 0.25s;
}
.module-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.module-card[data-go="data"] .module-icon { background: rgba(76,111,255,0.1); color: #4C6FFF; }
.module-card[data-go="classList"] .module-icon { background: rgba(240,168,41,0.12); color: #C98B18; }
.module-card[data-go="feedback"] .module-icon { background: rgba(61,220,151,0.12); color: #1FA972; }
.module-card[data-go="studentFeedback"] .module-icon { background: rgba(108,92,231,0.1); color: #6C5CE7; }
.module-card[data-go="praiseBoard"] .module-icon { background: rgba(255,107,107,0.12); color: #E8435A; }
.module-card[data-go="certificate"] .module-icon { background: rgba(255,159,67,0.12); color: #E8851A; }
.module-card.disabled .module-icon { background: rgba(0,0,0,0.05); color: #999; }

.module-card[data-go="data"]:hover { border-color: rgba(76,111,255,0.4); }
.module-card[data-go="classList"]:hover { border-color: rgba(240,168,41,0.5); }
.module-card[data-go="feedback"]:hover { border-color: rgba(61,220,151,0.5); }
.module-card[data-go="studentFeedback"]:hover { border-color: rgba(108,92,231,0.4); }
.module-card[data-go="praiseBoard"]:hover { border-color: rgba(255,107,107,0.5); }
.module-card[data-go="certificate"]:hover { border-color: rgba(255,159,67,0.5); }

.module-info { flex: 1; min-width: 0; }
.module-info h3 {
  font-size: 18px;
  margin: 0 0 5px;
  font-weight: 600;
  color: #1A2744;
  letter-spacing: 0.3px;
}
.module-info p {
  font-size: 13.5px;
  color: #8A97BC;
  margin: 0;
  line-height: 1.5;
}
.module-arrow {
  margin-left: auto;
  font-size: 18px;
  color: #C4CCE0;
  transition: 0.2s;
  flex-shrink: 0;
}
.module-card:hover .module-arrow {
  color: #4C6FFF;
  transform: translateX(3px);
}
.module-tag {
  margin-left: auto;
  font-size: 11px;
  color: #999;
  background: rgba(0,0,0,0.05);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.module-card.disabled { opacity: 0.7; cursor: not-allowed; }
.module-card.disabled:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.06); }

/* ---------- 班级卡片 ---------- */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
.class-card {
  position: relative;
  height: 246px;
  padding: 20px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  transition: transform 0.18s ease, border-color 0.18s, box-shadow 0.18s;
}
.class-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 196, 81, 0.45);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(245, 196, 81, 0.12) inset;
}
.class-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 30% 24%, rgba(255, 255, 255, 0.7), transparent 2px),
    radial-gradient(1px 1px at 74% 40%, rgba(255, 255, 255, 0.5), transparent 2px),
    radial-gradient(1.5px 1.5px at 55% 78%, rgba(255, 255, 255, 0.35), transparent 2.4px);
  background-size: 190px 190px, 240px 240px, 300px 300px;
  opacity: 0.5;
  pointer-events: none;
}
.class-card .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 24, 0.18) 0%, rgba(6, 9, 24, 0.62) 58%, rgba(6, 9, 24, 0.92) 100%);
}
.card-content { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; }
.card-top-row { display: flex; align-items: center; justify-content: space-between; }
.type-tag {
  font-size: 11px;
  color: var(--gold-2);
  background: rgba(245, 196, 81, 0.12);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px;
  padding: 2px 9px;
}
.group-no { font-size: 12px; color: rgba(255, 255, 255, 0.55); letter-spacing: 1px; }
.class-card h3 { margin-top: 12px; font-size: 19px; font-weight: 600; line-height: 1.35; }
.card-meta { font-size: 12px; color: rgba(255, 255, 255, 0.62); margin-top: 3px; }
.card-top-list { margin-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.card-top-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.82); }
.mini-rank {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #241A05;
  background: linear-gradient(180deg, #FFE29A, #E7B43C);
}
.card-top-item .mini-icons { display: flex; align-items: center; gap: 1px; margin-left: 2px; }
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.card-foot b { color: var(--gold); font-size: 18px; font-weight: 600; margin-right: 2px; }
.card-enter {
  font-size: 12px;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-4px);
  transition: 0.18s;
}
.class-card:hover .card-enter { opacity: 1; transform: none; }

/* 表扬榜列表卡片 */
.class-card.pb-card {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE8C2 50%, #FFD89E 100%);
  border: 1px solid rgba(232, 168, 56, 0.35);
  box-shadow: 0 10px 28px rgba(180, 120, 30, 0.18);
  padding: 0;
  height: 200px;
}
.class-card.pb-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(180, 120, 30, 0.28), 0 0 0 1px rgba(232, 168, 56, 0.5) inset;
}
.pb-card-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,0.5), transparent 55%),
    radial-gradient(80% 60% at 0% 100%, rgba(217, 119, 6, 0.12), transparent 55%);
  pointer-events: none;
  border-radius: 20px;
}
.pb-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}
.pb-card-top { display: flex; justify-content: space-between; align-items: center; }
.pb-card-tag {
  font-size: 11px;
  color: #B85C00;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(232, 168, 56, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
}
.pb-card-title {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #5C3317;
  line-height: 1.3;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.pb-card-meta {
  margin-top: 6px;
  font-size: 13px;
  color: #8C5A1E;
}
.pb-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.pb-card-date { color: #9A6B2E; }
.pb-card-enter {
  color: #B85C00;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-4px);
  transition: 0.18s;
}
.class-card.pb-card:hover .pb-card-enter { opacity: 1; transform: none; }

/* 卡片底图 */
.bg-0 { background-image: radial-gradient(130% 110% at 8% 0%, #4B2E86 0%, #1C1846 52%, #0C1029 100%); }
.bg-1 { background-image: radial-gradient(130% 110% at 88% 0%, #17427A 0%, #13224C 55%, #0B1027 100%); }
.bg-2 { background-image: radial-gradient(130% 110% at 20% 100%, #1B5A57 0%, #142E45 55%, #0B1027 100%); }
.bg-3 { background-image: radial-gradient(130% 110% at 80% 100%, #6A2B5B 0%, #2B1945 55%, #0B1027 100%); }
.bg-4 { background-image: radial-gradient(130% 110% at 10% 10%, #37307F 0%, #1A1D48 55%, #0B1027 100%); }
.bg-5 { background-image: radial-gradient(130% 110% at 90% 10%, #6A4A1A 0%, #35244A 55%, #0B1027 100%); }

/* ---------- 摘星榜 ---------- */
.board-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: #121834;
  background-size: cover;
  background-position: center;
  min-height: 250px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.board-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 24, 0.42) 0%, rgba(6, 9, 24, 0.72) 62%, rgba(6, 9, 24, 0.94) 100%);
  pointer-events: none;
}
.board-hero-inner { position: relative; z-index: 2; padding: 26px 0; }
#backBtn { margin-left: 10%; }
.board-stats { margin: 18px 10% 0; }
.board-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.board-title-text { flex-shrink: 0; }
.board-title-row h2 { font-weight: 700; letter-spacing: 1px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45); white-space: nowrap; }
.board-title-row p { color: rgba(255, 255, 255, 0.66); font-size: 13px; margin-top: 5px; }
/* 小标题（课期进度）样式 */
#boardMeta .sub-term { display: inline-flex; align-items: center; gap: 6px; }
#boardMeta .sub-icon { width: 1em; height: 1em; flex-shrink: 0; opacity: 0.85; }
#boardMeta .sub-sep { opacity: 0.5; margin: 0 2px; }
#boardMeta .sub-prog { display: inline-flex; align-items: center; gap: 8px; }
#boardMeta .sub-num { font-variant-numeric: tabular-nums; }
#boardMeta .sub-bar { flex-shrink: 0; }
.board-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}
.segmented button {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.segmented button.active { color: #241A05; font-weight: 700; background: linear-gradient(180deg, #FFE6A0, #F5C451 60%, #DDA32A); }
.board-stats { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.stat-chip {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}
.stat-chip b { font-size: 18px; color: var(--gold); font-weight: 600; }

.board-body { margin-top: 20px; width: 80%; margin-left: auto; margin-right: auto; }

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}
.podium:empty { display: none; }
.podium-card {
  position: relative;
  width: 250px;
  padding: 20px 16px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(38, 46, 94, 0.82), rgba(16, 21, 46, 0.9));
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}
.podium-card.first { border-color: rgba(245, 196, 81, 0.6); box-shadow: 0 18px 44px rgba(245, 196, 81, 0.16); order: 2; transform: translateY(-10px); }
.podium-card.second { order: 1; }
.podium-card.third { order: 3; }
.podium-rank {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #241A05;
  background: linear-gradient(180deg, #FFE6A0, #E7B43C);
  box-shadow: 0 6px 18px rgba(245, 196, 81, 0.4);
}
.podium-card.second .podium-rank { background: linear-gradient(180deg, #EDF0FF, #A8B0CE); color: #1A1F33; }
.podium-card.third .podium-rank { background: linear-gradient(180deg, #F2C7A8, #C58A5B); color: #2A1608; }
.podium-avatar {
  width: 58px; height: 58px;
  margin: 6px auto 10px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-2);
  background: radial-gradient(circle at 35% 30%, #4A3F8C, #232055 70%);
  border: 1px solid rgba(245, 196, 81, 0.4);
}
.podium-card.first .podium-avatar { width: 66px; height: 66px; font-size: 20px; border-width: 2px; }
.podium-name { font-size: 17px; font-weight: 600; }
.podium-icons { display: flex; justify-content: center; align-items: center; gap: 2px; min-height: 28px; margin: 8px 0 4px; flex-wrap: wrap; }
.podium-total { font-size: 13px; color: var(--muted); }
.podium-total b { color: var(--gold); font-size: 20px; margin-right: 2px; }

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend { display: flex; align-items: center; gap: 6px; }
.legend span { display: inline-flex; }

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 10px;
}
.stu-row {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) auto 112px 28px;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.stu-row:hover { background: rgba(255, 255, 255, 0.065); border-color: var(--line-strong); transform: translateX(2px); }
.rank-badge {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.stu-row.top1 .rank-badge { color: #241A05; background: linear-gradient(180deg, #FFE6A0, #E7B43C); border-color: transparent; }
.stu-row.top2 .rank-badge { color: #1A1F33; background: linear-gradient(180deg, #EDF0FF, #A8B0CE); border-color: transparent; }
.stu-row.top3 .rank-badge { color: #2A1608; background: linear-gradient(180deg, #F2C7A8, #C58A5B); border-color: transparent; }
.stu-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stu-name .nick-flag { font-size: 10px; color: var(--muted-2); margin-left: 5px; font-weight: 400; }

/* 群学情反馈：课程完成情况行 */
.academic-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 14px;
  min-height: 56px;
  border-radius: 8px;
  transition: background 0.15s;
}
.academic-row:hover { background: rgba(212,160,23,0.06); }
.academic-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.academic-name-line .stu-name {
  font-weight: 600;
  font-size: 15px;
}
.status-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.status-tag.done { background: rgba(46,158,90,0.12); color: #2E9E5A; }
.status-tag.todo { background: rgba(199,123,48,0.12); color: #C77B30; }
.academic-comment {
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
  width: 100%;
}
.academic-comment.done { color: #2E9E5A; font-weight: 500; }
.academic-comment.todo { color: #C77B30; }
.academic-comment:hover { background: rgba(212,160,23,0.06); border-radius: 6px; }

/* 评语话术库 */
.comment-cat { font-size: 12px; color: var(--muted); margin: 8px 0 4px; font-weight: 500; }
.comment-lib { display: flex; flex-wrap: wrap; gap: 6px; }
.comment-chip {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(212,160,23,0.08);
  border: 1px solid rgba(212,160,23,0.2);
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.comment-chip:hover { background: rgba(212,160,23,0.18); }
.stu-icons { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; overflow: hidden; }
.stu-total { text-align: right; font-size: 18px; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.stu-total span { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.stu-next { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adjust-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: 0.15s;
}
.adjust-btn:hover { color: var(--gold); border-color: rgba(245, 196, 81, 0.5); background: rgba(245, 196, 81, 0.1); }

/* 图标尺寸 */
.ico { display: inline-block; vertical-align: middle; }
.ico-star { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)); }
.ico-moon { width: 28px; height: 28px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)); }
.ico-sun { width: 32px; height: 32px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); }
.ico-sm.ico-star, .ico-sm.ico-moon { width: 20px; height: 20px; }
.ico-sm.ico-sun { width: 24px; height: 24px; }
/* 图标大小：小 */
body.icon-size-small .ico-star { width: 20px; height: 20px; }
body.icon-size-small .ico-moon { width: 22px; height: 22px; }
body.icon-size-small .ico-sun { width: 26px; height: 26px; }
body.icon-size-small .ico-sm.ico-star, body.icon-size-small .ico-sm.ico-moon { width: 16px; height: 16px; }
body.icon-size-small .ico-sm.ico-sun { width: 20px; height: 20px; }
/* 图标大小：大 */
body.icon-size-large .ico-star { width: 36px; height: 36px; }
body.icon-size-large .ico-moon { width: 38px; height: 38px; }
body.icon-size-large .ico-sun { width: 44px; height: 44px; }
body.icon-size-large .ico-sm.ico-star, body.icon-size-large .ico-sm.ico-moon { width: 28px; height: 28px; }
body.icon-size-large .ico-sm.ico-sun { width: 34px; height: 34px; }
.ico-empty { opacity: 0.5; }

/* ---------- 数据管理 ---------- */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.upload-card { display: flex; flex-direction: column; margin-bottom: 16px; }
#view-data > .panel { margin-bottom: 16px; }
.upload-card.accent { border-color: rgba(245, 196, 81, 0.28); }
.panel-head .step {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 196, 81, 0.1);
  border: 1px solid rgba(245, 196, 81, 0.3);
  margin-right: 10px;
}
.panel-head > div { flex: 1; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 148px;
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
}
.dropzone:hover { border-color: rgba(245, 196, 81, 0.5); background: rgba(245, 196, 81, 0.05); }
.dropzone input { display: none; }
.dz-icon { font-size: 26px; color: var(--gold); opacity: 0.85; }
.dz-title { font-size: 14px; font-weight: 500; }
.dz-hint { font-size: 11px; color: var(--muted-2); }
.upload-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12px; }
.file-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-locked { padding: 8px 4px; }
.roster-locked-row { display: flex; align-items: center; gap: 14px; }
.roster-check {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(47, 191, 113, 0.12);
  color: #2FBF71;
  font-size: 20px; font-weight: 700;
}
.roster-locked-info { flex: 1; min-width: 0; }
.roster-locked-title { font-size: 14px; font-weight: 600; color: var(--text); }
.roster-locked-title b { color: var(--gold); }
.roster-locked-time { font-size: 12px; color: var(--muted); margin-top: 3px; }
.roster-locked-time b { color: var(--muted-2); font-weight: 500; }
.roster-locked-actions { display: flex; gap: 14px; margin-top: 12px; }

/* 云盘数据提示 */
.cloud-tip {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 16px;
  background: rgba(76, 111, 255, 0.06);
  border: 1px solid rgba(76, 111, 255, 0.15);
  border-radius: 12px;
  font-size: 12.5px; color: var(--text); line-height: 1.6;
}
.cloud-tip-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(76, 111, 255, 0.15);
  color: #4c6fff; font-weight: 700; font-size: 14px;
}
.cloud-tip-text b { color: var(--text); }
.cloud-link {
  color: #4c6fff; text-decoration: none; font-weight: 600;
  margin-left: 4px;
}
.cloud-link:hover { text-decoration: underline; }
/* 回退常驻横幅：上传解析失败、自动改用内置数据时持续提示 */
.cloud-fallback-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 12px;
  background: rgba(221, 163, 42, 0.1);
  border: 1px solid rgba(221, 163, 42, 0.42);
  border-left: 4px solid #dda32a;
  border-radius: 12px;
  font-size: 12.5px; color: var(--text); line-height: 1.6;
}
.cfb-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(221, 163, 42, 0.2);
  color: #b47a17; font-weight: 700; font-size: 13px;
}
.cfb-text b { color: #8a5a12; }

/* 数据源标签（内置数据 / 本地上传） */
.cloud-source-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  vertical-align: middle;
  white-space: nowrap;
}
.cloud-source-tag.builtin {
  background: rgba(76, 111, 255, 0.12);
  color: #4c6fff;
}
.cloud-source-tag.upload {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.cloud-pwd { margin-left: 10px; color: var(--muted); }
.cloud-pwd code {
  background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 6px;
  font-family: monospace; color: var(--gold); font-weight: 600;
}

/* 云盘数据 & 续报数据 左右两栏 */
.cloud-renew-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.cloud-panel {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.cloud-filter {
  margin: 12px 0 8px;
}
.cloud-filter-label {
  font-size: 12px;
  color: #888;
  display: block;
}
.renew-panel {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

/* 云盘空态紧凑化：内置按钮 + 虚线框不再把左栏顶高，避免等高布局下右侧续报卡片底部留白（仅作用于云盘面板） */
.btn.cloud-builtin-btn {
  width: 100%;
  height: 34px;
  padding: 0 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(180deg, #3D5384, #2C3E6B);
  box-shadow: 0 8px 20px rgba(44, 62, 107, 0.25);
}
.btn.cloud-builtin-btn:hover {
  background: linear-gradient(180deg, #4A6396, #34487A);
  box-shadow: 0 10px 26px rgba(44, 62, 107, 0.34);
}
.cloud-panel .cloud-tip { margin-bottom: 12px; }
.cloud-panel .dropzone { min-height: 112px; padding: 14px 18px; }
.cloud-panel .upload-foot { margin-top: 8px; }
.cloud-preset-info {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  background: #f5f7fb;
  color: #34487a;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.cloud-preset-status { margin-top: 4px; color: #666; }

/* 班级续报数据 */
.renew-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  min-width: 0;
}
.renew-item {
  flex: 0 0 calc(50% - 7px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--card-2);
}
.renew-item .dropzone { min-width: 0; overflow-wrap: anywhere; }
.renew-item-head { margin-bottom: 12px; }
.renew-type-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(240, 168, 41, 0.12);
  color: var(--gold);
  font-size: 13px; font-weight: 600;
}
.dropzone.small { padding: 16px; min-height: auto; }
.dropzone.small .dz-icon { font-size: 22px; }
.dropzone.small .dz-title { font-size: 13px; }
.empty-hint {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--card-2);
  border-radius: 12px;
  border: 1px dashed var(--line);
}

.lesson-updated { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lesson-updated b { color: var(--muted-2); font-weight: 500; }
.refresh-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(245, 196, 81, 0.04);
  border: 1px solid rgba(245, 196, 81, 0.16);
}
.refresh-zone p { font-size: 12px; color: var(--muted); }
.refresh-zone .btn { height: 44px; }

.mapping { margin-bottom: 16px; }
.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.mapping-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.mapping-grid .input { width: 100%; }
.mapping-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 12px; flex-wrap: wrap; }

.report-list { display: flex; flex-direction: column; }
.report-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.report-list li:first-child { border-top: 0; padding-top: 0; }
.dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(61, 220, 151, 0.6); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(255, 181, 71, 0.6); }
.report-list li > div { flex: 1; }
.report-list b { font-size: 14px; font-weight: 500; }
.report-list p { font-size: 12px; color: var(--muted); margin-top: 1px; }
.report-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 12px; }

/* ---------- 设置 ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.rule-row b { font-size: 14px; font-weight: 500; }
.rule-row p { font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.rule-divider { height: 1px; background: var(--line); margin: 4px 0; }
.hw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
.hw-grid label { font-size: 12px; color: var(--muted); }
.hw-grid .input { width: 100%; margin-top: 5px; }
.compose-preview {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--gold);
  background: rgba(245, 196, 81, 0.08);
  border: 1px solid rgba(245, 196, 81, 0.24);
  text-align: center;
}
.notice {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.3);
}
.notice b { color: var(--purple-2); font-size: 14px; }
.notice p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.7; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 14, 0.72);
  backdrop-filter: blur(8px);
}
.modal {
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, #1B2246, #10152F);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  animation: pop 0.2s ease both;
}
@keyframes pop { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}
.modal-close:hover { color: var(--text); }

.adjust-box { display: flex; flex-direction: column; gap: 16px; }
.adjust-student {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.adjust-student .podium-avatar { width: 44px; height: 44px; margin: 0; font-size: 15px; }
.adjust-student b { font-size: 16px; }
.adjust-actions { display: flex; gap: 10px; }
.adjust-actions .btn { flex: 1; }
.adjust-reason { width: 100%; }
.export-preview {
  max-height: 60vh;
  overflow: auto;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
}
.export-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 10px;
}
.export-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.export-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 80;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--gold-2);
  background: rgba(20, 26, 56, 0.96);
  border: 1px solid rgba(245, 196, 81, 0.4);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.22s ease both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .student-grid { grid-template-columns: 1fr; }
  .stu-row { grid-template-columns: minmax(70px, 1fr) auto 28px; }
  .stu-next { display: none; }
}
@media (max-width: 860px) {
  .topbar { gap: 12px; padding: 0 16px; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .topbar-right { display: flex; }
  .nav { order: 3; width: 100%; flex-wrap: wrap; gap: 6px; }
  .nav-btn { height: 32px; padding: 0 12px; font-size: 13px; }
  main { padding: 18px 14px 44px; }
  .page-head h2 { font-size: 22px; }
  .toolbar { width: 100%; }
  .toolbar .input { flex: 1; width: auto; }
  .board-title-row h2 { letter-spacing: 2px; }
  .board-hero-inner { padding: 20px 0; }
  .podium-card { width: 100%; max-width: 320px; }
  .podium-card.first { transform: none; }
  .class-grid { grid-template-columns: 1fr; }
  .stu-row { grid-template-columns: minmax(64px, 1fr) auto 26px; gap: 7px; padding: 8px 10px; }
  .stu-total { font-size: 16px; }
  .modal { padding: 18px; }
  .export-preview img { width: auto; max-width: 100%; }
}
@media (max-width: 520px) {
  .brand.small span:not(.brand-mark) { display: none; }
  .board-actions { width: 100%; }
  .board-actions .btn { flex: 1; }
}

/* 空状态 */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 28px;
  border-radius: 20px;
  border: 1px dashed rgba(245, 196, 81, 0.28);
  background: rgba(18, 24, 52, 0.55);
}
.empty-state .empty-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  line-height: 88px;
  font-size: 40px;
  color: var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(245, 196, 81, 0.18), transparent 70%);
}
.empty-state h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.empty-state p {
  max-width: 520px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.empty-state .empty-note {
  margin: 18px auto 0;
  font-size: 12px;
  color: rgba(155, 164, 199, 0.75);
}

/* ================= 明亮卡通主题 ================= */
body {
  background:
    radial-gradient(1100px 620px at 8% -12%, #FFE8F0 0%, transparent 60%),
    radial-gradient(1000px 600px at 94% -6%, #DDF1FF 0%, transparent 55%),
    radial-gradient(900px 680px at 50% 112%, #FFF3D6 0%, transparent 58%),
    var(--bg);
}
.starfield {
  background-image:
    radial-gradient(1.6px 1.6px at 22px 34px, rgba(240, 168, 41, 0.5) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 128px 88px, rgba(124, 158, 242, 0.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 64px 168px, rgba(244, 154, 190, 0.42) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 190px 40px, rgba(120, 190, 250, 0.45) 50%, transparent 51%);
  opacity: 0.55;
}
.panel {
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(80, 105, 190, 0.10);
}
.input, .input:focus {
  background: #FFFFFF;
  border-color: rgba(28, 51, 110, 0.18);
  color: var(--text);
}
.input:focus { border-color: rgba(240, 168, 41, 0.65); box-shadow: 0 0 0 3px rgba(240, 168, 41, 0.15); }
.btn.ghost {
  background: #FFFFFF;
  border-color: rgba(28, 51, 110, 0.16);
  color: var(--text);
}
.btn.ghost:hover { background: #F4F8FF; border-color: rgba(28, 51, 110, 0.3); }
.nav-btn { color: var(--muted); }
.nav-btn:hover { color: var(--text); background: #F1F6FE; }
.nav-btn.active { color: #8A5A00; background: linear-gradient(180deg, #FFEAB8, #FFD06A); box-shadow: 0 4px 14px rgba(240, 168, 41, 0.35); }
.avatar { background: linear-gradient(180deg, #FFF0C8, #FFD06A); color: #7A4E00; border-color: rgba(240, 168, 41, 0.5); }
.stat-chip { background: #F3F7FE; border-color: rgba(28, 51, 110, 0.12); color: var(--muted); }
.stat-chip b { color: var(--text); }

/* 班级卡片：明亮糖果渐变 */
.bg-0 { background-image: linear-gradient(135deg, #A9C9FF 0%, #8FB6F5 100%); }
.bg-1 { background-image: linear-gradient(135deg, #FFD6A5 0%, #FFB877 100%); }
.bg-2 { background-image: linear-gradient(135deg, #A8EBC9 0%, #7BD9A8 100%); }
.bg-3 { background-image: linear-gradient(135deg, #FFC9DE 0%, #F5A3C7 100%); }
.bg-4 { background-image: linear-gradient(135deg, #CDBDFF 0%, #A99BF2 100%); }
.bg-5 { background-image: linear-gradient(135deg, #A5E3F2 0%, #7BCBEC 100%); }
.class-card { border: 1px solid rgba(255, 255, 255, 0.65); box-shadow: 0 14px 34px rgba(80, 105, 190, 0.18); }
.class-card:hover { box-shadow: 0 22px 48px rgba(80, 105, 190, 0.26), 0 0 0 1px rgba(240, 168, 41, 0.35) inset; }
.class-card::before {
  background-image:
    radial-gradient(1.6px 1.6px at 30% 24%, rgba(255, 255, 255, 0.9), transparent 2.2px),
    radial-gradient(1.3px 1.3px at 74% 40%, rgba(255, 255, 255, 0.7), transparent 2px),
    radial-gradient(2px 2px at 55% 78%, rgba(255, 255, 255, 0.55), transparent 2.6px);
  opacity: 0.8;
}
.card-shade { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.16) 58%, rgba(255, 255, 255, 0.34) 100%); }
.type-tag { color: #7A4E00; background: rgba(255, 255, 255, 0.55); border-color: rgba(255, 255, 255, 0.8); }
.group-no { color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 4px rgba(90, 70, 30, 0.25); }
.class-card h3 { color: #2B3A66; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55); }
.card-meta { color: rgba(43, 58, 102, 0.78); }
.card-top-item { color: rgba(43, 58, 102, 0.92); }
.card-foot { color: rgba(43, 58, 102, 0.78); }
.card-foot b { color: #B8720A; }
.card-enter { color: #B8720A; }

/* 摘星榜头部 */
.board-hero { background-color: #EAF2FF; border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 18px 44px rgba(80, 105, 190, 0.18); }
.board-hero::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.24) 62%, rgba(255, 255, 255, 0.42) 100%); }
.board-title-row h2 { color: #2C3E6B; font-weight: 700; letter-spacing: 4px; text-shadow: -1px -1px 0 rgba(212,160,23,0.8), 1px -1px 0 rgba(212,160,23,0.8), -1px 1px 0 rgba(212,160,23,0.8), 1px 1px 0 rgba(212,160,23,0.8), 0 2px 4px rgba(0,0,0,0.15); }
.board-title-row p { color: rgba(43, 58, 102, 0.72); font-weight: 600; letter-spacing: 2px; text-shadow: 0 1px 2px rgba(255,255,255,0.8); }
.segmented { background: rgba(255, 255, 255, 0.6); border-color: rgba(255, 255, 255, 0.8); }
.segmented button.active { color: #7A4E00; background: linear-gradient(180deg, #FFEAB8, #FFD06A); }
.podium-card { background: rgba(255, 255, 255, 0.72); border-color: rgba(255, 255, 255, 0.85); box-shadow: 0 12px 28px rgba(80, 105, 190, 0.16); }
.podium-avatar { background: radial-gradient(circle at 35% 30%, #FFE9B0, #FFC94D 70%); color: #7A4E00; border-color: rgba(240, 168, 41, 0.6); }
.stu-row { background: #FFFFFF; border-color: rgba(28, 51, 110, 0.1); box-shadow: 0 6px 18px rgba(80, 105, 190, 0.08); }
.stu-row:hover { background: #F7FAFF; border-color: rgba(28, 51, 110, 0.22); }
.stu-row .rank-badge { background: #EEF4FE; border-color: rgba(28, 51, 110, 0.14); color: var(--muted); }
.stu-name { color: var(--text); }
.stu-total { color: #B8720A; }

/* 贴纸 */
.sticker-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
#view-board { position: relative; }
.sticker-item { position: absolute; pointer-events: auto; cursor: move; user-select: none; -webkit-user-drag: none; background-size: contain; background-position: center; background-repeat: no-repeat; }
.sticker-item .sticker-del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: #ff4d4f; color: #fff; border: 2px solid #fff; font-size: 14px; line-height: 18px; text-align: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.sticker-item:hover .sticker-del { opacity: 1; }
.sticker-item.dragging { z-index: 10; }
.sticker-layer.drag-active { outline: 2px dashed #D4A017; outline-offset: -6px; border-radius: 12px; }

/* 素材选择面板 */
.asset-picker { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.asset-picker.hidden { display: none; }
.asset-picker-box { background: #fff; border-radius: 16px; width: min(560px, 92vw); max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.asset-picker-head { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #2B3A66; }
.asset-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #999; }
.asset-grid { padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; overflow-y: auto; }
.asset-item { cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid #eee; transition: all .15s; aspect-ratio: 1; background: #f5f5f5; }
.asset-item:hover { border-color: #D4A017; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.asset-item.selected { border-color: #D4A017; box-shadow: 0 0 0 3px rgba(212,160,23,.3); }
.asset-del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff;
  border: none; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.asset-del:hover { background: rgba(220,50,50,0.85); }
.asset-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-item .asset-name { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 3px 6px; text-align: center; }
.asset-item { position: relative; }
.asset-picker-foot { padding: 12px 16px; border-top: 1px solid #eee; text-align: center; }
.stu-next { color: var(--muted-2); }
.nick-flag { background: #FFF3D6; color: #9A6600; border-color: rgba(240, 168, 41, 0.4); }
.adjust-btn { background: #FFF3D6; border-color: rgba(240, 168, 41, 0.45); color: #9A6600; }

/* 弹窗与组件 */
.modal { background: linear-gradient(180deg, #FFFFFF, #F6F9FF); }
.modal-close { background: #F1F6FE; color: var(--muted); }
.adjust-student { background: #F7FAFF; }
.export-preview { background: #F3F7FE; }
::placeholder { color: #9FB0D4; }
::-webkit-scrollbar-thumb { background: rgba(28, 51, 110, 0.18); }
.empty-state { background: rgba(255, 255, 255, 0.75); border-color: rgba(240, 168, 41, 0.45); }
.empty-state .empty-icon { background: radial-gradient(circle at 50% 40%, rgba(240, 168, 41, 0.2), transparent 70%); }
.empty-state .empty-note { color: var(--muted-2); }

/* 补漏：上传区与提示条 */
.dropzone { border: 1.5px dashed rgba(28, 51, 110, 0.28); background: #F7FAFF; }
.dropzone:hover { border-color: rgba(240, 168, 41, 0.65); background: #FFF9EC; }
.toast { color: #7A4E00; background: rgba(255, 252, 244, 0.97); border-color: rgba(240, 168, 41, 0.5); box-shadow: 0 12px 30px rgba(80, 105, 190, 0.22); }
.dot.ok { background: #2FBF71; box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.16); }
.dot.warn { background: #F5A623; box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18); }
.report-list b { color: var(--text); }
.report-list p { color: var(--muted); }
.login-panel { box-shadow: 0 24px 60px rgba(80, 105, 190, 0.22); }
.login-sub { color: var(--muted); }
.topbar { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px); border-color: rgba(28, 51, 110, 0.1); }
.rule-row b { color: var(--text); }
.rule-row p { color: var(--muted); }
.link { color: #4C8BF5; }

/* 课次卡片容器 */
.lesson-panel { margin-bottom: 16px; }
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.lesson-type-head {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 10px 14px;
  margin-top: 4px;
  background: rgba(240, 168, 41, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.type-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  background: rgba(240, 168, 41, 0.12);
  padding: 2px 10px;
  border-radius: 10px;
}
.lesson-card {
  position: relative;
  padding: 16px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(28, 51, 110, 0.12);
  background: #F7FAFF;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 108px;
}
.lesson-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-meta { font-size: 12px; color: var(--muted); }
.lesson-actions { display: flex; gap: 12px; margin-top: auto; padding-top: 6px; }
.lesson-actions .link { font-size: 12px; border: none; background: none; cursor: pointer; padding: 0; }
.lesson-actions .link.danger { color: #E4573D; }
.lesson-card.add {
  cursor: pointer;
  border: 1.5px dashed rgba(240, 168, 41, 0.55);
  background: #FFF9EC;
  align-items: center;
  justify-content: center;
  color: #B8720A;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}
.lesson-card.add:hover { background: #FFF3D6; border-color: rgba(240, 168, 41, 0.85); transform: translateY(-2px); }
.lesson-card.add .add-plus {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #FFD06A, #F0A829);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* 班级卡片编辑按钮 */
.card-edit {
  border: none;
  background: rgba(255, 255, 255, 0.55);
  color: #7A4E00;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.class-card:hover .card-edit { opacity: 1; }
.card-edit:hover { background: rgba(255, 255, 255, 0.85); }
.modal-form { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.modal-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form-row { display: flex; gap: 12px; }
.style-group { background: rgba(245, 247, 255, 0.6); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.style-group-title { font-size: 13px; font-weight: 700; color: var(--text); padding-bottom: 6px; border-bottom: 1px dashed var(--line); }

/* ---------- 学情反馈 ---------- */
.feedback-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}
.stat-card.warn { border-color: rgba(228, 87, 61, 0.3); background: rgba(228, 87, 61, 0.05); }
.stat-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.2;
}
.stat-card.warn .stat-num { color: #E4573D; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.feedback-table { overflow-x: auto; }
.ftable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ftable th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.ftable td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ftable tr.row-warn { background: rgba(228, 87, 61, 0.05); }
.ftable tr:hover { background: rgba(245, 196, 81, 0.06); }
.rate {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.rate-high { background: rgba(46, 160, 67, 0.12); color: #2EA043; }
.rate-mid { background: rgba(245, 168, 41, 0.12); color: #B8720A; }
.rate-low { background: rgba(228, 87, 61, 0.12); color: #E4573D; }

/* ---------- 学员学情反馈 ---------- */
/* 班型 tab */
.sf-type-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.sf-type-tab {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: #5b6b8a; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.sf-type-tab:hover { border-color: var(--primary); color: var(--primary); }
.sf-type-tab.active {
  background: linear-gradient(180deg, #FFE6A0, #F5C451 58%, #DDA32A);
  color: #241A05; border-color: #DDA32A; font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 196, 81, 0.35);
}
/* 生源 / 续报 二级筛选 */
.sf-sub-tabs {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px; padding: 10px 14px;
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px;
}
.sf-sub-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sf-sub-label { font-size: 13px; color: #8a94a6; font-weight: 500; min-width: 40px; }
.sf-sub-tab {
  padding: 4px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: #fff; color: #5b6b8a; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.sf-sub-tab:hover { border-color: var(--primary); color: var(--primary); }
.sf-sub-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600;
}
.sf-source-tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  background: #eef3ff; color: var(--primary); border-radius: 10px;
  font-size: 11px; font-weight: 500; vertical-align: middle;
}
.sf-list { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.sf-list-item {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; cursor: pointer; transition: all 0.2s;
}
.sf-list-item:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,0.06); transform: translateY(-1px); }
.sf-list-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #a8b5c8, #7d8ba3);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.sf-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sf-list-info { flex: 1; min-width: 0; }
.sf-list-name { font-size: 16px; font-weight: 700; color: var(--text); }
.sf-list-cls { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sf-list-arrow { font-size: 24px; color: var(--muted); }

/* 学员详情卡片 —— 长图风格 */
.sf-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 500px; margin: 0 auto 12px; gap: 12px;
  background: #fff; border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative; z-index: 10;
}
.sf-toolbar-right {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; min-width: 0;
}
.sf-toolbar-right::-webkit-scrollbar { height: 4px; }
.sf-toolbar-right .btn {
  flex-shrink: 0;
  background: #F0F4FF; border-color: rgba(59,111,212,0.25);
  color: #2C3E6B; font-weight: 600;
}
.sf-toolbar-right .btn:hover {
  background: #E0EAFF; border-color: rgba(59,111,212,0.5);
}
.sf-toolbar .btn.primary {
  background: linear-gradient(180deg, #FFE6A0, #F5C451 58%, #DDA32A);
  color: #241A05; font-weight: 700;
}
.sf-detail-container {
  display: flex; gap: 24px; align-items: flex-start; width: 100%; min-width: 0;
  justify-content: center; flex-wrap: wrap; max-width: 1324px; margin: 0 auto;
}
.sf-left-col {
  flex: 0 1 500px; width: 500px; max-width: 100%; min-width: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.sf-card-wrap {
  position: relative; max-width: 500px; margin: 0;
  overflow: visible; width: 100%;
}
/* 学情卡导出为图片发给家长：四角全直角 */
.sf-card-wrap .board-hero { border-radius: 0; }
.sf-right-col {
  width: 800px; max-width: 100%; min-width: 0; flex: 0 1 800px;
  display: flex; flex-direction: column;
}
.sf-overview {
  width: 100%;
  background: #fff; border: 1px solid #e8eaf0; border-radius: 14px 14px 0 0;
  overflow: hidden; box-shadow: 0 4px 16px rgba(44, 62, 107, 0.06);
  overflow-y: auto;
}
/* 右侧第二段：课上&作业正确率（与概览拼成一张卡） */
.sf-overview.sf-rates {
  border-radius: 0 0 14px 14px;
  border-top: none;
  overflow-y: visible;
}
.sf-rates .panel-head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sf-rates .panel-head h3 { font-size: 16px; color: #2C3E6B; margin: 0; }
.sf-rates-table .ftable { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.sf-rates-table .ftable th, .sf-rates-table .ftable td {
  padding: 9px 14px; text-align: center; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 20.8px;
}
.sf-rates-table .ftable th { background: #f0f4ff; font-weight: 600; color: #2C3E6B; }
.sf-rates-table .ftable tr:last-child td { border-bottom: none; }
.sf-rates-table td.rate-val { font-weight: 700; color: #2C3E6B; }
/* 正确率：描边式（区别于左侧实心胶囊） */
.rate-outline {
  display: inline-block; padding: 1px 10px;
  border-radius: 8px; border: 1.5px solid;
  font-weight: 700; font-size: 13px; background: transparent;
}
.rate-outline.rate-high { color: #2E9E5B; border-color: rgba(46, 158, 91, 0.55); }
.rate-outline.rate-mid { color: #D98A1E; border-color: rgba(217, 138, 30, 0.55); }
.rate-outline.rate-low { color: #D64545; border-color: rgba(214, 69, 69, 0.55); }
/* 左侧逐课表现内嵌的正确率：彩色加粗纯数字 */
.rate-num { font-weight: 700; font-size: 12px; }
.rate-num.rate-high { color: #2E9E5B; }
.rate-num.rate-mid { color: #D98A1E; }
.rate-num.rate-low { color: #D64545; }
/* 正确率卡标题行 + 开关按钮 */
.sf-rates-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sf-rates-toggle {
  flex-shrink: 0; border: 1px solid #cdd6ea; background: #fff; color: #5C6C9C;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: all 0.2s;
}
.sf-rates-toggle:hover { border-color: #2C3E6B; color: #2C3E6B; }
.sf-rates-toggle.on { background: #2C3E6B; border-color: #2C3E6B; color: #fff; }
/* 评价列：表头与星星图标统一居中 */
.sf-lesson-table .ftable th:last-child, .sf-lesson-table .ftable td.sf-eval-cell { text-align: center; }
/* 评分：评价图标下方小号灰字 */
.sf-eval-stack { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sf-score { font-size: 11px; color: #9aa3b8; line-height: 1; }
/* 逐课表现加列后横向自适应，不换行 */
.sf-lesson-table .ftable th, .sf-lesson-table .ftable td { white-space: nowrap; }
.sf-overview-title {
  position: relative;
  font-size: 16px; font-weight: 700; color: #2C3E6B;
  padding: 12px 16px 11px;
  background: #fff;
  border-bottom: 1px solid #f0f1f5;
}
.sf-overview-title::after {
  content: ''; position: absolute; left: 16px; bottom: -1px;
  width: 36px; height: 3px; border-radius: 2px; background: #D4A017;
}
.sf-overview-group {
  padding: 12px 16px 13px;
}
.sf-overview-group + .sf-overview-group { border-top: 1px solid #f5f6f8; }
.sf-overview-group-title {
  font-size: 13px; font-weight: 600; color: #8a93a8;
  letter-spacing: 2px;
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.sf-overview-group-title::before {
  content: ''; width: 3px; height: 12px; border-radius: 2px; background: #D4A017; flex-shrink: 0;
}
.sf-overview-field {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 4px 0;
}
.sf-overview-field:last-child { padding-bottom: 0; }
.sf-overview-mic-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: 100%; margin: 0 auto;
  container-type: inline-size;
}
.sf-overview-mic-item {
  display: flex; align-items: baseline; justify-content: center; gap: clamp(2px, 0.8cqw, 6px); min-width: 0; white-space: nowrap;
}
.sf-overview-mic-item .sf-overview-label { font-size: clamp(8px, 1.7cqw, 13px); overflow-wrap: normal; flex-shrink: 0; }
.sf-overview-mic-item .sf-overview-value.num { width: auto; font-size: clamp(9px, 1.85cqw, 14px); text-align: center; word-break: normal; flex-shrink: 0; }
@media (max-width: 600px) {
  .sf-toolbar, .sf-toolbar-right { flex-wrap: wrap; justify-content: center; }
  .sf-toolbar-right { overflow-x: visible; }
  .sf-overview-field { flex-wrap: wrap; }
  .sf-overview-label { flex-shrink: 1; overflow-wrap: anywhere; }
  .sf-lesson-table .ftable th, .sf-lesson-table .ftable td { white-space: normal; overflow-wrap: anywhere; }
}
.sf-overview-label {
  font-size: 13px; color: #9aa3b8; flex-shrink: 0;
}
.sf-overview-value {
  font-size: 14px; color: #2b3450; font-weight: 600;
  text-align: right; word-break: break-all;
}
.sf-overview-value.num {
  font-size: 14px; font-weight: 700; color: #2C3E6B;
}
.sf-overview-empty {
  padding: 40px 16px; text-align: center; color: #aaa; font-size: 13px;
  background: #fff;
}
#sfHero {
  position: relative; min-height: 300px; padding: 20px 24px 24px;
  background-size: cover; background-position: center;
  border-radius: 0;
}
/* logo 区域 */
.sf-logo-wrap {
  position: absolute; top: 18px; left: 20px; z-index: 5;
  width: 110px; height: 50px; cursor: pointer;
  border: 2px dashed rgba(255,255,255,0.6); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.sf-logo-wrap:hover { border-color: #fff; }
.sf-logo-wrap .sf-logo {
  max-width: 100%; max-height: 100%; object-fit: contain; display: none;
}
.sf-logo-wrap .sf-logo-tip {
  position: absolute; font-size: 11px; color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3); pointer-events: none;
}
.sf-logo-wrap.has-logo .sf-logo-tip { display: none; }
.sf-logo-wrap.has-logo { border: none; }
/* 标题块 */
.sf-title-block { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 3; }
.sf-title-block h2 {
  font-size: 72px; font-weight: 900; line-height: 1.1;
  color: #2C3E6B; letter-spacing: 4px;
  text-shadow:
    1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff,
    1px 1px 2px rgba(0,0,0,0.15);
  margin: 0 0 10px 0;
}
.sf-title-block p#sfMeta {
  display: inline-block; background: #3B6FD4; color: #fff;
  padding: 6px 16px; border-radius: 20px; font-size: 16px;
  font-weight: 600; box-shadow: 0 2px 8px rgba(59,111,212,0.3);
  margin: 0;
}
/* 贴纸层（学员学情，限制在 hero 内） */
#sfStickerLayer {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  overflow: visible;
}
#sfStickerLayer .sticker-item {
  position: absolute; pointer-events: auto; cursor: move;
  border: 2px dashed transparent; border-radius: 4px;
  transition: border-color 0.15s;
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
#sfStickerLayer .sticker-item:hover {
  border-color: rgba(59,111,212,0.7);
  background-color: rgba(59,111,212,0.05);
}

/* 导出时隐藏编辑态元素 */
.sf-exporting .sf-avatar-mask,
.sf-exporting .sf-logo-tip,
.sf-exporting .sticker-del,
.sf-exporting .sf-lesson-panel .panel-head p {
  display: none !important;
}
/* 导出时隐藏 logo 容器的白色虚线框（页面编辑态保留，用于提示可点击上传） */
.sf-exporting .sf-logo-wrap { border-color: transparent !important; transition: none !important; }
.sf-exporting #sfStickerLayer .sticker-item {
  border-color: transparent !important;
  background-color: transparent !important;
}
#sfStickerLayer .sticker-del {
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px;
  background: #ff4d4f; color: #fff; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; z-index: 10;
}
#sfStickerLayer .sticker-item:hover .sticker-del { display: flex; }
#sfStickerLayer.drag-active { pointer-events: auto; }
#sfStickerLayer .sticker-item.dragging { opacity: 0.8; z-index: 20; }

.sf-body {
  background: #fff; position: relative; z-index: 2;
  padding: 16px 0;
  display: flex; flex-direction: column; gap: 14px;
}
/* 学员资料卡（头像+姓名+名言） */
.sf-profile-card {
  background: #fff; padding: 16px;
}
.sf-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sf-avatar-wrap {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  overflow: hidden; cursor: pointer; border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); flex-shrink: 0;
  background: linear-gradient(135deg, #a8b5c8, #7d8ba3);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; font-weight: 700;
}
.sf-avatar { width: 100%; height: 100%; object-fit: cover; }
.sf-avatar-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,0.55);
  color: #fff; font-size: 10px; display: none;
  align-items: center; justify-content: center; text-align: center;
}
.sf-avatar-wrap:hover .sf-avatar-mask { display: flex; }
.sf-name { font-size: 22px; font-weight: 700; color: var(--text); }
.sf-quote {
  font-family: "STKaiti","KaiTi",serif;
  font-size: 15px; color: #8b5e3c; font-style: normal;
  padding: 8px 12px; background: rgba(201,169,110,0.1);
  border-left: 3px solid #c9a96e; border-radius: 0 8px 8px 0;
  cursor: pointer; transition: background 0.2s; line-height: 1.6;
  letter-spacing: 0.5px;
}
.sf-quote:hover { background: rgba(201,169,110,0.18); }
/* 讲次表格卡 */
.sf-lesson-panel { background: #fff; overflow: hidden; }
.sf-lesson-panel .panel-head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sf-lesson-table { max-height: none; }
.sf-lesson-table .ftable { width: 100%; border-collapse: collapse; }
.sf-lesson-table .ftable th, .sf-lesson-table .ftable td {
  padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px;
}
.sf-eval-cell {
  text-align: center !important; cursor: pointer;
  transition: background 0.15s;
}
.sf-eval-cell:hover { background: rgba(59,111,212,0.06); }
.sf-lesson-table .ftable th { background: #f0f4ff; font-weight: 600; color: #2C3E6B; }
.sf-lesson-table .ftable tr:last-child td { border-bottom: none; }
.quote-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 200px; overflow-y: auto; }
.quote-chips .comment-chip { cursor: pointer; }

/* ============ 自定义表扬榜 ============ */
.praise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
/* 表扬榜名单：卡片式网格 */
#pbStudentGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
}
.praise-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(212, 160, 23, 0.18);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.praise-row:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(212, 160, 23, 0.45);
  box-shadow: 0 6px 18px rgba(212, 160, 23, 0.15);
  transform: translateY(-2px);
}
.praise-row .stu-name {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #2C3E6B;
  order: 2;
}
.praise-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  order: 1;
}
.pb-emoji-text { font-size: 40px; line-height: 1; }
.pb-emoji-img { width: 44px; height: 44px; object-fit: contain; }

/* 模板1: 气泡 bubble */
#pbStudentGrid[data-style="bubble"] .praise-row {
  background: #fff;
  border: 2px solid #FFB84D;
  border-radius: 20px 20px 20px 4px;
  position: relative;
}
#pbStudentGrid[data-style="bubble"] .praise-row::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #FFB84D;
}
#pbStudentGrid[data-style="bubble"] .praise-row .stu-name { color: #B8720A; }

/* 模板2: 奖牌 medal */
#pbStudentGrid[data-style="medal"] .praise-row {
  background: radial-gradient(circle at 50% 40%, #FFE082 0%, #FFB300 70%, #FF8F00 100%);
  border: 3px solid #E65100;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  padding: 14px;
}
#pbStudentGrid[data-style="medal"] .praise-row:hover {
  box-shadow: 0 8px 24px rgba(230, 81, 0, 0.4);
}
#pbStudentGrid[data-style="medal"] .praise-row .stu-name {
  color: #5D2E00;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
#pbStudentGrid[data-style="medal"] .pb-emoji-text { font-size: 32px; }
#pbStudentGrid[data-style="medal"] .pb-emoji-img { width: 36px; height: 36px; }

/* 模板3: 星星徽章 star */
#pbStudentGrid[data-style="star"] .praise-row {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  border: 2px solid #FF8F00;
  border-radius: 50% 20% 50% 20%;
  transform: rotate(0deg);
}
#pbStudentGrid[data-style="star"] .praise-row:hover {
  box-shadow: 0 6px 20px rgba(255, 143, 0, 0.35);
  transform: rotate(3deg) translateY(-2px);
}
#pbStudentGrid[data-style="star"] .praise-row .stu-name { color: #8C4A00; }

/* 模板4: 自定义 custom */
#pbStudentGrid[data-style="custom"] .praise-row {
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 14px;
}
#pbStudentGrid[data-style="custom"] .praise-row .stu-name {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
/* 模板6: 无背景 none */
#pbStudentGrid[data-style="none"] .praise-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
#pbStudentGrid[data-style="none"] .praise-row .stu-name {
  color: #2C3E6B;
  font-size: 17px;
}

/* 模板选择器弹窗 */
.name-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.name-style-item {
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  background: var(--card-2);
}
.name-style-item:hover {
  border-color: var(--primary);
  background: rgba(245, 196, 81, 0.08);
}
.name-style-item.active {
  border-color: var(--primary);
  background: rgba(245, 196, 81, 0.12);
  box-shadow: 0 4px 12px rgba(245, 196, 81, 0.2);
}
.name-style-preview {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.name-style-preview.preview-card { background: rgba(255,255,255,0.7); border: 1px solid rgba(212,160,23,0.3); color: #2C3E6B; border-radius: 12px; }
.name-style-preview.preview-bubble { background: #fff; border: 2px solid #FFB84D; color: #B8720A; border-radius: 14px 14px 14px 4px; }
.name-style-preview.preview-medal { background: radial-gradient(circle, #FFE082, #FFB300); color: #5D2E00; border-radius: 50%; width: 64px; margin: 0 auto 10px; }
.name-style-preview.preview-star { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); color: #8C4A00; border-radius: 50% 20% 50% 20%; }
.name-style-preview.preview-custom { background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 8px, #e0e0e0 8px, #e0e0e0 16px); color: #666; border: 1px dashed #aaa; }
.name-style-preview.preview-none { background: transparent; color: #999; border: 1px dashed #ccc; }
.name-style-name { font-size: 14px; font-weight: 600; color: var(--text); }

/* 表情库弹窗 */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.emoji-item {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border-radius: 12px;
  background: #f7f8fb;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.emoji-item:hover {
  transform: scale(1.08);
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.emoji-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.emoji-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  background: #E8435A;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1;
}
.emoji-item:hover .emoji-del { opacity: 1; }
.emoji-del:hover { background: #d1344a; }
.emoji-item.selected {
  background: #fff5e6;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.25);
  transform: scale(1.05);
}
.emoji-hint-bar {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--card-2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
}

/* 表扬榜删除按钮 */
.btn.danger {
  background: rgba(232, 67, 90, 0.1);
  color: #E8435A;
  border-color: rgba(232, 67, 90, 0.3);
}
.btn.danger:hover {
  background: rgba(232, 67, 90, 0.18);
  border-color: rgba(232, 67, 90, 0.5);
}
.pb-del {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #E8435A;
}

/* ============ 奖状生成 ============ */
.cert-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  align-items: stretch;
}
.cert-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* 左右两列底边对齐：右列预览面板拉伸填满 */
.cert-col-right { justify-content: space-between; }
.cert-preview-panel { flex: 1; display: flex; flex-direction: column; }
.cert-preview-panel .panel-head { flex: 0 0 auto; }
.cert-preview { flex: 1; }
@media (max-width: 1100px) {
  .cert-layout { grid-template-columns: 1fr; }
  .cert-col-right { justify-content: flex-start; }
}

.cert-dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cert-dropzone.dragover { border-color: rgba(245, 196, 81, 0.7); background: rgba(245, 196, 81, 0.08); }

.cert-tpl-info {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 10px 14px;
  background: rgba(245, 196, 81, 0.08);
  border: 1px solid rgba(245, 196, 81, 0.25);
  border-radius: 10px;
}
.cert-tpl-name { font-size: 13px; color: var(--gold); font-weight: 500; word-break: break-all; }

.cert-tpl-list { display: flex; flex-direction: column; gap: 8px; }
/* 模板行（下拉 + 下载按钮） */
.cert-tpl-row { display: flex; gap: 8px; margin-bottom: 10px; }
.cert-template-rules { margin-top: 10px; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(212,160,23,.32); background: rgba(245,196,81,.09); color: #6F571B; font-size: 12px; line-height: 1.65; }
.cert-template-rules b { display: block; margin-bottom: 3px; color: #8C5A1E; }
.cert-template-rules code { padding: 1px 4px; border-radius: 4px; background: rgba(255,255,255,.72); color: #B03028; }
.cert-compile-status { margin-top: 8px; padding: 8px 11px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.cert-compile-status.loading { display: block !important; background: #EEF3FB; color: #3A557A; border: 1px solid #CBD8EB; }
.cert-compile-status.success { display: block !important; background: #EAF7EF; color: #287346; border: 1px solid #BDE2CA; }
.cert-compile-status.error { display: block !important; background: #FFF0F2; color: #B03045; border: 1px solid #F0C2CA; }
/* 名单模式切换 tabs */
.cert-mode-tabs { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.cert-mode-tab { flex: 1; padding: 8px 0; font-size: 13px; font-weight: 600; background: rgba(255,255,255,0.04); color: #8A93A6; border: 0; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.cert-mode-tab:hover { color: var(--text); }
.cert-mode-tab.active { background: var(--navy, #2C3E6B); color: #fff; }
/* 手动名单内的子切换（小号，金色描边式，与外层深蓝 tabs 区分层级） */
.cert-mode-tabs-sm { margin-bottom: 8px; }
.cert-mode-tabs-sm .cert-mode-tab { padding: 6px 0; font-size: 12px; background: transparent; }
.cert-mode-tabs-sm .cert-mode-tab.active {
  background: rgba(245, 196, 81, 0.12);
  color: #B8860B;
  box-shadow: inset 0 0 0 1.5px rgba(212, 160, 23, 0.55);
}
/* 名单库筛选 */
.cert-filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cert-filter-label { flex: 0 0 42px; font-size: 13px; font-weight: 600; color: #5A6580; }
.cert-filter-row .select { flex: 1; height: 36px; }
.cert-filter-preview { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(245, 196, 81, 0.08); border: 1px solid rgba(245, 196, 81, 0.22); }
.cert-filter-preview span { font-size: 13px; font-weight: 600; color: #8C5A1E; }
.cert-filter-preview .link { font-size: 12px; }
.cert-filter-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 10px; max-height: 180px; overflow: auto; border: 1px dashed var(--line); border-radius: 8px; background: rgba(255,255,255,0.5); }
.cert-filter-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #EEF2FA; border: 1px solid var(--line); font-size: 12px; color: #3A4560; }
.cert-filter-item i { font-style: normal; font-size: 11px; color: #8A93A6; }
/* 印章库列表 */
.cert-stamp-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cert-stamp-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.04); cursor: grab; }
.cert-stamp-item:active { cursor: grabbing; }
.cert-stamp-item img { height: 34px; max-width: 70px; object-fit: contain; }
.cert-stamp-item-name { font-size: 12px; color: #AAB4C8; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-stamp-item-add, .cert-stamp-item-del { cursor: pointer; font-size: 14px; line-height: 1; padding: 2px; user-select: none; }
.cert-stamp-item-add { color: #D4A017; font-weight: 700; }
.cert-stamp-item-add:hover { color: #F5C451; }
.cert-stamp-item-del { color: #E8435A; }
.cert-stamp-item-del:hover { opacity: 0.75; }
/* 预览上的印章图层（导出同样使用） */
.cert-stamp-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.cert-stamp {
  position: absolute; pointer-events: auto; cursor: grab;
  border: 1.5px dashed transparent; border-radius: 4px;
  user-select: none; -webkit-user-drag: none; touch-action: none;
}
.cert-stamp:active { cursor: grabbing; }
.cert-stamp.sel { border-color: #2C3E6B; }
/* 选中印章的微调控件 */
.cert-stamp-ctrl { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cert-stamp-ctrl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; color: #AAB4C8; }
.cert-stamp-ctrl-row input[type=range] { flex: 1; accent-color: #D4A017; }
.cert-stamp-ctrl-row b { width: 44px; text-align: right; font-size: 12px; color: #F5C451; }
.cert-stamp-ctrl-actions { display: flex; justify-content: flex-end; }
/* 印章生成器弹窗 */
.seal-gen { display: flex; gap: 18px; align-items: flex-start; }
.seal-gen-form { flex: 1; min-width: 0; }
.seal-gen-form .form-row { display: block; margin-bottom: 10px; }
.seal-gen-form label { display: block; font-size: 12px; color: #5A6580; margin-bottom: 4px; }
.seal-gen-form .input { width: 100%; height: 36px; }
.seal-code-row { display: flex; gap: 8px; }
.seal-code-row .input { min-width: 0; font-family: Consolas, "Courier New", monospace; letter-spacing: 1px; }
.seal-code-refresh { flex: 0 0 auto; height: 36px; padding: 0 12px; white-space: nowrap; }
.seal-gen-inline { display: flex; gap: 10px; }
.seal-gen-inline .form-row { flex: 1; }
.seal-gen-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #3A4560; cursor: pointer; }
.seal-gen-check input { accent-color: #D4A017; }
.seal-star-toggle-row { display: flex !important; align-items: flex-end; padding-bottom: 7px; }
.seal-star-toggle-row .seal-gen-check { min-height: 36px; margin: 0; }
.cert-generating .cert-col-left .panel,
.cert-generating .cert-col-right .panel { pointer-events: none; opacity: 0.72; }
.cert-generating .cert-generate-bar { pointer-events: none; }
.cert-generating .cert-progress { pointer-events: auto; opacity: 1; }
.seal-gen-preview { flex: 0 0 auto; width: 230px; height: 230px; border-radius: 12px; border: 1px dashed var(--line-strong); background:
  repeating-conic-gradient(#F2F5FB 0% 25%, #FFFFFF 0% 50%) 0 0 / 22px 22px; display: flex; align-items: center; justify-content: center; }
.seal-gen-preview canvas { width: 210px; height: 210px; }
@media (max-width: 640px) {
  .seal-gen { flex-direction: column; }
  .seal-gen-preview { width: 100%; }
}
.cert-tpl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none; color: var(--text);
  transition: all 0.15s;
}
.cert-tpl-item:hover {
  background: rgba(245, 196, 81, 0.1);
  border-color: rgba(245, 196, 81, 0.4);
}
.cert-tpl-icon { font-size: 18px; }
.cert-tpl-title { flex: 1; font-size: 14px; }
.cert-tpl-dl { font-size: 12px; color: var(--gold); }

.cert-id-input { width: 100%; resize: vertical; font-family: inherit; line-height: 1.6; }

.cert-fields { display: flex; flex-direction: column; gap: 12px; }
.cert-field { display: flex; align-items: center; gap: 12px; }
.cert-field-name {
  flex: 0 0 auto; min-width: 90px;
  font-size: 13px; font-weight: 600; color: var(--gold);
  font-family: "Consolas", "Monaco", monospace;
}
.cert-field-input { flex: 1; }

.cert-generate-bar { margin-top: 4px; }
.cert-progress {
  position: relative;
  margin-top: 12px;
  height: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.cert-progress-bar {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #FFE6A0, #F5C451);
  transition: width 0.3s ease;
}
.cert-progress-text {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  font-size: 12px; font-weight: 600; color: #241A05;
}

.cert-preview-panel { min-height: 400px; }
.cert-preview {
  min-height: 360px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  padding: 8px;
}
.cert-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 340px; color: #9aa3b8; text-align: center;
}
.cert-preview .cert-docx,
.cert-preview .docx-wrapper { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.cert-page-host { position: relative; width: 100%; max-width: 100%; box-shadow: 0 2px 12px rgba(0,0,0,0.12); line-height: 0; overflow: hidden; }
.cert-page-canvas { display: block; width: 100%; height: auto; max-width: 100%; background: #fff; }
.cert-docx-wrapper, .docx-wrapper { position: relative; }
.cert-vml-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.cert-vml-textbox { position: absolute; box-sizing: border-box; overflow: hidden; }

/* 离屏渲染区 */
.cert-render-stage {
  position: fixed;
  left: -200vw;
  top: 0;
  width: auto;
  height: auto;
  pointer-events: none;
  opacity: 0.001;
  z-index: -1;
}
.cert-browser-compile-stage { opacity: 1; z-index: -1000; }
.cert-browser-compile-stage .docx-wrapper { padding: 0 !important; background: transparent !important; }
.cert-browser-compile-stage section.docx { margin: 0 !important; box-shadow: none !important; }

/* 学员学情反馈：列表页置顶按钮（悬浮右下） */
.sf-top-btn {
  position: fixed;
  right: 28px;
  bottom: 36px;
  z-index: 60;
  padding: 9px 16px;
  border: none;
  border-radius: 22px;
  background: #2C3E6B;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(44, 62, 107, 0.35);
  transition: all 0.2s;
}
.sf-top-btn:hover { background: #3a4f85; transform: translateY(-1px); }
