/* ========================================================================== */
/* 登录页面专用样式                                                           */
/* ========================================================================== */

/* 登录页面主体样式 */
.login-page-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 登录页面包装器 */
.login-page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 登录页面背景 - 普通用户 */
.user-login-bg {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
}

/* 登录页面背景 - 商家用户 */
.merchant-login-bg {
    background: linear-gradient(135deg, #f0f9e8 0%, #d9f0a3 100%);
}

/* 登录卡片容器 */
.login-card {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 登录卡片头部 */
.login-card-header {
    padding: 30px 40px;
    text-align: center;
}

/* 普通用户登录头部 */
.user-login-card .login-card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
}

/* 商家用户登录头部 */
.merchant-login-card .login-card-header {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #ffffff;
}

.login-card-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
}

.login-card-header i {
    margin-right: 10px;
    font-size: 24px;
}

/* 登录卡片主体 */
.login-card-body {
    padding: 40px;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

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

.user-login-card .form-group label i {
    color: #007bff;
    margin-right: 5px;
}

.merchant-login-card .form-group label i {
    color: #28a745;
    margin-right: 5px;
}

/* 输入框样式 */
.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.user-login-card .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.merchant-login-card .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

/* 记住我和忘记密码 */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.user-login-card .forgot-password {
    color: #007bff;
}

.merchant-login-card .forgot-password {
    color: #28a745;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.user-login-card .login-btn {
    background-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.user-login-card .login-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.merchant-login-card .login-btn {
    background-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.merchant-login-card .login-btn:hover {
    background-color: #218838;
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

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

/* 登录卡片底部 */
.login-card-footer {
    padding: 30px 40px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.login-card-footer p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #6c757d;
}

.login-switch {
    font-size: 13px;
}

.login-switch a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.user-login-card .login-switch a {
    color: #007bff;
}

.merchant-login-card .login-switch a {
    color: #28a745;
}

.login-switch a:hover {
    text-decoration: underline;
}

.login-switch span {
    margin: 0 10px;
    color: #adb5bd;
}

/* 提示框样式 */
.alert-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert button.close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 0;
    margin-left: 10px;
    line-height: 1;
}

.alert button.close:hover {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-page-wrapper {
        padding: 15px;
    }
    
    .login-card {
        max-width: 100%;
    }
    
    .login-card-header,
    .login-card-body,
    .login-card-footer {
        padding: 25px 20px;
    }
    
    .login-card-header h2 {
        font-size: 24px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-password {
        margin-top: 10px;
    }
    
    .alert-fixed {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* 浏览器兼容性优化 */
/* 针对360浏览器的特定优化 */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* WebKit浏览器特定样式 */
    .login-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}

/* IE浏览器特定样式 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .login-page-wrapper {
        display: -ms-flexbox;
        -ms-flex-align: center;
        -ms-flex-pack: center;
    }
    
    .login-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}