* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: #f3f6fb;
  color: #26303f;
}

/* ---------- 顶栏 ---------- */
.topbar { background: #1e6f5c; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.teacher-link {
  color: #fff; text-decoration: none; font-size: 14px;
  background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 20px;
}
.teacher-link:hover { background: rgba(255,255,255,.3); }

/* ---------- 容器 ---------- */
.wrap { max-width: 1100px; margin: 20px auto; padding: 0 20px; }
.panel {
  background: #fff; border-radius: 14px; padding: 24px 28px;
  box-shadow: 0 4px 16px rgba(31,45,61,.08); margin-bottom: 20px;
}

.banner { padding: 12px 16px; border-radius: 10px; margin: 14px auto 0; max-width: 1060px; }
.banner.error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2bf; }

h2 { margin: 0 0 6px; font-size: 20px; }
.sub { color: #6b7684; margin: 0 0 16px; font-size: 14px; }

/* ---------- 登录表单 ---------- */
.login-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.login-form label { display: flex; flex-direction: column; font-size: 13px; color: #55606e; gap: 6px; }
.login-form input {
  border: 1px solid #ccd4de; border-radius: 8px; padding: 9px 12px; font-size: 15px; width: 220px;
}
.login-form input:focus { outline: none; border-color: #1e6f5c; }

/* ---------- 按钮 ---------- */
.btn {
  border: none; border-radius: 8px; padding: 9px 18px; font-size: 15px; cursor: pointer;
  background: #e3e8f0; color: #26303f; transition: .15s;
}
.btn.primary { background: #1e6f5c; color: #fff; }
.btn.primary:hover { background: #165647; }
.btn.primary:disabled { background: #b9c4c7; cursor: not-allowed; }
.btn.big { padding: 12px 30px; font-size: 16px; }
.btn.danger { background: #b3261e; color: #fff; }
.btn.danger:hover { background: #8f1e18; }

/* ---------- 答题布局 ---------- */
.quiz-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.quiz-head h2 { margin: 0; }
.identity { font-size: 14px; color: #55606e; }
.identity .ok { color: #1e6f5c; font-weight: 700; }
.quiz-layout { display: flex; gap: 24px; }
.figure { flex: 0 0 300px; text-align: center; }
.microscope-img { width: 100%; max-width: 280px; border-radius: 10px; border: 1px solid #e3e8f0; }
.fig-caption { color: #6b7684; font-size: 12px; margin-top: 8px; }
.questions { flex: 1; min-width: 0; }

/* ---------- 题目 ---------- */
.qbox { border: 1px solid #e3e8f0; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; background: #fbfcfe; }
.q-title { margin: 0 0 4px; font-size: 16px; color: #1e6f5c; }
.q-desc { margin: 0 0 14px; font-size: 13px; color: #6b7684; }

.mrow { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mlabel { flex: 1; font-size: 14px; }
.mrow .slot { width: 150px; }

/* 空位 */
.slot {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 4px 10px; min-width: 96px;
  border: 2px dashed #9aa7b6; border-radius: 8px; background: #fff;
  font-size: 14px; color: #1e6f5c; font-weight: 600; vertical-align: middle;
  transition: .12s;
}
.slot.filled { border-style: solid; border-color: #1e6f5c; cursor: pointer; }
.slot.drop-hover { border-color: #f4a259; background: #fff4e6; }
.slot.right { border-color: #2e9e6b; background: #e8f6ef; }
.slot.wrong { border-color: #d1495b; background: #fdebec; }

/* 光线路径 */
.seq { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.seq-fixed {
  background: #eef2f7; border: 1px solid #d5dde7; border-radius: 8px;
  padding: 8px 12px; font-size: 14px; font-weight: 600;
}
.arrow { color: #9aa7b6; font-size: 16px; }

/* 注意事项填空句 */
.fill-item { margin-bottom: 14px; line-height: 2.2; font-size: 15px; }
.fill-item .slot { min-width: 110px; }

/* 选项区 */
.bank {
  margin-top: 14px; padding: 12px; background: #f0f4f9; border-radius: 10px;
  display: flex; flex-wrap: wrap; gap: 10px; min-height: 40px;
}
.bank::before { content: "请从下面拖拽/点击选项："; width: 100%; font-size: 12px; color: #8a94a3; }
.chip {
  background: #fff; border: 1px solid #c3ccd8; border-radius: 20px;
  padding: 7px 16px; font-size: 14px; cursor: grab; user-select: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: .12s;
}
.chip:hover { border-color: #1e6f5c; }
.chip.dragging { opacity: .2; }
.chip.ghost {
  position: fixed; z-index: 9999; pointer-events: none; opacity: .75;
  box-shadow: 0 8px 20px rgba(0,0,0,.2); cursor: grabbing; background:#1e6f5c; color:#fff; border-color:#1e6f5c;
}
.chip.selected { background: #1e6f5c; color: #fff; border-color: #1e6f5c; }

.mark { color: #d1495b; font-size: 12px; margin-left: 4px; }

/* 提交条 */
.submit-bar { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.fill-status { font-size: 13px; color: #6b7684; }

/* 结果 */
.result { margin-top: 18px; border: 1px solid #cfe3da; background: #f2faf6; border-radius: 12px; padding: 18px 22px; }
.result h3 { margin: 0 0 8px; }
.score-line { font-size: 16px; margin-bottom: 6px; }
.score-line b { font-size: 22px; color: #1e6f5c; }
.result-legend { font-size: 12px; color: #6b7684; margin-bottom: 8px; }

.foot { text-align: center; color: #8a94a3; font-size: 13px; padding: 12px 0 30px; }

/* ================= 教师端 ================= */
.teacher-page .topbar { background: #24435f; }
.teacher-page .brand { color:#fff; }
.tp-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.tp-header h1 { margin:0; font-size:20px; }
.small-note { font-size:12px; color:#8a94a3; }
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:16px; }
.stat-card { background:#f7fafc; border:1px solid #e3e8f0; border-radius:12px; padding:16px; text-align:center; }
.stat-card .num { font-size:34px; font-weight:800; color:#1e6f5c; line-height:1.1; }
.stat-card .lbl { font-size:13px; color:#6b7684; margin-top:4px; }
.stat-card.alert .num { color:#d1495b; }
.stat-card.warn .num { color:#f4a259; }
.stat-card .detail { font-size:12px; color:#8a94a3; margin-top:6px; }

.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width: 860px){ .grid-2{grid-template-columns:1fr;} .quiz-layout{flex-direction:column;} .figure{flex:auto;} .stat-grid{grid-template-columns:1fr 1fr;} }

.roster { list-style:none; padding:0; margin:10px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.roster li { background:#eef2f7; border-radius:16px; padding:4px 12px; font-size:13px; }
.roster li.done { background:#e8f6ef; color:#1e6f5c; }
.roster li.pending { background:#fdecec; color:#b3261e; }
.roster li.none { background:#f6f6f6; color:#9aa7b6; }

.add-roster { display:flex; gap:8px; margin-top:10px; align-items:center; flex-wrap:wrap; }
.add-roster input { border:1px solid #ccd4de; border-radius:8px; padding:8px 10px; font-size:14px; width:200px; }

table.data { width:100%; border-collapse: collapse; margin-top:10px; font-size:13px; }
table.data th, table.data td { border-bottom:1px solid #eef2f6; padding:7px 8px; text-align:left; }
table.data th { color:#6b7684; font-weight:600; background:#f7fafc; }
table.data tr:last-child td { border-bottom:none; }
.ok-txt { color:#1e6f5c; font-weight:700; }
.no-txt { color:#d1495b; }
.center { text-align:center; }

.dim-card { border:1px solid #e3e8f0; border-radius:12px; padding:16px 18px; background:#fbfcfe; }
.dim-card h3 { margin:0 0 10px; font-size:16px; color:#24435f; }
.bar { height:10px; background:#eef2f6; border-radius:6px; overflow:hidden; margin:6px 0 12px; }
.bar > span { display:block; height:100%; background:#2e9e6b; }
.percent { font-size:20px; font-weight:800; color:#24435f; }
.err-list { margin:6px 0 0; padding-left:18px; color:#8a94a3; font-size:13px; }
.err-list li { margin-bottom:4px; }
.err-list b { color:#26303f; }

.mono-list { list-style:none; padding:0; margin:0; font-size:13px; }
.mono-list li { padding:4px 0; border-bottom:1px dashed #eef2f6; }
.mono-list li:last-child { border-bottom:none; }

.login-box { max-width:360px; margin:60px auto; text-align:center; }
.login-box input { width:100%; margin:10px 0; }
