* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* ========== PC 端头部 ========== */
.site-header {
    background: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    color: #2d5a27;
    gap: 8px;
}

.site-logo img {
    height: 40px;
    vertical-align: middle;
}

.site-nav {
    display: flex;
    gap: 30px;
    margin-left: 40px;
}

.site-nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: #2d5a27;
}

.site-user {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    margin-left: auto;
}

.site-login-link {
    text-decoration: none;
    color: #2d5a27;
    border: 1px solid #2d5a27;
    padding: 6px 18px;
    border-radius: 20px;
    transition: all 0.3s;
}

.site-login-link:hover {
    background: #2d5a27;
    color: #fff;
}

/* ========== 主体登录区域 ========== */
.login-page {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 620px;
    margin: 20;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* 左侧品牌区域：浅色底 + 电商购物主题插画背景 */
.login-left {
    flex: 1.2;
    background:
        linear-gradient(180deg, rgba(250, 253, 246, 0.86) 0%, rgba(238, 245, 231, 0.72) 100%),
        url('/images/login-left-bg.png') center/cover no-repeat;
    display: flex;
    align-items: flex-start;     /* 内容向左上对齐 */
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.login-left-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    padding: 56px 0 0 56px;      /* 左上留白 */
    color: #2d5a27;
    text-align: left;
}

/* LOGO + 品牌名 */
.left-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
}

.left-logo-icon {
    width: 46px;
    height: 46px;
    background: #fff;
    border: 1px solid rgba(101, 163, 13, 0.20);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(101, 163, 13, 0.12);
    overflow: hidden;
}

.left-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.left-brand span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2d5a27;
}

.left-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 14px;
    color: #2d5a27;
}

.left-subtitle {
    font-size: 15px;
    opacity: 0.78;
    letter-spacing: 1px;
    color: #4d7c0f;
}

/* ========== PC 端底部 ========== */
.site-footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 36px 0;
    text-align: center;
}

.site-footer .slogan {
    font-size: 18px;
    font-weight: 600;
    color: #2d5a27;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.site-footer .slogan-sub {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

.site-footer .divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8e6c9, transparent);
    margin: 0 auto 16px;
}

.site-footer .copyright {
    font-size: 12px;
    color: #bbb;
    line-height: 2;
}

.site-footer .copyright a {
    color: #aaa;
    text-decoration: none;
}

.site-footer .copyright a:hover {
    color: #2d5a27;
}

/* 右侧登录区域：柠檬黄绿渐变，顶部淡金光晕 */
.login-right {
    width: 480px;
    background: linear-gradient(160deg, #f8ffd9 0%, #e4f3c4 55%, #d4efc4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 30px;
    overflow: hidden;
}

/* 顶部淡金光晕 */
.login-right::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -60px;
    right: -60px;
    height: 320px;
    background: radial-gradient(ellipse at top center, rgba(255, 226, 130, 0.45), rgba(255, 226, 130, 0.12) 45%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

/* 底部一抹浅青光晕，平衡画面 */
.login-right::after {
    content: '';
    position: absolute;
    bottom: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 520px;
    height: 300px;
    background: radial-gradient(ellipse at bottom center, rgba(120, 200, 170, 0.25), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* 白色登录卡片浮在光晕之上 */
.login-right .login-box {
    position: relative;
    z-index: 1;
}

.login-box {
    width: 360px;
    background: #fff;
    border: 1px solid #e8eee1;
    padding: 30px 0 24px;
    min-height: 560px;          /* 统一高度：避免微信/账号 tab 内容高度差异导致整体上下浮动 */
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(45, 90, 39, 0.10);
}

/* 头部 */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 20px;
    color: #2d5a27;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header .portal-badge {
    display: inline-block;
    background: linear-gradient(135deg, #84cc16, #65a30d);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 10px;
    vertical-align: middle;
    letter-spacing: 0;
}

.login-header p {
    font-size: 13px;
    color: #999;
}

/* 标签页 */
.login-tabs {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    position: relative;
    transition: all 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-item[data-tab="gzh"] {
    flex: 1.5;
}

.tab-item i {
    margin-right: 5px;
    font-size: 16px;
}

.tab-item.active {
    color: #65a30d;
    font-weight: 500;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    width: 60%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, #84cc16, #2d5a27);
}

/* 表单内容 */
.tab-content {
    display: none;
    flex: 1;                     /* 在 login-box flex 列布局下占据剩余高度 */
    margin: 0 20px;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    justify-content: center;     /* 内容垂直居中，使微信/账号密码 tab 切换时视觉对齐 */
    align-items: center;
}

#tab-account form {
    width: 100%;
    padding: 0 40px;
}

#tab-wechat {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

.form-group .layui-input {
    height: 46px;
    line-height: 46px;
    border-radius: 12px;
    border: 1.5px solid #e2e9dd;
    background: #f7faf4;
    padding: 0 15px 0 42px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group .layui-input::placeholder {
    color: #a8b8a0;
}

.form-group .layui-input:focus {
    background: #fff;
    border-color: #84cc16;
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.16);
}

/* 输入框前置图标 */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8fa87f;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.password-group .eye-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 18px;
    z-index: 1;
}

.password-group .eye-icon:hover {
    color: #84cc16;
}

.password-group .layui-input {
    padding-right: 45px;
}

.verify-group {
    display: flex;
    gap: 10px;
}

.verify-group .layui-input {
    flex: 1;
}

.verify-btn {
    width: 110px;
    height: 44px;
    line-height: 44px;
    background: #fff;
    border: 1px solid #65a30d;
    color: #65a30d;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.verify-btn:hover {
    background: #65a30d;
    color: #fff;
}

.agreement {
    display: flex;
    align-items: flex-start;
    font-size: 12px;
    color: #666;
}

.agreement input[type="checkbox"] {
    margin-right: 6px;
    margin-top: 2px;
}

.agreement a {
    color: #65a30d;
    text-decoration: none;
}

.login-btn {
    height: 46px;
    line-height: 46px;
    background: linear-gradient(135deg, #84cc16 0%, #4d7c0f 100%);
    border: none;
    border-radius: 23px;
    font-size: 16px;
    letter-spacing: 4px;
    box-shadow: 0 6px 18px rgba(101, 163, 13, 0.35);
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(101, 163, 13, 0.45);
}

/* 底部链接 */
.login-footer {
    margin-top: 20px;
    padding: 0 40px;    /* 与上方表单内容对齐，避免左右两端贴边 */
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 10px;
}

.footer-links .register-link {
    color: #65a30d;
    text-decoration: none;
}

.footer-links .forgot-link {
    color: #999;
    text-decoration: none;
}

.mini-tips {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* 品牌标识 */
.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    font-size: 16px;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 公众号关注登录 */
.wx-login-wrap {
    text-align: center;
    padding: 4px 0;
}

.wx-login-unconfigured {
    color: #999;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
    padding: 10px;
    word-break: break-all;
}
.gzh-login-wrap {
    padding-top: 8px;
}

.gzh-login-tip {
    text-align: left;
    color: #999;
    font-size: 13px;
    line-height: 1.8;
    white-space: nowrap;
    display: table;
    margin: 0 auto 10px;
}

/* 固定尺寸二维码盒子：loading / 二维码 / 错误提示共用，保证与账号密码 tab 高度一致不抖动 */
.gzh-qr-box {
    width: 200px;
    height: 200px;
    background: #fff;
    border: 1px solid #eef1e9;
    box-shadow: 0 8px 24px rgba(45, 90, 39, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.gzh-login-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}

.gzh-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e6efdc;
    border-top-color: #84cc16;
    border-right-color: #84cc16;
    border-radius: 50%;
    animation: gzh-spin 0.8s linear infinite;
    margin-bottom: 14px;
}

@keyframes gzh-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#gzh-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 232px;
}

.gzh-login-qr {
    width: 100%;
    height: 100%;
    padding: 8px;
    background: #fff;
    display: block;
}

.gzh-login-refresh {
    color: #1a9cfc;
}

/* 扫码未注册：登录/注册 2 个 TAB 绑定表单 */
.gzh-bind-wrap {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.gzh-bind-panel {
    display: none;
}

.gzh-bind-panel.active {
    display: block;
}

.gzh-bind-panel .form-group {
    margin-bottom: 16px;
}

.gzh-bind-rescan {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
}

.gzh-bind-rescan a {
    color: #1a9cfc;
}

/* 响应式 */
@media (max-width: 900px) {
    .login-left {
        display: none;
    }
    .login-right {
        width: 100%;
        padding: 20px 15px;
        background: linear-gradient(160deg, #f8ffd9 0%, #e4f3c4 55%, #d4efc4 100%);
    }
    .login-box {
        width: 100%;
        max-width: 400px;
        min-height: auto;
    }
    .site-container {
        padding: 0 15px;
    }
    .site-nav {
        display: none;
    }
    .site-logo {
        font-size: 20px;
    }
    .site-logo img {
        height: 32px;
    }
}
