/* Auth pages (login, 2FA, password) in design G. Uses the variables from theme.css. */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, #4A4F57 0, transparent 70%), var(--ground); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; display: grid; gap: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: var(--heading-font); font-weight: 700; font-size: 24px; color: #fff; }
.auth-brand img { width: 40px; height: 40px; }
.auth-card h1 { margin: 0; font-family: var(--heading-font); font-size: 20px; font-weight: 700; }
.auth-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .field input { background: var(--ground); border: 1px solid var(--border); color: var(--text); }
.auth-card .field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-card .btn.primary { width: 100%; min-height: 48px; font-size: 16px; }
.remember { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 15px; }
.remember input { width: 22px; height: 22px; accent-color: var(--accent); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.auth-links a, .link-btn { color: var(--accent); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.auth-links a:hover, .link-btn:hover { text-decoration: underline; }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.notice.error { background: rgba(255, 138, 128, .12); border: 1px solid rgba(255, 138, 128, .5); color: #FFD2CC; }
.notice.ok { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); }
.notice ul { margin: 0; padding-left: 18px; }
.code-input { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.footnote { text-align: center; font-size: 12px; color: var(--muted); }

/* "My profile" page */
.profile { max-width: 760px; }
.profile .section-title { margin: 28px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.profile .card form { display: grid; gap: 14px; max-width: 420px; }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: max-content; }
.qr svg { display: block; width: 200px; height: 200px; }
.setup-key { font-family: ui-monospace, monospace; font-size: 14px; padding: 8px 10px; border-radius: 8px; background: var(--ground); border: 1px solid var(--line); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; font-family: ui-monospace, monospace; font-size: 15px; padding: 12px 14px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line); }
.status-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status-badge.on { color: var(--accent); }
.inline-forms { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-forms form { max-width: none; }
.remember-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.passkey-btn { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; }
.passkey-area .notice { margin-top: 12px; }
.passkey-list { display: grid; gap: 8px; }
.passkey-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.passkey-item .muted { font-size: 13px; }


/* Language switch on pages without a profile (login etc.) */
.auth-card .locale-switch { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.locale-switch button { background: none; border: 0; color: var(--muted); font-size: 13px; min-height: 32px; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.locale-switch button:hover { background: rgba(255, 255, 255, .06); }
.locale-switch button[aria-current] { color: var(--accent); font-weight: 600; }

/* Check marks are always green, crosses red */
.check { color: var(--success); font-weight: 700; }
.cross { color: var(--danger); font-weight: 700; }
.status-badge.on .check { color: var(--success); }

/* Success messages appear green first and then fade into the normal colour, so the user notices at once that all is well */
.notice.ok { animation: success-fade 3s ease-out .8s both; }
@keyframes success-fade {
  from { background: var(--success-soft); border-color: var(--success); }
  to { background: var(--accent-soft); border-color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) { .notice.ok { animation: none; } }
