.login-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(80, 104, 140, 0.18);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    box-sizing: border-box;
}

.login-modal-mask.is-open {
    display: flex;
}

.login-modal {
    width: min(760px, 92vw);
    min-height: 520px;
    background: linear-gradient(180deg, #eef5ff 0%, #e7f0ff 48%, #edf4ff 100%);
    border: 1px solid #c8d9f0;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(73, 97, 130, 0.16);
    padding: 18px 20px 22px;
    color: #1f2d3d;
    position: relative;
    box-sizing: border-box;
}

.login-modal-close {
    position: absolute;
    right: 14px;
    top: 10px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #5d6f86;
}

.login-modal-close:hover {
    color: #2f4768;
}

.login-tabs {
    display: flex;
    justify-content: center;
    gap: 56px;
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 800;
    color: #1f2d3d;
}

.login-tab-btn {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    color: #27496d;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0;
}

.login-tab-btn.is-active {
    color: #163b66;
    text-decoration-thickness: 3px;
}

.login-tab-panel {
    display: none;
    min-height: 430px;
}

.login-tab-panel.is-active {
    display: block;
}

.login-qrcode-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.login-qrcode {
    width: 330px;
    height: 330px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d2deee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #5f6f85;
    font-size: 22px;
}

.login-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.login-qrcode-text {
    width: 340px;
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.55;
    color: #30465f;
}

.login-code-box {
    max-width: 540px;
    margin: 40px auto 0;
}

.login-code-input {
    width: 100%;
    height: 60px;
    border: 1px solid #c7d7eb;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-size: 22px;
    outline: none;
    color: #1f2d3d;
    box-sizing: border-box;
}

.login-code-input::placeholder {
    color: #5b6f88;
    opacity: 1;
}

.login-code-input:focus {
    border-color: #90aed6;
    box-shadow: 0 0 0 3px rgba(144, 174, 214, 0.18);
}

.login-code-help {
    margin: 36px 0 0;
    font-size: 16px;
    line-height: 1.7;
    color: #30465f;
}

.login-submit-btn {
    width: 100%;
    height: 60px;
    border: 0;
    border-radius: 12px;
    background: #8dcf6f;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin-top: 42px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(111, 172, 79, 0.18);
}

.login-submit-btn:hover {
    background: #7fc462;
}

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-mock-wechat-btn {
    width: 340px;
    height: 48px;
    margin-top: 14px;
    font-size: 18px;
}

.login-bottom-tip {
    margin-top: 22px;
    font-size: 14px;
    line-height: 1.6;
    color: #425a74;
}

.sidebar-user-upgrade-btn {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 768px) {
    .login-modal {
        width: min(94vw, 640px);
        min-height: auto;
        padding: 16px 14px 18px;
    }

    .login-tabs {
        gap: 26px;
        font-size: 18px;
        margin-bottom: 14px;
    }

    .login-tab-panel {
        min-height: auto;
    }

    .login-qrcode-box {
        min-height: auto;
    }

    .login-qrcode {
        width: 240px;
        height: 240px;
    }

    .login-qrcode-text,
    .login-mock-wechat-btn {
        width: 240px;
        font-size: 14px;
    }

    .login-code-box {
        margin-top: 20px;
    }

    .login-code-input {
        height: 52px;
        font-size: 18px;
    }

    .login-submit-btn {
        height: 52px;
        font-size: 20px;
        margin-top: 28px;
    }
}
/* 第九批：正式微信扫码登录二维码优化 */
.login-qrcode-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #60758f;
    font-size: 20px;
    line-height: 1.55;
    background: #fff;
}

.login-qrcode.is-loading .login-qrcode-placeholder::before {
    content: "";
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border: 3px solid rgba(22, 59, 102, 0.16);
    border-top-color: rgba(22, 59, 102, 0.72);
    border-radius: 50%;
    animation: pygLoginSpin 0.8s linear infinite;
}

@keyframes pygLoginSpin {
    to { transform: rotate(360deg); }
}

.wechat-login-ticket-box {
    width: 340px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.7;
    word-break: break-all;
    text-align: center;
    color: #66788f;
}

.wechat-login-ticket-box a {
    color: #1d5fbf;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wechat-login-ticket-text {
    margin-top: 4px;
    color: #8a98a9;
}

.wechat-refresh-btn {
    width: 340px;
    height: 52px;
    margin-top: 18px;
    font-size: 20px;
    background: #14857a;
    box-shadow: 0 8px 18px rgba(20, 133, 122, 0.16);
}

.wechat-refresh-btn:hover {
    background: #0f756b;
}

@media (max-width: 768px) {
    .wechat-login-ticket-box,
    .wechat-refresh-btn {
        width: 240px;
    }
}

/* V0.52：登录成功弹窗 */
.login-success-mask {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(0, 0, 0, 0.34);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.login-success-dialog {
    width: min(540px, 92vw);
    background: #ffffff;
    border-radius: 4px;
    padding: 44px 38px 36px;
    text-align: center;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.login-success-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 26px;
    border-radius: 50%;
    background: #17c933;
    color: #ffffff;
    font-size: 38px;
    line-height: 58px;
    font-weight: 900;
}

.login-success-title {
    font-size: 22px;
    line-height: 1.4;
    color: #1f2d3d;
    margin-bottom: 18px;
}

.login-success-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #666f7a;
    margin-bottom: 32px;
}

.login-success-btn {
    min-width: 120px;
    height: 40px;
    border: 0;
    border-radius: 4px;
    background: #1677ff;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    padding: 0 24px;
}

.login-success-btn:hover {
    background: #0f66d8;
}

@media (max-width: 768px) {
    .login-success-dialog {
        padding: 36px 24px 30px;
    }

    .login-success-title {
        font-size: 20px;
    }

    .login-success-desc {
        font-size: 14px;
    }
}

/* V0.53：真实临时登录码登录 + 本地 mock 获取登录码 */
.login-code-message {
    min-height: 22px;
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.65;
    color: #667085;
    text-align: left;
    word-break: break-word;
}

.login-code-message.is-error {
    color: #d93025;
}

.login-code-message.is-success {
    color: #0f8a3b;
}

.login-code-message.is-info {
    color: #667085;
}

.login-code-mock-box {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed #b8cdf0;
    border-radius: 6px;
    background: #f7fbff;
    text-align: left;
}

.login-code-mock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #2b7de9;
    border-radius: 4px;
    background: #ffffff;
    color: #1a73e8;
    font-size: 13px;
    cursor: pointer;
}

.login-code-mock-btn:hover {
    background: #eef5ff;
}

.login-code-mock-btn:disabled {
    color: #98a2b3;
    border-color: #d0d5dd;
    background: #f2f4f7;
    cursor: not-allowed;
}

.login-code-mock-tip {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.55;
    color: #7a8699;
}


/* V0.53 第四批：本地模拟服务号登录码页面入口 */
.login-code-mock-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    height: 32px;
    padding: 0 12px;
    border-radius: 4px;
    color: #1a73e8;
    font-size: 13px;
    text-decoration: none;
}

.login-code-mock-link:hover {
    background: #eef5ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 768px) {
    .login-code-mock-link {
        margin-left: 0;
        margin-top: 8px;
    }
}


/* V1.0.14：登录隔离与单账号唯一在线提示 */
.login-session-security-note {
    margin: 12px 22px 18px;
    padding: 9px 11px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #f7faff;
    color: #66758a;
    font-size: 12px;
    line-height: 1.65;
    text-align: left;
}
