/* 教师管理端 · 创而不代 */
:root {
  --paper: #FFF7EC;
  --paper-deep: #FDEEDC;
  --surface: #FFFFFF;
  --ink: #22376B;
  --ink-soft: #5C6B94;
  --line: #EADDC8;
  --sun: #FFC531;
  --sun-soft: #FFE9A8;
  --coral: #FF7E9D;
  --coral-soft: #FFD6E2;
  --sky: #4EA8DE;
  --sky-soft: #CFE9F8;
  --leaf: #4CB782;
  --leaf-soft: #D8F0E2;
  --radius-md: 16px;
  --font: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 2.5px solid var(--ink);
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 42px; width: auto; border-radius: 9px; }
.topbar-title { font-weight: 900; font-size: 19px; }
.chip {
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--sun-soft);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}
.topbar-links { display: flex; gap: 6px; }
.topbar-links a {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
}
.topbar-links a:hover { background: var(--sun-soft); color: var(--ink); }

/* 布局 */
.layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 32px;
}
.side { display: flex; flex-direction: column; gap: 8px; }
.side-item {
  padding: 13px 18px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  transition: all 0.18s ease;
}
.side-item:hover { border-color: var(--ink); color: var(--ink); }
.side-item.is-active {
  background: var(--sun);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 3px 4px 0 rgba(34, 55, 107, 0.18);
}

/* 视图 */
.view { display: none; }
.view.is-active { display: block; animation: viewIn 0.35s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.view-title {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 900;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 5px 6px 0 var(--paper-deep);
}
.card-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 900;
}

/* 表单 */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.fake-input {
  padding: 11px 14px;
  font-size: 14.5px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.fake-textarea {
  min-height: 110px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  margin-bottom: 14px;
}

.btn {
  padding: 11px 22px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--surface); }

/* chips */
.chip-row, .chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  background: var(--paper-deep);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.pchip.is-on { background: var(--sun-soft); }

/* 任务列表 */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1.5px dashed var(--line);
}
.task-list li:last-child { border-bottom: none; }

.tag {
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.tag-run { background: var(--sun-soft); }
.tag-done { background: var(--leaf-soft); }
.tag-wait { background: var(--sky-soft); }

/* 开关 */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-bottom: 1.5px dashed var(--line);
  font-weight: 700;
}
.switch-row:last-child { border-bottom: none; }
.switch-row.off { opacity: 0.55; }
.switch {
  width: 52px;
  height: 28px;
  padding: 3px;
  background: var(--line);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.switch i {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.switch.is-on { background: var(--leaf); }
.switch.is-on i { transform: translateX(24px); }

/* 学生过程 */
.student-list { list-style: none; margin: 0; padding: 0; }
.student-list li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 130px 90px;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1.5px dashed var(--line);
}
.student-list li:last-child { border-bottom: none; }
.sid { font-weight: 900; }
.meta { font-size: 13px; color: var(--ink-soft); }

.bar {
  height: 12px;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--sky);
  border-radius: 999px;
}
.bar.wide { flex: 1; height: 14px; }

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 2px;
  font-weight: 700;
}
.score-row b { width: 34px; text-align: right; }

/* 页脚 */
.foot {
  padding: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-top: 1.5px solid var(--line);
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; }
  .side-item { flex: 0 0 auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .student-list li { grid-template-columns: 50px minmax(0, 1fr); }
  .student-list .meta, .student-list .tag { display: none; }
  .topbar-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view.is-active { animation: none; }
}
