.auth-page {
  display: flex;
  flex-direction: column;
}

.auth-main {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6.5rem) 0;
  background: radial-gradient(circle at 12% 20%, rgba(126, 166, 111, 0.18), transparent 28rem), radial-gradient(circle at 88% 80%, rgba(184, 120, 67, 0.12), transparent 25rem), var(--ivory-100);
}

.auth-main::before {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: linear-gradient(120deg, transparent 48%, rgba(77, 116, 89, 0.11) 49%, transparent 50%), linear-gradient(60deg, transparent 48%, rgba(77, 116, 89, 0.07) 49%, transparent 50%);
  background-size: 92px 92px;
  mask-image: linear-gradient(to right, black, transparent 48%, black);
  pointer-events: none;
  content: '';
}

.auth-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}

.auth-intro {
  max-width: 650px;
}

.auth-eyebrow,
.auth-kicker {
  color: var(--moss-600);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-intro h1 {
  max-width: 10ch;
  margin: 1rem 0 1.25rem;
  color: var(--forest-900);
  font-family: 'Source Serif 4', serif;
  font-size: clamp(3.4rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.auth-intro p {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.auth-motif {
  display: flex;
  width: min(100%, 410px);
  height: 76px;
  align-items: end;
  gap: 0.65rem;
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.auth-motif span {
  display: block;
  width: 100%;
  border-radius: 999px 999px 5px 5px;
  background: var(--forest-800);
}

.auth-motif span:nth-child(1) {
  height: 35%;
  opacity: 0.45;
}
.auth-motif span:nth-child(2) {
  height: 65%;
  opacity: 0.65;
}
.auth-motif span:nth-child(3) {
  height: 100%;
  background: var(--larch-500);
}
.auth-motif span:nth-child(4) {
  height: 72%;
  opacity: 0.72;
}
.auth-motif span:nth-child(5) {
  height: 45%;
  opacity: 0.5;
}

.auth-card {
  padding: clamp(1.6rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(251, 250, 245, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.auth-card-heading h2 {
  margin: 0.45rem 0 0;
  color: var(--forest-900);
  font-family: 'Source Serif 4', serif;
  font-size: clamp(2.35rem, 4vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.auth-card-heading p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-form {
  display: grid;
  gap: 1.15rem;
  margin-top: 2rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field label {
  color: var(--forest-800);
  font-size: 0.83rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-field input:hover {
  border-color: rgba(20, 32, 25, 0.3);
}

.auth-field input:focus {
  border-color: var(--moss-600);
  box-shadow: 0 0 0 4px rgba(77, 116, 89, 0.13);
}

.auth-alert {
  padding: 0.8rem 0.95rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert--error {
  border-color: rgba(146, 48, 48, 0.28);
  background: rgba(146, 48, 48, 0.08);
  color: #772b2b;
}

.auth-alert--success {
  border-color: rgba(36, 82, 63, 0.25);
  background: rgba(126, 166, 111, 0.13);
  color: var(--forest-800);
}

.auth-submit {
  min-height: 52px;
  margin-top: 0.15rem;
  padding: 0.78rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--forest-900);
  box-shadow: 0 10px 24px rgba(16, 35, 28, 0.16);
  color: var(--ivory-50);
  font: inherit;
  font-weight: 700;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
  background: var(--forest-700);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-switch {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.auth-switch a {
  color: var(--forest-700);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(36, 82, 63, 0.3);
  text-underline-offset: 3px;
}

@media (max-width: 899.98px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .auth-intro {
    max-width: 720px;
  }

  .auth-intro h1 {
    max-width: 12ch;
    font-size: clamp(3.2rem, 10vw, 5.5rem);
  }

  .auth-motif {
    height: 58px;
    margin-top: 2rem;
  }

  .auth-card {
    width: min(100%, 620px);
  }
}

@media (max-width: 479.98px) {
  .auth-main {
    padding: 2.75rem 0 4rem;
  }

  .auth-intro h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
    overflow-wrap: anywhere;
  }

  .auth-motif {
    display: none;
  }

  .auth-card {
    padding: 1.4rem;
    border-radius: var(--radius-md);
  }

  .auth-form {
    margin-top: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit,
  .auth-field input {
    transition: none;
  }
}
