/* ===============================
   UI-001: Modal System - Modal Container
================================ */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

/* ===============================
   UI-001: Modal System - Modal Content
================================ */
.modal-content {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  width: 500px;
  max-width: 95%;
  max-height: 85%;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  animation: slideDown 0.3s ease-out;
}

.modal-content-large {
  width: 50%;
  max-width: 1200px;
  height: 34%;
  max-height: 34vh;
}

.modal-content-medium {
  width: 600px;
  max-width: 95%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* ===============================
   UI-001: Modal System - Animations
================================ */
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===============================
   UI-001: Modal System - Form Grid
================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.form-grid input,
.form-grid select {
  margin-top: 0.3rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.9rem;
}

.form-grid input:focus,
.form-grid select:focus,
.notes-block textarea:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

/* ===============================
   UI-001: Modal System - Notes Section
================================ */
.notes-block {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}

.notes-block label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.notes-block textarea {
  margin-top: 0.3rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-dark);
  color: var(--text-light);
  resize: vertical;
  min-height: 100px;
  font-size: 0.9rem;
}

.char-counter {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}


/* ===============================
   UI-001: Modal System - Modal Footer Actions
================================ */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.modal-actions .btn-primary {
  background: var(--accent);
  color: #fff;
}

.modal-actions .btn-secondary {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-light);
}

.modal-actions .btn-danger {
  background: var(--danger);
  color: #fff;
}

/* ===============================
   UI-001: Modal System - Confirm / Message
================================ */
.modal-message {
  margin: 0.5rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.enroll-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-dark);
}

.enroll-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.enroll-item input[type="checkbox"] {
  accent-color: var(--accent);
}

.dual-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.list {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-height: 200px;
  max-height: 280px;
  overflow-y: auto;
}

.list h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.student-item {
  padding: 0.4rem;
  margin-bottom: 0.3rem;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: grab;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

.student-item.dragging {
  opacity: 0.5;
}

.student-item .muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.btn-secondary {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
}
.badge {
  background: var(--accent);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 0.3rem;
}

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.form-section-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.required-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#class-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#class-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

#class-form input,
#class-form select,
#class-form textarea {
  margin-top: 0.4rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#class-form input:focus,
#class-form select:focus,
#class-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#class-form textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* User Form Styling */
#user-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#user-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

#user-form input,
#user-form select,
#user-form textarea {
  margin-top: 0.4rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#user-form input:focus,
#user-form select:focus,
#user-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#user-form textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}
/* ===============================
   UI-001: Modal System - Assignments Cards
================================ */
.assignment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.assignment-card h3 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assignment-card .badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
}

.assignment-card p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.assignment-card .attachment {
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.assignment-card .preview {
  margin-top: 0.5rem;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  background: #0f172a;
}

/* ===============================
   UI-001: Gradebook - No Students Message
================================ */
.no-students-row {
  border: none;
}

.no-students-cell {
  text-align: center;
  padding: 3rem 2rem;
  border: none;
}

.no-students-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.no-students-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.no-students-message h4 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 600;
}

.no-students-message p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.4;
}

.no-students-message .btn-primary {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
