* {
  box-sizing: border-box;
}

body.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: #fff;
  color: #111;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 3rem, 1160px);
  min-height: 5.5rem;
  margin-inline: auto;
}

.auth-header > a {
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.auth-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1.5rem;
}

.auth-header nav a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-header nav a:hover,
.auth-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.auth-main {
  display: grid;
  flex: 1;
  place-items: center;
  width: 100%;
  padding: 1.5rem 1.5rem 2rem;
}

.auth-panel {
  width: min(100%, 28rem);
  text-align: center;
}

h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.auth-form,
input {
  width: 100%;
  min-width: 0;
}

.form-field {
  margin-bottom: 1.15rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  font-weight: 650;
}

input {
  display: block;
  min-height: 3.15rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #999;
  border-radius: 0.7rem;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 1rem;
  text-align: center;
}

input:hover {
  border-color: #555;
}

input:focus-visible {
  border-color: #111;
  outline: 2px solid #111;
  outline-offset: 2px;
}

.auth-form button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 1rem;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: opacity 180ms ease;
}

.auth-form button[type="submit"]:hover {
  opacity: 0.82;
}

.auth-form button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.6;
}

.auth-feedback {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
}

.auth-feedback:empty {
  display: none;
}

.auth-switch {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  text-align: center;
}

.auth-switch a {
  font-weight: 650;
}

@media (max-width: 600px) {
  .auth-header {
    align-items: flex-start;
    width: min(100% - 2rem, 1160px);
    min-height: 0;
    padding-block: 1.2rem;
  }

  .auth-main {
    padding: 1.8rem 1rem 3rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .auth-form button[type="submit"] {
    transition: none;
  }
}
