:root {
  color-scheme: dark;
  --bg: #070b17;
  --panel: #0d1426;
  --panel-2: #101a31;
  --panel-3: #0a1120;
  --line: #24304a;
  --line-soft: #1a2540;
  --text: #f4f7ff;
  --muted: #98a6c2;
  --muted-2: #72809c;
  --accent: #7c69ff;
  --accent-2: #66d8e9;
  --good: #3dd6a2;
  --warn: #f6c453;
  --bad: #ff7a8a;
  --shadow: 0 24px 80px rgba(0,0,0,.28);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(100,85,255,.19), transparent 62%),
    radial-gradient(800px 500px at 90% 0%, rgba(22,188,200,.11), transparent 58%),
    var(--bg);
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(132,149,190,.14);
}
.brand { display:flex; align-items:center; gap:13px; text-decoration:none; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 15px;
  display:grid; place-items:center; font-weight:900; font-size:21px;
  background: linear-gradient(145deg, #6f63ff, #9a54ec);
  box-shadow: 0 12px 28px rgba(108,83,255,.28);
}
.brand-copy strong { display:block; letter-spacing:.08em; font-size:15px; }
.brand-copy span { display:block; margin-top:3px; color:var(--muted); font-size:12px; }
.nav-link { color:var(--muted); text-decoration:none; font-size:14px; }
.nav-link:hover { color:var(--text); }
.hero { padding: 74px 0 44px; max-width: 820px; }
.kicker { color:#98a2ff; font-weight:800; letter-spacing:.13em; font-size:12px; text-transform:uppercase; }
h1 { margin: 12px 0 18px; font-size: clamp(38px, 5.5vw, 68px); line-height:1.02; letter-spacing:-.045em; }
h2 { margin:0; font-size: clamp(25px, 3.2vw, 38px); letter-spacing:-.03em; }
h3 { margin:0; font-size:19px; letter-spacing:-.015em; }
.lead { color:#b7c1d7; line-height:1.7; font-size:18px; max-width:720px; }
.small { font-size:13px; color:var(--muted); line-height:1.55; }
.access-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; padding-bottom:80px; }
.access-card, .panel {
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,26,49,.94), rgba(11,18,34,.94));
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.access-card { padding:27px; min-height:270px; display:flex; flex-direction:column; text-decoration:none; transition:.2s ease; }
.access-card:hover { transform:translateY(-3px); border-color:#4b5790; }
.access-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:#151e3a; border:1px solid #2a3760; font-size:22px; }
.access-card h2 { margin-top:24px; font-size:25px; }
.access-card p { color:var(--muted); line-height:1.62; margin:11px 0 24px; }
.access-arrow { margin-top:auto; color:#a8a0ff; font-weight:750; }
.page-head { padding:52px 0 28px; }
.page-head h1 { font-size:clamp(32px,4vw,50px); }
.grid-2 { display:grid; grid-template-columns:1.08fr .92fr; gap:20px; }
.panel { padding:26px; }
.panel.flat { box-shadow:none; }
.field { display:grid; gap:8px; margin-bottom:18px; }
.field label { color:#c9d1e3; font-size:14px; font-weight:700; }
.input, .select {
  width:100%; min-height:50px; border-radius:14px; border:1px solid #2a3756;
  background:#090f1e; color:var(--text); padding:0 14px; outline:none;
}
.input:focus, .select:focus { border-color:#766cff; box-shadow:0 0 0 3px rgba(118,108,255,.13); }
.btn {
  border:1px solid transparent; border-radius:14px; min-height:48px; padding:0 18px;
  display:inline-flex; align-items:center; justify-content:center; gap:9px; font-weight:800; text-decoration:none;
}
.btn-primary { color:white; background:linear-gradient(135deg,#6758ec,#7b4fd2); box-shadow:0 12px 30px rgba(95,72,226,.25); }
.btn-secondary { color:#dce3f3; background:#111a2e; border-color:#2b3856; }
.btn-danger { color:#ffd8dd; background:#321722; border-color:#663142; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.actions { display:flex; gap:10px; flex-wrap:wrap; }
.notice { border:1px solid #263556; background:#0a1224; border-radius:16px; padding:16px; color:#aeb9d0; line-height:1.55; font-size:13px; }
.notice strong { color:#e8edfb; }
.error-box { border-color:#6d3240; background:#25121a; color:#ffc3cb; }
.success-box { border-color:#245e55; background:#0d2824; color:#b6ffea; }
.module-list { display:grid; gap:13px; }
.module-card { padding:20px; border-radius:17px; background:#0b1324; border:1px solid #24314f; display:flex; justify-content:space-between; gap:20px; align-items:center; }
.module-card p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.module-card.disabled { opacity:.48; }
.badge { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border-radius:999px; border:1px solid #2a3a5e; background:#101a2f; font-size:12px; font-weight:750; color:#bac5dd; }
.badge.good { border-color:#205c50; background:#0d2823; color:#aef4df; }
.badge.warn { border-color:#5c4b21; background:#2b2310; color:#ffe29c; }
.badge.bad { border-color:#673343; background:#2b151d; color:#ffbec8; }
.session-created { display:none; }
.session-created.show { display:block; }
.code-display { font-size:clamp(42px,7vw,72px); font-weight:950; letter-spacing:.16em; margin:14px 0 7px; }
.join-link { word-break:break-all; color:#aebaff; font-size:13px; }
.qr-box { width:238px; min-height:238px; margin:16px auto 8px; display:grid; place-items:center; background:white; border-radius:18px; padding:9px; }
.qr-box img { width:220px; height:220px; display:block; }
.dashboard-top { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:38px 0 22px; }
.dashboard-title h1 { font-size:38px; margin-bottom:8px; }
.dashboard-title p { color:var(--muted); margin:0; }
.live-dot { width:8px; height:8px; border-radius:50%; background:var(--good); box-shadow:0 0 0 6px rgba(61,214,162,.08); }
.live-badge { display:inline-flex; gap:9px; align-items:center; border:1px solid #21594e; background:#0b2822; color:#b9f7e5; border-radius:999px; padding:8px 11px; font-size:12px; font-weight:800; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px; }
.stat { padding:20px; border-radius:18px; background:#0d1528; border:1px solid #202d49; }
.stat .value { font-size:31px; font-weight:900; letter-spacing:-.03em; }
.stat .label { color:var(--muted); font-size:12px; margin-top:7px; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr); gap:18px; align-items:start; padding-bottom:70px; }
.stack { display:grid; gap:18px; }
.panel-head { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:19px; }
.panel-head p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.table-wrap { overflow:auto; border:1px solid #1e2a46; border-radius:15px; }
table { width:100%; border-collapse:collapse; min-width:670px; }
th, td { padding:13px 14px; border-bottom:1px solid #1b2742; text-align:left; font-size:13px; }
th { color:#8f9db8; font-size:11px; text-transform:uppercase; letter-spacing:.07em; background:#0a1120; }
tbody tr { transition:.15s ease; }
tbody tr:hover { background:#121c31; }
tbody tr[data-student-id] { cursor:pointer; }
tbody tr:last-child td { border-bottom:none; }
.name-cell strong { display:block; color:#edf1fb; }
.name-cell span { display:block; color:var(--muted-2); font-size:11px; margin-top:3px; }
.progress-track { width:120px; height:7px; background:#1a2540; border-radius:999px; overflow:hidden; }
.progress-track > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7468ff,#65d7e5); }
.phase-list { display:grid; gap:14px; }
.phase-line { display:grid; grid-template-columns:130px 1fr 45px; gap:12px; align-items:center; }
.phase-line span { color:#c4cde0; font-size:12px; }
.phase-bar { height:8px; background:#1a2540; border-radius:999px; overflow:hidden; }
.phase-bar i { display:block; height:100%; background:linear-gradient(90deg,#6f63ff,#60cbd7); border-radius:inherit; }
.phase-line strong { text-align:right; font-size:12px; }
.error-list { display:grid; gap:10px; }
.error-item { border:1px solid #2c334b; background:#0b1222; border-radius:14px; padding:13px 14px; }
.error-item-top { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.error-item strong { font-size:13px; }
.error-item p { color:var(--muted); margin:6px 0 0; font-size:12px; line-height:1.45; }
.count-pill { min-width:28px; height:28px; border-radius:999px; display:grid; place-items:center; background:#2d2014; color:#ffd991; font-weight:900; font-size:12px; }
.empty { padding:28px 12px; text-align:center; color:var(--muted); font-size:13px; }
.drawer-backdrop { position:fixed; inset:0; background:rgba(2,5,13,.68); backdrop-filter:blur(4px); display:none; z-index:50; }
.drawer-backdrop.show { display:block; }
.drawer { position:absolute; right:0; top:0; width:min(520px,100%); height:100%; overflow:auto; background:#0b1222; border-left:1px solid #273451; padding:26px; box-shadow:-30px 0 80px rgba(0,0,0,.35); }
.drawer-close { float:right; width:38px; height:38px; border-radius:12px; background:#121c31; border:1px solid #2b3857; color:white; }
.drawer h2 { margin:12px 0 4px; font-size:27px; }
.drawer-sub { color:var(--muted); font-size:13px; }
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:20px 0; }
.detail-card { border:1px solid #21304f; background:#0e172a; border-radius:14px; padding:13px; }
.detail-card span { display:block; color:var(--muted); font-size:11px; }
.detail-card strong { display:block; margin-top:5px; font-size:14px; }
.timeline { display:grid; gap:10px; margin-top:14px; }
.event { border-left:2px solid #35476d; padding:8px 0 8px 13px; }
.event.error { border-left-color:#b45b69; }
.event.success { border-left-color:#3cae8b; }
.event-top { display:flex; justify-content:space-between; gap:12px; }
.event strong { font-size:13px; }
.event time { color:var(--muted-2); font-size:11px; }
.event p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.45; word-break:break-word; }
.class-form-wrap { max-width:620px; margin:55px auto 80px; }
.code-input { text-transform:uppercase; letter-spacing:.15em; font-weight:850; }
.footer-note { padding:28px 0 50px; color:var(--muted-2); font-size:12px; text-align:center; }
@media (max-width: 900px) {
  .access-grid, .grid-2, .dashboard-grid { grid-template-columns:1fr; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .dashboard-top { flex-direction:column; }
}
@media (max-width: 620px) {
  .shell { width:min(100% - 22px,1180px); }
  .hero { padding-top:48px; }
  .access-grid { gap:12px; }
  .panel { padding:19px; }
  .stats-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .stat { padding:15px; }
  .stat .value { font-size:25px; }
  .phase-line { grid-template-columns:100px 1fr 40px; }
}
