* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* Login Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

button {
  width: 100%;
  padding: 0.75rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #5a6fd8;
}

.error {
  background: #fee;
  color: #c33;
  padding: 0.75rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #fcc;
}

/* Dashboard Styles */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  min-height: 100vh;
}

.dashboard-header {
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  font-size: 1.5rem;
}

.user-info a {
  color: #3498db;
  text-decoration: none;
}

.user-info a:hover {
  text-decoration: underline;
}

.dashboard-content {
  padding: 2rem;
}

.student-info,
.results-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.student-info h2,
.results-section h2 {
  margin-bottom: 1rem;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-item label {
  font-weight: 600;
  color: #7f8c8d;
  margin-bottom: 0.25rem;
}

/* Results Viewer Styles */
.session-selector,
.terms-container {
  margin-bottom: 1rem;
}

.session-selector label,
.terms-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.session-selector select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  width: 200px;
}

.terms-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.term-btn {
  padding: 0.5rem 1rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.term-btn:hover {
  background: #2980b9;
}

.pdf-viewer {
  margin-top: 2rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.print-btn {
  width: auto;
  margin: 1rem;
  background: #27ae60;
}

.print-btn:hover {
  background: #219a52;
}

/* Admin Styles */
.admin-nav {
  background: #34495e;
  padding: 1rem 2rem;
}

.admin-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.admin-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.widget {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-left: 4px solid #3498db;
}

.widget h3 {
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.widget .count {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}
/* Additional Admin Styles */
.message {
  background: #dfd;
  color: #363;
  padding: 0.75rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #afa;
}

.form-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.student-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.cancel-btn {
  padding: 0.75rem 1.5rem;
  background: #95a5a6;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.cancel-btn:hover {
  background: #7f8c8d;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table th {
  background: #34495e;
  color: white;
  font-weight: 600;
}

.data-table tr:hover {
  background: #f8f9fa;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.edit-btn,
.delete-btn {
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.3s;
}

.edit-btn {
  background: #3498db;
  color: white;
}

.edit-btn:hover {
  background: #2980b9;
}

.delete-btn {
  background: #e74c3c;
  color: white;
}

.delete-btn:hover {
  background: #c0392b;
}

.upload-form {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-nav .active {
  background: rgba(255, 255, 255, 0.2);
}
/* Image Upload Styles */
.image-upload-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.image-preview {
  width: 150px;
  height: 150px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8f9fa;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  display: none;
}

.image-preview-placeholder {
  text-align: center;
  color: #6c757d;
}

.image-preview-placeholder i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.upload-btn {
  background: #3498db;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.upload-btn:hover {
  background: #2980b9;
}

.upload-btn input {
  display: none;
}

/* Profile Management Styles */
.profile-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
}

.profile-sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.profile-picture-large {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3498db;
  margin: 0 auto 1rem;
}

.profile-content {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  color: #6c757d;
}

.tab-btn.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* File Upload Styles */
.file-upload-wrapper {
  position: relative;
  display: inline-block;
}

.file-upload-wrapper input[type='file'] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
/* Profile Management Styles */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.student-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.student-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.student-card.active {
  border: 2px solid #3498db;
}

.student-photo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #3498db;
}

.student-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-photo .no-photo {
  width: 100%;
  height: 100%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.8rem;
}

.student-info h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.student-info p {
  margin: 0.25rem 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.profile-management {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.no-selection {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  color: #7f8c8d;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.photo-upload {
  margin: 1rem 0;
}

.photo-upload small {
  display: block;
  margin-top: 0.5rem;
  color: #7f8c8d;
}

.student-basic-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.student-basic-info h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 0.9rem;
}

.student-basic-info p {
  margin: 0;
  color: #3498db;
  font-weight: 600;
}
/* Student Dashboard Profile Styles */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3498db;
}

.default-avatar {
  background: #3498db;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.student-profile-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #f8f9fa;
}

.profile-picture-section {
  flex-shrink: 0;
}

.profile-picture-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #3498db;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.default-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3498db, #2c3e50);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 3rem;
  border: 4px solid #3498db;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.profile-basic-info h2 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.8rem;
}

.student-id {
  font-size: 1.1rem;
  color: #3498db;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.student-class {
  font-size: 1rem;
  color: #7f8c8d;
  margin: 0;
}

/* Enhanced info grid for dashboard */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.info-item label {
  font-weight: 600;
  color: #7f8c8d;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.info-item span {
  color: #2c3e50;
  font-size: 1rem;
}

/* Responsive design for profile header */
@media (max-width: 78px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .profile-basic-info h2 {
    font-size: 1.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .user-profile {
    flex-direction: column;
    gap: 0.25rem;
  }

  .user-profile span {
    font-size: 0.9rem;
  }
}
/* OTP Specific Styles */
.otp-actions {
  margin-top: 1rem;
  text-align: center;
}

.otp-actions a {
  color: #3498db;
  text-decoration: none;
}

.otp-actions a:hover {
  text-decoration: underline;
}

.otp-input {
  letter-spacing: 0.5rem;
  font-size: 1.5rem;
  text-align: center;
  font-weight: bold;
}

.otp-timer {
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

/* Login steps indicator */
.login-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.step {
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  border-radius: 20px;
  background: #f8f9fa;
  color: #6c757d;
}

.step.active {
  background: #3498db;
  color: white;
}
