.login-page {
    --login-control-font: 1.25rem;
    --login-label-font: 1.125rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
    padding: clamp(1rem, 2vw, 2.5rem);
    background: #f8f9fa;
    color: #212529;
    font-size: 1rem;
}

.login-page .language-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: 1rem;
}

.login-page .language-selector a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.login-main {
    display: flex;
    flex: 1 0 auto;
}

.login-page .form-signin {
    width: 100%;
    max-width: 36rem;
    max-width: clamp(28rem, 42vw, 48rem);
    margin: auto;
    text-align: center;
}

.login-logo {
    display: block;
    width: 120px;
    height: 120px;
    width: clamp(96px, 8vw, 160px);
    height: clamp(96px, 8vw, 160px);
    margin: 0 auto 1rem;
}

.login-title {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    font-weight: 400;
    line-height: 1.35;
}

.login-page .form-label {
    margin-bottom: .5rem;
    font-size: var(--login-label-font);
    font-weight: 600;
    line-height: 1.4;
}

.login-page input[type="text"] {
    height: auto;
    min-height: 3.5rem;
    min-height: clamp(3.25rem, 4vw, 4.5rem);
    font-size: var(--login-control-font);
    font-variant-ligatures: none;
    line-height: 1.5;
    text-align: left;
    caret-color: #212529;
    scroll-margin-block: 1rem;
}

.login-page input[type="text"]::placeholder {
    color: #6c757d;
    opacity: 1;
}

.login-page input[type="text"]:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .25);
}

.login-page #loginBtn {
    min-height: 3.5rem;
    min-height: clamp(3.25rem, 4vw, 4.5rem);
    font-size: var(--login-control-font);
}

.login-copyright {
    margin: 1.5rem 0 0;
    font-size: 1rem;
    font-size: clamp(.9375rem, .9vw, 1.125rem);
}

.login-code {
    position: relative;
}

/* Vuplex's texture rendering can omit the native caret. Hide it only after
   the HTML replacement has measured the real input successfully. */
.login-page .login-code.has-html-caret input {
    caret-color: transparent;
}

.login-caret-clip {
    position: absolute;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    color: #212529;
}

.login-caret {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: currentColor;
    animation: login-caret-blink 1s step-end infinite;
}

.login-caret-ruler {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

.login-caret-measure {
    position: absolute;
    white-space: pre;
}

/* Keep usable sizes in older UWP engines which do not support clamp(). */
@supports (font-size: clamp(1rem, 2vw, 2rem)) {
    .login-page {
        --login-control-font: clamp(1.125rem, 1.5vw, 1.75rem);
        --login-label-font: clamp(1rem, 1.2vw, 1.5rem);
    }
}

@keyframes login-caret-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .login-caret { animation: none; }
}

@media (forced-colors: active) {
    .login-caret {
        background: CanvasText;
        forced-color-adjust: none;
    }
}

/* Short screens and resized WebViews keep the form close to the keyboard. */
@media (max-height: 600px) {
    .login-page {
        --login-control-font: 1.125rem;
        --login-label-font: 1rem;
        padding: .75rem 1rem;
    }

    .login-page .form-signin {
        max-width: 36rem;
    }

    .login-page input[type="text"],
    .login-page #loginBtn {
        min-height: 3.25rem;
    }

    .login-page .language-selector {
        margin-bottom: .5rem;
    }

    .login-logo {
        width: 64px;
        height: 64px;
        margin-bottom: .5rem;
    }

    .login-title {
        margin-bottom: 1rem;
        font-size: 1.375rem;
    }

    .login-copyright {
        margin-top: 1rem;
    }
}
