/* 登录页面样式 - 数据中台风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* LOGO位置样式 */
.login-logo-top-left,
.login-logo-top-right,
.login-logo-bottom-left,
.login-logo-bottom-right,
.login-logo-center {
    position: fixed;
    z-index: 10;
    padding: 20px;
}

.login-logo-top-left {
    top: 0;
    left: 0;
}

.login-logo-top-right {
    top: 0;
    right: 0;
}

.login-logo-bottom-left {
    bottom: 0;
    left: 0;
}

.login-logo-bottom-right {
    bottom: 0;
    right: 0;
}

.login-logo-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.login-logo-top-left .login-logo,
.login-logo-top-right .login-logo,
.login-logo-bottom-left .login-logo,
.login-logo-bottom-right .login-logo {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.login-logo-center .login-logo {
    max-height: 120px;
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .login-logo-top-left,
    .login-logo-top-right,
    .login-logo-bottom-left,
    .login-logo-bottom-right {
        padding: 15px;
    }
    
    .login-logo-top-left .login-logo,
    .login-logo-top-right .login-logo,
    .login-logo-bottom-left .login-logo,
    .login-logo-bottom-right .login-logo {
        max-height: 60px;
        max-width: 150px;
    }
    
    .login-logo-center .login-logo {
        max-height: 100px;
        max-width: 250px;
    }
}

/* 注册弹窗样式优化 */
#registerModal .modal-dialog {
    max-height: 90vh;
}

#registerModal .modal-content {
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

#registerModal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
}

#registerModal .register-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

#registerModal .register-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

#registerModal .register-section:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#registerModal .section-header {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
}

#registerModal .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

#registerModal .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

#registerModal .form-control,
#registerModal .form-select {
    border-radius: 8px 0px 0px 8px;
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#registerModal .form-control:focus,
#registerModal .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

#registerModal .form-text {
    font-size: 0.8rem;
    margin-top: 0.375rem;
}

#registerModal .btn-group .btn {
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#registerModal .btn-group .btn-check:checked + .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#registerModal .input-group .btn {
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    transition: all 0.3s ease;
}

#registerModal .input-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#registerModal .password-strength .progress {
    background-color: #e9ecef;
    border-radius: 3px;
}

#registerModal .modal-footer .btn {
    border-radius: 8px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#registerModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#registerModal .modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

#registerModal .modal-footer .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* 响应式优化 */
@media (max-width: 768px) {
    #registerModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #registerModal .register-section {
        padding: 1rem;
    }
    
    #registerModal .col-md-6 {
        margin-bottom: 0.75rem;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

.login-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #e3f2fd 0%, #e8f4f8 40%, #f5f9fc 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 背景网格和点状图案 */
.login-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(33, 150, 243, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 150, 243, 0.05) 1px, transparent 1px),
        radial-gradient(circle, rgba(33, 150, 243, 0.06) 1.5px, transparent 1.5px);
    background-size: 50px 50px, 50px 50px, 25px 25px;
    background-position: 0 0, 0 0, 0 0;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

/* 登录表单区域 */
.login-form-section {
    width: 380px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
}

/* 登录框位置：居中 */
.login-form-section.login-form-center {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
}

/* 登录框位置：左边 */
.login-form-section.login-form-left {
    right: auto !important;
    transform: translateY(-50%) !important;
    /* left 值通过内联样式设置 */
}

/* 登录框位置：右边 */
.login-form-section.login-form-right {
    left: auto !important;
    transform: translateY(-50%) !important;
    /* right 值通过内联样式设置 */
}

/* 登录标题 */
.login-header {
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.login-header .platform-title {
    font-size: 38px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 1px;
    text-align: center;
}

.login-header .platform-subtitle {
    font-size: 18px;
    font-weight: normal;
    color: #ffffff;
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
    text-align: center;
    opacity: 0.9;
}

/* 登录卡片 - 白色卡片，圆角，阴影 */
.login-card {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
    max-width: 380px;
}

/* 标签切换 */
.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-btn:hover {
    color: #1976d2;
}

.tab-btn.active {
    color: #1976d2;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #1976d2;
}

/* 欢迎信息 */
.welcome-section {
    margin-bottom: 28px;
}

.welcome-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.welcome-subtitle {
    font-size: 12px;
    color: #999;
    margin: 0;
    text-transform: lowercase;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* 表单样式 */
.login-form {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-group {
    margin-bottom: 30px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #999;
    font-size: 15px;
    z-index: 1;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}
.form-control-yzm {
    width: 100%;
    padding: 13px 16px 13px 13px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fafafa;
    color: #333;
    line-height: 1.5;
}

.form-control {
    width: 100%;
    padding: 13px 16px 13px 48px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fafafa;
    color: #333;
    line-height: 1.5;
}

.form-control:hover {
    border-color: #bdbdbd;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #1976d2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-control::placeholder {
    color: #bbb;
    font-size: 14px;
}

/* 验证码输入框特殊样式 */
#code,
#emailCode {
    padding-right: 130px;
}

.btn-code {
    position: absolute;
    right: 8px;
    padding: 8px 18px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #1976d2;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-code:hover {
    background: #e3f2fd;
    border-color: #1976d2;
}

.btn-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单操作链接 */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 14px;
}

.forgot-password,
.register-link {
    color: #1976d2;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.forgot-password:hover,
.register-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 13px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

/* 警告框样式 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
}

.alert-warning {
    background: #fff3e0;
    border: 1px solid #ff9800;
    color: #e65100;
}

/* 图形验证码样式 */
#captchaGroup .input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

#captchaGroup .input-icon {
    position: static;
    margin-right: 0;
    flex-shrink: 0;
}

#captchaGroup #captcha {
    flex: 1;
}

#captchaImage {
    height: 40px;
    width: 120px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

#captchaImage:hover {
    border-color: #1976d2;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .login-wrapper {
        justify-content: center;
        padding-right: 0;
    }
    
    .login-form-section {
        width: 100%;
        max-width: 500px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        padding: 20px 15px;
        min-height: 100vh;
        overflow-y: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .login-form-section {
        width: 100%;
        max-width: 100%;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 0;
        padding: 0;
    }
    
    .login-header {
        margin-bottom: 20px;
    }
    
    .login-header .platform-title {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .login-header .platform-subtitle {
        font-size: 14px;
        margin-top: 8px;
    }
    
    .login-card {
        width: 100%;
        padding: 24px 20px;
        border-radius: 12px;
        max-width: 100%;
    }
    
    .login-tabs {
        margin-bottom: 20px;
        gap: 0;
    }
    
    .tab-btn {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .welcome-section {
        margin-bottom: 20px;
    }
    
    .welcome-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .welcome-subtitle {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .input-wrapper {
        padding: 0 12px;
    }
    
    .input-icon {
        font-size: 16px;
        left: 12px;
    }
    
    .form-control {
        padding: 12px 12px 12px 40px;
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .form-control-yzm {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    #code,
    #emailCode {
        padding-right: 100px;
    }
    
    #captchaImage {
        height: 36px;
        width: 100px;
    }
    
    .btn-code {
        padding: 10px 12px;
        font-size: 12px;
        min-width: 85px;
    }
    
    .form-actions {
        margin-bottom: 20px;
        font-size: 13px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 16px;
        font-weight: 500;
    }
    
    /* 登录框位置在移动端始终居中 */
    .login-form-section.login-form-left,
    .login-form-section.login-form-right {
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }
    
    /* 标签页在移动端优化 */
    .login-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .login-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        min-width: 80px;
        flex-shrink: 0;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .login-card {
        padding: 20px 16px;
    }
    
    .login-header .platform-title {
        font-size: 24px;
    }
    
    .login-header .platform-subtitle {
        font-size: 13px;
    }
    
    .welcome-title {
        font-size: 16px;
    }
    
    .welcome-subtitle {
        font-size: 11px;
    }
    
    .tab-btn {
        font-size: 13px;
        padding: 8px 0;
        min-width: 70px;
    }
    
    .form-control {
        padding: 11px 11px 11px 38px;
        font-size: 16px;
    }
    
    .btn-code {
        padding: 9px 10px;
        font-size: 11px;
        min-width: 75px;
    }
    
    #code,
    #emailCode {
        padding-right: 90px;
    }
}
