/* ── Background / scroll architecture ── */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Ithaca', serif;
}
/* ABP wrappers — must not constrain height */
.container-fluid, .lpx-login-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 !important;
}
.lpx-login-bg {
    flex: 1;
    background-image: url('/images/WebUI/Landscape.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    min-height: 100vh;
    max-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}
.auth-scroll-content {
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* ── Top logo ── */
.auth-top-logo {
    text-align: center;
    padding-top: 25px;
    line-height: 0;
}

.auth-top-logo img {
    image-rendering: pixelated;
    width: 349px;
    max-width: 100%;
    height: auto;
}

@media (min-width: 900px) {
    .auth-top-logo img {
        width: 698px; /* exactly 2x */
    }
}

/* ── Region picker card ── */
.region-picker-card {
    text-align: center;
}
.region-picker-title {
    font-family: 'Ithaca', serif;
    font-size: 2.4em;
    color: #ffff96;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}
.region-flags {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.region-flag {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #c8a96e;
    border-radius: 0;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.1s, background 0.1s;
    width: 140px;
    height: 150px;
    flex-shrink: 0;
    image-rendering: pixelated;
}
.region-flag:hover {
    border-color: #ffff96;
    background: rgba(255, 255, 150, 0.08);
}
.flag-image img {
    border-radius: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    margin: 0 auto 10px;
    width: 97px;
    height: 65px;
    display: block;
}
.selected-region-indicator img {
    width: 116px;
    height: 77px;
    display: block;
    margin: 0 auto;
}
.region-flag:hover .flag-image img {
    filter: brightness(1.1);
}
.flag-label {
    font-family: 'Ithaca', serif;
    font-size: 1.5em;
    color: #ffff96;
}

@media (max-width: 480px) {
    .region-flags {
        gap: 10px;
    }
    .region-flag {
        width: auto;
        flex: 0 1 140px;
        height: auto;
        min-height: 150px;
        padding: 16px 8px;
    }
}

/* ── Login heading ── */
.auth-login-heading {
    font-family: 'Ithaca', serif;
    font-size: 2.4em;
    color: #c8a96e;
    text-align: center;
    margin: 0 0 28px 0;
    letter-spacing: 1px;
}

/* ── Separator ── */
.auth-sep {
    display: flex;
    align-items: center;
    width: 50%;
    margin: 28px auto;
    gap: 5px;
}
.auth-sep-dot {
    display: block;
    width: 6px;
    height: 2px;
    background-color: #c8a96e;
    flex-shrink: 0;
}
.auth-sep-line {
    flex: 1;
    height: 2px;
    background-color: #c8a96e;
}

/* ── Selected region indicator ── */
.selected-region-indicator {
    text-align: center;
    margin-bottom: 28px;
}
.selected-region-indicator + .auth-sep,
.auth-login-heading + .auth-sep {
    margin-top: 0;
}
.selected-region-indicator img {
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
    border-radius: 6px;
}
.selected-region-indicator .region-change-link {
    display: block;
    font-family: 'Ithaca', serif;
    font-size: 1.3em;
    text-decoration: none;
    margin-top: 0.4rem;
    color: #c8a96e;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.selected-region-indicator .region-change-link:hover {
    color: #ffff97;
    opacity: 1;
}

/* ── Ornamental container (9-slice, fixed 2×) ── */
.auth-container {
    position: relative;
    width: 512px;
    max-width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-style: solid;
    border-color: transparent;
    border-image: url('/images/WebUI/Container_7.png') 16 fill / 32px stretch;
    padding: 32px 44px;
    margin-top: 34px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* Crest rests on the container's top edge; margin-top above reserves its height */
.auth-container::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
    height: 34px;
    background: url('/images/WebUI/Decorative_Element_3.png') center / 230px 34px no-repeat;
    image-rendering: pixelated;
    pointer-events: none;
}
.auth-container.region-picker-card { min-height: 300px; justify-content: flex-start; }
.auth-container.login-container { min-height: 520px; justify-content: flex-start; }

@media (max-width: 768px) {
    .auth-container {
        padding-left: 32px;
        padding-right: 32px;
    }
}
@media (max-width: 480px) {
    .auth-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.auth-container,
.auth-container label,
.auth-container .form-label,
.auth-container h2,
.auth-container .lpx-main-title,
.auth-container .region-picker-title {
    color: #ffff96;
}
.auth-container hr { display: none; }

/* ── Override Bootstrap text-danger for auth pages ── */
.text-danger,
.text-danger ul,
.text-danger li {
    color: #FFFF95 !important;
    font-size: 1.2rem !important;
}

/* ── Footer ── */
.sub-footer.footer-with-region-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    font-family: 'Ithaca', serif;
    margin-top: auto;
}

.sub-footer.footer-with-region-switcher .copyright {
    flex: 0 0 auto;
    text-align: center;
}

.sub-footer, .sub-footer .copyright, .sub-footer span {
    font-family: 'Ithaca', serif;
    font-size: 1rem;
    color: #ffffff;
}
.sub-footer a {
    color: #ffffff;
    text-decoration: none;
}
.sub-footer a:hover {
    color: #ffff97;
}
.copyright a {
    color: darkgray;
}


@media (max-width: 768px) {
    .sub-footer.footer-with-region-switcher {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 12px;
        text-align: center;
    }
    .sub-footer.footer-with-region-switcher .copyright {
        flex: 1 1 100%;
    }
    .sub-footer .copyright > span {
        display: block;
        margin-left: 0 !important;
    }
    .sub-footer,
    .sub-footer .copyright,
    .sub-footer span {
        font-size: 0.85rem;
    }
}
