/* Modern Controls Section */
.modern-controls-section {
  background: white;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.controls-header {
  background: #f8f9fa;
  padding: 16px 24px;
  border-bottom: 1px solid #e9ecef;
}

.controls-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls-content {
  padding: 20px 24px;
}

.search-wrapper {
  max-width: 400px;
}

.search-input-group {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  z-index: 1;
}

.modern-search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: #f9fafb;
  transition: all 0.3s ease;
}

.modern-search-input:focus {
  outline: none;
  border-color: #4f46e5;
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Modern Groups Section */
.modern-groups-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  overflow: hidden;
}


.modern-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  padding: 24px;
}

.modern-group-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.modern-group-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: #d1d5db;
}

.modern-group-header {
  color: white;
  padding: 20px;
  position: relative;
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
}

.group-title-section h4.group-name {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.group-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.modern-students-section {
  padding: 20px;
  min-height: 120px;
}

.modern-students-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modern-student-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.modern-student-item:hover {
  background: #e2e8f0;
  transform: translateX(4px);
}

.student-avatar-section {
  position: relative;
  flex-shrink: 0;
}

.modern-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
}

.status-indicator.active {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-indicator.inactive {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.student-info-section {
  flex: 1;
  min-width: 0;
}

.student-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  margin-bottom: 4px;
}

.student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-item {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.more-students-indicator {
  text-align: center;
  padding: 8px;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
}

.more-text {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.modern-group-actions {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
}

.modern-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
}


.modern-btn.success {
  background: #10b981;
  color: white;
}

.modern-btn.success:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Empty States */
.empty-group-state {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
}

.empty-group-state i {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.modern-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.empty-illustration i {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
  color: #d1d5db;
}

.modern-empty-state h3 {
  margin-bottom: 8px;
  color: #374151;
  font-weight: 600;
}

/* Loading States */
.modern-loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  background: white;
  border-radius: 12px;
  margin-bottom: 24px;
}

.modern-loading-spinner {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error States */
.modern-error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.modern-error-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid #fee2e2;
  max-width: 400px;
}

.error-icon {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 16px;
}

.modern-retry-button {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  transition: all 0.2s ease;
}

.modern-retry-button:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {

  .modern-groups-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .modern-stats-grid {
    grid-template-columns: 1fr;
  }

  .modern-page-title {
    font-size: 24px;
  }

  .modern-group-actions {
    flex-direction: column;
  }

  .modern-btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .modern-page-header {
    padding: 16px;
  }

  .controls-content {
    padding: 16px;
  }

  .modern-groups-grid {
    padding: 12px;
  }

  .modern-student-item {
    padding: 8px;
  }

  .student-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
