/**
 * 登录页面样式
 * 参照原首页aops/index.html的登录实现方案
 */

/* 登录页不需要顶部导航栏，重置 body 的 padding-top */
body.login-page {
    padding-top: 0 !important;
}

/* 登录页面主容器 */
.login-main {
    padding: 60px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

/* 消息提示区域 */
.login-message-area {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 400px;
    width: 100%;
    padding: 0 20px;
}

.login-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid-login" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid-login)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

/* 登录容器布局 */
.login-container {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin: 0 20px;
    position: relative;
    z-index: 2;
}

/* 上半部分：登录文案展示区 */
.login-header-section {
    padding: 20px 40px 15px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* 登录内容区 */
.login-content-section {
    padding: 40px;
    background: #ffffff;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* 登录标签页 */
.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    color: #667eea;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
    border-radius: 1px;
}

.tab-btn:hover {
    color: #667eea;
}

/* 登录表单 */
.login-form {
    margin-top: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 2;
}

.form-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

/* 显示/隐藏密码按钮（右侧眼睛） */
.toggle-visibility {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #888;
}

.toggle-visibility:hover { color: #667eea; }

.form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #999;
    font-size: 14px;
}

/* 验证码输入组 */
.verification-group {
    display: flex;
    gap: 10px;
}

.input-group {
    flex: 1;
    position: relative;
}

.send-code-btn {
    padding: 0 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.send-code-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 登录页脚 */
.login-footer {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}


/* 错误消息样式 */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ffcdd2;
}

/* 成功消息样式 */
.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #c8e6c9;
}

/* 登录页面消息样式 */
.login-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: loginMessageSlideIn 0.3s ease-out;
}

.login-message-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.login-message-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.login-message-warning {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc02;
}

.login-message-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

@keyframes loginMessageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginMessageSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .login-btn {
    background: #ccc;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-main {
        padding: 50px 0 60px;
    }
    
    .login-container {
        flex-direction: column;
        margin: 20px 10px;
        max-width: none;
    }
    
    .login-content-section {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
}

@media (max-width: 480px) {
    .login-main {
        padding: 40px 0 60px;
    }
    
    .login-content-section {
        padding: 20px 15px;
    }
    
    .form-group input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* 动画效果 */
.login-container {
    animation: loginSlideIn 0.6s ease-out;
}

@keyframes loginSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-group {
    animation: formSlideIn 0.4s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}