:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #627083;
  --line: #dce3ec;
  --brand: #126f83;
  --brand-2: #1b9aaa;
  --warn: #b85f00;
  --danger: #b42318;
  --good: #16813a;
  --shadow: 0 10px 24px rgba(31, 46, 61, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button, input, select { font: inherit; }
button {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  font-weight: 700;
}
button.secondary { background: #e9eff5; color: var(--ink); }
button.ghost { background: transparent; color: var(--brand); padding: 8px; }
button:disabled { opacity: .48; cursor: not-allowed; }
.button-like {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 7px;
  padding: 9px 14px;
  background: #e9eff5;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.sidebar {
  background: #10232a;
  color: white;
  padding: 22px;
}
.brand { font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 22px; }
.user-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  overflow-wrap: anywhere;
}
.nav { display: grid; gap: 8px; margin-top: 22px; }
.nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #dbe8ee;
}
.nav button.active { background: rgba(255,255,255,.13); color: white; }

.main { padding: 28px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { color: var(--muted); line-height: 1.6; }
.grid { display: grid; gap: 16px; }
.two { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.card { padding: 16px; display: grid; gap: 12px; }
.panel { padding: 18px; }
.stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat strong { font-size: 28px; }
.muted { color: var(--muted); }
.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e6f5f7;
  color: #07596a;
  font-weight: 700;
  font-size: 12px;
}
.badge.warn { background: #fff2df; color: var(--warn); }
.badge.good { background: #e8f6ed; color: var(--good); }
.progress-bar {
  height: 9px;
  background: #e6edf3;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > span { display: block; height: 100%; background: var(--brand-2); }
.video-link {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 18px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef7f8;
}
.button-like.primary {
  width: fit-content;
  background: var(--brand);
  color: white;
}
.lesson-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.quiz-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
}
.quiz-option input { margin-top: 3px; }
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: 13px; background: #f4f7fa; }
.weakness {
  display: grid;
  grid-template-columns: 140px 1fr 48px;
  align-items: center;
  gap: 10px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card { width: min(520px, 100%); }
.login input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  margin: 10px 0;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.error { color: var(--danger); font-weight: 700; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .two { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
