/* ===== AUTH MODAL (Mobile Friendly) ===== */
.auth-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 16px;
  overflow-y: auto;
}

.auth-overlay.active{ display: flex; }

.auth-box{
  width: 520px;
  max-width: 100%;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  padding: 18px;
  position: relative;
  font-family: 'Poppins', sans-serif;
  overflow-y: auto;
}


.auth-close{
  position: absolute;
  top: 0px;
  right: 0px;
  border: none;
  background: transparent;
  font-size: 15px;
  padding: 6px;
  cursor: pointer;
}

.auth-tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-tabs .tab{
  border: 1px solid #d9d9d9;
  background: #f7f8fb;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.auth-tabs .tab.active{
  background: #1e3c72;
  color: #fff;
  border-color: #1e3c72;
}

.auth-form{ display: none; }
.auth-form.active{ display: block; }

.auth-form h2{
  margin: 8px 0 14px;
  text-align: center;
  font-size: 18px;
}

.field{
  display: block;
  margin-bottom: 12px;
}

.field span{
  display: block;
  font-size: 12px;
  color: #444;
  margin-bottom: 6px;
}

.field input{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #d7dbe7;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pass-wrap{
  position: relative;
}

.eye-btn{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.check-line{
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  margin: 6px 0 10px;
}

.teacher-fields{
  display: none;
  padding: 10px;
  background: #f7f9ff;
  border: 1px solid #e5ecff;
  border-radius: 12px;
  margin-bottom: 12px;
}

.teacher-fields.show{ display: block; }

/* ===== CAPTCHA ===== */
.captcha-group{
  margin-top: 14px;
}

.captcha-top{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px; /* input ke paas */
}

.captcha-img{
  height: 48px;
  border-radius: 10px;
  border: 1px solid #d6def5;
}

.captcha-refresh{
  height: 48px;
  width: 48px;
  border-radius: 12px;
  border: none;
  background: #eef3ff;
  cursor: pointer;
  font-size: 20px;
}

.captcha-input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d6def5;
  font-size: 15px;
}
.captcha-field span{
  margin-bottom: 6px;
}

.btn-primary{
  width: 100%;
  padding: 12px 14px;
  background: #1e3c72;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover{ opacity: .95; }

.auth-foot{
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: #444;
}

.link-btn{
  border: none;
  background: transparent;
  color: #1e3c72;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Mobile (1-column) ===== */
@media (max-width: 520px){
  .grid-2{ grid-template-columns: 1fr; }
  .captcha-row{ grid-template-columns: 1fr; }
  .captcha-img{ width: 100%; }
}
