@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

body.auth-login-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: #171222;
  position: relative;
  overflow-x: hidden;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-shell {
  position: relative;
  z-index: 2;
  width: min(964px, 100%);
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  align-items: stretch;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(37, 21, 84, 0.26);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
}

.auth-shell__media {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(126, 90, 255, 0.08));
  border-right: 1px solid rgba(255, 255, 255, 0.42);
}

.auth-shell__poster-frame {
  height: 100%;
  min-height: 560px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-shell__poster {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-shell__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.auth-shell__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.52));
}

.header-text h2 {
  margin: 0 0 12px;
  color: #181225;
  font-size: 1.7rem;
  line-height: 1.05;
  font-weight: 700;
}

.header-text p {
  margin: 0;
  max-width: 560px;
  color: #5a556c;
  font-size: 1rem;
  line-height: 1.55;
}

.auth-form {
  margin-top: 10px;
}

.auth-form .input-group,
.auth-form .password-input-group {
  width: 100%;
  margin-bottom: 16px;
}

.auth-form .form-control,
.password-input-group input {
  /* min-height: 60px; */
  padding: 14px 18px;
  border: 1px solid rgba(94, 70, 180, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 18px 36px rgba(104, 77, 196, 0.08);
  color: #1d1830 !important;
  font-size: 1rem;
}

.auth-form .form-control::placeholder,
.password-input-group input::placeholder {
  color: #9d96b4;
}

.auth-form .form-control:focus,
.password-input-group input:focus {
  border-color: rgba(88, 69, 189, 0.8);
  box-shadow: 0 0 0 4px rgba(89, 70, 192, 0.12);
}

.password-input-group {
  width: 100%;
}

.password-field-wrap {
  position: relative;
  width: 100%;
}

.password-field {
  width: 100%;
  padding-right: 58px !important;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(89, 70, 192, 0.1);
  border-radius: 999px;
  color: #5341ab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
  background: rgba(89, 70, 192, 0.18);
  color: #2e215f;
  outline: none;
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.password-toggle-btn i {
  font-size: 18px;
  pointer-events: none;
}

.forgot {
  width: 100%;
}

.forgot a,
#otpEmailFallback a,
.auth-footer small a {
  color: #5541b8;
  font-weight: 600;
  text-decoration: none;
}

.forgot a:hover,
#otpEmailFallback a:hover,
.auth-footer small a:hover {
  text-decoration: underline;
}

#otpHint small,
#otpEmailFallback small,
.forgot small,
.auth-footer small {
  color: #5e5872;
  font-size: 0.94rem;
}

.auth-footer {
  margin-top: 14px;
  text-align: center;
}

.btn-primary {
  /* min-height: 60px; */
  border: none;
  border-radius: 18px;
  /* padding: 14px 18px; */
  background: linear-gradient(135deg, #5440b0 0%, #7754df 100%);
  box-shadow: 0 18px 40px rgba(93, 63, 194, 0.26);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #5e49bd 0%, #8864ee 100%);
  box-shadow: 0 22px 46px rgba(93, 63, 194, 0.3);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  filter: saturate(0.9);
}

.auth-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(146, 102, 255, 0.44), rgba(146, 102, 255, 0) 34%),
    radial-gradient(circle at bottom right, rgba(122, 85, 255, 0.42), rgba(122, 85, 255, 0) 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(246, 241, 255, 0.62) 48%, rgba(237, 228, 255, 0.48));
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: loginAuthSpin 0.6s linear infinite;
}

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

@media (max-width: 980px) {
  .auth-page {
    /* padding: 88px 16px 32px; */
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-shell__media {
    padding: 16px 16px 0;
    border-right: none;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.42); */
  }

  .auth-shell__poster-frame {
    min-height: 260px;
  }

  .auth-shell__panel {
    padding: 32px 24px;
  }
}

@media (max-width: 640px) {
  .auth-login-page .public-language-dropdown {
    top: 0.75rem;
    right: 0.75rem;
  }

  .auth-shell {
    width: calc(100% - 20px);
    border-radius: 24px;
  }

  .auth-shell__media {
    padding: 14px 14px;
  }

  .auth-shell__poster-frame {
    min-height: 180px;
    padding: 10px;
  }

  .header-text h2 {
    font-size: 1.8rem;
  }

  .header-text p,
  #otpHint small,
  #otpEmailFallback small,
  .forgot small,
  .auth-footer small {
    font-size: 0.92rem;
  }

  .auth-shell__panel {
    padding: 28px 18px 24px;
  }

  .auth-form .form-control,
  .password-input-group input,
  .btn-primary {
    /* min-height: 56px; */
  }
}
