.nd-auth.bg-pattern {
    background-color: var(--nd-canvas);
    background-image: radial-gradient(var(--nd-line-strong) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* 1.6 polish (WP5): brand photo under a 40% accent scrim, compact mark on phones, inline gate. */
.nd-auth--inline { min-height: 0; padding-block: 40px 64px; }
.nd-auth__brand.has-image { background: var(--nd-dark); }
.nd-auth__brand-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nd-auth__brand.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--nd-accent-rgb), 0.4) 0%, rgba(var(--nd-accent-rgb), 0.4) 45%, rgba(15, 23, 42, 0.72) 100%); }
.nd-auth__brand > :not(.nd-auth__brand-image) { position: relative; }
.nd-auth__brand.has-image .nd-auth__brand-glow { display: none; }
.nd-auth__mark { display: none; width: 40px; height: 40px; place-items: center; margin-bottom: 4px; border-radius: var(--nd-radius-sm); background: var(--nd-accent); color: var(--nd-on-accent); font: var(--nd-fw-bold) var(--nd-fs-18)/1 var(--nd-font); }
@media (max-width: 859.98px) { .nd-auth__mark { display: grid; } }
.nd-auth .nd-page-head__title { text-wrap: balance; }
.nd-auth__lede { margin: 0; color: var(--nd-muted); font-size: var(--nd-fs-14); line-height: 1.55; }
.nd-auth .nd-auth__remember { gap: 8px; min-height: 44px; color: var(--nd-ink-2); }
.nd-auth .nd-auth__remember input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--nd-line-strong); border-radius: var(--nd-radius-xs); background: var(--nd-surface); cursor: pointer; transition: background-color var(--nd-dur-1) var(--nd-ease), border-color var(--nd-dur-1) var(--nd-ease); }
.nd-auth .nd-auth__remember input::after { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid var(--nd-on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform var(--nd-dur-1) var(--nd-ease); }
.nd-auth .nd-auth__remember input:checked { border-color: var(--nd-accent); background: var(--nd-accent); }
.nd-auth .nd-auth__remember input:checked::after { transform: rotate(45deg) scale(1); }
.nd-auth .nd-auth__remember input:focus-visible { outline: none; box-shadow: var(--nd-ring); }
.nd-auth__brand.has-image::before { background: linear-gradient(180deg, rgba(var(--nd-accent-rgb), 0.4) 0%, rgba(var(--nd-accent-rgb), 0.4) 30%, rgba(15, 23, 42, 0.88) 78%, rgba(15, 23, 42, 0.94) 100%); }
.nd-auth__brand.has-image .nd-auth__brand-title,
.nd-auth__brand.has-image .nd-auth__brand-list { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.nd-auth .nd-auth__panels { min-height: 0; }
@media (max-width: 859.98px) {
    .nd-auth { justify-content: flex-start; min-height: 0; padding: 24px 16px 48px; }
    .nd-auth__card { border-radius: var(--nd-radius-lg); box-shadow: var(--nd-shadow-2); }
}

/* ---------------------------------------------------------------------------
 * 1.6 round 2 (R2-B): readable brand panel, no dead space, phone alignment.
 * ------------------------------------------------------------------------- */
/* The photo, the wash and the text are stacked explicitly: the wash used to paint under the <img>. */
.nd-auth__brand.has-image .nd-auth__brand-image { z-index: 0; }
.nd-auth__brand.has-image::before {
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0) 35%, rgba(15, 23, 42, 0.55) 62%, rgba(15, 23, 42, 0.86) 100%),
        linear-gradient(0deg, rgba(var(--nd-accent-rgb), 0.4), rgba(var(--nd-accent-rgb), 0.4));
}
.nd-auth__brand.has-image > :not(.nd-auth__brand-image) { z-index: 2; }
.nd-auth__brand.has-image .nd-auth__brand-name { text-shadow: 0 1px 2px rgba(15, 23, 42, 0.45); }
.nd-auth__brand.has-image .nd-auth__brand-list { color: var(--nd-on-dark); }
.nd-auth__brand.has-image .nd-auth__brand-list li::before { background-color: rgba(255, 255, 255, 0.24); }
/* The page is as tall as its card: no empty band before the footer. */
.nd-auth:not(.nd-auth--inline) { min-height: 0; justify-content: flex-start; padding-block: 48px 0; }
.nd-auth__card { min-height: 560px; }
.nd-auth__main { align-content: center; }
@media (min-width: 768px) and (max-width: 859.98px) {
    /* Tablets: brand panel beside the form, so the form is not a 720px-wide sheet. */
    .nd-auth__card { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); min-height: 520px; }
    .nd-auth__brand { display: flex; padding: 28px; }
    .nd-auth .nd-auth__brand-title { font-size: 28px; }
    .nd-auth__mark { display: none; }
    .nd-auth__main { align-content: center; }
    .nd-auth:not(.nd-auth--inline) { padding: 32px 0 0; }
}
@media (max-width: 767.98px) {
    /* Phones: the card's edge lines up with the logo (the page container already has the gutter). */
    .nd-auth:not(.nd-auth--inline) { padding: 16px 0 8px; }
    .nd-auth--inline { padding-inline: 0; }
    .nd-auth__card { min-height: 0; }
    .nd-auth__main { align-content: start; }
}
