.auth-page {
  background:
    radial-gradient(90% 55% at 10% -10%, rgba(200, 255, 26, 0.18), transparent 50%),
    radial-gradient(70% 45% at 100% 0%, rgba(17, 17, 17, 0.05), transparent 45%),
    #f7f7f4;
}

.auth-main {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
}

.auth-stage {
  width: 100%;
  padding: 40px 0 56px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(17, 17, 17, 0.08);
}

.auth-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5c00;
}

.auth-card .legal-title {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 8px;
}

.auth-card .legal-lead {
  margin-bottom: 22px;
}

.auth-social {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
}

.auth-google,
.auth-apple {
  box-sizing: border-box;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(17, 17, 17, 0.12) !important;
  background: #fff !important;
  color: #111 !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.auth-apple {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

.auth-google:hover {
  background: #fafafa !important;
  border-color: rgba(17, 17, 17, 0.22) !important;
}

.auth-apple:hover {
  background: #222 !important;
  border-color: #222 !important;
}

.auth-google:active,
.auth-apple:active {
  transform: scale(0.99);
}

.auth-google:disabled,
.auth-apple:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-google-icon,
.auth-apple-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-google-icon svg,
.auth-apple-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

@media (max-width: 480px) {
  .auth-social {
    gap: 8px;
  }

  .auth-google,
  .auth-apple {
    min-height: 46px;
    padding: 0 8px;
    font-size: 12px;
    gap: 6px;
    border-radius: 12px;
  }

  .auth-google-icon,
  .auth-apple-icon {
    width: 14px;
    height: 14px;
  }

  .auth-google-icon svg,
  .auth-apple-icon svg {
    width: 14px;
    height: 14px;
  }
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #999;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

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

.auth-divider span {
  white-space: nowrap;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.auth-label-row .auth-label {
  margin-top: 0;
}

.auth-forgot {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-top: 8px;
}

.auth-input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #fff;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--primary);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-input:focus {
  border-color: rgba(17, 17, 17, 0.35);
  box-shadow: 0 0 0 4px rgba(200, 255, 26, 0.35);
}

.auth-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #c0392b;
  line-height: 1.4;
}

.auth-success {
  margin: 8px 0 0;
  font-size: 13px;
  color: #2e7d32;
  line-height: 1.4;
}

.auth-error[hidden],
.auth-success[hidden] {
  display: none !important;
}

.auth-submit {
  width: 100%;
  margin-top: 12px;
}

.auth-switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--secondary);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Quotes panel */

.auth-quotes {
  position: relative;
  min-height: 320px;
  padding: 36px 40px;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(200, 255, 26, 0.28), transparent 55%),
    #111;
  color: #fff;
  overflow: hidden;
}

.auth-quotes-kicker {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200, 255, 26, 0.9);
}

.auth-quote-stage {
  position: relative;
  min-height: 220px;
}

.auth-quote {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 380ms ease,
    transform 380ms ease,
    visibility 0s linear 380ms;
  pointer-events: none;
  z-index: 0;
}

.auth-quote.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 420ms ease,
    transform 420ms ease,
    visibility 0s linear 0s;
  pointer-events: auto;
  z-index: 1;
}

.auth-quote.is-measuring {
  position: relative !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
}

.auth-quote-text {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.4;
  max-width: 30ch;
}

.auth-quote-mark {
  color: #C8FF1A;
  font-weight: 700;
}

.auth-quote-mark--open {
  margin-right: 0.08em;
}

.auth-quote-mark--close {
  margin-left: 0.08em;
}

.auth-quote-meta {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

.auth-quote-dots {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  position: relative;
  z-index: 2;
}

.auth-quote-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.auth-quote-dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.auth-quote-dot.is-active {
  background: #C8FF1A;
  transform: scale(1.2);
}

@media (max-width: 991.98px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
  }

  .auth-quotes {
    width: 100%;
    max-width: 440px;
    min-height: 260px;
    padding: 28px 24px;
  }

  .auth-quote-stage {
    min-height: 170px;
  }

  .auth-quote-text {
    font-size: 20px;
  }
}

@media (max-width: 575.98px) {
  .auth-card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .auth-quotes {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-quote {
    transition: none;
  }
}

.auth-consents {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
  text-align: left;
}

.auth-consent-note {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--secondary, #666);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #444;
  cursor: pointer;
}

.auth-check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #111;
}

.auth-check a {
  color: #111;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.auth-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-consent-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
}

.auth-consent-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.2);
  padding: 28px 24px 22px;
}

.auth-consent-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.06);
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.auth-consent-modal-close:hover {
  background: rgba(17, 17, 17, 0.1);
}

.auth-consent-modal-close svg {
  width: 18px;
  height: 18px;
}

.auth-consent-modal-title {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #111;
}

.auth-consent-modal-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #555;
}

.auth-consent-modal .auth-consents {
  margin: 0 0 14px;
}

.auth-consent-modal-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-consent-modal .auth-error {
  margin-bottom: 10px;
}

body.auth-consent-open {
  overflow: hidden;
}
