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

body {
  font-family: Poppins, sans-serif;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden; /* NEW FIX */
}


/* ================= HEADER ================= */
.header {
  background: rgba(29, 78, 216, 0.95);
  color: white;
  padding: clamp(12px, 2vw, 16px) 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.6s ease;
}

/* 🔥 IMPORTANT FIX (BACK BUTTON CHIPAK NAHI HOGA) */
.header > div {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between; /* FIX */
  align-items: center;
  padding: 0 clamp(15px, 3vw, 25px);
  gap: 15px;
  flex-wrap: wrap;
}

.header h1 {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: bold;
  transition: 0.3s;
}

.header h1:hover {
  transform: scale(1.05);
  color: #facc15;
}


/* ================= BACK BUTTON ================= */
.back-btn {
  background: white;
  color: #1d4ed8;
  padding: clamp(8px, 1.5vw, 12px) clamp(14px, 2vw, 18px);
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  font-size: clamp(13px, 2vw, 15px);
}

.back-btn:hover {
  background: #facc15;
  color: black;
  transform: scale(1.08) translateY(-2px);
}


/* ================= LOGIN WRAPPER ================= */
.login-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 4vw, 40px);
}

.logo-box{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo-box img{
  width:40px;
  height:40px;
  border-radius:50%;
}
/* ================= LOGIN CARD ================= */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 400px;
  padding: clamp(25px, 4vw, 35px);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: fadeUp 0.8s ease;
  transition: 0.3s;
}

.login-card:hover {
  transform: translateY(-6px) scale(1.01);
}


/* ================= LOGO ================= */
.logo {
  text-align: center;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: bold;
  margin-bottom: 10px;
  color: #1d4ed8;
  transition: 0.3s;
}

.logo:hover {
  color: #facc15;
  transform: scale(1.08);
}

.title {
  text-align: center;
  color: gray;
  margin-bottom: 20px;
  font-size: clamp(13px, 2vw, 15px);
}


/* ================= INPUTS ================= */
input {
  width: 100%;
  padding: clamp(12px, 2vw, 14px);
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  outline: none;
  transition: 0.3s;
  font-size: clamp(14px, 2vw, 16px);
  background: #f8fafc;
}

input::placeholder {
  color: #6b7280;
  opacity: 1;
}

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
  transform: scale(1.02);
  background: white;
}


/* ================= PASSWORD BOX ================= */
.pass-box {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.pass-box input {
  flex: 1;
}

.pass-box button {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #e2e8f0;
  transition: 0.3s;
}

.pass-box button:hover {
  background: #cbd5e1;
  transform: scale(1.15);
}


/* ================= CAPTCHA ================= */
.captcha-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #f1f5f9;
  padding: 12px;
  border-radius: 10px;
  margin-top: 15px;
}

#captchaText {
  font-weight: bold;
  letter-spacing: 3px;
  color: #1e3a8a;
  font-size: clamp(14px, 2vw, 16px);
}

.captcha-box button {
  border: none;
  background: #2563eb;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.captcha-box button:hover {
  background: #1d4ed8;
  transform: rotate(90deg) scale(1.1);
}


/* ================= LOGIN BUTTON ================= */
.login-btn {
  width: 100%;
  margin-top: 18px;
  padding: clamp(12px, 2vw, 15px);
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: clamp(15px, 2vw, 17px);
}

.login-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}


/* ================= LINKS ================= */
.links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: clamp(13px, 2vw, 15px);
  flex-wrap: wrap;
  gap: 10px;
}

.links a {
  color: #2563eb;
  text-decoration: none;
  transition: 0.3s;
}

.links a:hover {
  color: #facc15;
  text-decoration: underline;
  transform: translateX(3px);
}


/* ================= RESET PASSWORD POPUP ================= */
.reset-box {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.reset-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  animation: fadeUp 0.5s ease;
}

.reset-card:hover {
  transform: scale(1.03);
}

.reset-card h2 {
  margin-bottom: 15px;
  color: #1d4ed8;
}

.reset-card input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.reset-card button {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #2563eb;
  color: white;
  font-weight: bold;
  transition: 0.3s;
}

.reset-card button:hover {
  background: #1d4ed8;
  transform: scale(1.05);
}

.reset-card .cancel {
  background: #ef4444;
}

.reset-card .cancel:hover {
  background: #dc2626;
}

.hidden {
  display: none;
}


/* ================= ANIMATIONS ================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* ================= RESPONSIVE ================= */

/* Tablet */
@media (max-width: 992px) {
  .header > div {
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .header > div {
    flex-direction: column;
    text-align: center;
  }

  .login-wrapper {
    align-items: flex-start;
  }
}

/* Small Phones */
@media (max-width: 480px) {
  .login-card {
    border-radius: 12px;
    padding: 20px;
  }

  .captcha-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .pass-box {
    flex-direction: column;
  }

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