/* ==========================================================================
   Sign in, registration and password reset.

   Tokens, buttons and field styling come from main/css/theme.css; this file
   is only the shell around them, so the auth screens read as the same product
   as the landing page.
   ========================================================================== */

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: clamp(1.5rem, 5vw, 3.5rem);
  min-width: 0; /* a grid item otherwise floors at its content's min-content width */
}

/* the column that holds the messages and the card; a definite width here keeps
   the card centred, since intrinsic sizing inflates a shrink-to-fit wrapper */
.auth-panel {
  width: 452px;
  max-width: 100%;
  min-width: 0; /* flex items otherwise floor at their min-content width */
}

.auth-card {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.35rem);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: auth-rise 0.7s var(--ease) both;
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.auth-card h1 {
  font-size: clamp(1.5rem, 3.4vw, 1.9rem);
  letter-spacing: -0.03em;
}

.auth-note {
  margin-top: 0.65rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.auth-form {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.6rem;
}

.auth-form .btn {
  margin-top: 0.35rem;
}

/* the target-range band, reused as a quiet divider above the secondary links */
.auth-links {
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

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

.auth-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.messages {
  width: 100%;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.message {
  padding: 0.7rem 0.95rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.9rem;
}

.message.error {
  color: var(--danger);
  border-color: var(--danger);
}

.message.success {
  color: var(--range);
  border-color: var(--range);
}

.auth-footer {
  padding-block: 1.75rem;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.auth-footer p {
  max-width: 62ch;
}
