/* Standard Desktop Styling */
html,
body {
    height: 100%;
}

.login-body {
    margin: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Prevent mobile webkit browsers from dropping content behind the navigation bar */
    overflow-x: hidden;
}

.split-login {
    display: flex;
    min-height: 100vh;
}

/* ---- Left side: login card ---- */
.login-side {
    flex: 0 0 42%;
    max-width: 42%;
    background-color: var(--bs-body-bg);
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 380px;
}

.login-logo .logo {
    object-fit: contain;
    max-height: 52px;
}

.login-logo img.logo {
    filter: drop-shadow(1px 0 0 rgba(255, 255, 255, 0.87)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.87)) drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.87)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.87)); /* White border around an uploaded logo for correct display on darker themes */
}

.login-card form {
    width: 100%;
}

.login-card .form-floating:focus-within,
.login-card .input-group:focus-within {
    z-index: 2;
}

.login-card input[name="username"],
.login-card span[id="input-username"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.login-card input[name="password"],
.login-card span[id="input-password"] {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.login-footer-mark svg {
    color: var(--bs-primary);
}

.alert div:not(:first-child) {
    margin-top: 1rem; /* Space between multiple validation errors */
}

.bi {
    height: 1em;
}

/* ---- Right side: full-height promo panel ---- */
.promo-side {
    flex: 1 1 auto;
    min-height: 100vh;
    color: #fff;
    padding: 3rem 3.5rem;
    background:
        radial-gradient(circle at 85% 0%, rgba(255, 196, 120, 0.25), transparent 40%),
        radial-gradient(circle at 10% 100%, rgba(255, 255, 255, 0.14), transparent 45%),
        linear-gradient(155deg, rgba(var(--bs-primary-rgb), 0.95) 0%, #0b1526 70%);
}

.promo-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.promo-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
}

.promo-blob-1 {
    width: 320px;
    height: 320px;
    top: -60px;
    right: -60px;
    background: rgba(255, 255, 255, 0.35);
}

.promo-blob-2 {
    width: 260px;
    height: 260px;
    bottom: 5%;
    left: -40px;
    background: rgba(var(--bs-primary-rgb), 0.55);
}

.promo-blob-3 {
    width: 220px;
    height: 220px;
    bottom: -60px;
    right: 15%;
    background: rgba(255, 255, 255, 0.18);
}

.promo-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at 30% 30%, black, transparent 75%);
}

.promo-content {
    max-width: 620px;
}

.promo-logo .logo {
    object-fit: contain;
    max-height: 56px;
    margin-bottom: 1.5rem;
}

.promo-logo img.logo {
    filter: drop-shadow(1px 0 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9)) drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.9)); /* Keeps an uploaded logo readable against the dark promo background */
}

.promo-badge {
    background-color: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.4em 0.9em;
}

.promo-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    max-width: 560px;
}

.promo-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.78);
}

.promo-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 0.9rem;
}

.promo-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    margin-right: 0.6rem;
}

.promo-check svg {
    width: 0.95rem;
    height: 0.95rem;
}

.promo-text {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

footer a:not(:hover) {
    text-decoration: none;
}

/* Mobile Styling */
@media (max-width: 767.98px) {
    .split-login {
        flex-direction: column;
        min-height: auto;
    }

    .login-side,
    .promo-side {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .login-side {
        padding: 2rem 1.5rem;
    }

    .promo-side {
        min-height: auto;
        padding: 2.5rem 1.5rem;
    }

    .promo-logo {
        justify-content: center !important;
    }

    .promo-logo .logo {
        max-height: 72px;
    }

    .promo-content {
        max-width: 100%;
        text-align: center;
    }

    .promo-title {
        font-size: 1.5rem;
        max-width: 100%;
    }

    .promo-badge {
        align-self: center;
    }

    .promo-features {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

/* Specific Styling */
@media (max-width: 359.98px) {
    .g-recaptcha {
        overflow-x: auto; /* Makes sure reCAPTCHA is usable on the smallest screens */
        min-height: 86px;
    }
}
