*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root, [data-theme="dark"] {
    --bg-primary: #121212; --bg-secondary: #1a1a1a; --bg-card: #212121; --border: #333333;
    --text-primary: #e8e8e8; --text-secondary: #a0a0a0; --text-muted: #6b6b6b;
    --accent-green: #22c55e; --accent-green-dim: rgba(34, 197, 94, 0.15);
    --accent-red: #ef4444; --accent-red-dim: rgba(239, 68, 68, 0.15);
    --accent-blue: #3b82f6; --accent-blue-dim: rgba(59, 130, 246, 0.12);
    --accent-purple: #a855f7; --accent-gold: #f59e0b;
    --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #a855f7 100%);
    --nav-bg: rgba(18,18,18,0.97);
    --bg: #121212; --bg2: #1a1a1a; --bg3: #212121;
    --text: #e8e8e8; --text2: #a0a0a0;
    --accent: #3b82f6; --accent2: #60a5fa; --green: #22c55e; --red: #ef4444; --gold: #f59e0b;
}
[data-theme="light"] {
    --bg-primary: #f5f5f5; --bg-secondary: #ffffff; --bg-card: #ffffff; --border: #e0e0e0;
    --text-primary: #1a1a1a; --text-secondary: #555555; --text-muted: #888888;
    --accent-green: #16a34a; --accent-green-dim: rgba(22, 163, 74, 0.12);
    --accent-red: #dc2626; --accent-red-dim: rgba(220, 38, 38, 0.12);
    --accent-blue: #2563eb; --accent-blue-dim: rgba(37, 99, 235, 0.1);
    --accent-purple: #9333ea; --accent-gold: #d97706;
    --gradient-hero: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #9333ea 100%);
    --nav-bg: rgba(255,255,255,0.97);
    --bg: #f5f5f5; --bg2: #ffffff; --bg3: #ffffff;
    --text: #1a1a1a; --text2: #555555;
    --accent: #2563eb; --accent2: #3b82f6; --green: #16a34a; --red: #dc2626; --gold: #d97706;
}
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--accent2); text-decoration: none; }

.dash-nav { display: flex; align-items: center; gap: 1.5rem; padding: 0.75rem 1.5rem; background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.dash-nav-links { display: flex; gap: 1rem; flex: 1; }
.dash-nav-links a { color: var(--text2); font-size: 0.82rem; font-weight: 500; padding: 0.4rem 0.75rem; border-radius: 6px; transition: all 0.2s; }
.dash-nav-links a:hover, .dash-nav-links a.active { color: var(--text); background: var(--bg3); text-decoration: none; }
.dash-nav-auth { display: flex; align-items: center; gap: 0.75rem; }

.welcome-banner { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1)); border: 1px solid rgba(59,130,246,0.2); padding: 1rem 1.5rem; }
.welcome-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.welcome-inner h2 { font-size: 1rem; white-space: nowrap; } .welcome-inner p { font-size: 0.82rem; color: var(--text2); flex: 1; }
.btn-close { background: none; border: none; color: var(--text2); font-size: 1.2rem; cursor: pointer; }

.dash-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.dash-section { margin-bottom: 2rem; }
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.section-badge { font-size: 0.6rem; font-weight: 600; background: rgba(245,158,11,0.15); color: var(--gold); padding: 0.2rem 0.5rem; border-radius: 4px; }
.section-count { font-size: 0.72rem; font-weight: 500; color: var(--text2); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.stat-label { font-size: 0.68rem; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.4rem; }
.stat-val { font-size: 1.2rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; } .stat-val.small { font-size: 0.82rem; }

.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tier-card { background: var(--bg2); border: 2px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: center; transition: all 0.3s; }
.tier-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.tier-card.current { border-color: var(--accent); box-shadow: 0 0 20px rgba(59,130,246,0.15); }
.tier-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.tier-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tier-price { font-size: 1.8rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; } .tier-price span { font-size: 0.8rem; font-weight: 400; color: var(--text2); }
.tier-annual { font-size: 0.7rem; color: var(--text2); margin-bottom: 0.75rem; }
.tier-card ul { text-align: left; list-style: none; margin: 1rem 0; }
.tier-card li { font-size: 0.78rem; padding: 0.3rem 0; color: var(--text2); } .tier-card li::before { content: '✓ '; color: var(--green); font-weight: 700; }
.tier-details { font-size: 0.65rem; color: var(--text2); border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.5rem; }
.tier-btn { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 0.6rem 1.5rem; font-weight: 600; font-size: 0.82rem; cursor: pointer; margin-top: 0.75rem; transition: all 0.2s; }
.tier-btn:hover { background: var(--accent2); } .current-btn { background: var(--bg3); color: var(--text2); cursor: default; }

.trades-table { overflow-x: auto; }
.trades-table table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.trades-table th { text-align: left; padding: 0.6rem 0.75rem; color: var(--text2); font-weight: 600; font-size: 0.68rem; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.trades-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; }
.side-buy { color: var(--green); font-weight: 700; } .side-sell { color: var(--red); font-weight: 700; }
.status-open { color: var(--gold); } .status-tp { color: var(--green); } .status-sl { color: var(--red); } .status-timeout { color: var(--text2); }
.trade-win td:first-child { border-left: 3px solid var(--green); } .trade-loss td:first-child { border-left: 3px solid var(--red); } .trade-open td:first-child { border-left: 3px solid var(--gold); }

.watchlist-add, .alert-add { display: flex; gap: 0.5rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.dash-input { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.75rem; color: var(--text); font-size: 0.82rem; outline: none; flex: 1; min-width: 160px; }
.dash-input:focus { border-color: var(--accent); }
.dash-select { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; color: var(--text); font-size: 0.82rem; }
.watchlist-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.watchlist-item { display: flex; align-items: center; gap: 0.5rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.75rem; }
.wl-symbol { font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.btn-x { background: none; border: none; color: var(--text2); font-size: 0.9rem; cursor: pointer; padding: 0 0.3rem; } .btn-x:hover { color: var(--red); }
.btn-copy { background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 0.4rem 0.75rem; font-size: 0.75rem; cursor: pointer; }

.alert-list { display: flex; flex-direction: column; gap: 0.4rem; }
.alert-item { display: flex; align-items: center; gap: 0.75rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem; font-size: 0.8rem; }
.alert-item.triggered { opacity: 0.5; }
.alert-symbol { font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.alert-type { color: var(--text2); font-size: 0.72rem; text-transform: capitalize; }
.alert-thresh { color: var(--gold); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }
.alert-status { font-size: 0.68rem; margin-left: auto; }
.empty-msg { color: var(--text2); font-size: 0.82rem; padding: 1rem; text-align: center; }
.upgrade-msg { color: var(--gold); font-size: 0.82rem; }

.referral-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.referral-box p { font-size: 0.85rem; color: var(--text2); margin-bottom: 1rem; }
.referral-code-box { display: flex; align-items: center; gap: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1rem; }
.referral-code-box span { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; font-weight: 700; color: var(--accent2); flex: 1; }
.referral-stats { display: flex; gap: 2rem; font-size: 0.82rem; color: var(--text2); }
.referral-stats code { color: var(--accent2); font-size: 0.75rem; }

.tier-label { padding: 0.3rem 0.75rem; border-radius: 6px; font-size: 0.85rem; font-weight: 700; }
.tier-free { background: rgba(148,163,184,0.15); color: #94a3b8; }
.tier-pro { background: rgba(34,197,94,0.15); color: var(--green); }
.tier-elite { background: rgba(59,130,246,0.15); color: var(--accent2); }
.tier-whale { background: rgba(245,158,11,0.15); color: var(--gold); }

.login-prompt { display: flex; align-items: center; justify-content: center; min-height: 80vh; }

@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .tier-grid { grid-template-columns: 1fr; } }
