/**
 * 登录页面样式 — 知乎风格全屏登录
 */

.gsage-login-page {
    margin: 0;
    min-height: 100vh;
}

.gsage-login-page .gsage-login-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f6f6f6;
    background-size: cover;
    background-position: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.gsage-login-bg-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ===== 页面头部：Logo + 副标题 ===== */
.gsage-login-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 40px;
}

.gsage-login-header-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.gsage-login-header-sitename {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.gsage-login-header-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    line-height: 1.6;
}

/* ===== 卡片主体：左右分栏 ===== */
.gsage-login-card {
    position: relative;
    z-index: 1;
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    max-width: 800px;
    width: 100%;
}

/* 有配图时卡片更宽 */
.gsage-login-card--has-side {
    max-width: 800px;
}

/* 无配图时卡片更窄 */
.gsage-login-card:not(.gsage-login-card--has-side) {
    max-width: 440px;
}

/* ===== 左侧：配图区域 ===== */
.gsage-login-card-left {
    flex: 1 1 50%;
    min-height: 480px;
    position: relative;
    overflow: hidden;
}

.gsage-login-sideimg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 图片稍靠右 */
    object-position: 60% center;
}

/* 渐变遮罩：左侧可见，右侧渐隐融入白色表单 */
.gsage-login-sideimg-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 0%, transparent 35%, #fff 100%);
    pointer-events: none;
}

/* ===== 右侧：表单区域 ===== */
.gsage-login-card-right {
    flex: 0 0 400px;
    width: 400px;
    display: flex;
    flex-direction: column;
}

/* 无配图时右侧居中占据整卡 */
.gsage-login-card:not(.gsage-login-card--has-side) .gsage-login-card-right {
    flex: 1 1 auto;
    width: auto;
}

/* ===== Tab 切换 ===== */
.gsage-login-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 24px;
    flex-shrink: 0;
}

.gsage-login-tab {
    position: relative;
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #8590a6;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.gsage-login-tab:hover {
    color: #1a1a1a;
}

.gsage-login-tab.active {
    color: #1a1a1a;
    font-weight: 600;
}

.gsage-login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #0066cc;
    border-radius: 2px;
}

/* ===== 表单面板 ===== */
.gsage-login-panels {
    padding: 24px;
    flex: 1;
}

.gsage-login-panel {
    display: none;
}

.gsage-login-panel.active {
    display: block;
}

.gsage-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gsage-login-input-group {
    position: relative;
}

.gsage-login-input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}

.gsage-login-input:focus {
    border-color: #0066cc;
    background: #fff;
}

.gsage-login-input::placeholder {
    color: #bbb;
}

/* ===== 选项行 ===== */
.gsage-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.gsage-login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8590a6;
    cursor: pointer;
}

.gsage-login-remember input[type="checkbox"] {
    accent-color: #0066cc;
}

.gsage-login-switch {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
}

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

/* ===== 错误/成功提示 ===== */
.gsage-login-error {
    padding: 10px 14px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    color: #cf1322;
    font-size: 13px;
    line-height: 1.5;
}

.gsage-login-success {
    padding: 10px 14px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    color: #389e0d;
    font-size: 13px;
    line-height: 1.5;
}

/* ===== 提交按钮 ===== */
.gsage-login-submit {
    width: 100%;
    height: 46px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.gsage-login-submit:hover {
    background: #0052a3;
}

.gsage-login-submit:disabled {
    background: #a0c4e8;
    cursor: not-allowed;
}

/* ===== 社交登录分割线 ===== */
.gsage-login-divider {
    display: flex;
    align-items: center;
    margin: 0 24px 16px;
    color: #8590a6;
    font-size: 13px;
}

.gsage-login-divider::before,
.gsage-login-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #f0f0f0;
}

.gsage-login-divider span {
    margin: 0 16px;
    white-space: nowrap;
}

/* ===== 社交登录按钮 ===== */
.gsage-login-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 24px 12px;
}

.gsage-login-social .gsage-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f6f6f6;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.gsage-login-social .gsage-social-btn:hover {
    background: #ebebeb;
}

.gsage-login-social .gsage-social-btn svg {
    width: 24px;
    height: 24px;
}

/* ===== 协议文本 ===== */
.gsage-login-agreement {
    padding: 14px 24px;
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #f6f6f6;
    line-height: 1.6;
}

.gsage-login-agreement a {
    color: #8590a6;
    text-decoration: none;
}

.gsage-login-agreement a:hover {
    color: #0066cc;
}

/* ===== 页脚 ===== */
.gsage-login-footer {
    position: relative;
    z-index: 1;
    margin-top: 40px;
}

.gsage-login-footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.gsage-login-footer-inner a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.gsage-login-footer-inner a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    .gsage-login-wrapper {
        padding: 24px 16px;
    }

    .gsage-login-header {
        margin-bottom: 24px;
    }

    .gsage-login-header-logo {
        max-width: 120px;
    }

    .gsage-login-header-sitename {
        font-size: 24px;
    }

    .gsage-login-header-subtitle {
        font-size: 14px;
    }

    .gsage-login-card {
        flex-direction: column;
        max-width: 400px;
    }

    .gsage-login-card-left {
        display: none;
    }

    .gsage-login-card-right {
        flex: auto;
        width: auto;
    }
}
