#auth-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(48, 91, 123, .95), transparent 36rem),
    linear-gradient(155deg, #1d4769 0%, #12314a 54%, #0d263d 100%);
  box-shadow: none;
}

#auth-modal[open] {
  display: grid;
  place-items: center;
}

#auth-modal::backdrop { background: #12314a; }

.auth-card {
  position: relative;
  z-index: 3;
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 20px 28px 22px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background: linear-gradient(180deg, #fff 0%, #fffdfa 100%);
  box-shadow: 0 40px 100px rgba(2, 13, 24, .52);
  opacity: 0;
  transform: translateY(64px) scale(.965);
}

#auth-modal[open] .auth-card {
  animation: auth-card-arrive .78s cubic-bezier(.16, 1.08, .3, 1) .82s forwards;
}

.auth-splash {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 260px;
  color: rgba(255,255,255,.72);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-splash img {
  position: relative;
  z-index: 2;
  display: block;
  width: 230px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.38));
  opacity: 0;
  transform: translateY(16px) scale(.9);
}

.auth-splash small {
  position: relative;
  z-index: 2;
  font: 700 13px "DM Sans", sans-serif;
  letter-spacing: .3px;
  opacity: 0;
}

#auth-modal[open] .auth-splash {
  animation: auth-splash-away .7s cubic-bezier(.16, 1, .3, 1) .78s forwards;
}

#auth-modal[open] .auth-splash img {
  animation: auth-logo-arrive .55s cubic-bezier(.2, .9, .25, 1.15) .08s forwards;
}

#auth-modal[open] .auth-splash small {
  animation: auth-tag-arrive .42s ease .32s forwards;
}

.auth-pulse {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 38%;
  width: 86px;
  height: 86px;
  border: 1.5px solid rgba(239, 146, 113, .62);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: auth-pulse-ring 2.3s ease-out infinite;
}

.auth-pulse-two { animation-delay: .75s; }
.auth-card .modal-close { z-index: 5; }
body.native-consumer.auth-locked #auth-modal .modal-close { display: none !important; }
.auth-card .auth-brand { justify-content: center; min-height: 46px; margin-right: 0; margin-bottom: 7px; }
.auth-card .auth-brand-logo { width: 142px; height: 50px; object-fit: contain; }
.auth-card .auth-tabs { grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
.auth-card .auth-panel h2 { margin: 5px 0 4px; }
.auth-card .auth-panel > p { margin-bottom: 12px; }
.auth-card .social-auth { gap: 7px; }
.auth-card .social-auth-button { min-height: 44px; }
.auth-card .social-auth-note { line-height: 1.25; }
.auth-card .auth-divider { margin-top: 0; }
.auth-card .auth-panel .stack-form label { margin-top: 8px; }
.auth-card .auth-panel input { min-height: 44px; }
.auth-login-tools { display: flex; justify-content: flex-end; margin: -2px 0 2px; }
.forgot-link {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #d65f45;
  font: 800 13px "DM Sans", sans-serif;
  cursor: pointer;
}
.forgot-link:hover { text-decoration: underline; }
.forgot-link:focus-visible { outline: 3px solid rgba(224,116,87,.25); outline-offset: 3px; }

/* Oturum yokken giriş çağrısı içerik altında tekrarlanmaz; ayarlar düğmesi kapıyı yeniden açar. */
.auth-locked .topbar { z-index: 93; }
.auth-locked .settings-button { display: grid !important; place-items: center; }
.auth-locked #auth-button { display: none; }

@keyframes auth-logo-arrive {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes auth-tag-arrive {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes auth-splash-away {
  to { opacity: 0; transform: translate(-50%, calc(-50% - 33vh)) scale(.62); visibility: hidden; }
}
@keyframes auth-card-arrive {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes auth-pulse-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.75); }
  15% { opacity: .55; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.4); }
}

@media (max-width: 560px) {
  .auth-card {
    width: calc(100vw - 22px);
    max-height: calc(100dvh - 22px);
    padding: 18px 20px 20px;
    border-radius: 25px;
  }
  .auth-card .auth-brand-logo { width: 130px; height: 46px; }
  .auth-card .auth-panel h2 { font-size: 24px; }
  .auth-splash img { width: 205px; }
}

@media (prefers-reduced-motion: reduce) {
  #auth-modal[open] .auth-card { animation: none; opacity: 1; transform: none; }
  #auth-modal[open] .auth-splash { display: none; animation: none; }
  .auth-pulse { animation: none; }
}
