* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.topbar .brand { color: #38bdf8; font-weight: 700; text-decoration: none; font-size: 1.15rem; }
.topbar nav a { color: #cbd5e1; margin-left: 1rem; text-decoration: none; }
.topbar nav a:hover { color: #fff; }
.topbar .who { color: #94a3b8; margin-right: 1rem; }

main { padding: 1.5rem; max-width: 980px; margin: 0 auto; }

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card h1 { margin-top: 0; }

form label { display: block; margin: 0.6rem 0; }
form input[type=text], form input[type=password], form input { width: 100%; max-width: 320px; padding: 0.5rem; border-radius: 6px; border: 1px solid #475569; background: #0f172a; color: #e2e8f0; }
fieldset.role { border: 1px solid #475569; border-radius: 6px; padding: 0.5rem 1rem; }
fieldset.role label { display: inline-block; margin-right: 1.25rem; }
button {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
}
button[disabled] { background: #475569; color: #94a3b8; cursor: not-allowed; }
button.danger { background: #ef4444; color: #fff; }
.err { color: #fca5a5; }
.muted { color: #94a3b8; }

#teacher-list { list-style: none; padding: 0; margin: 1rem 0; }
#teacher-list li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border: 1px solid #334155; border-radius: 8px;
  margin-bottom: 0.5rem; background: #0f172a;
}
#teacher-list .name { flex: 1; font-weight: 600; }
#teacher-list .status { font-size: 0.85rem; color: #94a3b8; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block; background: #64748b;
}
.dot-available { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.dot-in_class { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.dot-unavailable { background: #64748b; }

.status-pill {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  background: #475569; color: #fff; font-size: 0.85rem;
}
.status-pill.available { background: #22c55e; }
.status-pill.in_class { background: #f59e0b; color: #0f172a; }
.status-pill.unavailable { background: #475569; }

.toggle { display: flex; align-items: center; gap: 0.6rem; margin: 1rem 0; }
.toggle input { width: 18px; height: 18px; }

.room .videos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.room .videos figure { margin: 0; }
.room video {
  width: 100%; background: #000; border-radius: 8px; aspect-ratio: 16/9; object-fit: cover;
}
.room .controls { display: flex; gap: 0.5rem; margin-top: 1rem; }

#invite-box {
  margin-top: 1rem; padding: 1rem;
  border: 1px dashed #38bdf8; border-radius: 8px; background: #0f172a;
}
