/* 统一平台基础样式 —— 小学生友好主题（明亮 / 圆润 / 大字号） */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(160deg, #aee3ff 0%, #d9f3ff 30%, #fff7d6 70%, #ffe8ee 100%);
  background-attachment: fixed;
  color: #27334d;
  font-size: 15px;
}
a { color: inherit; }

/* ===== 登录页 ===== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  width: 380px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 34px 30px;
  box-shadow: 0 12px 40px rgba(60, 90, 180, 0.18);
}
.login-title { margin: 0 0 6px; font-size: 24px; text-align: center; color: #3b5bdb; }
.login-sub { margin: 0 0 22px; font-size: 13px; color: #8a93ab; text-align: center; }
.role-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.role-tab {
  flex: 1; padding: 10px 0; border: 2px solid #e3e9f7; background: #fff;
  border-radius: 14px; cursor: pointer; font-size: 15px; font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.role-tab:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(60, 90, 180, 0.14); }
.role-tab.active { background: linear-gradient(135deg, #4d8dff, #6a5cff); color: #fff; border-color: transparent; }
.login-form label { display: block; font-size: 14px; margin: 12px 0 5px; color: #5a647f; }
.login-form input {
  width: 100%; padding: 11px 14px; border: 2px solid #e3e9f7; border-radius: 12px; font-size: 15px;
  transition: border-color 0.15s;
}
.login-form input:focus { border-color: #4d8dff; outline: none; }
.form-error { color: #ef5350; font-size: 13px; min-height: 18px; margin: 10px 0; }
.btn-primary {
  width: 100%; padding: 12px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #4d8dff, #6a5cff); color: #fff; font-size: 16px;
  font-weight: 700; cursor: pointer; margin-top: 6px;
  box-shadow: 0 5px 14px rgba(90, 110, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(90, 110, 255, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: default; transform: none; }
.login-tip { font-size: 12px; color: #9aa3ba; text-align: center; margin-top: 14px; }

/* ===== 顶部导航 ===== */
.topnav {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, 0.94); padding: 12px 22px;
  box-shadow: 0 4px 18px rgba(60, 90, 180, 0.1);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.brand { font-weight: 800; font-size: 17px; white-space: nowrap;
  background: linear-gradient(90deg, #ff6b6b, #ffa94d, #40c057, #4d8dff, #845ef7);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.level-tabs { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.level-tab {
  padding: 8px 16px; border: 2px solid #e3e9f7; background: #fff;
  border-radius: 22px; cursor: pointer; font-size: 14px; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}
.level-tab:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(60, 90, 180, 0.16); }
.level-tab[data-code="YLE1"].active { background: linear-gradient(135deg, #51cf66, #37b24d); color: #fff; border-color: transparent; }
.level-tab[data-code="YLE2"].active { background: linear-gradient(135deg, #ffa94d, #f76707); color: #fff; border-color: transparent; }
.level-tab[data-code="YLE3"].active { background: linear-gradient(135deg, #845ef7, #6a5cff); color: #fff; border-color: transparent; }
.level-tab[data-code="KET"].active  { background: linear-gradient(135deg, #4dabf7, #3b5bdb); color: #fff; border-color: transparent; }
.level-tab[data-code="PET"].active  { background: linear-gradient(135deg, #f783ac, #d6336c); color: #fff; border-color: transparent; }
.level-tab.active { box-shadow: 0 5px 14px rgba(60, 90, 180, 0.28); }
.user-box { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 13px; color: #5a647f; font-weight: 600; }
.btn-ghost {
  padding: 7px 14px; border: 2px solid #e3e9f7; background: #fff; border-radius: 12px;
  cursor: pointer; font-size: 13px; font-weight: 600; transition: background 0.15s, transform 0.15s;
}
.btn-ghost:hover { background: #eef3ff; transform: translateY(-1px); }

/* ===== 学习页 ===== */
.learn-main { max-width: 920px; margin: 22px auto; padding: 0 16px; }
.learn-section {
  background: rgba(255, 255, 255, 0.9); border-radius: 24px;
  padding: 20px 24px 26px; box-shadow: 0 10px 34px rgba(60, 90, 180, 0.12);
}
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.section-head h2 { margin: 0; font-size: 21px; color: #3b5bdb; }
.cat-select select { padding: 9px 12px; border-radius: 12px; border: 2px solid #e3e9f7; font-size: 14px; font-weight: 600; }
.progress-wrap { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.progress-bar { flex: 1; height: 14px; background: #e7ebf5; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #51cf66, #4dabf7, #845ef7); transition: width .3s; border-radius: 10px; }
.progress-text { font-size: 13px; color: #5a647f; white-space: nowrap; font-weight: 700; }
.placeholder { color: #9aa3ba; text-align: center; padding: 34px 10px; font-size: 15px; }

/* ===== 功能页切换（学习/小测/拼写） ===== */
.feature-tabs { display: flex; gap: 10px; margin: 18px 0 14px; flex-wrap: wrap; }
.feature-tab {
  padding: 10px 20px; border: 2px solid #e3e9f7; background: #fff;
  border-radius: 20px; cursor: pointer; font-size: 15px; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}
.feature-tab:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(60, 90, 180, 0.15); }
.feature-tab.active { background: linear-gradient(135deg, #4d8dff, #6a5cff); color: #fff; border-color: transparent;
  box-shadow: 0 5px 14px rgba(90, 110, 255, 0.32); }
.feature-section .hint {
  font-size: 14px; color: #7a84a3; margin: 6px 0 14px;
  background: #f2f7ff; border-radius: 12px; padding: 9px 14px;
}

/* ===== 单词学习（图片卡片墙：一行 5 张） ===== */
.word-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .word-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .word-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .word-grid { grid-template-columns: repeat(2, 1fr); } }
.word-card {
  position: relative;
  background: #fff; border: 2px solid #eef1fa; border-radius: 18px;
  padding: 12px 8px 10px; text-align: center; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.word-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(60, 90, 180, 0.16); border-color: #c9d9ff; }
.word-card.pop { animation: card-pop 0.25s ease-out; }
@keyframes card-pop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
.word-card .pic {
  height: 78px; display: flex; align-items: center; justify-content: center;
  font-size: 54px; line-height: 1;
  background: linear-gradient(160deg, #eef3ff, #fff3d6);
  border-radius: 14px; margin-bottom: 8px;
}
.word-card .en { font-weight: 800; font-size: 15px; color: #27334d; word-break: break-word; }
.word-card .zh { font-size: 12px; color: #8a93ab; margin-top: 2px; }
.word-card.learned { border-color: #b8e8c8; background: #f4fdf7; }
.word-card.learned .pic { opacity: 0.55; }
.learned-badge {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #51cf66, #37b24d); color: #fff;
  font-size: 14px; font-weight: 800; line-height: 24px;
  box-shadow: 0 3px 8px rgba(55, 178, 77, 0.4);
}
.speak-btn {
  border: none; background: #eef3ff; border-radius: 10px; cursor: pointer;
  font-size: 17px; padding: 6px 9px; transition: transform 0.15s, background 0.15s;
}
.speak-btn:hover { transform: scale(1.15); background: #dbe7ff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-secondary {
  padding: 10px 18px; border: 2px solid #4d8dff; background: #fff; color: #3b5bdb;
  border-radius: 14px; cursor: pointer; font-weight: 700; font-size: 14px;
  transition: background 0.15s, transform 0.15s;
}
.btn-secondary:hover { background: #eef3ff; transform: translateY(-1px); }
.btn-medal { padding: 10px 18px; border: none; border-radius: 14px; color: #fff; cursor: pointer; font-weight: 700; }
.btn-medal.bronze { background: linear-gradient(135deg, #d99a6c, #b96f3c); }
.btn-medal.silver { background: linear-gradient(135deg, #b4bfca, #8d99a6); }
.btn-medal.gold { background: linear-gradient(135deg, #ffd43b, #f0a800); }

/* ===== 小测（中译英逐题：大提示图 + 输入） ===== */
.quiz-title { font-size: 16px; font-weight: 800; color: #3b5bdb; }
.quiz-card {
  background: #fff; border: 2px solid #eef1fa; border-radius: 24px;
  padding: 26px 26px 24px; box-shadow: 0 8px 26px rgba(60, 90, 180, 0.1);
  text-align: center;
  animation: pop-in 0.25s ease-out;
  max-width: 560px; margin: 0 auto;
}
.quiz-pic {
  width: 128px; height: 128px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 84px; line-height: 1;
  background: linear-gradient(160deg, #eef3ff, #fff3d6);
  border-radius: 32px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}
.quiz-card .quiz-stem {
  justify-content: center; font-size: 20px; margin-bottom: 18px;
}
.quiz-card .quiz-stem b { color: #27334d; }
.quiz-input {
  width: 100%; max-width: 340px; padding: 12px 16px;
  border: 2px solid #e3e9f7; border-radius: 14px; font-size: 18px;
  letter-spacing: 1px; text-align: center;
  transition: border-color 0.15s;
}
.quiz-input:focus { border-color: #4d8dff; outline: none; }

/* ===== 小测选项（旧多选样式，保留兼容） ===== */
.quiz-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.mode-tabs, .group-select { display: flex; gap: 8px; align-items: center; }
.mode-tab {
  padding: 8px 16px; border: 2px solid #e3e9f7; background: #fff;
  border-radius: 18px; cursor: pointer; font-size: 14px; font-weight: 700;
}
.mode-tab.active { background: linear-gradient(135deg, #4d8dff, #6a5cff); color: #fff; border-color: transparent; }
.group-select label { font-size: 14px; font-weight: 700; color: #5a647f; }
.group-select select { padding: 8px 11px; border-radius: 12px; border: 2px solid #e3e9f7; font-size: 14px; }
.quiz-q {
  background: #fff; border: 2px solid #eef1fa; border-radius: 18px;
  padding: 14px 18px; margin-bottom: 12px;
  transition: box-shadow 0.15s;
}
.quiz-q:hover { box-shadow: 0 5px 16px rgba(60, 90, 180, 0.1); }
.quiz-stem { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.quiz-emoji {
  width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: linear-gradient(135deg, #fff4e0, #ffe8ee); border-radius: 12px;
}
.quiz-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.quiz-opt {
  padding: 10px 18px; border: 2px solid #e3e9f7; background: #fafbff;
  border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 600;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.quiz-opt:hover { background: #eef3ff; transform: translateY(-2px); }
.quiz-opt.picked { background: linear-gradient(135deg, #4d8dff, #6a5cff); color: #fff; border-color: transparent; }
.quiz-opt.right { background: linear-gradient(135deg, #51cf66, #37b24d); color: #fff; border-color: transparent; }
.quiz-opt.wrong { background: linear-gradient(135deg, #ff8787, #e03131); color: #fff; border-color: transparent; }
.quiz-opt:disabled { cursor: default; }
.quiz-result { margin-top: 12px; }
.result-card {
  padding: 14px 18px; border-radius: 16px; font-size: 16px; font-weight: 700;
  animation: pop-in 0.25s ease-out;
}
@keyframes pop-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-card.good { background: #e6f9ec; color: #1d7a3d; border: 2px solid #b8e8c8; }
.result-card.bad { background: #fdeeed; color: #c2352c; border: 2px solid #f5cbc6; }

/* ===== 错题集 ===== */
.wrong-book {
  margin-top: 14px; background: #fff; border: 2px solid #f5cbc6;
  border-radius: 16px; padding: 14px 16px;
}
.wrong-head { font-weight: 800; font-size: 16px; color: #c2352c; margin-bottom: 10px; }
.wrong-item {
  display: flex; align-items: center; gap: 12px;
  background: #fdf6f5; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.wrong-item:last-child { margin-bottom: 0; }
.wrong-emoji {
  width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: #fff; border-radius: 12px;
}
.wrong-info { flex: 1; font-size: 14px; color: #27334d; }
.wrong-info b { font-size: 16px; }
.wrong-zh { color: #8a93ab; margin-left: 6px; }
.wrong-ans { font-size: 13px; color: #c2352c; margin-top: 2px; }
.wrong-ans s { opacity: 0.8; }
.score-line { line-height: 1.7; }

/* ===== 拼写小测（一次一题，配大插画） ===== */
.spell-progress { font-size: 14px; color: #5a647f; margin: 8px 2px; min-height: 20px; font-weight: 700; }
/* 最后一题自动判分的过渡提示 */
.auto-score-tip { font-size: 14px; color: #5a647f; margin: 10px 2px 0 12px; display: inline-block; font-weight: 700; }
.spell-card {
  background: #fff; border: 2px solid #eef1fa; border-radius: 24px;
  padding: 26px 26px 24px; box-shadow: 0 8px 26px rgba(60, 90, 180, 0.1);
  text-align: center;
  animation: pop-in 0.25s ease-out;
}
.spell-emoji {
  width: 128px; height: 128px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 84px; line-height: 1;
  background: linear-gradient(160deg, #eef3ff, #fff3d6);
  border-radius: 32px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}
.spell-head {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 20px; margin-bottom: 18px;
}
.spell-head .spell-zh { min-width: 0; flex: none; font-weight: 800; color: #27334d; }
.spell-card .actions, .spell-card .type-input { text-align: left; }
.type-input { max-width: 340px; font-size: 18px; letter-spacing: 1px; padding: 11px 14px; }
.letter-slots { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 auto 16px; min-height: 54px; justify-content: center; }
.letter-slot {
  width: 48px; height: 54px; border: 3px dashed #c3cbe0; border-radius: 12px;
  background: #fafbff; font-size: 26px; font-weight: 800; color: #27334d;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.letter-slot:hover { border-color: #4d8dff; }
.letter-slot.filled { border-style: solid; border-color: #4d8dff; background: #eef3ff;
  animation: pop-in 0.18s ease-out; }
.letter-tiles { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; justify-content: center; }
.letter-tile {
  width: 48px; height: 54px; border: none; border-radius: 12px;
  background: linear-gradient(160deg, #ffffff, #e7efff); font-size: 26px; font-weight: 800;
  color: #27334d; cursor: pointer; box-shadow: 0 4px 0 #c9d6f2;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.letter-tile:hover { transform: translateY(-3px); box-shadow: 0 7px 0 #c9d6f2; background: linear-gradient(160deg, #ffffff, #dbe7ff); }
.letter-tile.used { opacity: 0.25; cursor: default; box-shadow: none; transform: none; }

/* ===== 奖牌墙 / 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 40, 70, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(3px);
}
.modal {
  background: #fff; border-radius: 24px; padding: 22px 26px; width: 460px; max-height: 80vh;
  overflow: auto; box-shadow: 0 16px 50px rgba(20, 30, 70, 0.3);
  animation: pop-in 0.22s ease-out;
}
.modal-wide { width: 660px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 19px; color: #3b5bdb; }
.medal-wall .medal-level { margin-bottom: 14px; }
.medal-wall h4 { margin: 0 0 6px; }
.medal-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== 奖牌墙（新排版：按级别分组 + 序号方块） ===== */
.modal-wall { width: min(880px, 94vw); max-height: 86vh; }
.mw-level { margin-bottom: 20px; }
.mw-level:last-child { margin-bottom: 0; }
.mw-lv-pill {
  display: inline-block; padding: 5px 16px; border-radius: 14px;
  color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 6px;
}
.mw-lv-pill.YLE1 { background: linear-gradient(135deg, #51cf66, #37b24d); }
.mw-lv-pill.YLE2 { background: linear-gradient(135deg, #ffa94d, #f76707); }
.mw-lv-pill.YLE3 { background: linear-gradient(135deg, #845ef7, #6a5cff); }
.mw-lv-pill.KET  { background: linear-gradient(135deg, #4dabf7, #3b5bdb); }
.mw-lv-pill.PET  { background: linear-gradient(135deg, #f783ac, #d6336c); }
.mw-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed #e7ebf5; flex-wrap: wrap;
}
.mw-row:last-of-type { border-bottom: none; }
.mw-medal { font-size: 24px; width: 34px; text-align: center; flex: none; }
.mw-label { width: 64px; flex: none; font-weight: 800; font-size: 14px; color: #4a5578; }
.mw-chips { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }
.mw-chip {
  min-width: 38px; height: 38px; padding: 0 8px;
  border-radius: 11px; border: 2px solid; background: #fff;
  font-size: 15px; font-weight: 800; color: #4a5578; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.mw-chip:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(60, 90, 180, 0.18); }
.mw-chip.picked { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(60, 90, 180, 0.22); }
.mw-chip.bronze { border-color: #d99a6c; color: #a05a2c; }
.mw-chip.bronze.picked { background: #d99a6c; color: #fff; }
.mw-chip.silver { border-color: #9aa6b2; color: #64707c; }
.mw-chip.silver.picked { background: #9aa6b2; color: #fff; }
.mw-chip.gold { border-color: #f0a800; color: #b37b00; }
.mw-chip.gold.picked { background: #f0a800; color: #fff; }
.mw-chip.grand_gold { border-color: #d4a017; color: #9a7200; }
.mw-chip.grand_gold.picked { background: #d4a017; color: #fff; }
.mw-detail {
  display: none; margin: 8px 0 2px 108px;
  font-size: 14px; color: #3b5bdb; background: #f2f7ff;
  border-radius: 10px; padding: 8px 14px; font-weight: 600;
}
@media (max-width: 560px) { .mw-detail { margin-left: 0; } }
.medal-chip {
  display: inline-block; padding: 4px 10px; border-radius: 10px; font-size: 13px; color: #fff; font-weight: 700;
}
.medal-chip.gray { background: #bcc6cc; }
.medal-chip.bronze { background: linear-gradient(135deg, #d99a6c, #b96f3c); }
.medal-chip.silver { background: linear-gradient(135deg, #b4bfca, #8d99a6); }
.medal-chip.gold { background: linear-gradient(135deg, #ffd43b, #f0a800); }
.medal-chip.grand_gold { background: linear-gradient(135deg, #ffd43b, #d4a017); font-weight: 800;
  box-shadow: 0 3px 10px rgba(240, 168, 0, 0.45); }

/* ===== 教师看板 ===== */
.teacher-main { max-width: 1140px; margin: 22px auto; padding: 0 16px; }
.teacher-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.teacher-toolbar select { padding: 8px 11px; border-radius: 12px; border: 2px solid #e3e9f7; }
.search-input {
  flex: 1; min-width: 200px; max-width: 320px; padding: 9px 14px;
  border: 2px solid #e3e9f7; border-radius: 12px; font-size: 14px;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: #4d8dff; outline: none; }
.rt-status { font-size: 12px; color: #2f9e44; }
.name-cn { font-weight: 700; color: #27334d; }
.name-en { font-size: 12px; color: #4d8dff; font-weight: 600; }
.last-medal { white-space: nowrap; }
.last-date { display: block; font-weight: 700; color: #27334d; }
.last-time { display: block; font-size: 12px; color: #8a93ab; }
.no-medal { color: #b8c0d0; font-size: 13px; }
.student-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 26px rgba(60, 90, 180, 0.1); }
.student-table th, .student-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef1fa; font-size: 13px; vertical-align: top; }
.student-table th { background: #f2f7ff; color: #4a5578; }
.student-row { cursor: pointer; }
.student-row:hover { background: #f4f8ff; }
.mini-progress { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.mini-label { width: 36px; font-size: 11px; color: #8a93ab; }
.mini-bar { width: 90px; height: 8px; background: #e7ebf5; border-radius: 6px; overflow: hidden; }
.mini-bar.big { width: 160px; height: 10px; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4dabf7, #6a5cff); border-radius: 6px; }
.mini-pct { font-size: 11px; color: #667; width: 44px; }
.medal-count { font-size: 12px; margin-right: 4px; }
.medal-count.gold { color: #f0a800; }
.medal-count.silver { color: #8d99a6; }
.medal-count.bronze { color: #b96f3c; }
.medal-count.grand { color: #d4a017; font-weight: 700; }
.detail-body h4 { margin: 14px 0 6px; }
.detail-progress { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.medal-list, .activity-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.activity-list { flex-direction: column; }
.activity-list li { font-size: 12px; color: #5a647f; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%);
  background: #323a4d; color: #fff; padding: 12px 22px; border-radius: 14px;
  font-size: 14px; z-index: 100; box-shadow: 0 8px 24px rgba(20, 30, 70, 0.35);
}

/* ===== 教师端：删除 / 添加学生（20261009h） ===== */
.btn-danger {
  padding: 4px 12px; border: none; border-radius: 10px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff8787, #e03131);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(224, 49, 49, 0.35); }
.student-table th:last-child,
.student-table .op-col { width: 64px; }
.student-table .op-cell { white-space: nowrap; }

/* 添加学生弹窗表单 */
.add-form { display: flex; flex-direction: column; gap: 10px; }
.add-form-row { display: flex; align-items: center; gap: 10px; }
.add-form-row label { width: 72px; flex-shrink: 0; font-size: 13px; color: #4a5578; font-weight: 700; }
.add-form-row input,
.add-form-row select {
  flex: 1; padding: 8px 11px; border-radius: 12px;
  border: 2px solid #e3e9f7; font-size: 14px; outline: none; background: #fff;
}
.add-form-row input:focus,
.add-form-row select:focus { border-color: #6a5cff; }
.add-form .btn-primary { margin-top: 4px; align-self: flex-end; padding: 9px 26px; }

/* 明细弹窗内奖牌墙容器适配 */
.detail-mw { margin-top: 4px; }
.detail-mw .mw-row { padding: 8px 0; }
.detail-mw .mw-detail { font-size: 12px; }

/* ===== 管理后台：师生信息批量管理（20261009i） ===== */
.tab-bar { display: flex; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 22px; border: 2px solid #e3e9f7; background: #fff;
  border-radius: 20px; cursor: pointer; font-size: 15px; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tab-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(60, 90, 180, 0.15); }
.tab-btn.active {
  background: linear-gradient(135deg, #4d8dff, #6a5cff); color: #fff;
  border-color: transparent; box-shadow: 0 5px 14px rgba(90, 110, 255, 0.32);
}

/* 管理表格：复用 .student-table 基础样式，追加复选框列宽 */
.admin-table th:first-child,
.admin-table td:first-child { width: 44px; text-align: center; }
.admin-table .cell-actions { white-space: nowrap; }

/* 管理工具栏次要按钮（a 标签模板下载 / ghost 按钮） */
.admin-toolbar .btn-ghost { text-decoration: none; display: inline-block; }
.admin-toolbar .btn-ghost:disabled { opacity: 0.5; cursor: default; }

/* 导入弹窗 */
.import-body { display: flex; flex-direction: column; gap: 12px; }
.import-hint {
  font-size: 13px; color: #7a84a3; background: #f2f7ff;
  border-radius: 12px; padding: 10px 14px; line-height: 1.7; margin: 0;
}
.import-hint a { color: #3b5bdb; font-weight: 700; }
.import-file-row input[type="file"] { font-size: 13px; }
.import-preview { font-size: 14px; color: #27334d; font-weight: 700; min-height: 20px; }
.import-progress { font-size: 13px; color: #3b5bdb; min-height: 18px; font-weight: 700; }
.import-summary { font-size: 15px; font-weight: 800; color: #27334d; }
.import-summary .ok-count { color: #2f9e44; }
.import-summary .fail-count { color: #e03131; }

/* 导入结果明细表（含失败原因红字） */
.import-result { display: none; }
.import-result table {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 12px; overflow: hidden; border: 1px solid #eef1fa;
}
.import-result th, .import-result td {
  padding: 7px 10px; text-align: left; border-bottom: 1px solid #eef1fa; font-size: 12px;
}
.import-result th { background: #f2f7ff; color: #4a5578; }
.fail-reason { color: #e03131; font-weight: 600; }
.import-result tr.fail-row td { background: #fffafa; }

/* 管理后台分页条 + 每页条数选择 */
.admin-pagebar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  margin: 14px 0 4px; font-size: 13px; color: #5b6478; font-weight: 700;
}
.admin-pagebar .page-info { white-space: nowrap; }
.admin-pagebar .page-btn {
  padding: 5px 14px; border: none; border-radius: 10px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #74c0fc, #3b5bdb);
}
.admin-pagebar .page-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(59, 91, 219, 0.35); }
.admin-pagebar .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-size-sel {
  padding: 5px 8px; border: 2px solid #e3e8f5; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: #27334d; background: #fff;
  cursor: pointer; outline: none;
}
.page-size-sel:focus { border-color: #74c0fc; }
