/* 登录页特定的body样式 */
body.login-page {
    background: linear-gradient(135deg, #F8FAFF 0%, #E8F0FF 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-box {
    width: 800px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 auto;
}

/* 品牌区域 */
.brand-section {
    background: var(--gradient);
    padding: 48px 32px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* background: url('../images/pattern.png') center/cover; */
    opacity: 0.1;
}

.brand-section .logo {
    width: auto;
    margin-bottom: 32px;
    flex-shrink: 0;
}

.brand-section h2 {
    font-size: 26px;
    margin-bottom: 16px;
}

.brand-section p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
}

/* 登录区域 */
.login-section {
    padding: 48px 32px;
    background: white;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 50px;
    width: auto;
}

.register-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* 登录方式切换 */
.login-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 26px;
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: none;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    font-size: 14px;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

/* 登录表单 */
.login-form-container {
    display: none;
}

.login-form-container.active {
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    overflow: hidden;
    height: 40px;
    margin-bottom: 0;
}

.prefix {
    padding: 0 14px;
    background: var(--bg-light);
    color: var(--text-light);
    border-right: 1px solid #E2E8F0;
    font-size: 14px;
}

.input-group input {
    flex: 1;
    border: none;
    padding: 0 14px;
    outline: none;
    font-size: 14px;
}

.input-group input:focus {
    background: var(--bg-light);
}

.code-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 0;
}

.code-group input {
    flex: 1;
    padding: 0 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    outline: none;
    height: 40px;
    transition: all 0.3s ease;
}

.code-group input:focus {
    border-color: var(--primary);
    background: var(--bg-paper);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.send-code-btn {
    padding: 0 20px;
    background: var(--bg-paper);
    border: none;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    height: 40px;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.send-code-btn:not(:disabled):hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.send-code-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--bg-neutral);
    color: var(--text-disabled);
    border-color: var(--border-light);
}

.submit-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease;
    height: 40px;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* 微信扫码登录 */
.qrcode-container {
    text-align: center;
    padding: 20px 0;
}

.qrcode-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
}

.qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.refresh-btn {
    margin-top: 20px;
    padding: 8px 16px;
    background: none;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* 其他登录方式 */
.other-login {
    margin-top: 40px;
}

.divider {
    position: relative;
    text-align: center;
    margin-bottom: 26px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E2E8F0;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 14px;
    color: var(--text-light);
    font-size: 12px;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-box {
        grid-template-columns: 1fr;
        width: 400px;
        max-width: 400px;
    }

    .brand-section {
        padding: 32px 20px;
        text-align: center;
    }

    .login-section {
        padding: 32px 20px;
    }
} 

/* 协议同意框样式 */
.agreement-box {
    margin-top: 16px;
    margin-bottom: 24px;
    font-size: 13px;
    text-align: center;
}

.agreement-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    justify-content: center;
    line-height: 1.5;
}

.agreement-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    border: 1.5px solid var(--border-light);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    background: white;
    transition: all 0.2s ease;
}

.agreement-label input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.agreement-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.agreement-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0 2px;
}

.agreement-label a:hover {
    background: var(--primary-light);
    border-radius: 2px;
} 

/* 微信扫码登录下的协议框样式 */
.wechat-agreement {
    border-top: 0px solid var(--border-light);
    padding-top: 0px;
}

.wechat-agreement .agreement-label {
    opacity: 0.9;
}

.wechat-agreement .agreement-label:hover {
    opacity: 1;
}

.wechat-agreement input[type="checkbox"] {
    background: var(--bg-paper);
} 

/* 错误提示样式 */
.error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
    min-height: 0;
    transition: all 0.3s ease;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.error-message.visible {
    opacity: 1;
    height: auto;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* 输入框错误状态 */
.input-group.error input {
    border-color: var(--error);
}

.input-group.error input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 验证码按钮禁用状态 */
.send-code-btn:disabled {
    background: var(--bg-neutral);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* 加载状态 */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 