.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 3rem;
    padding: clamp(1.5rem, 4vw, 3rem);
}
.auth-form {
    align-self: center;
    width: min(100%, 28rem);
    margin: 0 auto 10vh;
    display: grid;
    gap: .85rem;
}
.auth-login-panel { align-self: center; width: min(100%, 28rem); margin: 0 auto 10vh; display: grid; gap: .85rem; }
.auth-form h1, .auth-login-panel h1 { margin: 0 0 1rem; font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: 0; }
.auth-form label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 700; }
.auth-form input, .auth-form select { width: 100%; min-height: 3.25rem; padding: 0 1rem; border: 1px solid #c9d1cf; border-radius: 6px; background: #fff; }
.auth-form button { min-height: 3.25rem; border: 0; border-radius: 6px; color: #fff; background: #e51f17; font-weight: 800; cursor: pointer; }
.auth-login-panel > form { display: grid; gap: .65rem; }
.auth-login-panel > .auth-form { width: 100%; margin: 0; align-self: auto; }
.auth-login-panel .passkey-login { display: grid; gap: .45rem; }
.auth-alternatives { display: grid; gap: .65rem; }
.auth-login-panel .passkey-button {
    width: 100%;
    min-width: 0;
    padding: .65rem 1rem;
    border: 1px solid #aeb9b6;
    color: #111719;
    background: #fff;
    font-size: .9rem;
    line-height: 1.25;
    white-space: normal;
}
.auth-login-panel .passkey-button { grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem; align-items: center; gap: .75rem; }
.auth-login-panel .passkey-button::after { width: 1.5rem; content: ''; }
.auth-login-panel .passkey-button svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.auth-login-panel .passkey-button:hover { border-color: #111719; background: #f3f6f5; }
.oauth-login-button {
    min-height: 3.25rem;
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    border: 1px solid #c2cac8;
    border-radius: 6px;
    color: #111719;
    background: #fff;
    box-shadow: 0 1px 2px rgb(17 23 25 / 8%);
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.oauth-login-button::after { width: 1.5rem; content: ''; }
.oauth-login-button:hover { border-color: #7f8c88; background: #fbfcfc; box-shadow: 0 6px 16px rgb(17 23 25 / 10%); transform: translateY(-1px); }
.oauth-login-button:active { box-shadow: 0 1px 2px rgb(17 23 25 / 8%); transform: translateY(0); }
.oauth-login-button--apple { border-color: #000; color: #fff; background: #000; }
.oauth-login-button--apple:hover { border-color: #222; color: #fff; background: #222; }
.oauth-login-button--apple .oauth-provider-icon { color: #fff; }
.oauth-provider-icon--apple svg { fill: currentColor; }
.oauth-provider-icon { width: 1.25rem; height: 1.25rem; display: inline-grid; place-items: center; }
.oauth-provider-icon svg { width: 100%; height: 100%; display: block; }
.oauth-provider-label { min-width: 0; }
.oauth-provider-state {
    min-height: 3.25rem;
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    border: 1px dashed #b9c3c0;
    border-radius: 6px;
    color: #3f4c49;
    background: #f7f9f8;
}
.oauth-provider-state strong, .oauth-provider-state small { display: block; }
.oauth-provider-state small { margin-top: .1rem; color: #586562; font-size: .76rem; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) {
    .oauth-login-button { transition: none; }
}
.passkey-explanation, .passkey-unavailable, .passkey-status { margin: 0; color: #53615e; font-size: .8rem; line-height: 1.5; }
.passkey-explanation strong { color: #26312f; }
.passkey-unavailable { padding-left: .7rem; border-left: 3px solid #d4a916; color: #443a13; }
.passkey-status:empty { display: none; }
.auth-divider { display: flex; align-items: center; gap: .8rem; margin: .7rem 0; color: #667174; font-size: .78rem; font-weight: 750; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: #dce2e0; content: ''; }
.form-error { padding: .8rem 1rem; border-left: 3px solid #f52219; background: #fff; }
.form-success { padding: .8rem 1rem; border-left: 3px solid #087d75; background: #fff; }
.network-status {
    position: fixed;
    z-index: 90;
    right: 1rem;
    bottom: 4.75rem;
    width: min(28rem, calc(100vw - 2rem));
    margin: 0;
    padding: .8rem 1rem;
    border: 1px solid #d8dfdd;
    border-left: 4px solid #f52219;
    background: #fff;
    color: #101619;
    box-shadow: 0 12px 30px rgb(16 22 25 / 14%);
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.4;
}
.network-status[data-state="recovered"] { border-left-color: #087d75; }
.network-status[hidden] { display: none; }
.security-notice { padding: .8rem 1rem; border-left: 3px solid #d4a916; background: #fffbea; color: #443a13; }
.security-notice a { color: #087d75; font-weight: 800; }
.rdvpermis-portal-card { display: grid; gap: .2rem; margin: .15rem 0 .85rem; }
.rdvpermis-portal-card strong, .rdvpermis-portal-card span, .rdvpermis-portal-card small { display: block; }
.rdvpermis-portal-card strong { color: #171d1c; font-size: 1rem; }
.rdvpermis-portal-card span { font-weight: 750; }
.rdvpermis-portal-card small { margin-top: .2rem; line-height: 1.45; }
.auth-links { margin: .25rem 0 0; color: #667174; text-align: center; }
.auth-links a, .primary-link { color: #087d75; font-weight: 750; }
.auth-links a { min-height: 2.75rem; display: inline-flex; align-items: center; }
.auth-message { gap: .45rem; }
.auth-message p { margin: 0 0 .75rem; line-height: 1.55; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; border-radius: 6px; color: #fff; background: #e51f17; text-decoration: none; }
.error-shell { background: #fff; }
.error-page { max-width: 34rem; margin-bottom: 16vh; }
.error-page-kicker {
    margin: 0 !important;
    color: #b5201d;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.error-page h1 { margin-bottom: .45rem; }
.error-page .primary-link { margin-top: .8rem; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.checkbox-row > div { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .6rem; }
.checkbox-row input { width: 1.15rem; min-height: 1.15rem; margin-top: .15rem; }
.checkbox-row label { min-height: 2.75rem; display: flex; align-items: center; margin: 0; font-weight: 500; line-height: 1.4; }
.auth-form ul { margin: .35rem 0 0; padding-left: 1.2rem; color: #b5201d; font-size: .85rem; }
.auth-form .help-text, .auth-form .form-help { margin: .35rem 0 0; color: #667174; font-size: .78rem; line-height: 1.45; }
.auth-logout { width: min(100%, 28rem); margin: -9vh auto 0; text-align: center; }
.auth-logout .quiet-button { color: #667174; }
.auth-secondary-actions { width: min(100%, 28rem); display: flex; justify-content: center; gap: 1rem; margin: -9vh auto 0; }
.auth-secondary-actions form { margin: 0; }
.auth-secondary-actions .quiet-button { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 .25rem; color: #667174; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.auth-shell-mfa { grid-template-rows: auto minmax(0, 1fr); gap: 1rem; }
.auth-access-panel { align-self: center; width: min(100%, 28rem); margin: 0 auto 2rem; display: grid; gap: .75rem; }
.auth-access-panel .auth-form { width: 100%; margin: 0; }
.auth-access-panel .auth-secondary-actions { width: 100%; margin: 0; flex-wrap: wrap; gap: .35rem 1rem; }
.auth-access-panel .auth-secondary-actions form { flex: 1 1 12rem; }
.auth-access-panel .auth-secondary-actions .quiet-button { width: 100%; justify-content: center; }
.auth-access-panel .auth-secondary-actions .mfa-recovery-button { min-height: 3rem; padding: 0 .75rem; border: 1px solid #111719; border-radius: 6px; color: #111719; background: transparent; font-weight: 800; text-decoration: none; }
.mfa-email-activation { padding: 1.25rem; border: 1px solid #d6dddd; border-radius: 12px; background: #f7f9f8; box-shadow: 0 10px 30px rgb(17 23 25 / 6%); }
.mfa-email-activation h2 { margin: .25rem 0 .65rem; font-size: clamp(1.2rem, 4vw, 1.55rem); line-height: 1.12; }
.mfa-email-activation > p:not(.eyebrow, .form-success, .form-error) { margin: 0 0 1rem; color: #5d696c; font-size: .9rem; line-height: 1.5; }
.mfa-email-activation-actions { display: grid; gap: 1rem; }
.mfa-email-activation-actions form { display: grid; gap: .55rem; margin: 0; }
.mfa-email-activation-actions label { margin: 0; font-size: .82rem; font-weight: 800; }
.mfa-email-activation-actions input { min-height: 3.25rem; }
.mfa-email-activation-actions button { width: 100%; }
.mfa-email-activation-send { min-height: 3.25rem; border: 1px solid #111719; border-radius: 6px; color: #111719; background: #fff; font-weight: 800; }

.mfa-setup-shell, .mfa-recovery-shell { width: min(calc(100% - 2rem), 64rem); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 0; }
.mfa-heading { max-width: 46rem; margin-bottom: 2rem; }
.mfa-heading h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: 0; }
.mfa-heading > p:last-child { margin: .75rem 0 0; color: #667174; line-height: 1.55; }
.mfa-setup-flow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr); border-top: 1px solid #dce2e0; border-bottom: 1px solid #dce2e0; background: #fff; }
.mfa-qr-step, .mfa-confirm-step { min-width: 0; padding: clamp(1.25rem, 3vw, 2.5rem); }
.mfa-confirm-step { display: grid; align-content: start; gap: .8rem; border-left: 1px solid #dce2e0; background: #fff8f6; }
.mfa-qr-step > div > span, .mfa-confirm-step > span { color: #b5201d; font-size: .75rem; font-weight: 900; }
.mfa-qr-step h2, .mfa-confirm-step h2 { margin: .35rem 0 0; font-size: 1.35rem; }
.mfa-qr-step p, .mfa-confirm-step > p { margin: .45rem 0 0; color: #667174; line-height: 1.5; }
.mfa-qr-step > img { width: min(100%, 17.5rem); display: block; margin: 1.25rem auto; }
.mfa-qr-step details { border-top: 1px solid #dce2e0; padding-top: .85rem; }
.mfa-qr-step summary { color: #087d75; font-weight: 800; cursor: pointer; }
.mfa-qr-step details p { font-size: .82rem; }
.mfa-qr-step code { display: block; margin-top: .5rem; color: #263235; font-size: .86rem; overflow-wrap: anywhere; }
.mfa-confirm-step label { margin-top: .5rem; font-size: .85rem; font-weight: 800; }
.mfa-confirm-step input { width: 100%; min-height: 3.25rem; padding: 0 1rem; border: 1px solid #c9d1cf; border-radius: 6px; background: #fff; font-size: 1.15rem; letter-spacing: 0; }
.mfa-confirm-step button { min-height: 3.25rem; border: 0; border-radius: 6px; color: #fff; background: #e51f17; font-weight: 850; cursor: pointer; }
.mfa-recovery-shell { width: min(calc(100% - 2rem), 44rem); }
.mfa-recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid #dce2e0; list-style: none; background: #fff; }
.mfa-recovery-codes li { padding: 1rem; border-bottom: 1px solid #dce2e0; }
.mfa-recovery-codes li:nth-child(even) { border-left: 1px solid #dce2e0; }
.mfa-recovery-codes code { font-size: 1rem; font-weight: 800; }
.mfa-recovery-shell > .security-notice { margin: 1.5rem 0; }
.mfa-finish { width: 100%; }
