html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: #172033;
    background: #eef2f7;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body:before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 168, 132, .16), transparent 34%),
        linear-gradient(315deg, rgba(255, 184, 77, .14), transparent 38%),
        #eef2f7;
    pointer-events: none;
}

.login-page {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
    box-sizing: border-box;
}

.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 420px);
}

.lg-box {
    width: 100%;
    padding: 34px;
    border: 1px solid rgba(16, 24, 40, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 60px rgba(16, 24, 40, .12);
    box-sizing: border-box;
}

.login-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 24px;
    color: #0f8f72;
    font-size: 14px;
    font-weight: 600;
}

.language-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 12px;
    font-weight: 400;
}

.lang-menu {
    position: relative;
    min-width: 174px;
}

.lang-trigger,
.lang-option {
    font: inherit;
}

.lang-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 34px;
    padding: 0 10px 0 12px;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

.lang-trigger:focus,
.lang-trigger:hover {
    border-color: #0f8f72;
}

.lang-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.lang-current span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-arrow {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 1.5px solid #667085;
    border-bottom: 1.5px solid #667085;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}

.lang-menu.is-open .lang-arrow {
    transform: rotate(225deg) translate(-2px, -1px);
}

.lang-options {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    width: 100%;
    min-width: 188px;
    padding: 4px;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
    box-sizing: border-box;
}

.lang-menu.is-open .lang-options {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #344054;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.lang-option:hover,
.lang-option:focus {
    background: #eef8f5;
    color: #0b7b61;
    outline: none;
}

.flag {
    position: relative;
    display: inline-block;
    flex: 0 0 22px;
    width: 22px;
    height: 15px;
    overflow: hidden;
    border: 1px solid rgba(16, 24, 40, .16);
    border-radius: 2px;
    box-sizing: border-box;
    box-shadow: 0 1px 1px rgba(16, 24, 40, .08);
}

.flag-cn {
    background: #de2910;
}

.flag-cn:before,
.flag-vn:before {
    content: "\2605";
    position: absolute;
    color: #ffde00;
    font-size: 8px;
    line-height: 1;
}

.flag-cn:before {
    top: 2px;
    left: 3px;
}

.flag-us {
    background: repeating-linear-gradient(to bottom, #b22234 0 1.15px, #fff 1.15px 2.3px);
}

.flag-us:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 9px;
    height: 8px;
    background: #3c3b6e;
}

.flag-vn {
    background: #da251d;
}

.flag-vn:before {
    top: 50%;
    left: 50%;
    font-size: 10px;
    transform: translate(-50%, -50%);
}

.flag-kr {
    background: #fff;
}

.flag-kr:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #cd2e3a 0 50%, #0047a0 50% 100%);
    transform: translate(-50%, -50%);
}

.flag-ru {
    background: linear-gradient(to bottom, #fff 0 33.333%, #1c57a6 33.333% 66.666%, #d52b1e 66.666% 100%);
}

.flag-uz {
    background: linear-gradient(to bottom, #33a5db 0 30%, #ce1126 30% 35%, #fff 35% 62%, #ce1126 62% 67%, #1eb53a 67% 100%);
}

.flag-uz:before,
.flag-uz:after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.flag-uz:before {
    top: 2px;
    left: 3px;
    width: 5px;
    height: 5px;
    background: #fff;
}

.flag-uz:after {
    top: 2px;
    left: 5px;
    width: 5px;
    height: 5px;
    background: #33a5db;
}

.lg-label {
    margin-bottom: 24px;
}

.lg-label h4 {
    margin: 0;
    color: #101828;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}

.lg-label p {
    margin: 8px 0 0;
    color: #667085;
    font-size: 14px;
}

.alert {
    min-height: 20px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    background: #fff5f5;
    color: #c53030;
    font-size: 13px;
    box-sizing: border-box;
}

.alert i {
    margin-right: 6px;
}

.input-item {
    display: flex;
    align-items: center;
    width: 100%;
    height: 46px;
    margin-bottom: 16px;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-item:focus-within {
    border-color: #0f8f72;
    box-shadow: 0 0 0 3px rgba(15, 143, 114, .12);
}

.input-item i {
    flex: 0 0 44px;
    text-align: center;
    color: #98a2b3;
    font-size: 17px;
}

.input-item input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px 0 0;
    border: 0;
    outline: none;
    color: #101828;
    background: transparent;
    font-size: 14px;
    box-sizing: border-box;
}

.input-item input::placeholder {
    color: #98a2b3;
}

.lg-check {
    display: grid;
    grid-template-columns: 1fr 116px;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
}

.lg-check .input-item {
    margin-bottom: 0;
}

.check-code {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    overflow: hidden;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #f8fafc;
    box-sizing: border-box;
}

.check-code img {
    display: block;
    width: 115px;
    height: 42px;
    cursor: pointer;
}

.enter a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border-radius: 6px;
    background: #0f8f72;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.enter a:hover {
    background: #0b7b61;
    box-shadow: 0 12px 24px rgba(15, 143, 114, .22);
    transform: translateY(-1px);
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset;
    border: 0 !important;
}

@media (max-width: 900px) {
    .login-page {
        align-items: center;
        padding: 24px;
    }

    .login-shell {
        width: min(100%, 420px);
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 16px;
    }

    .lg-box {
        padding: 24px 18px;
    }

    .login-toolbar {
        justify-content: flex-end;
    }
}
