.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 82% 16%, rgba(215, 183, 82, 0.22), transparent 25rem),
    var(--cream);
}

.auth-header,
.auth-footer {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.auth-header {
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

.auth-brand img {
  width: clamp(142px, 15vw, 194px);
  height: auto;
}

.auth-back {
  padding-block: 10px;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  font-weight: 700;
}

.auth-main {
  width: min(100% - (var(--gutter) * 2), 660px);
  margin-inline: auto;
  padding-block: clamp(56px, 9vw, 120px);
}

.auth-card {
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 80px rgba(2, 10, 10, 0.08);
  backdrop-filter: blur(12px);
}

.auth-card__intro {
  margin-bottom: 40px;
}

.auth-eyebrow {
  margin-bottom: 18px;
  color: rgba(2, 10, 10, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-card h1 {
  max-width: 500px;
  margin-bottom: 18px;
  font-family: "Ordinar", Georgia, serif;
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 200;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.auth-card__intro > p:last-child {
  max-width: 510px;
  color: var(--ink-soft);
}

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

.auth-form[hidden],
.auth-message[hidden] {
  display: none;
}

.auth-field {
  display: grid;
  gap: 9px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(2, 10, 10, 0.3);
  border-radius: 0;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(215, 183, 82, 0.28);
}

.auth-field input[aria-invalid="true"] {
  border-color: #a8202d;
}

.auth-field small {
  color: rgba(2, 10, 10, 0.62);
  font-size: 12px;
}

.auth-code {
  font-size: 24px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.36em;
}

.auth-submit {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 20px;
  border: 1px solid var(--ink);
  color: var(--white);
  background: var(--ink);
  cursor: pointer;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease;
}

.auth-submit:hover:not(:disabled) {
  color: var(--ink);
  background: transparent;
}

.auth-submit:disabled,
.auth-secondary-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.auth-message {
  margin-bottom: 20px;
  padding: 13px 15px;
  border-left: 3px solid currentColor;
  font-size: 14px;
}

.auth-message--error {
  color: #7e1822;
  background: #f9e8e8;
}

.auth-sent {
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-sent strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.auth-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
}

.auth-secondary-actions button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-footer {
  min-height: 72px;
  border-top: 1px solid var(--line);
  color: rgba(2, 10, 10, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .auth-header {
    min-height: 76px;
  }

  .auth-back {
    font-size: 0;
  }

  .auth-back span {
    font-size: 18px;
  }

  .auth-main {
    width: 100%;
    padding: 0;
  }

  .auth-card {
    min-height: 65vh;
    border-inline: 0;
    box-shadow: none;
  }

  .auth-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}

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