/* ============================================
   Octopus System - Global Styles v3.0
   PPTX Design DNA (Red) + Ethereal Reference (Purple)
   Red+Purple Diagonal Glow Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    /* === PPTX Core Red System === */
    --accent: #ED4947;
    --accent-dark: #C91514;
    --accent-light: #FE6260;
    --accent-glow: rgba(237, 73, 71, 0.25);
    --accent-bg: rgba(237, 73, 71, 0.06);
    --accent-gradient: linear-gradient(135deg, #ED4947 0%, #C91514 100%);

    /* === Ethereal Purple System (NEW v3) === */
    --purple-100: #c4b5fd;
    --purple-400: #a78bfa;
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;
    --purple-700: #6d28d9;
    --purple-glow: rgba(139, 92, 246, 0.35);
    --purple-bg: rgba(139, 92, 246, 0.08);
    --purple-gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    --purple-deep-gradient: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);

    /* === Hero Red-Purple Diagonal === */
    --hero-gradient: linear-gradient(135deg, #a78bfa 0%, #ED4947 50%, #C91514 100%);
    --hero-gradient-soft: linear-gradient(135deg, rgba(167,139,250,0.15) 0%, rgba(237,73,71,0.15) 50%, rgba(201,21,20,0.15) 100%);
    --bg-mesh: radial-gradient(ellipse at top left, rgba(167,139,250,0.18) 0%, transparent 50%),
               radial-gradient(ellipse at bottom right, rgba(237,73,71,0.18) 0%, transparent 50%),
               radial-gradient(ellipse at center, rgba(124,58,237,0.06) 0%, transparent 70%);

    /* === Backgrounds === */
    --bg-primary: #0a0814;
    --bg-secondary: #110d1f;
    --bg-card: #15131f;
    --bg-card-hover: #1c1a2a;
    --bg-input: #0d0a18;
    --bg-elevated: #1a1726;
    --border-color: rgba(139, 92, 246, 0.12);
    --border-hover: rgba(139, 92, 246, 0.25);
    --border-glow: rgba(237, 73, 71, 0.3);

    /* === Multi-Color Accent (Ethereal-style for stat cards) === */
    --green: #10d99e;
    --green-glow: rgba(16, 217, 158, 0.25);
    --blue: #4dabf7;
    --blue-glow: rgba(77, 171, 247, 0.25);
    --gold: #FFC000;
    --gold-glow: rgba(255, 192, 0, 0.25);
    --orange: #FF8C42;
    --orange-glow: rgba(255, 140, 66, 0.25);
    --pink: #F472B6;
    --pink-glow: rgba(244, 114, 182, 0.25);

    /* === Vibrant Stat Gradients (Ethereal-style) === */
    --grad-cyan-purple: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    --grad-orange-pink: linear-gradient(135deg, #FF8C42 0%, #F472B6 100%);
    --grad-green-cyan: linear-gradient(135deg, #10d99e 0%, #4dabf7 100%);
    --grad-red-pink: linear-gradient(135deg, #ED4947 0%, #F472B6 100%);
    --grad-gold-orange: linear-gradient(135deg, #FFC000 0%, #FF8C42 100%);

    --text-primary: #FFFFFF;
    --text-secondary: #b0a8c5;
    --text-muted: #6b6280;
    --text-dark: #2d2a3d;

    /* === Larger Radii (Ethereal-style) === */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 24px var(--accent-glow);
    --shadow-glow-purple: 0 8px 32px rgba(139, 92, 246, 0.25);
    --shadow-glow-lg: 0 0 48px var(--accent-glow);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    --shadow-card-hover: 0 12px 40px rgba(139, 92, 246, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --shadow-glass: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);

    /* === 资金明细弹窗专用 === */
    --wm-mask: rgba(0, 0, 0, 0.65);
    --wm-card: linear-gradient(180deg, rgba(30, 26, 48, 0.98) 0%, rgba(20, 17, 32, 0.98) 100%);
    --wm-card-border: rgba(139, 92, 246, 0.25);
    --wm-card-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --wm-ov-bg: rgba(139, 92, 246, 0.08);
    --wm-ov-border: rgba(139, 92, 246, 0.18);
    --wm-chip-bg: rgba(255, 255, 255, 0.05);
    --wm-chip-active: linear-gradient(135deg, #a78bfa 0%, #ED4947 100%);
    --wm-table-head: rgba(139, 92, 246, 0.08);
    --wm-table-row: rgba(255, 255, 255, 0.04);
    --wm-badge-balance-bg: rgba(16, 185, 129, 0.12);
    --wm-badge-balance-fg: #10b981;
    --wm-badge-asset-pack-bg: rgba(167, 139, 250, 0.15);
    --wm-badge-asset-pack-fg: #c4b5fd;
    --wm-badge-pool-bg: rgba(59, 130, 246, 0.12);
    --wm-badge-pool-fg: #60a5fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Red+Purple Diagonal Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-mesh);
    pointer-events: none;
    z-index: 0;
}

/* Subtle purple grid overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--accent-light); }

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, rgba(21, 19, 31, 0.95) 0%, rgba(10, 8, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    padding: 28px 20px 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px var(--purple-glow));
}

.sidebar-logo .logo-text {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    border-radius: 14px;
    border: 1px solid transparent;
    position: relative;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-primary);
    border-color: rgba(139, 92, 246, 0.2);
}

.nav-item.active {
    background: var(--hero-gradient-soft);
    color: var(--text-primary);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 16px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hero-gradient);
    box-shadow: 0 0 8px var(--purple-glow);
}

.nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 0;
    padding: 28px 40px 40px;
    min-height: 100vh;
    max-width: 1440px;
    margin-right: auto;
    margin-left: auto;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ===== Glass Cards (Ethereal-style frosted) ===== */
.card {
    background: linear-gradient(135deg, rgba(26, 23, 38, 0.7) 0%, rgba(15, 13, 25, 0.7) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.4) 30%, rgba(237, 73, 71, 0.4) 70%, transparent 100%);
}

.card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.card-title .icon {
    color: var(--purple-400);
    font-size: 20px;
}

/* ===== Stat Cards (Multi-color Vibrant - Ethereal-style) ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(26, 23, 38, 0.8) 0%, rgba(15, 13, 25, 0.8) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(20px);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--card-glow, var(--purple-glow));
    opacity: 0.4;
    filter: blur(20px);
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
}

.stat-card:hover::after { opacity: 0.7; }

/* Vibrant color variants */
.stat-card.purple { --card-glow: var(--purple-glow); border-color: rgba(139, 92, 246, 0.25); }
.stat-card.red    { --card-glow: var(--accent-glow);  border-color: rgba(237, 73, 71, 0.25); }
.stat-card.gold   { --card-glow: var(--gold-glow);    border-color: rgba(255, 192, 0, 0.25); }
.stat-card.green  { --card-glow: var(--green-glow);   border-color: rgba(16, 217, 158, 0.25); }
.stat-card.blue   { --card-glow: var(--blue-glow);    border-color: rgba(77, 171, 247, 0.25); }
.stat-card.pink   { --card-glow: var(--pink-glow);    border-color: rgba(244, 114, 182, 0.25); }
.stat-card.orange { --card-glow: var(--orange-glow);  border-color: rgba(255, 140, 66, 0.25); }

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

/* Vibrant value colors (Ethereal-style big number) */
.stat-value.purple { background: var(--grad-cyan-purple); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-value.red    { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-value.gold   { background: var(--grad-gold-orange); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-value.green  { background: var(--grad-green-cyan); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-value.pink   { background: var(--grad-red-pink); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.stat-card .stat-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.stat-card.purple .stat-icon { color: var(--purple-400); background: rgba(139, 92, 246, 0.15); border-color: rgba(139, 92, 246, 0.3); }
.stat-card.red    .stat-icon { color: var(--accent-light); background: rgba(237, 73, 71, 0.15); border-color: rgba(237, 73, 71, 0.3); }
.stat-card.gold   .stat-icon { color: var(--gold); background: rgba(255, 192, 0, 0.15); border-color: rgba(255, 192, 0, 0.3); }
.stat-card.green  .stat-icon { color: var(--green); background: rgba(16, 217, 158, 0.15); border-color: rgba(16, 217, 158, 0.3); }
.stat-card.blue   .stat-icon { color: var(--blue); background: rgba(77, 171, 247, 0.15); border-color: rgba(77, 171, 247, 0.3); }
.stat-card.pink   .stat-icon { color: var(--pink); background: rgba(244, 114, 182, 0.15); border-color: rgba(244, 114, 182, 0.3); }

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}
.stat-trend.up   { background: rgba(16, 217, 158, 0.15); color: var(--green); }
.stat-trend.down { background: rgba(237, 73, 71, 0.15); color: var(--accent-light); }

/* ===== Forms ===== */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(13, 10, 24, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3px var(--purple-bg), inset 0 1px 2px rgba(0, 0, 0, 0.3);
    background: rgba(13, 10, 24, 1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--hero-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--purple-500);
    color: var(--purple-400);
    background: rgba(139, 92, 246, 0.12);
}

.btn-lg {
    padding: 16px 44px;
    font-size: 16px;
    border-radius: 16px;
}

.btn-block {
    width: 100%;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 92, 246, 0.12);
    background: rgba(13, 10, 24, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(139, 92, 246, 0.08);
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--purple-100);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.06);
    font-size: 14px;
}

tr:hover td {
    background: rgba(139, 92, 246, 0.04);
}

tr:last-child td {
    border-bottom: none;
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-red { background: rgba(237, 73, 71, 0.15); color: var(--accent-light); border: 1px solid rgba(237, 73, 71, 0.3); }
.badge-gold { background: rgba(255, 192, 0, 0.12); color: var(--gold); border: 1px solid rgba(255, 192, 0, 0.3); }
.badge-green { background: rgba(16, 217, 158, 0.12); color: var(--green); border: 1px solid rgba(16, 217, 158, 0.3); }
.badge-blue { background: rgba(77, 171, 247, 0.12); color: var(--blue); border: 1px solid rgba(77, 171, 247, 0.3); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: var(--purple-100); border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-pink { background: rgba(244, 114, 182, 0.12); color: var(--pink); border: 1px solid rgba(244, 114, 182, 0.3); }
.badge-gray { background: rgba(100, 100, 100, 0.12); color: var(--text-secondary); border: 1px solid rgba(100, 100, 100, 0.2); }

/* ===== Progress Bar ===== */
.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(13, 10, 24, 0.8);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.progress-fill {
    height: 100%;
    background: var(--hero-gradient);
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px var(--purple-glow);
}

.progress-fill.gold { background: var(--grad-gold-orange); box-shadow: 0 0 12px var(--gold-glow); }
.progress-fill.green { background: var(--grad-green-cyan); box-shadow: 0 0 12px var(--green-glow); }

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, #151515 0%, #0a0a0a 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toast-success { background: var(--green); color: white; }
.toast-error { background: var(--accent); color: white; }
.toast-info { background: var(--blue); color: white; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-title {
        font-size: 22px;
    }
    .dashboard-hero {
        padding: 28px 24px;
    }
    .level-card-stack {
        height: auto;
    }
}

/* ============================================
   v3.0 NEW: Ethereal-style Components
   ============================================ */

/* ===== Top Tab Bar (centered) ===== */
.top-tab-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto 28px;
    width: 100%;
}

.top-tab-bar .tab-pills {
    display: inline-flex;
    background: rgba(13, 10, 24, 0.55);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 100px;
    padding: 5px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Top tab navigation (capsule pills) */
.tab-pills {
    display: inline-flex;
    background: rgba(13, 10, 24, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 100px;
    padding: 4px;
    backdrop-filter: blur(20px);
}

.tab-pill {
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-pill:hover {
    color: var(--text-primary);
}

.tab-pill.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.tab-pill .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
}

/* Hero banner (Total balance card from reference) */
.dashboard-hero {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 40%, #ED4947 100%);
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.35);
    margin-bottom: 24px;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: 10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(254, 98, 96, 0.4) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-hero-content { position: relative; z-index: 1; }

.hero-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.hero-balance {
    font-size: 52px;
    font-weight: 900;
    color: white;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-balance .currency {
    font-size: 28px;
    font-weight: 700;
    vertical-align: super;
    margin-left: 8px;
    opacity: 0.85;
}

.hero-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.hero-btn {
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-btn:hover {
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-1px);
}

.hero-btn.primary {
    background: white;
    color: #7c3aed;
    border-color: white;
}

.hero-btn.primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Hero按钮内置icon方块（SVG包裹，自适应所有主题） */
.hero-btn .hb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    flex-shrink: 0;
}
.hero-btn .hb-icon svg {
    width: 14px; height: 14px;
    display: block;
}

/* Decorative octopus in hero */
.hero-octopus {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    height: 220px;
    object-fit: contain;
    opacity: 0.4;
    z-index: 0;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(-50%) rotate(-5deg); }
    50% { transform: translateY(-55%) rotate(5deg); }
}

/* Level Card Stack (My cards cascade from reference) */
.level-card-stack {
    position: relative;
    height: 360px;
    perspective: 1200px;
}

.level-card {
    position: absolute;
    width: 100%;
    border-radius: 20px;
    padding: 20px 22px;
    color: white;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overflow: hidden;
}

.level-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 60%);
    border-radius: 50%;
}

.level-card-1 { top: 0;    left: 0;  z-index: 5; transform: rotate(-3deg) translateY(0);   background: linear-gradient(135deg, #FF8C42 0%, #ED4947 100%); }
.level-card-2 { top: 30px; left: 0;  z-index: 4; transform: rotate(2deg)  translateY(0);   background: linear-gradient(135deg, #FFC000 0%, #FF8C42 100%); }
.level-card-3 { top: 60px; left: 0;  z-index: 3; transform: rotate(-1deg) translateY(0);   background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%); }
.level-card-4 { top: 90px; left: 0;  z-index: 2; transform: rotate(3deg)  translateY(0);   background: linear-gradient(135deg, #4dabf7 0%, #7c3aed 100%); }
.level-card-5 { top: 120px;left: 0;  z-index: 1; transform: rotate(-2deg) translateY(0);   background: linear-gradient(135deg, #10d99e 0%, #4dabf7 100%); }
.level-card-6 { top: 150px;left: 0;  z-index: 0; transform: rotate(1deg)  translateY(0);   background: linear-gradient(135deg, #F472B6 0%, #7c3aed 100%); }

.level-card-stack:hover .level-card-1 { transform: rotate(-3deg) translateY(-8px); }
.level-card-stack:hover .level-card-2 { transform: rotate(2deg)  translateY(22px); }
.level-card-stack:hover .level-card-3 { transform: rotate(-1deg) translateY(52px); }
.level-card-stack:hover .level-card-4 { transform: rotate(3deg)  translateY(82px); }
.level-card-stack:hover .level-card-5 { transform: rotate(-2deg) translateY(112px); }
.level-card-stack:hover .level-card-6 { transform: rotate(1deg)  translateY(142px); }

.level-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.level-card-number {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.level-card-name {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
}

.level-card-requirement {
    margin-top: 12px;
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.5;
}

/* Chart card (Revenue flow / Expense split from reference) */
.chart-card {
    background: linear-gradient(135deg, rgba(26, 23, 38, 0.7) 0%, rgba(15, 13, 25, 0.7) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-card-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--purple-100);
    cursor: pointer;
}

.chart-card-pill .arrow { color: var(--purple-400); font-weight: 900; }

/* Bar chart container (CSS-rendered simple chart) */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    gap: 12px;
    padding: 0 4px;
}

.bar {
    flex: 1;
    background: linear-gradient(180deg, var(--purple-400) 0%, var(--purple-700) 100%);
    border-radius: 12px 12px 4px 4px;
    position: relative;
    transition: all 0.3s;
    min-height: 30px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

.bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.bar-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.bar-value {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

/* Donut chart (simple CSS) */
.donut-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        var(--orange) 0deg 30%,
        var(--purple-500) 30deg 60%,
        var(--green) 60deg 80%,
        var(--pink) 80deg 100%
    );
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.donut-chart::after {
    content: '';
    position: absolute;
    inset: 25%;
    background: var(--bg-card);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.donut-center-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.donut-center-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
    margin-top: 4px;
}

.donut-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-top: 20px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.donut-legend-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
}

.donut-legend-label {
    color: var(--text-secondary);
    flex: 1;
}

.donut-legend-value {
    color: var(--text-primary);
    font-weight: 700;
}

/* Subscriptions / Activity list (from reference) */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.08);
    border-radius: 16px;
    transition: all 0.25s;
}

.activity-item:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
}

.activity-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.activity-icon.purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.activity-icon.red    { background: linear-gradient(135deg, #FF8C42, #ED4947); }
.activity-icon.green  { background: linear-gradient(135deg, #10d99e, #4dabf7); }
.activity-icon.blue   { background: linear-gradient(135deg, #4dabf7, #7c3aed); }
.activity-icon.pink   { background: linear-gradient(135deg, #F472B6, #7c3aed); }
.activity-icon.gold   { background: linear-gradient(135deg, #FFC000, #FF8C42); }

.activity-info { flex: 1; }
.activity-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.activity-meta  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.activity-amount { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.activity-amount.up   { color: var(--green); }
.activity-amount.down { color: var(--accent-light); }

/* Grid layouts for dashboard */
.dash-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .dash-grid, .dash-grid-2 { grid-template-columns: 1fr; }
}

/* Add button (top-right Add button from reference) */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: white;
    color: var(--bg-primary);
    border: none;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.25);
}

.btn-add .plus {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--bg-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
}

/* Section title with count badge */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 10px;
    border-radius: 100px;
    font-weight: 600;
}

.section-title-link {
    font-size: 13px;
    color: var(--purple-400);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.section-title-link:hover { color: var(--purple-100); }

/* Top-right header bar (search/notification/avatar) */
.top-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(167,139,250,0.15) 0%, rgba(237,73,71,0.12) 100%);
    border-radius: 18px;
    border: 1px solid rgba(167,139,250,0.18);
}

.top-icon-btn {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.top-icon-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--text-primary);
}

.top-avatar {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #a78bfa, #ED4947);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(237, 73, 71, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.top-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(237, 73, 71, 0.45);
}

.theme-toggle-btn {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.theme-toggle-btn:hover {
    background: rgba(167,139,250,0.15);
    color: var(--text-primary);
}

/* ===== Top Bar Layout (no sidebar version) ===== */
.topbar-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 16px;
    margin-right: 8px;
}

.topbar-logo img {
    width: 36px; height: 36px;
    border-radius: 12px;
}

.topbar-logo .brand {
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, #a78bfa 0%, #ED4947 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

/* ===== Avatar Dropdown ===== */
.avatar-wrap {
    position: relative;
}

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: linear-gradient(180deg, rgba(30, 26, 48, 0.95) 0%, rgba(18, 15, 30, 0.95) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}

.avatar-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.avatar-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px; height: 12px;
    background: rgba(30, 26, 48, 0.95);
    border-left: 1px solid rgba(139, 92, 246, 0.25);
    border-top: 1px solid rgba(139, 92, 246, 0.25);
    transform: rotate(45deg);
    backdrop-filter: blur(30px);
}

.avatar-dropdown-header {
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    margin-bottom: 6px;
}

.avatar-dropdown-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-dropdown-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar-dropdown-meta .level-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #ED4947);
}

.avatar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    user-select: none;
}

.avatar-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--text-primary);
}

.avatar-dropdown-item .ddi-icon {
    width: 30px; height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.18);
    color: var(--purple-400);
    flex-shrink: 0;
}

.avatar-dropdown-item .ddi-text {
    flex: 1;
    white-space: nowrap;
}

.avatar-dropdown-item .ddi-arrow {
    font-size: 12px;
    color: var(--text-muted);
}

.avatar-dropdown-item.danger {
    color: #ff7a7a;
}

.avatar-dropdown-item.danger .ddi-icon {
    background: rgba(237, 73, 71, 0.1);
    border-color: rgba(237, 73, 71, 0.25);
    color: #ff7a7a;
}

.avatar-dropdown-item.danger:hover {
    background: rgba(237, 73, 71, 0.12);
}

.avatar-dropdown-divider {
    height: 1px;
    background: rgba(139, 92, 246, 0.12);
    margin: 6px 0;
}

/* ============================================
   🌞 亮色主题 (Light Theme)
   body[data-theme="light"]
   策略：白底 + 深色字 + 头部品牌渐变实色 + 玻璃卡变白底彩边
   ============================================ */

body[data-theme="light"] {
    /* === Backgrounds (Light) === */
    --bg-primary: #f8f7fc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f3fb;
    --bg-input: #f5f5fa;
    --bg-elevated: #ffffff;

    --border-color: rgba(139, 92, 246, 0.18);
    --border-hover: rgba(139, 92, 246, 0.4);
    --border-glow: rgba(237, 73, 71, 0.3);

    /* === Text (Dark on Light) === */
    --text-primary: #1a1528;
    --text-secondary: #5c5470;
    --text-muted: #8b7aac;
    --text-dark: #ffffff;

    /* === Accent (更鲜明) === */
    --accent: #8b5cf6;
    --accent-2: #ED4947;
    --accent-3: #c084fc;

    /* === Shadows (Softer) === */
    --shadow-sm: 0 2px 8px rgba(100, 80, 160, 0.08);
    --shadow-md: 0 8px 24px rgba(100, 80, 160, 0.1);
    --shadow-lg: 0 16px 40px rgba(100, 80, 160, 0.12);
    --shadow-card: 0 2px 12px rgba(100, 80, 160, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(139, 92, 246, 0.15);
    --shadow-glass: 0 12px 40px rgba(100, 80, 160, 0.1);

    /* === Mesh Background (Lighter) === */
    --bg-mesh: radial-gradient(ellipse at top left, rgba(167,139,250,0.12) 0%, transparent 50%),
               radial-gradient(ellipse at top right, rgba(237,73,71,0.08) 0%, transparent 50%),
               radial-gradient(ellipse at center, rgba(124,58,237,0.05) 0%, transparent 70%);
}

body[data-theme="light"] {
    background: var(--bg-primary);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text-primary);
}

/* 去掉网格 overlay */
body[data-theme="light"]::after {
    background-image: none;
}

/* === 头部导航：品牌紫红实色渐变（不透明） === */
body[data-theme="light"] .top-bar,
body[data-theme="light"] .glass-top-bar {
    background: linear-gradient(135deg, #a78bfa 0%, #c084fc 50%, #ED4947 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
}

body[data-theme="light"] .top-bar .brand-name,
body[data-theme="light"] .glass-top-bar .brand-name,
body[data-theme="light"] .top-tab,
body[data-theme="light"] .glass-tab {
    color: #ffffff;
}

body[data-theme="light"] .top-icon-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #6b21a8;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body[data-theme="light"] .top-icon-btn:hover {
    background: #ffffff;
    color: #ED4947;
    transform: scale(1.05);
}

/* === Hero区：白底 + 紫红边 === */
body[data-theme="light"] .hero-section,
body[data-theme="light"] .hero-card {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: var(--shadow-md);
}

body[data-theme="light"] .hero-section::before,
body[data-theme="light"] .hero-card::before {
    background: linear-gradient(135deg, rgba(167,139,250,0.05) 0%, rgba(237,73,71,0.05) 100%);
}

body[data-theme="light"] .hero-label,
body[data-theme="light"] .hero-balance-label {
    color: #8b7aac;
}

body[data-theme="light"] .hero-balance-amount,
body[data-theme="light"] .hero-amount {
    color: #1a1528;
    text-shadow: none;
    background: linear-gradient(135deg, #8b5cf6 0%, #ED4947 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .hero-currency {
    color: #6b5d80;
}

/* Hero按钮：参考图样式 — 4个独立白底圆角胶囊 + 彩色icon + 彩色文字
   重点：每个按钮是一个独立白色色块，跟紫色背景对比明显 */
body[data-theme="light"] .hero-btn,
body[data-theme="light"] .hero-action-btn {
    background: #ffffff;
    color: #6b21a8;
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 0 4px 14px rgba(100, 80, 160, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
body[data-theme="light"] .hero-btn .hb-icon,
body[data-theme="light"] .hero-action-btn .hb-icon {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
}
body[data-theme="light"] .hero-btn:hover,
body[data-theme="light"] .hero-action-btn:hover {
    background: #faf8ff;
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.18), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

/* 第2个按钮：主CTA — 红实色（高亮主要操作） */
body[data-theme="light"] .hero-btn:nth-child(2),
body[data-theme="light"] .hero-action-btn:nth-child(2) {
    background: linear-gradient(135deg, #ED4947 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 18px rgba(237, 73, 71, 0.4);
}
body[data-theme="light"] .hero-btn:nth-child(2) .hb-icon,
body[data-theme="light"] .hero-action-btn:nth-child(2) .hb-icon {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
}
body[data-theme="light"] .hero-btn:nth-child(2):hover,
body[data-theme="light"] .hero-action-btn:nth-child(2):hover {
    background: linear-gradient(135deg, #f15a58 0%, #ed2a2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(237, 73, 71, 0.5);
}

/* === 顶部胶囊Tab：白底紫字，激活态紫红实色 === */
body[data-theme="light"] .top-tabs,
body[data-theme="light"] .tab-pills,
body[data-theme="light"] .tab-pill-container {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body[data-theme="light"] .tab-pill,
body[data-theme="light"] .glass-tab {
    color: #5c5470;
}

body[data-theme="light"] .tab-pill:hover {
    color: #6b21a8;
    background: #f5f3fb;
}

body[data-theme="light"] .tab-pill.active,
body[data-theme="light"] .glass-tab.active {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* === 统计卡：白底 + 彩色边 === */
body[data-theme="light"] .stat-card,
body[data-theme="light"] .glass-stat {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: var(--shadow-card);
    color: #1a1528;
}

body[data-theme="light"] .stat-card::before,
body[data-theme="light"] .glass-stat::before {
    background: linear-gradient(135deg, rgba(167,139,250,0.08) 0%, rgba(237,73,71,0.08) 100%);
}

body[data-theme="light"] .stat-label,
body[data-theme="light"] .glass-stat-label {
    color: #6b5d80;
}

body[data-theme="light"] .stat-value,
body[data-theme="light"] .glass-stat-value {
    color: #1a1528;
}

/* 4个统计卡不同的彩色顶边 */
body[data-theme="light"] .stat-card:nth-child(1),
body[data-theme="light"] .glass-stat:nth-child(1) {
    border-top: 3px solid #a78bfa;
}

body[data-theme="light"] .stat-card:nth-child(2),
body[data-theme="light"] .glass-stat:nth-child(2) {
    border-top: 3px solid #10b981;
}

body[data-theme="light"] .stat-card:nth-child(3),
body[data-theme="light"] .glass-stat:nth-child(3) {
    border-top: 3px solid #ED4947;
}

body[data-theme="light"] .stat-card:nth-child(4),
body[data-theme="light"] .glass-stat:nth-child(4) {
    border-top: 3px solid #f59e0b;
}

/* === 通用玻璃卡：白底紫边 === */
body[data-theme="light"] .glass-card,
body[data-theme="light"] .card,
body[data-theme="light"] .panel {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.12);
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}

body[data-theme="light"] .glass-card-header,
body[data-theme="light"] .card-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    color: #1a1528;
}

/* === 页面大标题 === */
body[data-theme="light"] .page-title,
body[data-theme="light"] h1.section-title,
body[data-theme="light"] h2 {
    color: #1a1528;
    background: linear-gradient(135deg, #8b5cf6 0%, #ED4947 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .page-subtitle,
body[data-theme="light"] .section-subtitle {
    color: #6b5d80;
}

/* === 列表/表格 === */
body[data-theme="light"] .list-item,
body[data-theme="light"] .table-row,
body[data-theme="light"] .glass-list-item {
    background: #ffffff;
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
    color: #1a1528;
}

body[data-theme="light"] .list-item:hover,
body[data-theme="light"] .glass-list-item:hover {
    background: #faf8ff;
}

body[data-theme="light"] .list-item-title,
body[data-theme="light"] .glass-list-item-title {
    color: #1a1528;
}

body[data-theme="light"] .list-item-desc,
body[data-theme="light"] .glass-list-item-desc {
    color: #6b5d80;
}

/* === 表单 === */
body[data-theme="light"] .form-input,
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="password"],
body[data-theme="light"] input[type="number"],
body[data-theme="light"] input[type="email"],
body[data-theme="light"] input[type="date"],
body[data-theme="light"] input[type="search"],
body[data-theme="light"] textarea,
body[data-theme="light"] select {
    background: #f5f5fa;
    color: #1a1528;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

body[data-theme="light"] .form-input:focus,
body[data-theme="light"] input:focus,
body[data-theme="light"] textarea:focus,
body[data-theme="light"] select:focus {
    border-color: #8b5cf6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

body[data-theme="light"] .form-label,
body[data-theme="light"] label {
    color: #5c5470;
}

/* === 按钮 === */
body[data-theme="light"] .btn-primary,
body[data-theme="light"] button[type="submit"] {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

body[data-theme="light"] .btn-secondary {
    background: #ffffff;
    color: #6b21a8;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

body[data-theme="light"] .btn-danger {
    background: linear-gradient(135deg, #ED4947 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(237, 73, 71, 0.3);
}

/* === 弹窗 === */
body[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.4);
}

body[data-theme="light"] .modal-card,
body[data-theme="light"] .modal-content {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: 0 24px 64px rgba(100, 80, 160, 0.25);
}

body[data-theme="light"] .modal-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    color: #1a1528;
}

body[data-theme="light"] .modal-footer {
    border-top: 1px solid rgba(139, 92, 246, 0.12);
}

/* === 头像下拉 === */
body[data-theme="light"] .avatar-dropdown {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 12px 32px rgba(100, 80, 160, 0.2);
}

body[data-theme="light"] .avatar-dropdown-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    color: #1a1528;
}

body[data-theme="light"] .avatar-dropdown-item {
    color: #1a1528;
}

/* 亮色版：ddi-icon 用紫粉渐变背景 + 白色 emoji 中心 */
body[data-theme="light"] .avatar-dropdown-item .ddi-icon {
    background: linear-gradient(135deg, #a78bfa 0%, #ED4947 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(167, 139, 250, 0.3);
}

body[data-theme="light"] .avatar-dropdown-item.danger .ddi-icon {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-color: rgba(239, 68, 68, 0.4);
}

body[data-theme="light"] .avatar-dropdown-item:hover {
    background: #f5f3fb;
}

body[data-theme="light"] .avatar-dropdown-item:hover .ddi-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.45);
}

body[data-theme="light"] .avatar-dropdown-divider {
    background: rgba(139, 92, 246, 0.12);
}

/* === 标签/徽章 === */
body[data-theme="light"] .badge,
body[data-theme="light"] .tag {
    background: rgba(139, 92, 246, 0.1);
    color: #6b21a8;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

body[data-theme="light"] .badge.success,
body[data-theme="light"] .tag.success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}

body[data-theme="light"] .badge.danger,
body[data-theme="light"] .tag.danger {
    background: rgba(237, 73, 71, 0.1);
    color: #b91c1c;
    border-color: rgba(237, 73, 71, 0.25);
}

body[data-theme="light"] .badge.warning,
body[data-theme="light"] .tag.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.25);
}

/* === 主题切换按钮 === */
body[data-theme="light"] .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #6b21a8;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(100, 80, 160, 0.15);
}

body[data-theme="light"] .theme-toggle-btn:hover {
    background: #ffffff;
    color: #ED4947;
}

/* ============================================
   🌞 亮色版：去除所有深色玻璃卡 → 白底 + 淡彩边
   （2026-07-06 玻璃卡改造，覆盖范围：dashboard / team / performance / commission / payment / profile）
   ============================================ */

/* 顶 bar 左侧 logo 容器 */
body[data-theme="light"] .topbar-wrap { color: #1a1528; }
body[data-theme="light"] .topbar-logo {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 0 2px 8px rgba(100, 80, 160, 0.08);
}
body[data-theme="light"] .topbar-logo .brand { color: #1a1528; }

/* Dashboard Hero（紫红实色渐变，跟移动端一样） */
body[data-theme="light"] .dashboard-hero {
    background: linear-gradient(135deg, #a78bfa 0%, #c084fc 50%, #ED4947 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(167, 139, 250, 0.3);
}
body[data-theme="light"] .dashboard-hero::before { display: none; }
body[data-theme="light"] .dashboard-hero::after { display: none; }
body[data-theme="light"] .hero-label { color: rgba(255, 255, 255, 0.85); }
body[data-theme="light"] .hero-balance { color: #ffffff; }
body[data-theme="light"] .hero-trend { color: rgba(255, 255, 255, 0.9); }
body[data-theme="light"] .hero-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #6b21a8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
body[data-theme="light"] .hero-btn.primary {
    background: #ffffff;
    color: #ED4947;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Chart Card（dashboard 月度柱状图 / 业绩分布 / 业绩详情 / 资产概览 / 最近直推 等大卡片） */
body[data-theme="light"] .chart-card {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: 0 4px 16px rgba(100, 80, 160, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body[data-theme="light"] .chart-card-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
body[data-theme="light"] .chart-card-title { color: #1a1528; }
body[data-theme="light"] .chart-card-pill {
    background: rgba(139, 92, 246, 0.08);
    color: #6b21a8;
    border-color: rgba(139, 92, 246, 0.2);
}

/* 柱状图：bar 渐变保持紫/红，标签变深色 */
body[data-theme="light"] .bar-label { color: #5c5470; }
body[data-theme="light"] .bar-value { color: #1a1528; }

/* 饼图中心：白底圆 */
body[data-theme="light"] .donut-chart::after { background: #ffffff; }
body[data-theme="light"] .donut-center-label { color: #5c5470; }
body[data-theme="light"] .donut-center-value { color: #1a1528; }
body[data-theme="light"] .donut-legend-label { color: #5c5470; }
body[data-theme="light"] .donut-legend-value { color: #1a1528; }

/* Level Card Stack（dashboard 6 张彩色段位卡堆） */
body[data-theme="light"] .level-card-stack {
    background: linear-gradient(135deg, #f5f3fb 0%, #fef7f6 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: 0 4px 16px rgba(100, 80, 160, 0.08);
}
body[data-theme="light"] .level-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
body[data-theme="light"] .level-card-header { color: rgba(255, 255, 255, 0.9); }
body[data-theme="light"] .level-card-number { color: #ffffff; }
body[data-theme="light"] .level-card-name { color: rgba(255, 255, 255, 0.95); }
body[data-theme="light"] .level-card-requirement { color: rgba(255, 255, 255, 0.8); }

/* Activity list（dashboard 最近活动） */
body[data-theme="light"] .activity-item {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.12);
    box-shadow: 0 2px 8px rgba(100, 80, 160, 0.05);
}
body[data-theme="light"] .activity-item:hover {
    background: #faf8ff;
    border-color: rgba(139, 92, 246, 0.25);
}
body[data-theme="light"] .activity-title { color: #1a1528; }
body[data-theme="light"] .activity-meta  { color: #5c5470; }
body[data-theme="light"] .activity-amount { color: #1a1528; }

/* Section Title（节标题） */
body[data-theme="light"] .section-title { color: #1a1528; }
body[data-theme="light"] .section-title-text { color: #1a1528; }
body[data-theme="light"] .section-title-count {
    background: rgba(139, 92, 246, 0.1);
    color: #6b21a8;
}
body[data-theme="light"] .section-title-link { color: #6b21a8; }
body[data-theme="light"] .section-title-link:hover { color: #ED4947; }

/* btn-add（查看按钮） */
body[data-theme="light"] .btn-add {
    background: linear-gradient(135deg, #a78bfa 0%, #ED4947 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}
body[data-theme="light"] .btn-add:hover {
    box-shadow: 0 6px 16px rgba(167, 139, 250, 0.4);
}
body[data-theme="light"] .btn-add .plus {
    background: #ffffff;
    color: #6b21a8;
}

/* Card 通用（team/performance/commission/payment/profile 页面 .card） */
body[data-theme="light"] .card {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.12);
    box-shadow: 0 4px 16px rgba(100, 80, 160, 0.06);
}
body[data-theme="light"] .card-title {
    color: #1a1528;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}
body[data-theme="light"] .card-title .icon { color: #6b21a8; }

/* Table 容器（所有 .table-container + table th/td） */
body[data-theme="light"] .table-container {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: 0 2px 8px rgba(100, 80, 160, 0.05);
}
body[data-theme="light"] table { background: #ffffff; }
body[data-theme="light"] th {
    background: rgba(139, 92, 246, 0.06);
    color: #6b21a8;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}
body[data-theme="light"] td {
    color: #1a1528;
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}
body[data-theme="light"] tr:hover td { background: rgba(139, 92, 246, 0.04); }

/* Level Table 特定（performance.html 段位考核表） */
body[data-theme="light"] .level-table th { color: #6b21a8; }
body[data-theme="light"] .level-table td { color: #1a1528; }
body[data-theme="light"] .level-table .current {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #6b21a8;
    font-weight: 700;
}

/* Badge 标签（保留品牌色但去玻璃感） */
body[data-theme="light"] .badge { color: #6b21a8; }
body[data-theme="light"] .badge-red   { color: #b91c1c; }
body[data-theme="light"] .badge-gold  { color: #b45309; }
body[data-theme="light"] .badge-green { color: #047857; }
body[data-theme="light"] .badge-blue  { color: #1d4ed8; }
body[data-theme="light"] .badge-purple{ color: #6b21a8; }
body[data-theme="light"] .badge-pink  { color: #be185d; }
body[data-theme="light"] .badge-gray  { color: #5c5470; }

/* 进度条 */
body[data-theme="light"] .progress-bar {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

/* Volume bar（performance 业绩条） */
body[data-theme="light"] .volume-bar {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.12);
}
body[data-theme="light"] .volume-bar-label { color: #1a1528; }

/* Filter bar（commission 筛选条）+ gen-btn（team 代数筛选） */
body[data-theme="light"] .filter-bar { border-bottom: 1px solid rgba(139, 92, 246, 0.1); }
body[data-theme="light"] .filter-btn,
body[data-theme="light"] .gen-btn {
    color: #5c5470;
    background: transparent;
}
body[data-theme="light"] .filter-btn:hover,
body[data-theme="light"] .gen-btn:hover {
    color: #6b21a8;
    background: rgba(139, 92, 246, 0.06);
}
body[data-theme="light"] .filter-btn.active,
body[data-theme="light"] .gen-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Currency Tabs（payment 币种切换） */
body[data-theme="light"] .currency-tabs { border-bottom: 1px solid rgba(139, 92, 246, 0.1); }
body[data-theme="light"] .currency-tab { color: #5c5470; }
body[data-theme="light"] .currency-tab:hover { color: #6b21a8; }
body[data-theme="light"] .currency-tab.active {
    color: #6b21a8;
    border-bottom: 2px solid #a78bfa;
}

/* Amount Preset（payment 金额预设） */
body[data-theme="light"] .amount-presets { color: #1a1528; }
body[data-theme="light"] .amount-preset {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #1a1528;
}
body[data-theme="light"] .amount-preset:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.4);
}
body[data-theme="light"] .amount-preset.active {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #ffffff;
    border-color: transparent;
}

/* USDT info box（payment 收款信息） */
body[data-theme="light"] .usdt-info-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06) 0%, rgba(237, 73, 71, 0.04) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #1a1528;
}
body[data-theme="light"] .usdt-info-box .label { color: #5c5470; }
body[data-theme="light"] .usdt-info-box .value { color: #1a1528; }
body[data-theme="light"] .usdt-info-box .desc  { color: #5c5470; }
body[data-theme="light"] .usdt-info-box .name  { color: #1a1528; }

/* Profile 页面 */
body[data-theme="light"] .profile-section {
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.12);
    box-shadow: 0 4px 16px rgba(100, 80, 160, 0.06);
}
body[data-theme="light"] .profile-section h3 { color: #1a1528; }
body[data-theme="light"] .profile-info { color: #1a1528; }
body[data-theme="light"] .profile-info .label { color: #5c5470; }
body[data-theme="light"] .profile-info .value { color: #1a1528; }
body[data-theme="light"] .avatar-box {
    background: linear-gradient(135deg, #a78bfa 0%, #ED4947 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}
body[data-theme="light"] .referral-code-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(237, 73, 71, 0.04) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #1a1528;
}
body[data-theme="light"] .referral-code-box .label { color: #5c5470; }
body[data-theme="light"] .referral-code-box .value { color: #6b21a8; }
body[data-theme="light"] .referral { color: #1a1528; }
body[data-theme="light"] .referral .label { color: #5c5470; }
body[data-theme="light"] .account { color: #1a1528; }
body[data-theme="light"] .copy-btn {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}
body[data-theme="light"] .copy-btn:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

/* 通用 form-group 在亮色下的背景 */
body[data-theme="light"] .form-group { color: #1a1528; }

/* list-item 悬停态（亮色下淡彩） */
body[data-theme="light"] .list-item { color: #1a1528; }
body[data-theme="light"] .list-item:hover { background: #faf8ff; }
body[data-theme="light"] .list-item .title { color: #1a1528; }
body[data-theme="light"] .list-item .desc  { color: #5c5470; }

/* btn-primary 按钮（在亮色下也保留品牌色） */
body[data-theme="light"] .btn.btn-primary {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}
body[data-theme="light"] .btn.btn-outline {
    background: #ffffff;
    color: #6b21a8;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
body[data-theme="light"] .btn.btn-outline:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: #8b5cf6;
}

/* Level Progress Card 标题 */
body[data-theme="light"] #levelProgressCard .card-title { color: #1a1528; }

/* ============================================
   资金明细弹窗 (Wallet Logs Modal V2)
   ============================================ */
.wallet-modal-mask {
    position: fixed; inset: 0;
    background: var(--wm-mask);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: wmFadeIn 0.2s ease;
}
@keyframes wmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.wallet-modal-card {
    background: var(--wm-card);
    border: 1px solid var(--wm-card-border);
    border-radius: 24px;
    width: 100%;
    max-width: 880px;
    max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: var(--wm-card-shadow);
    overflow: hidden;
    animation: wmSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wmSlideUp { from { transform: translateY(20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.wallet-modal-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--wm-card-border);
}
.wallet-modal-title { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.wallet-modal-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.wallet-modal-close {
    background: var(--wm-ov-bg); border: 1px solid var(--wm-ov-border);
    width: 36px; height: 36px; border-radius: 12px;
    font-size: 22px; color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.wallet-modal-close:hover { background: rgba(237, 73, 71, 0.15); color: #ED4947; transform: rotate(90deg); }

/* 概览3栏 */
.wallet-overview {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 12px; padding: 20px 28px;
}
.wallet-overview-item {
    background: var(--wm-ov-bg);
    border: 1px solid var(--wm-ov-border);
    border-radius: 16px;
    padding: 16px 18px;
    position: relative; overflow: hidden;
}
.wallet-overview-item::before {
    content: ''; position: absolute; top: -20px; right: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
}
.woi-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.woi-value { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.woi-tip { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== 积分中心（多层色块化重设计） ===== */
.pc-points-overview {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 20px 28px 4px;
}
.pc-block {
    border-radius: 16px; padding: 15px 16px; position: relative; overflow: hidden;
    border: 1px solid transparent;
}
.pc-block::after {
    content: ''; position: absolute; right: -18px; bottom: -18px;
    width: 76px; height: 76px; border-radius: 50%; opacity: 0.18;
}
.pc-block-amber { background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(245,158,11,0.04)); border-color: rgba(245,158,11,0.25); }
.pc-block-amber::after { background: #f59e0b; }
.pc-block-green { background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(16,185,129,0.04)); border-color: rgba(16,185,129,0.25); }
.pc-block-green::after { background: #10b981; }
.pc-block-red { background: linear-gradient(135deg, rgba(237,73,71,0.16), rgba(237,73,71,0.04)); border-color: rgba(237,73,71,0.25); }
.pc-block-red::after { background: #ED4947; }
.pc-block-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.pc-block-value { font-size: 21px; font-weight: 800; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pc-block-amber .pc-block-value { color: #f59e0b; }
.pc-block-green .pc-block-value { color: #10b981; }
.pc-block-red .pc-block-value { color: #ED4947; }
.pc-block-tip { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

.pc-points-section { padding: 16px 28px 4px; }
.pc-points-section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.pc-points-formcard {
    background: var(--wm-ov-bg); border: 1px solid var(--wm-ov-border);
    border-radius: 14px; padding: 16px;
}
.pc-field { margin-bottom: 10px; }
.pc-field label { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.pc-field input {
    width: 100%; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--wm-ov-border); background: rgba(255,255,255,0.04);
    color: var(--text-primary); font-size: 14px; box-sizing: border-box;
}
.pc-field input:focus { outline: none; border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.pc-transfer-btn {
    width: 100%; padding: 12px; margin-top: 4px; border: none; border-radius: 10px;
    background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pc-transfer-btn:active { transform: scale(0.99); }

.pc-points-logs-title { padding: 18px 28px 8px; font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pc-log-row {
    display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
    padding: 12px 28px; border-bottom: 1px solid var(--wm-ov-border);
}
.pc-log-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pc-log-in .pc-log-icon { background: rgba(16,185,129,0.16); }
.pc-log-out .pc-log-icon { background: rgba(237,73,71,0.16); }
.pc-log-type { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.pc-log-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.pc-log-amount { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-log-in .pc-log-amount { color: #10b981; }
.pc-log-out .pc-log-amount { color: #ED4947; }
.wallet-overview-item.highlight-asset-pack {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.18) 0%, rgba(237, 73, 71, 0.12) 100%);
    border-color: rgba(167, 139, 250, 0.4);
}
.wallet-overview-item.highlight-asset-pack .woi-value {
    background: linear-gradient(135deg, #c4b5fd 0%, #fca5a5 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wallet-overview-item.highlight-earning {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}
.wallet-overview-item.highlight-earning .woi-value {
    background: linear-gradient(135deg, #10b981 0%, #a78bfa 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 类型筛选 */
.wallet-filters {
    display: flex; gap: 8px; padding: 0 28px 16px;
    flex-wrap: wrap;
}
.wf-chip {
    padding: 6px 14px;
    background: var(--wm-chip-bg);
    border: 1px solid var(--wm-card-border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.wf-chip:hover { background: var(--wm-ov-bg); color: var(--text-primary); }
.wf-chip.active {
    background: var(--wm-chip-active);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.35);
}

/* 列表 */
.wallet-scroll-body { flex: 1; overflow-y: auto; overflow-x: hidden; }
.wallet-list-wrap { padding: 0 28px; min-height: 280px; }
.wallet-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: var(--text-muted); gap: 12px; }
.wallet-spinner { width: 36px; height: 36px; border: 3px solid var(--wm-card-border); border-top-color: #a78bfa; border-radius: 50%; animation: wmSpin 0.8s linear infinite; }
@keyframes wmSpin { to { transform: rotate(360deg); } }
.wallet-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: var(--text-muted); gap: 12px; }
.we-icon { font-size: 48px; opacity: 0.5; }

.wlog-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wlog-table thead th {
    text-align: left;
    padding: 12px 10px;
    background: var(--wm-table-head);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky; top: 0; z-index: 1;
}
.wlog-table thead th:first-child { border-radius: 10px 0 0 10px; }
.wlog-table thead th:last-child { border-radius: 0 10px 10px 0; }
.wlog-table thead th.tar { text-align: right; }
.wlog-table tbody tr { border-bottom: 1px solid rgba(255, 255, 255, 0.04); transition: background 0.15s; }
.wlog-table tbody tr:hover { background: var(--wm-table-row); }
.wlog-table tbody td { padding: 12px 10px; color: var(--text-primary); }
.wlog-table tbody td.tar { text-align: right; }
.wlog-time { font-variant-numeric: tabular-nums; }
.wlog-time-hm { font-size: 11px; color: var(--text-muted); }
.wlog-type { font-weight: 600; }
.wlog-amount { font-variant-numeric: tabular-nums; }
.wlog-balance { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.wlog-remark { font-size: 12px; color: var(--text-secondary); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlog-dir { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.wlog-dir-in { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.wlog-dir-out { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.wlog-badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.wlog-badge-balance { background: var(--wm-badge-balance-bg); color: var(--wm-badge-balance-fg); }
.wlog-badge-asset-pack { background: var(--wm-badge-asset-pack-bg); color: var(--wm-badge-asset-pack-fg); }
.wlog-badge-pool { background: var(--wm-badge-pool-bg); color: var(--wm-badge-pool-fg); }

/* 分页 */
.wallet-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 28px;
    border-top: 1px solid var(--wm-card-border);
    gap: 12px; flex-wrap: wrap;
}
.wf-pager { display: flex; gap: 6px; flex-wrap: wrap; }
.wfp-btn {
    min-width: 36px; height: 32px;
    padding: 0 12px;
    background: var(--wm-chip-bg);
    border: 1px solid var(--wm-card-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.wfp-btn:hover:not(:disabled) { background: var(--wm-ov-bg); color: var(--text-primary); }
.wfp-btn.active { background: var(--wm-chip-active); border-color: transparent; color: #fff; font-weight: 700; }
.wfp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wf-total { font-size: 12px; color: var(--text-muted); }

/* 移动端 */
@media (max-width: 720px) {
    .wallet-modal-card { max-height: 95vh; border-radius: 18px 18px 0 0; align-self: flex-end; }
    .wallet-modal-mask { padding: 0; align-items: flex-end; }
    .wallet-modal-header { padding: 18px 18px 12px; }
    .wallet-modal-title { font-size: 18px; }
    .wallet-overview { grid-template-columns: 1fr; gap: 8px; padding: 14px 18px; }
    .woi-value { font-size: 18px; }
    .wallet-filters { padding: 0 18px 12px; }
    .wallet-list-wrap { padding: 0 14px; }
    .wlog-table { font-size: 12px; }
    .wlog-table thead th, .wlog-table tbody td { padding: 8px 6px; }
    .wlog-remark { max-width: 120px; }
    .wallet-footer { padding: 12px 18px; }
}

/* === 亮色版覆盖 === */
body[data-theme="light"] {
    --wm-mask: rgba(60, 40, 100, 0.35);
    --wm-card: #ffffff;
    --wm-card-border: rgba(139, 92, 246, 0.2);
    --wm-card-shadow: 0 20px 60px rgba(100, 80, 160, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.1);
    --wm-ov-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(237, 73, 71, 0.04) 100%);
    --wm-ov-border: rgba(139, 92, 246, 0.18);
    --wm-chip-bg: #f5f3fb;
    --wm-table-head: #faf9fd;
    --wm-table-row: #f8f6fc;
    --wm-badge-balance-bg: #d1fae5;
    --wm-badge-balance-fg: #047857;
    --wm-badge-asset-pack-bg: #ede9fe;
    --wm-badge-asset-pack-fg: #6d28d9;
    --wm-badge-pool-bg: #dbeafe;
    --wm-badge-pool-fg: #1d4ed8;
}
body[data-theme="light"] .wallet-modal-header { border-bottom-color: rgba(139, 92, 246, 0.12); }
body[data-theme="light"] .wallet-modal-close { background: #f5f3fb; border-color: rgba(139, 92, 246, 0.2); }
body[data-theme="light"] .wallet-modal-close:hover { background: #fee2e2; color: #dc2626; }
body[data-theme="light"] .woi-label { color: #6b6280; }
body[data-theme="light"] .woi-value { color: #1a1528; }
body[data-theme="light"] .woi-tip { color: #8b8295; }
body[data-theme="light"] .wlog-table tbody tr { border-bottom-color: rgba(139, 92, 246, 0.08); }
body[data-theme="light"] .wlog-table tbody td { color: #1a1528; }
body[data-theme="light"] .wallet-footer { border-top-color: rgba(139, 92, 246, 0.12); }
body[data-theme="light"] .wfp-btn { background: #f5f3fb; border-color: rgba(139, 92, 246, 0.18); color: #4a4458; }
/* 后台授级用户：需要按用户单独隐藏的元素（配合 JS 动态显隐） */
.granted-hide { display: none !important; }

