.auth-page {
  min-height: 62vh;
  padding: 48px 0 72px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.auth-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(36px, 9vw, 50px);
  line-height: 0.98;
}

.auth-copy {
  margin: 12px 0 24px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

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

.auth-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 500;
}

.auth-field input:focus {
  border-color: var(--accent);
}

.auth-password-control {
  position: relative;
  display: block;
}

.auth-password-control input {
  padding-right: 48px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-soft);
}

.password-toggle-button {
  transform: translateY(-50%);
}

.password-toggle-button__icon {
  width: 18px;
  height: 18px;
}

.password-toggle-button__icon--hide,
.password-toggle-button.is-visible .password-toggle-button__icon--show {
  display: none;
}

.password-toggle-button.is-visible .password-toggle-button__icon--hide {
  display: block;
}

.auth-check {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-field small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.auth-form .errorlist {
  margin: 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-submit,
.auth-google,
.auth-secondary {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.auth-submit {
  border: 1px solid var(--accent);
  color: var(--accent-contrast);
  background: var(--accent);
}

.auth-submit:hover {
  background: var(--accent-hover);
}

.auth-divider {
  margin: 22px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.auth-google {
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #1f1f1f;
  background: #ffffff;
}

.auth-secondary {
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}

.auth-secondary:hover,
.auth-secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-soft);
}

.auth-actions {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.auth-inline-form {
  margin: 0;
}

.auth-inline-form .auth-secondary {
  width: 100%;
}

.auth-code-recipient {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.auth-field input[autocomplete="one-time-code"] {
  text-align: center;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}

.auth-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.auth-links a {
  color: var(--accent);
  font-weight: 700;
}

.auth-links a:hover {
  color: var(--accent-hover);
}

@media (max-width: 560px) {
  .auth-page {
    min-height: auto;
    padding: 28px 0 56px;
  }

  .auth-card {
    padding: 22px;
  }
}
