/* 前台黑金主题：仅作用于 body.theme-dark / body.auth-dark，不影响后台 */
body.theme-dark,
body.auth-dark {
    --primary: #c9a24a;
    --primary-dark: #a8812f;
    --primary-light: #f0d9ab;
    --secondary: #8b8f98;
    --success: #4ade80;
    --warning: #f0b64a;
    --danger: #f87171;
    --info: #7ba7ff;

    --bg-primary: #0d0e11;
    --bg-secondary: #08080a;
    --bg-tertiary: #16171b;
    --bg-dark: #050506;

    --text-primary: #f3f3f4;
    --text-secondary: #c3c6cd;
    --text-muted: #8b8f98;
    --text-white: #ffffff;

    --border-color: #24262c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 2px 8px rgba(0, 0, 0, .45);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, .55);

    background: #08080a;
    color: var(--text-primary);
}

body.theme-dark { color-scheme: dark; }
body.auth-dark { color-scheme: dark; }

/* ---------- 顶部导航 ---------- */
body.theme-dark .header {
    background: rgba(8, 8, 10, .88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
body.theme-dark .logo { color: #f3f3f4; }
body.theme-dark .logo-icon {
    background: linear-gradient(135deg, #f3ddb0, #b98f3c);
    color: #1a1204;
}
body.theme-dark .nav a { color: #8b8f98; }
body.theme-dark .nav a:hover { color: #f3f3f4; }
body.theme-dark .nav a.active { color: #e8caa0; }
body.theme-dark .user-menu-btn { color: #e9eaf0; }
body.theme-dark .user-menu-dropdown {
    background: #121317 !important;
    border: 1px solid #24262c !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
body.theme-dark .dropdown-item { color: #c3c6cd; }
body.theme-dark .dropdown-item:hover { background: #1a1c21; color: #fff; }
body.theme-dark .dropdown-divider { background: #24262c; }
body.theme-dark .mobile-menu { background: #0d0e11; border-color: #24262c; }
body.theme-dark .mobile-menu a { color: #c3c6cd; border-color: #1c1e23; }
body.theme-dark .mobile-menu a:hover { background: #16171b; color: #fff; }

/* ---------- 页脚 ---------- */
body.theme-dark .footer {
    background: #0a0b0d !important;
    border-top: 1px solid #1c1e23;
    color: #8b8f98;
}
body.theme-dark .footer h3,
body.theme-dark .footer h4 { color: #f3f3f4; }
body.theme-dark .footer a { color: #8b8f98; }
body.theme-dark .footer a:hover { color: #e8caa0; }
body.theme-dark .footer-bottom { border-top: 1px solid #1c1e23; color: #6b6f78; }

/* ---------- 通用组件 ---------- */
body.theme-dark .card {
    background: #101114;
    border: 1px solid #22252b;
    color: var(--text-primary);
}
body.theme-dark .card:hover { border-color: #2c2f36; }
body.theme-dark .card-header,
body.theme-dark .card-footer { border-color: #22252b; }

body.theme-dark .form-control {
    background: #121317;
    border: 1px solid #262930;
    color: #f3f3f4;
}
body.theme-dark .form-control::placeholder { color: #6b6f78; }
body.theme-dark .form-control:focus {
    border-color: rgba(201, 162, 74, .6);
    box-shadow: 0 0 0 3px rgba(201, 162, 74, .12);
}
body.theme-dark .form-label { color: #c3c6cd; }
body.theme-dark .form-text { color: #7b7f88; }

body.theme-dark .btn-primary {
    background: linear-gradient(135deg, #f2dcb0, #c9a24a);
    color: #211705;
    border-color: transparent;
}
body.theme-dark .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7e6c2, #d3ad57);
    color: #211705;
}
body.theme-dark .btn-outline {
    background: transparent;
    border: 1px solid #2c2f36;
    color: #d5d8de;
}
body.theme-dark .btn-outline:hover:not(:disabled) {
    background: #16171b;
    color: #fff;
    border-color: #3a3e46;
}
body.theme-dark .btn-secondary {
    background: #1a1c21;
    color: #e6e8ee;
    border: 1px solid #2c2f36;
}

body.theme-dark .table { color: #d5d8de; }
body.theme-dark .table th {
    background: #121317;
    color: #9aa0aa;
    border-color: #22252b;
}
body.theme-dark .table td { border-color: #1d1f24; }
body.theme-dark .table tbody tr:hover { background: #121317; }

body.theme-dark .badge-primary { background: rgba(201, 162, 74, .16); color: #e8caa0; }
body.theme-dark .badge-success { background: rgba(74, 222, 128, .14); color: #6ee7a0; }
body.theme-dark .badge-danger { background: rgba(248, 113, 113, .14); color: #fca5a5; }
body.theme-dark .badge-warning { background: rgba(240, 182, 74, .14); color: #f6cf8a; }
body.theme-dark .badge-info { background: rgba(123, 167, 255, .14); color: #a9c4ff; }

body.theme-dark .flash-message { border-radius: 10px; }
body.theme-dark .flash-success { background: rgba(74, 222, 128, .1); color: #86efac; border-color: rgba(74, 222, 128, .25); }
body.theme-dark .flash-error { background: rgba(248, 113, 113, .1); color: #fca5a5; border-color: rgba(248, 113, 113, .25); }
body.theme-dark .flash-info { background: rgba(123, 167, 255, .1); color: #a9c4ff; border-color: rgba(123, 167, 255, .25); }
body.theme-dark .flash-warning { background: rgba(240, 182, 74, .1); color: #f6cf8a; border-color: rgba(240, 182, 74, .25); }

body.theme-dark .avatar { background: #1c1e23; color: #e8caa0; }
body.theme-dark a { color: #e8caa0; }
body.theme-dark .text-muted { color: #8b8f98 !important; }

/* 页面头图与会员卡 */
body.theme-dark .page-header {
    background: linear-gradient(135deg, rgba(201, 162, 74, .10) 0%, rgba(201, 162, 74, .02) 100%);
    border-bottom: 1px solid #22252b;
}
body.theme-dark .current-member-card {
    background: linear-gradient(135deg, rgba(201, 162, 74, .12) 0%, rgba(201, 162, 74, .03) 100%);
    border: 1px solid #2a2d34;
    color: #f3f3f4;
}
body.theme-dark .current-member-card .member-badge {
    background: rgba(201, 162, 74, .16);
    color: #e8caa0;
}
body.theme-dark .current-member-card.is-member {
    background: linear-gradient(135deg, #d9b978 0%, #a8812f 100%);
    border-color: transparent;
    color: #211705;
}

/* ---------- 登录/注册等独立页 ---------- */
body.auth-dark {
    background:
        radial-gradient(900px 520px at 50% -10%, rgba(201, 162, 74, .16), transparent 60%),
        #08080a !important;
    color: #f3f3f4;
}
body.auth-dark .auth-container {
    background: #101114;
    border: 1px solid #24262c;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}
body.auth-dark .auth-header {
    background: linear-gradient(180deg, rgba(201, 162, 74, .16), rgba(201, 162, 74, 0)) !important;
    border-bottom: 1px solid #1e2026;
    color: #f3f3f4;
}
body.auth-dark .auth-header h1 { color: #f3f3f4; }
body.auth-dark .auth-header p { color: #9aa0aa; }
body.auth-dark .auth-logo {
    background: linear-gradient(135deg, #f3ddb0, #b98f3c);
    color: #1a1204;
}
body.auth-dark .auth-body .form-control {
    background: #121317;
    border-color: #262930;
    color: #f3f3f4;
}
body.auth-dark .auth-body .form-control:focus {
    border-color: rgba(201, 162, 74, .6);
    box-shadow: 0 0 0 3px rgba(201, 162, 74, .12);
}
body.auth-dark .auth-footer { border-top: 1px solid #1e2026; color: #8b8f98; }
body.auth-dark .auth-footer a,
body.auth-dark .links-row a { color: #e8caa0; }
body.auth-dark .divider::before,
body.auth-dark .divider::after { background: #24262c; }
body.auth-dark .divider span { background: #101114; color: #7b7f88; }
body.auth-dark .error-alert {
    background: rgba(248, 113, 113, .1);
    border: 1px solid rgba(248, 113, 113, .25);
    color: #fca5a5;
}
body.auth-dark .form-check { color: #9aa0aa; }
