:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #1f2937;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  margin-top: 0;
}

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}

.hidden {
  display: none;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #f3f4f6;
}

button.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

#study-select {
  min-width: 280px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.selected-info {
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 600;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f9fafb;
}

.course-name-button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-align: left;
}

.course-name-button:hover {
  background: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.45);
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  width: min(680px, 100%);
  max-height: 80vh;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
}

.modal-course {
  margin: 12px 0 8px;
  font-weight: 600;
}

.modal-list {
  margin: 0;
  padding-left: 18px;
}

.modal-list li {
  margin-bottom: 6px;
}
