.auth-split {
    --auth-teal-100: #d9efed;
    --auth-teal-300: #7fd2cb;
    --auth-teal-400: #56c0b8;
    --auth-teal-500: #3aada8;
    --auth-teal-600: #2d9490;
    --auth-teal-700: #1f7a7c;
    --auth-surface: #f3f8f9;
    --auth-card: #ffffff;
    --auth-border: #e3ecee;
    --auth-ink: #123a3d;
    --auth-muted: #6d8589;
    --auth-field-bg: #eaeefb;
    --auth-field-border: #dbe1f5;
    --auth-warn-bg: #fdf4e3;
    --auth-warn-border: #f3ddb0;
    --auth-warn-ink: #9a6a12;

    display: flex;
    min-height: 100vh;
    max-width: 100%;
    background-color: var(--auth-surface);
}

/* Full-bleed page: nothing here is meant to scroll sideways. */
.auth-body {
    margin: 0;
    overflow-x: hidden;
    background-color: #f3f8f9;
}

/* ------------------------------------------------------------------ hero */

.auth-hero {
    position: relative;
    flex: 1 1 56%;
    /* without this a flex item refuses to shrink past its min-content width */
    min-width: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    isolation: isolate;
    padding: 2.5rem 3rem;
    color: #fff;
    background: linear-gradient(150deg, #79cfc8 0%, #4fb9b3 38%, #2f9a99 78%, #1f8285 100%);
}

.auth-hero__art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-hero__art-image,
.auth-hero__art-veil {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* Portrait artwork in a landscape panel: cover and crop evenly, keeping the
   building centred. Shown in its own colours - no blend mode. */
.auth-hero__art-image {
    object-fit: cover;
    object-position: center;
    opacity: .6;
}

/* Teal wash weighted to the left, where the hero copy sits. Near-solid at the
   headline, clearing by the right edge so the illustration reads there. */
.auth-hero__art-veil {
    background:
        linear-gradient(105deg,
            rgba(11, 78, 82, .84) 0%,
            rgba(14, 92, 95, .66) 35%,
            rgba(20, 112, 115, .26) 65%,
            rgba(31, 130, 133, 0) 100%),
        linear-gradient(180deg,
            rgba(11, 74, 78, .22) 0%,
            rgba(11, 74, 78, 0) 28%);
}

.auth-hero > *:not(.auth-hero__art) {
    position: relative;
    z-index: 1;
}

/* White plate: the wordmark is dark navy and would sink into the teal panel. */
.auth-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: .45rem .8rem;
    border-radius: .65rem;
    background-color: #fff;
    box-shadow: 0 6px 18px rgba(12, 61, 62, .16);
}

.auth-logo__img {
    display: block;
    height: 28px;
    width: auto;
}

.auth-brandline {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.auth-brandline__caption {
    max-width: 11rem;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(255, 255, 255, .92);
}

.auth-hero__content {
    margin-top: 3.25rem;
}

.auth-hero__title {
    max-width: 20ch;
    margin-bottom: 1.15rem;
    font-size: clamp(1.9rem, 2.4vw, 2.65rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.auth-hero__lead {
    max-width: 46ch;
    margin-bottom: 2rem;
    font-size: .92rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .88);
}

.auth-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    max-width: 30rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem .95rem;
    font-size: .84rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: .6rem;
    background-color: rgba(255, 255, 255, .12);
}

.auth-feature svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    opacity: .9;
}

.auth-hero__footer {
    /* absorbs the leftover column space, keeping the footer at the bottom */
    margin-top: auto;
    padding-top: 1.75rem;
    font-size: .82rem;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, .25);
    color: rgba(255, 255, 255, .85);
}

.auth-hero__footer strong {
    display: block;
    font-weight: 700;
    color: #fff;
}

/* ----------------------------------------------------------------- panel */

.auth-panel {
    flex: 1 1 44%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 27rem;
    padding: 1.85rem;
    border: 1px solid var(--auth-border);
    border-radius: .85rem;
    background-color: var(--auth-card);
    box-shadow: 0 18px 45px rgba(18, 58, 61, .07);
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1rem;
    padding: .3rem .6rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: .35rem;
    background-color: #e2f3f1;
    color: var(--auth-teal-700);
}

.auth-badge svg {
    width: 13px;
    height: 13px;
}

.auth-card__title {
    margin-bottom: .35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-ink);
}

.auth-card__subtitle {
    margin-bottom: 1.25rem;
    font-size: .82rem;
    line-height: 1.55;
    color: var(--auth-muted);
}

.auth-note {
    display: flex;
    gap: .6rem;
    margin-bottom: 1.25rem;
    padding: .75rem .85rem;
    font-size: .76rem;
    line-height: 1.5;
    border: 1px solid var(--auth-warn-border);
    border-radius: .5rem;
    background-color: var(--auth-warn-bg);
    color: #7c5a1c;
}

.auth-note svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin-top: .1rem;
    color: var(--auth-warn-ink);
}

.auth-note strong {
    display: block;
    color: var(--auth-warn-ink);
}

.auth-note--danger {
    border-color: #f2c9c4;
    background-color: #fdf0ee;
    color: #9a3d31;
}

.auth-note--danger svg,
.auth-note--danger strong {
    color: #b4372a;
}

.auth-note ul {
    margin: 0;
    padding-left: 1rem;
}

.auth-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--auth-field-border);
    border-radius: .5rem;
    background-color: var(--auth-field-bg);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-field:focus-within {
    border-color: var(--auth-teal-500);
    box-shadow: 0 0 0 .18rem rgba(58, 173, 168, .18);
}

.auth-field__icon,
.auth-field__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    flex: 0 0 auto;
    color: var(--auth-muted);
}

.auth-field__icon svg,
.auth-field__toggle svg {
    width: 16px;
    height: 16px;
}

.auth-field__toggle {
    padding: 0;
    border: 0;
    background: none;
    align-self: stretch;
    cursor: pointer;
}

.auth-field__toggle:hover {
    color: var(--auth-ink);
}

.auth-field .form-control {
    /* an <input> defaults to a ~20ch min-content width, which would push the
       icon and toggle past the card edge on narrow screens */
    min-width: 0;
    padding: .55rem .25rem;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: .87rem;
    color: var(--auth-ink);
}

.auth-field .form-control:focus {
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--auth-ink);
}

.auth-field .form-control::placeholder {
    color: #9aabae;
}

.auth-field .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 3rem var(--auth-field-bg) inset;
    -webkit-text-fill-color: var(--auth-ink);
}

.auth-fieldmsg {
    display: block;
    margin-top: .3rem;
    font-size: .74rem;
    color: #d9534f;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 1rem 0 1.15rem;
    font-size: .8rem;
}

.auth-options .form-check-label {
    color: var(--auth-ink);
}

.auth-options .form-check-input:checked {
    background-color: var(--auth-teal-500);
    border-color: var(--auth-teal-500);
}

.auth-link {
    font-weight: 600;
    color: var(--auth-teal-700);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 100%;
    padding: .65rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    border: 0;
    border-radius: .5rem;
    background-color: var(--auth-teal-500);
    color: #fff;
    transition: background-color .15s ease;
}

.auth-submit:hover,
.auth-submit:focus {
    background-color: var(--auth-teal-600);
    color: #fff;
}

.auth-submit:disabled {
    opacity: .7;
}

.auth-submit svg {
    width: 16px;
    height: 16px;
}

.auth-restricted {
    display: flex;
    gap: .6rem;
    margin-top: 1.15rem;
    padding: .75rem .85rem;
    font-size: .72rem;
    line-height: 1.5;
    border: 1px solid var(--auth-border);
    border-radius: .5rem;
    background-color: #f7fafb;
    color: var(--auth-muted);
}

.auth-restricted svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    margin-top: .1rem;
}

.auth-divider {
    margin: 1.35rem 0 .85rem;
    padding-top: 1.15rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
}

.auth-methods {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.auth-method {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .6rem;
    font-size: .72rem;
    font-weight: 600;
    border: 1px solid var(--auth-border);
    border-radius: .4rem;
    background-color: #fff;
    color: var(--auth-muted);
    cursor: not-allowed;
}

.auth-method svg {
    width: 13px;
    height: 13px;
}

.auth-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    font-size: .7rem;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
}

.auth-meta strong {
    font-weight: 700;
    color: var(--auth-ink);
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .45rem;
    font-weight: 600;
    border-radius: .3rem;
    background-color: #e2f3f1;
    color: var(--auth-teal-700);
}

.auth-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--auth-teal-500);
}

.auth-panel__footer {
    max-width: 24rem;
    margin-top: 1.5rem;
    font-size: .72rem;
    line-height: 1.7;
    text-align: center;
    color: var(--auth-muted);
}

.auth-panel__footer a {
    margin: 0 .35rem;
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-panel__footer a:hover {
    color: var(--auth-teal-700);
    text-decoration: underline;
}

/* ----------------------------------------------------------- breakpoints */

@media (min-width: 992px) {
    .auth-hero {
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.35rem;
    }
}

/* ------------------------------------------------------------ dark theme */

[data-bs-theme="dark"] .auth-split {
    --auth-surface: #16211f;
    --auth-card: #1b2725;
    --auth-border: #2c3b39;
    --auth-ink: #e6f1ef;
    --auth-muted: #94a9a7;
    --auth-field-bg: #22302e;
    --auth-field-border: #33443f;
    --auth-warn-bg: #2c2517;
    --auth-warn-border: #4b3d1d;
    --auth-warn-ink: #e0b45f;
}

[data-bs-theme="dark"] .auth-body {
    background-color: #16211f;
}

[data-bs-theme="dark"] .auth-badge,
[data-bs-theme="dark"] .auth-chip {
    background-color: #22403d;
    color: #7fd2cb;
}

[data-bs-theme="dark"] .auth-restricted,
[data-bs-theme="dark"] .auth-method {
    background-color: #202d2b;
}

[data-bs-theme="dark"] .auth-note {
    color: #d8c69c;
}

[data-bs-theme="dark"] .auth-note--danger {
    border-color: #5c2d26;
    background-color: #2d1b18;
    color: #eaa79b;
}

[data-bs-theme="dark"] .auth-link {
    color: var(--auth-teal-300);
}
