/* Auth V7 — black/gold glassmorphism (Login form V7 inspired) */

.auth-shell {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - var(--header-h, 64px));
  padding: 2.5rem 1rem 3rem;
  overflow: hidden;
}

.auth-shell-v7 {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050508;
}

.auth-ribbon {
  position: absolute;
  inset: -8%;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 22%, rgba(234, 179, 8, 0.22), transparent 58%),
    radial-gradient(ellipse 60% 50% at 88% 78%, rgba(180, 120, 20, 0.18), transparent 60%),
    url("/static/images/auth-ribbon-bg.jpg") center / cover no-repeat,
    #050508;
  filter: saturate(1.15) contrast(1.05);
  transform: scale(1.02);
  animation: authRibbonDrift 22s ease-in-out infinite alternate;
  pointer-events: none;
}

.auth-ribbon-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(245, 213, 106, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(5, 5, 8, 0.15), rgba(5, 5, 8, 0.72));
  pointer-events: none;
}

.auth-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

@keyframes authRibbonDrift {
  from { transform: scale(1.02) translate3d(-1%, 0, 0); }
  to { transform: scale(1.06) translate3d(1.5%, -1%, 0); }
}

.auth-grid {
  display: none;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  z-index: 1;
  animation: authOrbFloat 14s ease-in-out infinite;
}

.auth-orb-a {
  width: min(460px, 72vw);
  height: min(460px, 72vw);
  top: 4%;
  inset-inline-start: -10%;
  background: radial-gradient(circle, rgba(245, 213, 106, 0.32), transparent 68%);
}

.auth-orb-b {
  width: min(420px, 68vw);
  height: min(420px, 68vw);
  bottom: 0;
  inset-inline-end: -8%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  animation-delay: -5s;
}

@keyframes authOrbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(14px, -20px, 0) scale(1.07); }
}

.auth-stage {
  position: relative;
  z-index: 3;
  width: min(460px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.auth-stage-single {
  grid-template-columns: 1fr;
  width: min(460px, 100%);
}

.auth-card.auth-card-xl,
.auth-card.auth-card-md {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 1.9rem 1.65rem 1.55rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(165deg, rgba(24, 24, 28, 0.72), rgba(10, 10, 14, 0.78));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(245, 213, 106, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  overflow: visible;
}

.auth-glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(165deg, rgba(22, 22, 28, 0.7), rgba(8, 8, 12, 0.82));
}

.auth-corner {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(245, 213, 106, 0.05));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 4;
}

.auth-corner-tl {
  top: -10px;
  inset-inline-start: -10px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  border-radius: 10px 0 0 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-corner-br {
  bottom: -10px;
  inset-inline-end: -10px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 10px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

html[dir="rtl"] .auth-corner-tl {
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  border-radius: 0 10px 0 0;
}

html[dir="rtl"] .auth-corner-br {
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  border-radius: 0 0 0 10px;
}

.auth-enter {
  animation: authCardIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-shell.is-morphing .auth-card {
  animation: authMorphOut 0.28s ease forwards;
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes authMorphOut {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    filter: blur(4px);
  }
}

.auth-brand-row {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.auth-brand-copy {
  min-width: 0;
}

.auth-brand-name {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 213, 106, 0.85);
  font-weight: 600;
}

.auth-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
  background: #0a0a0a;
  box-shadow:
    0 10px 26px rgba(234, 179, 8, 0.35),
    0 0 0 1px rgba(245, 213, 106, 0.35);
}

.auth-mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
}

.auth-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  font-weight: 760;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-title-lead {
  color: #fff;
}

.auth-title-accent {
  color: #f5d56a;
  background: linear-gradient(135deg, #ffe9a8, #eab308 55%, #ca8a04);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.auth-card h1:not(.auth-title) {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  color: #fff6d8;
}

.auth-card .subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  line-height: 1.55;
}

.auth-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
}

.auth-step {
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
}

.auth-step.active {
  color: #f5d56a;
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.1);
}

.auth-shell .method-tabs {
  background: rgba(0, 0, 0, 0.38);
  padding: 0.28rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.28rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
}

.auth-shell .method-tab {
  border: 0;
  border-radius: 11px;
  padding: 0.72rem 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-shell .method-tab:hover {
  color: #fff;
}

.auth-shell .method-tab.active {
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.24), rgba(234, 179, 8, 0.1));
  color: #f8e7a0;
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.38);
}

.auth-shell .form-group {
  margin-bottom: 0.95rem;
}

.auth-shell .form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 560;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.label-row label {
  margin-bottom: 0;
}

.auth-inline-link {
  font-size: 0.8rem;
  color: #f0c84a;
  text-decoration: none;
  font-weight: 560;
}

.auth-inline-link:hover {
  text-decoration: underline;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell .input-ico {
  position: absolute;
  inset-inline-start: 0.9rem;
  color: rgba(245, 213, 106, 0.78);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.auth-shell .form-control {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  padding: 0.88rem 0.95rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

.auth-shell .form-control::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.auth-shell .input-shell .input-ico + .form-control {
  padding-inline-start: 2.65rem;
}

.auth-shell .form-control.has-toggle {
  padding-inline-end: 4.3rem;
}

.auth-shell .form-control:hover {
  border-color: rgba(245, 213, 106, 0.28);
}

.auth-shell .form-control:focus {
  outline: none;
  border-color: rgba(234, 179, 8, 0.78);
  box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.16);
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.pw-toggle {
  position: absolute;
  inset-inline-end: 0.45rem;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  z-index: 1;
}

.pw-toggle:hover {
  color: #fff;
  background: rgba(234, 179, 8, 0.16);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.req-hint {
  color: rgba(245, 213, 106, 0.75);
  font-size: 0.75rem;
  font-weight: 500;
}

.auth-note {
  margin: 0.15rem 0 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
}

.btn-auth-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  margin-top: 0.4rem;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #ffe08a, #f5d56a 28%, #eab308 58%, #ca8a04);
  color: #1a1405;
  box-shadow:
    0 14px 34px rgba(234, 179, 8, 0.34),
    0 0 0 1px rgba(255, 236, 170, 0.25) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  cursor: pointer;
  font-family: inherit;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(234, 179, 8, 0.42);
  filter: brightness(1.05);
}

.btn-auth-submit:active {
  transform: translateY(1px);
}

.btn-auth-arrow {
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.9;
}

html[dir="ltr"] .btn-auth-arrow {
  transform: scaleX(-1);
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.38) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: authShine 3.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes authShine {
  0%, 55%, 100% { transform: translateX(-120%); }
  70% { transform: translateX(120%); }
}

.otp-label {
  display: block;
  margin-bottom: 0.65rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  direction: ltr;
}

.otp-digit {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.15;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  caret-color: #eab308;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease, background 0.2s ease, color 0.2s ease;
}

.otp-digit.is-filled {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.08);
  transform: translateY(-1px);
}

.otp-digit:focus {
  outline: none;
  border-color: rgba(234, 179, 8, 0.9);
  box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.16);
  transform: translateY(-2px) scale(1.04);
  background: rgba(0, 0, 0, 0.55);
}

.otp-boxes.otp-error .otp-digit {
  border-color: rgba(255, 107, 107, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14);
  color: #ffb4b4;
}

.otp-boxes.otp-success .otp-digit {
  border-color: rgba(61, 220, 151, 0.9);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.16);
  background: rgba(61, 220, 151, 0.1);
  color: #b8ffe0;
  animation: otpDigitSuccess 0.42s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.otp-boxes.otp-success .otp-digit:nth-child(1) { animation-delay: 0ms; }
.otp-boxes.otp-success .otp-digit:nth-child(2) { animation-delay: 70ms; }
.otp-boxes.otp-success .otp-digit:nth-child(3) { animation-delay: 140ms; }
.otp-boxes.otp-success .otp-digit:nth-child(4) { animation-delay: 210ms; }
.otp-boxes.otp-success .otp-digit:nth-child(5) { animation-delay: 280ms; }
.otp-boxes.otp-success .otp-digit:nth-child(6) { animation-delay: 350ms; }

.otp-boxes.otp-shake {
  animation: otpShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes otpShake {
  0%, 100% { transform: translateX(0); }
  12% { transform: translateX(-10px); }
  24% { transform: translateX(10px); }
  36% { transform: translateX(-8px); }
  48% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  72% { transform: translateX(5px); }
  84% { transform: translateX(-2px); }
}

@keyframes otpDigitSuccess {
  0% { transform: scale(0.85); }
  55% { transform: scale(1.14); }
  100% {
    transform: scale(1);
    border-color: rgba(61, 220, 151, 0.95);
    background: rgba(61, 220, 151, 0.14);
    color: #b8ffe0;
  }
}

.otp-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 8, 0.72);
  backdrop-filter: blur(8px);
  animation: authFlashIn 0.28s ease both;
}

.otp-success-overlay[hidden] {
  display: none !important;
}

.otp-success-card {
  text-align: center;
  padding: 1.5rem 1.75rem;
}

.otp-success-ring {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(61, 220, 151, 0.85);
  background: radial-gradient(circle at 35% 30%, rgba(61, 220, 151, 0.28), rgba(0, 0, 0, 0.35));
  box-shadow: 0 0 32px rgba(61, 220, 151, 0.28);
  animation: otpDigitPop 0.5s ease both;
}

@keyframes otpDigitPop {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.otp-success-check {
  font-size: 2.2rem;
  color: #3ddc97;
  font-weight: 800;
  line-height: 1;
}

.otp-success-text {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.btn-auth-submit.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.otp-boxes.otp-verifying .otp-digit {
  animation: otpVerifyPulse 0.72s ease-in-out infinite;
}
.otp-boxes.otp-verifying .otp-digit:nth-child(1) { animation-delay: 0ms; }
.otp-boxes.otp-verifying .otp-digit:nth-child(2) { animation-delay: 90ms; }
.otp-boxes.otp-verifying .otp-digit:nth-child(3) { animation-delay: 180ms; }
.otp-boxes.otp-verifying .otp-digit:nth-child(4) { animation-delay: 270ms; }
.otp-boxes.otp-verifying .otp-digit:nth-child(5) { animation-delay: 360ms; }
.otp-boxes.otp-verifying .otp-digit:nth-child(6) { animation-delay: 450ms; }

@keyframes otpVerifyPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    border-color: rgba(234, 179, 8, 0.35);
    box-shadow: none;
  }
  50% {
    transform: translateY(-3px) scale(1.06);
    border-color: rgba(250, 204, 21, 0.95);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18);
    background: rgba(234, 179, 8, 0.14);
  }
}

.otp-digit.otp-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #3ddc97;
  background: rgba(61, 220, 151, 0.14);
  border-radius: inherit;
}

.auth-resend {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
}

.auth-resend .btn.is-cooldown,
.auth-resend .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-shell .auth-footer {
  margin-top: 1.35rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.auth-footer-muted {
  margin-inline-end: 0.35rem;
}

.auth-shell .auth-footer a,
.auth-footer-accent {
  color: #f5d56a;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(245, 213, 106, 0.45);
  padding-bottom: 1px;
}

.auth-shell .auth-footer a:hover,
.auth-footer-accent:hover {
  color: #ffe08a;
  border-bottom-color: rgba(255, 224, 138, 0.85);
}

.auth-shell .flash,
.auth-shell .form-errors {
  border-radius: 12px;
  animation: authFlashIn 0.35s ease both;
}

.auth-shell .form-errors {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffb4b4;
}

.auth-shell .flash.error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffb4b4;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
}

.auth-shell .flash.success,
.auth-shell .flash.info {
  background: rgba(61, 220, 151, 0.1);
  border: 1px solid rgba(61, 220, 151, 0.35);
  color: #b8ffe0;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
}

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

.otp-copy-panel {
  text-align: center;
  margin: 0.5rem 0 1rem;
}

.otp-copy-code {
  display: inline-block;
  margin: 0.35rem auto 1rem;
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  border: 1px dashed rgba(234, 179, 8, 0.7);
  background: rgba(0, 0, 0, 0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #fff;
  direction: ltr;
  cursor: pointer;
  user-select: all;
  -webkit-user-select: all;
}

.otp-copy-code:focus {
  outline: 2px solid rgba(234, 179, 8, 0.55);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 1.15rem 0.75rem 2rem;
    align-items: flex-start;
  }

  .auth-card.auth-card-xl,
  .auth-card.auth-card-md {
    padding: 1.3rem 1.05rem 1.15rem;
    border-radius: 18px;
  }

  .auth-corner {
    width: 42px;
    height: 42px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .otp-boxes {
    gap: 0.3rem;
  }

  .otp-digit {
    font-size: 1.15rem;
  }

  .auth-title {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-orb,
  .auth-ribbon,
  .auth-enter,
  .btn-shine,
  .auth-shell .flash,
  .otp-boxes.otp-shake,
  .otp-boxes.otp-verifying .otp-digit,
  .otp-boxes.otp-success .otp-digit,
  .otp-success-ring {
    animation: none !important;
  }
}


/* —— Single-card login↔register switch (V7) —— */
.auth-switch-viewport {
  position: relative;
  display: grid;
  width: 100%;
}

.auth-panel {
  grid-area: 1 / 1;
  width: 100%;
  transform-origin: center top;
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-card.is-switching {
  pointer-events: none;
}

.auth-panel.is-leave {
  display: block !important;
  animation: authPanelLeave 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.auth-panel.is-enter {
  display: block !important;
  animation: authPanelEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes authPanelLeave {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-14px) scale(0.96); filter: blur(4px); }
}

@keyframes authPanelEnter {
  0% { opacity: 0; transform: translateY(18px) scale(0.96); filter: blur(5px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.auth-card.is-switching-punch {
  animation: authCardPunch 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authCardPunch {
  0% { transform: scale(1); }
  40% { transform: scale(0.985); }
  100% { transform: scale(1); }
}

.auth-title.is-swap .auth-title-lead,
.auth-title.is-swap .auth-title-accent,
.subtitle.is-swap {
  animation: authTextFlash 0.42s ease;
}

@keyframes authTextFlash {
  0%, 100% { opacity: 1; filter: blur(0); }
  45% { opacity: 0.15; filter: blur(2px); }
}

button.auth-switch-btn,
.auth-switch-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: #f5d56a;
  font-weight: 700;
  border-bottom: 1px solid rgba(245, 213, 106, 0.45);
  padding-bottom: 1px;
}

button.auth-switch-btn:hover,
.auth-switch-btn:hover {
  color: #ffe08a;
  border-bottom-color: rgba(255, 224, 138, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel.is-leave,
  .auth-panel.is-enter,
  .auth-card.is-switching-punch,
  .auth-title.is-swap .auth-title-lead,
  .auth-title.is-swap .auth-title-accent,
  .subtitle.is-swap {
    animation: none !important;
  }
}
