/* ==========================================================================
   认证页样式（注册 / 登录）
   独立于 style.css 的 legacy 布局，页面只依赖本文件，不继承全站样式。
   主色取自 logo（#1890ff）。
   ========================================================================== */

:root {
    --auth-brand: #1890ff;
    --auth-brand-deep: #0d6fd0;
    --auth-text: #1f2329;
    --auth-label: #4e5969;
    --auth-sub: #8a919f;
    --auth-placeholder: #b8bfcc;
    --auth-line: #dfe3ec;
    --auth-line-soft: #f0f2f7;
    --auth-radius: 10px;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 用 auto 外边距居中：内容高于视口时不会出现「顶部被裁掉且无法滚动」 */
    justify-content: flex-start;
    padding: 40px 20px 28px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--auth-text);
    background: #eef4fc;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(24, 144, 255, .16), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(24, 144, 255, .14), transparent 46%),
        linear-gradient(160deg, #f6faff 0%, #eaf2fb 52%, #f7fafd 100%);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.auth-body *,
body.auth-body *::before,
body.auth-body *::after {
    box-sizing: border-box;
}

/* 卡片 */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin-top: auto;
    padding: 34px 36px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 18px 48px rgba(17, 66, 128, .10),
        0 2px 8px rgba(17, 66, 128, .04);
}

/* 品牌 */
.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

    .auth-brand a {
        display: block;
        line-height: 0;
    }

    .auth-brand img {
        display: block;
        height: 40px;
        width: auto;
    }

/* 标题 */
.auth-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: var(--auth-text);
}

.auth-desc {
    margin: 0 0 20px;
    font-size: 13px;
    text-align: center;
    color: var(--auth-sub);
}

/* 表单 */
.auth-field {
    margin-bottom: 14px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-label);
}

.auth-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
    box-shadow: none;
    -webkit-appearance: none;
}

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

    .auth-input:hover {
        border-color: #c8d0de;
    }

    .auth-input:focus {
        border-color: var(--auth-brand);
        box-shadow: 0 0 0 3px rgba(24, 144, 255, .12);
    }

/* 图形验证码：输入框 + 图片同行 */
.auth-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .auth-captcha .auth-input {
        flex: 1 1 auto;
        min-width: 0;
        letter-spacing: 2px;
    }

.auth-captcha-img {
    flex: 0 0 auto;
    width: 112px;
    height: 44px;
    display: block;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    background: #f7f9fc;
    cursor: pointer;
    object-fit: cover;
}

    .auth-captcha-img:hover {
        border-color: var(--auth-brand);
    }

/* 提交按钮 */
.auth-submit {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 22px;
    padding: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 46px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #3ba3ff 0%, #0d6fd0 100%);
    border: 0;
    border-radius: var(--auth-radius);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(24, 144, 255, .24);
    transition: box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

    .auth-submit:hover {
        color: #fff;
        box-shadow: 0 10px 24px rgba(24, 144, 255, .32);
        transform: translateY(-1px);
    }

    .auth-submit:active {
        transform: translateY(0);
    }

    .auth-submit:disabled,
    .auth-submit.is-disabled {
        cursor: not-allowed;
        opacity: .68;
        box-shadow: none;
        transform: none;
    }

/* 提示条 */
.auth-alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
    color: #92620a;
    background: #fff8e6;
    border: 1px solid #ffe1a8;
    border-radius: var(--auth-radius);
}

/* 注册成功 */
.auth-success {
    padding: 8px 0 4px;
    text-align: center;
}

.auth-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    color: var(--auth-brand);
    background: rgba(24, 144, 255, .10);
    border-radius: 50%;
}

.auth-success h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-success p {
    margin: 0 0 22px;
    font-size: 13px;
    color: var(--auth-sub);
}

/* 底部链接 */
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    font-size: 13px;
    color: var(--auth-sub);
    border-top: 1px solid var(--auth-line-soft);
}

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

        .auth-footer a:hover {
            color: var(--auth-brand-deep);
            text-decoration: underline;
        }

.auth-dot {
    color: #d3d9e4;
}

/* 页脚 */
.auth-copyright {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    margin-bottom: auto;
    font-size: 12px;
    color: #9aa4b4;
    text-align: center;
}

/* 版权 / 公安备案 / ICP 备案同行展示，窄屏放不下时自然折行 */
.auth-copyright .site-sep {
    margin: 0 6px;
    color: #d3d9e4;
}

/* 公安联网备案官方警徽：与文字基线对齐 */
.auth-copyright .site-police-icon {
    width: 14px;
    height: 14px;
    margin-right: 3px;
    vertical-align: -2px;
    border: 0;
}

.auth-copyright .site-police {
    display: inline;
}

.auth-copyright a {
    color: #9aa4b4;
    text-decoration: none;
}

.auth-copyright a:hover {
    color: var(--auth-brand);
    text-decoration: underline;
}

/* 轻量提示（替代 bootstrap-growl，无需引入 Bootstrap） */
.auth-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 9999;
    display: none;
    max-width: 420px;
    padding: 12px 18px;
    font-size: 13px;
    line-height: 1.5;
    color: #cf1322;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: var(--auth-radius);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .12);
    transform: translateX(-50%);
}

/* 渠道切换 */
.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    background: #f4f7fb;
    border-radius: var(--auth-radius);
}

.auth-tab {
    flex: 1 1 0;
    height: 36px;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    color: #5b6472;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

    .auth-tab:hover {
        color: var(--auth-brand);
    }

    .auth-tab.is-active {
        font-weight: 600;
        color: var(--auth-brand);
        background: #fff;
        box-shadow: 0 1px 4px rgba(17, 66, 128, .10);
    }

/* 获取验证码按钮 */
.auth-codebtn {
    flex: 0 0 auto;
    min-width: 112px;
    height: 44px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--auth-brand);
    background: #fff;
    border: 1px solid var(--auth-brand);
    border-radius: var(--auth-radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

    .auth-codebtn:hover:not(:disabled) {
        background: rgba(24, 144, 255, .06);
    }

    .auth-codebtn:disabled {
        color: #a8b0bd;
        background: #f7f9fc;
        border-color: var(--auth-line);
        cursor: not-allowed;
    }

.auth-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--auth-sub);
}

/* 记住账号 / 忘记密码 */
.auth-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--auth-sub);
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

    .auth-check input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin: 0;
        cursor: pointer;
        accent-color: var(--auth-brand);
    }

.auth-link {
    color: var(--auth-brand);
    text-decoration: none;
}

    .auth-link:hover {
        color: var(--auth-brand-deep);
        text-decoration: underline;
    }

/* 未激活等提示块 */
.auth-notice {
    padding: 16px 18px;
    margin-bottom: 18px;
    text-align: center;
    background: #f7fafd;
    border: 1px solid #e2ebf5;
    border-radius: var(--auth-radius);
}

    .auth-notice h2 {
        margin: 0 0 8px;
        font-size: 16px;
        font-weight: 600;
        color: var(--auth-text);
    }

    .auth-notice p {
        margin: 0 0 16px;
        font-size: 13px;
        color: var(--auth-sub);
    }

    .auth-notice .auth-submit {
        height: 40px;
        margin-top: 0;
        font-size: 13px;
        line-height: 40px;
    }

    .auth-notice .auth-back {
        display: inline-block;
        margin-top: 12px;
        font-size: 12px;
    }

/* 小屏 */
@media (max-width: 480px) {
    body.auth-body {
        padding: 24px 16px 28px;
        justify-content: flex-start;
    }

    .auth-card {
        padding: 30px 22px 22px;
        border-radius: 14px;
    }

    .auth-brand img {
        height: 34px;
    }

    .auth-captcha-img {
        width: 100px;
    }
}
