/**
 * login-page.css - 登录页左右分栏布局
 * 
 * PC端：左侧品牌展示区 + 右侧登录表单
 * 移动端：品牌区缩为顶部横幅 + 表单在下方
 * 
 * @author     之马工场
 * @createtime 2026-02-26
 */

/* ========== 页面容器 ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 168, 132, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(0, 168, 132, 0.03) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, -2%) rotate(3deg); }
}

/* ========== 分栏容器 ========== */
.login-split {
    position: relative;
    z-index: 10;
    display: flex;
    width: 960px;
    max-width: calc(100vw - 40px);
    min-height: 600px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* ========== 左侧品牌区 ========== */
.login-brand {
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px 32px;
    background: linear-gradient(160deg, #003d33 0%, #00654f 40%, #008566 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.login-brand::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.login-brand-inner {
    position: relative;
    z-index: 1;
}

/* Logo */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    margin-bottom: 40px;
}

.brand-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.brand-logo-name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 标题 */
.brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    color: #fff;
}

.brand-title .highlight {
    color: #5eead4;
}

.brand-desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px;
    line-height: 1.6;
}

/* 特性列表 */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.brand-feature-item svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* 品牌区底部 */
.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.brand-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.brand-footer a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.brand-footer span {
    margin: 0 6px;
}

/* ========== 右侧表单区 ========== */
.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 32px 0;
}

.login-form-side-inner {
    width: 100%;
    max-width: 380px;
    padding: 0 40px;
}

.login-form-header {
    margin-bottom: 24px;
}

.login-form-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.login-form-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* 覆盖 login.css 中 login-modal 的限制 */
.login-page .login-modal-footer {
    margin-top: 12px;
    padding-top: 12px;
}

/* ========== 响应式：平板 ========== */
@media (max-width: 960px) {
    .login-split {
        width: 100%;
        max-width: 520px;
        min-height: auto;
        max-height: none;
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .login-brand {
        flex: none;
        padding: 32px 32px 24px;
    }

    .brand-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .brand-desc {
        margin-bottom: 0;
        font-size: 0.875rem;
    }

    .brand-features {
        display: none;
    }

    .brand-footer {
        display: none;
    }

    .brand-logo {
        margin-bottom: 20px;
    }

    .login-form-side {
        padding: 24px 0;
    }

    .login-form-side-inner {
        padding: 0 32px;
        max-width: 100%;
    }
}

/* ========== 响应式：手机 ========== */
@media (max-width: 580px) {
    .login-page {
        align-items: flex-start;
        padding: 0;
    }

    .login-split {
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-brand {
        padding: 24px 24px 20px;
        border-radius: 0;
    }

    .brand-logo-icon {
        width: 40px;
        height: 40px;
    }

    .brand-logo-icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .brand-logo-name {
        font-size: 1.125rem;
    }

    .brand-title {
        font-size: 1.25rem;
    }

    .login-form-side-inner {
        padding: 0 24px;
    }

    .login-form-header h2 {
        font-size: 1.25rem;
    }
}
