/* ========================================
   会员登录页面样式 — 大方·大器版
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #016738;
    --primary-dark: #014f2b;
    --primary-light: #eaf7ef;
    --accent: #c41230;
    --text: #1a1a1a;
    --text-light: #4a4a4a;
    --text-muted: #8c8c8c;
    --white: #fff;
    --border: #e6e9ec;
    --bg: #f4f5f7;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 8px 40px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.05);
    --transition: 0.25s ease;
}

html { font-size: 16px; }
body {
    font-family: "Microsoft YaHei","微软雅黑","PingFang SC","Helvetica Neue",Arial,sans-serif;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ====== 页面容器 ====== */
.login-page-body {
    background: linear-gradient(135deg, #f0f4f8 0%, #eef2f5 40%, #f5f7fa 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰圆 */
.login-page-body::before {
    content: '';
    position: fixed;
    top: -350px;
    right: -200px;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(1,103,56,.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.login-page-body::after {
    content: '';
    position: fixed;
    bottom: -250px;
    left: -150px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(1,103,56,.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ====== 顶部导航 ====== */
.login-top-bar {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 0 40px;
    height: 56px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.login-top-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.login-logo {
    display: flex;
    align-items: baseline;
    gap: 14px;
    text-decoration: none;
}
.login-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 3px;
}
.login-logo-sub {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    font-weight: 400;
}
.login-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    padding: 8px 16px;
    border-radius: 6px;
}
.login-back-home:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* ====== 主体区域 ====== */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    position: relative;
    z-index: 1;
}

.login-box-wrapper {
    display: flex;
    width: 1180px;
    max-width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 480px;
}

/* ====== 左侧表单面板 ====== */
.login-form-panel {
    flex: 1;
    padding: 32px 48px;
    min-width: 0;
}

.login-form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 22px;
    letter-spacing: 2px;
}
.login-form-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin: 10px auto 0;
}

/* Tab 切换 */
.login-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
}
.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    font-weight: 500;
    letter-spacing: 1px;
}
.login-tab:hover { color: var(--primary); }
.login-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

/* 面板 */
.login-panel { display: block; }
.login-panel.hidden { display: none; }

/* 输入组 */
.input-group { margin-bottom: 18px; }
.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    letter-spacing: .5px;
}
.input-field {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text);
    background: #f8f9fb;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all var(--transition);
}
.input-field::placeholder { color: #bcc0c8; }
.input-field:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(1,103,56,.06);
}

/* 验证码行 */
.input-row {
    display: flex;
    gap: 14px;
}
.input-code { flex: 1; min-width: 0; }

.code-img-box {
    flex-shrink: 0;
    width: 120px;
    height: 46px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1.5px solid var(--border);
    transition: all var(--transition);
    user-select: none;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 3px;
    color: var(--primary);
}
.code-img-box:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(1,103,56,.1);
}

.sms-btn {
    flex-shrink: 0;
    width: 140px;
    height: 46px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 1px;
}
.sms-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(1,103,56,.2);
}
.sms-btn:disabled {
    background: #d0d5dd;
    cursor: not-allowed;
    box-shadow: none;
    letter-spacing: 0;
}

/* 协议勾选 */
.login-policy {
    margin: 18px 0 14px;
}
.policy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}
.policy-check input[type="checkbox"] { display: none; }
.check-mark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #d0d5dd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    margin-top: 2px;
    position: relative;
}
.policy-check input:checked + .check-mark {
    background: var(--primary);
    border-color: var(--primary);
}
.policy-check input:checked + .check-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 2px;
}
.policy-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.policy-link:hover { text-decoration: underline; }

/* 登录按钮 */
.login-submit-btn {
    display: block;
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 4px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.login-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.08));
    pointer-events: none;
}
.login-submit-btn:hover {
    box-shadow: 0 8px 24px rgba(1,103,56,.3);
    transform: translateY(-2px);
}
.login-submit-btn:active { transform: translateY(0); }
.login-submit-btn:disabled {
    background: #d0d5dd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 辅助链接 */
.login-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 12px;
}
.login-links a {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    font-weight: 500;
}
.login-links a:hover { color: var(--primary); }

/* 提示信息 */
.login-hints {
    margin-top: 20px;
    padding: 14px 20px;
    background: #fafbfc;
    border-radius: var(--radius);
    border: 1px solid #f0f2f5;
}
.hint-item {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 2;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.hint-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 10px;
}
.hint-item a { color: var(--primary); text-decoration: none; font-weight: 500; }
.hint-item a:hover { text-decoration: underline; }

/* 版权 */
.login-copyright {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}
.login-copyright a { color: var(--text-muted); text-decoration: none; }
.login-copyright a:hover { color: var(--primary); }

/* ====== 右侧面板 ====== */
.login-register-panel {
    width: 380px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #002615 0%, #013d25 25%, #016738 55%, #01804a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-register-panel::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
    pointer-events: none;
}
.login-register-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,.02);
    pointer-events: none;
}

.register-illust {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.register-icon {
    font-size: 38px;
    opacity: .9;
}

.register-info {
    position: relative;
    z-index: 1;
    width: 100%;
}
.register-info-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.register-info-desc {
    font-size: 13px;
    opacity: .82;
    line-height: 1.8;
    margin-bottom: 18px;
}
.register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    letter-spacing: 2px;
    backdrop-filter: blur(4px);
}
.register-btn:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.45);
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    color: #fff;
    transform: translateY(-1px);
}

/* 右侧特色列表 */
.side-features {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.side-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    opacity: .85;
    text-align: left;
    padding: 7px 14px;
    background: rgba(255,255,255,.06);
    border-radius: var(--radius);
    transition: background var(--transition);
}
.side-feat:hover {
    background: rgba(255,255,255,.12);
}
.side-feat svg {
    flex-shrink: 0;
    color: rgba(255,255,255,.7);
}

/* ====== 协议弹窗 ====== */
.policy-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.policy-modal.active { display: block; }

.policy-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.policy-modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 760px;
    max-width: 95vw;
    max-height: 86vh;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn .3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translate(-50%, -48%) scale(.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.policy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: #fafbfc;
}
.policy-modal-header h3 {
    font-size: 17px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: .5px;
}
.policy-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    line-height: 1;
}
.policy-modal-close:hover { background: #f0f0f0; color: var(--text); }

.policy-modal-body {
    padding: 28px 32px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    color: var(--text-light);
    line-height: 2;
}
.policy-modal-body strong { color: var(--text); }
.policy-modal-body ul { padding-left: 24px; margin-bottom: 12px; }
.policy-modal-body ul li { margin-bottom: 4px; }

/* ====== Toast ====== */
.login-toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translate(-50%, -20px);
    background: rgba(0,0,0,.82);
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transition: all .3s ease;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: .5px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.login-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    .login-top-bar { padding: 0 16px; height: 52px; }
    .login-logo-text { font-size: 18px; letter-spacing: 1px; }
    .login-logo-sub { display: none; }
    .login-main { padding: 16px 12px 20px; }
    .login-box-wrapper { flex-direction: column-reverse; min-height: auto; }
    .login-register-panel {
        width: 100%;
        padding: 28px 24px;
    }
    .register-illust { width: 64px; height: 64px; margin-bottom: 14px; }
    .register-icon { font-size: 32px; }
    .register-info-title { font-size: 17px; }
    .register-info-desc { font-size: 13px; margin-bottom: 14px; }
    .register-btn { height: 42px; font-size: 14px; }
    .login-form-panel { padding: 28px 24px; }
    .login-form-title { font-size: 22px; margin-bottom: 18px; }
    .login-tabs { margin-bottom: 18px; }
    .input-field { height: 44px; font-size: 14px; }
    .login-submit-btn { height: 46px; font-size: 16px; }
    .policy-modal-box { max-width: 98vw; max-height: 92vh; }
}
