/* VaultX sign-in / setup page and passkey settings. Uses design tokens from app.css. */

/* Centered sign-in layout (#auth.auth-page > .auth-shell) */
#auth.auth-page { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-shell { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; animation: auth-in .28s var(--ease, ease-out); }
.auth-brand { margin-bottom: 24px; font-size: 20px; }
.auth-brand .logo-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 21px; }
.auth-shell .auth-card {
  width: 100%; padding: 28px 28px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.auth-card-head { margin-bottom: 20px; }
.auth-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.auth-icon .icon { width: 20px; height: 20px; }
.auth-card-head .eyebrow { margin-bottom: 4px; color: var(--accent); }
.auth-card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.auth-card-head p { margin: 0; font-size: 14px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .field input { height: 40px; }
.auth-card .button.full { min-height: 40px; margin-top: 6px; }
.auth-card .button.primary .icon { transition: transform .15s; }
.auth-card .button.primary:hover .icon { transform: translateX(2px); }
.auth-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 12px; line-height: 1.55; color: var(--muted); }
.auth-note .icon { width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; }
/* The chip row may be a little wider than the card, so the three chips stay on one line on desktop. */
.auth-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: max-content; max-width: min(480px, calc(100vw - 32px)); margin: 22px 0 0; padding: 0; list-style: none; }
.auth-features li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; }
.auth-features .icon { width: 13px; height: 13px; color: var(--accent); }
.auth-version { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; font-size: 12px; color: var(--text-soft); }
.auth-version .icon { width: 12px; height: 12px; }
@keyframes auth-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-soft); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.passkey-signin { min-height: 44px !important; justify-content: flex-start; text-align: left; }
.passkey-signin span { flex: 1; }
.passkey-signin .icon:first-child { color: var(--accent); }
.passkey-signin + .security-note { margin-top: 10px; }
.auth-back { margin-top: 8px !important; }

/* Passkeys panel (Security view) */
.passkey-panel { grid-column: 1 / -1; }
.passkey-list { display: grid; gap: 8px; margin: 0 0 16px; }
.passkey-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface2); }
.passkey-row > div { flex: 1; min-width: 0; }
.passkey-row strong { display: inline-block; margin-right: 8px; font-weight: 600; overflow-wrap: anywhere; }
.passkey-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.passkey-symbol { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.passkey-symbol .icon { width: 16px; height: 16px; }
.passkey-row .icon-button:hover { color: var(--red); background: var(--danger-soft); }
.passkey-empty { margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); text-align: center; font-size: 13px; }
.passkey-reauth { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  #auth.auth-page { align-items: flex-start; padding: 28px 12px; }
  .auth-shell .auth-card { padding: 22px 18px 18px; border-radius: 14px; }
  .auth-brand { margin-bottom: 18px; }
  .auth-features { gap: 6px; }
  .passkey-row { gap: 10px; padding: 10px; }
  .passkey-row .session-badge { margin-top: 4px; }
  .passkey-panel .button { width: 100%; }
}
