body { font-family: Arial, sans-serif; margin: 0; background: #f6f7fb; color: #111; }
.card { max-width: 980px; margin: 20px auto; background: white; border-radius: 8px; padding: 18px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.topbar { max-width: 980px; margin: 20px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
input, textarea, button { padding: 8px 10px; border: 1px solid #d4d6de; border-radius: 8px; }
input, textarea { box-sizing: border-box; width: 100%; }
textarea { font-family: Arial, sans-serif; line-height: 1.4; }
button { background: #2563eb; color: white; border: 0; cursor: pointer; }
form button { margin-top: 14px; }
button.danger { background: #b42318; }
a { color: #2563eb; text-decoration: none; }
a.button-link {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
a.button-link.secondary { background: #475467; }
.error { color: #b42318; }
.success { color: #067647; }
.hint { color: #555; font-size: 0.92rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid label { display: grid; gap: 6px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.short-input { max-width: 82px; }
.checkbox { width: auto; }
.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px !important;
  align-items: center;
  font-weight: 400 !important;
}
.check-row input { width: auto; }
.pill { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #dcfae6; color: #067647; font-size: 0.82rem; font-weight: 700; }
.pill.danger-soft { background: #fee4e2; color: #b42318; }
.muted-row { background: #fafafa; color: #667085; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; }
.actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; }
.actions.compact { margin-top: 0; flex-wrap: wrap; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline input { width: auto; }
.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 6px; font-weight: 700; }
.section-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
ul { line-height: 1.9; }
.class-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; line-height: 1.35; }
.class-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e6e8ef;
  border-radius: 8px;
  background: #fbfcff;
}
.class-meta { min-width: 0; display: grid; gap: 3px; }
.class-meta span { overflow-wrap: anywhere; }
.class-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 640px) {
  body { background: white; }
  .topbar, .card { margin-left: 12px; margin-right: 12px; }
  .topbar { align-items: flex-start; }
  .card { padding: 14px; }
  .section-title { align-items: stretch; }
  .section-title h2 { margin: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .class-item { display: grid; gap: 10px; }
  .class-actions { display: grid; grid-template-columns: 1fr; }
  .class-actions .button-link { width: 100%; box-sizing: border-box; }
  .inline { align-items: stretch; }
  .inline .button-link, .inline button { flex: 1 1 auto; }
}
