/* ===== SCHOOL PORTAL LOGIN PAGE (CLEAN MODERN DESIGN) ===== */
body {
  font-family: 'Poppins', sans-serif;
  background: #f5f7fa;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #333;
  margin: 0;
}

/* ===== CONTAINER ===== */
.login-container {
  background: #fff;
  width: 90%;
  max-width: 420px;
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: transform 0.3s ease;
}

.login-container:hover {
  transform: translateY(-3px);
}

.login-container h1 {
  color: #003366;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

/* ===== TABS ===== */
.login-tabs {
  display: flex;
  justify-content: space-between;
  background: #f2f2f2;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.tab {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 600;
  color: #003366;
  transition: all 0.3s ease;
}

.tab.active {
  background: #003366;
  color: #fff;
}

/* ===== BACK TO HOME LINK ===== */
.back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 25px;
  color: #003366;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

.back-home:hover {
  color: #0059b3;
  transform: translateX(-3px);
}

.home-icon {
  font-size: 1.1rem;
}

/* ===== FORM ===== */
.login-form {
  display: none;
  flex-direction: column;
}

.login-form.active {
  display: flex;
}

.login-form h2 {
  color: #003366;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.login-form input {
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.login-form input:focus {
  border-color: #003366;
}

.login-form button {
  background: #003366;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.login-form button:hover {
  background: #0059b3;
}

.login-form p {
  margin-top: 10px;
  font-size: 0.9rem;
}

.login-form a {
  color: #003366;
  text-decoration: none;
  font-weight: 600;
}

.login-form a:hover {
  text-decoration: underline;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}

.modal.show {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background: #fff;
  padding: 30px 25px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-content h3 {
  color: #003366;
  margin-bottom: 10px;
}

.modal-content p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  outline: none;
}

.modal-content input:focus {
  border-color: #003366;
}

.modal-content .btn {
  background: #003366;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.modal-content .btn:hover {
  background: #0056b3;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.4rem;
  color: #003366;
  cursor: pointer;
  font-weight: bold;
  background: none;
  border: none;
  line-height: 1;
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
  }

  .tab {
    font-size: 0.9rem;
    padding: 10px 0;
  }

  .modal-content {
    padding: 25px 20px;
  }
}

.login-error {
  display: none;
  margin-bottom: 10px;
}

.login-error .alert {
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.login-error .alert-danger {
  background: #fdecea;
  border: 1px solid #f5c2c7;
  color: #842029;
}
