/* ==================== 登录页全局覆盖（覆盖主题外壳） ==================== */
html, body {
    height: 100%;
    margin: 0;
}
body {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #fcfbfe 40%, #f5edf3 100%) !important;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
/* 隐藏主题自带头部、侧边栏、页脚 */
#page-topbar,
.vertical-menu,
#sidebar-menu,
.navbar-header,
.footer {
    display: none !important;
}
/* 主题外壳容器撑满并清除内边距/外边距 */
.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0;
    width: 100% !important;
}
.page-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}
.container-fluid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ==================== 登录内容作用域 ==================== */
.sansan-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.sansan-login,
.sansan-login * {
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==================== 顶部导航 ==================== */
.sansan-login .top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    z-index: 100;
}
.sansan-login .logo-area {
    display: flex;
    align-items: center;
}
.sansan-login .logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* ==================== 主体内容 ==================== */
.sansan-login .login-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    gap: 60px;
    margin-top: -20px;
}

/* ==================== 左侧营销区域 ==================== */
.sansan-login .left-section {
    flex: 1;
    max-width: 580px;
    position: relative;
    padding-top: 20px;
    transform: translateX(-48px);
}
.sansan-login .main-title {
    font-size: 44px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: 1px;
}
.sansan-login .main-title .ai-text {
    color: #5c33ff;
    position: relative;
    display: inline-block;
}
.sansan-login .main-title .ai-text::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(92,51,255,0.3), rgba(139,92,246,0));
    border-radius: 4px;
    z-index: -1;
}
.sansan-login .sub-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 400;
    letter-spacing: 1px;
}
.sansan-login .feature-tags {
    display: inline-flex;
    align-items: center;
    border: 1px solid #a68cff;
    border-radius: 4px;
    padding: 8px 16px;
    color: #5c33ff;
    font-size: 15px;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(92, 51, 255, 0.05);
    backdrop-filter: blur(4px);
}
.sansan-login .feature-tags svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* ==================== 3D 地球 ==================== */
.sansan-login .tech-globe-wrapper {
    position: relative;
    height: 470px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sansan-login .globe-halo {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 432px;
    height: 432px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(92, 51, 255, 0.06) 40%, rgba(0, 0, 0, 0) 70%);
    animation: pulse-halo 6s ease-in-out infinite alternate;
    pointer-events: none;
}
.sansan-login .globe-canvas {
    position: relative;
    width: 432px;
    height: 432px;
    z-index: 10;
}
.sansan-login .globe-canvas canvas {
    display: block;
    cursor: grab;
}
.sansan-login .globe-canvas canvas:active { cursor: grabbing; }
.sansan-login .hud-panel {
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(92, 51, 255, 0.1), inset 0 0 10px rgba(255,255,255,0.8);
    z-index: 30;
    white-space: nowrap;
    animation: panel-float 6s ease-in-out infinite;
}
.sansan-login .hud-panel::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 60%;
    left: 0;
    top: 20%;
    background: #5c33ff;
    border-radius: 0 4px 4px 0;
}
.sansan-login .hud-panel svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}
.sansan-login .panel-1 { top: 40px; left: -30px; animation-delay: 0s; }
.sansan-login .panel-1::before { background: #3b82f6; }
.sansan-login .panel-2 { top: 170px; right: -60px; color: #5c33ff; border-color: rgba(92, 51, 255, 0.4); animation-delay: -2s; }
.sansan-login .panel-2::before { background: #5c33ff; }
.sansan-login .panel-3 { bottom: 30px; left: -20px; animation-delay: -4s; }
.sansan-login .panel-3::before { background: #e11d1d; }

/* ==================== 关键帧动画 ==================== */
@keyframes pulse-halo { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.06); opacity: 1; } }
@keyframes panel-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes qr-scan { 0% { top: 10%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 86%; opacity: 0; } }

/* ==================== 右侧登录框区域 ==================== */
.sansan-login .login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sansan-login .login-card {
    width: 640px;
    min-height: 520px;
    background: linear-gradient(165deg, #ffffff 0%, #fdfcff 100%);
    border-radius: 28px;
    box-shadow: 0 32px 80px -24px rgba(23, 20, 60, 0.28), 0 0 0 1px rgba(92, 51, 255, 0.06);
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 100;
    overflow: hidden;
}
.sansan-login .qr-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eef0f6;
    padding: 40px 28px;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f7fd 100%);
}
.sansan-login .qr-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: 3px;
    margin-bottom: 24px;
    white-space: nowrap;
}
.sansan-login .qr-code-box {
    width: 176px;
    height: 176px;
    background: #fff;
    border: 1px solid #eef0f6;
    border-radius: 16px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    box-shadow: 0 14px 34px -16px rgba(23, 20, 60, 0.28);
    overflow: hidden;
}
.sansan-login .qr-code-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
}
.sansan-login .qr-login-link {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.sansan-login .qr-click-hint {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: #3b71e8;
    font-weight: 600;
    pointer-events: none;
}
.sansan-login .qr-pattern {
    width: 150px;
    height: 150px;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #14142b 25%, transparent 25%, transparent 75%, #14142b 75%),
        linear-gradient(45deg, #14142b 25%, transparent 25%, transparent 75%, #14142b 75%);
    background-size: 14px 14px;
    background-position: 0 0, 7px 7px;
    border-radius: 6px;
}
.sansan-login .qr-finder {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 5px solid #14142b;
    border-radius: 5px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sansan-login .qr-finder::after { content: ''; width: 14px; height: 14px; background: #14142b; border-radius: 2px; }
.sansan-login .qr-finder.tl { top: 10px; left: 10px; }
.sansan-login .qr-finder.tr { top: 10px; right: 10px; }
.sansan-login .qr-finder.bl { bottom: 10px; left: 10px; }
.sansan-login .qr-scanline {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #07c160 30%, #07c160 70%, transparent);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(7, 193, 96, 0.6);
    animation: qr-scan 2.6s ease-in-out infinite;
    pointer-events: none;
}
.sansan-login .qr-logo {
    position: absolute;
    width: 42px; height: 42px; background: #07c160; border-radius: 10px;
    display: flex; justify-content: center; align-items: center;
    border: 2px solid white; box-shadow: 0 4px 14px rgba(7, 193, 96, 0.4);
}
.sansan-login .qr-hint { font-size: 13px; color: #8a8fa3; display: flex; align-items: center; margin-bottom: 20px; white-space: nowrap; }
.sansan-login .qr-hint span { color: #3b71e8; margin-left: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; font-weight: 500; }
.sansan-login .qr-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; flex-wrap: nowrap; width: 100%; }
.sansan-login .qr-tab {
    font-size: 13px; color: #6b7280; display: inline-flex; align-items: center; cursor: pointer;
    padding: 7px 12px; border-radius: 999px; white-space: nowrap; text-decoration: none;
    border: 1px solid #e6e8f0; background: #fff;
    transition: all .25s ease;
}
.sansan-login .qr-tab svg, .sansan-login .qr-tab img { width: 15px; height: 15px; margin-right: 5px; flex-shrink: 0; object-fit: contain; }
.sansan-login .qr-tab.active { color: #07c160; border-color: rgba(7, 193, 96, 0.55); background: #f0fbf5; font-weight: 600; }
.sansan-login .how-to-scan { font-size: 13px; color: #6b7280; text-decoration: none; margin-top: 18px; white-space: nowrap; transition: color .25s; }
.sansan-login .how-to-scan:hover { color: #3b71e8; }

/* ==================== 表单区 ==================== */
.sansan-login .form-section {
    flex: 1.2;
    padding: 40px 34px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.sansan-login .form-tabs { display: flex; align-items: center; gap: 18px; font-size: 14px; margin-bottom: 22px; color: #8a8fa3; white-space: nowrap; }
.sansan-login .form-tabs .tab { cursor: pointer; position: relative; padding-bottom: 7px; transition: color .25s; }
.sansan-login .form-tabs .tab.active { color: #1a1a2e; font-weight: 600; }
.sansan-login .form-tabs .tab.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, #3b71e8, #5c33ff);
}
.sansan-login .form-tabs .divider { color: #e2e4ec; font-size: 14px; }

.sansan-login .input-group { position: relative; margin-bottom: 14px; }
.sansan-login .input-group input {
    width: 100%; height: 46px;
    padding: 0 14px 0 40px;
    border: 1px solid #e3e5ee; border-radius: 10px; font-size: 14px; outline: none; transition: all .25s;
    background: #fbfcfe; color: #1a1a2e;
}
.sansan-login .input-group .input-icon {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: #b3b7c6; pointer-events: none; transition: color .25s;
}
.sansan-login .input-group input:focus { border-color: #5c33ff; background: #fff; box-shadow: 0 0 0 3px rgba(92, 51, 255, 0.08); }
.sansan-login .input-group input:focus ~ .input-icon { color: #5c33ff; }
.sansan-login .input-group input::placeholder { color: #b3b7c6; }

/* 手机号输入（带区号选择） */
.sansan-login .phone-group { display: flex; align-items: center; gap: 8px; }
.sansan-login .phone-group .phone-code {
    flex-shrink: 0;
    height: 46px;
    border: 1px solid #e3e5ee;
    border-radius: 10px;
    background: #fbfcfe;
    color: #1a1a2e;
    font-size: 14px;
    padding: 0 8px;
    outline: none;
    cursor: pointer;
}
.sansan-login .phone-group input { flex: 1; padding-left: 14px; }

/* 验证码输入 + 获取按钮 */
.sansan-login .code-field { position: relative; }
.sansan-login .code-field input { padding-right: 100px; }
.sansan-login .code-btn {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    height: 34px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b71e8 0%, #5c33ff 100%);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

/* 图形验证码（来自 includes/verify） */
.sansan-login .form-group.pwdInputField,
.sansan-login .form-group.zdjj { margin-bottom: 14px; }
.sansan-login .inputField { display: flex; align-items: center; gap: 10px; }
.sansan-login .iam-input-text {
    width: 100%; height: 46px;
    padding: 0 14px;
    border: 1px solid #e3e5ee; border-radius: 10px; font-size: 14px; outline: none;
    background: #fbfcfe; color: #1a1a2e;
    transition: all .25s;
}
.sansan-login .iam-input-text:focus { border-color: #5c33ff; background: #fff; box-shadow: 0 0 0 3px rgba(92, 51, 255, 0.08); }
.sansan-login .iam-input-text::placeholder { color: #b3b7c6; }
.sansan-login .input-group-append { flex-shrink: 0; }
.sansan-login .input-group-append img {
    width: 110px; height: 46px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e3e5ee;
    cursor: pointer;
}

/* 手机密码/验证码切换 */
.sansan-login .phone-toggle {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: #6b7280;
    margin: -4px 0 12px;
}
.sansan-login .phone-toggle span { color: #3b71e8; cursor: pointer; }

/* 登录按钮 */
.sansan-login .login-btn {
    width: 100%; height: 46px;
    background: linear-gradient(135deg, #3b71e8 0%, #5c33ff 100%);
    color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
    margin-top: 4px; margin-bottom: 20px; letter-spacing: 2px;
    box-shadow: 0 10px 22px -12px rgba(92, 51, 255, 0.6);
    transition: transform .2s ease, box-shadow .2s ease;
}
.sansan-login .login-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(92, 51, 255, 0.7); }
.sansan-login .login-btn:active { transform: translateY(0); }

.sansan-login .form-links { display: flex; justify-content: space-between; font-size: 12px; color: #8a8fa3; margin-bottom: 0; white-space: nowrap; }
.sansan-login .form-links .link-sep { display: inline-flex; align-items: center; gap: 10px; }
.sansan-login .form-links .link-sep span { width: 1px; height: 11px; background: #e2e4ec; }
.sansan-login .form-links a { color: #6b7280; text-decoration: none; transition: color .25s; }
.sansan-login .form-links a:hover { color: #3b71e8; }

/* ==================== 右侧悬浮按钮 ==================== */
.sansan-login .floating-btns { position: fixed; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.sansan-login .float-btn {
    width: 72px; height: 72px; background: #fff; border-radius: 12px 0 0 12px;
    box-shadow: -2px 4px 12px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    font-size: 13px; color: #333; cursor: pointer; text-align: center; line-height: 1.2; padding: 8px; transition: all 0.3s;
}
.sansan-login .float-btn:hover { transform: translateX(-2px); }
.sansan-login .float-btn svg { width: 22px; height: 22px; margin-bottom: 6px; }

.sansan-login .card-footer { text-align: center; font-size: 14px; color: #999; margin-top: 30px; white-space: nowrap; position: relative; z-index: 100; background: transparent; }
.sansan-login .card-footer a { color: #3b71e8; text-decoration: none; }

.sansan-login .login-footer { text-align: center; padding: 30px; font-size: 12px; color: #999; position: relative; z-index: 10; }

/* ==================== 响应式 ==================== */
@media (max-width: 1100px) {
    .sansan-login .left-section { display: none; }
    .sansan-login .login-main { gap: 0; padding: 0 24px; margin-top: 0; }
}
@media (max-width: 700px) {
    .sansan-login .top-header { padding: 16px 20px; }
    .sansan-login .login-main { padding: 0 16px; align-items: flex-start; padding-top: 20px; }
    .sansan-login .login-card { width: 100%; min-height: auto; border-radius: 20px; }
    .sansan-login .qr-section { display: none; }
    .sansan-login .form-section { flex: 1; padding: 30px 24px; }
    .sansan-login .floating-btns { display: none; }
}
