:root {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: #18181b;
  background: #fafafa;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(180deg, rgb(244 244 245 / 70%), transparent 38%),
    #fafafa;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(31 77 70 / 18%);
  outline-offset: 2px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(100%, 520px);
  padding: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 50px rgb(24 24 27 / 5%);
  animation: auth-enter 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #18181b;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.buddy-eye {
  fill: currentColor;
  stroke: none;
}

.auth-heading {
  margin: 30px 0 24px;
}

.auth-kicker {
  margin: 0 0 8px;
  color: #1f4d46;
  font-size: 12px;
  font-weight: 650;
}

.auth-heading h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.auth-heading > p:last-child {
  margin: 9px 0 0;
  color: #71717a;
  font-size: 13px;
  line-height: 1.6;
}

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

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

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #3f3f46;
  font-size: 12px;
  font-weight: 600;
}

label small {
  color: #a1a1aa;
  font-weight: 400;
}

input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  color: #18181b;
  background: #fff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

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

input:focus {
  border-color: #1f4d46;
  outline: 0;
  box-shadow: 0 0 0 3px rgb(31 77 70 / 10%);
}

.primary-button {
  height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #18181b;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.primary-button:hover {
  background: #09090b;
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-switch,
.password-hint {
  margin: -2px 0 0;
  color: #71717a;
  font-size: 12px;
  line-height: 1.6;
}

.auth-switch {
  text-align: center;
}

.auth-switch a {
  color: #1f4d46;
  font-weight: 600;
  text-underline-offset: 3px;
}

.auth-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 12px;
  line-height: 1.5;
}

.auth-footnote {
  margin: 18px 0 0;
  color: #a1a1aa;
  font-size: 11px;
  text-align: center;
}

@keyframes auth-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .auth-shell {
    align-items: start;
    padding: 18px 12px 30px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 12px;
  }

  .auth-heading {
    margin: 24px 0 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
