.auth-page {
  --auth-panel: rgba(15, 27, 50, 0.94);
  --auth-border: rgba(148, 163, 184, 0.16);
  --auth-border-strong: rgba(148, 163, 184, 0.26);
  --auth-text: hsl(var(--foreground));
  --auth-muted: hsl(var(--foreground-soft));
  --auth-faint: hsl(var(--foreground-faint));
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 2.5rem);
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(245, 158, 11, 0.12), transparent 26rem),
    linear-gradient(145deg, rgba(5, 13, 29, 0.3), rgba(7, 18, 38, 0.78));
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.auth-glow {
  position: fixed;
  z-index: -1;
  width: min(42vw, 38rem);
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.18;
}

.auth-glow--blue {
  top: -18rem;
  left: -10rem;
  background: #3b82f6;
}

.auth-glow--amber {
  right: -12rem;
  bottom: -20rem;
  background: #f59e0b;
}

.auth-home-link {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--auth-border);
  border-radius: 0.9rem;
  color: var(--auth-muted);
  background: rgba(8, 18, 36, 0.72);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-home-link:hover {
  color: var(--auth-text);
  border-color: var(--auth-border-strong);
  background: rgba(18, 33, 59, 0.88);
  transform: translateY(-1px);
}

.auth-home-link svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.auth-shell {
  width: min(100%, 61rem);
  display: grid;
  grid-template-columns: minmax(17rem, 0.92fr) minmax(26rem, 1.08fr);
  position: relative;
  border: 1px solid var(--auth-border);
  border-radius: 1.75rem;
  overflow: hidden;
  background: rgba(9, 19, 38, 0.76);
  box-shadow:
    0 34px 90px rgba(2, 6, 23, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.auth-shell--register {
  width: min(100%, 68rem);
  grid-template-columns: minmax(17rem, 0.85fr) minmax(31rem, 1.15fr);
}

.auth-story {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 3.25rem);
  overflow: hidden;
  border-right: 1px solid var(--auth-border);
  background:
    linear-gradient(165deg, rgba(36, 59, 100, 0.74), rgba(11, 25, 49, 0.92)),
    radial-gradient(circle at 25% 10%, rgba(96, 165, 250, 0.26), transparent 48%);
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-story::before {
  width: 19rem;
  height: 19rem;
  top: -9rem;
  right: -9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3.2rem rgba(255, 255, 255, 0.025);
}

.auth-story::after {
  width: 12rem;
  height: 12rem;
  right: -4rem;
  bottom: -5rem;
  background: rgba(245, 158, 11, 0.08);
  filter: blur(4px);
}

.auth-brand,
.auth-story__content,
.auth-story__footer {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--auth-text);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.auth-brand__mark {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  color: #14213b;
  background: var(--button-gradient-theme);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-brand__mark svg {
  width: 1.3rem;
  height: 1.3rem;
}

.auth-story__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: hsl(var(--primary-soft));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-story__eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
}

.auth-story__title {
  max-width: 19rem;
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.auth-story__copy {
  max-width: 21rem;
  margin: 1rem 0 0;
  color: var(--auth-muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.auth-story__benefits {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.auth-story__benefits li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--auth-muted);
  font-size: 0.78rem;
}

.auth-story__benefits span {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.auth-story__benefits svg {
  width: 0.8rem;
  height: 0.8rem;
}

.auth-story__footer {
  color: var(--auth-faint);
  font-size: 0.72rem;
}

.auth-panel {
  min-width: 0;
  position: relative;
  padding: clamp(2rem, 4vw, 3rem);
  background:
    linear-gradient(155deg, rgba(25, 40, 68, 0.8), var(--auth-panel)),
    radial-gradient(circle at 100% 0, rgba(96, 165, 250, 0.08), transparent 40%);
}

.auth-shell--register .auth-panel {
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
}

.auth-panel__header {
  margin-bottom: 1.5rem;
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: auto !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.auth-panel__title {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.auth-panel__subtitle {
  margin: 0.55rem 0 0;
  color: var(--auth-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  position: relative;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  font-size: 0.76rem;
  line-height: 1.55;
}

.auth-alert > svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 0.12rem;
}

.auth-alert--info {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.09);
}

.auth-alert--error {
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.1);
}

.auth-alert__close {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  flex: none;
  margin: -0.15rem -0.15rem 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  color: inherit;
  background: transparent;
  opacity: 0.65;
  cursor: pointer;
}

.auth-alert__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.auth-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.auth-label {
  color: var(--auth-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.auth-label span {
  color: var(--auth-faint);
  font-weight: 500;
}

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

.auth-input-icon {
  position: absolute;
  left: 0.9rem;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  color: var(--auth-faint);
  pointer-events: none;
}

.auth-input {
  width: 100% !important;
  height: 2.85rem !important;
  padding: 0 2.75rem 0 2.7rem !important;
  border: 1px solid var(--auth-border) !important;
  border-radius: 0.82rem !important;
  outline: 0 !important;
  color: var(--auth-text) !important;
  background: linear-gradient(180deg, rgba(13, 25, 46, 0.9), rgba(8, 18, 35, 0.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
  font-size: 0.84rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.auth-input::placeholder {
  color: var(--auth-faint) !important;
}

.auth-input:hover {
  border-color: var(--auth-border-strong) !important;
}

.auth-input:focus {
  border-color: rgba(96, 165, 250, 0.58) !important;
  background: rgba(13, 27, 50, 0.98) !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.11) !important;
}

.auth-input-toggle {
  position: absolute;
  right: 0.65rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  color: var(--auth-faint);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.auth-input-toggle:hover,
.auth-input-toggle:focus-visible {
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.05);
}

.auth-eye-icon {
  width: 1rem;
  height: 1rem;
}

.auth-field-error {
  min-height: 0.9rem;
  color: #f87171;
  font-size: 0.7rem;
  line-height: 1.25;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--auth-muted);
  font-size: 0.78rem;
  line-height: 1.55;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}

.auth-terms {
  align-items: flex-start;
}

.auth-terms .auth-checkbox {
  margin-top: 0.17rem;
}

.auth-link,
.auth-link--highlight {
  color: var(--auth-muted);
  font-size: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--auth-text);
}

.auth-link--highlight {
  color: hsl(var(--primary));
  font-weight: 750;
}

.auth-link--highlight:hover {
  color: hsl(var(--primary-soft));
}

.auth-wa-prefix {
  position: absolute;
  left: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.85rem;
  padding: 0 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.auth-wa-flag {
  display: inline-flex;
  overflow: hidden;
  border-radius: 0.15rem;
  line-height: 0;
}

.auth-wa-code {
  color: var(--auth-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.auth-input--wa {
  padding-left: 5.25rem !important;
}

.auth-captcha-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.auth-captcha-box {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  border-radius: 0.65rem;
}

.auth-captcha-reset {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 1px solid var(--auth-border);
  border-radius: 0.75rem;
  color: hsl(var(--primary));
  background: rgba(14, 27, 49, 0.8);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-captcha-reset:hover {
  color: hsl(var(--primary-soft));
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  transform: rotate(45deg);
}

.auth-captcha-reset svg {
  width: 1rem;
  height: 1rem;
}

.auth-btn-submit,
.auth-btn-google {
  width: 100%;
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 0.82rem;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.auth-btn-submit {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 216, 120, 0.3);
  color: #13213a !important;
  background: var(--button-gradient-theme) !important;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.auth-btn-submit::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 55%);
  pointer-events: none;
}

.auth-btn-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-btn-submit svg,
.auth-btn-google svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

.auth-btn-google {
  border: 1px solid var(--auth-border);
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.025);
}

.auth-btn-google:hover {
  color: var(--auth-text);
  border-color: var(--auth-border-strong);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.2rem 0;
  color: var(--auth-faint);
  font-size: 0.72rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--auth-border);
}

.auth-footer-text {
  margin: 1.25rem 0 0;
  color: var(--auth-muted);
  text-align: center;
  font-size: 0.78rem;
}

@media (max-width: 860px) {
  .auth-page {
    overflow-y: auto;
    padding-top: 4.75rem;
    padding-bottom: 5.5rem;
  }

  .auth-shell,
  .auth-shell--register {
    width: min(100%, 34rem);
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    padding: clamp(1.5rem, 6vw, 2.5rem);
  }
}

@media (max-width: 560px) {
  .auth-page {
    display: block;
    padding: 4.5rem 0.75rem 5.25rem;
  }

  .auth-home-link {
    min-height: 2.5rem;
    padding-inline: 0.75rem;
  }

  .auth-home-link span {
    display: none;
  }

  .auth-shell,
  .auth-shell--register {
    border-radius: 1.25rem;
  }

  .auth-panel,
  .auth-shell--register .auth-panel {
    padding: 1.45rem 1.15rem 1.35rem;
  }

  .auth-panel__header {
    margin-bottom: 1.25rem;
  }

  .auth-panel__title {
    font-size: 1.5rem;
  }

  .auth-grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .auth-row {
    align-items: flex-start;
  }

  .auth-alert {
    font-size: 0.72rem;
  }

  .auth-captcha-row {
    align-items: flex-start;
  }

  .auth-captcha-box {
    height: 70px;
  }

  .auth-captcha-box .g-recaptcha {
    transform: scale(0.9);
    transform-origin: left top;
  }
}

@media (max-width: 360px) {
  .auth-page {
    padding-inline: 0.5rem;
  }

  .auth-panel,
  .auth-shell--register .auth-panel {
    padding-inline: 0.95rem;
  }

  .auth-captcha-box {
    height: 66px;
  }

  .auth-captcha-box .g-recaptcha {
    transform: scale(0.84);
  }

  .auth-row {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
