.retail-auth {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 16px;
    background: #f4f5f7;
    color: #172b45;
    font: 1.0625rem/1.45 "Source Sans 3", system-ui, sans-serif;
}

.auth-card, .auth-card * { box-sizing: border-box; }
.auth-card {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    padding: clamp(20px, 5vw, 32px);
    background: #fff;
    border: 1px solid #dce2eb;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(23, 43, 69, .08);
}

.auth-brand { color: #174d87; font-weight: 700; }
.auth-card h1 { margin: 4px 0 24px; font-size: 1.875rem; line-height: 1.15; }
.auth-card form { display: grid; gap: 8px; }
.auth-card label { font-weight: 600; }
.auth-card input:not([type=hidden]), .auth-card button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #74849a;
    border-radius: 6px;
    font: inherit;
}

.auth-card input:not([type=hidden]) { width: 100%; background: #fff; color: inherit; }
.auth-card label:not(:first-of-type) { margin-top: 8px; }
.auth-password { display: flex; gap: 6px; }
.auth-password input { flex: 1; }
.auth-card button { cursor: pointer; background: #fff; color: #174d87; }
.auth-card button[type=submit], .auth-card input[type=submit] {
    width: 100%;
    margin-top: 12px;
    border-color: #174d87;
    background: #174d87;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.auth-card :focus-visible { outline: 2px solid #174d87; outline-offset: 2px; }
.auth-card [hidden] { display: none; }
.auth-notice, .auth-error { margin: 0 0 16px; }
.auth-error { color: #a12424; }
.auth-card table { width: 100%; }
.auth-card .screenlet-title-bar { display: none; }
.auth-card select { min-height: 44px; padding: 8px 12px; font: inherit; }
.auth-card code { overflow-wrap: anywhere; }
.auth-qr { display: block; max-width: 100%; height: auto; margin: auto; }

/* AUTH_R1_CENTERED_LAYOUT */

/* Scope layout changes strictly to authentication pages. */

html:has(.auth-card) {
    min-height: 100%;
    background: #f4f6f9;
}

body:has(.auth-card) {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f4f6f9;
    font-family: "Source Sans 3", Arial, sans-serif;
    box-sizing: border-box;
}

/* Remove inherited workspace width restrictions. */

body:has(.auth-card)
:is(main, section, div):has(.auth-card) {
    width: 100% !important;
    max-width: none !important;
    margin-inline: auto !important;
    float: none !important;
    box-sizing: border-box;
}

/* Centre the immediate authentication-card container. */

body:has(> .auth-card),
body :has(> .auth-card) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    padding: 24px !important;
    box-sizing: border-box;
}

/* Authentication card. */

body .auth-card {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 32px !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    transform: none !important;
    box-sizing: border-box !important;
    background: #ffffff;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(24, 42, 68, 0.07);
    color: #192534;
}

.auth-card h1 {
    font-size: 26px;
    line-height: 1.25;
    font-weight: 600;
    margin-bottom: 24px;
}

.auth-card label {
    font-size: 14px;
    font-weight: 600;
}

.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    border-radius: 6px;
}

.auth-card button {
    font-family: inherit;
    min-height: 44px;
    border-radius: 6px;
    cursor: pointer;
}

.auth-card button[type="submit"] {
    width: 100%;
    background: #194c82;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.auth-card button[type="submit"]:hover {
    background: #123d6d;
}

.auth-card :is(input, button, a):focus-visible {
    outline: 2px solid #194c82;
    outline-offset: 3px;
}

@media (max-width: 480px) {

    body:has(> .auth-card),
    body :has(> .auth-card) {
        padding: 16px !important;
    }

    body .auth-card {
        padding: 24px !important;
    }

}

@media (max-height: 650px) {

    body:has(> .auth-card),
    body :has(> .auth-card) {
        justify-content: flex-start !important;
        padding-block: 24px !important;
    }

}

