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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #333;
}

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

.navbar {
  background: #1a237e;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.nav-links a {
  color: #c5cae9;
  text-decoration: none;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

.page-header {
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white;
  text-align: center;
  padding: 40px 20px;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.page-header p { color: #c5cae9; }

.container {
  max-width: 660px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

.container.wide { max-width: 960px; }

.card {
  background: white;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #43a047;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #e53935;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #444;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #3949ab;
  box-shadow: 0 0 0 3px rgba(57,73,171,0.1);
}

.form-hint {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary {
  background: #1a237e;
  color: white;
  width: 100%;
  text-align: center;
}

.btn-primary:hover { background: #283593; }

.btn-secondary {
  background: #e8eaf6;
  color: #1a237e;
}

.btn-secondary:hover { background: #c5cae9; }

.page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  color: #1a237e;
}

hr.divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-wrap {
  width: 100%;
}

table thead tr {
  background: #1a237e;
  color: white;
}

table thead th { padding: 14px 16px; text-align: left; }

table tbody tr { border-bottom: 1px solid #eee; }

table tbody tr:hover { background: #f5f7ff; }

table tbody td { padding: 12px 16px; vertical-align: middle; }

.student-photo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.photo-placeholder { font-size: 24px; }

.badge {
  background: #e8eaf6;
  color: #3949ab;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.stat-number {
  font-size: 30px;
  font-weight: 700;
  color: #1a237e;
}

.stat-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #aaa;
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { margin-bottom: 20px; }

.footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: #aaa;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 1024px) {
  .container.wide {
    max-width: 860px;
  }

  .stats-bar {
    flex-wrap: wrap;
  }

  .stat-card {
    min-width: 220px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links a {
    margin-left: 0;
  }

  .page-header {
    padding: 28px 16px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .container {
    margin: 24px auto;
    padding: 0 16px 40px;
  }

  .container.wide {
    max-width: 100%;
  }

  .card {
    padding: 24px 20px;
  }

  .stats-bar {
    flex-direction: column;
  }

  .stat-card {
    min-width: 0;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 720px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 12px 14px;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-header {
    padding: 24px 14px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .page-header p {
    font-size: 14px;
  }

  .container {
    padding: 0 12px 32px;
  }

  .card {
    padding: 20px 16px;
  }

  .page-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions .btn {
    width: 100%;
  }

  .btn {
    min-height: 44px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  table thead th,
  table tbody td {
    padding: 10px 12px;
  }

  .student-photo {
    width: 32px;
    height: 32px;
  }
}