body { font-family: Arial, sans-serif; margin: 20px; }
h1 { color: #333; }
table { border-collapse: collapse; width: 100%; margin-top: 15px; }
th, td { border: 1px solid #ccc; padding: 8px; text-align: left; }
th { background: #f4f4f4; }
#results h2 { margin-top: 20px; }

input[type="number"] {
  width: 60px;
  padding: 5px;
  margin-right: 15px;
}

.info-text {
  font-size: 0.9em;
  color: #666;
  margin: 5px 0 15px 0;
  font-style: italic;
}

.info-text:first-of-type {
  margin-top: 0;
  font-size: 1em;
  color: #555;
}

.summary-list {
  list-style-type: none;
  padding-left: 0;
  margin-left: 0;
}

/* Manual assignment styles */
#manualAssignment {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.manual-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.search-container {
  position: relative;
  width: 300px;
}

#studentSearch {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-results {
  position: absolute;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  z-index: 10;
  display: none;
}

.search-result-item {
  padding: 8px 12px;
  cursor: pointer;
}

.search-result-item:hover {
  background-color: #f0f0f0;
}

.assignment-container {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
}

#preferenceOptions {
  margin: 15px 0;
}

.preference-option {
  display: block;
  margin: 5px 0;
  padding: 5px;
  cursor: pointer;
  border-radius: 4px;
}

.preference-option:hover {
  background-color: #f0f0f0;
}

.preference-option.selected {
  background-color: #e0f0ff;
  border: 1px solid #99ccff;
}

#manualAssignmentsList {
  margin-top: 20px;
}

.actual-solve-btn {
  margin-top: 20px;
  padding: 10px 15px;
  font-size: 1em;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  width: 100%;
}

.export-csv-btn {
  padding: 8px 15px;
  font-size: 0.95em;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
}

.export-csv-btn:hover {
  background-color: #1976D2;
}

.export-csv-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

#solverSpinner {
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  margin-left: 10px;
}

#spinner {
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: rgba(0,0,0,0.7);
}

#manualAssignmentsTable {
  width: 100%;
}

.remove-assignment {
  color: #cc0000;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: bold;
}

.unmatched-students {
  margin: 20px 0;
  background-color: #f8f8f8;
  padding: 10px;
  border-left: 4px solid #ff9800;
}

.unmatched-students h3 {
  margin-top: 0;
  color: #e65100;
}

.unmatched-students-list {
  max-height: 300px;
  overflow: auto;
  margin-top: 10px;
  padding-left: 20px;
}

.unmatched-students-list li {
  margin-bottom: 5px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
