* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #3269ff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/installapi/images/bg.png') center/cover no-repeat;
    z-index: 0;
}

.login-container {
    display: flex;
    width: 1200px;
    height: 450px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-left {
    width: 670px;
    flex-shrink: 0;
    background: #3269ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-left img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-right {
    flex: 1;
    padding: 50px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.login-brand h2 {
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 600;
}

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

.form-label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fafafa;
    outline: none;
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap .form-input {
    padding-right: 44px;
}

.toggle-pwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
}

.form-input:focus {
    border-color: #3269ff;
    background: #fff;
}

.form-input::placeholder {
    color: #bbb;
}

.form-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.remember-label {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.remember-label input {
    margin-right: 4px;
    vertical-align: middle;
}

.forgot-link {
    font-size: 13px;
    color: #3269ff;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: none;
}

/* 登录按钮 + 扫光效果 */
.login-btn {
    width: 100%;
    height: 48px;
    background: #3269ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 8px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.login-btn:hover {
    background: #2054e0;
    box-shadow: 0 4px 16px rgba(50, 105, 255, 0.4);
}

.login-btn:hover::before {
    left: 150%;
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-btn:disabled::before {
    display: none;
}

.error-msg {
    color: #ff4d4f;
    font-size: 13px;
    padding: 10px 14px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    display: none;
    margin-bottom: 16px;
}

@media (max-width: 1240px) {
    .login-container {
        flex-direction: column;
        width: calc(100% - 40px);
        height: auto;
        margin: 20px;
    }

    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
        padding: 40px 30px;
    }
}
