@charset "utf-8";
/* ==========================================================
   登录 / 注册页
   设计语言与首页一致：深色渐变品牌区 + 浅灰底 + 24px 大圆角 + 青紫粉渐变
   ========================================================== */

:root{
    --bg:#f6f7fb; --ink:#12142b; --muted:#5c6079; --line:#e8eaf3;
    --violet:#6c5ce7; --cyan:#00b3e6; --pink:#ff4d8d; --mint:#16c79a;
    --grad:linear-gradient(100deg,#00c2ff 0%,#6c5ce7 48%,#ff4d8d 100%);
    --shadow:0 24px 60px -18px rgba(18,20,43,.14);
}

* { box-sizing: border-box; }

body.sa-login-body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.7;
}

.lg-wrap {
    display: flex;
    min-height: 100vh;
}

/* ---------- 左侧品牌区（深色渐变，和首页统计块同一套语言） ---------- */
.lg-left {
    flex: 1 1 54%;
    position: relative;
    padding: 52px 56px 44px;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(150deg, #171a35 0%, #10122a 55%, #1c1440 100%);
}
.lg-left::before,
.lg-left::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}
.lg-left::before {
    width: 460px; height: 460px;
    left: -140px; top: -170px;
    background: rgba(0, 194, 255, .26);
}
.lg-left::after {
    width: 420px; height: 420px;
    right: -130px; bottom: -180px;
    background: rgba(255, 77, 141, .20);
}

.lg-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .02em;
}
.lg-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    background: var(--grad);
    box-shadow: 0 10px 22px -8px rgba(108, 92, 231, .8);
}
.lg-mark svg {
    width: 20px;
    height: 20px;
    display: block;
}

.lg-hero {
    position: relative;
    z-index: 2;
    margin: auto 0;
    padding: 40px 0;
}
.lg-hero h1 {
    font-size: 46px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 0 0 20px;
}
.lg-hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, #6ee7ff, #a89bff 60%, #ffa8c6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@supports not ((-webkit-background-clip:text) or (background-clip:text)) {
    .lg-hero h1 em { color: #8fd8ff; }
}
.lg-hero p {
    color: rgba(255, 255, 255, .6);
    font-size: 15.5px;
    line-height: 1.9;
    margin: 0 0 30px;
    max-width: 440px;
}

.lg-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 520px;
}
.lg-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .1);
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .84);
}
.lg-points li svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 2px;
    color: #6ee7ff;
}
.lg-points li:nth-child(2) svg { color: #a89bff; }
.lg-points li:nth-child(3) svg { color: #ff9fc4; }
.lg-points li:nth-child(4) svg { color: #7ee2c4; }

.lg-copy {
    position: relative;
    z-index: 2;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .38);
    letter-spacing: .02em;
}

/* ---------- 右侧表单区 ---------- */
.lg-right {
    flex: 1 1 46%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 24px;
    background: var(--bg);
}
.lg-card {
    width: 100%;
    max-width: 424px;
    background: #fff;
    border: 1px solid #eef0f8;
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 32px 32px 26px;
}

/* 页签：胶囊分段控件 */
.lg-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 22px;
    border: 0;
    border-radius: 13px;
    background: #f1f3f6;
}
.lg-tab {
    flex: 1 1 0;
    text-align: center;
    padding: 10px 0;
    font-size: 14.5px;
    font-weight: 500;
    color: #8b98a6;
    border-radius: 10px;
    cursor: pointer;
    transition: color .18s, background .18s, box-shadow .18s;
}
.lg-tab:hover { color: #5b6b7b; }
.lg-tab.active {
    color: #16212f;
    font-weight: 700;
    background: #fff;
    box-shadow: 0 2px 8px rgba(22, 33, 47, .12);
}
.lg-tab.active::after { display: none; }

.lg-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.01em;
    margin: 0 0 4px;
    color: var(--ink);
}
.lg-sub {
    font-size: 13px;
    color: #97a3b1;
    margin: 0 0 20px;
}

/* 表单 */
.lg-card .form-group { margin-bottom: 13px; }
.lg-card .form-control {
    height: 46px;
    font-size: 14.5px;
    padding: .5rem .95rem;
    color: var(--ink);
    background: #f5f7f9;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: none;
    transition: background .18s, border-color .18s, box-shadow .18s;
}
.lg-card .form-control::placeholder { color: #aab6c4; }
.lg-card .form-control:focus {
    background: #fff;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .13);
}
.lg-field { position: relative; }
.lg-field .ico {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #a3b0be;
    pointer-events: none;
    display: block;
}
.lg-field .form-control { padding-left: 44px; }

/* 图形验证码一行 */
.lg-card .input-group.mb-3 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    margin-bottom: 13px !important;
}
.lg-card .input-group.mb-3 .form-control {
    flex: 1 1 auto;
    min-width: 0;
}
#v_container {
    flex: 0 0 108px;
    width: 108px !important;
    height: 46px !important;
    margin-left: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e6e9ee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
#v_container canvas { display: block; cursor: pointer; }

/* 主按钮 */
.btn-login {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
    background: var(--grad);
    box-shadow: 0 14px 30px -12px rgba(108, 92, 231, .6);
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
}
.btn-login:hover,
.btn-login:active {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -10px rgba(108, 92, 231, .66);
}

/* 其他登录方式 */
.lg-sep {
    position: relative;
    text-align: center;
    color: #b3bec9;
    font-size: 12px;
    margin: 20px 0 12px;
}
.lg-sep::before, .lg-sep::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #eef1f4;
}
.lg-sep::before { left: 0; }
.lg-sep::after { right: 0; }

.lg-other {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    margin: 0 0 4px;
}
.lg-other .btn {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    padding: 0 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #5d6d7e;
    background: #f5f7f9;
    border: 1px solid transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}
.lg-other .btn:hover {
    background: #eef4fd;
    border-color: rgba(108, 92, 231, .35);
    color: var(--violet);
}
.lg-other .btn svg {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    flex: 0 0 auto;
}

.lg-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #8b939b;
    margin-top: 18px;
}
.lg-links a, .lg-links span.link {
    color: var(--violet);
    cursor: pointer;
    font-weight: 600;
}
.lg-links a:hover, .lg-links span.link:hover { color: #4a3fd0; }

/* 注册块默认隐藏（切换靠 JS 写内联 display，这里只管初始状态） */
.regist { display: none; }
.login { display: block; }

.regist .form-group { margin-bottom: 12px; }
.regist .input-group { margin-bottom: 12px; }
.regist small.text-muted {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 14px 0 16px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #8d99a6;
}
.regist small.text-muted input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: var(--violet);
}
.regist .btn-link { color: var(--violet); }

/* 注册表单：整行浅灰底 + 左侧图标 */
.regist-form .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    background: #f5f7f9;
    border: 1px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: background .18s, border-color .18s, box-shadow .18s;
}
.regist-form .input-group:focus-within {
    background: #fff;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .13);
}
.regist-form .input-group-prepend { display: flex; flex: 0 0 auto; }
.regist-form .input-group-text {
    width: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #a3b0be;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.regist-form .input-group-text svg {
    width: 17px;
    height: 17px;
    display: block;
}
.regist-form .input-group > .form-control {
    height: 46px;
    font-size: 14.5px;
    padding-left: 0;
    padding-right: 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.regist-form .input-group > .form-control:first-child {
    padding-left: 14px;
    border-radius: 0;
}
.regist-form .input-group > .form-control:focus {
    background: transparent;
    box-shadow: none;
    border: 0;
}
.regist-form .input-group > .form-control + .form-control {
    margin-left: 0 !important;
    border-left: 1px solid #e6e9ee;
    border-radius: 0;
    flex: 0 0 96px !important;
    max-width: 96px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600;
    color: var(--violet);
    background: rgba(255, 255, 255, .7);
}

/* 验证码按钮 */
#sendcode {
    background: #f5f7f9;
    border: 0;
    border-radius: 0;
    color: var(--violet);
    font-size: 13px;
    font-weight: 600;
    padding: 0 12px;
}
#sendcode:hover { color: #4a3fd0; }

/* 隐藏旧版切换元素，保留其点击逻辑 */
#ToLogin, #ToRegist { display: none; }

.lg-mbrand { display: none; }

/* ==========================================================
   手机端（<= 991px）：深色品牌区 + 浮起白卡
   ========================================================== */
@media (max-width: 991.98px) {

    body.sa-login-body {
        background: #101a26;
        background-image:
            radial-gradient(760px 420px at 8% -6%, rgba(0, 194, 255, .26), transparent 62%),
            radial-gradient(620px 380px at 102% 8%, rgba(255, 77, 141, .18), transparent 60%),
            linear-gradient(160deg, #171a35 0%, #10122a 52%, #0e1721 100%);
        background-size: auto, auto, auto;
        background-repeat: no-repeat;
    }

    .lg-wrap {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .lg-left { display: none; }

    .lg-right {
        flex: none;
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0 0 calc(28px + env(safe-area-inset-bottom));
        background: transparent;
    }

    .lg-mbrand {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: calc(38px + env(safe-area-inset-top)) 24px 34px;
        text-align: center;
    }
    .lg-mbrand .lg-mark {
        width: 58px;
        height: 58px;
        margin: 0 0 14px;
        border-radius: 17px;
        box-shadow: 0 14px 30px -10px rgba(108, 92, 231, .8);
    }
    .lg-mbrand .lg-mark svg { width: 30px; height: 30px; }
    .lg-mbrand-t {
        font-size: 19px;
        font-weight: 800;
        color: #fff;
        letter-spacing: .5px;
        text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
    }
    .lg-mbrand-s {
        margin-top: 5px;
        font-size: 12.5px;
        color: rgba(226, 236, 247, .58);
        letter-spacing: 1.2px;
    }

    .lg-card {
        width: auto;
        max-width: none;
        margin: 0 14px;
        padding: 22px 18px 20px;
        border: 0;
        border-radius: 20px;
        box-shadow: 0 18px 44px rgba(4, 12, 22, .42);
    }

    .lg-tabs { margin-bottom: 20px; }

    .lg-title { font-size: 19px; margin-bottom: 3px; }
    .lg-sub { font-size: 13px; margin-bottom: 18px; }

    /* iOS 上字号小于 16px 点击输入框会整页放大 */
    .lg-card .form-control,
    .regist-form .input-group > .form-control {
        height: 48px;
        font-size: 16px;
    }
    .lg-field .ico { left: 14px; }

    .btn-login { height: 48px; font-size: 16px; }

    .lg-other .btn { height: 44px; font-size: 12.5px; }

    .lg-links {
        justify-content: center;
        gap: 26px;
        margin-top: 16px;
        font-size: 13px;
    }

    .regist-form .input-group-text { width: 44px; }
    .regist small.text-muted { margin: 14px 0 16px; }
}

/* 超窄屏再收一档 */
@media (max-width: 360px) {
    .lg-mbrand { padding-top: calc(28px + env(safe-area-inset-top)); padding-bottom: 26px; }
    .lg-mbrand .lg-mark { width: 50px; height: 50px; border-radius: 15px; }
    .lg-card { margin: 0 10px; padding: 18px 14px 16px; border-radius: 18px; }
    .lg-other { gap: 7px; }
    .lg-other .btn { font-size: 11.5px; }
    .lg-other .btn svg { width: 14px; height: 14px; margin-right: 2px; }
    #v_container { flex: 0 0 92px; width: 92px !important; }
    .regist-form .input-group > .form-control + .form-control {
        flex: 0 0 84px !important;
        max-width: 84px !important;
    }
}
