.login-page {
    min-height: 100vh;
    background: #f7f8fc;
}

.login-shell {
    max-width: none;
    min-height: 100vh;
    padding: 0;
}

.login-layout {
    min-height: 100vh;
    align-items: stretch;
}

.login-brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2rem, 6vw, 5.5rem);
    color: #fff;
    background:
        radial-gradient(ellipse at 82% 18%, rgba(147, 139, 255, .26), transparent 34%),
        linear-gradient(145deg, #171a35 0%, #272650 48%, #5148b5 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-brand-panel::before {
    top: 9%;
    right: -17rem;
    width: 40rem;
    height: 40rem;
}

.login-brand-panel::after {
    top: 17%;
    right: -11rem;
    width: 28rem;
    height: 28rem;
}

.login-brand-content {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.login-client-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.login-client-brand .brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 15px;
    color: #fff;
    background: rgba(255, 255, 255, .13);
    box-shadow: 0 10px 24px rgba(8, 10, 30, .18);
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.login-client-brand .brand-name {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.025em;
}

.login-brand-message {
    position: relative;
    z-index: 1;
    max-width: 570px;
    margin-block: auto;
    padding: 4rem 0 8rem;
}

.login-kicker {
    margin-bottom: 1.15rem;
    color: rgba(229, 227, 255, .78);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .16em;
}

.login-brand-message h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.8rem, 5.4vw, 5rem);
    font-weight: 650;
    letter-spacing: -.065em;
    line-height: 1.04;
}

.login-brand-message h1 span {
    color: #c9c5ff;
}

.login-brand-message > p:last-child {
    max-width: 38ch;
    margin: 1.5rem 0 0;
    color: rgba(245, 245, 255, .76);
    font-size: 1rem;
    line-height: 1.7;
}

.login-brand-art {
    position: absolute;
    right: -1.5rem;
    bottom: -3rem;
    width: min(31vw, 390px);
    aspect-ratio: 1;
    pointer-events: none;
}

.login-art-orbit,
.login-art-core,
.login-art-glow {
    position: absolute;
    display: block;
    border-radius: 50%;
}

.login-art-orbit {
    inset: 9%;
    border: 1px solid rgba(255, 255, 255, .22);
    transform: rotate(-24deg) scaleY(.66);
}

.login-art-orbit-inner {
    inset: 19%;
    border-color: rgba(255, 255, 255, .15);
    transform: rotate(38deg) scaleY(.7);
}

.login-art-core {
    inset: 31%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(169,160,255,.08));
    box-shadow: 0 0 75px rgba(173, 165, 255, .25), inset 0 0 45px rgba(255, 255, 255, .1);
    backdrop-filter: blur(4px);
}

.login-art-glow {
    top: 23%;
    right: 17%;
    width: 9%;
    aspect-ratio: 1;
    background: #e2dfff;
    box-shadow: 0 0 24px 8px rgba(206, 201, 255, .4);
}

.login-brand-footnote {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: rgba(242, 242, 255, .66);
    font-size: .77rem;
}

.login-brand-footnote-dot {
    width: .42rem;
    height: .42rem;
    flex: 0 0 .42rem;
    border-radius: 50%;
    background: #b7b2ff;
    box-shadow: 0 0 0 4px rgba(183, 178, 255, .13);
}

.login-form-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 5rem);
    background:
        radial-gradient(ellipse at 90% 8%, rgba(98, 88, 217, .045), transparent 35%),
        linear-gradient(145deg, #fff 0%, #f8f9fd 100%);
}

.login-form-wrap {
    width: min(100%, 440px);
}

.login-form-heading {
    margin-bottom: 1.65rem;
}

.login-form-heading .eyebrow {
    color: var(--app-primary, #6258d9);
}

.login-title {
    color: #1d2340;
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -.05em;
}

.login-form-heading > p:last-child {
    font-size: .95rem;
}

.login-card {
    overflow: visible;
    border: 1px solid rgba(225, 228, 239, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 24px 64px rgba(31, 39, 82, .09), 0 3px 12px rgba(31, 39, 82, .035);
    backdrop-filter: blur(14px);
}

.login-card-body {
    padding: clamp(1.5rem, 3.5vw, 2.35rem);
}

.login-card .alert {
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.5;
}

.login-card .alert-danger {
    border-color: #f4d0d5;
    color: #8d2938;
    background: #fff5f6;
}

.login-card .alert-success {
    border-color: #ccebdc;
    color: #216747;
    background: #f2fbf6;
}

.login-card .form-label {
    margin-bottom: .55rem;
    color: #303650;
    font-size: .84rem;
    font-weight: 650;
}

.login-input {
    border-radius: 13px;
}

.login-input .input-group-text,
.login-input .form-control,
.login-input .password-toggle {
    min-height: 56px;
    border-color: #e3e6ef;
    background-color: #fff;
}

.login-input .input-group-text {
    padding-inline: 1rem;
    color: #858ba0;
    border-right: 0;
    border-radius: 13px 0 0 13px;
}

.login-input .form-control {
    padding-inline: .5rem;
    color: #1d2340;
    border-right: 0;
    border-left: 0;
    font-size: .9rem;
}

.login-input .form-control::placeholder {
    color: #a0a5b4;
    font-size: .85rem;
}

.login-input .form-control:focus {
    border-color: var(--app-primary, #6258d9);
    box-shadow: none;
}

.login-input .password-toggle {
    min-width: 52px;
    color: #858ba0;
    border-left: 0;
    border-radius: 0 13px 13px 0;
}

.login-input:focus-within .input-group-text,
.login-input:focus-within .form-control,
.login-input:focus-within .password-toggle {
    border-color: var(--app-primary, #6258d9);
}

.login-input:focus-within {
    box-shadow: 0 0 0 .22rem rgba(98, 88, 217, .13);
}

.password-toggle:hover {
    color: var(--app-primary, #6258d9);
}

.forgot-link {
    color: var(--app-primary, #6258d9);
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--app-primary-dark, #4e45bd);
    text-decoration: underline;
}

.login-card .form-check-label {
    color: #626a80;
    font-size: .85rem;
}

.sign-in-button {
    min-height: 54px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(105deg, var(--app-primary, #6258d9), #766be7);
    box-shadow: 0 9px 20px rgba(98, 88, 217, .2);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .01em;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.sign-in-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(105deg, var(--app-primary-dark, #4e45bd), var(--app-primary, #6258d9));
    box-shadow: 0 12px 24px rgba(98, 88, 217, .26);
}

.sign-in-button:disabled {
    cursor: wait;
    filter: saturate(.75);
    transform: none;
}

.sign-in-button:focus-visible,
.password-toggle:focus-visible,
.forgot-link:focus-visible {
    outline: 3px solid rgba(98, 88, 217, .35);
    outline-offset: 3px;
}

.login-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin-top: 1.7rem;
    color: #8b91a3;
    font-size: .74rem;
    text-align: center;
}

.login-partner-credit {
    margin: 0;
    color: #737b91;
    font-size: .78rem;
}

.login-partner-credit strong {
    color: #30364e;
    font-weight: 750;
    letter-spacing: .01em;
}

.login-transition[hidden] {
    display: none !important;
}

.login-transition {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 2rem;
    color: #fff;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(119, 108, 230, .32), transparent 38%),
        linear-gradient(145deg, #171a35 0%, #272650 48%, #5148b5 100%);
    animation: login-transition-enter .35s ease-out both;
}

.login-transition::before,
.login-transition::after {
    position: absolute;
    width: min(74vw, 680px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-transition::after {
    width: min(56vw, 510px);
    border-color: rgba(255, 255, 255, .06);
}

.login-transition-content {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    text-align: center;
    animation: login-transition-content-enter .55s .08s ease-out both;
}

.login-transition-orbit {
    position: relative;
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    margin: 0 auto 2rem;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(169, 160, 255, .08));
    box-shadow: 0 0 65px rgba(173, 165, 255, .24), inset 0 0 35px rgba(255, 255, 255, .1);
    font-size: 2rem;
    backdrop-filter: blur(8px);
}

.login-transition-orbit::before,
.login-transition-orbit::after {
    position: absolute;
    inset: -15px;
    border: 1px solid rgba(223, 220, 255, .36);
    border-radius: 50%;
    content: "";
    transform: rotate(-25deg) scaleY(.65);
    animation: login-transition-orbit 4s linear infinite;
}

.login-transition-orbit::after {
    inset: -5px;
    border-color: rgba(223, 220, 255, .2);
    transform: rotate(45deg) scaleY(.68);
    animation-direction: reverse;
    animation-duration: 6s;
}

.login-transition-brand {
    margin: 0 0 .85rem;
    color: rgba(232, 229, 255, .76);
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .24em;
}

.login-transition-content h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 650;
    letter-spacing: -.055em;
    line-height: 1.12;
}

.login-transition-content h2 span {
    color: #c9c5ff;
}

.login-transition-status {
    margin: 1.6rem 0 .85rem;
    color: rgba(245, 245, 255, .72);
    font-size: .92rem;
    animation: login-transition-pulse 1.5s ease-in-out infinite;
}

.login-transition-progress {
    display: block;
    width: min(190px, 70%);
    height: 3px;
    overflow: hidden;
    margin-inline: auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, .17);
}

.login-transition-progress span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: #d7d3ff;
    box-shadow: 0 0 14px rgba(215, 211, 255, .65);
    animation: login-transition-progress 1.05s ease-in-out infinite;
}

@keyframes login-transition-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes login-transition-content-enter {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes login-transition-orbit {
    to { rotate: 335deg; }
}

@keyframes login-transition-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(250%); }
}

@keyframes login-transition-pulse {
    50% { opacity: .58; }
}

@media (max-width: 991.98px) {
    .login-brand-panel {
        min-height: 340px;
        padding: 2rem clamp(1.5rem, 6vw, 3.5rem);
    }

    .login-brand-message {
        max-width: 620px;
        margin: 2.6rem 0 1rem;
        padding: 0 0 1.5rem;
    }

    .login-brand-message h1 {
        font-size: clamp(2.35rem, 6vw, 3.6rem);
    }

    .login-brand-art {
        right: 2rem;
        bottom: -5rem;
        width: min(34vw, 280px);
        opacity: .75;
    }

    .login-form-panel {
        min-height: auto;
        padding: 3.5rem 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .login-brand-panel {
        min-height: 300px;
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .login-brand-message {
        margin: 2rem 0 .5rem;
        padding-bottom: .5rem;
    }

    .login-brand-message h1 {
        font-size: clamp(2.15rem, 11vw, 3rem);
    }

    .login-brand-message > p:last-child {
        max-width: 32ch;
        margin-top: .9rem;
        font-size: .9rem;
    }

    .login-kicker {
        margin-bottom: .75rem;
        font-size: .62rem;
    }

    .login-brand-art {
        right: -4.5rem;
        bottom: -4rem;
        width: 220px;
        opacity: .48;
    }

    .login-brand-footnote {
        font-size: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-transition,
    .login-transition-content,
    .login-transition-orbit::before,
    .login-transition-orbit::after,
    .login-transition-status,
    .login-transition-progress span {
        animation: none;
    }

    .login-form-panel {
        padding: 2.5rem 1rem;
    }

    .login-form-heading {
        margin-bottom: 1.25rem;
    }

    .login-card {
        border-radius: 18px;
    }

    .login-card-body {
        padding: 1.35rem 1.15rem;
    }

    .login-footer {
        gap: .65rem;
        margin-top: 1.35rem;
        line-height: 1.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sign-in-button {
        transition: none;
    }
}

/* ===== Sign-in: photo hero (left) + form panel (right) ===== */
.login-split {
    --app-primary: #0f7c84;
    min-height: 100vh;
    color: #1d2340;
    background: #ffffff;
}

.ls-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

/* --- Hero --- */
.ls-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: clamp(2rem, 4.5vw, 4.5rem);
    color: #ffffff;
    background: linear-gradient(160deg, #0b3a46 0%, #0f5a64 55%, #14727b 100%);
}

.ls-hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: -2;
    aspect-ratio: 1080 / 900;
    -webkit-mask-image: linear-gradient(to bottom, #000 42%, transparent 92%);
    mask-image: linear-gradient(to bottom, #000 42%, transparent 92%);
}

.ls-hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Teal tint so the warm photo sits inside the brand colour, plus a floor for the text */
.ls-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, rgba(7, 38, 48, .96) 0%, rgba(7, 38, 48, .82) 28%, rgba(7, 38, 48, .35) 52%, rgba(7, 38, 48, 0) 72%),
        rgba(15, 106, 115, .22);
    content: "";
}

.ls-hero-content {
    max-width: 560px;
}

.ls-hero-kicker {
    margin: 0 0 .5rem;
    color: rgba(255, 255, 255, .78);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.ls-hero-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.1rem, 3.6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.08;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 24px rgba(4, 28, 36, .35);
}

.ls-hero-title::after {
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 1.1rem;
    border-radius: 4px;
    background: linear-gradient(90deg, #5fe0d4, #14a3a8);
    content: "";
}

/* --- Form panel --- */
.ls-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4.5rem) 5.5rem;
    background: #ffffff;
}

.ls-panel-inner {
    width: 100%;
    max-width: 400px;
}

.ls-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 2.4rem;
}

.ls-brand-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(145deg, #0c6b72, #14a3a8);
    box-shadow: 0 10px 22px rgba(15, 124, 132, .3);
}

.ls-brand-badge svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

.ls-brand-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.2;
}

.ls-brand-by {
    color: #7a8a94;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.ls-brand-name {
    color: #0b4f57;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.ls-brand-sub {
    margin-left: .15rem;
    color: #0f7c84;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 0;
}

.ls-heading {
    margin-bottom: 1.6rem;
}

.ls-heading h1 {
    margin: 0 0 .4rem;
    color: #14202b;
    font-size: clamp(1.8rem, 2.6vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.ls-heading p {
    margin: 0;
    color: #62707c;
    font-size: .95rem;
}

.ls-panel .login-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.ls-panel .login-card-body {
    padding: 0;
}

.ls-panel .sign-in-button {
    background: linear-gradient(105deg, #0c6b72, #14a3a8);
    box-shadow: 0 9px 20px rgba(15, 124, 132, .25);
}

.ls-panel .forgot-link {
    color: #0f7c84;
}

.ls-footer {
    position: absolute;
    right: 0;
    bottom: 1.5rem;
    left: 0;
    padding: 0 1.5rem;
    color: #8b97a3;
    font-size: .74rem;
    text-align: center;
}

.ls-footer p {
    margin: 0 0 .35rem;
    color: #6e7b87;
}

.ls-footer strong {
    color: #30364e;
}

/* --- Tablet and phone: hero becomes a banner above the form --- */
@media (max-width: 991.98px) {
    .ls-shell {
        grid-template-columns: 1fr;
    }

    .ls-hero {
        min-height: 260px;
        padding: 1.5rem;
    }

    .ls-hero-photo {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .ls-hero-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .ls-panel {
        min-height: auto;
        justify-content: flex-start;
        padding: 2rem 1.5rem 2rem;
    }

    .ls-footer {
        position: static;
        margin-top: 2.5rem;
        padding: 0;
    }
}
