/* Log in and sign up. A single centered card, nothing else competing. */

.auth-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  min-height: 100dvh;
  padding: var(--space-6) var(--space-4);
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, var(--accent-fill), transparent 70%),
    var(--bg);
}

.auth-brand {
  font-size: var(--text-lead);
}

.auth-card {
  width: min(100%, 26rem);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  margin: var(--space-2) 0;
  font-size: var(--text-h2);
}

.auth-intro {
  margin-bottom: var(--space-5);
  color: var(--text-muted);
  font-size: var(--text-small);
}

.auth-tabs {
  display: grid;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
  padding: var(--space-1);
  border-radius: var(--radius-md);
  background: var(--surface-inset);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-tab {
  padding: var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  font-size: var(--text-small);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  color: var(--text-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.auth-message {
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  background: var(--danger-fill);
  font-size: var(--text-small);
}

.auth-message.is-success {
  color: var(--up);
  background: var(--up-fill);
}

.auth-card .field-group small {
  color: var(--text-faint);
  font-size: var(--text-caption);
}

.auth-submit {
  width: 100%;
  margin-top: var(--space-5);
}

.two-factor-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-inset);
  cursor: pointer;
}

.two-factor-option input {
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
}

.two-factor-option strong {
  display: block;
  color: var(--text-strong);
  font-size: var(--text-small);
}

.two-factor-option small {
  color: var(--text-muted);
  font-size: var(--text-caption);
}

/* One code, six digits, spaced so they can be read back aloud. */
.otp-input {
  font-family: var(--font-data);
  font-size: var(--text-h2);
  letter-spacing: 0.4em;
  text-align: center;
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.text-action {
  border: 0;
  color: var(--accent-text);
  background: transparent;
  font-size: var(--text-small);
  text-decoration: none;
  cursor: pointer;
}

.text-action:hover {
  text-decoration: underline;
}

.auth-safety {
  max-width: 26rem;
  color: var(--text-faint);
  font-size: var(--text-caption);
  text-align: center;
}
