html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: #263238;
    /* font-family: Inter, "Segoe UI", Arial, sans-serif; */
    font-family: tahoma, Arial, sans-serif;
    background: #dfeaf0 url("../images/login-bg.png") center center / cover no-repeat;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .02) 0%, rgba(0, 0, 0, .04) 52%, rgba(255, 255, 255, .12) 100%);
}

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 32px 10vw 60px;
    box-sizing: border-box;
}

.login-panel {
    width: min(400px, 100%);
}

.login-form {
    margin: 0;
}

.login-card {
    width: 100%;
    box-sizing: border-box;
    padding: 38px 38px 24px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 22px 65px rgba(20, 45, 60, .24), 0 3px 12px rgba(20, 45, 60, .08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand-name-logo {
    display: flex;
    gap: 12px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

.logo-img {
    display: block;
    margin: 0;
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-name {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    color: rgb(3, 60, 90);
    text-shadow: 1px 1px 0 #002b3e, 1px 1px 0 #003f5a, 3px 4px 5px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    margin-top: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .025em;
    color: rgb(3, 60, 90);
}

.login-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-field {
    position: relative;
}

.login-field .form-control {
    height: 54px;
    padding-right: 48px;
    border: 1px solid #d6e0e5;
    border-radius: 11px;
    background: #fff;
    box-shadow: none;
    font-size: 15px;
}

.login-field .form-control:focus {
    border-color: #f47a22;
    box-shadow: 0 0 0 3px rgba(244, 122, 34, .12);
}

.login-field label {
    color: #788891;
}

.field-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    padding: 8px;
    opacity: .65;
    z-index: 6;
}

.field-icon img {
    width: 20px;
}

.password-toggle {
    position: absolute;
    z-index: 6;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 7px;
    font-size: 16px;
    opacity: .62;
    cursor: pointer;
}

.password-toggle:hover {
    opacity: 1;
}

.language-field {
    position: relative;
}

.field-label {
    display: block;
    margin: 0 0 7px 2px;
    color: #687982;
    font-size: 12px;
    font-weight: 500;
}

.custom-select-lang {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.custom-select-lang-selected-option {
    height: 54px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 44px 0 15px;
    border: 1px solid #d6e0e5;
    border-radius: 11px;
    background: #fff;
    color: #34434b;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

.custom-select-lang-selected-option::after {
    content: "";
    position: absolute;
    right: 17px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #788891;
    border-bottom: 2px solid #788891;
    transform: translateY(-65%) rotate(45deg);
    transition: transform .15s ease;
}

.custom-select-lang.open .custom-select-lang-selected-option::after {
    transform: translateY(-25%) rotate(225deg);
}

.custom-select-lang-select-items {
    display: none;
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #d6e0e5;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(20, 45, 60, .18);
}

.custom-select-lang.open .custom-select-lang-select-items {
    display: block;
}

.custom-select-lang-select-items-option {
    min-height: 42px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 9px;
    box-sizing: border-box;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #34434b;
}

.custom-select-lang-select-items-option:hover,
.custom-select-lang-select-items-option.selected {
    background: #fff2e8;
    color: #d85e0c;
}

.img_flag {
    width: 30px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
}

.ad-row {
    padding: 1px 2px 2px;
}

.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #ef731d;
    border-color: #ef731d;
}

.form-check-label {
    color: #596b74;
    font-size: 13px;
    cursor: pointer;
}

.btn-auth {
    width: 100%;
    min-height: 50px;
    margin-top: 3px;
    border: 0;
    border-radius: 11px;
    background: #e96e1d;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 7px 18px rgba(233, 110, 29, .23);
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.btn-auth:hover {
    background: #d96115;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(233, 110, 29, .29);
}

.btn-auth:active {
    transform: translateY(0);
}

.login-messages {
    margin-top: 15px;
}

.err_msg,
.err_php_msg {
    display: none;
    padding: 10px 12px;
    margin-top: 7px;
    border-radius: 9px;
    background: #fff0f0;
    border: 1px solid #f3c5c5;
    color: #b3261e;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.AD_error {
    display: block;
    margin-top: 4px;
}

.login-versions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e7ecef;
}

.login-versions span {
    color: #98a4aa;
    font-size: 11px;
    letter-spacing: .02em;
}

.login-copyright {
    position: absolute;
    left: 18px;
    bottom: 18px;
    text-align: center;
    color: rgba(255, 255, 255, .88);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    font-size: 12px;
    letter-spacing: .02em;
}

.form-floating>.form-control:not(:placeholder-shown)~label::after {
    background-color: unset;
}

@media (max-width: 1100px) {
    .login-shell {
        padding-right: 5vw;
    }

    .login-card {
        padding: 32px;
    }
}

@media (max-width: 850px) {
    .login-shell {
        justify-content: center;
        padding: 28px 20px 58px;
        background: linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .2));
    }

    .login-panel {
        width: min(400px, 100%);
    }
}

@media (max-width: 520px) {
    body.login-page {
        background-position: 40% center;
    }

    .login-shell {
        padding: 16px 12px 54px;
        align-items: center;
    }

    .login-card {
        padding: 27px 20px 19px;
        border-radius: 18px;
    }

    .login-brand {
        margin-bottom: 22px;
    }

    .logo-img {
        width: 64px;
        height: 64px;
    }

    .brand-name {
        font-size: 22px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .login-copyright {
        bottom: 12px;
        font-size: 10px;
    }
}

@media (max-height: 700px) and (min-width: 521px) {
    .login-shell {
        align-items: flex-start;
        padding-top: 18px;
    }

    .login-card {
        padding-top: 24px;
        padding-bottom: 18px;
    }

    .login-brand {
        margin-bottom: 16px;
    }

    .logo-img {
        width: 54px;
        height: 54px;
    }

    .login-fields {
        gap: 10px;
    }

    .login-versions {
        margin-top: 12px;
        padding-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .btn-auth,
    .custom-select-lang-selected-option::after {
        transition: none;
    }
}