:root {
  color-scheme: dark;
  --bg: #07101c;
  --panel: #101a2b;
  --line: rgba(186, 208, 240, .12);
  --text: #e8eef8;
  --muted: #8ea0bb;
  --accent: #4c8dff;
  --good: #3dd68c;
  --mid: #f5a524;
  --bad: #ff6b6b;
}
html.dark {
  --el-bg-color: #101a2b;
  --el-bg-color-overlay: #162238;
  --el-bg-color-page: #07101c;
  --el-fill-color-blank: #101a2b;
  --el-text-color-primary: #e8eef8;
  --el-text-color-regular: #c5d2e6;
  --el-text-color-secondary: #8ea0bb;
  --el-border-color: rgba(186, 208, 240, .16);
  --el-border-color-light: rgba(186, 208, 240, .1);
  --el-color-primary: #4c8dff;
  --el-mask-color: rgba(7, 16, 28, .72);
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  color: var(--text);
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(76, 141, 255, .18), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(61, 214, 140, .08), transparent 55%),
    var(--bg);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
[v-cloak] { display: none; }
button, input { font: inherit; }

.login-screen {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.login-card { width: min(420px, 100%); background: rgba(16, 26, 43, .92); border: 1px solid var(--line); }
.brand { margin: 0; color: var(--accent); letter-spacing: .22em; font-size: 12px; }
.login-card h1 { margin: 8px 0 0; font-size: 32px; font-weight: 600; }
.sub { color: var(--muted); margin: 8px 0 18px; }
.login-go { width: 100%; }
.err { color: var(--bad); margin: 10px 0 0; }

.shell { height: 100%; }
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 28, .8);
  backdrop-filter: blur(10px);
}
.brand-lock { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.brand-lock strong { display: block; font-size: 16px; }
.brand-lock em { display: block; color: var(--muted); font-style: normal; font-size: 12px; }
.mark { width: 10px; height: 28px; border-radius: 99px; background: linear-gradient(180deg, var(--accent), var(--good)); }
.class-pick { width: 280px; }
.top-gap { flex: 1; }
.body { min-height: 0; }
.side {
  border-right: 1px solid var(--line);
  background: rgba(10, 18, 32, .72);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.side-tools { padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.sort-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}
.sort-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}
.sort-switch button.on { background: var(--accent); color: #fff; }
.sort-switch em { font-style: normal; font-size: 12px; letter-spacing: .02em; }
.roster { overflow: auto; padding: 0 10px 16px; }
.stu {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.stu:hover { background: rgba(76, 141, 255, .08); }
.stu.on { background: rgba(76, 141, 255, .16); border-color: rgba(76, 141, 255, .45); }
.stu-name { font-size: 14px; }
.stu-meta { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.main { min-height: 0; overflow: auto; padding: 18px 20px 32px; }
.student-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.student-head h2 { margin: 0; font-size: 28px; font-weight: 600; }
.student-head p { margin: 6px 0 0; color: var(--muted); }
.scope-filters { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 100%; }
.scope-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; max-width: 100%; }
.scope-row > span { color: var(--muted); font-size: 12px; flex: none; }
.scope-filters .el-radio-group { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 16px 0; }
.kpis.compact { grid-template-columns: repeat(3, minmax(160px, 280px)); }
.filter-kpis .kpi { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.filter-kpis .kpi.on { border-color: rgba(76, 141, 255, .75); box-shadow: inset 0 0 0 1px rgba(76, 141, 255, .4); }
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 10px;
}
.kpi span, .kpi em { display: block; color: var(--muted); font-style: normal; font-size: 12px; }
.kpi strong { display: block; margin: 4px 0; font-size: 26px; font-variant-numeric: tabular-nums; font-weight: 600; }
.kpi.good strong { color: var(--good); }
.kpi.mid strong { color: var(--mid); }
.kpi.bad strong { color: var(--bad); }
.gap-up { color: var(--good); }
.gap-down { color: var(--bad); }
.chart-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.panel { margin-bottom: 12px; background: rgba(16, 26, 43, .92); border: 1px solid var(--line); }
.panel-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.panel-h small, .hint { color: var(--muted); font-weight: 400; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chart { height: 300px; }
.chart-wide { height: 340px; }
.curve-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 32px; margin-bottom: 4px; }
.el-table { --el-table-bg-color: transparent; --el-table-tr-bg-color: transparent; --el-table-header-bg-color: rgba(255,255,255,.03); cursor: pointer; }
.el-table .is-picked td { background: rgba(76, 141, 255, .12) !important; }
.view-tabs { margin-top: 8px; }
.paper-reason { margin: 0 0 12px; }
.question {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.question header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.question header span, .question header { color: var(--muted); font-size: 12px; }
.question header span { max-width: 100%; white-space: normal; line-height: 1.5; text-align: right; }
.question header strong { color: var(--text); font-size: 14px; }
.question p { margin: 0; line-height: 1.7; white-space: pre-wrap; }
.question ol { margin: 8px 0 0; padding: 0; list-style: none; }
.question li { margin-top: 4px; line-height: 1.6; }
.question li b {
  display: inline-block;
  width: 1.4em;
  color: var(--accent);
}
.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.choices button {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  cursor: pointer;
}
.choices button b { color: var(--accent); min-width: 1.2em; }
.choices button span { white-space: normal; }
.choices button:hover:not(:disabled) { border-color: rgba(76, 141, 255, .55); }
.choices button.on { border-color: var(--accent); background: rgba(76, 141, 255, .12); }
.choices button.right { border-color: var(--good); background: rgba(61, 214, 140, .12); }
.choices button.wrong { border-color: var(--bad); background: rgba(255, 107, 107, .12); }
.choices button:disabled { cursor: default; }
.written textarea {
  width: 100%;
  min-height: 128px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  resize: vertical;
}
.written-actions { display: flex; gap: 8px; margin-top: 8px; }
.written-actions button {
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.written-actions .ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.written-actions .solid { background: var(--accent); color: #fff; border: 0; }
.written-actions button:disabled { opacity: .45; cursor: default; }
.review-block { margin-top: 8px; }
.reveal { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.04); white-space: pre-wrap; }
.reveal.good { color: var(--good); }
.reveal.bad { color: var(--bad); }
.q-points { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.q-points span { color: var(--muted); font-size: 12px; }
.q-points em {
  font-style: normal;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(76, 141, 255, .12);
  color: #c5d8ff;
}
.mastery-list, .question-stories { border: 0; }
.mastery-list .el-collapse-item__header,
.question-stories .el-collapse-item__header {
  background: transparent;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  height: auto;
  line-height: 1.5;
  padding: 8px 0;
}
.mastery-list .el-collapse-item__wrap,
.question-stories .el-collapse-item__wrap {
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.mastery-list .el-collapse-item__content,
.question-stories .el-collapse-item__content { color: var(--text); }
.mastery-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mastery-title strong { font-weight: 600; }
.mastery-title span { color: var(--muted); font-variant-numeric: tabular-nums; }
.mastery-title .page-ref { font-weight: 400; white-space: nowrap; }
.spark-wrap { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.spark { width: 180px; height: 52px; }
.spark polyline { fill: none; stroke: #4c8dff; stroke-width: 2; }
.spark circle { fill: #7eb6ff; }
.spark-labels { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; }
.story { margin: 0 0 8px; line-height: 1.7; color: #c5d2e6; }
.stem-bit { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.report {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  padding: 18px 18px 8px;
  border-radius: 16px;
  border: 1px solid rgba(76, 141, 255, .38);
  background:
    radial-gradient(480px 180px at 0% 0%, rgba(76, 141, 255, .22), transparent 62%),
    rgba(16, 26, 43, .96);
  animation: report-in .7s ease both;
}
.report::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  animation: report-sheen 1.6s ease .15s both;
  pointer-events: none;
}
.report-head { display: flex; justify-content: space-between; align-items: baseline; }
.report-head span { font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.report-head small, .report-row small { color: var(--muted); }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 16px; }
.report-kpis div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}
.report-kpis strong { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.report-kpis span { color: var(--muted); font-size: 12px; }
.report-kpis .up, .report-name .up, .delta-up { color: var(--good); }
.report-kpis .down, .report-name .down { color: var(--bad); }
.report-row {
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
  animation: report-in .55s ease both;
}
.report-name { display: flex; justify-content: space-between; gap: 12px; }
.report-name em { font-style: normal; font-variant-numeric: tabular-nums; }
.meters { display: grid; gap: 6px; margin: 8px 0; }
.meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; animation: meter-grow .8s ease forwards; }
@keyframes report-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes report-sheen { to { transform: translateX(460%); } }
@keyframes meter-grow { to { width: var(--w); } }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
}
.book-fold { border: 0; }
.book-fold > .el-collapse-item {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.book-fold > .el-collapse-item > .el-collapse-item__header {
  background: transparent;
  color: var(--text);
  height: auto;
  line-height: 1.5;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.book-fold .el-collapse-item__wrap { background: transparent; border-bottom: 0; }
.book-fold .el-collapse-item__content { padding: 0 12px 8px; color: var(--text); }
.book-title { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding-right: 8px; }
.book-title strong { font-size: 15px; }
.book-title small { color: var(--muted); font-weight: 400; }
.round-layout { display: grid; grid-template-columns: 268px 1fr; gap: 16px; align-items: start; }
.round-list { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; }
.round-list button, .view-switch button, .past-reports button, .submit-bar button, .text-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}
.round-list button strong, .round-list button small { display: block; }
.round-list button small { color: var(--muted); margin-top: 4px; }
.round-item { display: flex; align-items: stretch; }
.round-pick { flex: 1; min-width: 0; }
.round-item.on .round-pick, .view-switch button.on { border-color: rgba(76, 141, 255, .7); background: rgba(76, 141, 255, .16); }
.round-list .issue { text-align: center; background: #4c8dff; color: #fff; border: 0; }
.round-list .issue:disabled { opacity: .6; cursor: default; }
.round-tools { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.round-tools small { display: block; color: var(--muted); margin-top: 4px; }
.view-switch { display: flex; gap: 8px; }
.view-switch button { padding: 8px 12px; }
.past-reports { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; color: var(--muted); }
.past-reports button { padding: 6px 10px; }
.submit-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 0;
  padding: 4px 0 8px;
}
.submit-bar .solid { margin-left: auto; }
.submit-bar .ghost { min-width: 120px; text-align: center; }
.submit-bar .solid {
  min-width: 140px;
  text-align: center;
  background: #4c8dff;
  color: #fff;
  border: 0;
}
.submit-bar .solid:disabled { opacity: .45; cursor: default; }
.text-btn { padding: 4px 10px; }
.report-wait { padding: 28px 8px; text-align: center; color: var(--muted); }
.report p { line-height: 1.75; }
@media (max-width: 800px) {
  .round-layout { grid-template-columns: 1fr; }
  .round-list { position: static; }
  .report-kpis { grid-template-columns: repeat(2, 1fr); }
  .side { width: 100% !important; max-height: 280px; }
  .body { flex-direction: column; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .class-pick { width: 160px; }
}
