/* Auth pages: forgot password + OTP */
.auth-panel {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: flex-start;
}

@media (min-width: 1024px) {
  .auth-panel {
    min-height: 100vh;
    height: 100%;
    justify-content: center;
  }
}

.auth-resend {
  color: #ff3d00;
}

.auth-resend button {
  color: inherit;
}

.auth-resend button:hover:not(:disabled) {
  color: #e63700;
}

.otp-inputs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

@media (min-width: 480px) {
  .otp-inputs {
    gap: 12px;
  }
}

@media (min-width: 640px) {
  .otp-inputs {
    gap: 14px;
  }
}

.signup-name-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .signup-name-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

.signup-phone {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.signup-phone__code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 7.25rem;
  width: auto;
  max-width: 9.5rem;
  border: 1px solid #ffb028;
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
  color: #171717;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  appearance: auto;
}

.signup-phone__flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
}

.signup-phone__input {
  flex: 1;
  min-width: 0;
}

/* Password reset success modal */
body.reset-success-open {
  overflow: hidden;
}

.reset-success[hidden] {
  display: none;
}

.reset-success {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.reset-success__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(20 24 36 / 45%);
  cursor: pointer;
}

.reset-success__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: 20px;
  background: #fff;
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgb(20 24 36 / 22%);
}

.reset-success__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1a1c1c;
  cursor: pointer;
}

.reset-success__close:hover {
  background: #f2f4f6;
}

.reset-success__close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.reset-success__title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: #1a1c1c;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.reset-success__tick {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.reset-success__copy {
  margin: 18px auto 0;
  max-width: 30ch;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.reset-success__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 28px;
  border: 0;
  border-radius: 12px;
  background: #ffb028;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.reset-success__btn:hover {
  background: #f2a116;
}

@media (max-width: 520px) {
  .reset-success {
    padding: 14px;
    align-items: end;
  }

  .reset-success__dialog {
    width: 100%;
    border-radius: 20px 20px 14px 14px;
    padding: 28px 20px 20px;
  }

  .reset-success__title {
    font-size: 18px;
  }
}

/* Auth toaster — fixed corner card (must not participate in page flow) */
#auth-toaster.auth-toaster,
.auth-toaster {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 2147483647 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 10px !important;
  width: auto !important;
  max-width: min(360px, calc(100vw - 40px)) !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.auth-toast {
  pointer-events: auto !important;
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 40px)) !important;
  max-width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.auth-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.auth-toast--success {
  border-color: #bbf7d0;
  border-left-color: #22c55e;
}

.auth-toast__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fef2f2;
  color: #ef4444;
}

.auth-toast--success .auth-toast__icon {
  background: #f0fdf4;
  color: #22c55e;
}

.auth-toast__icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-toast__body {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-toast__title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: #171717;
  line-height: 1.3;
}

.auth-toast__message {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #525252;
  word-break: break-word;
}

.auth-toast__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a3a3a3;
  cursor: pointer;
}

.auth-toast__close:hover {
  background: #f5f5f5;
  color: #525252;
}

.auth-toast__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

