/* Login screen (LMA-P1-AUTH) — docs/fsdd/design-guide/design-guide.md.
 * Tokens only, no hard-coded colors/sizes/spacing (DG-T1).
 * Mobile-first: base rules ARE the phone layout, one desktop adaptation
 * at 768px (DG-T7). */

.auth-screen {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-ink);
  min-height: 100dvh;
  padding: var(--space-12) var(--space-4) var(--space-4); /* DG-T2 gutters + top breathing room */
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* DG-T7: desktop is a distinct centered-card layout, not stretched mobile */
@media (min-width: 768px) {
  .auth-screen {
    align-items: center;
    justify-content: center;
    padding-top: var(--space-4);
  }

  .auth-card {
    width: 24rem;
  }
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
  padding: var(--space-4); /* DG-T2: default card padding */
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.auth-title {
  font-size: var(--text-xl); /* DG-T3: screen title */
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  margin: 0;
}

/* DG-S5 error block — danger color marks a real failure (DG-H5), and the
 * message text itself is the non-color signal (DG-T6). */
.auth-alert {
  background: var(--color-danger-tint);
  color: var(--color-danger);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-size: var(--text-sm);
  margin: 0;
}

.auth-notice {
  background: var(--color-success-tint);
  color: var(--color-success);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-size: var(--text-sm);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1); /* DG-T2: label-to-input gap */
}

.auth-field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-ink-muted); /* 5.6:1 — passes DG-X1 */
}

.auth-field input {
  font-family: var(--font-sans);
  font-size: var(--text-base); /* DG-X3: inputs >= 16px or iOS zooms on focus */
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  min-height: var(--tap-min); /* DG-X2: >= 44px touch target */
}

/* DG-H3 / DG-V7: the ONLY accent-filled control on the screen */
.auth-submit {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-ink);
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius-md);
  min-height: var(--tap-preferred); /* DG-X2: 48px preferred */
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
}

/* DG-X4: visible 2px focus ring with 2px offset on every interactive element
 * (the 2px values are mandated literally by the rule itself). */
.auth-screen input:focus-visible,
.auth-screen button:focus-visible,
.auth-screen a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
