:root {
  --ink: #17212b;
  --muted: #667085;
  --line: #d7dee8;
  --paper: #fbfcfe;
  --panel: #ffffff;
  --teal: #0f766e;
  --sky: #0369a1;
  --rose: #be123c;
  --amber: #b45309;
  --green: #15803d;
  --violet: #6d28d9;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: #eef3f8;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.side {
  background: #111827;
  color: #f8fafc;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #14b8a6;
  color: #052e2b;
  font-weight: 800;
  border-radius: 8px;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand span {
  display: block;
  color: #b7c1ce;
  font-size: 12px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a {
  color: #dbe5f1;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a.active,
.nav a:hover {
  background: #243244;
  color: #ffffff;
}

.nav .icon {
  width: 22px;
  text-align: center;
  font-weight: 800;
  color: #7dd3fc;
}

.main {
  padding: 28px;
  overflow: auto;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.title h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  background: var(--ink);
  color: #fff;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn.secondary {
  background: #e4edf5;
  color: #1f2937;
}

.btn.success {
  background: var(--green);
}

.btn.warn {
  background: var(--amber);
}

.btn.danger {
  background: var(--rose);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 18px;
}

.hero {
  min-height: 310px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
}

.hero-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.1;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-image {
  min-height: 280px;
  background: #dbeafe;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: 16px;
}

.stat b {
  display: block;
  font-size: 26px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.module-card {
  border-top: 5px solid var(--teal);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.module-card h3 {
  margin: 0;
  font-size: 18px;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  min-height: 40px;
}

.progressbar {
  height: 9px;
  background: #e5eaf0;
  border-radius: 999px;
  overflow: hidden;
}

.progressbar span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.lesson-list {
  display: grid;
  gap: 12px;
}

.lesson-row,
.question-row,
.material-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.question-card {
  max-width: 820px;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.option.selected {
  border-color: var(--sky);
  background: #e0f2fe;
}

.feedback {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #eefbf3;
  border: 1px solid #bbf7d0;
}

.feedback.bad {
  background: #fff1f2;
  border-color: #fecdd3;
}

.notice {
  margin-bottom: 14px;
  border-color: #bae6fd;
  background: #eff6ff;
}

.excerpt {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e4edf5;
  color: #344054;
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.select.compact {
  width: auto;
  min-width: 150px;
}

.textarea {
  min-height: 94px;
  resize: vertical;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
  }
  .dashboard,
  .hero,
  .split {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
