/* ===== Box-sizing Reset ===== */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

/* ===== Base Styles ===== */
body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Raleway', sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  color: #111;
  min-height: 50px;
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #e0e0e0;
  z-index: 1000;
}

.site-header .container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0 0.5rem;
}

.logo a {
  font-weight: 700;
  font-size: 1.5rem;
  color: #00796b;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.site-nav ul li a {
  color: #333;
  font-weight: 600;
  padding: 0.25rem 0;
  line-height: 1.3;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.site-nav ul li a:hover {
  color: #00796b;
}

.auth-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn {
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
}

.btn-login { background-color: transparent; color: #00796b; border-color: #00796b; }
.btn-login:hover { background-color: #004d40; color: #fff; border-color: #004d40; }
.btn-signup { background-color: #00796b; color: #fff; border-color: #00796b; }
.btn-signup:hover { background-color: #004d40; border-color: #004d40; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #00796b;
  line-height: 1;
}

/* ===== Mobile Styles ===== */
@media (max-width: 768px) {
  .site-header .container { position: relative; }
  .nav-toggle { display: block; z-index: 1001; }
  .site-nav {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
  }
  .site-nav.active { display: flex; }
  .site-nav ul { width: 100%; flex-direction: column; gap: 1rem; }
  .site-nav ul li { width: 100%; }
  .site-nav ul li a {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
  }
  .site-nav ul li a:hover { background-color: #f0f0f0; }
  .auth-buttons { width: 100%; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
  .auth-buttons .btn { width: 100%; text-align: center; }
}

/* ===== Hero Section ===== */
.hero {
  background: #f5f7fa;
  color: #111;
  padding: 120px 20px 100px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.hero-content h2 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 40px;
  color: #555;
}

.btn-primary {
  background: #00796b;
  color: #fff;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 0.5rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: #004d40;
  transform: translateY(-2px);
}

/* ===== Features Section ===== */
.features {
  padding: 60px 20px;
  background: #fff;
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
}

.feature {
  flex: 1 1 300px;
  background: #fafafa;
  padding: 25px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.feature:hover { transform: translateY(-5px); }

.feature h3 {
  font-weight: 700;
  color: #111;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.feature p {
  color: #555;
  font-size: 1rem;
}

/* ===== About Section ===== */
.about {
  background: #f9f9f9;
  padding: 60px 20px;
  text-align: center;
}

.about h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: #444;
}

/* ===== Footer ===== */
.site-footer {
  background: #f5f7fa;
  color: #111;
  padding: 40px 0;
  font-size: 1rem;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: inline-flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links li a {
  color: #111;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-links li a:hover {
  color: #00796b;
}

/* ===== Malayalam text support ===== */
.malayalam-text {
  font-family: 'Anek Malayalam', sans-serif;
}

/* ===== Registration Section ===== */
.register-section {
  background: linear-gradient(135deg, #e0f7fa, #ffffff);
  padding: 80px 20px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.register-container {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  color: #00796b;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background-color: #00796b;
  margin: 1rem auto 0;
  border-radius: 2px;
}

.register-form .form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.register-form input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.register-form input:focus {
  border-color: #00796b;
  box-shadow: 0 0 0 4px rgba(0,121,107,0.1);
  outline: none;
}

/* ===== Form Container & Messages ===== */
.form-container {
  max-width: 400px;
  margin: 100px auto;
  padding: 2rem;
  border-radius: 8px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: left;
}

.form-container h2 {
  color: #00796b;
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-container p {
  text-align: center;
  margin-top: 1rem;
}

.error-message {
  color: #d32f2f;
  background: #ffe5e5;
  padding: 0.8rem;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 1rem;
}

.registration-message {
  max-width: 500px;
  margin: 100px auto;
  padding: 2rem;
  border-radius: 8px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

.registration-message h2 {
  color: #00796b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.registration-message p {
  font-size: 1.1rem;
  line-height: 1.5;
}

.registration-message a {
  color: #00796b;
  font-weight: 600;
  border-bottom: 1px dotted #00796b;
  transition: color 0.3s;
}

.registration-message a:hover {
  color: #004d40;
  border-color: #004d40;
}
/* ===== Dashboard Section ===== */
.dashboard-section {
  background: #f9f9f9;
  padding: 80px 20px;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-container {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.dashboard-title {
  font-size: 2.5rem;
  color: #00796b;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.dashboard-subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 3rem;
}

.dashboard-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.dashboard-card {
  flex: 1 1 300px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 2rem;
  text-align: left;
  transition: transform 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-10px);
}

.dashboard-card h3 {
  color: #00796b;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.dashboard-card p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.small-btn {
  display: inline-block;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

/* ===== Admin Dashboard Enhancements ===== */
.admin-title {
  color: #d32f2f; /* distinctive red accent for admin dashboard title */
}

.admin-card {
  border-left: 5px solid #d32f2f; /* subtle visual cue for admin cards */
}

/* ===== Student Table ===== */
.student-table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 2rem;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

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

.student-table th {
  background: #00796b;
  color: #fff;
  font-weight: 600;
}

.student-table tr:hover {
  background-color: #f9f9f9;
}

.btn-table {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-table.edit {
  background-color: #0288d1;
  color: #fff;
  margin-right: 0.5rem;
}

.btn-table.edit:hover {
  background-color: #0277bd;
}

.btn-table.delete {
  background-color: #d32f2f;
  color: #fff;
}

.btn-table.delete:hover {
  background-color: #b71c1c;
}

/* ===== Manage Students Table ===== */
.manage-table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 2rem;
  margin-top: 2rem;
}

.manage-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

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

.manage-table th {
  background: #d32f2f;  /* distinctive red for admin table header */
  color: #fff;
  font-weight: 600;
}

.manage-table tr:hover {
  background-color: #f9f9f9;
}

.btn-table {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  margin-right: 0.5rem;
}

.btn-table.edit {
  background-color: #0288d1;
  color: #fff;
}

.btn-table.edit:hover {
  background-color: #0277bd;
}

.btn-table.delete {
  background-color: #d32f2f;
  color: #fff;
}

.btn-table.delete:hover {
  background-color: #b71c1c;
}

/* ===== Admin-specific Dashboard Cards ===== */
.admin-card {
  border-left: 5px solid #d32f2f;
}

.admin-title {
  color: #d32f2f;
}

/* ===== General Info & Error Messages ===== */
.info-message {
  font-size: 1.1rem;
  color: #555;
  margin-top: 2rem;
  text-align: center;
}

.error-message {
  color: #d32f2f;
  background: #ffe5e5;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 1rem;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  background: #111;
  color: #fff;
  width: 230px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.3s;
}

.sidebar.collapsed {
  width: 60px;
}

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

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li a {
  display: block;
  color: #fff;
  padding: 0.75rem 1rem;
  transition: background 0.3s;
}

.sidebar-menu li a:hover {
  background: #00796b;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.dashboard-content {
  flex-grow: 1;
  padding: 2rem;
  background: #f9f9f9;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.search-bar {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-right: 1rem;
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: #d32f2f;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.dashboard-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.stat-card {
  flex: 1 1 200px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  text-align: center;
}

.stat-card h3 {
  color: #00796b;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.5rem;
  font-weight: 700;
}
