/* 手机端登录 — 浅色卡片 + 背景图（472×1024，顶区约 26.5%） */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        height: 100dvh;
        font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
        -webkit-tap-highlight-color: transparent;
        overflow: hidden;
    }

    body {
        background-color: #f5fafb !important;
        min-height: 100dvh;
        position: relative;
    }

    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("../../Image/login-bg-mobile.png") no-repeat center top;
        background-size: 100% auto;
        background-color: #f5fafb;
        z-index: 0;
        pointer-events: none;
    }

    #main-box { display: none; }

    #main-content {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        background: none !important;
        position: relative;
        z-index: 1;
        height: 100%;
        height: 100dvh;
        min-height: -webkit-fill-available;
        width: 100%;
        /* 顶图高度 ≈ 26.5% × (1024/472) × 100vw，略减让标题/副标题上移 */
        padding: calc(51vw + env(safe-area-inset-top, 0px)) 20px calc(16px + env(safe-area-inset-bottom, 0px));
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .login-body {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 355px;
        margin: 0 auto !important;
        padding: 0 !important;
        background: transparent !important;
        z-index: 2;
    }

    .login-body.animated,
    .login-body.fadeInLeft {
        animation: mLoginIn 0.4s ease !important;
    }

    @keyframes mLoginIn {
        from { opacity: 0; transform: translateY(10px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .login-main {
        display: block !important;
        width: 100% !important;
    }

    /* ── 品牌标题（背景过渡区） ── */
    .login-mobile-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0 0 14px;
        text-align: center;
    }

    .login-mobile-brand__title {
        margin: 0 0 10px;
        font-size: 33px;
        font-weight: 700;
        color: #00796b;
        letter-spacing: 5px;
        line-height: 1.2;
    }

    .login-mobile-brand__sub-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        max-width: 320px;
        padding: 0 4px;
    }

    .brand-deco-line {
        flex: 1;
        max-width: 24px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0, 143, 138, 0.4));
    }

    .brand-deco-line:last-child {
        background: linear-gradient(90deg, rgba(0, 143, 138, 0.4), transparent);
    }

    .brand-deco-diamond {
        color: #00a89e;
        font-size: 6px;
        line-height: 1;
        flex-shrink: 0;
    }

    .login-mobile-brand__sub {
        font-size: 10.5px;
        color: #008f8a;
        line-height: 1.4;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── 白色登录卡片 ── */
    .login-card {
        width: 100%;
        border-radius: 18px;
        background: #fff;
        border: none;
        box-shadow: 0 6px 24px rgba(0, 120, 120, 0.1), 0 1px 4px rgba(0, 80, 80, 0.06);
        overflow: hidden;
    }

    .login-main .login-form {
        background: transparent !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 18px 18px;
        margin: 0 !important;
    }

    .login-logo,
    .login-desktop-title { display: none !important; }

    .login-card-head {
        margin-bottom: 16px;
        text-align: center;
    }

    .login-card-title {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #008f8a;
        line-height: 1.3;
    }

    .login-card-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        font-size: 12px;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(135deg, #00c4b8 0%, #009688 100%);
        clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
        flex-shrink: 0;
    }

    .login-card-divider {
        width: 40px;
        height: 3px;
        margin: 12px auto 0;
        border-radius: 2px;
        background: linear-gradient(90deg, #00c4b8, #009688);
    }

    .login-form .item-box {
        margin-top: 0;
        width: 100%;
    }

    /* ── 输入框 ── */
    .login-form .input-group {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 48px;
        margin-bottom: 10px;
        border-radius: 10px;
        background: #fff;
        border: 1px solid #dfe8eb;
        box-shadow: none;
        display: flex !important;
        align-items: stretch;
        overflow: hidden;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .login-form .input-group:focus-within {
        border-color: #00b8a8;
        box-shadow: 0 0 0 2px rgba(0, 184, 168, 0.1);
    }

    .login-form .input-group .input-group-addon {
        width: 44px;
        min-width: 44px;
        background: transparent !important;
        border: none !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .login-form .input-group .input-group-addon i {
        font-size: 17px;
        color: #00a89e;
    }

    .login-form .input-group > input,
    .login-main input.form-control {
        flex: 1 1 auto;
        min-width: 0;
        width: 1% !important;
        height: 48px;
        min-height: 48px;
        padding: 0 12px 0 0;
        font-size: 14px;
        line-height: 48px;
        background: transparent !important;
        color: #333 !important;
        border: none !important;
        box-shadow: none !important;
        outline: none;
        display: block !important;
        border-radius: 0 !important;
    }

    .login-form .input-group > input::placeholder {
        color: #b0bec5;
    }

    .login-form .input-group > input:-webkit-autofill,
    .login-form .input-group > input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
        -webkit-text-fill-color: #333 !important;
    }

    .pwd-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        flex-shrink: 0;
        background: transparent;
        border: none;
        color: #90a4ae;
        cursor: pointer;
        padding: 0;
    }

    .pwd-toggle i { font-size: 16px; }

    /* ── 验证码：输入 + 图片 + 刷新 ── */
    .login-form .input-group.verify-code {
        padding-right: 0;
        align-items: stretch;
    }

    .login-form .input-group.verify-code > input {
        flex: 1 1 0;
        min-width: 48px;
        padding-right: 6px !important;
    }

    .verify-code-extra {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        flex-shrink: 0;
        position: static;
        height: auto;
        border: none;
        background: transparent;
    }

    .verify-code-extra .verifyimg {
        display: block !important;
        position: static !important;
        width: 86px !important;
        height: 100% !important;
        min-height: 48px;
        object-fit: fill;
        border-radius: 0;
        border: none !important;
        border-left: 1px solid #dfe8eb !important;
        background: #fff;
        cursor: pointer;
        transform: none !important;
        flex-shrink: 0;
    }

    .verify-code-extra .verify-refresh {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        flex-shrink: 0;
        color: #00a89e;
        text-decoration: none;
        background: #fff;
        border-left: 1px solid #dfe8eb;
    }

    .verify-code-extra .verify-refresh span {
        display: none;
    }

    .verify-code-extra .verify-refresh i {
        font-size: 16px;
    }

    /* ── 记住密码 / 忘记密码 ── */
    .remember-row {
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .remember-option {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .remember-option input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        margin: 0;
        border: 1px solid #00b8a8;
        border-radius: 3px;
        background: #fff;
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
    }

    .remember-option input[type="checkbox"]:checked {
        background: #00b8a8;
        border-color: #00b8a8;
    }

    .remember-option input[type="checkbox"]:checked::after {
        content: "";
        position: absolute;
        left: 4px;
        top: 1px;
        width: 5px;
        height: 9px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

    .remember-option label {
        font-size: 13px;
        color: #00a89e;
        cursor: pointer;
        margin: 0;
        line-height: 1;
    }

    .remember-row a {
        font-size: 13px;
        color: #00a89e;
        text-decoration: none;
    }

    /* ── 登录按钮 ── */
    .login-form .login_btn_panel {
        margin-top: 20px;
    }

    .login-form .login-btn {
        width: 100% !important;
        height: 48px;
        min-height: 48px;
        line-height: 48px;
        padding: 0;
        border-radius: 24px !important;
        border: none !important;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 6px;
        text-indent: 6px;
        color: #fff !important;
        background: linear-gradient(180deg, #00c9bc 0%, #009688 100%) !important;
        box-shadow: 0 4px 16px rgba(0, 150, 136, 0.3);
        opacity: 1 !important;
        filter: none !important;
    }

    .login-form .login-btn:active:not([disabled]) {
        transform: scale(0.98);
    }

    .login-form .login-btn.login-btn-success {
        background: linear-gradient(180deg, #00c9bc 0%, #009688 100%) !important;
        letter-spacing: 2px;
        text-indent: 0;
        font-size: 14px;
    }

    .check-tips {
        min-height: 16px;
        margin-top: 8px;
        font-size: 12px;
        text-align: center;
        color: #e57373;
        overflow: visible;
    }

    .login-btn-text-desktop,
    .footer-text-desktop {
        display: none;
    }

    .login-btn-text-mobile,
    .footer-text-mobile {
        display: inline;
    }

    /* ── 底部特性条（图1整图） ── */
    .login-mobile-features {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 355px;
        margin: 24px auto 0;
        padding: 0;
        flex-shrink: 0;
        background: transparent;
    }

    .login-features-bar {
        display: block;
        width: 100%;
        height: auto;
        max-height: 50px;
        object-fit: contain;
        object-position: center;
        background: transparent;
        pointer-events: none;
        user-select: none;
    }

    /* ── 底部版权 ── */
    .login-footer-mobile {
        display: block !important;
        position: relative !important;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none !important;
        width: 100%;
        max-width: 355px;
        margin: 14px auto 0;
        text-align: center;
        padding: 0 16px;
        font-size: 12px;
        color: #546e7a;
        letter-spacing: 0.4px;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
        border: none;
        z-index: 3;
        pointer-events: none;
        flex-shrink: 0;
    }

    .login-footer-mobile .footer-text-mobile {
        opacity: 1;
    }
}

@media (max-width: 768px) and (max-height: 700px) {
    #main-content {
        padding-top: calc(46vw + env(safe-area-inset-top, 0px));
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .login-mobile-brand {
        margin-bottom: 10px;
    }

    .login-mobile-brand__title {
        font-size: 26px;
        margin-bottom: 6px;
        letter-spacing: 3px;
    }

    .login-main .login-form {
        padding: 16px 16px 14px;
    }

    .login-form .input-group {
        min-height: 44px;
        margin-bottom: 8px;
    }

    .login-form .input-group > input,
    .login-main input.form-control {
        height: 44px;
        min-height: 44px;
        line-height: 44px;
    }

    .verify-code-extra .verifyimg {
        min-height: 44px;
    }

    .login-form .login-btn {
        height: 44px;
        min-height: 44px;
        line-height: 44px;
    }

    .login-form .login_btn_panel {
        margin-top: 14px;
    }

    .login-mobile-features {
        margin-top: 18px;
    }

    .login-features-bar {
        max-height: 44px;
    }
}

@media (max-width: 768px) and (min-height: 801px) {
    #main-content {
        padding-top: calc(52vw + env(safe-area-inset-top, 0px));
    }
}

@media (max-width: 480px) {
    #main-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .login-mobile-brand__title {
        font-size: 30px;
        letter-spacing: 4px;
    }

    .login-mobile-brand__sub {
        font-size: 10px;
    }

    .login-main .login-form {
        padding: 18px 16px 16px;
    }

    .login-form .input-group > input {
        font-size: 16px;
    }

    .verify-code-extra .verifyimg {
        width: 78px !important;
    }

    .login-features-bar {
        max-height: 48px;
    }
}
