/* auth.css — login / register: glass card, accent CTA. */

.auth-shell {
  max-width: 380px;
  margin: 10vh auto 4vh;
  padding: 32px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 30px 80px rgba(0, 0, 0, 0.42);
  animation: rise-in var(--motion-slow) var(--ease-out) backwards;
}

.auth-shell .brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 22px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-foot {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--body);
  font-size: var(--t-sm);
  color: var(--text-3);
}
.auth-foot a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 600;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-shell .btn.primary {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  font-size: var(--t-sm);
}

/* Password strength meter on /register */
.pw-strength {
  margin-top: 8px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px; overflow: hidden;
}
.pw-strength .pw-bar {
  height: 100%; width: 0%;
  background: var(--danger);
  transition: width var(--motion-base) var(--ease-out),
              background var(--motion-base) var(--ease-out);
}
.pw-hint {
  margin-top: 6px;
  font-family: var(--body);
  font-size: var(--t-xs);
  color: var(--text-3);
}

.auth-passkey-btn {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  font-size: var(--t-sm);
  /* Subtle accent ring to signal biometric without overpowering primary CTA. */
  border-color: rgba(93, 202, 165, 0.30);
  color: var(--accent-1);
}
.auth-passkey-btn:hover {
  background: var(--accent-1-soft);
  border-color: var(--accent-1);
}

/* Consent checkbox on /register */
.auth-consent {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px;
  font-family: var(--body);
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
}
.auth-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: var(--accent-1);
  flex: 0 0 auto;
  cursor: pointer;
}
.auth-consent a {
  color: var(--accent-1);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-1) 30%, transparent);
}
.auth-consent a:hover { border-bottom-color: var(--accent-1); }

/* ─── Recovery-codes reveal (Phase-3 fix 3.3) — shown once at signup
 * so the user can never sit at 0/8 codes. They must tick the ack
 * before the Continue button enables. */
.auth-codes-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin: 14px 0 6px;
  text-align: center;
}
.auth-codes-sub {
  font-family: var(--body);
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 14px;
  text-align: center;
}
.auth-codes {
  background: var(--bg-2);
  border: 1px solid var(--accent-1);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: var(--mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: var(--t-base);
  letter-spacing: 0.08em;
  line-height: 1.8;
  color: var(--text-1);
  white-space: pre;
  overflow-x: auto;
  margin: 0 0 14px;
}
.auth-codes-actions {
  display: flex; gap: 10px; flex-direction: column;
  margin: 0 0 12px;
}
.auth-codes-actions .btn { width: 100%; padding: 11px; font-size: var(--t-sm); }
.auth-codes-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-codes-ack {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--body);
  font-size: var(--t-xs);
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
}
.auth-codes-ack input { margin-top: 2px; accent-color: var(--accent-1); flex: 0 0 auto; cursor: pointer; }

/* Inline field-level errors (Phase-3 fix 3.9) — replaces native browser
 * validation popups so messaging is in-app, themed, and consistent. */
.field-err {
  font-family: var(--body);
  font-size: var(--t-xs);
  color: var(--danger);
  margin-top: 5px;
  line-height: 1.4;
}
