/* 登录页 · 全屏背景图 + 右侧登录区（与背景图左侧展示区不重叠） */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    overflow: auto;
}

.login-root {
    position: relative;
    min-height: 100vh;
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    padding: 40px 24px 64px;
}

/* 有背景图时：登录框固定在右侧空白区，略偏左下 */
.login-root.has-bg-img {
    -webkit-box-align: start;
    align-items: flex-start;
    -webkit-box-pack: end;
    justify-content: flex-end;
	padding: 19vh clamp(6vw, 8vw, 12vw) 64px clamp(44%, 46vw, 49%);
}

/* 全屏背景 */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #0d2847 left center no-repeat;
    background-size: cover;
    background-image: url("../images/login-bg-ai.png");
}

.login-root.has-bg-img .login-bg {
    background-image: none;
}

.login-bg-img {
    position: absolute;
    inset: 0;
    background: left center no-repeat;
    background-size: cover;
}

.login-bg-shade {
    position: absolute;
    inset: 0;
    background: rgba(10, 30, 60, 0.12);
}

.login-root.has-bg-img .login-bg-shade {
    background: rgba(5, 18, 40, 0.06);
}

/* 右侧毛玻璃登录框 */
.login-glass-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.login-glass {
    padding: 42px 38px 34px;
    border-radius: 18px;
    background: rgba(20, 45, 85, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.28);
    -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.login-glass-welcome {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 28px;
    line-height: 1.5;
    font-weight: 500;
}

.login-input-row {
    position: relative;
    margin-bottom: 18px;
}

.login-input-row .field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #3d8de8;
    pointer-events: none;
}

.login-input-row input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 48px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    -webkit-transition: box-shadow 0.2s;
    transition: box-shadow 0.2s;
}

.login-input-row--password input {
    padding-right: 48px;
}

.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    z-index: 3;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8a96a8;
    cursor: pointer;
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-transition: color 0.2s, background 0.2s;
    transition: color 0.2s, background 0.2s;
}

.password-toggle-btn:hover {
    color: #3d8de8;
    background: rgba(61, 141, 232, 0.1);
}

.password-toggle-btn.is-visible {
    color: #5c6578;
}

.password-toggle-btn.is-visible:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.06);
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.password-toggle-btn .icon-eye-closed {
    display: none;
}

.password-toggle-btn.is-visible .icon-eye-open {
    display: none;
}

.password-toggle-btn.is-visible .icon-eye-closed {
    display: block;
}

.login-input-row input:focus {
    -webkit-box-shadow: 0 0 0 2px rgba(61, 141, 232, 0.5);
    box-shadow: 0 0 0 2px rgba(61, 141, 232, 0.5);
}

.login-input-row input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
}

.login-input-row input::-webkit-input-placeholder { color: #aaa; }
.login-input-row input::-moz-placeholder { color: #aaa; }
.login-input-row input:-ms-input-placeholder { color: #aaa; }
.login-input-row input::placeholder { color: #aaa; }

.login-remember {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    margin: 4px 0 18px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
}

.login-remember input {
    margin-right: 6px;
    cursor: pointer;
}

.login-captcha-row {
    display: -webkit-box;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    margin-bottom: 16px;
}

.login-captcha-row input {
    -webkit-box-flex: 1;
    flex: 1;
    height: 50px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    margin-right: 8px;
}

.login-captcha-row img {
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-sjhm-row {
    margin-bottom: 16px;
}

.login-sjhm-row input {
    width: 130px;
    height: 40px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    vertical-align: middle;
}

.login-sjhm-row .hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 8px;
}

.login-btn {
    display: block;
    width: 100%;
    height: 50px;
    line-height: 50px;
    border: none;
    border-radius: 8px;
    background: #3d8de8;
    background: -webkit-linear-gradient(135deg, #4a9af0, #2d75c8);
    background: linear-gradient(135deg, #4a9af0, #2d75c8);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 6px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.login-btn:hover {
    opacity: 0.92;
    color: #fff;
    text-decoration: none;
}

.login-glass-links {
    display: -webkit-box;
    display: flex;
    -webkit-box-pack: end;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 14px;
}

.login-glass-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.login-glass-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-error {
    margin-top: 10px;
    font-size: 12px;
    color: #ffb4b4;
    text-align: center;
    line-height: 1.5;
}

.login-error:empty { display: none; }

.inp { color: #aaa !important; }

.mpas_url_main {
    margin-top: 12px;
    display: none;
    text-align: center;
}

/* 底部版权 */
.login-footer-global {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 12px 16px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.login-footer-global a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.login-footer-global a:hover { text-decoration: underline; }

/* 主题色 */
.theme-red .login-input-row .field-icon { color: #f05b60; }
.theme-red .password-toggle-btn:hover { color: #f05b60; background: rgba(240, 91, 96, 0.08); }
.theme-red .login-btn {
    background: -webkit-linear-gradient(135deg, #f05b60, #c94449);
    background: linear-gradient(135deg, #f05b60, #c94449);
}

.theme-green .login-input-row .field-icon { color: #28b46f; }
.theme-green .password-toggle-btn:hover { color: #28b46f; background: rgba(40, 180, 111, 0.08); }
.theme-green .login-btn {
    background: -webkit-linear-gradient(135deg, #28b46f, #218d57);
    background: linear-gradient(135deg, #28b46f, #218d57);
}

.theme-orange .login-input-row .field-icon { color: #ff9d0d; }
.theme-orange .password-toggle-btn:hover { color: #ff9d0d; background: rgba(255, 157, 13, 0.08); }
.theme-orange .login-btn {
    background: -webkit-linear-gradient(135deg, #ff9d0d, #c96a00);
    background: linear-gradient(135deg, #ff9d0d, #c96a00);
}

/* 弹窗 */
#forgot_pwd_modal_mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.5);
}

#forgot_pwd_modal {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 9999;
    width: 340px;
    max-width: calc(100vw - 32px);
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

#forgot_pwd_modal .modal_header {
    padding: 14px 16px;
    background: #2d75c8;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

#forgot_pwd_modal .modal_close {
    float: right;
    border: none;
    background: none;
    color: rgba(255,255,255,0.85);
    font-size: 20px;
    cursor: pointer;
}

#forgot_pwd_modal .modal_body {
    padding: 16px;
    font-size: 13px;
    line-height: 1.75;
    color: #5c6578;
}

#forgot_pwd_modal .contact_phone {
    color: #2d75c8;
    font-weight: 600;
}

/* 中等宽度：略收窄左侧留白，仍保持右对齐 */
@media (max-width: 1200px)
    .login-root.has-bg-img {
        padding-left: 92%;
        padding-top: 87vh;
    }
}

@media (max-width: 900px) {
    .login-root,
    .login-root.has-bg-img {
        -webkit-box-pack: center;
        justify-content: center;
        padding: 32px 20px 72px;
    }

    .login-root.has-bg-img .login-bg-shade {
        background: rgba(5, 18, 40, 0.35);
    }

    .login-glass-wrap {
        max-width: 440px;
    }
}

@media (max-width: 480px) {
    .login-glass {
        padding: 28px 22px 22px;
    }
}
