/* Auth screens (login, register, invite acceptance).
   Standalone pages that do NOT extend web/base.html — no app shell/sidebar.
   Loaded after tokens.brand + tokens.product + base.css; NOT with app.css.
   Values use var(--token) only — no literal hex, no hardcoded radius. */

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

.auth-card {
  width: 100%;
  max-width: 380px;
  box-sizing: border-box;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
  padding: 32px 28px;
}

.auth-brand {
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}

.auth-title { margin-bottom: 6px; }

.auth-sub {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-soft);
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 12px;
  background: var(--paper-solid);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}
/* focus border comes from the base.css input:focus-visible primitive */

.auth-form .button { width: 100%; margin-top: 4px; }

.auth-error {
  margin-bottom: 20px;
  padding: 10px 12px;
  border: 1px solid var(--warn);
  border-radius: var(--radius-small);
  color: var(--warn);
  font-size: 14px;
}

.auth-note {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 4px;
}
.auth-note strong { color: var(--ink); font-weight: 560; }
/* Nothing was styling a bare <a> on these screens, so the browser default
   applied: link blue, then visited purple. Two colours from outside the
   palette, on the screens where a stranger meets the product — including
   the checkout page, where the links are the refund policy and the terms. */
.auth-note a { color: var(--blue); }
.auth-note a:hover { color: var(--blue-strong); }

/* Register form: organization-URL preview + live slug-availability hint. */
.slug-preview {
  font-size: 13px;
  color: var(--ink-faint);
  word-break: break-all;
}
.slug-preview span {
  color: var(--blue);
  font-weight: 560;
}

.field-hint {
  font-size: 13px;
  color: var(--ink-faint);
}
.field-hint.ok { color: var(--good); font-weight: 560; }
.field-hint.err { color: var(--warn); font-weight: 560; }

/* Logout submit rendered inline as a link inside the identity chip
   (Django 5 logout is POST-only, so it's a styled <button>). */
.auth-id .logout-inline { display: inline-flex; }
.auth-id .logout-inline button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--blue);
  font-weight: 560;
  cursor: pointer;
}
.auth-id .logout-inline button:hover { text-decoration: underline; }
.auth-id strong { color: var(--ink); font-weight: 560; }

/* Org picker (/orgs/): each accessible org as a link-card above the create form. */
.org-pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  max-height: 220px;
  overflow-y: auto;
}
.org-pick-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-solid);
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
}
.org-pick-item:hover { border-color: var(--blue); color: var(--blue); }

/* Wordmark as a link back to the marketing site (when configured) */
a.auth-brand {
  display: inline-block;
  text-decoration: none;
}
a.auth-brand:hover {
  color: var(--blue);
}

/* --- Split auth layout: fixed brand panel + form column (login, org picker) --- */
.auth-split {
  width: 100%;
  max-width: 760px;
  min-height: 460px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-raised);
  box-shadow: 0 18px 50px var(--shadow);
}

/* Each step arrives with the same entrance, binding the screens into one flow. */
@keyframes auth-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-split { animation: auth-enter 0.3s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .auth-split { animation: none; }
}

.auth-panel {
  position: relative;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  color: var(--auth-panel-ink);
  background: linear-gradient(155deg, var(--auth-panel-a), var(--auth-panel-b));
}
.auth-panel-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--auth-panel-em);
}
a.auth-panel-brand { text-decoration: none; display: inline-block; }
a.auth-panel-brand:hover { opacity: 0.85; }
.auth-panel-tag {
  margin-top: auto;
  font-size: var(--text-hero);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.22;
}
.auth-panel-tag .em { color: var(--auth-panel-em); }
.auth-panel-tag .dim { opacity: 0.72; }
.auth-panel-sub {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.85;
  max-width: 32ch;
}
.auth-formcol {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--paper-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 9px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}
.auth-id-edit {
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
  font-weight: 560;
}
@media (max-width: 640px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-panel { min-height: 140px; }
  .auth-panel-tag { font-size: var(--text-stat); }
}

/* --- Social sign-in --- */
.auth-sso { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.button-social {
  width: 100%;
  box-sizing: border-box; /* keep padding+border inside 100% so it aligns with the form below (no global reset) */
  background: var(--paper-solid);
  color: var(--ink);
  border-color: var(--line);
}
.button-social:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.button-social .social-glyph { flex: 0 0 auto; }
.auth-sso-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  margin: 6px 0 2px;
}
.auth-sso-divider::before,
.auth-sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* The wordmark is artwork now — these rules only size and place it. The type
   properties on .auth-brand / .auth-panel-brand no longer apply to anything. */
.auth-brand { display: inline-block; line-height: 0; }
.auth-brand .brand-art-word { width: 84px; }
.auth-panel-brand .brand-art-mark { width: 26px; }
.auth-panel-brand .brand-art-word { width: 76px; }
