/* ============================================================
   Login Page — Premium 2FA Flow
   ============================================================ */

.brp-login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--brp-space-6) var(--brp-space-4);
  background: linear-gradient(135deg, var(--brp-bg) 0%, var(--brp-bg-soft) 100%);
  position: relative;
  overflow: hidden;
}

.brp-login-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, var(--brp-gold-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.brp-login-wrap::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, var(--brp-gold-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.brp-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--brp-surface);
  border: 1px solid var(--brp-border);
  border-radius: var(--brp-radius-xl);
  padding: var(--brp-space-7) var(--brp-space-6);
  box-shadow: var(--brp-shadow-xl);
  position: relative;
  z-index: 1;
  animation: brpFadeUp var(--brp-dur-slow) var(--brp-ease-out);
}

@keyframes brpFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brp-login-ornament {
  font-size: 56px;
  text-align: center;
  margin-bottom: var(--brp-space-4);
  filter: drop-shadow(0 4px 12px var(--brp-gold-glow));
}

.brp-login-title {
  margin: 0 0 var(--brp-space-2);
  font-family: var(--brp-font-display);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.5px;
  color: var(--brp-text);
}

.brp-login-subtitle {
  margin: 0 0 var(--brp-space-6);
  text-align: center;
  color: var(--brp-text-muted);
  font-size: 15px;
}

.brp-login-form {
  display: flex;
  flex-direction: column;
  gap: var(--brp-space-4);
}
.brp-login-form[hidden] { display: none !important; }

/* Success flash banner shown after password reset */
.brp-flash-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #d4ebe0 0%, #f0f9f4 100%);
  color: #1f6b40;
  border: 1px solid #4caf7a;
  border-right: 4px solid #2e8b57;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  animation: brpFlashIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.brp-flash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #2e8b57;
  color: #ffffff;
  border-radius: 50%;
  font-weight: 900;
  flex-shrink: 0;
}

@keyframes brpFlashIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brp-field {
  display: flex;
  flex-direction: column;
  gap: var(--brp-space-2);
}

.brp-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--brp-text-soft);
  padding-right: 2px;
}

.brp-field input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  background: var(--brp-surface-elev);
  color: var(--brp-text);
  border: 1.5px solid var(--brp-border);
  border-radius: var(--brp-radius-md);
  transition: all var(--brp-dur-fast) var(--brp-ease);
  outline: none;
}

.brp-field input:focus {
  border-color: var(--brp-gold);
  background: var(--brp-surface);
  box-shadow: 0 0 0 4px var(--brp-gold-glow);
}

.brp-error {
  padding: 12px 16px;
  background: var(--brp-error-soft);
  color: var(--brp-error);
  border-radius: var(--brp-radius-md);
  font-size: 14px;
  font-weight: 500;
  border-right: 3px solid var(--brp-error);
}

.brp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--brp-space-2);
  padding: 16px 32px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: var(--brp-radius-pill);
  cursor: pointer;
  transition: all var(--brp-dur-med) var(--brp-ease);
  position: relative;
  overflow: hidden;
}

.brp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.brp-btn-primary {
  background: linear-gradient(135deg, var(--brp-gold) 0%, var(--brp-gold-dark) 100%);
  color: #1a1614;
  box-shadow: var(--brp-shadow-gold);
}

.brp-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--brp-gold-glow);
}

.brp-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.brp-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: brpSpin 0.6s linear infinite;
}

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

.brp-help-link {
  text-align: center;
  font-size: 14px;
  margin-top: var(--brp-space-2);
}

.brp-help-link a {
  color: var(--brp-text-muted);
  text-decoration: none;
}

.brp-help-link a:hover {
  color: var(--brp-gold);
  text-decoration: underline;
}

/* ===== 2FA Step ===== */
.brp-2fa-info {
  text-align: center;
  margin-bottom: var(--brp-space-4);
}

.brp-2fa-icon {
  font-size: 48px;
  margin-bottom: var(--brp-space-3);
  filter: drop-shadow(0 4px 8px var(--brp-gold-glow));
}

.brp-2fa-info p {
  margin: 0 0 var(--brp-space-1);
  color: var(--brp-text-soft);
  font-size: 15px;
}

.brp-masked-email {
  font-family: var(--brp-font-mono);
  font-weight: 600;
  color: var(--brp-gold-dark) !important;
  direction: ltr;
}

.brp-2fa-hint {
  font-size: 13px !important;
  color: var(--brp-text-muted) !important;
  margin-top: var(--brp-space-2) !important;
}

.brp-otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--brp-space-2);
  margin: var(--brp-space-4) 0;
}

.brp-otp {
  width: 100%;
  aspect-ratio: 1;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--brp-font-mono);
  background: var(--brp-surface-elev);
  color: var(--brp-text);
  border: 1.5px solid var(--brp-border);
  border-radius: var(--brp-radius-md);
  outline: none;
  transition: all var(--brp-dur-fast) var(--brp-ease);
}

.brp-otp:focus {
  border-color: var(--brp-gold);
  background: var(--brp-surface);
  box-shadow: 0 0 0 4px var(--brp-gold-glow);
  transform: scale(1.05);
}

.brp-otp.brp-otp-filled {
  border-color: var(--brp-gold-light);
  background: linear-gradient(135deg, var(--brp-surface) 0%, var(--brp-surface-elev) 100%);
}

.brp-resend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--brp-space-2);
  font-size: 13px;
  color: var(--brp-text-muted);
}

.brp-resend-btn {
  background: none;
  border: none;
  color: var(--brp-gold-dark);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.brp-resend-btn:disabled {
  color: var(--brp-text-muted);
  cursor: not-allowed;
}

.brp-resend-btn:not(:disabled):hover {
  text-decoration: underline;
}

.brp-back-btn {
  background: none;
  border: none;
  color: var(--brp-text-muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: var(--brp-space-2);
  text-align: center;
  transition: color var(--brp-dur-fast) var(--brp-ease);
}

.brp-back-btn:hover {
  color: var(--brp-gold);
}

.brp-login-footer {
  margin-top: var(--brp-space-6);
  text-align: center;
  font-size: 12px;
  color: var(--brp-text-muted);
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 480px) {
  .brp-login-card {
    padding: var(--brp-space-6) var(--brp-space-5);
  }
  .brp-otp {
    font-size: 22px;
  }
  .brp-login-title {
    font-size: 24px;
  }
}
