/* 登录/注册页白底皮肤层：只改配色、圆角、阴影、间距与字重，不动 HTML 结构。
   回滚 = 删除本文件 + 恢复两页 head 里的内联 style。 */

:root {
    --auth-primary: #1677ff;
    --auth-primary-hover: #4096ff;
    --auth-primary-active: #0958d9;
    --auth-primary-soft: rgba(22, 119, 255, .12);
    --auth-title: #1d2129;
    --auth-text: #4e5969;
    --auth-muted: #86909c;
    --auth-placeholder: #a9aeb8;
    --auth-border: #c9cdd4;
    --auth-border-light: #e5e6eb;
    --auth-danger: #f53f3f;
    --auth-radius: 8px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background-color: #eef2f7 !important;
    background-image:
        radial-gradient(rgba(29, 33, 41, .06) 1px, transparent 1px),
        linear-gradient(180deg, #edf4ff 0%, #f5f7fb 46%, #ecf0f7 100%) !important;
    background-size: 20px 20px, auto !important;
    background-repeat: repeat, no-repeat !important;
    background-attachment: scroll, fixed !important;
    color: var(--auth-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

/* 缓慢漂移的蓝色光晕（B） */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

body::before {
    top: -22vw;
    right: -16vw;
    width: 64vw;
    height: 64vw;
    max-width: 900px;
    max-height: 900px;
    background: radial-gradient(circle at center, rgba(22, 119, 255, .20), rgba(22, 119, 255, 0) 68%);
    animation: authGlowA 22s ease-in-out infinite alternate;
}

body::after {
    bottom: -20vw;
    left: -14vw;
    width: 58vw;
    height: 58vw;
    max-width: 820px;
    max-height: 820px;
    background: radial-gradient(circle at center, rgba(64, 150, 255, .17), rgba(22, 119, 255, 0) 70%);
    animation: authGlowB 28s ease-in-out infinite alternate;
}

@keyframes authGlowA {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-5vw, 4vh, 0) scale(1.1);
    }
    100% {
        transform: translate3d(-2vw, 8vh, 0) scale(1.04);
    }
}

@keyframes authGlowB {
    0% {
        transform: translate3d(0, 0, 0) scale(1.06);
    }
    50% {
        transform: translate3d(4vw, -5vh, 0) scale(.98);
    }
    100% {
        transform: translate3d(7vw, -2vh, 0) scale(1.1);
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 浅色粒子层（A），内容由 auth-bg.js 绘制 */
#bgCanvas {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.myapp-login {
    position: relative;
    z-index: 10;
    flex: 1 0 auto;
    width: 100%;
    max-width: 460px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 24px 16px;
    background: transparent !important;
}

.tpl-login-max {
    margin: auto;
    width: 100%;
    padding: 44px 40px 40px;
    background-color: #fff !important;
    background-image: linear-gradient(90deg, var(--auth-primary), #69b1ff) !important;
    background-size: 100% 4px !important;
    background-repeat: no-repeat !important;
    background-position: top left !important;
    border: 1px solid rgba(22, 119, 255, .14);
    border-radius: 12px;
    box-shadow: 0 16px 44px rgba(22, 119, 255, .12), 0 2px 6px rgba(29, 33, 41, .04);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.login-am-center {
    width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
}

.myapp-login-logo-text {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--auth-title);
    letter-spacing: .5px;
    text-align: left;
    margin-bottom: 6px;
}

.myapp-login-logo-text span,
.myapp-login-logo-text a {
    color: var(--auth-primary);
    font-weight: 600;
}

/* 登录页标题里的品牌位是回去站点首页的链接：去掉链接默认蓝与下划线，外观与原来的 span 一致 */
.myapp-login-logo-text a {
    text-decoration: none;
}

.myapp-login-logo-text a:hover {
    text-decoration: underline;
}

.myapp-login-logo-text i {
    font-size: 20px;
    color: var(--auth-primary);
    vertical-align: -1px;
    margin-left: 2px;
}

.login-font {
    text-align: left;
    font-size: 14px;
    color: var(--auth-muted);
    margin-bottom: 28px;
}

.login-font i {
    font-style: normal;
}

.login-font a {
    color: var(--auth-primary) !important;
    font-weight: 500;
    text-decoration: none;
}

.login-font a:hover {
    color: var(--auth-primary-hover) !important;
}

.am-form-group {
    margin-bottom: 18px !important;
    width: 100% !important;
    background: transparent !important;
}

.am-form input.am-form-field {
    display: block;
    width: 100% !important;
    height: 44px !important;
    margin: 0 auto;
    padding: 0 14px !important;
    font-size: 14px !important;
    color: var(--auth-title) !important;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

.am-form input.am-form-field::placeholder {
    color: var(--auth-placeholder);
}

.am-form input.am-form-field:focus {
    border-color: var(--auth-primary) !important;
    box-shadow: 0 0 0 3px var(--auth-primary-soft) !important;
    background: #fff !important;
    outline: none !important;
}

.am-form input.am-form-field:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: var(--auth-title) !important;
}

.field-tip {
    display: block;
    color: var(--auth-danger) !important;
    font-size: 12px;
    line-height: 1.6;
    margin-top: 4px;
}

#captcha {
    margin: 4px auto 0;
    width: 100%;
    text-align: center;
    background: transparent !important;
}

/* 极验 V4 的按钮被 SDK 固定成 260px、不跟容器宽度走（实测 312 容器里仍是 260），
   必须 !important 才能压过它注入的样式表；只作用页内按钮，弹窗层在 body 下不受影响 */
#captcha .geetest_captcha,
#captcha .geetest_holder,
#captcha .geetest_btn_click,
#captcha .geetest_mask,
#captcha .geetest_content {
    width: 100% !important;
}

/* 极验未启用时降级的本地图形验证码行 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.captcha-row .am-form-field {
    flex: 1;
}

.captcha-img {
    height: 40px;
    width: 120px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#wait {
    color: var(--auth-muted);
    font-size: 13px;
    text-align: center;
}

#notice {
    color: var(--auth-danger) !important;
    font-size: 13px;
    margin: 10px auto 0;
    text-align: left;
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 0;
}

.login-forgot {
    text-align: right;
    margin: 0;
}

.login-row .login-remember {
    margin: 0;
}

.login-forgot a {
    color: var(--auth-primary) !important;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.login-forgot a:hover {
    color: var(--auth-primary-hover) !important;
}

.login-remember {
    margin: 12px 0 0;
    width: 100%;
}

.login-remember label {
    display: inline-block;
    white-space: nowrap;
    color: var(--auth-text) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.6;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: middle;
    accent-color: var(--auth-primary);
}

#submit {
    display: block;
    width: 100%;
    height: 44px;
    margin: 20px auto 0;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: var(--auth-radius);
    cursor: pointer;
    transition: background-color .2s, box-shadow .2s;
}

#submit:hover {
    color: #fff;
    background: var(--auth-primary-hover);
    box-shadow: 0 4px 12px rgba(22, 119, 255, .24);
    transform: none;
}

#submit:active {
    background: var(--auth-primary-active);
    box-shadow: none;
}

.am-modal-dialog {
    color: var(--auth-title);
    background: #fff;
    border: 1px solid var(--auth-border-light);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(29, 33, 41, .12);
}

.am-modal-hd {
    color: var(--auth-title);
    background: #fff;
    border-bottom: 1px solid var(--auth-border-light);
}

.am-modal-bd {
    color: var(--auth-text);
}

.am-form,
fieldset {
    background: transparent !important;
    border: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

.auth-footer {
    position: relative;
    z-index: 10;
    flex: 0 0 auto;
    padding: 14px 16px 18px;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
    color: var(--auth-muted);
}

.auth-footer a {
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--auth-primary);
}

.auth-footer-sep {
    margin: 0 6px;
    color: var(--auth-border);
}

@media (max-width: 480px) {
    .myapp-login {
        padding: 16px;
    }

    .tpl-login-max {
        padding: 32px 20px 28px;
        border: none;
        box-shadow: none;
    }

    .myapp-login-logo-text {
        font-size: 22px;
    }

    .login-font {
        margin-bottom: 22px;
    }
}
