/* Auth Pages — login.php, password reset */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F0C29 0%, #302B63 45%, #24243E 100%);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

/* Animated background shapes */
.auth-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  animation: shapePulse 8s ease-in-out infinite;
}

.auth-shape-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #4F46E5, transparent);
  top: -160px;
  right: -100px;
  animation-delay: 0s;
}

.auth-shape-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #7C3AED, transparent);
  bottom: -80px;
  left: -80px;
  animation-delay: 2s;
}

.auth-shape-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #2563EB, transparent);
  top: 40%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes shapePulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.12; }
  50% { transform: scale(1.15) rotate(15deg); opacity: 0.18; }
}

/* Glass card */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow:
    0 8px 40px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  position: relative;
  z-index: 1;
  animation: cardEntrance 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo area */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 44px;
  height: 44px;
  background: #4F46E5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(79,70,229,0.5);
}

.auth-logo-icon svg { width: 22px; height: 22px; fill: #fff; }

.auth-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.auth-logo-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.02em;
}

/* Heading */
.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-subheading {
  font-size: 13.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 28px;
}

/* Form fields on dark background */
.auth-form-group { margin-bottom: 16px; }

.auth-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  -webkit-text-fill-color: #fff;
}

.auth-input::placeholder { color: rgba(255,255,255,0.28); }

.auth-input:focus {
  border-color: rgba(79,70,229,0.8);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.25);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 50px rgba(30,27,75,0.9) inset !important;
  -webkit-text-fill-color: #fff !important;
}

/* Password visibility toggle */
.auth-input-wrapper { position: relative; }

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 2px;
  display: flex;
  transition: color 0.15s;
}

.auth-pw-toggle:hover { color: rgba(255,255,255,0.7); }
.auth-pw-toggle svg { width: 17px; height: 17px; }

/* Error message */
.auth-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #FCA5A5;
  margin-bottom: 16px;
  display: none;
}

.auth-error.visible { display: block; }

/* Forgot link */
.auth-forgot {
  text-align: right;
  margin-bottom: 22px;
}

.auth-forgot a {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-forgot a:hover { color: rgba(255,255,255,0.8); text-decoration: none; }

/* Submit button */
.auth-btn {
  width: 100%;
  padding: 12px;
  background: #4F46E5;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  position: relative;
  overflow: hidden;
}

.auth-btn:hover {
  background: #4338CA;
  box-shadow: 0 4px 20px rgba(79,70,229,0.5);
  transform: translateY(-1px);
}

.auth-btn:active { transform: translateY(0); }

.auth-btn.loading {
  color: transparent;
  pointer-events: none;
}

.auth-btn.loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Rate limit warning */
.auth-lockout {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #FCD34D;
  margin-bottom: 16px;
}

/* Footer text */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

.auth-footer a { color: rgba(255,255,255,0.45); }
.auth-footer a:hover { color: rgba(255,255,255,0.65); text-decoration: none; }

/* Success state (password reset sent) */
.auth-success {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #6EE7B7;
  font-size: 13.5px;
}

.auth-success-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
}
