.otp-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(22, 163, 74, 0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.16), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #ecfeff 50%, #f0fdf4 100%);
}

.otp-card {
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  animation: otpEnter 0.45s ease both;
}

.otp-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e, #22c55e);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 16px 28px rgba(34, 197, 94, 0.24);
}

.otp-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: 27px;
  line-height: 1.15;
  text-align: center;
}

.otp-card p {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.otp-email {
  display: inline-flex;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.otp-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.otp-box {
  width: 100%;
  aspect-ratio: 1;
  border: 1.5px solid #dbeafe;
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.otp-box:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  transform: translateY(-1px);
}

.otp-btn,
.otp-link-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #22c55e);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(34, 197, 94, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.otp-btn:hover,
.otp-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(34, 197, 94, 0.28);
}

.otp-btn.secondary,
.otp-link-btn.secondary {
  background: #0f172a;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.otp-btn.ghost,
.otp-link-btn.ghost {
  background: transparent;
  color: #0f766e;
  box-shadow: none;
  border: 1px solid #bbf7d0;
}

.otp-btn:disabled,
.otp-btn.is-loading {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.otp-spinner {
  width: 16px;
  height: 16px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: otpSpin 0.7s linear infinite;
}

.otp-btn.is-loading .otp-spinner {
  display: inline-block;
}

.otp-resend-row {
  display: grid;
  gap: 10px;
}

.otp-hint {
  min-height: 21px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.otp-alert {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.otp-alert.error,
.otp-errors,
.otp-form .errorlist {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.otp-input-wrap {
  position: relative;
}

.otp-input-wrap .form-input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 18px;
  border: 1.5px solid #dbeafe;
  border-radius: 999px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
}

.otp-input-wrap .form-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  background: #fff;
}

.otp-input-wrap i {
  position: absolute;
  top: 50%;
  right: 18px;
  color: #64748b;
  transform: translateY(-50%);
}

.otp-toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
}

.otp-toast {
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
  font-size: 13px;
  font-weight: 800;
  animation: otpToast 0.24s ease both;
}

.otp-toast.error {
  background: #b91c1c;
}

.otp-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

@keyframes otpEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

@media (max-width: 520px) {
  .otp-shell {
    padding: 16px;
  }

  .otp-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .otp-card h1 {
    font-size: 23px;
  }

  .otp-boxes {
    gap: 6px;
  }

  .otp-box {
    border-radius: 12px;
    font-size: 20px;
  }
}
