/* Centered auth card layout */
.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
  background: var(--ground);
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--card-radius);
  padding: 28px 28px 24px 28px;
  box-shadow: var(--card-shadow-md);
  transition: max-width 200ms ease;
}
/* The register step has more fields than the password step, so widen
 * the card when that step is the visible one. :has() lets the layout
 * react to JS-driven visibility without a body class swap. */
.auth-card:has(#step-register:not([hidden])) {
  max-width: 480px;
}
.auth-brand-block { margin-bottom: 18px; }
.auth-brand {
  font-weight: 600; font-size: 14px; color: var(--accent);
  letter-spacing: 0.5px; line-height: 1.2;
}
.auth-tagline {
  margin-top: 2px; font-size: 11px; color: var(--dim);
  font-style: italic;
}
.auth-tagline:empty { display: none; }
.auth-card h1 {
  font-size: 22px; margin: 0 0 6px 0;
}
.auth-sub {
  color: var(--dim); font-size: 13px; margin: 0 0 20px 0;
}
.auth-card form {
  display: flex; flex-direction: column; gap: 14px;
}
.auth-card label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--dim);
}
/* Scoped to direct label children so the typeahead's inner input
 * (.lang-chips-input) doesn't pick up its own border + background,
 * which was making the chip widget look like a doubly-bounded box.
 */
.auth-card label > input[type="email"],
.auth-card label > input[type="password"],
.auth-card label > input[type="text"],
.auth-card label > textarea {
  padding: 9px 11px; font-size: 14.5px; font-family: inherit;
  border: 1px solid var(--card-line); border-radius: 7px;
  color: var(--fg);
  background: var(--card);
  box-sizing: border-box;
  width: 100%;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.auth-card label > textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.45;
}
.auth-card label > input:focus,
.auth-card label > textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
/* Match the chip widget's frame to the rest of the form inputs so
 * the field reads as a single box: one border, white background,
 * accent-coloured on focus. */
.auth-card .lang-chips-wrap {
  border: 1px solid var(--card-line);
  border-radius: 7px;
  background: var(--card);
  padding: 5px 7px;
  min-height: 40px;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.auth-card .lang-chips-wrap.focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.auth-card label > span {
  font-weight: 600;
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-optional {
  background: var(--line);
  color: var(--dim);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}
.auth-fineprint {
  font-size: 12px;
  color: var(--dim);
  margin: 4px 0 0;
  line-height: 1.5;
}
.auth-fineprint code {
  font-family: var(--mono);
  background: var(--line);
  color: var(--fg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}
.auth-signin {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: filter 100ms ease;
}
.auth-signin:hover {
  filter: brightness(0.93);
  color: #fff;
}
.auth-card small {
  color: var(--dim); font-size: 12px;
}
.auth-card button[type="submit"] {
  padding: 9px 18px; background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  transition: filter 100ms ease;
}
.auth-card button[type="submit"]:hover { filter: brightness(0.93); }
.auth-card button[type="submit"]:disabled {
  opacity: 0.5; cursor: wait; filter: none;
}
.auth-buttons { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-link {
  background: none; border: none; cursor: pointer; color: var(--dim);
  font-family: inherit; font-size: 13px; text-decoration: none;
}
.auth-link:hover { color: var(--accent); }
.error {
  color: #a02828; font-size: 12px; min-height: 16px;
}
