body.auth-neural {
  background: #050505 !important;
  background-image: none !important;
  color: #334155;
}

body.auth-neural h1,
body.auth-neural h2,
body.auth-neural h3,
body.auth-neural h4,
body.auth-neural h5,
body.auth-neural h6 {
  color: #0f172a;
}

body.auth-neural .plane-layer {
  display: none;
}

#neural-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.auth-neural-shell {
  position: relative;
  z-index: 1;
}

@keyframes auth-card-drop {
  0% {
    opacity: 0;
    transform: translateY(-140px) scale(0.88);
  }
  55% {
    opacity: 1;
    transform: translateY(22px) scale(1.03);
  }
  75% {
    transform: translateY(-12px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-letter-fall {
  0% {
    opacity: 0;
    transform: translateY(-120px) rotate(-28deg) scale(0.45);
    filter: blur(6px);
  }
  58% {
    opacity: 1;
    transform: translateY(16px) rotate(6deg) scale(1.12);
    filter: blur(0);
  }
  76% {
    transform: translateY(-8px) rotate(-3deg) scale(0.96);
  }
  88% {
    transform: translateY(3px) rotate(1deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
    filter: blur(0);
  }
}

@keyframes auth-block-drop {
  0% {
    opacity: 0;
    transform: translateY(-48px);
  }
  60% {
    opacity: 1;
    transform: translateY(10px);
  }
  80% {
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  position: relative;
  opacity: 0;
  animation: auth-card-drop 1s cubic-bezier(0.18, 1.35, 0.3, 1) both;
  overflow: visible;
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(245, 239, 230, 0.97) 100%);
  border: 1px solid rgba(201, 162, 39, 0.38);
  color: #1c1917;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(201, 162, 39, 0.1);
}

.auth-card-top {
  position: relative;
  margin: 0 -1rem 1.15rem;
  border-top-left-radius: 1.05rem;
  border-top-right-radius: 1.05rem;
  overflow: hidden;
  background: rgba(236, 228, 214, 0.72);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.auth-card-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1;
  background: linear-gradient(
    90deg,
    #a68523 0%,
    #e8d48b 45%,
    #c9a227 100%
  );
  pointer-events: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  background: transparent;
}

.auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7a7165;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.auth-tab:hover {
  color: #1c1917;
  background: rgba(232, 212, 139, 0.18);
}

.auth-tab.is-active {
  color: #1c1917;
  background: rgba(255, 252, 246, 0.95);
  border-bottom-color: #c9a227;
}

.auth-header {
  text-align: center;
  padding: 0.15rem 0 1.05rem;
}

.auth-brand-rule {
  display: block;
  width: 2.75rem;
  height: 1px;
  margin: 0.7rem auto 0;
  background: linear-gradient(90deg, transparent, #c9a227, transparent);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.auth-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 20rem);
  border-radius: 1rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: linear-gradient(180deg, #fffcf6 0%, #f5efe6 100%);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  padding: 1.25rem 1.15rem 1.1rem;
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}

.auth-modal.is-open .auth-modal-panel {
  transform: translateY(0) scale(1);
}

.auth-modal-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1c1917;
}

.auth-modal-text {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #57534e;
}

.auth-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  width: 100%;
  border: 0;
  border-radius: 0.65rem;
  background: #0a0a0a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.auth-modal-btn:hover {
  background: #000;
}

.auth-letter-line {
  display: block;
  overflow: visible;
}

.auth-brand.auth-letter-line,
.auth-title.auth-letter-line,
.auth-subtitle.auth-letter-line {
  min-height: 1.15em;
}

.auth-letter {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity, filter;
  animation: auth-letter-fall 0.95s cubic-bezier(0.18, 1.4, 0.3, 1) both;
}

.auth-drop {
  opacity: 0;
  animation: auth-block-drop 0.65s cubic-bezier(0.22, 1.25, 0.36, 1) both;
  animation-delay: var(--auth-drop-delay, 0.9s);
}

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-drop,
  .auth-letter {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

.auth-phone-field {
  position: relative;
  z-index: 1;
}

.auth-drop:has(.auth-phone-field.is-open),
.auth-drop.auth-phone-open {
  position: relative;
  z-index: 60;
}

.auth-phone-field.is-open {
  z-index: 60;
}

.auth-dial-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  border: 0;
  border-right: 1px solid #e4d8c4;
  background: #f3ebe0;
  padding: 0 0.7rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #171717;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-dial-btn:hover {
  background: #e5ddd2;
}

.auth-dial-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.auth-dial-flag-img,
.auth-dial-option-flag {
  display: block;
  width: 1.35rem;
  height: 1rem;
  object-fit: cover;
  border-radius: 0.15rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.auth-dial-code {
  letter-spacing: 0.01em;
}

.auth-dial-chevron {
  width: 0.85rem;
  height: 0.85rem;
  color: #737373;
  transition: transform 0.18s ease;
}

.auth-phone-field.is-open .auth-dial-chevron {
  transform: rotate(180deg);
  color: #111111;
}

.auth-dial-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 70;
  width: min(100%, 18rem);
  max-height: 14rem;
  overflow-y: auto;
  border: 1px solid #e5e5e5;
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.auth-phone-field.is-open .auth-dial-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.auth-dial-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.auth-dial-option:hover,
.auth-dial-option.is-active {
  background: #f5f5f5;
}

.auth-dial-option-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #171717;
}

.auth-dial-option-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: #525252;
}
