/* ============================================================
   登录页样式 login.css
   左右分栏商务风格 - 左侧品牌展示 + 右侧登录表单
   ============================================================ */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.login-page {
    min-height: 100vh;
    background: #f8fafc;
    overflow: hidden;
}

/* ========== 整体布局 ========== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========== 左侧品牌展示区 ========== */
.login-brand {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 30%, #2563eb 70%, #3b82f6 100%);
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 背景装饰 */
.brand-bg-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.brand-bg-decoration::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    top: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.brand-bg-decoration::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* 网格纹理 */
.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
}

.brand-content {
    position: relative;
    z-index: 1;
    padding: 60px 56px;
    max-width: 680px;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 60px;
}
.brand-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
}
.brand-logo-img {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgba(255,255,255,0.95);
    border: 2px solid rgba(255,255,255,0.5);
}
.brand-logo-text .brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.brand-logo-text .brand-sub {
    font-size: 11px;
    opacity: 0.6;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* 主标题区 */
.brand-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 48px;
}
.brand-title {
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
/* 大标题带logo：一行显示，响应式自适应 */
.brand-hero-title {
    display: flex !important;
    align-items: center !important;
    gap: clamp(14px, 1.8vw, 24px);
    margin-bottom: 20px;
    min-width: 0;
    width: 100%;
}
.brand-hero-title img.brand-hero-logo {
    width: clamp(56px, 6vw, 84px) !important;
    height: clamp(56px, 6vw, 84px) !important;
    max-width: clamp(56px, 6vw, 84px) !important;
    max-height: clamp(56px, 6vw, 84px) !important;
    object-fit: contain !important;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    padding: 0;
    flex-shrink: 0 !important;
    box-shadow: none;
    display: block !important;
}
.brand-hero-logo-default {
    width: clamp(56px, 6vw, 84px) !important;
    height: clamp(56px, 6vw, 84px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: clamp(24px, 2.8vw, 36px);
    color: #fff;
    background: transparent;
    border-radius: 0;
    flex-shrink: 0 !important;
}
.brand-hero-title .brand-title {
    margin-bottom: 0 !important;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: visible;
}
.brand-desc {
    font-size: 15px;
    line-height: 1.8;
    opacity: 0.85;
    max-width: 440px;
}

/* 特色功能 */
.brand-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}
.feature-item:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}
.feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.feature-text .feature-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}
.feature-text .feature-desc {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}

/* 底部 */
.brand-footer {
    font-size: 12px;
    opacity: 0.5;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ========== 右侧登录表单区 ========== */
.login-form-side {
    width: 520px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.login-form-container {
    width: 100%;
    max-width: 380px;
}

/* 表单头部 */
.form-header {
    margin-bottom: 32px;
}
.form-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.form-subtitle {
    font-size: 14px;
    color: #94a3b8;
}

/* 错误提示 */
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.3s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 表单 */
.login-form .form-group {
    margin-bottom: 20px;
}
.login-form .form-label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
    display: block;
}
.login-form .form-control {
    width: 100%;
    padding: 12px 14px 12px 44px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}
.login-form .form-control:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.login-form .form-control::placeholder {
    color: #94a3b8;
}

.input-icon {
    position: relative;
}
.input-icon .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    width: 18px;
    text-align: center;
    transition: color 0.2s ease;
}
.input-icon:focus-within .icon {
    color: #3b82f6;
}

/* 登录选项 */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
}
.remember input {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2563eb;
}
.forgot {
    font-size: 13px;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}
.forgot:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 4px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.login-btn:active:not(:disabled) {
    transform: translateY(0);
}
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 分割线 */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.login-divider span {
    font-size: 12px;
    color: #94a3b8;
}

/* 企业微信登录 */
.wecom-login-btn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    background: #07c160;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wecom-login-btn:hover {
    background: #06ad56;
    box-shadow: 0 4px 14px rgba(7, 193, 96, 0.3);
    transform: translateY(-1px);
}
.wecom-icon {
    font-size: 16px;
}

/* 提示 */
.form-tips {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}
.form-tips p {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
}

/* ========== 响应式 ========== */
@media (max-width: 960px) {
    .login-brand {
        display: none;
    }
    .login-form-side {
        width: 100%;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .login-form-side {
        padding: 24px 20px;
    }
    .form-title {
        font-size: 22px;
    }
    .brand-title {
        font-size: 28px;
    }
}
