:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --teal: #0f766e;
  --teal-soft: #e6f7f4;
  --ok: #16a34a;
  --ok-soft: #eafaf0;
  --warn: #d97706;
  --warn-soft: #fff7e8;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1100px 500px at 90% -10%, #e4ecff 0%, transparent 60%),
    radial-gradient(900px 420px at -10% 0%, #e8f7f4 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 8px; }
h1 { font-size: 26px; letter-spacing: .2px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }

code {
  background: #eef2f9;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .92em;
  color: var(--brand-dark);
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: .5px;
  white-space: nowrap;
}
.brand span { color: var(--teal); margin-left: 4px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: #374151;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.nav .who {
  color: var(--muted);
  font-size: 13px;
  padding: 0 6px;
  border-left: 1px solid var(--line);
  margin-left: 4px;
}
.nav .logout { color: var(--danger); }
/* M1.13：任务池是一级菜单，题库作为其下的二级菜单；队伍管理独立一级。 */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 142px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  z-index: 70;
}
.nav-group:hover .nav-sub,
.nav-group:focus-within .nav-sub { display: flex; }
.nav-sub a { padding: 7px 12px; border-radius: 7px; white-space: nowrap; }
@media (max-width: 720px) {
  .nav-sub { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 12px; background: transparent; }
}

/* ---------------- 布局 ---------------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 48px;
  flex: 1;
}
.footer {
  text-align: center;
  color: #98a2b3;
  font-size: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}
.narrow { max-width: 560px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-head h1 { margin-bottom: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}
.section-head h2 { margin: 0; }

.breadcrumb { margin-bottom: 14px; font-size: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mono { font-family: Consolas, "Cascadia Mono", "Courier New", monospace; }
.right { text-align: right; }
.num { text-align: right; white-space: nowrap; }
.strong-link { font-weight: 700; color: var(--ink); }
.strong-link:hover { color: var(--brand); }

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.error-card { text-align: center; padding: 46px 24px; }
.error-code {
  font-size: 64px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 8px;
}
.error-detail { font-size: 16px; color: #374151; margin-bottom: 22px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #2563eb, var(--brand));
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: #374151;
}
.btn-secondary:hover { background: #f8fafc; border-color: #cfd8e6; }
.btn-soft {
  background: var(--brand-soft);
  border-color: #c9d9ff;
  color: var(--brand-dark);
  box-shadow: none;
}
.btn-soft:hover { background: #dbeafe; border-color: #a9c4ff; color: var(--brand-dark); }
.btn-block { width: 100%; }
.btn-small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-large { padding: 12px 26px; font-size: 15px; }

/* ---------------- 表单 ---------------- */
.stack { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: #374151; }
.field small { font-size: 12px; }

input[type="text"], input[type="password"], input[type="date"], input:not([type]),
input[type="file"], select, textarea {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
textarea { resize: vertical; line-height: 1.6; }
textarea.mono { font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: 13px; }
input[type="file"] { padding: 8px 10px; background: #f8fafc; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inline-form input[type="file"] { flex: 1; min-width: 240px; width: auto; }

/* ---------------- 提示 ---------------- */
.alert {
  border-radius: 12px;
  padding: 12px 16px;
  margin: 14px 0;
  border: 1px solid transparent;
  font-size: 14px;
}
.alert-error { background: var(--danger-soft); border-color: #f6c9c9; color: #8f1d1d; }
.alert-warn { background: var(--warn-soft); border-color: #f4ddb0; color: #7c4307; }
.alert-ok { background: var(--ok-soft); border-color: #bfe6ca; color: #14532d; }
.tight-list { margin: 6px 0 0; padding-left: 20px; }
.tight-list li { margin: 2px 0; }

/* ---------------- 徽章 ---------------- */
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  background: #eef2f9;
  color: #475569;
  white-space: nowrap;
}
.badge-track { background: var(--brand-soft); color: var(--brand-dark); }
.badge-today { background: #fff1e6; color: #b45309; }
.badge-muted { background: #eef0f4; color: #8b95a7; }
.badge-open { background: var(--teal-soft); color: var(--teal); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-todo { background: #fff7e6; color: #a16207; }
.badge-diff { background: #f3e8ff; color: #7e22ce; }
.badge-kind { background: #e0f2fe; color: #075985; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 34px 30px;
}
.login-head { text-align: center; margin-bottom: 20px; }
.login-head h1 { font-size: 24px; }
.logo-dot {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 10px 22px rgba(37, 99, 235, .28);
}
.login-hint {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0 0;
}

/* ---------------- 学生首页 / 任务卡 ---------------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #ffffff 40%, #eef4ff 100%);
}
.hero h1 { margin-bottom: 2px; }
.hero-badge {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 20px;
  min-width: 130px;
}
.hero-badge span { display: block; color: var(--muted); font-size: 12px; }
.hero-badge strong { font-size: 17px; color: var(--brand-dark); }

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.task-card { display: flex; flex-direction: column; }
.task-today { border-color: #bfd2ff; box-shadow: 0 8px 26px rgba(37, 99, 235, .10); }
.task-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.task-card h3 { font-size: 17px; margin: 4px 0 2px; }
.task-card h3 a { color: var(--ink); }
.task-card h3 a:hover { color: var(--brand); }
.task-total {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1;
  white-space: nowrap;
}
.task-total small { font-size: 12px; color: var(--muted); font-weight: 700; margin-left: 2px; }
.task-card .btn { margin-top: auto; }

.progress {
  height: 8px;
  border-radius: 999px;
  background: #eaeff7;
  overflow: hidden;
  margin: 12px 0 6px;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  min-width: 0;
}
.progress-label { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

/* ---------------- 任务详情 ---------------- */
.task-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 50%, #f0f7ff 100%);
}
.task-hero h1 { margin: 4px 0; }
.task-progress-box { min-width: 190px; text-align: center; }
.task-progress-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.1;
}
.task-progress-num span { font-size: 16px; color: var(--muted); font-weight: 600; }

.module-block { margin-top: 22px; }
.module-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.module-head h2 { margin: 0; font-size: 17px; }
.module-difficulty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.module-difficulty .inline-form { margin: 0; gap: 6px; }
.module-difficulty select { padding: 5px 8px; font-size: 13px; }
.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  color: var(--ink);
  transition: border-color .15s, transform .06s, box-shadow .15s;
}
.item-row:hover {
  text-decoration: none;
  border-color: #b9cdf7;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .08);
}
.item-row:active { transform: translateY(1px); }
.item-no {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 64px;
}
.item-kind { font-weight: 800; color: var(--brand-dark); font-size: 14px; white-space: nowrap; }
.item-main { flex: 1; min-width: 0; }
.item-main h3 { margin: 0 0 2px; font-size: 16px; }
.item-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.item-side { display: flex; align-items: center; gap: 10px; }
.chevron { font-size: 24px; color: #b6c0d0; line-height: 1; }

.item-detail-head { background: linear-gradient(135deg, #fff 50%, #f3f8ff 100%); }
.item-detail-head h1 { margin: 2px 0 12px; }
.score-compose { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-chip {
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  color: #475569;
}
.score-chip strong { font-size: 18px; color: var(--brand-dark); }
.score-total { background: var(--brand-soft); border-color: #c9d9ff; color: var(--brand-dark); }
.score-plus { color: #9aa6b8; font-weight: 700; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.detail-main > .card:first-child, .detail-side > .card:first-child { margin-top: 0; }
.detail-side { position: sticky; top: 78px; }

.requirement, .answer-text {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  margin: 6px 0 0;
  overflow-x: auto;
}
.answer-text { background: #fff; }
.deduction-card { border-color: #f0d9ad; background: #fffdf7; }
.deduction-card .requirement { background: #fff8ea; border-color: #f2dfb9; }
.subtask-list { margin: 8px 0 0; padding-left: 22px; }
.subtask-list li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.subtask-list li:last-child { border-bottom: 0; }
.subtask-text { flex: 1; }
.sub-h { margin-top: 18px; margin-bottom: 6px; color: #374151; font-size: 14px; }

.submit-card { border-color: #c8d8fb; }
.state-ok { color: var(--ok); font-weight: 700; }
.state-locked { color: var(--danger); font-weight: 700; }
.file-picked { color: var(--brand); font-weight: 700; }
.tips { margin: 6px 0 0; padding-left: 20px; color: #475569; font-size: 13px; }
.tips li { margin: 5px 0; }
.tips-card { background: #fbfdff; }

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.file-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.file-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #f1f5f9;
}
.file-card figcaption {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
}
.file-name {
  font-size: 12px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 老师工作台 ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.stat { padding: 16px 18px; }
.stat-label { display: block; color: var(--muted); font-size: 13px; }
.stat-num { font-size: 30px; color: var(--brand-dark); line-height: 1.25; }
.stat-sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat-text { font-size: 20px; color: var(--teal); }

/* ---------------- 表格 ---------------- */
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.table th {
  background: #f8fafc;
  color: #52606f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfdff; }
.table .right, .table .num { text-align: right; }
/* M1.18：长题名 / 队伍名 / 链接在单元格内换行，避免撑破表格 */
.table td { overflow-wrap: anywhere; word-break: break-word; }
.table td.mono { word-break: break-all; }
.table td.nowrap, .table td.num { overflow-wrap: normal; word-break: normal; }
.table td .actions { flex-wrap: wrap; gap: 6px; }
.table .strong-link { overflow-wrap: anywhere; }
.bank-table .team-done-cell { min-width: 150px; }
.bank-table .team-done-line { white-space: nowrap; }

.import-card .hint-box {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #475569;
}
.hint-box p { margin: 4px 0; }
.team-block { margin-top: 24px; }

/* ---------------- 预览 / 发布 ---------------- */
.preview-summary { margin-bottom: 8px; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.summary-grid > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.summary-grid span { font-size: 12px; }
.summary-grid strong { font-size: 15px; word-break: break-word; }

.publish-bar {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #c8d8fb;
  background: linear-gradient(135deg, #ffffff 50%, #f0f6ff 100%);
}
.publish-bar p { margin: 2px 0 0; }

.details-card { margin-top: 18px; padding: 0; }
.details-card > summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  color: #374151;
  list-style: none;
}
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--brand);
  transition: transform .15s;
}
.details-card[open] > summary::before { transform: rotate(90deg); }
.details-body { padding: 0 20px 18px; }
.details-body h3 { margin-top: 14px; }
.source-md { max-height: 480px; overflow: auto; }

/* ---------------- 提交矩阵 ---------------- */
.matrix-wrap { max-height: 70vh; }
.matrix-table th, .matrix-table td { text-align: center; }
.matrix-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  text-align: left;
  min-width: 150px;
  box-shadow: 1px 0 0 var(--line);
}
.matrix-table thead .sticky-col { background: #f8fafc; z-index: 3; }
.matrix-item { min-width: 66px; }
.matrix-module { display: block; font-size: 10px; color: #9aa6b8; }
.cell-empty { color: #c3cbd8; }
.cell-done a {
  display: inline-block;
  background: var(--ok-soft);
  color: var(--ok);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
}
.cell-done a:hover { background: #d3f0dc; text-decoration: none; }
.cell-miss {
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  background: #fff7f7;
  border-radius: 6px;
  padding: 2px 9px;
}

/* ---------------- M1.5 能力分析 / 附件 ---------------- */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.analysis-grid { margin-top: 16px; }
.analysis-grid .detail-main > .card + .card { margin-top: 16px; }
.stat-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-pending { color: var(--warn); font-size: 26px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h2 { margin-bottom: 0; }

.radar-wrap { display: flex; justify-content: center; margin: 6px 0 0; }
.radar-svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  overflow: visible;
}
.radar-grid polygon {
  fill: none;
  stroke: #dbe4f0;
  stroke-width: 1;
}
.radar-spokes line { stroke: #e3eaf4; stroke-width: 1; }
.radar-area {
  fill: rgba(37, 99, 235, .18);
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linejoin: round;
}
.radar-dots circle {
  fill: var(--brand);
  stroke: #fff;
  stroke-width: 1.5;
}
.radar-label {
  font-size: 12px;
  font-weight: 700;
  fill: #334155;
}
.radar-value { font-size: 11px; fill: #64748b; }
.radar-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.radar-advice {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #c9d9ff;
  border-radius: 10px;
  background: var(--brand-soft);
}
.radar-advice strong { color: var(--brand-dark); }
.radar-advice p { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: #334155; }

.missing-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.missing-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}
.missing-list li a { font-weight: 600; }
.module-coverage { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.coverage-row { display: flex; flex-direction: column; gap: 2px; }
.coverage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.coverage-row .progress { margin: 4px 0 0; }
.compact-table th, .compact-table td { padding: 8px 10px; }
.difficulty-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 4px 0 6px;
}
.state-pending { color: var(--warn); font-weight: 700; }

.link-list, .attachment-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link-list li, .attachment-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  font-size: 13px;
  word-break: break-all;
}
.link-list li a { font-weight: 600; }
.attachment-list { margin-bottom: 10px; }
.attachment-row { justify-content: space-between; }
.attachment-row > div:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.attachment-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.attachment-actions input[type="file"] { max-width: 220px; font-size: 12px; }
.attachment-manage { margin-bottom: 8px; }
.deduction-list { margin: 8px 0 0; padding-left: 22px; }
.deduction-list li { margin: 4px 0; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.deduction-list li:last-child { border-bottom: 0; }
.question-section + .question-section { margin-top: 16px; }
.inline-delete { margin-left: auto; display: inline-flex; }
.inline-delete button { margin: 0; }
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f6c9c9;
}
.btn-danger:hover { background: #fbdada; }
.attach-cell { min-width: 210px; }
.attach-upload {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.attach-upload input[type="file"] { font-size: 12px; padding: 4px 6px; min-width: 150px; }
.attach-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  word-break: break-all;
}
.attach-row .inline-delete { margin-left: auto; }
.link-cell { min-width: 220px; }
.link-cell .tight-list li { margin: 3px 0; word-break: break-all; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

@media (max-width: 640px) {
  .container { padding: 18px 14px 40px; }
  .topbar-inner { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand { font-size: 17px; }
  .brand span { display: none; }
  .nav { width: 100%; justify-content: flex-start; gap: 2px; }
  .nav a { padding: 5px 8px; font-size: 13px; }
  .nav .who { border-left: 0; padding: 0 4px; }
  h1 { font-size: 22px; }
  .task-hero, .hero { flex-direction: column; align-items: flex-start; }
  .task-progress-box { width: 100%; text-align: left; }
  .item-row { flex-wrap: wrap; gap: 10px; }
  .item-side { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .file-card img { height: 120px; }
  .publish-bar { flex-direction: column; align-items: stretch; }
  .page-head { align-items: flex-start; }
  .table th, .table td { padding: 9px 10px; }
}

/* M1.6 任务池 / 队友提交 */
.inline-fields { display: flex; gap: 8px; }
.inline-fields input { flex: 1; min-width: 0; }
.teammate-sub { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.teammate-sub > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.teammate-body { margin-top: 10px; }
.teammate-body .answer-text { max-height: 320px; overflow: auto; }

/* M1.8 各队成员提交进度 / 每题提交人 */
.team-progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.team-progress-grid .card { margin: 0; }
.submitter-info { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 220px; text-align: right; }
.submitter-info .muted { overflow-wrap: anywhere; }
.network-card .card-head { margin-bottom: 8px; }

/* M1.12：负责内容多选（下拉多选） */
select[data-responsibility-select] {
  min-height: 118px;
  padding: 6px;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 8px;
  background: #fff;
}
select[data-responsibility-select] optgroup { font-weight: 600; }
select[data-responsibility-select] option { padding: 4px 6px; font-weight: 400; }
select[data-responsibility-select]:disabled { background: #f4f5f7; color: #9aa3b2; }

/* ---------------- M1.13 题库重排 / 等级 / 五字段 ---------------- */
.level-tag { border: 1px solid transparent; }
.level-l1 { background: #e9f8ee; color: #15803d; border-color: #bfe6ca; }
.level-l2 { background: #e8efff; color: #1d4ed8; border-color: #c9d9ff; }
.level-l3 { background: #fff3e6; color: #b45309; border-color: #f4ddb0; }
.level-l4 { background: #fdecec; color: #b91c1c; border-color: #f6c9c9; }
.level-unknown { background: #eef0f4; color: #8b95a7; }
.level-stars { letter-spacing: 2px; font-size: 14px; font-weight: 700; }
.level-stars.level-l1 { background: none; color: #15803d; border: 0; }
.level-stars.level-l2 { background: none; color: #1d4ed8; border: 0; }
.level-stars.level-l3 { background: none; color: #b45309; border: 0; }
.level-stars.level-l4 { background: none; color: #b91c1c; border: 0; }
.level-inline {
  display: inline-block;
  border-radius: 6px;
  padding: 1px 7px;
  margin-right: 4px;
  font-size: 12px;
  font-weight: 700;
}
.level-inline.level-l1 { background: #e9f8ee; color: #15803d; }
.level-inline.level-l2 { background: #e8efff; color: #1d4ed8; }
.level-inline.level-l3 { background: #fff3e6; color: #b45309; }
.level-inline.level-l4 { background: #fdecec; color: #b91c1c; }

.stat-grid-levels { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-grid-levels .stat { padding: 14px 16px; }
.level-stat { border-left: 4px solid var(--line); }
.level-stat.level-l1 { border-left-color: #15803d; }
.level-stat.level-l2 { border-left-color: #1d4ed8; }
.level-stat.level-l3 { border-left-color: #b45309; }
.level-stat.level-l4 { border-left-color: #b91c1c; }

.bank-tabs {
  display: flex;
  gap: 10px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.bank-tab {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 160px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #374151;
  box-shadow: var(--shadow);
}
.bank-tab span { font-weight: 800; font-size: 15px; }
.bank-tab small { color: var(--muted); font-size: 12px; }
.bank-tab:hover { text-decoration: none; border-color: #b9cdf7; color: var(--brand-dark); }
.bank-tab.active { border-color: #9db9ff; background: var(--brand-soft); color: var(--brand-dark); }

.menu-wrap { position: relative; display: inline-block; }
.menu-wrap > summary { list-style: none; cursor: pointer; }
.menu-wrap > summary::-webkit-details-marker { display: none; }
.menu-wrap[open] > summary { background: var(--brand-dark); color: #fff; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
  padding: 16px;
  z-index: 60;
  text-align: left;
  max-height: min(70vh, 560px);
  overflow-y: auto;
}
.menu-panel-wide { width: 430px; }
.menu-panel h3 { margin-bottom: 10px; font-size: 15px; }
.menu-panel form + form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.menu-panel .field { margin-bottom: 10px; }
.menu-panel .btn { width: 100%; }

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .06s;
}
.team-card:hover {
  text-decoration: none;
  border-color: #b9cdf7;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .08);
}
.team-card:active { transform: translateY(1px); }
.team-card.is-alert { border-color: #f0c9aa; background: #fffaf4; }
.team-card.is-active { border-color: #9db9ff; background: #f2f7ff; }
.team-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-card-top strong { font-size: 16px; }
.team-card-stats { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.team-card-stats b { color: var(--ink); font-size: 17px; }
.team-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.filter-card { padding: 12px 14px; }
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}
.filter-item { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.filter-item > span { font-size: 12px; font-weight: 700; color: #52606f; white-space: nowrap; }
.filter-item select,
.filter-item input { padding: 6px 9px; font-size: 13px; min-width: 120px; }
.filter-item.filter-keyword { min-width: 190px; }
.filter-actions { display: flex; gap: 6px; white-space: nowrap; }

.bank-table td:first-child { min-width: 240px; }
.module-group-head { padding: 16px 16px 0; margin: 0 0 10px; }
.module-group-head h2 { font-size: 17px; }

.team-focus .stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.team-focus .stat-grid { margin-bottom: 4px; }

.bank-nav-section { margin-bottom: 18px; }
.bank-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.bank-column { padding: 16px 18px; }
.bank-column-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bank-column-head h3 { margin: 0; }
.bound-team-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bound-team-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdff;
}
.bound-team-list li > a { font-weight: 700; }
.bound-team-list li > .small { margin-right: auto; }

.five-fields { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.field-card h2 { display: flex; align-items: center; gap: 10px; }
.field-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}
.field-block { margin-top: 14px; }
.field-block h3 { margin: 0 0 6px; color: #52606f; font-size: 13px; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
.subtask-table tfoot th { background: #f2f7ff; color: var(--brand-dark); }
.five-field-edit + .five-field-edit { margin-top: 16px; }
.five-field-edit .field + .field { margin-top: 12px; }
.bank-edit-form > .card + .card { margin-top: 16px; }
.bank-edit-form .form-actions { margin: 18px 0 6px; }
.bank-head .actions { align-items: flex-start; }

@media (max-width: 960px) {
  .stat-grid-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bank-columns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stat-grid-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { flex-wrap: wrap; }
  .menu-panel, .menu-panel-wide { width: calc(100vw - 32px); }
}
.responsibility-list { display: flex; gap: 4px; flex-wrap: wrap; }
.responsibility-list .badge { white-space: nowrap; }

/* M2 机检：提交前提示 / 拒绝页 / 机检结果 / 规则配置 */
.precheck-box {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.precheck-box > strong { display: block; margin-bottom: 6px; }
.precheck-list { margin: 0 0 6px; padding-left: 0; list-style: none; }
.precheck-list li { display: flex; gap: 6px; align-items: center; margin: 3px 0; font-size: 13px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list.compact .check-item { padding: 6px 8px; }
.check-item {
  border-left: 4px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 9px 12px;
  margin: 8px 0;
}
.check-item.check-fail { border-left-color: var(--danger); background: #fffafa; }
.check-item.check-warn { border-left-color: var(--warn); background: #fffdf7; }
.check-item.check-pass { border-left-color: var(--ok); }
.check-item.check-skip { border-left-color: #94a3b8; }
.check-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.check-message { margin: 2px 0; overflow-wrap: anywhere; }
.check-fix { margin: 2px 0; color: #475569; font-size: 13px; }
.check-details { margin-top: 10px; }
.check-details > summary { cursor: pointer; color: #334155; font-weight: 600; }
.rule-table td { vertical-align: top; }
.rule-table .rule-hard { background: #fffafa; }
.threshold-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.threshold-field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #475569; }
.threshold-field input { width: 78px; }
.form-actions { margin-top: 12px; }

/* M1.15：题库字段完整度 / 各队已做状态 */
.badge-warn { background: #fef3c7; color: #92400e; }
.stat-link { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.stat-link:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(31, 41, 55, .10); }
.completeness-card .stat-grid { margin-top: 10px; }
.team-done-cell { min-width: 150px; }
.team-done-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; line-height: 1.55; }
.team-done-name { color: #4b5563; font-size: 12px; }
.team-done-yes { color: #15803d; font-weight: 700; text-decoration: none; }
.team-done-no { color: #9ca3af; font-weight: 700; }

/* M1.14: 题库页出题设置（模块 × 等级 × 队伍） */
.settings-team { border-top: 1px solid #e2e8f0; padding: 16px 0; }
.settings-team:first-of-type { border-top: 0; }
.settings-team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.settings-team-head h3 { margin: 0; }
.settings-block { margin: 10px 0 14px; }
.settings-block h4 { margin: 0 0 4px; font-size: 15px; }
.settings-table .count-input { width: 72px; text-align: center; }
.settings-network-row td { background: #f8fafc; }
.draw-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0 2px; border-top: 1px dashed #e2e8f0; }
.draw-plan-table td, .draw-plan-table th { vertical-align: top; }
.draw-shortage { border-left: 4px solid var(--warn); background: #fffdf7; padding: 8px 12px; border-radius: 6px; margin: 8px 0; }

/* M1.19: 任务池出题操作台 / 审核页 / 待审展开 */
.settings-moved .section-head { align-items: flex-start; gap: 16px; }
.console-team { border-top: 1px solid var(--line); padding: 18px 0; }
.console-team:first-of-type { border-top: 0; }
.console-form { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfdff; }
.console-meta { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.console-meta .console-title { min-width: 260px; flex: 1; }
.console-rows { display: flex; flex-direction: column; gap: 8px; }
.console-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.console-row select { min-width: 180px; }
.console-row select[name="count"] { min-width: 92px; }
.console-row select[name="level"] { min-width: 150px; }
.console-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.console-row-template { display: none; }
.review-expand-row td { background: #fafcff; padding: 6px 12px 14px; }
.review-inline > summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 6px 0; }
.review-inline .five-sections { margin-top: 10px; }
.review-note { margin-bottom: 12px; }
.deadline-inline { gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .console-row select { min-width: 0; width: 100%; }
  .console-row { align-items: stretch; }
}

/* ======================================================================
   2026-11-22 UI 重建：layui + ECharts（CDN，零构建）
   统一主色 #2563eb / 卡片圆角 10px / 8 的倍数间距 / 等级四色
   ====================================================================== */
body { background: var(--bg); }
.container { max-width: 1240px; padding: 24px 24px 48px; }

/* 顶栏与导航 */
.topbar { background: #fff; }
.topbar-inner { max-width: 1240px; gap: 16px; padding: 10px 24px; }
.brand { color: var(--brand-dark); }
.brand span { color: var(--brand); }
.nav { gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 6px; color: #334155; }
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.active { background: var(--brand); color: #fff; }
.nav a.logout { color: var(--danger); margin-left: 4px; }
.nav a.logout:hover { background: var(--danger-soft); }
.nav-tools { display: flex; align-items: center; gap: 12px; margin-left: 4px; }
.msg-link { position: relative; display: inline-flex; align-items: center; gap: 4px; color: #334155; padding: 6px 8px; border-radius: 6px; }
.msg-link:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.msg-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.msg-dot.hidden { display: none; }
.who { color: var(--muted); font-size: 13px; padding-left: 12px; border-left: 1px solid var(--line); }

/* 三张主页摘要卡 */
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.summary-card { position: relative; overflow: hidden; padding: 24px; }
.summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--brand); }
.summary-card.summary-bank::before { background: var(--teal); }
.summary-card.summary-team::before { background: var(--warn); }
.summary-card h2 { margin: 0 0 4px; font-size: 18px; }
.summary-card .summary-desc { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.summary-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-metric { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.summary-metric .num { display: block; font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.summary-metric .label { color: var(--muted); font-size: 12px; }
.summary-card .btn { width: 100%; text-align: center; }
/* 摘要卡里一排放多个入口：两列等宽、同一配色，不再蓝白相间 */
.summary-card .card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.level-mini { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.level-mini span { font-size: 12px; padding: 2px 8px; border-radius: 999px; }

/* 任务池 / 状态 */
.status-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pending { background: #fff7e8; color: #b45309; }
.status-ai_done { background: #eff6ff; color: #1d4ed8; }
.status-reviewed { background: #eafaf0; color: #15803d; }
.status-none { background: #f1f5f9; color: #64748b; }
.status-withdrawn { background: #fef2f2; color: #b91c1c; }
.status-unsubmitted { background: #f1f5f9; color: #64748b; }
.status-partial { background: #fff7e8; color: #b45309; }
.status-submitted { background: #eafaf0; color: #15803d; }
.status-blocked { background: #fff7e8; color: #b45309; }
.pool-task > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.submission-line { margin-bottom: 4px; }
.submission-line a { margin-left: 4px; }
.is-withdrawn { opacity: .65; }
.task-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.task-section-title h2 { margin: 0; }
.supplement-tag { background: #eff6ff; color: #1d4ed8; }
.withdraw-tag { background: #fef2f2; color: #b91c1c; }
.inline-stack { display: flex; flex-direction: column; gap: 8px; }
.inline-stack form { margin: 0; }
.deadline-inline input[type="datetime-local"] { max-width: 190px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.item-actions .inline-form { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item-actions input[type="datetime-local"] { max-width: 170px; }
.supplement-box { margin-top: 8px; padding: 8px 10px; border: 1px dashed #93c5fd; border-radius: 8px; background: #f8fbff; }
.supplement-box strong { color: var(--brand-dark); }

/* 通知中心 */
.notification-list { display: flex; flex-direction: column; gap: 8px; }
.notification-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.notification-row.unread { border-color: #bfdbfe; background: #f8fbff; }
.notification-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; font-size: 17px; }
.notification-main { flex: 1; min-width: 0; }
.notification-main h3 { margin: 0 0 2px; font-size: 15px; }
.notification-main p { margin: 0; color: var(--muted); font-size: 13px; }
.notification-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.notification-meta form { margin: 0; }

/* 出题 / 看题占位 */
.placeholder-hero { padding: 32px; text-align: center; }
.placeholder-hero .layui-icon { font-size: 44px; color: var(--brand); }
.placeholder-hero h1 { margin: 10px 0 6px; }
.placeholder-hero p { color: var(--muted); max-width: 720px; margin: 0 auto 18px; }
.placeholder-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; text-align: left; margin: 24px 0; }
.placeholder-step { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.placeholder-step .step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.config-table { margin-top: 16px; }
.config-table table { width: 100%; }

/* 学生成绩 */
.score-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.score-group { margin-bottom: 16px; }
.score-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.score-group-head h3 { margin: 0; }
.score-detail { color: var(--muted); font-size: 13px; }
.score-empty { color: var(--muted); font-size: 13px; }
.radar-chart { width: 100%; height: 380px; }
.radar-fallback { display: block; margin-top: 12px; }

/* layui 组件对齐视觉规范 */
.layui-btn { border-radius: 6px; }
.layui-btn-primary { background-color: var(--brand); border-color: var(--brand); }
.layui-btn-primary:hover { background-color: var(--brand-dark); border-color: var(--brand-dark); }
.layui-btn-danger { background-color: var(--danger); border-color: var(--danger); }
.layui-card { border-radius: var(--radius); box-shadow: var(--shadow); }
.layui-table th { background: #f8fafc; color: #475569; }

/* 选项卡：JS 可用时只显示当前面板；JS 关闭时全部平铺，功能仍可用 */
.tabbed { margin-bottom: 8px; }
.tabbar { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.tab-btn { appearance: none; border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--muted); font: inherit; padding: 9px 14px; border-radius: 8px 8px 0 0; cursor: pointer; }
.tab-btn:hover { color: var(--brand); background: #eff6ff; }
.tab-btn.is-active { color: var(--brand); background: #fff; border-color: var(--line); font-weight: 600; margin-bottom: -1px; }
.tabbed[data-tabs-ready="1"] .tab-panel { display: none; }
.tabbed[data-tabs-ready="1"] .tab-panel.is-active { display: block; }
.tab-panel > .card:first-child, .tab-panel > section.card:first-child { margin-top: 0; }

@media (max-width: 960px) {
  .summary-grid, .placeholder-steps { grid-template-columns: 1fr; }
  .score-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: flex-start; }
  .nav-tools { margin-left: auto; }
  .who { display: none; }
  .summary-metrics { grid-template-columns: 1fr; }
}

/* 分页条 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.pager-pages { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pager .btn { min-width: 36px; }

/* 队伍任务详情：11 列五段表，给长文本列固定最小宽度，横向滚动而不是挤成一字一行 */
.pool-detail-table { min-width: 1500px; }
.pool-detail-table th, .pool-detail-table td { vertical-align: top; }
.pool-detail-table th:nth-child(1), .pool-detail-table td:nth-child(1) { min-width: 220px; }
.pool-detail-table th:nth-child(2), .pool-detail-table td:nth-child(2) { min-width: 90px; }
.pool-detail-table th:nth-child(3), .pool-detail-table td:nth-child(3) { min-width: 110px; }
.pool-detail-table th:nth-child(4), .pool-detail-table td:nth-child(4) { min-width: 340px; max-width: 460px; }
.pool-detail-table th:nth-child(5), .pool-detail-table td:nth-child(5) { min-width: 240px; }
.pool-detail-table th:nth-child(6), .pool-detail-table td:nth-child(6) { min-width: 200px; }
.pool-detail-table th:nth-child(7), .pool-detail-table td:nth-child(7) { min-width: 260px; }
.pool-detail-table th:nth-child(8), .pool-detail-table td:nth-child(8) { min-width: 90px; }
.pool-detail-table th:nth-child(9), .pool-detail-table td:nth-child(9) { min-width: 130px; }
.pool-detail-table th:nth-child(10), .pool-detail-table td:nth-child(10) { min-width: 100px; }
.pool-detail-table th:nth-child(11), .pool-detail-table td:nth-child(11) { min-width: 170px; }
.pool-detail-table .pre-wrap { margin-bottom: 6px; }

/* M3：自动化设置 / 看题复核 / 学生 AI 建议分 */
.automation-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.automation-scope { padding: 14px; }
.automation-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 14px;
}
.automation-fields .field { margin: 0; }
.automation-fields select,
.automation-fields input[type="time"] { width: 100%; }
.automation-actions .section-head { align-items: flex-start; }
.badge-conf-high { background: #e8f7ee; color: #137a3f; }
.badge-conf-medium { background: #fff6e0; color: #9a6b00; }
.badge-conf-low { background: #fde8e8; color: #a61b1b; }
.badge-conf-none { background: #f1f3f5; color: #5b6570; }
.status-ai_suggest { background: #eef4ff; color: #1f5fbf; }
.review-sub { margin-top: 12px; padding: 12px; border: 1px solid #e6e9ee; }
.review-sub-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px;
}
.review-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px;
}
.review-score-form input[type="number"] { width: 80px; }
.review-score-form input[type="text"] { min-width: 220px; }
.filter-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
}
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }

.review-origin { margin-top: 8px; }
.review-origin summary { cursor: pointer; color: #1f5fbf; }
.review-text {
  max-height: 220px; overflow: auto; background: #f8f9fb;
  border: 1px solid #eef0f4; padding: 10px; margin: 8px 0; white-space: pre-wrap;
}
.review-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.review-files a { display: flex; flex-direction: column; gap: 4px; width: 180px; }
.review-files img {
  width: 180px; height: auto; max-height: 160px; object-fit: contain;
  border: 1px solid #e6e9ee; background: #fff;
}

/* ===== 后台 UI 精修（统一视觉层，只改样式不改结构） ===== */
:root {
  --radius-lg: 14px;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .05);
}

.container { max-width: 1240px; padding: 26px 22px 48px; }

.page-head {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  /* 不能 hidden：页头里的「字段补齐/导入 CSV/AI 搜题」下拉会被裁掉 */
  overflow: visible;
}
.page-head::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: linear-gradient(180deg, var(--brand), #60a5fa);
}
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.page-head .muted { max-width: 900px; }
.page-head .actions { align-items: center; }

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card > .section-head { padding-bottom: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; }
.section-head h2::before {
  content: "";
  width: 4px; height: 16px; border-radius: 4px;
  background: var(--brand);
  display: inline-block;
}

.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { box-shadow: 0 4px 12px rgba(37, 99, 235, .22); }
.btn-danger { box-shadow: 0 4px 12px rgba(220, 38, 38, .18); }

.badge { border-radius: 999px; font-weight: 600; letter-spacing: .2px; }
.level-tag { border-radius: 999px; }

.table { border-collapse: separate; border-spacing: 0; }
.table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f6f9ff;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody tr:nth-child(even) td { background: #fcfdff; }
.table tbody tr:hover td { background: #f2f7ff; }
.table td, .table th { vertical-align: top; }
.table-wrap { border-radius: 12px; }

.filter-card { background: #fff; }
.filter-bar { gap: 12px 14px; align-items: flex-end; }
.filter-item span { font-size: 12px; color: var(--muted); font-weight: 600; }
.filter-item select, .filter-item input {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 36px;
}
.filter-item select:focus, .filter-item input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: 0;
}

.tabbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.tab-btn { border-radius: 8px; border-bottom: 0; margin: 0; }
.tab-btn.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 10px rgba(37, 99, 235, .25);
  margin-bottom: 0;
}
.tab-btn.is-active:hover { background: var(--brand-dark); color: #fff; }

.stat-grid .stat, .score-summary .stat {
  border-top: 3px solid var(--brand);
  border-radius: 12px;
}
.stat-num { letter-spacing: -.5px; }

.alert {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.empty, .card.empty {
  border: 1px dashed #cbd5e1;
  background: #fbfdff;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.pager { padding: 12px 4px; }
.pager-pages .btn { border-radius: 8px; }

.nav { gap: 4px; }
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  color: #475569;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(37, 99, 235, .22); }
.msg-link { border-radius: 999px; background: #f1f5f9; padding: 6px 10px; }
.msg-link:hover { background: var(--brand-soft); text-decoration: none; }
.who { background: #f1f5f9; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #475569; }

@media (max-width: 720px) {
  .container { padding: 16px 14px 36px; }
  .page-head { padding: 16px; }
  .tabbar { overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; }
}

/* 学生能力雷达：服务端 SVG，离线也能看到 */
.radar-chart { min-height: 360px; display: flex; align-items: center; justify-content: center; }
.radar-svg { width: 100%; height: 100%; max-height: 420px; }
.radar-svg text { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }

/* 题库页：筛选条按两行换行，不横向滚动 */
.filter-bar.bank-filter { flex-wrap: wrap; overflow-x: visible; }

/* ---------------- 登录页 · CTF 竞技场 ---------------- */
.arena {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 42px 40px;
  background:
    radial-gradient(900px 500px at 12% 0%, rgba(34, 211, 238, .18), transparent 60%),
    radial-gradient(700px 420px at 90% 100%, rgba(74, 222, 128, .12), transparent 60%),
    linear-gradient(135deg, #060b14 0%, #071320 55%, #050a12 100%);
  border: 1px solid rgba(56, 189, 248, .22);
  box-shadow: 0 30px 80px rgba(2, 6, 23, .35);
  color: #e6f6ff;
}
.arena-bg { position: absolute; inset: 0; pointer-events: none; }
.arena-grid {
  position: absolute; inset: -20%;
  background-image:
    linear-gradient(rgba(56, 189, 248, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, .08) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(600px) rotateX(52deg) translateY(-8%);
  transform-origin: 50% 0;
  animation: arena-grid-drift 16s linear infinite;
  opacity: .55;
}
@keyframes arena-grid-drift { from { background-position: 0 0; } to { background-position: 0 92px; } }
.arena-orb { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; }
.arena-orb-a { width: 260px; height: 260px; left: -80px; top: -90px; background: radial-gradient(circle, rgba(34,211,238,.55), transparent 65%); animation: arena-float 9s ease-in-out infinite; }
.arena-orb-b { width: 320px; height: 320px; right: -120px; bottom: -140px; background: radial-gradient(circle, rgba(74,222,128,.35), transparent 65%); animation: arena-float 12s ease-in-out infinite reverse; }
.arena-orb-c { width: 180px; height: 180px; right: 18%; top: 8%; background: radial-gradient(circle, rgba(129,140,248,.35), transparent 65%); animation: arena-float 10s ease-in-out infinite; }
@keyframes arena-float { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-18px,0) scale(1.04); } }
.arena-scan {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.65), transparent);
  box-shadow: 0 0 18px rgba(34,211,238,.45);
  animation: arena-scan 6s ease-in-out infinite;
}
@keyframes arena-scan { 0% { top: -2%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 102%; opacity: 0; } }
.arena-particle {
  position: absolute; left: var(--x); bottom: -10px; width: var(--size); height: var(--size);
  border-radius: 50%; background: rgba(125, 211, 252, .8);
  animation: arena-rise var(--dur) linear var(--delay) infinite;
}
@keyframes arena-rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .8; } 100% { transform: translateY(-520px); opacity: 0; } }

.arena-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 40px; align-items: center; }
.arena-copy { min-width: 0; }
.arena-live { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 "Consolas", monospace; letter-spacing: .12em; color: #67e8f9; }
.arena-live-sub { color: #7c93a8; letter-spacing: .04em; font-weight: 600; margin-left: 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: live-pulse 1.6s infinite; }
.arena-title { margin: 14px 0 8px; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; color: #f0fbff; letter-spacing: .01em; }
.arena-title span { color: #67e8f9; text-shadow: 0 0 26px rgba(34,211,238,.35); }
.arena-typing { font: 600 13px/1.5 "Consolas", monospace; color: #8fe3f5; min-height: 22px; }
.arena-typing .cursor { display: inline-block; width: 8px; height: 14px; background: #67e8f9; margin-left: 3px; vertical-align: -2px; animation: cursor-blink 1s step-end infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }

.arena-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0 20px; }
.arena-stat { background: rgba(12, 24, 39, .72); border: 1px solid rgba(56, 189, 248, .18); border-radius: 12px; padding: 12px 14px; }
.arena-stat strong { display: block; font-size: 24px; color: #7dd3fc; letter-spacing: .02em; }
.arena-stat span { font-size: 11px; color: #7c93a8; }

.arena-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.arena-panel { background: rgba(8, 17, 29, .72); border: 1px solid rgba(56, 189, 248, .16); border-radius: 14px; padding: 12px 14px; }
.arena-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #bae6fd; font-weight: 700; font-size: 13px; }
.arena-panel-head small { color: #6b8299; font-weight: 500; font-size: 10px; }
.rank-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 64px 34px; align-items: center; gap: 7px; padding: 5px 0; border-top: 1px dashed rgba(56,189,248,.1); font-size: 12px; }
.rank-row:first-of-type { border-top: 0; }
.rank-no { font: 700 10px/1 "Consolas", monospace; color: #38bdf8; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d7efff; }
.rank-name small { color: #6b8299; margin-left: 4px; font-size: 10px; }
.rank-bar { height: 5px; border-radius: 99px; background: rgba(56,189,248,.12); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22d3ee, #4ade80); box-shadow: 0 0 10px rgba(34,211,238,.5); }
.rank-val { text-align: right; font: 700 11px/1 "Consolas", monospace; color: #86efac; }
.arena-empty { margin: 6px 0; color: #6b8299; font-size: 11px; }

.arena-login.login-card {
  width: 100%; max-width: none; padding: 28px 26px;
  background: rgba(7, 16, 27, .86);
  border: 1px solid rgba(56, 189, 248, .28);
  box-shadow: 0 24px 60px rgba(2, 6, 23, .45);
  backdrop-filter: blur(14px);
  color: #e6f6ff;
}
.arena-login .login-head h2 { margin: 0 0 4px; color: #f0fbff; font-size: 22px; }
.arena-login .kicker { color: #38bdf8; }
.arena-login .logo-dot { background: linear-gradient(135deg, #22d3ee, #4ade80); box-shadow: 0 10px 26px rgba(34,211,238,.35); }
.arena-login .muted { color: #7c93a8; }
.arena-login .field > span { color: #9fb8cb; }
.arena-login .field input { background: rgba(10, 22, 36, .9); border-color: rgba(56,189,248,.22); color: #e6f6ff; }
.arena-login .field input:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.arena-login .login-hint { color: #6b8299; }
.arena-login .login-hint code { color: #67e8f9; }
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.14); margin: 16px 0 14px; }
.role-tab { border: 0; background: transparent; color: #8aa7bd; font-weight: 700; font-size: 13px; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: .18s ease; }
.role-tab.is-active { background: linear-gradient(135deg, rgba(34,211,238,.22), rgba(74,222,128,.16)); color: #e6f6ff; box-shadow: inset 0 0 0 1px rgba(56,189,248,.25); }
.arena-submit { background: linear-gradient(135deg, #0891b2, #16a34a); border: 0; box-shadow: 0 10px 26px rgba(8,145,178,.28); }
.arena-submit:hover { filter: brightness(1.06); }

@media (max-width: 980px) {
  .arena { padding: 28px 20px; }
  .arena-inner { grid-template-columns: 1fr; gap: 24px; }
  .arena-panels { grid-template-columns: 1fr; }
  .arena-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .arena-grid, .arena-orb, .arena-scan, .arena-particle, .live-dot, .arena-typing .cursor { animation: none !important; }
}


/* ---------------- 学生端动态效果 ---------------- */
.student-dash .card {
  animation: student-rise .55s cubic-bezier(.2, .7, .2, 1) both;
}
.student-dash .stat-grid .card:nth-child(1) { animation-delay: .04s; }
.student-dash .stat-grid .card:nth-child(2) { animation-delay: .10s; }
.student-dash .stat-grid .card:nth-child(3) { animation-delay: .16s; }
.student-dash .detail-grid .card { animation-delay: .10s; }
@keyframes student-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.student-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #ffffff 0%, #eef6ff 42%, #ecfdf5 100%);
  background-size: 180% 180%;
  animation: student-hero-flow 12s ease-in-out infinite;
}
@keyframes student-hero-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.student-hero::before,
.student-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}
.student-hero::before {
  width: 190px; height: 190px; right: -40px; top: -70px;
  background: radial-gradient(circle, rgba(37, 99, 235, .18), transparent 68%);
  animation: student-orb 8s ease-in-out infinite;
}
.student-hero::after {
  width: 150px; height: 150px; right: 120px; bottom: -80px;
  background: radial-gradient(circle, rgba(16, 185, 129, .16), transparent 68%);
  animation: student-orb 10s ease-in-out infinite reverse;
}
@keyframes student-orb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-10px, 10px, 0) scale(1.08); }
}
.student-hero h1 {
  background: linear-gradient(90deg, #1d4ed8, #0891b2 55%, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.student-dash .stat-num { transition: color .3s ease; }
.student-dash .stat-grid .card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
.student-dash .stat-grid .card { transition: transform .2s ease, box-shadow .2s ease; }
.student-dash .bar-fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #06b6d4 55%, #10b981);
  box-shadow: 0 0 10px rgba(37, 99, 235, .25);
  animation: student-bar-grow .9s cubic-bezier(.2, .7, .2, 1) both;
  transform-origin: left center;
}
@keyframes student-bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.student-dash .radar-svg polygon { animation: student-radar .7s ease both; transform-origin: center; }
@keyframes student-radar { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
.student-dash .missing-list li { transition: background .18s ease, transform .18s ease; }
.student-dash .missing-list li:hover { background: #f8fbff; transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) {
  .student-dash .card, .student-hero, .student-hero::before, .student-hero::after,
  .student-dash .bar-fill, .student-dash .radar-svg polygon { animation: none !important; }
}


/* ---------------- 学生挑战页 / 题目页动态效果 ---------------- */
.challenge-grid .challenge-card {
  animation: student-rise .5s cubic-bezier(.2, .7, .2, 1) both;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.challenge-grid .challenge-card:nth-child(2n) { animation-delay: .05s; }
.challenge-grid .challenge-card:nth-child(3n) { animation-delay: .1s; }
.challenge-grid .challenge-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .1);
  border-color: rgba(37, 99, 235, .25);
}
.challenge-card.is-solved {
  border-color: rgba(16, 185, 129, .28);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, .12), 0 10px 24px rgba(16, 185, 129, .1);
}
.card.ctf-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #ffffff 0%, #eef6ff 45%, #f0fdfa 100%);
  background-size: 180% 180%;
  animation: student-hero-flow 12s ease-in-out infinite;
}
.card.ctf-hero::after {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .07), transparent);
  animation: student-shine 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes student-shine {
  0%, 55% { left: -35%; }
  85%, 100% { left: 115%; }
}
.question-section { animation: student-rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.question-section:nth-of-type(2) { animation-delay: .06s; }
.question-section:nth-of-type(3) { animation-delay: .12s; }
.submit-card .btn-primary { position: relative; overflow: hidden; }
.submit-card .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: student-shimmer 3.6s ease-in-out infinite;
}
@keyframes student-shimmer {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) {
  .challenge-grid .challenge-card, .card.ctf-hero, .card.ctf-hero::after,
  .question-section, .submit-card .btn-primary::after { animation: none !important; }
}


/* ---------------- 学生端增强动画 ---------------- */
.student-pool .ctf-hero { position: relative; overflow: hidden; }
.student-pool .ctf-hero::before {
  content: ""; position: absolute; width: 240px; height: 240px; right: -60px; top: -80px;
  border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.16), transparent 66%);
  animation: student-orb 9s ease-in-out infinite; pointer-events: none;
}
.student-pool .ctf-hero::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: 150px; bottom: -100px;
  border-radius: 50%; background: radial-gradient(circle, rgba(16,185,129,.15), transparent 66%);
  animation: student-orb 11s ease-in-out infinite reverse; pointer-events: none;
}
.student-pool .ctf-stat .num { display: inline-block; }
.student-pool .ctf-stat:nth-child(1) .num { animation: stat-pop .5s .05s both; }
.student-pool .ctf-stat:nth-child(2) .num { animation: stat-pop .5s .12s both; }
.student-pool .ctf-stat:nth-child(3) .num { animation: stat-pop .5s .18s both; }
.student-pool .ctf-stat:nth-child(4) .num { animation: stat-pop .5s .24s both; }
@keyframes stat-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.student-pool.reveal-on .challenge-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease, box-shadow .2s ease, border-color .2s ease;
}
.student-pool.reveal-on .challenge-card.in-view { opacity: 1; transform: translateY(0); }
.student-pool .challenge-card.in-view:hover { transform: translateY(-3px); }
.student-pool .status-badge.status-unsubmitted { animation: status-glow 2.4s ease-in-out infinite; }
@keyframes status-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .18); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .05); }
}

.student-item-page .read-progress {
  position: sticky; top: 0; z-index: 40; height: 3px; margin: -6px 0 10px;
  background: rgba(37, 99, 235, .08); border-radius: 99px; overflow: hidden;
}
.student-item-page .read-progress i {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #06b6d4 55%, #10b981);
  box-shadow: 0 0 10px rgba(37, 99, 235, .4);
  transition: width .12s linear;
}
.student-item-page .card { animation: student-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.student-item-page .item-detail-head { animation-delay: .02s; }
.student-item-page .question-section:nth-of-type(2) { animation-delay: .08s; }
.student-item-page .question-section:nth-of-type(3) { animation-delay: .14s; }
.student-item-page .submit-card { animation-delay: .1s; }
.student-item-page .score-chip {
  animation: stat-pop .45s cubic-bezier(.2, .7, .2, 1) both;
}
.student-item-page .score-chip:nth-child(1) { animation-delay: .08s; }
.student-item-page .score-chip:nth-child(3) { animation-delay: .14s; }
.student-item-page .score-chip:nth-child(5) { animation-delay: .2s; }
.student-item-page .file-card { transition: transform .18s ease, box-shadow .18s ease; }
.student-item-page .file-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 23, 42, .08); }
@media (prefers-reduced-motion: reduce) {
  .student-pool .ctf-hero::before, .student-pool .ctf-hero::after,
  .student-pool .ctf-stat .num, .student-pool .challenge-card,
  .student-pool .status-badge, .student-item-page .card,
  .student-item-page .score-chip { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}


/* ---------------- 学生提交 / 成绩页动画 ---------------- */
.student-submissions .card,
.student-scores .card {
  animation: student-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.student-submissions .card:nth-of-type(2),
.student-scores .card:nth-of-type(2) { animation-delay: .06s; }
.student-submissions .card:nth-of-type(3),
.student-scores .card:nth-of-type(3) { animation-delay: .12s; }
.student-submissions .card:nth-of-type(4),
.student-scores .card:nth-of-type(4) { animation-delay: .18s; }
.student-submissions .table tbody tr,
.student-scores .table tbody tr { transition: background .16s ease; }
.student-submissions .table tbody tr:hover,
.student-scores .table tbody tr:hover { background: #f7faff; }
.student-scores .stat,
.student-scores .summary-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.student-scores .stat:hover,
.student-scores .summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}
@media (prefers-reduced-motion: reduce) {
  .student-submissions .card, .student-scores .card { animation: none !important; }
}


/* ---------------- 教师后台动态效果 ---------------- */
.role-teacher .card {
  animation: teacher-rise .45s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes teacher-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.role-teacher .summary-grid .summary-card:nth-child(1) { animation-delay: .04s; }
.role-teacher .summary-grid .summary-card:nth-child(2) { animation-delay: .1s; }
.role-teacher .summary-grid .summary-card:nth-child(3) { animation-delay: .16s; }
.role-teacher .stat-grid .card:nth-child(2) { animation-delay: .05s; }
.role-teacher .stat-grid .card:nth-child(3) { animation-delay: .1s; }
.role-teacher .stat-grid .card:nth-child(4) { animation-delay: .15s; }

.role-teacher .page-head { position: relative; }
.role-teacher .page-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.35), rgba(16,185,129,.25), transparent);
  background-size: 200% 100%;
  animation: teacher-line 6s linear infinite;
  pointer-events: none;
}
@keyframes teacher-line {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.role-teacher .page-head h1 {
  background: linear-gradient(90deg, #0f172a, #1d4ed8 70%, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.role-teacher .summary-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, #ffffff 0%, #f3f8ff 55%, #f0fdfa 100%);
  background-size: 160% 160%;
  animation: teacher-flow 14s ease-in-out infinite;
  transition: transform .2s ease, box-shadow .2s ease;
}
@keyframes teacher-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.role-teacher .summary-card::before {
  content: "";
  position: absolute; width: 180px; height: 180px; right: -60px; top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.12), transparent 68%);
  animation: teacher-float 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes teacher-float {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-8px, 10px, 0) scale(1.05); }
}
.role-teacher .summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
}
.role-teacher .summary-metric .num { color: #1d4ed8; }
.role-teacher .stat-grid .stat { transition: transform .2s ease, box-shadow .2s ease; }
.role-teacher .stat-grid .stat:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,23,42,.08); }
.role-teacher .bank-tab { transition: transform .18s ease, box-shadow .18s ease; }
.role-teacher .bank-tab:hover { transform: translateY(-1px); }
.role-teacher .module-config,
.role-teacher .details-card { transition: box-shadow .2s ease, transform .2s ease; }
.role-teacher .module-config:hover,
.role-teacher .details-card:hover { box-shadow: 0 12px 26px rgba(15,23,42,.07); }
.role-teacher .table tbody tr { transition: background .15s ease; }
.role-teacher .table tbody tr:hover { background: #f7faff; }
.role-teacher .btn-primary { transition: transform .16s ease, filter .16s ease; }
.role-teacher .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
@media (prefers-reduced-motion: reduce) {
  .role-teacher .card, .role-teacher .summary-card, .role-teacher .summary-card::before,
  .role-teacher .page-head::after { animation: none !important; }
}

/* 导航项较多：收紧间距，顶栏高度随内容自适应，窄屏让导航独占一行，避免右侧消息/用户溢出 */
.topbar { height: auto; min-height: 60px; }
.nav { gap: 2px; }
.nav a { padding: 8px 8px; }
@media (max-width: 1240px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 4px; }
  .nav { order: 3; width: 100%; justify-content: flex-start; }
  .nav-tools { margin-left: auto; }
}

/* 学生能力雷达图：模式切换与数值明细（暗色主题） */
.radar-switch { display: flex; gap: 6px; }
.radar-switch-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  font: inherit; font-size: 12px; line-height: 1; padding: 7px 10px;
  border-radius: 999px; cursor: pointer;
}
.radar-switch-btn:hover { border-color: var(--brand); color: var(--brand); }
.radar-switch-btn.is-active { background: var(--brand); border-color: var(--brand); color: #04121a; }
.radar-switch-btn[hidden] { display: none; }
.radar-chart { display: block; width: 100%; max-width: 780px; margin: 0 auto; height: 430px; }
.radar-table { margin-top: 10px; }
.radar-table summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.radar-table[open] summary { margin-bottom: 8px; }
.stat-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }


.live-countdown {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #67e8f9;
}


/* 浅色 hero 卡片（挑战列表/排行榜）：标题与说明用深色字，避免白底白字 */
.card.ctf-hero h1 { color: #0f1726; }
.card.ctf-hero .kicker { color: #0e7490; }
.card.ctf-hero .muted { color: #334155; }


.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}
.trend-chart { width: 100%; height: 360px; }
@media (max-width: 1100px) {
  .chart-grid { grid-template-columns: 1fr; }
}


/* 2026-11-26: 卡片悬停阴影/位移过渡导致鼠标离开白框闪一下，统一静态化 */
.card, .details-card, .module-config, .stat, .summary-card, .team-card, .item-row, .stat-link { transition: none !important; }
.card:hover, .details-card:hover, .module-config:hover, .team-card:hover,
.role-teacher .details-card:hover, .role-teacher .module-config:hover,
.role-teacher .stat-grid .stat:hover, .student-dash .stat-grid .card:hover,
.student-scores .stat:hover, .student-scores .summary-card:hover,
.role-teacher .summary-card:hover { box-shadow: none !important; transform: none !important; }


/* 2026-11-26 导航项变多：收紧为单行，窄屏再整齐换行 */
.topbar-inner { gap: 12px; }
.nav { flex-wrap: nowrap; gap: 2px; }
.nav a { padding: 6px 8px; font-size: 13.5px; white-space: nowrap; }
.nav .who { white-space: nowrap; }
@media (max-width: 1100px) { .brand span { display: none; } }
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; }
  .nav { flex-wrap: wrap; width: 100%; justify-content: flex-start; }
}
