* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background: #2c3e50;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav a:hover {
  background-color: rgba(255,255,255,0.1);
}

.card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
  margin-bottom: 16px;
  color: #2c3e50;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

.btn-success {
  background-color: #27ae60;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-danger {
  background-color: #e74c3c;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.btn-secondary {
  background-color: #95a5a6;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.table tr:hover {
  background-color: #f8f9fa;
}

.login-container {
  max-width: 400px;
  margin: 100px auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
}

.role-selector {
  display: flex;
  margin-bottom: 20px;
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 4px;
}

.role-option {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
}

.role-option.active {
  background-color: #3498db;
  color: white;
}

.alert {
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.stat-card h3 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-card p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.assignment-card {
  border-left: 4px solid #3498db;
  margin-bottom: 15px;
}

.assignment-card h3 {
  color: #2c3e50;
  margin-bottom: 8px;
}

.assignment-card .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.assignment-card .actions {
  display: flex;
  gap: 10px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
}

.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #000;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #7f8c8d;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 10px;
  }
}

/* Student Card Styles */
.student-card {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  margin-bottom: 16px;
  background: white;
  overflow: hidden;
  transition: all 0.3s ease;
}

.student-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #3498db;
}

.student-header {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.student-header:hover {
  background-color: #f8f9fa;
}

.student-info h3 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.25rem;
}

.student-info .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.github-status {
  font-size: 0.85rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.github-status.connected {
  background-color: #d5f4e6;
  color: #27ae60;
}

.github-status.not-connected {
  background-color: #fdeaea;
  color: #e74c3c;
}

.registration-date {
  color: #95a5a6;
  font-size: 0.8rem;
}

.expand-icon {
  flex-shrink: 0;
  margin-left: 15px;
}

.expand-arrow {
  font-size: 14px;
  color: #7f8c8d;
  transition: transform 0.3s ease;
}

.student-details {
  border-top: 1px solid #ecf0f1;
  padding: 20px;
  background-color: #fafbfc;
}

.student-contact {
  margin-bottom: 20px;
}

.student-contact p {
  margin: 5px 0;
  color: #555;
}

.assignments-section h4 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 1rem;
  border-bottom: 1px solid #e1e8ed;
  padding-bottom: 8px;
}

/* New Assignment List Styles */
.assignments-list {
  margin-top: 15px;
}

.assignment-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #ecf0f1;
  transition: all 0.2s ease;
}

.assignment-list-item:hover {
  background-color: rgba(52, 152, 219, 0.05);
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 6px;
}

.assignment-list-item:last-child {
  border-bottom: none;
}

.assignment-details {
  flex: 1;
}

.assignment-title {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
}

.repo-url {
  color: #3498db;
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  transition: color 0.2s ease;
}

.repo-url:hover {
  color: #2980b9;
  text-decoration: underline;
}

.assignment-date {
  font-size: 0.8rem;
  color: #7f8c8d;
  margin-top: 2px;
}

.assignment-actions {
  flex-shrink: 0;
  margin-left: 15px;
}

.repo-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.repo-link-btn:hover {
  background-color: #3498db;
  border-color: #3498db;
  transform: translateY(-1px);
}

.repo-icon {
  font-size: 16px;
  filter: grayscale(0.3);
}

.repo-link-btn:hover .repo-icon {
  filter: grayscale(0) brightness(1.2);
}

.no-assignments {
  color: #95a5a6;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions .btn {
  flex: 1;
  min-width: 120px;
}

/* Form Help Text */
.form-help {
  font-size: 0.8rem;
  color: #7f8c8d;
  margin-top: 4px;
  display: block;
}

/* Filter Section */
.filter-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.search-section {
  display: flex;
  align-items: center;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  width: 250px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  cursor: pointer;
}

.user-count {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-left: 8px;
}

/* User Type Badges */
.user-type-badge {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.user-type-badge.admin-badge {
  background-color: #e8f4f8;
  color: #2980b9;
  border: 1px solid rgba(41, 128, 185, 0.2);
}

.user-type-badge.student-badge {
  background-color: #f0f9ff;
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.2);
}

@media (max-width: 768px) {
  .status-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .assignments-grid {
    grid-template-columns: 1fr;
  }
  
  .student-header {
    padding: 15px;
  }
  
  .student-details {
    padding: 15px;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .actions .btn {
    min-width: auto;
  }

  .filter-controls {
    align-items: stretch;
    width: 100%;
  }
  
  .filter-section {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  
  .filter-select {
    min-width: 150px;
  }
  
  .search-input {
    width: 100%;
  }
  
  .assignment-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .assignment-actions {
    margin-left: 0;
    align-self: flex-end;
  }
}