:root {
  --navy: #0b1f3a;
  --blue: #0077c5;
  --blue-soft: #e8f2fb;
  --ink: #17212f;
  --muted: #6b7a8c;
  --line: #e3eaf2;
  --bg: #f5f7fa;
  --white: #fff;
  --ok: #1f8f5f;
  --warn: #c47a12;
  --bad: #c0392b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 28px;
  background: var(--navy);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong { font-size: 20px; letter-spacing: 1px; }
.brand small { display: block; font-size: 11px; color: #9cc9f0; margin-top: 2px; }
.orb {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9be7ff, #0077c5 45%, #052a4a 75%);
  box-shadow: 0 0 18px rgba(0, 170, 255, .75);
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; color: #c9d9ea;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.tabs button:hover { background: rgba(255,255,255,.08); color: #fff; }
.tabs button.active { background: var(--blue); color: #fff; }
main { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.tab { display: none; }
.tab.active { display: block; }
.hero {
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  background: linear-gradient(120deg, #0b1f3a, #0d3a63 60%, #0077c5);
  color: #fff; border-radius: 16px; padding: 28px 30px; margin-bottom: 18px;
}
.hero h1 { margin: 0 0 8px; font-size: 26px; }
.hero p { margin: 0; color: #cfe4f7; font-size: 14px; line-height: 1.6; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-actions button { white-space: nowrap; }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px;
  margin: 4px 0 18px;
}
.page-head h1 { margin: 0 0 6px; font-size: 26px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
}
.card span { color: var(--muted); font-size: 12px; }
.card strong { font-size: 30px; color: var(--blue); line-height: 1.1; }
.card small { color: var(--muted); font-size: 11px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.template-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.template-row label { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.template-row input[type=file] { width: auto; border: 0; padding: 0; font-size: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.muted { color: var(--muted); font-size: 12px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.row-inline input { flex: 1; }
input, textarea, select, button { font-family: inherit; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font-size: 14px; color: var(--ink); background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid rgba(0,119,197,.18); border-color: var(--blue); }
button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
button:hover { border-color: var(--blue); color: var(--blue); }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover { background: #0066aa; color: #fff; }
button.link { border: 0; background: transparent; color: var(--blue); padding: 2px 4px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td { line-height: 1.5; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
}
.item:hover { border-color: rgba(0,119,197,.45); }
.item .title { font-size: 14px; margin-bottom: 4px; }
.item .meta { color: var(--muted); font-size: 11px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; background: #eef3f8; color: var(--muted); white-space: nowrap;
}
.badge.ok { background: #e6f6ee; color: var(--ok); }
.badge.failed { background: #fdecea; color: var(--bad); }
.badge.running { background: #fff4e5; color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--blue-soft); color: #0b4f80; border-radius: 999px;
  padding: 5px 10px; font-size: 12px;
}
.steps { display: flex; flex-direction: column; gap: 8px; }
.step {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 13px;
}
.step .no { color: var(--muted); }
.step .sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.detail { font-size: 13px; line-height: 1.6; }
.answer {
  background: #f8fbff; border-left: 3px solid var(--blue);
  padding: 12px 14px; border-radius: 6px; font-size: 13px; line-height: 1.75;
}
.detail pre {
  background: #0b1f3a; color: #d7e7f7; padding: 12px; border-radius: 8px;
  overflow: auto; font-size: 12px; max-height: 340px;
}
details { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
summary { cursor: pointer; font-size: 13px; }
pre.diff { background: #f8fafc; color: #24364b; padding: 10px; border-radius: 6px; overflow: auto; font-size: 11px; }
.toast {
  position: fixed; right: 20px; bottom: 20px; background: var(--navy); color: #fff;
  padding: 10px 14px; border-radius: 8px; opacity: 0; transform: translateY(8px);
  transition: .2s; pointer-events: none; font-size: 13px; max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.security-banner {
  margin: 16px 0; padding: 10px 14px; border-radius: 10px;
  background: #fff5e6; border: 1px solid #f0c36d; color: #7a4b00; font-size: 13px;
}
.security-banner button { margin-left: 6px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.dialog {
  border: 0; border-radius: 14px; padding: 20px; width: 380px;
  max-width: calc(100vw - 32px); box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.dialog::backdrop { background: rgba(6, 20, 36, .45); }
.dialog h2 { margin: 0 0 12px; }
.voice-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: var(--blue); color: #fff; font-size: 24px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 90, 160, .35);
}
.voice-fab:hover { background: #0066aa; }
.voice-fab.recording { background: var(--bad); animation: voicepulse 1.2s infinite; }
@keyframes voicepulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.5); } 50% { box-shadow: 0 0 0 14px rgba(192,57,43,0); } }
.voice-panel {
  position: fixed; right: 24px; bottom: 94px; z-index: 30;
  width: 360px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.voice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.voice-head button { border: 0; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; }
.voice-text { margin-top: 8px; font-size: 13px; color: var(--muted); min-height: 18px; }
.voice-answer { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; }
.voice-panel audio { width: 100%; margin-top: 10px; }
@media (max-width: 600px) {
  .voice-fab { right: 16px; bottom: 16px; }
  .voice-panel { right: 16px; bottom: 84px; width: calc(100vw - 32px); }
}
.login-body {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(900px 500px at 70% 10%, #123e66, #071426 60%, #030912);
}
.login-card {
  width: 360px; background: rgba(255,255,255,.96); border-radius: 16px;
  padding: 30px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-card h1 { margin: 18px 0 4px; font-size: 24px; }
.login-card .form { margin-top: 16px; }
.login-brand { color: var(--navy); }
.login-brand small { color: var(--muted); }
.login-error { color: var(--bad); font-size: 12px; min-height: 18px; margin-top: 10px; }
.userbox { display: flex; align-items: center; gap: 8px; color: #cfe4f7; font-size: 12px; }
.userbox .badge { background: rgba(255,255,255,.1); color: #cfe4f7; }
.userbox button { border-color: rgba(255,255,255,.2); background: transparent; color: #cfe4f7; padding: 5px 9px; }
.userbox button:hover { border-color: #9cc9f0; color: #fff; }
.lecture-body { background: var(--bg); }
.lecture-top {
  display: flex; align-items: center; gap: 22px;
  background: var(--navy); color: #fff; padding: 18px 26px;
}
.lecture-top .back { color: #9cc9f0; text-decoration: none; font-size: 13px; white-space: nowrap; }
.lecture-head h1 { margin: 0 0 4px; font-size: 22px; }
.lecture-head .muted { color: #9cc9f0; font-size: 12px; }
.lecture-head a { display: inline-block; margin-top: 8px; color: #9cc9f0; font-size: 12px; }
.lecture-main { max-width: 1180px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.lecture-side .item.active { border-color: var(--blue); background: var(--blue-soft); }
.stage-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stage-head h2 { margin: 0; }
.stage-clock { text-align: right; white-space: nowrap; }
.timer { font-size: 20px; font-weight: 700; color: var(--blue); margin-right: 8px; font-variant-numeric: tabular-nums; }
.auto { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.auto input { width: auto; }
.stage-card audio { width: 100%; margin: 14px 0; }
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.script { white-space: pre-wrap; line-height: 1.9; font-size: 14px; color: var(--ink); }
@media (max-width: 900px) {
  .lecture-main { grid-template-columns: 1fr; }
  .lecture-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .userbox { width: 100%; justify-content: flex-end; }
}
