:root {
  --primary-color: #0078ff; /* Bright blue for academic tone */
  --secondary-color: #22c55e; /* Soft green for success/positivity */
  --accent-color: #ffb700; /* Yellow for highlights */
  --background-color: #f2f4f8; /* Light educational grey */
  --card-background: #ffffff;
  --text-color: #2b2b2b;
  --border-radius: 10px;
  --transition-speed: 0.3s;
  --shadow-color: rgba(0, 0, 0, 0.08);
}

/* Remove default browser spacing */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: 64px;
  transition: background-color 0.5s ease;
}

/* ======================================================= */
/* Animated Gradient Glassy Navbar - Sahayak Portal */
/* ======================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;

  /* 🔥 Animated gradient background */
  background: linear-gradient(
    120deg,
    rgba(0, 120, 255, 0.75),
    rgba(34, 197, 94, 0.75),
    rgba(255, 183, 0, 0.75),
    rgba(0, 120, 255, 0.75)
  );
  background-size: 300% 300%;
  animation: gradientMove 10s ease infinite;

  /* 🧊 Glass effect */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

  animation: navbarSlideDown 0.6s ease forwards;
}



/* Style for the testing team note on the homepage */
.testing-note {
    /* Use 'auto' for left and right margins to center a block-level element */
    margin: 5px auto 0 auto; /* Top, Right, Bottom, Left - 'auto' centers horizontally */
    max-width: 450px;
    font-size: 0.9rem;
    color: #4a4a4a;
    line-height: 1.5;
    text-align: centre;
    color: #111; /* This will center the text within the paragraph block */
    padding-bottom: 20px; /* Add some padding at the bottom for spacing */
}

.testing-note-text {
   margin: 2px auto 0 auto; /* Top, Right, Bottom, Left - 'auto' centers horizontally */
    max-width: 450px;
    font-size: 0.9rem;
    color: #4a4a4a;
    line-height: 1.5;
    text-align: left;
    color: #111; /* This will center the text within the paragraph block */
    padding-bottom: 20px; 
  
}





/* Smooth slide-down entry */
@keyframes navbarSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Moving gradient colors */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Branding */
.navbar-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.5em;
  letter-spacing: 1px;
  margin-right: 50px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Navbar links */
.navbar-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.navbar-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1em;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

/* Underline animation */
.navbar-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -4px;
  background: #fff;
  transition: width 0.3s ease;
}

.navbar-links a:hover {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.navbar-links a:hover::after {
  width: 100%;
}


/* ======================================================= */
/* Content Card Containers */
/* ======================================================= */

.content-container {
  max-width: 950px;
  margin: 50px auto;
  padding: 25px;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: 0 6px 20px var(--shadow-color);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.content-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

h1 {
  color: var(--primary-color);
  border-bottom: 3px solid #e9ecef;
  padding-bottom: 12px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
}

/* ======================================================= */
/* Form Cards */
/* ======================================================= */

.form-card {
  padding: 25px;
  background-color: #f7faff;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  transition: background-color 0.3s;
}

.form-card:hover {
  background-color: #eef6ff;
}

label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 6px;
  display: block;
}

/* ======================================================= */
/* Form Input Consistency Fix */
/* ======================================================= */

/* Unified styling for all input fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background-color: #ffffff;
  font-size: 15px;
  color: var(--text-color);
  box-sizing: border-box;
  outline: none;
  appearance: none; /* removes browser default styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.25s ease;
}

/* Hover & Focus states (same for all) */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 6px rgba(0, 120, 255, 0.3);
  background-color: #f9fbff;
}

/* File input customization (to match theme) */
input[type="file"] {
  cursor: pointer;
  background-color: #f1f5fb;
}

input[type="file"]::-webkit-file-upload-button {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background-color: #0056b3;
}

/* Select dropdown fix for consistency */
select {
  background-color: #ffffff;
  cursor: pointer;
}

/* Optional: disable red borders on invalid email by browsers */
input:invalid {
  box-shadow: none;
}


input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 4px rgba(0, 120, 255, 0.3);
}

/* ======================================================= */
/* Buttons */
/* ======================================================= */

.btn {
  padding: 10px 22px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: inline-block;
}

.primary-btn, .dashboard-content .btn {
  background: linear-gradient(90deg, var(--primary-color), #004aad);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 120, 255, 0.25);
}

.primary-btn:hover, .dashboard-content .btn:hover {
  background: linear-gradient(90deg, #0056b3, #0078ff);
  transform: translateY(-2px);
}

.secondary-btn {
  background: var(--secondary-color);
  color: white;
}

.secondary-btn:hover {
  background: #1a9a4f;
}

/* ======================================================= */
/* Dashboard - Teachers / Students / Reports */
/* ======================================================= */

.dashboard-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px;
  background-color: #fafafa;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ✨ Admin section container */
.admin-section {
  background: #ffffff;
  border-radius: var(--border-radius);
  padding: 30px;
  margin-bottom: 40px;
  border: 1px solid #e4e7eb;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.admin-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.admin-section h2 {
  color: var(--primary-color);
  font-size: 1.4rem;
  border-bottom: 2px solid #dce3ea;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* ======================================================= */
/* 🧩 Enhanced Button Grid — 3 in a Row Layout */
/* ======================================================= */

.admin-section .button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  justify-items: center;
  align-items: center;
  margin-top: 30px;
  width: 100%;
}

.admin-section .btn {
  width: 100%;
  max-width: 260px;
  background: linear-gradient(90deg, var(--primary-color), #004aad);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 120, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-section .btn:hover {
  background: linear-gradient(90deg, #0056b3, #0078ff);
  transform: translateY(-3px);
  box-shadow: 0 5px 16px rgba(0, 120, 255, 0.25);
}

.admin-section .btn:active {
  transform: scale(0.98);
}

/* ======================================================= */
/* Teacher & Student Lists */
/* ======================================================= */

#student-list-container {
  background: #f7f9fc;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 20px;
  transition: background-color 0.3s;
}

#teacher-list {
  margin-top: 15px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 15px 20px;
  min-height: 60px; /* Keeps a subtle box even if empty */
}

#teacher-list:hover, #student-list-container:hover {
  background: #eef4fc;
}

#teachers li {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

#teachers li:hover {
  background: #f1f7fe;
  transform: scale(1.01);
}

/* ======================================================= */
/* Responsive Layout for Buttons */
/* ======================================================= */

@media (max-width: 768px) {
  .admin-section .button-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
  }

  .admin-section .btn {
    max-width: 220px;
    font-size: 0.95rem;
    padding: 14px 18px;
  }
}


/* ======================================================= */
/* Animations for Buttons and Cards */
/* ======================================================= */

@keyframes pulse {
  0% { box-shadow: 0 0 0 rgba(0, 120, 255, 0.4); }
  70% { box-shadow: 0 0 8px rgba(0, 120, 255, 0.2); }
  100% { box-shadow: 0 0 0 rgba(0, 120, 255, 0.4); }
}

.btn:active {
  transform: scale(0.97);
  animation: pulse 0.5s ease;
}

/* ======================================================= */
/* Responsive Layout */
/* ======================================================= */

@media (max-width: 768px) {
  body {
    padding-top: 120px;
  }
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 10px 20px;
    text-align: center;
  }
  .navbar-links {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
  }
  .navbar-actions {
    margin-top: 10px;
  }
  .dashboard-content {
    padding: 20px;
  }
}

/* ======================================================= */
/* SAHAYAK WELCOME PAGE — Subtle Bluish-Green Theme */
/* ======================================================= */

body.home-page {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #1f2a36;

  /* 🌊 Soft teal-blue animated gradient background */
  background: linear-gradient(120deg, #e6f3f2, #d9eef7, #e6f3f2);
  background-size: 200% 200%;
  animation: calmTealShift 16s ease-in-out infinite;
}

@keyframes calmTealShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 🧊 Subtle frosted glass container */
.welcome-container {
  position: relative;
  z-index: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 6px 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.9s ease forwards;
  opacity: 0;
  transform: translateY(12px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Title - calm teal-blue tone */
.welcome-container h1 {
  font-size: 2.4rem;
  font-weight: 600;
  color: #117a8b; /* Teal-blue accent */
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* Buttons container */
.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Primary button - blue-green gradient */
.button-group .btn {
  padding: 12px 26px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(90deg, #1ca8a8, #1583b8);
  border: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(28, 168, 168, 0.25);
}

.button-group .btn:hover {
  background: linear-gradient(90deg, #1583b8, #1ca8a8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(21, 131, 184, 0.25);
}

/* Secondary button - muted sage green */
.button-group .btn.btn-secondary {
  background: linear-gradient(90deg, #6fbfaf, #4ca69d);
  box-shadow: 0 2px 6px rgba(76, 166, 157, 0.25);
}

.button-group .btn.btn-secondary:hover {
  background: linear-gradient(90deg, #4ca69d, #6fbfaf);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(76, 166, 157, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .welcome-container {
    padding: 40px 25px;
  }

  .welcome-container h1 {
    font-size: 1.9rem;
  }

  .button-group {
    flex-direction: column;
    gap: 14px;
  }

  .button-group .btn {
    width: 100%;
    text-align: center;
  }
}


/* ======================================================= */
/* TEACHER LOGIN PAGE — Subtle Glassy Theme Consistent with Sahayak */
/* ======================================================= */

body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;

  /* 🌊 soft animated bluish-green gradient background (same family as welcome page) */
  background: linear-gradient(135deg, #d9eef7, #e6f3f2, #d9eef7);
  background-size: 250% 250%;
  animation: calmTealMove 18s ease-in-out infinite;
}

@keyframes calmTealMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Frosted glass login box */
.form-container {
  width: 360px;
  padding: 40px 35px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: fadeInLogin 0.9s ease forwards;
  transform: translateY(15px);
  opacity: 0;
}

@keyframes fadeInLogin {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header text */
.form-container h2 {
  text-align: center;
  margin-bottom: 28px;
  font-size: 1.6rem;
  font-weight: 600;
  color: #117a8b; /* calm teal tone */
  letter-spacing: 0.5px;
}

/* Input boxes */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-color);
  display: block;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #cfd8e3;
  background-color: #ffffff;
  transition: all 0.25s ease;
  font-size: 15px;
  color: var(--text-color);
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 6px rgba(0, 120, 255, 0.3);
  background-color: #f9fbff;
}

/* Login button */
.login-page .btn {
  width: 100%;
  background: linear-gradient(90deg, #1ca8a8, #1583b8);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(28, 168, 168, 0.25);
}

.login-page .btn:hover {
  background: linear-gradient(90deg, #1583b8, #1ca8a8);
  transform: translateY(-2px);
}

/* Error message */
.error-message {
  color: #d93025;
  font-weight: 500;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

/* Back to Home link */
.form-container a {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: #1583b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.form-container a:hover {
  color: #1ca8a8;
  text-decoration: underline;
}

/* Responsive fix */
@media (max-width: 480px) {
  .form-container {
    width: 88%;
    padding: 30px 25px;
  }
}


.btn.success {
  background-color: #2ecc71;
  color: white;
}

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


/* ======================================================= */
/* ADMIN DASHBOARD — Layout & Navbar Fixes */
/* ======================================================= */

/* 🧭 Navbar Fix — Align Logout Button Properly */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;
}

.navbar-actions {
  margin-left: auto;
}

.navbar-actions .btn {
  background: white;
  color: var(--primary-color);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-actions .btn:hover {
  background: #e9f1ff;
  transform: translateY(-2px);
}

/* Ensure content doesn't go under fixed navbar */
body {
  padding-top: 70px;
}

/* ======================================================= */
/* Dashboard Buttons (Core Actions) */
/* ======================================================= */

.admin-section .button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px; /* spacing between buttons */
  justify-content: center;
  margin-top: 25px;
}

.admin-section .btn {
  background: linear-gradient(90deg, var(--primary-color), #004aad);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 120, 255, 0.2);
}

.admin-section .btn:hover {
  background: linear-gradient(90deg, #0056b3, #0078ff);
  transform: translateY(-2px);
}

/* Button layout responsiveness */
@media (max-width: 768px) {
  .admin-section .button-grid {
    flex-direction: column;
    align-items: center;
  }
  .admin-section .btn {
    width: 80%;
    text-align: center;
  }
}


/* ======================================================= */
/* 🔧 FIX NAVBAR ALIGNMENT FOR LOGOUT BUTTON */
/* ======================================================= */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure brand, links, and actions all fit in one line */
.navbar-brand {
  flex-shrink: 0;
}

.navbar-links {
  flex-grow: 1;
  display: flex;
  justify-content: center; /* Center the nav links */
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

.navbar-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Logout button styling */
#navbar-logout-btn {
  background: #fff;
  color: var(--primary-color);
  border: 1px solid rgba(255,255,255,0.3);
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#navbar-logout-btn:hover {
  background: #f1f5ff;
  transform: translateY(-2px);
}

/* 🧠 Make it behave properly on smaller screens */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  .navbar-links {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }

  .navbar-actions {
    justify-content: center;
    width: 100%;
  }

  #navbar-logout-btn {
    width: auto;
    padding: 10px 20px;
  }
}

/* ======================================================= */
/* 📋 Data Viewing Section (Lighter, Softer Look) */
/* ======================================================= */

.data-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  margin-top: 25px;
  max-width: 1100px;
  margin-inline: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e6ebf2;
  transition: all 0.3s ease;
}

.data-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
}

.data-title {
  color: var(--primary-color);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 18px;
  border-bottom: 2px solid #eaf0f8;
  padding-bottom: 8px;
}

/* ✨ Table Styling - soft pastel theme */
#students-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  background: #fdfefe;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Header row - lighter gradient tone */
#students-table th {
  background: linear-gradient(90deg, #e7f0ff, #f4faff);
  color: #1e3a8a; /* muted academic blue */
  font-weight: 700;
  font-size: 0.9rem;
  padding: 14px 18px;
  border-bottom: 2px solid #d9e3f5;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: left;
}

/* Table body rows */
#students-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef3fb;
  color: #333;
  background-color: #ffffff;
  transition: background-color 0.2s ease;
}

#students-table tr:nth-child(even) td {
  background-color: #f9fbff;
}

/* Hover animation - light blue tint */
#students-table tr:hover td {
  background-color: #eef6ff;
}

/* Scrollable container for smaller screens */
#students-container {
  overflow-x: auto;
  margin-top: 10px;
}


/* ======================================================= */
/* 👨‍🏫 View Teachers Table — Clean Consistent Look */
/* ======================================================= */

#teachers-container {
  overflow-x: auto;
  margin-top: 25px;
}

.data-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  margin: 25px auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e6ebf2;
  max-width: 1100px;
  transition: all 0.3s ease;
}

.data-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
}

.data-title {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #eaf0f8;
  padding-bottom: 8px;
}

/* 🧾 Table Styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  background: #fdfefe;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-table th {
  background: linear-gradient(90deg, #ecf6ff, #f9fdff);
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 14px 18px;
  border-bottom: 2px solid #dee8f4;
  text-align: left;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef3fb;
  color: #333;
  background-color: #fff;
  transition: background-color 0.2s ease;
}

.data-table tr:nth-child(even) td {
  background-color: #f9fbff;
}

.data-table tr:hover td {
  background-color: #eef6ff;
}

/* Action Button */
.data-table .btn-danger {
  background-color: #e74c3c;
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
}

.data-table .btn-danger:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}


.hidden {
  display: none !important;
}


/* frontend/public/style.css */

/* ... (add to end of file) ... */

/* ======================================================= */
/* Syllabus Tracker Styles */
/* ======================================================= */

#syllabus-tracker-section h2 {
  color: var(--primary-color);
  font-size: 1.4rem;
  border-bottom: 2px solid #dce3ea;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.tracker-card {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.tracker-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.tracker-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.25rem;
}

.tracker-header span {
  font-weight: 600;
  color: var(--primary-color);
}

.progress-bar-container {
  width: 100%;
  background-color: #e9ecef;
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #004aad);
  color: white;
  text-align: center;
  font-weight: 600;
  line-height: 20px;
  font-size: 0.8rem;
  border-radius: 10px 0 0 10px;
  transition: width 0.5s ease;
}

.tracker-link {
  text-decoration: none;
}

/* ======================================================= */
/* Syllabus Detail Page Styles */
/* ======================================================= */

.chapter-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.chapter-item {
  background: #f7f9fc;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 15px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  transition: background-color 0.3s;
}

.chapter-item:hover {
  background: #eef4fc;
}

.chapter-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  cursor: pointer;
}

.chapter-item label {
  font-weight: 500;
  color: var(--text-color);
  flex-grow: 1;
}

.chapter-item.completed label {
  text-decoration: line-through;
  color: #6c757d;
}

.worksheet-container {
  margin-top: 30px;
  padding: 25px;
  background-color: #fdfdfd;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
}

.worksheet-container h2 {
  color: var(--primary-color);
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.worksheet-content {
  white-space: pre-wrap; /* Preserves formatting from Markdown */
  line-height: 1.7;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 6px;
}

.worksheet-content h1, 
.worksheet-content h2, 
.worksheet-content h3 {
  color: var(--text-color);
  margin-top: 15px;
}

/* ======================================================= */
/* Worksheet Submissions Styles */
/* ======================================================= */

#worksheet-section {
    margin-top: 2rem;
}

.submission-details, .ai-remarks {
    /* display: none; */
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.btn-active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.stats-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.list-group-item {
    border: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
    border-radius: 5px !important;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.answers-container, .remarks-container {
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.answer-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

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

.badge {
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* ======================================================= */
/* Submission Review Styles (Dashboard)
/* ======================================================= */

#submission-review-section h2 {
  color: var(--primary-color);
  font-size: 1.4rem;
  border-bottom: 2px solid #dce3ea;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

#submission-review-section .tracker-card {
    background: #fdfdfd;
    border: 1px solid #e0e6ef;
}
#submission-review-section .tracker-card:hover {
    background: #f1f7fe;
}


/* ======================================================= */
/* Worksheet Submissions Page
/* ======================================================= */

#chapter-list-container.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.chapter-select-btn {
    background-color: #f1f5fb;
    color: var(--primary-color);
    border: 1px solid #dce3ea;
}
.chapter-select-btn:hover {
    background-color: #e2eafc;
}

.chapter-select-btn.btn-active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 255, 0.2);
}

#worksheet-section {
    margin-top: 2rem;
}

.stats-box {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    font-size: 1.1rem;
    font-weight: 500;
}
.stats-box span {
    font-weight: 700;
    color: var(--primary-color);
}

.list-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-group-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    background: #fff;
    transition: all 0.3s ease;
}
.list-group-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.student-submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}
.badge.success {
    background-color: var(--secondary-color);
}
.badge.danger {
    background-color: #e74c3c;
}

.student-submission-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}
.student-submission-actions .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    background-color: #f0f0f0;
    color: #333;
}
.student-submission-actions .btn:hover {
     background-color: #e0e0e0;
}

/* Active button states */
.student-submission-actions .btn.btn-view-answers.btn-active {
    background-color: var(--primary-color);
    color: white;
}
.student-submission-actions .btn.btn-view-remarks.btn-active {
    background-color: var(--secondary-color);
    color: white;
}


.submission-details {
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}
.submission-details.hidden {
    display: none;
}
.submission-details.answers-container {
    background-color: #f8f9fa;
}
.submission-details.remarks-container {
    background-color: #f1f7fe;
}
.submission-details h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.submission-details pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ======================================================= */
/* Attendance Page Styles */
/* ======================================================= */

.attendance-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.attendance-header {
    display: grid;
    grid-template-columns: 100px 1fr 200px;
    gap: 20px;
    padding: 12px 20px;
    background: linear-gradient(90deg, #ecf6ff, #f9fdff);
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.attendance-row {
    display: grid;
    grid-template-columns: 100px 1fr 200px;
    gap: 20px;
    padding: 12px 20px;
    background: white;
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    align-items: center;
    transition: all 0.3s ease;
}

.attendance-row:hover {
    background: #f1f7fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.attendance-options {
    display: flex;
    gap: 20px;
}

.attendance-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
}

.attendance-options input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.status-message {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

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

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#save-attendance-btn {
    margin-top: 20px;
    width: 100%;
    max-width: 200px;
}

#save-attendance-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive styles */
@media (max-width: 768px) {
    .attendance-header,
    .attendance-row {
        grid-template-columns: 70px 1fr 140px;
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .attendance-options {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .attendance-header,
    .attendance-row {
        grid-template-columns: 50px 1fr 120px;
        gap: 10px;
        padding: 10px;
        font-size: 0.85rem;
    }

    .attendance-options {
        flex-direction: column;
        gap: 8px;
    }

  
}

