/* =========================================================
 * 维度狐 · 会员中心认证页样式
 *   适用页面：登录 / 注册 / 找回密码 / 重置密码
 *   （themes/member/{login,register,getpwd,reset}.html 专用）
 *
 * 2026-10-13 重构：
 *   · PC（≥992px）左右分栏——左侧品牌区（深色）+ 右侧表单区
 *   · 移动端（<992px）单列堆叠——品牌区收缩为顶部窄条
 *   · 保持全部既有类名（组件级），视觉更克制：去渐变按钮、去重投影、细边框大留白
 * ========================================================= */

/* ---------- 1. 基础重置与设计变量 ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* 主色对齐全站：前台 --primary #1a68cc / 会员中心 --primary #2c7de6、--primary-dark #0d4a9c */
    --primary-color: #2c7de6;
    --primary-dark: #0d4a9c;
    --primary-light: #d4e6ff;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background-color: #f5f7fa;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #5b6b82;
    --text-muted: #94a3b8;
    --border-color: #e4e7ed;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, 0.26), 0 8px 20px -14px rgba(15, 23, 42, 0.14);
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);

    /* 分栏外壳 */
    --shell-max: 1024px;
    --shell-radius: 22px;
    --panel-pad: 52px;

    /* 品牌区（左侧）——与全站一致的浅色 + 品牌蓝 */
    --brand-bg: linear-gradient(168deg, #ffffff 0%, #f4f9ff 46%, #e6f1ff 100%);
    --brand-ink: #0d4a9c;
    --brand-ink-dim: #4a6a95;
    --brand-ink-mute: #8296b0;
    --brand-accent: #2c7de6;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    padding: 28px;
    position: relative;
}

@supports (min-height: 100dvh) {
    body { min-height: 100dvh; }
}

/* 页面背景（极淡的双色光斑，克制不喧宾夺主） */
.page-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.background-pattern {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.09) 0%, transparent 34%),
        radial-gradient(circle at 88% 78%, rgba(29, 78, 216, 0.08) 0%, transparent 36%);
    background-attachment: fixed;
}

/* ---------- 2. 分栏外壳 ---------- */
.auth-shell {
    margin: auto;                       /* 内容不足时垂直居中；超出时可正常滚动不裁切 */
    width: min(100%, var(--shell-max));
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--shell-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ---------- 3. 品牌区（PC 左栏 / 移动端顶部条） ---------- */
.brand-panel {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: var(--panel-pad);
    display: flex;
    flex-direction: column;
    background: var(--brand-bg);
    color: var(--brand-ink);
    border-right: 1px solid var(--border-color);
}

.brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(115% 80% at 100% 0%, rgba(44, 125, 230, 0.13), transparent 58%),
        radial-gradient(85% 66% at 0% 100%, rgba(44, 125, 230, 0.08), transparent 55%);
    pointer-events: none;
}

.brand-panel > * {
    position: relative;
    z-index: 1;
}

/* 站点 logo（会员中心版 logo-hy.png，与 themes/member/header.html 一致） */
.brand-logo {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    max-width: 100%;
    padding: 8px 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
    text-decoration: none;
    transition: var(--transition);
}

.brand-logo:hover {
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.11);
}

.brand-logo img {
    height: 46px;
    width: auto;
    max-width: 100%;
    display: block;
}

.brand-main {
    margin: auto 0;
    padding: 40px 0 32px;
    min-width: 0;
}

.brand-headline {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
    margin-bottom: 14px;
    color: var(--brand-ink);
    overflow-wrap: anywhere;
}

.brand-desc {
    color: var(--brand-ink-dim);
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.brand-points {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    gap: 15px;
}

.brand-points li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 14.5px;
    color: var(--brand-ink-dim);
    min-width: 0;
}

.brand-points li svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--brand-accent);
}

.brand-points li span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.brand-foot {
    font-size: 12.5px;
    color: var(--brand-ink-mute);
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.brand-foot a {
    color: var(--brand-ink-dim);
    text-decoration: none;
    transition: var(--transition);
}

.brand-foot a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ---------- 4. 表单区（右侧） ---------- */
.form-panel {
    min-width: 0;
    padding: var(--panel-pad);
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
}

.form-head {
    min-width: 0;
}

.form-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
    min-width: 0;
}

.form-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-color);
    white-space: nowrap;
}

/* 标题/副标题在表单区内左对齐（作用域限定，不影响其它页面） */
.form-panel .card-title {
    text-align: left;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.form-panel .card-subtitle {
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.form-head .top-link {
    justify-content: flex-start;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    flex-shrink: 0;
    gap: 4px;
}

.form-panel .auth-form {
    margin-top: 30px;
    flex: 1 1 auto;
    width: 100%;
}

/* ---------- 已登录状态：访问登录页时展示当前帐号（2026-10-18） ---------- */
.logged-account {
    margin-top: 26px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #f8fafc;
    overflow: hidden;
}

.logged-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
}

.logged-row:last-child {
    border-bottom: 0;
}

.logged-label {
    flex: 0 0 46px;
    font-size: 13px;
    color: var(--text-secondary);
}

.logged-value {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.logged-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 表单底部（页脚链接 + 备案） */
.auth-foot {
    margin-top: auto;
    padding-top: 30px;
}

.auth-foot-inner {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* ---------- 5. 顶部链接 ---------- */
.top-link {
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.link-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.link-btn:hover {
    color: var(--primary-dark);
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.16);
}

/* ---------- 6. 表单元素 ---------- */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.required {
    color: var(--error-color);
    margin-right: 4px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    z-index: 2;
    pointer-events: none;
    transition: var(--transition);
}

.modern-input {
    width: 100%;
    min-width: 0;
    padding: 13px 15px 13px 46px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    font-size: 15px;
    transition: var(--transition);
    background: var(--surface-color);
    font-family: inherit;
    color: var(--text-primary);
}

.modern-input:hover {
    border-color: #cfd8e6;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* 聚焦时图标点亮 */
.input-with-icon:focus-within .input-icon {
    color: var(--primary-color);
}

.modern-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
    display: block;
    line-height: 1.6;
}

/* ---------- 7. 验证码（图形码 / 邮箱码） ---------- */
.captcha-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.captcha-display {
    width: 122px;
    height: 47px;
    border-radius: 11px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.captcha-display:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.captcha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* 图形验证码未加载时（尚未点击输入框）给出提示，避免出现一个"空框" */
.captcha-display:empty::after {
    content: '点击获取';
    font-size: 12.5px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* 并排两列时输入框变窄，压缩左内边距并微调 placeholder，避免文字被截断 */
.form-row .modern-input {
    padding-left: 44px;
}

.form-row .modern-input::placeholder {
    font-size: 14px;
}

.code-btn {
    width: 122px;
    height: 47px;
    padding: 0 8px;
    border-radius: 11px;
    border: 1px solid var(--primary-color);
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    white-space: nowrap;
}

.code-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

.code-btn:disabled {
    border-color: var(--border-color);
    background: var(--surface-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ---------- 8. 复选框（同意条款） ---------- */
.terms-agree {
    margin-bottom: 24px;
}

.checkbox-modern {
    display: flex;
    align-items: flex-start;
}

.checkbox-modern input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    width: 100%;
    min-width: 0;
}

.checkmark {
    width: 19px;
    height: 19px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--surface-color);
}

.checkmark::after {
    content: '';
    width: 11px;
    height: 11px;
    background: var(--primary-color);
    border-radius: 3px;
    transform: scale(0);
    transition: var(--transition);
}

.checkbox-modern input[type="checkbox"]:checked + .checkbox-label .checkmark {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
}

.checkbox-modern input[type="checkbox"]:checked + .checkbox-label .checkmark::after {
    transform: scale(1);
}

.checkbox-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.55;
    min-width: 0;
    word-break: break-word;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.checkbox-label a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ---------- 9. 按钮 ---------- */
.btn {
    padding: 13px 24px;
    border: none;
    border-radius: 11px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.7);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.8);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f4f6fa;
    border-color: #cbd5e1;
}

/* ---------- 10. 表单页脚 / 忘记密码链接 ---------- */
.form-footer {
    text-align: center;
    margin-top: 18px;
}

.forgot-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ---------- 11. 帮助框 ---------- */
.help-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 26px;
    padding: 16px 18px;
    background: #f7f9fc;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 12px;
}

.help-icon {
    font-size: 17px;
    line-height: 1.4;
    flex-shrink: 0;
}

.help-content {
    min-width: 0;
}

.help-content strong {
    color: var(--text-primary);
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.help-content p {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.7;
    margin: 0;
    overflow-wrap: anywhere;
}

/* ---------- 12. 页脚（链接 + 备案） ---------- */
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-bottom: 14px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13.5px;
    padding: 3px 6px;
    border-radius: 6px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-info {
    color: var(--text-muted);
    line-height: 1.7;
    text-align: center;
}

.beian-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 6px;
}

.beian-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}

.beian-links a:hover {
    color: var(--primary-color);
}

.beian-gongan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.beian-gongan img {
    flex-shrink: 0;
}

.copyright {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ---------- 13. 弹窗 ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--surface-color);
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.26s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 24px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modal-icon {
    font-size: 24px;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 18px 24px;
    text-align: center;
}

.modal-body p {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-footer {
    padding: 18px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    min-width: 80px;
}

/* ---------- 14. 登录方式切换（登录页专用） ---------- */
.login-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin: 26px 0 0;
    background: #f2f5fa;
    border: 1px solid var(--border-color);
    border-radius: 11px;
}

.login-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.login-tab:hover {
    color: var(--primary-color);
}

.login-tab.active {
    background: var(--surface-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.login-tab:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 切换面板后其内部表单的顶部间距 */
.login-panel {
    width: 100%;
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 991px) {
    body {
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

    /* 品牌区收缩为顶部窄条：与表单区同底色（纯白）+ logo 居中，融入同一张卡片 */
    .brand-panel {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 20px 20px 0;
        background: #ffffff;
        border-right: none;
        border-bottom: none;
    }

    /* 去掉品牌区的蓝色光斑：否则 logo 底色会带淡蓝色调，与右侧表单区的纯白不一致 */
    .brand-panel::before {
        display: none;
    }

    .brand-main,
    .brand-foot {
        display: none;
    }

    /* 纯白底上不需要「白色卡片」容器，让 logo 与底色融为一体 */
    .brand-logo {
        align-self: center;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .brand-logo:hover {
        box-shadow: none;
    }

    .brand-logo img {
        height: 36px;
    }

    .form-panel {
        padding: 16px 26px 30px;
    }

    .form-head-top {
        margin-bottom: 20px;
    }

    .form-panel .card-title {
        font-size: 23px;
    }

    .form-panel .auth-form {
        margin-top: 24px;
    }

    .login-tabs {
        margin-top: 20px;
    }

    .auth-foot {
        padding-top: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* 图形验证码：窄屏改为「输入框在上、验证码在下」整行 */
    .captcha-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .captcha-display {
        width: 130px;
        height: 46px;
        margin: 0 auto;
        order: -1;
    }

    .captcha-input {
        order: 1;
    }

    .code-btn {
        width: 100%;
        height: 46px;
        order: 1;
    }

    .captcha-img {
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .auth-shell {
        border-radius: 16px;
    }

    .brand-panel {
        padding: 15px 18px;
    }

    .form-panel {
        padding: 22px 18px 24px;
    }

    .form-panel .card-title {
        font-size: 21px;
    }

    .form-panel .card-subtitle {
        font-size: 14px;
    }

    .form-head .top-link {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .modern-input {
        padding: 12px 14px 12px 44px;
        font-size: 15px;   /* ≥16px 可避免 iOS 放大；此处保留设计尺寸并配合 viewport */
    }

    .btn {
        padding: 12px 20px;
    }

    .checkbox-text {
        font-size: 13px;
    }

    .checkbox-label a {
        font-size: 13px;
        white-space: normal;
        word-break: break-all;
    }

    .footer-links {
        gap: 4px 12px;
    }

    .footer-links a {
        font-size: 12.5px;
    }

    .beian-links {
        flex-direction: column;
        gap: 6px;
    }

    .beian-links a {
        font-size: 11.5px;
    }

    .copyright {
        font-size: 11.5px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-content {
        max-width: calc(100% - 8px);
    }
}

@media (max-width: 360px) {
    .login-tab {
        font-size: 13px;
        padding: 10px 4px;
    }

    .checkbox-text {
        font-size: 12px;
    }

    .checkbox-label a {
        font-size: 12px;
    }
}

/* ---------- 16. 深色模式 ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0b1220;
        --surface-color: #151f33;
        --text-primary: #f1f5f9;
        --text-secondary: #c2cddd;
        --text-muted: #8b9bb4;
        --border-color: #2a3852;
        --primary-color: #4f8cf7;
        --primary-dark: #3b7ae6;
        --brand-bg: linear-gradient(168deg, #0a1428 0%, #101f42 46%, #113163 100%);
        --brand-ink: #eaf2ff;
        --brand-ink-dim: #b6c8e4;
        --brand-ink-mute: #8296b8;
        --brand-accent: #7fb0ff;
    }

    .auth-shell {
        border-color: var(--border-color);
        box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    }

    .modern-input {
        background: #101a2c;
        color: var(--text-primary);
    }

    .modern-input:hover {
        border-color: #35476a;
    }

    .checkmark {
        background: #101a2c;
        border-color: #3d4f70;
    }

    .login-tabs {
        background: #101a2c;
    }

    .login-tab.active {
        background: #1c2a44;
    }

    .help-box {
        background: #121c30;
    }

    .btn-secondary:hover {
        background: #1c2a44;
    }
}

/* 深色模式 · 移动端：品牌条恢复深色，logo 用白色容器托底（位图本身是白底） */
@media (prefers-color-scheme: dark) and (max-width: 991px) {
    .brand-panel {
        background: var(--brand-bg);
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .brand-logo {
        padding: 6px 10px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    }
}

/* ---------- 17. 无障碍与状态 ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.modern-input:focus-visible,
.btn:focus-visible,
.modal-btn:focus-visible,
.code-btn:focus-visible,
.captcha-display:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
