:root {
  --bg: #d9edf7;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: linear-gradient(90deg, #38bdf8, #2563eb, #9333ea);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
}

.auth-card {
  width: min(1100px, 100%);
  min-height: 620px;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(30, 41, 59, 0.18);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.auth-card.reset-only {
  width: min(680px, calc(100vh - 64px));
  aspect-ratio: 1 / 1;
  min-height: 0;
  grid-template-columns: 1fr;
  border: 1px solid #e6eefb;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.14);
}

.auth-left {
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
}

.auth-left h1 {
  margin: 0;
  font-size: 2rem;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  background: #f8fbff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.back-home-btn:hover {
  background: #eef4ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.subtitle {
  margin: 8px 0 28px;
  color: var(--muted);
}

.social-stack {
  display: grid;
  gap: 12px;
  justify-items: center;
}

#googleSignInBtn {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

#googleSignInBtn > div {
  margin: 0 auto !important;
}

#googleSignInBtn iframe {
  margin: 0 auto !important;
}

.social-btn {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.social-btn:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.divider {
  margin: 26px 0 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--line);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  font-size: 0.92rem;
  font-weight: 600;
}

.login-form input {
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 0.95rem;
  outline: none;
}

.login-form input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.password-toggle:hover {
  background: #f3f4f6;
  color: #374151;
}

.forgot-link {
  margin-top: 4px;
  text-align: right;
  color: #6d28d9;
  font-size: 0.86rem;
}

.forgot-panel {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

#resetStepPassword .forgot-panel {
  margin-top: 14px;
  padding: 16px;
  gap: 10px;
  border-radius: 16px;
  border-color: #dbe7ff;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

#resetStepPassword .forgot-panel label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-top: 2px;
}

#resetStepPassword .password-field input {
  height: 50px;
  border: 1px solid #cfdcff;
  border-radius: 12px;
  background: #ffffff;
  padding-left: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#resetStepPassword .password-field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

#resetStepPassword .password-toggle {
  right: 12px;
}

.forgot-title {
  margin: 0 0 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f2937;
}

.otp-subtitle {
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  color: #6b7280;
}

.otp-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 10px;
}

.otp-input {
  width: 56px;
  height: 56px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.otp-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
  transform: translateY(-1px);
}

#verifyResetCodeBtn {
  width: calc((56px * 4) + (10px * 3));
  padding: 10px 18px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.otp-resend-wrap {
  margin: 0;
  text-align: center;
  font-size: 0.84rem;
  color: #6b7280;
}

.inline-link-btn {
  border: none;
  background: transparent;
  color: #2563eb;
  text-decoration: underline;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
}

.inline-link-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: none;
}

.password-strength {
  margin: -2px 0 2px;
  font-size: 0.8rem;
  min-height: 16px;
  color: #6b7280;
}

.password-strength.weak {
  color: #dc2626;
}

.password-strength.medium {
  color: #d97706;
}

.password-strength.strong {
  color: #059669;
}

.login-btn {
  margin-top: 8px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.login-btn:hover {
  filter: brightness(1.05);
}

.signup-prompt {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.signup-prompt a {
  color: #6d28d9;
  font-weight: 600;
}

.auth-message {
  min-height: 18px;
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.86rem;
}

.auth-message.error {
  color: #dc2626;
}

.auth-message.success {
  color: #059669;
}

.copyright {
  margin-top: auto;
  color: #9ca3af;
  font-size: 0.8rem;
}

.auth-right {
  background: var(--brand);
  position: relative;
  display: grid;
  place-items: center;
  padding: 30px;
}

.auth-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.2), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.18), transparent 35%);
}

.promo-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  min-height: 520px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  padding: 42px 34px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.floater {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  animation: floaty 4s ease-in-out infinite;
}

.floater-one {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.floater-two {
  top: 48%;
  left: -20px;
  width: 46px;
  height: 46px;
  font-size: 1.1rem;
  animation-delay: 0.8s;
}

.floater-three {
  bottom: 24px;
  right: 26px;
  width: 34px;
  height: 34px;
  font-size: 0.7rem;
  animation-delay: 1.4s;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.promo-panel h2 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.2;
}

.promo-image-wrap {
  display: flex;
  justify-content: center;
}

.promo-image {
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  object-fit: cover;
}

@media (max-width: 960px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-right {
    min-height: 360px;
  }

  .promo-panel {
    min-height: 300px;
  }

  .promo-panel h2 {
    font-size: 1.6rem;
  }

  .floater-two {
    left: 10px;
  }

  .promo-image {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  .auth-left {
    padding: 32px 22px;
  }

  .otp-group {
    gap: 8px;
  }

  .otp-input {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  #verifyResetCodeBtn {
    width: calc((50px * 4) + (8px * 3));
  }
}
