/* ===========================================================================
   Login / signup. Shares the design system's tokens with the apps so the two
   never drift apart — this is the first screen anyone sees, and it should feel
   like the same product.
   ========================================================================= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  font-family: var(--font);
  background:
    radial-gradient(120% 90% at 12% -10%, var(--brand-100), transparent 55%),
    radial-gradient(100% 80% at 110% 0%, #fbe4f6, transparent 50%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: grid; place-items: center; padding: 24px 18px;
}

.auth { width: 100%; max-width: 400px; }

.auth__brand {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-bottom: 22px; text-decoration: none; color: inherit;
}
/* .auth__logo / .auth__wordmark now live in app.css — shared by every surface. */

.auth__card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2); padding: 26px 22px 22px;
}
.auth__title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.auth__sub { font-size: 13px; color: var(--ink-3); margin: 0 0 20px; line-height: 1.7; }

.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.auth input, .auth select {
  width: 100%; height: 48px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  outline: none;
}
.auth input:focus, .auth select:focus {
  border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-50);
}
.auth input[aria-invalid="true"] { border-color: var(--danger); }

.auth__hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.6; }

.auth__submit {
  height: 50px; border: 0; border-radius: 13px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; font: inherit; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(179, 50, 171, .26);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.auth__submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(179, 50, 171, .32); }
.auth__submit:disabled { opacity: .55; cursor: progress; box-shadow: none; transform: none; }

.auth__error {
  display: none; align-items: flex-start; gap: 8px;
  background: #fdeaee; color: #a41f36; border-radius: 11px;
  padding: 11px 13px; font-size: 13px; line-height: 1.6; font-weight: 600;
}
.auth__error.is-on { display: flex; }

.auth__split { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--ink-4); font-size: 11.5px; }
.auth__split::before, .auth__split::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth__demos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth__demo {
  height: 46px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.auth__demo:hover { border-color: var(--brand-300); color: var(--brand-700); background: var(--brand-50); }
.auth__demo small { font-size: 10.5px; font-weight: 600; color: var(--ink-4); }

.auth__foot { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 20px; line-height: 2; }
.auth__foot a { color: var(--brand-600); font-weight: 700; text-decoration: none; }
.auth__foot a:hover { text-decoration: underline; }

.auth__legal { text-align: center; font-size: 11px; color: var(--ink-4); margin-top: 16px; line-height: 1.9; }
.auth__legal a { color: var(--ink-3); }

.auth__age {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--brand-50); border-radius: 11px; padding: 11px 13px;
  font-size: 12px; color: var(--brand-900); line-height: 1.7;
}

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .auth__submit { transition: none; }
}
