/* ============================================================
   登录页样式 - JZBEARING（Picard 风格：左登录 + 右注册引导）
   品牌绿：#0F3D2E（深）/ #166534（主）/ #1F7A4D（亮）
   布局：居中双栏卡片 + 微信/密码双 Tab + 三步找回密码弹窗
   ============================================================ */

/* ===== 全局重置（消除浏览器默认边距导致的四周白边） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #F4F7F5;
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: #333;
}

/* ===== 主容器 ===== */
.lg-main {
    background: linear-gradient(180deg, #F4F7F5 0%, #EDF2EE 100%);
    padding: 48px 0 72px;
    min-height: 640px;
}

/* ===== 双栏卡片 ===== */
.lg-card {
    width: 880px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(15, 61, 46, .12);
}

/* ===== 左：登录区 ===== */
.lg-login-side {
    flex: 1;
    min-width: 0;
    padding: 38px 46px 30px;
}

/* 品牌标识 */
.lg-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.lg-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0F3D2E 0%, #1F7A4D 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 61, 46, .25);
}
.lg-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #0F3D2E;
    letter-spacing: .5px;
}

/* ===== 头部 ===== */
.lg-head {
    margin-bottom: 20px;
}
.lg-title {
    font-size: 24px;
    font-weight: 700;
    color: #0F3D2E;
    margin: 0 0 6px;
    letter-spacing: .5px;
}
.lg-sub {
    font-size: 13px;
    color: #7A8A82;
    margin: 0;
}

/* ===== Tab 切换 ===== */
.lg-tabs {
    display: flex;
    border-bottom: 1px solid #E5EBE7;
    margin-bottom: 26px;
}
.lg-tab {
    flex: 1;
    padding: 11px 0;
    font-size: 15px;
    font-weight: 600;
    color: #8A9A92;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color .2s;
}
.lg-tab:hover { color: #166534; }
.lg-tab.active { color: #166534; }
.lg-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 52px;
    height: 3px;
    background: #166534;
    border-radius: 3px 3px 0 0;
}

/* ===== 面板 ===== */
.lg-panel { display: none; }
.lg-panel.active { display: block; }

/* ===== 微信扫码区 ===== */
.lg-qr-box { text-align: center; }
.lg-qr-img-wrap {
    display: inline-block;
    padding: 12px;
    border: 1px solid #E2E8E4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 61, 46, .06);
}
.lg-qr-img {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 6px;
    background: #F3F6F4;
}
.lg-qr-tip {
    margin: 10px 0 0;
    font-size: 14px;
    color: #0F3D2E;
    font-weight: 600;
}
.lg-qr-desc {
    margin: 12px 0 0;
    font-size: 13px;
    color: #8A9A92;
}
.lg-qr-refresh {
    margin: 10px 0 0;
    font-size: 13px;
}
.lg-qr-refresh a { color: #166534; text-decoration: none; }
.lg-qr-refresh a:hover { text-decoration: underline; }

/* ===== 扫码状态 ===== */
.lg-state {
    min-height: 20px;
    margin: 14px 0 0;
    font-size: 14px;
    text-align: center;
    color: #8A9A92;
}
.lg-state.ok { color: #166534; font-weight: 600; }
.lg-state.err { color: #C62828; font-weight: 600; }

/* ===== 绑定表单 ===== */
.lg-bind-t {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 600;
    color: #0F3D2E;
    text-align: center;
}

/* ===== 表单 ===== */
.lg-field {
    margin-bottom: 18px;
    position: relative;
}
.lg-req-label {
    display: block;
    font-size: 13px;
    color: #40544A;
    margin-bottom: 6px;
    font-weight: 500;
}
/* 必填红星（CSS 伪元素，避免被 i18n 替换清除） */
.lg-req-label::after {
    content: '*';
    color: #E11D2E;
    margin-left: 3px;
}
.lg-field input[type="tel"],
.lg-field input[type="password"],
.lg-field input[type="text"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #D8E0DA;
    border-radius: 8px;
    font-size: 14px;
    color: #1F2E27;
    background: #FAFCFB;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.lg-field input:focus {
    border-color: #1F7A4D;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, .10);
    background: #fff;
}

/* 手机号 + 发送验证码按钮行 */
.lg-phone-row {
    display: flex;
    gap: 10px;
}
.lg-phone-row input { flex: 1; }
.lg-code-btn {
    flex-shrink: 0;
    width: 122px;
    height: 44px;
    border: 1px solid #166534;
    border-radius: 8px;
    background: #EAF4EE;
    color: #166534;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.lg-code-btn:hover { background: #DCEBE1; }
.lg-code-btn:disabled {
    background: #F0F3F1;
    color: #A8B4AD;
    border-color: #D8E0DA;
    cursor: not-allowed;
}

/* 忘记密码链接 */
.lg-forgot {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 13px;
    color: #166534;
    text-decoration: none;
}
.lg-forgot:hover { text-decoration: underline; }

/* 提示信息 */
.lg-msg {
    min-height: 20px;
    margin: 0 0 12px;
    font-size: 13px;
    color: #C62828;
}
.lg-msg.show { margin-bottom: 12px; }
.lg-msg.show.ok { color: #166534; }

/* 提交按钮 */
.lg-submit {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #166534 0%, #1F7A4D 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    box-shadow: 0 4px 14px rgba(22, 101, 52, .25);
}
.lg-submit:hover { opacity: .92; }
.lg-submit:active { transform: translateY(1px); }
.lg-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* 底部注册引导 */
.lg-foot {
    margin: 20px 0 0;
    padding-top: 14px;
    border-top: 1px solid #EEF2EF;
    text-align: center;
    font-size: 13px;
    color: #8A9A92;
}
.lg-foot a { color: #166534; text-decoration: none; font-weight: 600; }
.lg-foot a:hover { text-decoration: underline; }

/* ===== 右：注册引导区 ===== */
.lg-reg-side {
    width: 336px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #0F3D2E 0%, #14532D 55%, #166534 100%);
    color: #fff;
    padding: 44px 32px 36px;
}
/* 装饰圆 */
.lg-reg-side::before {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.lg-reg-side::after {
    content: '';
    position: absolute;
    right: -46px;
    bottom: -70px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}
.lg-reg-inner {
    position: relative;
    z-index: 1;
}
.lg-reg-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: .5px;
}
.lg-reg-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 28px;
}
.lg-reg-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 34px;
}
.lg-reg-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.lg-reg-ic {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #A7F3D0;
    margin-top: 1px;
}
.lg-reg-list b {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 28px;
}
.lg-reg-list i {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
    margin-top: 2px;
    line-height: 1.5;
}
.lg-reg-btn {
    display: block;
    text-align: center;
    height: 46px;
    line-height: 46px;
    background: #fff;
    color: #0F3D2E;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    transition: transform .15s, box-shadow .2s;
}
.lg-reg-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .26);
}
.lg-reg-tip {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}

/* ===== 忘记密码弹窗 ===== */
.lg-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lg-modal.show {
    display: flex;
    animation: lgFadeIn .2s ease-out;
}
@keyframes lgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.lg-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 14, .55);
    backdrop-filter: blur(4px);
}
.lg-modal-card {
    position: relative;
    width: 460px;
    max-width: 92vw;
    max-height: 84vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: lgSlideUp .25s ease-out;
}
@keyframes lgSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.lg-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, #0F3D2E 0%, #166534 100%);
    border-radius: 14px 14px 0 0;
}
.lg-modal-head h3 {
    margin: 0;
    font-size: 17px;
    color: #fff;
    font-weight: 600;
}
.lg-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}
.lg-modal-close:hover { background: rgba(255, 255, 255, .3); }
.lg-modal-body {
    padding: 22px 24px 24px;
}

/* 三步流程条 */
.lg-fp-steps {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    background: #F4F8F5;
    border-radius: 10px;
    padding: 10px 14px;
}
.lg-fp-step {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #9AA8A0;
    position: relative;
}
.lg-fp-step + .lg-fp-step::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #C7D2CB;
}
.lg-fp-step.on {
    color: #166534;
    font-weight: 700;
}

/* 弹窗描述 */
.lg-fp-desc {
    margin: 0 0 16px;
    font-size: 13px;
    color: #8A9A92;
}

/* 安全提示 */
.lg-fp-safe {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: #A0ACA4;
}

/* ===== 响应式 ===== */
@media (max-width: 880px) {
    .lg-card {
        flex-direction: column;
        max-width: 520px;
    }
    .lg-reg-side {
        width: 100%;
    }
    .lg-main { padding: 32px 16px 56px; }
}
@media (max-width: 480px) {
    .lg-login-side { padding: 26px 20px 24px; }
    .lg-qr-img { width: 160px; height: 160px; }
    .lg-code-btn { width: 112px; }
}
