/*!
 * themestyle v1.2.0 - 主题样式美化
 * 作者：臻格技术
 * 日期：2026-08-23
 */

/* 商务渐变背景 */
body {
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    background: linear-gradient(to right, color-mix(in srgb, var(--login-primary) 55%, white) 0%, var(--login-primary) 35%, var(--login-primary-hover) 65%, color-mix(in srgb, var(--login-primary) 50%, black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.container {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 登录包装器 - 左右布局 */
.login-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 120px;
    position: relative;
    z-index: 1;
}

/* 左侧区域 - 站点名称 + 副标题垂直堆叠 */
.login-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
    text-align: left;
    min-height: 420px;
    max-width: 520px;
    gap: 20px;
}

.login-left-subtitle {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.9;
    letter-spacing: 1px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    max-width: 380px;
}

/* SVG 拓扑装饰图 - 整页左侧背景 */
.topo-wrap {
    position: fixed;
    left: 0;
    top: 0;
    width: 50%;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topo-wrap svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(0.38);
}

/* ===== SVG 动画 与 彩色效果 ===== */

/* 节点脉冲呼吸 */
.topo-wrap .nodes-pulse circle {
    animation: pulse-node 3s ease-in-out infinite;
}

.topo-wrap .nodes-pulse circle:nth-of-type(odd) {
    animation-delay: 1.5s;
}

/* 节点外层光晕呼吸 */
.topo-wrap .nodes-glow {
    animation: glow-fade 4s ease-in-out infinite;
}

/* 背景光晕呼吸 */
.topo-wrap .glow-pulse {
    animation: glow-fade 5s ease-in-out infinite;
}

/* 连接线呼吸 */
.topo-wrap .lines-flow {
    animation: lines-fade 4s ease-in-out infinite;
}

@keyframes pulse-node {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.6; }
}

@keyframes glow-fade {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.4; }
}

@keyframes lines-fade {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.5; }
}


.login-left-title {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 20px rgba(0,0,0,0.2);
    letter-spacing: 2px;
    animation: title-blink 3s ease-in-out infinite;
    flex-shrink: 0;
    white-space: nowrap;
}

@keyframes title-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* 登录卡片 */
.login-screen {
    max-width: 420px;
    width: 420px;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: none;
    animation: fadeInUp 0.5s ease-out;
}

/* 登录头部 - 仅 Logo */
.login-head {
    text-align: center;
    padding: 40px 30px 10px;
    background: transparent;
}

.login-head img {
    max-width: 120px;
    margin-bottom: 10px;
}

.login-head h2 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.login-shangwu-welcome-pc {
    color: #666;
    font-size: 14px;
    font-weight: 400;
    margin: 8px 0 0;
}

.login-shangwu-welcome-mobile {
    display: none;
}

/* 登录框 */
.login-wrapper .login-screen .well {
    width: 100%;
    float: none;
    margin: 0;
    background: transparent;
    min-height: auto;
    border: none;
    box-shadow: none;
}

.login-form {
    padding: 20px 30px 30px;
    position: relative;
    z-index: 99;
    text-align: center;
}

#login-form {
    margin-top: 0;
    text-align: left;
}

/* 表单输入框 */
#login-form .input-group {
    margin-bottom: 20px;
    display: table;
    border-radius: 6px;
}

#login-form .input-group .form-control {
    display: table-cell;
    border-radius: 0 6px 6px 0;
    border-left: none;
}

#login-form .input-group-addon {
    display: table-cell;
    background: #f7f8fa;
    border-radius: 6px 0 0 6px;
    border: 1px solid #d9d9d9;
    border-right: none;
    color: #888;
    transition: border-color 0.2s ease;
}

/* 输入框聚焦时，左侧图标边框同步变色 */
#login-form .input-group:focus-within .input-group-addon {
    border-color: var(--login-primary);
}

#login-form .form-control {
    height: 42px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    padding-left: 15px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease;
}

#login-form .form-control:focus {
    border-color: var(--login-primary);
}

#login-form .form-control:focus::placeholder {
    color: transparent;
}

#login-form .checkbox label,
#login-form .checkbox input {
    font-size: 13px;
}

/* 登录按钮 */
#login-form .btn-success {
    background-color: var(--login-primary);
    border-color: var(--login-primary);
    height: 42px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#login-form .btn-success:hover {
    filter: brightness(0.85);
    background-color: var(--login-primary);
    border-color: var(--login-primary);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--login-primary) 30%, transparent);
}

/* 验证码 */
#login-form .captcha-img-wrapper img {
    height: 40px;
    width: auto;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
}

#login-form .input-group-addon.captcha-img-wrapper {
    padding: 0;
    border: none;
    background: transparent;
    flex-shrink: 0;
}

/* 头像卡片（隐藏） */
.profile-img-card,
.profile-name-card {
    display: none;
}

.background-bubbles {
    display: none;
}

/* 入场动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    body {
        background: #fff !important;
    }
    .login-wrapper {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    .login-left {
        display: none;
    }
    .login-screen {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    .login-head {
        padding: 30px 20px 10px;
    }
    .login-form {
        padding: 15px 20px 25px;
    }
    .login-shangwu-welcome-pc {
        display: none;
    }
    .login-shangwu-welcome-mobile {
        display: block;
        color: #333;
        font-size: 20px;
        font-weight: 600;
        margin: 8px 0 0;
    }
    .login-footer-text {
        color: #999 !important;
    }
}

/* ========== darktheme 深色模式兼容 ========== */
body.darktheme .login-screen {
    background: #333;
}
body.darktheme .login-head h2 {
    color: #ccc;
}
body.darktheme .login-head-welcome {
    color: #aaa;
}
body.darktheme #login-form .input-group-addon {
    background: #404040;
    border-color: #555;
    color: #aaa;
}
body.darktheme #login-form .form-control {
    border-color: #555;
    background: #404040;
    color: #ccc;
}
body.darktheme #login-form .form-control::placeholder {
    color: #666;
}
body.darktheme #login-form .checkbox label,
body.darktheme #login-form .checkbox input {
    color: #aaa;
}
body.darktheme #login-form .captcha-img-wrapper img {
    border-color: #555;
}