/* =========================================================================
   AEV Dealer Portal - account / authentication screens (static SSR pages)
   Split "branded card": photo hero + form pane on an ambient backdrop.
   Stands alone: every shell token (--adp-*) is read with a self-contained
   fallback, so the screens survive changes to site.css. House geometry:
   8px surfaces, 5px controls, 4px badges - no pills.
   ========================================================================= */

.adp-auth {
    /* Private aliases: shell tokens with fallbacks (theme-aware via Radzen tokens). */
    --adpa-accent: var(--adp-accent, #1976d2);
    --adpa-accent-strong: var(--adp-accent-strong, #1565c0);
    --adpa-accent-soft: var(--adp-accent-soft, color-mix(in srgb, #1976d2 13%, transparent));
    --adpa-accent-faint: var(--adp-accent-faint, color-mix(in srgb, #1976d2 8%, transparent));
    --adpa-ok: var(--adp-ok, #16a34a);
    --adpa-warn: var(--adp-warn, #d97706);
    --adpa-danger: var(--adp-danger, #dc2626);
    --adpa-info: var(--adp-info, #0284c7);
    --adpa-radius-lg: var(--adp-radius-lg, 8px);
    --adpa-radius: var(--adp-radius, 5px);
    --adpa-radius-sm: var(--adp-radius-sm, 4px);
    --adpa-text: var(--rz-text-color, #1b1f27);
    --adpa-canvas: var(--rz-body-background-color, #f3f5f8);
    --adpa-surface: var(--adp-surface, var(--rz-base-background-color, #ffffff));
    --adpa-border: var(--adp-border, color-mix(in srgb, var(--adpa-text) 12%, transparent));
    --adpa-border-strong: var(--adp-border-strong, color-mix(in srgb, var(--adpa-text) 24%, transparent));
    --adpa-dim: var(--adp-dim, color-mix(in srgb, var(--adpa-text) 65%, transparent));
    --adpa-faint: var(--adp-faint, color-mix(in srgb, var(--adpa-text) 44%, transparent));
    --adpa-hover: var(--adp-hover, color-mix(in srgb, var(--adpa-text) 5%, transparent));
    --adpa-inset: var(--adp-inset, color-mix(in srgb, var(--adpa-text) 4.5%, var(--adpa-canvas)));
    --adpa-shadow-overlay: var(--adp-shadow-overlay,
        0 16px 40px -12px color-mix(in srgb, #000 32%, transparent),
        0 4px 14px color-mix(in srgb, #000 14%, transparent));
    --adpa-font: var(--adp-font, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", Arial, sans-serif);
    --adpa-link: color-mix(in srgb, var(--adpa-accent) 85%, var(--adpa-text));
    --adpa-link-hover: color-mix(in srgb, var(--adpa-accent) 65%, var(--adpa-text));
    --adpa-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --adpa-haze: color-mix(in srgb, #1b2333 12%, transparent); /* charcoal glow, bottom-left */

    position: relative;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    font-family: var(--adpa-font);
    color: var(--adpa-text);
    background-color: var(--adpa-canvas);
    background-image:
        radial-gradient(circle at 88% -8%, color-mix(in srgb, var(--adpa-accent) 10%, transparent), transparent 44%),
        radial-gradient(circle at 4% 108%, var(--adpa-haze), transparent 46%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html[data-theme="dark"] .adp-auth {
    --adpa-haze: color-mix(in srgb, #7c8db3 12%, transparent); /* slate haze reads on a dark canvas */
}

/* The layout is the whole page: drop the UA body margin only while it is present. */
body:has(.adp-auth) { margin: 0; }

.adp-auth *,
.adp-auth *::before,
.adp-auth *::after { box-sizing: border-box; }

.adp-auth a {
    color: var(--adpa-link);
    text-decoration: none;
}
.adp-auth a:hover { color: var(--adpa-link-hover); text-decoration: underline; }
.adp-auth a:focus-visible {
    outline: 2px solid var(--adpa-accent);
    outline-offset: 2px;
    border-radius: var(--adpa-radius-sm);
}

/* ================================ Stage / card ============================ */

.adp-auth-stage {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adp-auth-card {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
    width: 100%;
    max-width: 1040px;
    border: 1px solid var(--adpa-border);
    border-radius: var(--adpa-radius-lg);
    background: var(--adpa-surface);
    box-shadow: var(--adpa-shadow-overlay);
    overflow: hidden;
    animation: adp-auth-rise 0.5s var(--adpa-ease) both;
}

/* ================================== Hero ================================= */

.adp-auth-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    isolation: isolate;
    background: #171b22;
    color: #fff;
}

.adp-auth-hero-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* keeps the AEV facility entrance in frame */
}

.adp-auth-hero-shade {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
}
.adp-auth-hero-shade-top {
    top: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
}
.adp-auth-hero-shade-bottom {
    bottom: 0;
    height: 300px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35) 55%, transparent);
}

/* Brand-blue multiply tint ties the AEV facility photograph to the portal palette. */
.adp-auth-hero-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--adpa-accent) 40%, transparent) 0%,
        color-mix(in srgb, var(--adpa-accent) 12%, transparent) 55%,
        transparent 100%);
}

.adp-auth-hero-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.12) 48%, transparent 58%);
    transform: translateX(-120%);
    animation: adp-auth-sheen 8s ease-in-out infinite;
}

.adp-auth-hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
}

.adp-auth-logo {
    display: block;
    width: 150px;
    height: auto;
    flex: 0 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.adp-auth-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 360px;
}

.adp-auth-eyebrow {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.adp-auth-hero-title {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.adp-auth-hero-sub {
    margin: 2px 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}

.adp-auth-hero-features {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.adp-auth-hero-features li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
}
.adp-auth-hero-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: #fff;
    opacity: 0.85;
}

/* ================================== Pane ================================= */

.adp-auth-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 44px 48px 28px;
    background: var(--adpa-surface);
}

.adp-auth-pane-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: adp-auth-pane-in 0.5s var(--adpa-ease) 60ms both;
}

/* ============================== Page head ================================ */

.adp-auth-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
}

.adp-auth-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--adpa-radius-lg);
    background: var(--adpa-accent-soft);
    color: var(--adpa-accent);
}
.adp-auth-icon .rzi { font-size: 1.35rem; }

.adp-auth-titles { min-width: 0; }

/* Long account names, addresses and validation messages must not widen the card. */
.adp-auth-titles,
.adp-auth-hero-copy,
.adp-auth .adp-alert-text,
.adp-auth-text,
.adp-auth-help,
.adp-auth-error,
.adp-auth-footer,
.adp-auth-note > span,
.adp-auth-steps li > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.adp-auth-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--adpa-text);
}

.adp-auth-sub {
    margin: 3px 0 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--adpa-dim);
}

/* ============================ Status banner ============================== */

.adp-auth .adp-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid var(--adpa-border);
    border-radius: var(--adpa-radius);
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--adpa-text);
}
.adp-auth .adp-alert-icon { flex: 0 0 auto; margin-top: 1px; font-size: 1.1rem; }
.adp-auth .adp-alert-text { min-width: 0; }
.adp-auth .adp-alert-danger {
    border-color: color-mix(in srgb, var(--adpa-danger) 35%, transparent);
    background: color-mix(in srgb, var(--adpa-danger) 8%, transparent);
}
.adp-auth .adp-alert-danger .adp-alert-icon { color: var(--adpa-danger); }
.adp-auth .adp-alert-success {
    border-color: color-mix(in srgb, var(--adpa-ok) 35%, transparent);
    background: color-mix(in srgb, var(--adpa-ok) 9%, transparent);
}
.adp-auth .adp-alert-success .adp-alert-icon { color: var(--adpa-ok); }

/* ================================= Form ================================== */

.adp-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}

.adp-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.adp-auth-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.adp-auth-label {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--adpa-dim);
}

.adp-auth .adp-auth-input,
.adp-auth .rz-textbox.adp-auth-input {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--adpa-border-strong) !important;
    border-radius: var(--adpa-radius) !important;
    background: var(--adpa-surface) !important;
    color: var(--adpa-text);
    font-family: inherit;
    font-size: 0.9rem;
    box-shadow: none !important;
    outline: none;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}
.adp-auth .adp-auth-input::placeholder { color: var(--adpa-faint); opacity: 1; }
.adp-auth .adp-auth-input:hover {
    border-color: color-mix(in srgb, var(--adpa-text) 36%, transparent) !important;
}
.adp-auth .adp-auth-input:focus,
.adp-auth .adp-auth-input:focus-visible {
    border-color: var(--adpa-accent) !important;
    box-shadow: 0 0 0 3px var(--adpa-accent-soft) !important;
}
.adp-auth .adp-auth-input.invalid { border-color: var(--adpa-danger) !important; }
.adp-auth .adp-auth-input.invalid:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--adpa-danger) 18%, transparent) !important;
}
/* Keep browser autofill on the theme surface instead of the UA's pale yellow. */
.adp-auth .adp-auth-input:-webkit-autofill,
.adp-auth .adp-auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--adpa-surface) inset !important;
    -webkit-text-fill-color: var(--adpa-text);
    caret-color: var(--adpa-text);
}

.adp-auth-input-wrap { position: relative; }
.adp-auth .adp-auth-input-wrap .adp-auth-input { padding-right: 42px; }

.adp-auth-eye {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--adpa-radius-sm);
    background: transparent;
    color: var(--adpa-faint);
    cursor: pointer;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.adp-auth-eye:hover { background: var(--adpa-hover); color: var(--adpa-text); }
.adp-auth-eye:focus-visible { outline: 2px solid var(--adpa-accent); outline-offset: 1px; }
.adp-auth-eye .rzi { font-size: 1.15rem; }

.adp-auth-help {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--adpa-dim);
}

/* Validation: icon + text, never colour alone. The wrapper is always rendered so
   aria-describedby has a target; it collapses while <ValidationMessage> is empty. */
.adp-auth-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--adpa-danger);
}
.adp-auth-error > .rzi {
    display: none;
    order: -1;
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 1rem;
}
.adp-auth-error > .validation-message ~ .rzi { display: inline-flex; }
.adp-auth-error .validation-message { display: block; min-width: 0; }
.adp-auth-error:not(:has(.validation-message)) { display: none; }

.adp-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.adp-auth-link {
    font-size: 0.84rem;
    font-weight: 600;
}

/* Square-rounded custom checkbox. */
.adp-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
    color: var(--adpa-text);
    cursor: pointer;
    user-select: none;
}
.adp-auth-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    display: inline-grid;
    place-content: center;
    border: 1px solid var(--adpa-border-strong);
    border-radius: var(--adpa-radius-sm);
    background: var(--adpa-surface);
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease;
}
.adp-auth-check input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 5px;
    margin-top: -2px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.1s ease;
}
.adp-auth-check input[type="checkbox"]:hover { border-color: var(--adpa-accent); }
.adp-auth-check input[type="checkbox"]:checked {
    background: var(--adpa-accent);
    border-color: var(--adpa-accent);
}
.adp-auth-check input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.adp-auth-check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--adpa-accent);
    outline-offset: 2px;
}

/* ============================== Buttons ================================== */

.adp-auth-submit,
.adp-auth-submit.rz-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid transparent !important;
    border-radius: var(--adpa-radius) !important;
    background: var(--adpa-accent) !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: 0.005em;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    text-transform: none;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none !important;
    overflow: hidden;
    transition: background-color 0.1s ease, transform 0.1s ease;
}
.adp-auth-submit:hover { background: var(--adpa-accent-strong) !important; color: #fff !important; }
.adp-auth-submit:active { transform: scale(0.99); }
.adp-auth-submit:focus-visible { outline: 2px solid var(--adpa-accent); outline-offset: 2px; }
.adp-auth-submit[disabled],
.adp-auth-submit.is-busy { cursor: progress; opacity: 0.82; transform: none; }

.adp-auth-submit-secondary,
.adp-auth-submit-secondary.rz-button {
    background: transparent !important;
    color: var(--adpa-text) !important;
    border-color: var(--adpa-border-strong) !important;
}
.adp-auth-submit-secondary:hover { background: var(--adpa-hover) !important; color: var(--adpa-text) !important; }

.adp-auth-submit-label { display: inline-block; min-width: 0; }

/* Thin ring, shown only while the form is busy. */
.adp-auth-spinner {
    display: none;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: adp-auth-spin 0.8s linear infinite;
}
.is-busy .adp-auth-spinner { display: inline-block; }

/* ============================== Footer =================================== */

.adp-auth-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--adpa-border);
    font-size: 0.85rem;
    color: var(--adpa-dim);
}
.adp-auth-footer p { margin: 0; }

/* ======================= Result / confirmation pages ===================== */

.adp-auth-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.adp-auth-result-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--adpa-radius-lg);
    background: var(--adpa-accent-soft);
    color: var(--adpa-accent);
}
.adp-auth-result-icon .rzi { font-size: 1.6rem; }
.adp-auth-result-icon.is-ok { background: color-mix(in srgb, var(--adpa-ok) 13%, transparent); color: var(--adpa-ok); }
.adp-auth-result-icon.is-danger { background: color-mix(in srgb, var(--adpa-danger) 12%, transparent); color: var(--adpa-danger); }
.adp-auth-result-icon.is-warn { background: color-mix(in srgb, var(--adpa-warn) 14%, transparent); color: var(--adpa-warn); }
.adp-auth-result-icon.is-info { background: color-mix(in srgb, var(--adpa-info) 13%, transparent); color: var(--adpa-info); }

.adp-auth-result .adp-auth-title { margin-top: 2px; }
.adp-auth-result .adp-alert { margin: 0; }

.adp-auth-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--adpa-dim);
}
.adp-auth-text strong { font-weight: 600; color: var(--adpa-text); overflow-wrap: anywhere; }

.adp-auth-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.adp-auth-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--adpa-text);
}
.adp-auth-step-num {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--adpa-border);
    border-radius: var(--adpa-radius-sm);
    background: var(--adpa-inset);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--adpa-dim);
    font-variant-numeric: tabular-nums;
}

.adp-auth-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid var(--adpa-border);
    border-radius: var(--adpa-radius);
    background: var(--adpa-inset);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--adpa-dim);
}
.adp-auth-note > .rzi { flex: 0 0 auto; font-size: 1rem; color: var(--adpa-accent); }

.adp-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.adp-auth-actions form { display: flex; margin: 0; }

/* ============================== Motion =================================== */

@keyframes adp-auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes adp-auth-pane-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes adp-auth-sheen {
    0%, 100% { transform: translateX(-120%); }
    34%, 66% { transform: translateX(120%); }
}
@keyframes adp-auth-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .adp-auth-card,
    .adp-auth-pane-body { animation: none; }
    .adp-auth-hero-sheen { display: none; }
    .adp-auth-spinner { animation: none; border-color: rgba(255, 255, 255, 0.6); border-top-color: #fff; }
    .adp-auth *,
    .adp-auth *::before,
    .adp-auth *::after { transition: none !important; }
}

/* ============================ Responsive ================================= */

@media (max-width: 900px) {
    .adp-auth { padding: 20px 16px; }
    .adp-auth-card { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
    .adp-auth-hero { min-height: 180px; }
    .adp-auth-hero-shade-top { height: 90px; }
    .adp-auth-hero-shade-bottom { height: 140px; }
    .adp-auth-hero-content {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 22px;
    }
    .adp-auth-logo { width: 104px; align-self: flex-start; }
    .adp-auth-hero-sub,
    .adp-auth-hero-features { display: none; }
    .adp-auth-hero-copy { align-items: flex-end; text-align: right; gap: 2px; }
    .adp-auth-hero-title { font-size: 1.35rem; }
    .adp-auth-pane { padding: 30px 30px 22px; }
}

@media (max-width: 640px) {
    .adp-auth {
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    .adp-auth-hero { min-height: 128px; }
    .adp-auth-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 18px;
    }
    .adp-auth-hero-copy { align-items: flex-start; text-align: left; }
    .adp-auth-pane { padding: 24px 18px 18px; }
    .adp-auth-field-row { grid-template-columns: minmax(0, 1fr); }
    .adp-auth-title { font-size: 1.25rem; }
    .adp-auth-head { align-items: flex-start; gap: 12px; }
    .adp-auth-label { font-size: 0.8rem; letter-spacing: 0.025em; }
    .adp-auth-help,
    .adp-auth-error,
    .adp-auth-note { font-size: 0.84rem; }
}

/* Native controls remain comfortable with a touch keyboard and do not trigger
   Safari's input zoom. Keep the compact desktop layout for fine pointers. */
@media (max-width: 640px), (pointer: coarse) {
    .adp-auth .adp-auth-input,
    .adp-auth .rz-textbox.adp-auth-input {
        height: 48px;
        min-width: 0;
        font-size: 16px;
        scroll-margin-block: 20px;
    }
    .adp-auth .adp-auth-input-wrap .adp-auth-input { padding-right: 52px; }
    .adp-auth-eye {
        top: 2px;
        right: 2px;
        width: 44px;
        height: 44px;
    }
    .adp-auth-check,
    .adp-auth-link {
        min-height: 44px;
        max-width: 100%;
    }
    .adp-auth-link {
        display: inline-flex;
        align-items: center;
        min-width: 44px;
        padding-block: 8px;
    }
    .adp-auth-text a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
    .adp-auth-footer p + p { margin-top: 4px; }
}
