/* Authentication only. Shared colours come from ui.css; controls deliberately use 44px on every viewport. */
.auth-page {
    --auth-action: #2563eb;
    --auth-control-border: #808997;
    margin: 0;
    background: var(--ui-canvas);
    color: var(--ui-text);
    font: 14px/20px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page [hidden] { display: none !important; }
/* The page frame (the legacy page-wide WebForms form, a div here): header, centred card, footer at the bottom */
.auth-page #AuthForm { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-header { min-height: 64px; padding: 0 32px; display: flex; align-items: center; gap: 10px; background: var(--ui-brand); color: white; font-size: 16px; font-weight: 600; letter-spacing: -.16px; }
.auth-header img { display: block; flex: none; }
.auth-header a.auth-brand, .auth-header a.auth-brand:hover { display: inline-flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; border-radius: 6px; }
.auth-brand:focus-visible { outline: 2px solid #ffffff; outline-offset: 4px; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px 16px; }
.auth-main > div:not(.auth-sr-only), .auth-main > section { width: 100%; max-width: 480px; }
.auth-card { width: 100%; padding: 32px; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius); }
.auth-stack { display: flex; flex-direction: column; gap: 20px; }
.auth-heading { display: flex; flex-direction: column; gap: 8px; }
.auth-page h1 { margin: 0; color: var(--ui-text); font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -.22px; }
.auth-page p { margin: 0; color: var(--ui-text-secondary); }
.auth-page a { color: var(--auth-action); text-decoration: none; }
.auth-page a:hover { text-decoration: underline; }
.auth-fields { display: flex; flex-direction: column; gap: 16px; }
.auth-contact-fields { gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-field > label { color: var(--ui-text-secondary); font-size: 13px; font-weight: 500; line-height: 18px; }
.auth-input { width: 100%; height: 44px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--auth-control-border); border-radius: var(--ui-radius-sm); background: var(--ui-surface); color: var(--ui-text); font: inherit; font-size: 16px; line-height: 24px; }
.auth-input::placeholder { color: var(--ui-text-muted); opacity: 1; }
.auth-input:focus { border-color: var(--ui-accent); outline: none; box-shadow: var(--ui-focus); }
textarea.auth-input { height: 88px; resize: vertical; }
.auth-input[aria-invalid="true"] { border-color: var(--ui-danger); }
.auth-password { position: relative; }
.auth-password .auth-input { padding-right: 68px; }
.auth-password-toggle { position: absolute; inset: 0 0 0 auto; min-width: 60px; padding: 0 12px; border: 0; background: transparent; color: var(--auth-action); font: inherit; cursor: pointer; }
.auth-options { display: flex; gap: 16px; align-items: center; }
.auth-options > .auth-link { flex: 1; }
.auth-checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; flex: 0 0 152px; }
.auth-checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--auth-action); }
.auth-checkbox label { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }
.auth-button, .auth-page a.auth-button { width: 100%; min-height: 44px; padding: 12px 14px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: var(--ui-radius-sm); background: var(--auth-action); color: white; font: inherit; font-weight: 600; line-height: 20px; text-align: center; cursor: pointer; text-decoration: none; }
.auth-button:hover { background: var(--ui-accent); }
.auth-button[aria-disabled="true"] { opacity: .65; cursor: wait; }
.auth-link { min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; }
.auth-help { width: 100%; max-width: 480px; }
.auth-feedback { padding: 14px; border-radius: var(--ui-radius-sm); display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.auth-feedback-error { background: var(--ui-danger-soft); color: var(--ui-danger); }
.auth-feedback-warning { background: var(--ui-warning-soft); color: var(--ui-warning); }
.auth-feedback-success { background: var(--ui-success-soft); color: var(--ui-success); }
.auth-feedback p { color: inherit; }
.auth-feedback strong { font-weight: 600; }
.auth-feedback ul { margin: 4px 0 0; padding-left: 20px; }
.auth-feedback + .auth-feedback { margin-top: 12px; }
.auth-hint, .auth-error { font-size: 12px; line-height: 16px; }
.auth-hint { color: var(--ui-text-muted); }
.auth-error { color: var(--ui-danger); }
.auth-footer { min-height: 56px; padding: 16px; text-align: center; color: var(--ui-text-muted); font-size: 13px; line-height: 24px; }
.auth-footer a { color: inherit; display: inline-block; }
.auth-page :is(a, button, input[type="checkbox"]):focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
.auth-sr-only, .auth-honeypot { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 899px) {
    .auth-header { padding: 0 20px; }
    .auth-main { justify-content: flex-start; padding-top: 28px; padding-bottom: 24px; }
    .auth-card { padding: 24px; }
    .auth-options { flex-direction: column; gap: 0; align-items: stretch; }
    .auth-checkbox { flex-basis: auto; }
}
