/* Public sign-in, signup and account recovery.
 *
 * Layered on top of the dashboard sheet so all public account screens share
 * the product tokens. Nothing here introduces a second visual system.
 */

.auth-body {
  background:
    radial-gradient(900px 500px at 50% -220px, var(--accent-wash), transparent 70%),
    var(--canvas);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5) var(--space-4);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-6) var(--space-5) var(--space-5);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  color: var(--brand);
  text-decoration: none;
  font-size: 15px;
}
.auth-brand span { color: var(--accent); font-size: 18px; }

.auth-panel h1 {
  margin: 0 0 var(--space-2);
  font-size: 22px;
  line-height: 1.25;
}

.auth-lede {
  margin: 0 0 var(--space-5);
  color: var(--ink-soft);
}

.auth-panel form { display: grid; gap: var(--space-4); }

/* The dashboard's .field puts its caption in a <span>; here the caption is a
   real <label for=…> so every input is programmatically named. */
.auth-panel .field { display: grid; gap: var(--space-1); }
.auth-panel .field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.auth-panel .field .optional { font-weight: 500; color: var(--ink-faint); }

.auth-panel input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.auth-panel input.invalid { border-color: var(--danger); }

.password-field { position: relative; display: flex; }
.password-field input { padding-right: 66px; }
.password-field .reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
}
.password-field .reveal:hover { color: var(--ink); background: var(--surface-sunk); }

.field-hint { font-size: 12px; color: var(--ink-faint); }

/* Empty by default and hidden from assistive technology until it has text, so
   a live region does not announce nothing. */
.field-error { font-size: 12px; color: var(--danger); }
.field-error:empty { display: none; }

.auth-alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-wash);
  border: 1px solid #eccbc5;
  color: var(--danger);
  font-size: 13px;
}
.auth-alert.success {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--brand);
}

.auth-panel .btn-block { margin-bottom: 0; padding: 11px 14px; }

.auth-help {
  margin: 2px 0 0;
  text-align: right;
  font-size: 12px;
}
.auth-help a { color: var(--brand); font-weight: 600; }

.auth-fineprint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}

.auth-switch {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}
.auth-switch a { color: var(--brand); font-weight: 600; }

@media (max-width: 480px) {
  .auth-wrap { padding: var(--space-4) var(--space-3); align-items: start; }
  .auth-card { padding: var(--space-5) var(--space-4); border-radius: var(--radius); }
  .auth-panel h1 { font-size: 20px; }
}

/* Focus must stay clearly visible: these screens are often completed by
   keyboard and by password managers. */
.auth-panel input:focus-visible,
.auth-panel button:focus-visible,
.auth-help a:focus-visible,
.auth-switch a:focus-visible,
.auth-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
