:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-600: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --gap: 16px;
  --max-width: 1100px;
  --pad: 16px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: #0f172a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header {
  max-width: var(--max-width);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.85)
  );
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-text .title {
  font-weight: 700;
  font-size: 18px;
}
.brand-text .subtitle {
  font-size: 12px;
  color: var(--muted);
}

.meta {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.meta .small {
  font-size: 12px;
  color: var(--muted);
}

/* ----------------- main layout ----------------- */
.main {
  max-width: var(--max-width);
  margin: 18px auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 2fr 1fr; /* main content 8 cols, right panel 4 cols */
  gap: var(--gap);
  align-items: start;
}

.panel {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ----------------- cards ----------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 8px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.center {
  text-align: center;
}

#class-title {
  margin: 0 0 6px 0;
  font-size: 20px;
}
#class-time {
  font-weight: 600;
  color: var(--muted);
}
#class-instructor {
  margin: 0 0 8px 0;
}

.actions .block {
  margin-bottom: 12px;
}

.row {
  display: flex;
  gap: 8px;
}
input[type="text"],
input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6edf6;
  flex: 1;
  font-size: 15px;
  outline: none;
}
input:focus {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  border-color: #cfe0ff;
}

.btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.btn.outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.12);
}
.btn:active {
  transform: translateY(1px);
}

.message {
  margin-top: 8px;
  min-height: 28px;
  font-weight: 600;
}

.message.success {
  color: var(--success);
}
.message.error {
  color: var(--danger);
}

.students {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 420px;
  overflow: auto;
}
.students li {
  display: flex;
  justify-content: space-between;
  padding: 8px 6px;
  border-bottom: 1px dashed #f1f5f9;
}
.students li:last-child {
  border-bottom: 0;
}

.footer {
  max-width: var(--max-width);
  margin: 12px auto 40px;
  padding: 0 12px;
  text-align: center;
  color: var(--muted);
}

/* ----------------- responsive ----------------- */
@media (max-width: 920px) {
  .main {
    grid-template-columns: 1fr; /* stack panels vertically */
  }
  .brand-text .title {
    font-size: 16px;
  }
  .brand {
    gap: 8px;
  }
}
