.ui-legacy-only {
    display: none !important;
}

html.ui-legacy .ui-modern-only {
    display: none !important;
}

html.ui-legacy .ui-legacy-only {
    display: block !important;
}

html.ui-legacy span.ui-legacy-only {
    display: inline !important;
}

.ui-version-switch {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.ui-version-switch-login {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 100;
    min-height: 36px;
    padding: 7px 14px;
    color: #1557b0;
    background: #fff;
    border: 1px solid #c7d3e1;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(16, 43, 78, 0.1);
    font-size: 13px;
    font-weight: 500;
}

.ui-version-switch-login:hover,
.ui-version-switch-login:focus {
    color: #fff;
    background: #1557b0;
    border-color: #1557b0;
}

.ui-version-switch i {
    margin-right: 6px;
}

.ui-version-switch-shell {
    float: right;
    height: 52px;
    padding: 0 14px;
    color: #42556d;
    background: transparent;
    font-size: 14px;
}

.ui-version-switch-shell:hover,
.ui-version-switch-shell:focus {
    color: #1557b0;
    background: #eaf2fc;
    outline: 2px solid rgba(21, 87, 176, 0.25);
    outline-offset: -2px;
}

html.ui-legacy .ui-version-switch-shell {
    height: 50px;
    color: #fff;
}

html.ui-legacy .ui-version-switch-shell:hover,
html.ui-legacy .ui-version-switch-shell:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* 旧版登录页沿用原有背景和左右分栏。 */
html.ui-legacy body.signin.gov-login {
    height: auto;
    color: rgba(255, 255, 255, 0.95);
    background: url(../../img/login-background.jpg) no-repeat center fixed;
    background-size: cover;
}

html.ui-legacy .gov-login:before {
    display: none;
}

html.ui-legacy .gov-login-shell {
    display: block;
    min-height: 0;
    padding: 0;
}

html.ui-legacy .gov-login-panel {
    display: block;
    width: 750px;
    max-width: calc(100% - 40px);
    min-height: 0;
    margin: 10% auto 0;
    overflow: visible;
    color: rgba(255, 255, 255, 0.95);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

html.ui-legacy .gov-login-panel:after {
    display: table;
    clear: both;
    content: '';
}

html.ui-legacy .gov-login-brand {
    display: block;
    float: left;
    width: 58.33333333%;
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.95);
    background: transparent;
}

html.ui-legacy .gov-login-brand-legacy {
    padding-top: 10px;
}

html.ui-legacy .gov-login-brand-legacy h4 {
    margin: 10px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

html.ui-legacy .gov-login-brand-legacy ul {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

html.ui-legacy .gov-login-brand-legacy li {
    margin: 7px 0;
}

html.ui-legacy .gov-login-form-wrap {
    display: block;
    float: left;
    width: 41.66666667%;
    padding: 0 15px;
    background: transparent;
}

html.ui-legacy .gov-login-form-wrap #signupForm {
    padding: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    box-shadow: 0 3px 0 rgba(12, 12, 12, 0.03);
}

html.ui-legacy .gov-login-form-wrap h2 {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

html.ui-legacy .gov-login-form-wrap .gov-login-subtitle {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.95);
}

html.ui-legacy .gov-field {
    margin: 0;
}

html.ui-legacy .gov-field label,
html.ui-legacy .gov-input-wrap > i {
    display: none;
}

html.ui-legacy .gov-login-form-wrap .form-control,
html.ui-legacy .gov-login-form-wrap .uname,
html.ui-legacy .gov-login-form-wrap .pword,
html.ui-legacy .gov-login-form-wrap .code {
    display: block;
    width: 100%;
    height: 34px !important;
    margin-top: 15px;
    padding: 6px 12px !important;
    color: #333;
    background-color: #fff !important;
    border: 1px solid #e5e6e7;
    border-radius: 1px !important;
}

html.ui-legacy .gov-login-form-wrap .uname {
    background: #fff url(../../img/user.png) no-repeat 95% center !important;
}

html.ui-legacy .gov-login-form-wrap .pword {
    background: #fff url(../../img/locked.png) no-repeat 95% center !important;
}

html.ui-legacy .gov-captcha-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

html.ui-legacy .gov-captcha-row .gov-field {
    width: 50%;
}

html.ui-legacy .gov-captcha-image {
    width: 50%;
    height: 34px;
    margin-top: 15px;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
}

html.ui-legacy .gov-captcha-image img {
    width: 85%;
    height: auto;
}

html.ui-legacy .gov-login-options {
    min-height: 24px;
    margin: 15px 0 7px;
    color: #fff;
}

html.ui-legacy .gov-login-options .checkbox-custom label {
    color: #fff;
}

html.ui-legacy .gov-login-form-wrap #btnSubmit {
    width: 100%;
    height: 34px;
    margin-top: 15px;
    padding: 6px 12px;
    color: #fff;
    background: #1ab394;
    border-color: #1ab394;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 400;
}

html.ui-legacy .gov-login-register {
    color: #fff;
}

html.ui-legacy .gov-login-register a {
    color: #fff;
    text-decoration: underline;
}

html.ui-legacy .gov-login-legacy-footer {
    clear: both;
    margin: 20px 15px 0;
    padding-top: 15px;
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

html.ui-legacy .ui-version-switch-login {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

html.ui-legacy .ui-version-switch-login:hover,
html.ui-legacy .ui-version-switch-login:focus {
    background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 768px) {
    .ui-version-switch-login {
        top: 12px;
        right: 12px;
    }

    .ui-version-switch-shell {
        position: fixed;
        top: 0;
        right: 8px;
        z-index: 2002;
    }

    .ui-version-switch-shell + .navbar-top-links {
        margin-right: 108px;
    }

    html.ui-legacy .gov-login-panel {
        width: 380px;
        margin: 0 auto;
        padding: 72px 20px 20px;
    }

    html.ui-legacy .gov-login-brand,
    html.ui-legacy .gov-login-form-wrap {
        float: none;
        width: 100%;
        padding: 0;
    }

    html.ui-legacy .gov-login-brand {
        margin-bottom: 20px;
    }
}

@media (max-width: 390px) {
    html.ui-legacy .gov-login-panel {
        width: auto;
        max-width: none;
        margin: 0 14px;
    }
}
