/* ==============================================
   ERP系统登录页样式 - 基于深海蓝 #0A2463 主题
   ============================================== */

/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft Yahei', 'PingFang SC', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #F0F5FC; /* COLOR_BG_MAIN */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 登录容器主样式 */
.login-container {
    background-color: #FFFFFF; /* COLOR_BG_CARD */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(10, 36, 99, 0.08); /* 浅阴影 */
    width: 100%;
    max-width: 1200px;
    display: flex;
    overflow: hidden;
}

/* 左侧介绍区域 */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #0A2463 0%, #2058C7 100%); /* 主色渐变 */
    color: #FFFFFF; /* COLOR_TEXT_WHITE */
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left h1 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.login-left p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.95;
}

.erp-features {
    list-style: none;
    margin-top: 20px;
}

.erp-features p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.erp-features i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: #FFFFFF;
}

/* 右侧表单区域 */
.login-right {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo区域 */
.logo {
    margin-bottom: 30px;
    text-align: center;
}

/* 标签切换样式 */
.tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #D9E2F0; /* COLOR_BORDER */
    margin-bottom: 30px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    color: #4E5969; /* COLOR_TEXT_SECONDARY */
    position: relative;
    transition: all 0.3s ease;
}

.tab.active {
    color: #0A2463; /* COLOR_PRIMARY */
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #0A2463; /* COLOR_PRIMARY */
    border-radius: 3px 3px 0 0;
}

.tab:hover {
    color: #143D92; /* COLOR_HOVER */
}

/* 表单内容区域 */
.tab-content {
    display: none;
    width: 100%;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1D2129; /* COLOR_TEXT_MAIN */
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #86909C; /* COLOR_TEXT_PLACEHOLDER */
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #D9E2F0; /* COLOR_BORDER */
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #FFFFFF;
}

.form-control::placeholder {
    color: #86909C; /* COLOR_TEXT_PLACEHOLDER */
}

.form-control:focus {
    outline: none;
    border-color: #1949AA; /* COLOR_ACTIVE */
    box-shadow: 0 0 0 3px rgba(10, 36, 99, 0.1); /* COLOR_SHADOW */
}

.form-control.error {
    border-color: #F53F3F; /* COLOR_DANGER */
}

/* 错误提示样式 */
.error-message {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #F53F3F; /* COLOR_DANGER */
    display: none;
}

.error-message.show {
    display: block;
}

/* 忘记密码链接 */
.forgot-password {
    text-align: right;
    margin-bottom: 25px;
}

.forgot-password a {
    color: #3E7BCA; /* COLOR_ASSIST */
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password a:hover {
    text-decoration: underline;
    color: #143D92; /* COLOR_HOVER */
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 14px;
    background-color: #0A2463; /* COLOR_PRIMARY */
    color: #FFFFFF; /* COLOR_TEXT_WHITE */
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn:hover {
    background-color: #143D92; /* COLOR_HOVER */
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.2); /* COLOR_SHADOW_STRONG */
    transform: translateY(-2px);
}

.btn:active {
    background-color: #1949AA; /* COLOR_ACTIVE */
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(10, 36, 99, 0.15);
}

.btn:disabled {
    background-color: #86909C;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 分割线样式 */
.divider {
    text-align: center;
    position: relative;
    margin: 25px 0;
    color: #86909C; /* COLOR_TEXT_PLACEHOLDER */
    font-size: 0.9rem;
}

.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #D9E2F0; /* COLOR_BORDER */
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* 第三方登录按钮 */
.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid #D9E2F0; /* COLOR_BORDER */
    background-color: #FFFFFF;
    color: #0A2463; /* COLOR_PRIMARY */
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    background-color: #F0F5FC; /* COLOR_BG_MAIN */
    border-color: #143D92; /* COLOR_HOVER */
    color: #143D92; /* COLOR_HOVER */
    transform: scale(1.05);
}

/* 注册/登录链接 */
.register-link, .login-link {
    text-align: center;
    font-size: 0.9rem;
    color: #4E5969; /* COLOR_TEXT_SECONDARY */
}

.register-link a, .login-link a {
    color: #3E7BCA; /* COLOR_ASSIST */
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover, .login-link a:hover {
    color: #143D92; /* COLOR_HOVER */
    text-decoration: underline;
}

/* 用户角色选择器 */
.role-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4E5969; /* COLOR_TEXT_SECONDARY */
    cursor: pointer;
}

.role-option input[type="radio"] {
    accent-color: #0A2463; /* COLOR_PRIMARY */
}

.role-option label {
    margin: 0;
    cursor: pointer;
}

.role-option:hover {
    color: #0A2463; /* COLOR_PRIMARY */
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式适配 */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        padding: 40px 30px;
        text-align: center;
    }
    
    .login-right {
        padding: 40px 30px;
    }
    
    .role-selector {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-left {
        padding: 30px 20px;
    }
    
    .login-right {
        padding: 30px 20px;
    }
    
    .login-left h1 {
        font-size: 1.8rem;
    }
    
    .tab {
        padding: 8px 15px;
        font-size: 1rem;
    }
    
    .social-login {
        gap: 10px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}