/* =================================================================================================
   PARENTS PORTAL - MAIN LOGIN STYLESHEET
   Brand Identity: P.K.SAMANTARAY PHYSICS INSTITUTE
   Features: Animated Gradient Canvas, Modern Rounded Cards, Floating Input Labels, Responsive Layout
   ================================================================================================= */

/* -------------------------------------------------------------------------
   GLOBAL BODY & ANIMATED BACKGROUND CANVAS
   ------------------------------------------------------------------------- */
body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb, #fbc2eb, #a6c1ee);
  background-size: 400% 400%;
  animation: gradientBG 10s ease infinite;
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 60px 15px 20px 15px;
  box-sizing: border-box;
}

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

/* Subtle Animated Institute Watermark Overlay */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, #e6ccff, #f3e6ff, #f9f0ff);
  background-repeat: repeat;
  background-size: 150px;
  opacity: 0.08;
  z-index: 0;
  animation: moveLogos 45s linear infinite;
  pointer-events: none;
}

@keyframes moveLogos {
  0% { background-position: -300px 0; }
  100% { background-position: 300px 0; }
}

/* -------------------------------------------------------------------------
   TOP INSTITUTE BRAND HEADER
   ------------------------------------------------------------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #003366;
  color: #ffffff;
  padding: 12px 10px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   MODERN LOGIN CARD CONTAINER
   ------------------------------------------------------------------------- */
.login-box {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 35px 28px;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  width: 100%;
  max-width: 410px;
  z-index: 10;
  box-sizing: border-box;
  margin: auto;
}

.login-box h2 {
  margin: 0 0 8px 0;
  color: #003366;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.login-box .subtitle {
  margin: 0 0 22px 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

/* -------------------------------------------------------------------------
   FORM INPUT GROUPS & LABELS
   ------------------------------------------------------------------------- */
.input-group {
  margin-bottom: 16px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  color: #1e293b;
  background-color: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
}

.input-wrapper input:focus {
  background-color: #ffffff;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.input-wrapper input::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

/* Password Input Padding for Visibility Toggle */
.password-wrapper input {
  padding-right: 46px;
}

/* Toggle Visibility Eye Button */
.toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.toggle-eye:hover {
  color: #1e293b;
}

/* -------------------------------------------------------------------------
   CLOUDFLARE TURNSTILE CAPTCHA CONTAINER
   ------------------------------------------------------------------------- */
.turnstile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 12px 0;
  min-height: 65px;
}

/* -------------------------------------------------------------------------
   SUBMIT BUTTON & STATES
   ------------------------------------------------------------------------- */
button[type="submit"],
#loginBtn {
  background-color: #007bff;
  color: #ffffff;
  padding: 13px;
  width: 100%;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
  display: block;
  box-sizing: border-box;
}

button[type="submit"]:hover:not(:disabled),
#loginBtn:hover:not(:disabled) {
  background-color: #0056b3;
  box-shadow: 0 6px 16px rgba(0, 86, 179, 0.35);
}

button:disabled,
#loginBtn:disabled {
  background-color: #94a3b8 !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.75 !important;
}

/* -------------------------------------------------------------------------
   FEEDBACK & ERROR MESSAGES
   ------------------------------------------------------------------------- */
.error {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
  min-height: 20px;
  line-height: 1.4;
  word-break: break-word;
}

/* -------------------------------------------------------------------------
   RESPONSIVE DESIGN ADAPTATIONS
   ------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    padding: 55px 12px 15px 12px;
  }

  header {
    font-size: 15px;
    padding: 10px 8px;
  }

  .login-box {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .login-box h2 {
    font-size: 22px;
  }

  .input-wrapper input {
    font-size: 15px;
    padding: 11px 12px;
  }

  button[type="submit"],
  #loginBtn {
    font-size: 15px;
    padding: 12px;
  }
}
