/* === SECTION: sign-in === */
/* Gestalt 3D's sign-in form; tokens come from GI's /style.css. */
body.make-it-sign-in {
  display: block;
  background: var(--frame-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.make-it-sign-in :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth {
  height: 100%;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

/* While a stored token is being confirmed the form is inert rather than absent —
   swapping it for a spinner would make an ordinary arrival flash twice. */
.auth-card.is-resuming,
.auth-card.is-busy { opacity: 0.6; pointer-events: none; }
.auth-card.is-busy .auth-submit { cursor: default; }

.auth-mark {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-sub {
  margin: -8px 0 4px;
  font-size: var(--text-md);
  color: var(--ink-soft);
}

.auth-field { display: flex; flex-direction: column; gap: 6px; }
/* An author `display` beats the hidden attribute's UA rule, so the name field would
   otherwise stay on screen in sign-in mode. Every hide on this screen is the hidden
   attribute, so restoring it here covers all of them. */
.auth-field[hidden] { display: none; }

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

.auth-optional { font-weight: 400; color: var(--ink-soft); }

.auth-field input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-md);
  outline: none;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-field input[aria-invalid="true"] { border-color: var(--auth-danger); }

.auth-hint { margin: 0; font-size: 12px; color: var(--ink-ghost); }

/* The refusal color belongs to this form. */
.auth-card { --auth-danger: #ff6b6b; }

.auth-error,
.auth-field-error {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--auth-danger);
}

.auth-error {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--auth-danger) 40%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--auth-danger) 12%, transparent);
}

.auth-submit {
  height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #0b1220;
  font-family: var(--sans);
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
}
.auth-submit:hover { filter: brightness(1.08); }
.auth-submit:disabled { cursor: default; filter: none; }

.auth-switch {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.auth-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

