/* Auth-server pages (login, reset). App branding overrides the tokens. */
body.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--space-4);
}

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

@media (max-width: 30rem) {
    .auth-card { padding: var(--space-5); }
}

/* Shared form components (same names as the admin panel) */
.field { margin-bottom: var(--space-4); }
.field__label { display: block; margin-bottom: var(--space-1); font-weight: 600; }
.field__input { display: block; width: 100%; min-height: var(--touch-target); padding: var(--space-2) var(--space-3); font: inherit; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.field__help { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.field__error { margin: var(--space-1) 0 0; color: var(--color-danger); font-size: var(--text-sm); font-weight: 600; }
.notice { margin-bottom: var(--space-4); }

/* Login flow (phase 6) */
.auth-card h1 { margin-top: 0; }
.stack > * + * { margin-top: var(--space-3); }
form.stack, section.stack { margin-bottom: var(--space-4); }
.button--block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.links { list-style: none; padding: 0; margin: var(--space-4) 0 0; }
.links li + li { margin-top: var(--space-2); }
.choices { border: 0; padding: 0; margin: 0; }
.choice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; }
.choice + .choice { margin-top: var(--space-2); }
.choice input { margin-top: 0.3em; min-width: 1.1em; min-height: 1.1em; }
.codes { columns: 2; padding-left: var(--space-5); font-family: var(--font-mono); }
.confirm summary { list-style: none; }
.confirm__panel { margin-top: var(--space-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* App branding (phase 7): logo, footer, accent and background image */
a { color: var(--color-accent, var(--color-primary)); }
body.auth { font-family: var(--font-sans); background-color: var(--color-bg); }
body.auth--background { background-image: var(--brand-background-image, none); background-size: cover; background-position: center; }
body.auth { grid-template-rows: 1fr auto; }
.auth-brand { margin-bottom: var(--space-5); text-align: center; }
.auth-brand__logo { display: inline-block; max-width: 100%; max-height: 64px; height: auto; }
.auth-brand__name { margin: 0; font-size: var(--text-lg); font-weight: 700; }
.auth-welcome { margin-top: 0; }
.auth-footer { display: flex; gap: var(--space-4); justify-content: center; padding: var(--space-4); font-size: var(--text-sm); }
.auth-footer a { color: var(--color-text); }

/* Log in with the phone (QR code) */
.qr-login__code { text-align: center; }
.qr-login__code img { display: inline-block; max-width: 100%; height: auto; padding: var(--space-2); background: #fff; border-radius: var(--radius-md); }
.qr-login__device { margin: 0; }
.qr-login__device dt { font-weight: 600; }
.qr-login__device dd { margin: 0 0 var(--space-2); }
