/* Production login layout. */
.login-stage {
    /* The language/colour-mode utility row sits inside the stage below the
       card, so the stage only reserves its own padding to fit one viewport. */
    min-height: calc(100vh - 2.5rem);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.login-split {
    max-width: 980px;
    min-height: 560px;
    grid-template-columns: minmax(420px, 46%) 1fr;
    border-radius: 1.25rem;
}

.login-form-panel {
    padding: 3rem clamp(2rem, 4vw, 3.5rem);
}

.login-brand {
    gap: 0.625rem;
    width: fit-content;
    color: var(--bs-heading-color, #0b0f19);
    font-size: 1.125rem;
}

/* Silicon leaves --bs-heading-color dark ink in dark mode, so the brand must
   follow the theme-aware heading colour to stay readable. */
[data-bs-theme="dark"] .login-brand {
    color: var(--si-heading-color);
}

.login-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.35rem;
}

.login-brand-mark-dark {
    background: #111827;
}

/* The body fills the height below the top-pinned brand and centers its
   content; the padding keeps the designed brand gap when space runs out. */
.login-panel-body {
    padding-top: 3.75rem;
}

.login-auth-controls {
    max-width: 360px;
}

.auth-method-panel:not(.d-none) {
    animation: auth-method-in 160ms ease-out;
}

@keyframes auth-method-in {
    from {
        opacity: 0;
        transform: translateX(0.4rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-method-panel:not(.d-none) {
        animation: none;
    }
}

.login-visual-calm {
    background: linear-gradient(145deg, #3157d5 0%, #6b56d9 55%, #34a6c8 100%);
}

.visual-orbit {
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.visual-orbit-one {
    width: 26rem;
    height: 26rem;
    top: -8rem;
    right: -9rem;
}

.visual-orbit-two {
    width: 17rem;
    height: 17rem;
    top: 3rem;
    right: 1rem;
}

.visual-caption {
    max-width: 24rem;
}

.login-page {
    background: #f7f4ef;
}

/* Dark canvas: the portal's dark body colour, so the login shell sits on the
   same canvas as the portal's authenticated pages. */
[data-bs-theme="dark"] .login-page {
    background: #070a12;
}

/* Dark visual panel: the light gradient's stops deepened ~55% so the same
   blue → violet → cyan sweep reads against the dark canvas instead of
   glowing beside it. */
[data-bs-theme="dark"] .login-visual-calm {
    background: linear-gradient(145deg, #1a2f6b 0%, #362b6d 55%, #1a5364 100%);
}

@media (max-width: 991.98px) {
    .login-split {
        max-width: 560px;
        min-height: auto;
    }

    .login-form-panel {
        min-height: 0;
        padding: 2.5rem;
    }

    .login-brand {
        align-self: center;
    }

    .login-panel-body {
        align-items: center;
        padding-top: 2.75rem;
        width: 100%;
    }

    .login-copy {
        text-align: center;
        width: 100%;
    }

    .login-auth-controls {
        margin-left: auto;
        margin-right: auto;
    }

}

@media (max-width: 575.98px) {
    .login-stage {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .login-form-panel {
        padding: 1.5rem;
    }

    .login-shell {
        border-radius: 1rem;
    }

    .login-panel-body {
        padding-top: 2rem;
    }

}
