/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 主容器 */
.main-container {
    width: 100%;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* 登录卡片容器（左右并排布局） */
.login-cards-wrapper {
    width: 100%;
    max-width: 1000px;
    display: flex;
    align-items: stretch;
    gap: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 绑定模式下容器宽度调整为单卡片 */
.login-cards-wrapper.bind-mode {
    max-width: 450px;
}

/* 单卡片模式（仅显示账号登录时）容器宽度调整 */
.login-cards-wrapper.single-card-mode {
    max-width: 450px;
}

/* 登录卡片 */
.login-card {
    flex: 1;
    min-width: 0; /* 防止flex子元素溢出 */
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 600px; /* 确保两个卡片高度一致 */
}

/* 绑定模式下卡片不需要占据全部宽度 */
.login-cards-wrapper.bind-mode .login-card {
    flex: none;
    width: 100%;
}

/* 中间分隔线 */
.login-divider {
    width: 2px;
    background-color: #7da5da; /* 更浅的蓝色，让分隔线更柔和 */
    flex-shrink: 0;
    height: clamp(240px, 60vh, 420px); /* 兼顾不同屏幕的显示高度 */
    align-self: center;
    border-radius: 999px;
}

/* 登录头部 */
.login-header {
    padding: 25px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: relative;
}

    .login-header::after {
        content: "";
        position: absolute;
        bottom: -1px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background-color: #044093;
    }

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #044093;
    margin: 0;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 登录主体 */
.login-body {
    padding: 30px;
    flex: 1; /* 让登录主体占据剩余空间 */
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #444;
    margin-bottom: 8px;
}

.form-input-container {
    position: relative;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 15px;
    color: #333;
    transition: all 0.3s;
    padding-left: 45px;
    caret-color: #000;
}

    .form-input:focus {
        border-color: #044093;
        box-shadow: 0 0 0 2px rgba(4, 64, 147, 0.1);
        outline: none;
    }

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #666;
}

/* 密码图标 */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.7;
    z-index: 2;
}

/* 忘记密码链接 */
.forgot-password {
    display: block;
    text-align: right;
    font-size: 13px;
    color: #044093;
    text-decoration: none;
    margin-top: 10px;
    margin-bottom: 25px;
}

    .forgot-password:hover {
        text-decoration: underline;
    }

/* 登录按钮 */
.login-button {
    width: 100%;
    height: 48px;
    background-color: #044093;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .login-button:hover {
        background-color: #0D3DA3;
    }

.login-button-icon {
    margin-right: 10px;
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    color: #999;
    margin: 20px 0;
}

    .divider::before, .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: #eee;
    }

    .divider span {
        padding: 0 15px;
        font-size: 13px;
    }

/* 注册链接 */
.register-link-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.register-link {
    color: #044093;
    text-decoration: none;
    font-weight: 600;
}

    .register-link:hover {
        text-decoration: underline;
    }

/* 企业标识 */
.brand-container {
    text-align: center;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    margin-top: 88px;
}

.brand-logo {
    max-width: 160px;
    opacity: 0.8;
}

/* 响应式 */
@media (max-width: 768px) {
    /* 小屏幕时垂直堆叠 */
    .login-cards-wrapper {
        flex-direction: column;
        max-width: 450px;
    }
    
    /* 隐藏分隔线 */
    .login-divider {
        display: none;
    }
    
    .login-card {
        width: 100%;
        min-height: auto; /* 移动端取消最小高度限制 */
    }
}

@media (max-width: 500px) {
    .login-cards-wrapper {
        box-shadow: none;
        border: 1px solid #eee;
    }

    .login-body {
        padding: 20px 15px;
    }
}

/* 保持原有layui样式兼容性 */
.layui-btn {
    background-color: #044093 !important;
    border-color: #044093 !important;
}

.layui-form-checkbox i {
    right: 180px !important;
}

.layui-form-select dl dd.layui-this {
    background-color: #044093 !important;
}

/* 验证码相关样式 */
#LoginValidation {
    margin-top: 20px;
}

    #LoginValidation select {
        width: 100%;
        height: 48px;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 15px;
        color: #333;
        background-color: #fff;
    }

#LoginValidationCode {
    flex: 2;
}

    #LoginValidationCode input {
        width: 100%;
        height: 48px;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 15px;
        color: #333;
    }

#LoginValidationButt {
    flex: 1;
}

#LoginValidationButt .layui-btn {
    width: 100%;
    height: 48px;
    background-color: #044093 !important;
    border-color: #044093 !important;
}

/* 验证码按钮样式 */
#LoginValidationButt input[type="button"] {
    width: 100%;
    height: 48px;
    background-color: #044093;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

#LoginValidationButt input[type="button"]:hover {
    background-color: #0D3DA3;
}

#LoginValidationButt .login-button {
    width: 100%;
    height: 48px;
    background-color: #044093;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

#LoginValidationButt .login-button:hover {
    background-color: #0D3DA3;
}

.layui-btn-disabled, .layui-btn-disabled:active, .layui-btn-disabled:hover {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    font-weight: 500 !important;
}
