/* ===== Forgot Password modal (landing OTP flow) ===== */

#forgot-modal {
  --fp-bg: #0a1628;
  --fp-panel: linear-gradient(165deg, #0e243c 0%, #0a1a2e 100%);
  --fp-border: rgba(56, 189, 248, 0.22);
  --fp-text: #f1f5f9;
  --fp-muted: rgba(241, 245, 249, 0.58);
  --fp-label: rgba(241, 245, 249, 0.82);
  --fp-input-bg: rgba(255, 255, 255, 0.06);
  --fp-input-border: rgba(56, 189, 248, 0.28);
  --fp-accent: #2b7fd4;
  --fp-accent-2: #3b82f6;
  --fp-success: #22c55e;
  --fp-link: #5eead4;
  --fp-idle: rgba(241, 245, 249, 0.28);
  --fp-radius: 18px;

  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 12, 24, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#forgot-modal[hidden] {
  display: none !important;
}

#forgot-modal.is-open {
  display: flex !important;
}

.fp-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 26px;
  border-radius: var(--fp-radius);
  background: var(--fp-panel);
  border: 1px solid var(--fp-border);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  color: var(--fp-text);
  font-family: inherit;
}

.fp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(241, 245, 249, 0.5);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.fp-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fp-text);
}

/* Stepper */
.fp-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0 6px;
  margin: 4px 8px 22px;
}

.fp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fp-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--fp-idle);
  border: 2px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fp-step-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--fp-idle);
  max-width: 7.5rem;
  transition: color 0.2s ease;
}

.fp-line {
  height: 2px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.fp-step.is-active .fp-dot {
  background: linear-gradient(135deg, var(--fp-accent), var(--fp-accent-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(43, 127, 212, 0.35);
}

.fp-step.is-active .fp-step-label {
  color: #60a5fa;
}

.fp-step.is-done .fp-dot {
  background: linear-gradient(135deg, #16a34a, var(--fp-success));
  color: #fff;
  border-color: transparent;
}

.fp-step.is-done .fp-step-label {
  color: #4ade80;
}

.fp-line.is-done {
  background: rgba(74, 222, 128, 0.55);
}

/* Content */
.fp-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.25;
  padding-right: 28px;
}

.fp-sub {
  font-size: 0.8125rem;
  color: var(--fp-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.fp-field {
  margin-bottom: 14px;
}

.fp-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--fp-label);
  margin-bottom: 6px;
}

.fp-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--fp-input-border);
  border-radius: 11px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #fff;
  background: var(--fp-input-bg);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fp-input::placeholder {
  color: rgba(241, 245, 249, 0.35);
}

.fp-input:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.09);
}

.fp-input-wrap {
  position: relative;
  display: block;
}

.fp-input--pw {
  padding-right: 46px;
}

.fp-toggle-pwd {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(241, 245, 249, 0.55);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.fp-toggle-pwd:hover {
  color: rgba(241, 245, 249, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.fp-toggle-pwd:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.75);
  outline-offset: 1px;
}

.fp-input--otp {
  height: 56px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  padding-left: 1.1em;
}

/* Alert */
.fp-alert {
  display: none;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin-bottom: 14px;
}

.fp-alert.is-visible {
  display: block;
}

.fp-alert.is-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.fp-alert.is-success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

/* Buttons */
.fp-btn {
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--fp-accent), var(--fp-accent-2));
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.fp-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.fp-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.fp-btn:disabled {
  cursor: wait;
  opacity: 0.85;
}

.fp-btn-spin {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fp-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.fp-btn-spin[hidden] {
  display: none !important;
}

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

.fp-resend-row {
  text-align: center;
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: var(--fp-muted);
}

.fp-resend {
  background: none;
  border: none;
  color: var(--fp-link);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

.fp-resend:disabled {
  opacity: 0.45;
  cursor: default;
  text-decoration: none;
}

.fp-cd {
  color: rgba(241, 245, 249, 0.4);
}

/* Success */
.fp-done {
  text-align: center;
  padding: 8px 0 2px;
}

.fp-done-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, var(--fp-success));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.28);
}

.fp-done .fp-title {
  padding-right: 0;
  margin-bottom: 8px;
}

.fp-done .fp-sub {
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .fp-panel {
    padding: 24px 18px 20px;
    border-radius: 14px;
  }

  .fp-steps {
    margin-left: 0;
    margin-right: 0;
    gap: 0 4px;
  }

  .fp-step-label {
    font-size: 9px;
  }

  .fp-input--otp {
    letter-spacing: 0.28em;
    font-size: 1.35rem;
  }
}
