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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.back-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
  background: white;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.filters-bar select,
.filters-bar input {
  padding: 10px;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.filters-bar select:focus,
.filters-bar input:focus {
  outline: none;
  border-color: #2196f3;
}

.filters-bar input {
  flex: 1;
  max-width: 300px;
}

.btn-secondary {
  padding: 10px 20px;
  border: 2px solid #2196f3;
  background: white;
  color: #2196f3;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #2196f3;
  color: white;
}

/* Overview Cards */
.overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.overview-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.card-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #2196f3;
  margin-bottom: 0.25rem;
}

.card-content p {
  color: #666;
  font-size: 0.9rem;
}

/* Students Table */
.students-table-container {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.students-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

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

.students-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
}

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

.student-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.student-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.student-avatar.large {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
}

.student-info strong {
  color: #333;
}

.student-info small {
  color: #666;
  display: block;
}

.grade {
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
}

.grade.excellent {
  background: #e8f5e8;
  color: #4caf50;
}

.grade.good {
  background: #e3f2fd;
  color: #2196f3;
}

.grade.warning {
  background: #fff3e0;
  color: #ff9800;
}

.grade.danger {
  background: #ffebee;
  color: #f44336;
}

.attendance {
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
}

.attendance.good {
  background: #e8f5e8;
  color: #4caf50;
}

.attendance.warning {
  background: #fff3e0;
  color: #ff9800;
}

.attendance.danger {
  background: #ffebee;
  color: #f44336;
}

.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  background: #e3f2fd;
  color: #2196f3;
  transition: all 0.3s ease;
}

.btn-small:hover {
  background: #2196f3;
  color: white;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal.large {
  max-width: 900px;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.2rem;
  color: #333;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 1.5rem;
}

/* Student Detail */
.student-detail {
  max-width: 100%;
}

.student-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.student-header .student-info h3 {
  color: #333;
  margin-bottom: 0.5rem;
}

.student-header .student-info p {
  color: #666;
  margin-bottom: 0.25rem;
}

/* Detail Tabs */
.detail-tabs {
  display: flex;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.detail-tabs .tab-button {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #666;
}

.detail-tabs .tab-button.active {
  background: white;
  color: #2196f3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
}

.grades-chart,
.attendance-summary,
.assignments-summary {
  margin-bottom: 1.5rem;
}

.grades-chart h4,
.attendance-summary h4,
.assignments-summary h4 {
  color: #333;
  margin-bottom: 1rem;
}

.chart-placeholder {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: #666;
  margin-bottom: 1.5rem;
}

.recent-grades {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem;
}

.grade-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.attendance-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #2196f3;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

.assignment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status.completed {
  background: #e8f5e8;
  color: #4caf50;
}

.status.pending {
  background: #fff3e0;
  color: #ff9800;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-primary {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(33, 150, 243, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .title {
    font-size: 1.5rem;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .overview-cards {
    grid-template-columns: 1fr;
  }

  .students-table-container {
    overflow-x: scroll;
  }

  .student-header {
    flex-direction: column;
    text-align: center;
  }

  .attendance-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .detail-tabs {
    flex-direction: column;
  }
}
