*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #080810; --bg-card: #0e0e18; --bg-hover: #151522; --border: #1a1a2a;
    --gold: #e8b830; --gold-dim: #a07818; --gold-bright: #ffe066;
    --green: #00d26a; --green-bg: rgba(0,210,106,0.07); --green-border: rgba(0,210,106,0.2);
    --red: #ff2d55; --red-bg: rgba(255,45,85,0.07); --red-border: rgba(255,45,85,0.2);
    --text: #c8c8d0; --text-dim: #777; --text-bright: #eee;
    --blue: #3d8bfd; --purple: #a78bfa; --orange: #f59e0b; --cyan: #22d3ee;
    --font: 'Inter', sans-serif; --mono: 'JetBrains Mono', monospace;
}
html { font-size: 12px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

/* Screen reader only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }

/* Connection */
.conn-status { position: fixed; top: 6px; right: 6px; z-index: 9999; display: flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 3px; font-size: 8px; font-weight: 800; letter-spacing: 1px; background: rgba(245,158,11,0.12); color: var(--orange); }
.conn-status.connected { background: rgba(0,210,106,0.08); color: var(--green); }
.conn-status.error { background: rgba(255,45,85,0.1); color: var(--red); }
.conn-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Ticker Tape */
.ticker-tape { display: flex; overflow: hidden; background: #0a0a14; border-bottom: 1px solid var(--border); height: 28px; align-items: center; }
.tape-item { display: flex; align-items: center; gap: 5px; padding: 0 10px; white-space: nowrap; font-size: 10px; border-right: 1px solid #141420; height: 100%; }
.tape-symbol { font-weight: 700; color: var(--text-dim); font-size: 9px; }
.tape-price { font-family: var(--mono); font-weight: 600; color: var(--text); font-size: 10px; }
.tape-change { font-family: var(--mono); font-weight: 700; font-size: 9px; }
.tape-change.up { color: var(--green); }
.tape-change.down { color: var(--red); }

/* Tab Bar */
.tab-bar { display: flex; gap: 2px; padding: 8px 14px; background: #0a0a12; border-bottom: 1px solid var(--border); position: sticky; top: 46px; z-index: 99; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn { padding: 8px 20px; background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0; color: #666; font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.tab-btn:hover { color: #aaa; background: transparent; border-bottom-color: rgba(255,255,255,0.1); }
.tab-btn.active { color: var(--gold); background: transparent; border-bottom-color: var(--gold); }
.tab-content { display: none; padding: 16px 0; }
.tab-content.active { display: block; }
body.light .tab-bar { background: #f8f8fc; }
body.light .tab-btn { color: #777; }
body.light .tab-btn:hover { color: #555; background: rgba(0,0,0,0.03); }
body.light .tab-btn.active { color: #b8860b; background: transparent; border-bottom-color: #b8860b; }

/* Top Bar */
.top-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; height: 46px; background: linear-gradient(180deg, #101018, #0a0a12); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 6px; }
.gold-icon { color: var(--gold); font-size: 20px; filter: drop-shadow(0 0 6px rgba(232,184,48,0.4)); }
.logo-text { font-weight: 800; font-size: 15px; color: var(--gold); letter-spacing: 1px; }
.logo-sub { font-size: 8px; color: var(--text-dim); letter-spacing: 3px; font-weight: 700; }
.hero-price { background: rgba(232,184,48,0.04); border: 1px solid rgba(232,184,48,0.1); border-radius: 6px; padding: 3px 14px; }
.hero-price-row { display: flex; align-items: baseline; gap: 8px; }
.hero-val { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--gold-bright); }
.hero-change { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.hero-change.up { color: var(--green); background: var(--green-bg); }
.hero-change.down { color: var(--red); background: var(--red-bg); }
.hero-meta { display: flex; gap: 10px; font-size: 9px; color: var(--text-dim); margin-top: 1px; }
.hero-meta strong { color: var(--text); font-family: var(--mono); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.market-status { display: flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.market-status.closed .status-dot { background: var(--red); animation: none; }
.market-status.closed .status-text { color: var(--red); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
.clock { font-family: var(--mono); font-size: 10px; color: var(--text-dim); }

/* ===== MARKET SUMMARY BANNER ===== */
.summary-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: linear-gradient(90deg, rgba(14,14,24,0.95), rgba(10,10,16,0.95));
    border-bottom: 1px solid var(--border);
    gap: 12px;
    min-height: 52px;
}
.summary-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.summary-verdict { display: flex; align-items: center; gap: 10px; }
.summary-icon {
    font-size: 28px; font-weight: 900; font-family: var(--mono);
    min-width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; letter-spacing: -1px;
}
.summary-icon.bull { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.summary-icon.bear { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.summary-icon.neutral { background: rgba(245,158,11,0.08); color: var(--orange); border: 1px solid rgba(245,158,11,0.2); }
.summary-headline { font-size: 12px; font-weight: 800; color: var(--text-bright); line-height: 1.2; }
.summary-sub { font-size: 9px; color: var(--text-dim); margin-top: 1px; line-height: 1.3; max-width: 360px; }
.summary-pills { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; flex: 1; }
.summary-pill {
    font-size: 8px; font-weight: 800; letter-spacing: 0.5px;
    padding: 3px 8px; border-radius: 3px;
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap;
}
.pill-bull { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.pill-bear { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.pill-neutral { background: rgba(255,255,255,0.03); color: var(--text-dim); border: 1px solid var(--border); }
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.summary-breaking {
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0; max-width: 320px;
}
.breaking-tag {
    font-size: 7px; font-weight: 900; letter-spacing: 1px;
    padding: 2px 6px; border-radius: 2px;
    background: var(--red); color: #fff;
    animation: pulse 1.5s infinite;
    white-space: nowrap;
}
.breaking-text {
    font-size: 10px; font-weight: 600; color: var(--text-bright);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* TV Analysis Summary */
.tv-ta-summary {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.01);
    flex-wrap: wrap;
}
.ta-tf-pill {
    display: flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 3px;
    font-size: 8px; font-weight: 800; letter-spacing: 0.5px;
}
.ta-tf-label { color: var(--text-dim); }
.ta-tf-val { font-family: var(--mono); }
.ta-tf-sep { display: inline-block; width: 1px; height: 14px; background: var(--border); margin: 0 4px; vertical-align: middle; }

/* Dashboard — Section-based layout */
.dashboard { display: grid; grid-template-columns: 1.4fr 1fr 0.65fr 0.65fr; gap: 10px; padding: 10px; max-width: 2200px; margin: 0 auto; }
.col { display: flex; flex-direction: column; gap: 10px; }
.section { padding: 0 14px; max-width: 2200px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.section + .section { margin-top: 24px; }
.section-grid { display: grid; gap: 14px; align-items: stretch; }
.section-grid.g-1 { grid-template-columns: 1fr; }
.section-grid.g-2 { grid-template-columns: 1fr 1fr; }
.section-grid.g-2-1 { grid-template-columns: 1.6fr 1fr; }
.section-grid.g-3 { grid-template-columns: 1fr 1fr 1fr; }
.section-grid.g-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.section-grid.g-chart { grid-template-columns: 1fr 420px; align-items: stretch; }
.hero-right-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero-right-stack > .card { flex: 0 0 auto; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; padding: 16px; }
.card:hover { border-color: rgba(232,184,48,0.15); }
.card h3 { font-size: 14px; font-weight: 700; margin: 0 0 12px 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.card h3 .data-src-badge { font-size: 9px; vertical-align: middle; margin-left: 6px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; margin: -16px -16px 14px -16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.01); }
.card-header h2 { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }
.card input[type="text"],
.card input[type="number"],
.card input[type="email"],
.card input[type="password"],
.card select,
.card textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 8px;
    min-height: 44px;
}
/* Input + button joined (e.g. referral link, alerts, chat) */
.input-group, .ref-link-box, .tg-connect-form, .alert-form-row, .chat-input-row {
    display: flex; gap: 0; align-items: stretch;
}
.input-group input, .input-group select,
.ref-link-box input, .tg-connect-form input, .alert-form-row input {
    border-radius: 8px 0 0 8px; border-right: none; margin-bottom: 0 !important;
}
.input-group button, .input-group .btn-sm, .input-group .btn-gold,
.ref-link-box button, .ref-link-box .btn-sm, .ref-link-box .btn-gold,
.tg-connect-form button, .alert-form-row button {
    border-radius: 0 8px 8px 0 !important; padding: 12px 18px; white-space: nowrap; min-height: 44px; display: flex; align-items: center;
}
.card input[type="text"]:focus,
.card input[type="number"]:focus,
.card input[type="email"]:focus,
.card input[type="password"]:focus,
.card select:focus,
.card textarea:focus {
    border-color: var(--gold);
    outline: none;
}
.card input[type="range"] { width: 100%; accent-color: var(--gold); }
.card .btn-sm, .card button.btn-sm { padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.card label { font-size: 12px; color: var(--text-muted); }
.card p { font-size: 13px; line-height: 1.5; color: var(--text-muted); margin: 0 0 10px 0; }
.badge { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.badge-live { background: rgba(0,210,106,0.1); color: var(--green); }
.badge-warn { background: rgba(245,158,11,0.1); color: var(--orange); }
.badge-src { background: rgba(99,132,255,0.1); color: #6384ff; font-style: italic; }

/* Forecast */
.forecast-container { padding: 10px; }
.forecast-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.forecast-label { font-size: 10px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.5px; }
.forecast-range { display: flex; align-items: center; gap: 8px; }
.forecast-min { font-family: var(--mono); font-size: 12px; color: var(--red); font-weight: 600; }
.forecast-max { font-family: var(--mono); font-size: 12px; color: var(--green); font-weight: 600; }
.forecast-bar { width: 80px; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; position: relative; }
.forecast-bar-fill { position: absolute; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--red), var(--green)); }
.forecast-bar-marker { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--gold); border-radius: 1px; }
.forecast-bias { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.forecast-bias-label { font-size: 14px; font-weight: 800; text-transform: uppercase; }
.forecast-confidence { font-size: 9px; color: var(--text-dim); padding: 2px 6px; border: 1px solid var(--border); border-radius: 3px; }
.forecast-method { font-size: 8px; color: var(--text-dim); margin-top: 4px; }

/* Risk Zones */
.riskzones-container { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.riskzone-item { padding: 8px 10px; border-radius: 4px; border-left: 3px solid; }
.riskzone-item.danger { border-color: var(--red); background: rgba(239,68,68,0.06); }
.riskzone-item.warning { border-color: var(--orange); background: rgba(245,158,11,0.06); }
.riskzone-item.opportunity { border-color: var(--green); background: rgba(0,210,106,0.06); }
.riskzone-label { font-size: 11px; font-weight: 700; color: var(--text); }
.riskzone-detail { font-size: 9px; color: var(--text-dim); margin-top: 2px; }
.riskzone-level { font-size: 7px; font-weight: 800; letter-spacing: 0.5px; float: right; }
.riskzone-level.high { color: var(--red); }
.riskzone-level.medium { color: var(--orange); }

/* Spike Alert */
.spike-container { padding: 10px; }
.spike-empty { font-size: 10px; color: var(--text-dim); text-align: center; padding: 20px; }
.spike-alert { padding: 10px; border-radius: 6px; }
.spike-alert.up { background: rgba(0,210,106,0.08); border: 1px solid rgba(0,210,106,0.2); }
.spike-alert.down { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); }
.spike-direction { font-size: 20px; font-weight: 900; font-family: var(--mono); }
.spike-alert.up .spike-direction { color: var(--green); }
.spike-alert.down .spike-direction { color: var(--red); }
.spike-detail { font-size: 11px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }
.spike-time { font-size: 8px; color: var(--text-dim); margin-top: 4px; }

/* News Playbook */
.playbook-container { padding: 8px; }
.playbook-event { margin-bottom: 10px; }
.playbook-event-name { font-size: 12px; font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.playbook-scenario { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 10px; }
.playbook-outcome { min-width: 120px; color: var(--text); font-weight: 600; }
.playbook-impact { min-width: 60px; font-weight: 800; font-size: 9px; }
.playbook-impact.BULLISH { color: var(--green); }
.playbook-impact.BEARISH { color: var(--red); }
.playbook-impact.MIXED, .playbook-impact.NEUTRAL { color: var(--orange); }
.playbook-action { color: var(--text-dim); flex: 1; }
.playbook-prep { font-size: 9px; color: var(--text-dim); padding: 6px 8px; background: rgba(255,255,255,0.02); border-radius: 4px; margin-top: 6px; }

/* Market Expectations */
.expectations-container { padding: 10px; }
.expect-event { font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 4px; }
.expect-date { font-size: 9px; color: var(--text-dim); margin-bottom: 10px; }
.expect-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 10px; }
.expect-label { color: var(--text-dim); font-weight: 600; }
.expect-val { color: var(--text); font-family: var(--mono); font-weight: 600; }
.expect-range-bar { margin: 8px 0; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; position: relative; }
.expect-range-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--orange), var(--green)); }

/* Chart */
.card-chart { min-height: 600px; padding: 0 !important; overflow: hidden; }
.card-chart .card-header { margin: 0; padding: 8px 12px; border-radius: 10px 10px 0 0; }
.card-chart .widget-wrap { height: 100%; min-height: 580px; }
.widget-wrap { width: 100%; overflow: hidden; }
.widget-ta { height: 500px; padding: 0 !important; position: relative; }
.widget-ta::before,
.widget-ta::after {
    content: ''; position: absolute; top: 22%; bottom: 25%;
    width: 1px; background: var(--border); pointer-events: none; z-index: 2;
}
.widget-ta::before { left: 33.33%; }
.widget-ta::after { left: 66.66%; }

/* Info Panel (right side of chart) */
.card-info-panel { display: flex; flex-direction: column; }
.info-panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.info-symbol { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: 0.5px; }
.info-desc { font-size: 11px; color: var(--text-dim); }
.info-desc-sub { font-size: 10px; color: var(--text-muted, rgba(255,255,255,0.3)); margin-bottom: 4px; }
.info-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.info-price { font-size: 32px; font-weight: 700; color: var(--green); font-family: 'JetBrains Mono', monospace; }
.info-price.down { color: var(--red); }
.info-currency { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.info-change { font-size: 13px; font-weight: 600; }
.info-change.up { color: var(--red); }
.info-change.down { color: var(--red); }
.info-market-status { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.info-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.info-status-dot.closed { background: var(--red); }
.info-status-text { font-size: 11px; color: var(--green); font-weight: 500; }
.info-status-text.closed { color: var(--red); }
.info-bidask { display: flex; gap: 8px; margin: 4px 0; }
.info-bid, .info-ask { font-size: 12px; font-family: 'JetBrains Mono', monospace; padding: 3px 10px; border-radius: 3px; font-weight: 600; }
.info-bid { background: rgba(0,137,255,0.12); color: #4da6ff; }
.info-ask { background: rgba(239,68,68,0.12); color: #ff6b6b; }
.info-range-section { margin: 6px 0 2px; }
.info-range-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.info-range-lo, .info-range-hi { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--text-dim); font-weight: 500; }
.info-range-label { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--text-dim); }
.info-range-bar { position: relative; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; }
.info-range-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--red), var(--green)); }
.info-range-marker { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--text); border-radius: 1px; transform: translateX(-50%); }
.info-perf-title { font-size: 11px; font-weight: 700; color: var(--text-dim); margin-top: 8px; letter-spacing: 1px; }
.info-perf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.info-perf-cell { text-align: center; padding: 6px 4px; border-radius: 4px; }
.info-perf-cell.up { background: rgba(0,210,106,0.1); }
.info-perf-cell.down { background: rgba(239,68,68,0.1); }
.info-perf-val { font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; display: block; }
.info-perf-cell.up .info-perf-val { color: var(--green); }
.info-perf-cell.down .info-perf-val { color: var(--red); }
.info-perf-label { font-size: 9px; color: var(--text-dim); font-weight: 600; letter-spacing: 0.5px; display: block; margin-top: 2px; }

.info-trade-section { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.info-trade-title { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 8px; }
.info-trade-section .pt-balance-row.compact { gap: 6px; margin-bottom: 8px; }
.info-trade-section .pt-form { gap: 6px; }
.info-trade-section .pt-form-row { gap: 6px; }
.info-trade-section .pt-open-btn { margin-top: 4px; }
.info-trade-section .pt-open-trades { margin-top: 6px; }
.pt-history-btn { width: 100%; margin-top: 8px; padding: 7px; font-size: 10px; font-weight: 900; letter-spacing: 1px; background: linear-gradient(135deg, rgba(0,210,106,0.15), rgba(0,210,106,0.05)); border: 1px solid rgba(0,210,106,0.3); color: var(--green); border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.pt-history-btn:hover { background: linear-gradient(135deg, rgba(0,210,106,0.25), rgba(0,210,106,0.1)); }

.widget-calendar { height: 340px; }
.widget-mini { height: 160px; }

/* Indicators */
.indicators-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.ind-cell { background: var(--bg-card); padding: 5px 7px; display: flex; flex-direction: column; gap: 1px; }
.ind-cell:hover { background: var(--bg-hover); }
.ind-name { font-size: 8px; color: var(--text-dim); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.ind-val { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text-bright); }
.ind-signal { font-size: 8px; font-weight: 800; }
.ind-signal.buy { color: var(--green); }
.ind-signal.sell { color: var(--red); }
.ind-signal.neutral { color: var(--orange); }
.ind-explain { font-size: 7px; color: var(--text-dim); line-height: 1.2; margin-top: 1px; font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ind-strength { font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 0.5px; }
.ind-bar-wrap { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: var(--border); margin-top: 3px; }
.ind-bar-buy { height: 100%; background: var(--green); transition: width 0.5s; }
.ind-bar-sell { height: 100%; background: var(--red); transition: width 0.5s; }

/* Overall Verdict */
.ind-verdict { grid-column: span 4; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.verdict-top { display: flex; justify-content: space-between; align-items: center; }
.verdict-label { font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); }
.verdict-side { font-family: var(--mono); font-size: 16px; font-weight: 900; letter-spacing: 0.5px; }
.verdict-bar-wrap { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border); }
.verdict-bar-buy { height: 100%; background: linear-gradient(90deg, #0a4020, var(--green)); transition: width 0.6s; border-radius: 0 4px 4px 0; }
.verdict-bar-sell { height: 100%; background: linear-gradient(90deg, var(--red), #7a1020); transition: width 0.6s; border-radius: 4px 0 0 4px; }
.verdict-labels { display: flex; justify-content: space-between; font-size: 7px; font-weight: 700; letter-spacing: 0.5px; }

/* Assets */
.ticker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); }
.asset-item { background: var(--bg-card); padding: 7px 9px; display: flex; justify-content: space-between; align-items: center; }
.asset-item:hover { background: var(--bg-hover); }
.asset-name { font-size: 10px; font-weight: 700; }
.asset-desc { font-size: 8px; color: var(--text-dim); }
.asset-price { font-family: var(--mono); font-size: 11px; font-weight: 600; text-align: right; }
.asset-chg { font-family: var(--mono); font-size: 9px; font-weight: 700; }
.asset-chg.up { color: var(--green); } .asset-chg.down { color: var(--red); }

/* News */
.news-legend { display: flex; gap: 6px; }
.legend-bull { font-size: 7px; font-weight: 800; color: var(--green); padding: 1px 4px; border: 1px solid var(--green-border); border-radius: 2px; letter-spacing: 0.5px; }
.legend-bear { font-size: 7px; font-weight: 800; color: var(--red); padding: 1px 4px; border: 1px solid var(--red-border); border-radius: 2px; letter-spacing: 0.5px; }
.news-list { max-height: 400px; overflow-y: auto; }
.news-item { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); border-left: 3px solid transparent; cursor: pointer; transition: background 0.15s; }
.news-item:hover { background: rgba(255,255,255,0.02); }
.news-item[onclick]:hover .news-title { text-decoration: underline; color: var(--gold); }
.news-item.bullish { border-left-color: var(--green); background: var(--green-bg); }
.news-item.bearish { border-left-color: var(--red); background: var(--red-bg); }
.news-impact { display: inline-block; font-size: 7px; font-weight: 800; letter-spacing: 0.5px; padding: 1px 4px; border-radius: 2px; margin-right: 3px; }
.impact-bull { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.impact-bear { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.impact-neutral { background: rgba(255,255,255,0.04); color: var(--text-dim); }
.news-time { font-size: 8px; color: var(--gold-dim); font-family: var(--mono); }
.news-title { font-size: 13px; font-weight: 600; color: var(--text-bright); line-height: 1.4; margin: 4px 0; }
.news-source { font-size: 8px; color: var(--text-dim); }
.news-tag { display: inline-block; font-size: 7px; font-weight: 800; padding: 1px 4px; border-radius: 2px; margin-right: 2px; }
.tag-fed { background: rgba(61,139,253,0.1); color: var(--blue); }
.tag-gold { background: rgba(232,184,48,0.1); color: var(--gold); }
.tag-usd { background: rgba(0,210,106,0.1); color: var(--green); }
.tag-geo { background: rgba(255,45,85,0.1); color: var(--red); }
.tag-data { background: rgba(167,139,250,0.1); color: var(--purple); }

/* DXY */
.dxy-val { font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--text-bright); }
.dxy-body { padding: 10px 12px; }
.dxy-change { font-family: var(--mono); font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.dxy-gold-signal { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); margin-bottom: 8px; }
.dxy-signal-label { font-size: 9px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.dxy-signal-badge { font-family: var(--mono); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 4px; }
.dxy-signal-badge.buy { background: rgba(48,209,88,0.15); color: var(--green); }
.dxy-signal-badge.sell { background: rgba(255,69,58,0.15); color: var(--red); }
.dxy-signal-badge.neutral { background: rgba(255,255,255,0.05); color: var(--text-dim); }
.dxy-conviction { font-family: var(--mono); font-size: 10px; font-weight: 700; margin-left: auto; }
.dxy-detail { font-size: 9px; color: var(--text-dim); line-height: 1.4; }

/* Data Grid (FRED, Yields, etc.) */
.data-grid { padding: 4px 0; }
.data-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 12px; }
.data-row:last-child { border-bottom: none; }
.data-row:hover { background: var(--bg-hover); }
.data-name { color: var(--text-dim); font-weight: 500; }
.data-val { font-family: var(--mono); font-weight: 600; color: var(--text-bright); }
.data-chg { font-family: var(--mono); font-size: 9px; font-weight: 700; min-width: 50px; text-align: right; }
.data-chg.up { color: var(--green); } .data-chg.down { color: var(--red); }
.data-date { font-size: 7px; color: var(--text-dim); font-family: var(--mono); }

/* Correlation Grid */
.corr-grid { padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.corr-cell { text-align: center; padding: 5px 3px; border-radius: 3px; }
.corr-sym { font-size: 8px; font-weight: 700; color: var(--text-dim); display: block; margin-bottom: 2px; }
.corr-val { font-family: var(--mono); font-size: 12px; font-weight: 800; }

/* Currency Strength */
.strength-grid { padding: 6px 10px; }
.str-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.str-label { width: 28px; font-size: 9px; font-weight: 800; color: var(--text-dim); }
.str-bar-wrap { flex: 1; height: 12px; background: var(--border); border-radius: 2px; position: relative; overflow: hidden; }
.str-bar { height: 100%; border-radius: 2px; transition: width 0.5s; min-width: 2px; }
.str-val { width: 36px; font-family: var(--mono); font-size: 9px; font-weight: 700; text-align: right; }

/* Sentiment */
.sentiment-container { padding: 10px; }
.gauge-wrapper { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.gauge-label { font-size: 16px; font-weight: 800; margin-top: -6px; }
.sentiment-bars { display: flex; flex-direction: column; gap: 5px; }
.sent-row { display: flex; align-items: center; gap: 5px; }
.sent-label { width: 60px; font-size: 8px; font-weight: 700; color: var(--text-dim); text-align: right; }
.sent-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; display: flex; }
.sent-bull { height: 100%; background: var(--green); transition: width 0.5s; }
.sent-bear { height: 100%; background: var(--red); transition: width 0.5s; }
.sent-val { width: 32px; font-family: var(--mono); font-size: 8px; color: var(--text-dim); }

/* COT */
.cot-container { padding: 8px 10px; }
.cot-date { font-size: 8px; color: var(--text-dim); font-family: var(--mono); }
.cot-bar { margin-bottom: 6px; }
.cot-bar:last-child { margin-bottom: 0; }
.cot-label { display: flex; justify-content: space-between; font-size: 8px; font-weight: 700; color: var(--text-dim); margin-bottom: 2px; }
.cot-track { height: 14px; background: var(--border); border-radius: 2px; overflow: hidden; display: flex; }
.cot-long { height: 100%; background: linear-gradient(90deg, #0a4020, var(--green)); display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 800; color: #000; transition: width 0.5s; }
.cot-short { height: 100%; background: linear-gradient(90deg, var(--red), #7a1020); display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 800; color: #000; transition: width 0.5s; }

/* Fear & Greed */
.fear-greed-container { padding: 10px; text-align: center; }
.fg-value { font-family: var(--mono); font-size: 36px; font-weight: 900; line-height: 1; }
.fg-label { font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin: 3px 0 8px; }
.fg-bar { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--orange), var(--gold), var(--green)); position: relative; }
.fg-marker { position: absolute; top: -4px; width: 12px; height: 12px; background: #fff; border-radius: 50%; border: 2px solid var(--bg); transform: translateX(-50%); transition: left 0.5s; }
.fg-scale { display: flex; justify-content: space-between; font-size: 7px; color: var(--text-dim); margin-top: 4px; }

/* Seasonality */
.season-grid { padding: 8px; }
.season-row { display: flex; gap: 2px; }
.season-cell { flex: 1; text-align: center; padding: 4px 2px; border-radius: 2px; }
.season-month { font-size: 7px; font-weight: 700; color: var(--text-dim); display: block; }
.season-val { font-family: var(--mono); font-size: 10px; font-weight: 800; display: block; }
.season-wr { font-size: 7px; color: var(--text-dim); }

/* Central Bank */
.cb-grid { padding: 4px 10px; }
.cb-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.015); }
.cb-row:last-child { border-bottom: none; }
.cb-name { font-size: 9px; font-weight: 700; }
.cb-rate { font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--gold); }
.cb-next { font-size: 8px; color: var(--text-dim); }
.cb-bias { font-size: 7px; font-weight: 800; padding: 1px 5px; border-radius: 2px; }
.bias-hawkish { background: rgba(255,45,85,0.1); color: var(--red); }
.bias-dovish { background: rgba(0,210,106,0.1); color: var(--green); }
.bias-neutral { background: rgba(245,158,11,0.1); color: var(--orange); }

/* Pivot Points */
.pivot-grid { padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pivot-section { display: flex; flex-direction: column; gap: 1px; }
.pivot-title { font-size: 7px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); padding: 4px 6px; text-transform: uppercase; }
.pivot-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border-radius: 2px; }
.pivot-name { font-size: 9px; font-weight: 800; width: 44px; }
.pivot-val { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--text-bright); }
.pivot-dist { font-family: var(--mono); font-size: 8px; font-weight: 700; width: 48px; text-align: right; }
.pivot-meta { grid-column: span 2; text-align: center; font-size: 8px; color: var(--text-dim); font-family: var(--mono); padding: 4px; border-top: 1px solid var(--border); }

/* Event Countdown */
.countdown-grid { padding: 4px 0; }
.cd-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.015); }
.cd-item:last-child { border-bottom: none; }
.cd-item:hover { background: var(--bg-hover); }
.cd-urgent { background: rgba(255,45,85,0.04); }
.cd-icon { font-size: 8px; font-weight: 900; background: rgba(245,158,11,0.1); color: var(--orange); padding: 4px 6px; border-radius: 3px; letter-spacing: 0.5px; min-width: 32px; text-align: center; }
.cd-urgent .cd-icon { background: rgba(255,45,85,0.1); color: var(--red); }
.cd-info { flex: 1; }
.cd-name { font-size: 10px; font-weight: 700; color: var(--text-bright); }
.cd-date { font-size: 8px; color: var(--text-dim); }
.cd-timer { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--gold); }
.cd-urgent .cd-timer { color: var(--red); animation: pulse 1.5s infinite; }

/* Session Ranges */
.session-grid { padding: 4px 0; }
.sess-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.015); }
.sess-item:last-child { border-bottom: none; }
.sess-name { font-size: 11px; font-weight: 700; color: var(--text-bright); }
.sess-time { font-family: var(--mono); font-size: 9px; color: var(--text-dim); }
.sess-status { font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.sess-active { background: rgba(0,210,106,0.03); }

/* Price Alerts */
.alerts-container { padding: 8px 10px; }
.alert-form { display: flex; gap: 0; margin-bottom: 8px; align-items: stretch; }
.alert-btn { background: var(--gold); color: #000; border: none; padding: 5px 10px; border-radius: 3px; font-size: 9px; font-weight: 800; cursor: pointer; letter-spacing: 1px; }
.alert-btn:hover { background: var(--gold-bright); }
.alert-list { display: flex; flex-direction: column; gap: 3px; }
.alert-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; background: rgba(232,184,48,0.05); border: 1px solid rgba(232,184,48,0.1); border-radius: 3px; font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--text-bright); }
.alert-triggered { background: var(--green-bg); border-color: var(--green-border); }
.alert-status { font-size: 7px; font-weight: 800; letter-spacing: 0.5px; color: var(--gold); }
.alert-triggered .alert-status { color: var(--green); }
.alert-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 10px; padding: 0 4px; }
.alert-remove:hover { color: var(--red); }

/* Trade Calculator */
.calc-container { padding: 10px; }
.calc-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.calc-row label { font-size: 9px; font-weight: 700; color: var(--text-dim); }
.calc-input { background: var(--bg); border: 1px solid var(--border); color: var(--text-bright); padding: 4px 8px; border-radius: 3px; font-family: var(--mono); font-size: 10px; width: 100px; outline: none; }
.calc-input:focus { border-color: var(--gold); }
.calc-results { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
.calc-result-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 9px; }
.calc-result-row span:first-child { color: var(--text-dim); font-weight: 600; }
.calc-val { font-family: var(--mono); font-weight: 700; color: var(--text-bright); }
.calc-note { font-size: 9px; color: var(--text-dim); text-align: center; padding: 8px; }

/* Multi-TF Charts */
.mtf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.mtf-cell { background: var(--bg-card); position: relative; }
.mtf-label { padding: 4px 8px; font-size: 8px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.008); }
.mtf-chart { height: 180px; }

/* VIX */
.vix-container { padding: 10px; text-align: center; }
.vix-current { font-family: var(--mono); font-size: 28px; font-weight: 900; line-height: 1; }
.vix-label { font-size: 9px; font-weight: 800; letter-spacing: 2px; margin: 3px 0; }
.vix-impact { font-size: 8px; font-weight: 600; margin: 4px 0; }
.vix-spark { display: block; margin: 8px auto 0; }

/* Gold vs Real Yields Overlay */
.overlay-container { padding: 10px; }
.overlay-row { display: flex; justify-content: space-around; margin-bottom: 8px; }
.overlay-item { text-align: center; }
.overlay-label { font-size: 8px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 2px; }
.overlay-val { font-family: var(--mono); font-size: 18px; font-weight: 900; }
.overlay-signal { font-size: 10px; font-weight: 800; text-align: center; margin: 6px 0; letter-spacing: 0.5px; }
.overlay-note { font-size: 8px; color: var(--text-dim); text-align: center; line-height: 1.4; font-style: italic; }

/* Multi-Timeframe Analysis */
.mtf-analysis { padding: 6px; }
.mtf-table { width: 100%; border-collapse: collapse; }
.mtf-table th { font-size: 7px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); padding: 4px 6px; text-align: center; border-bottom: 1px solid var(--border); }
.mtf-table td { font-size: 9px; font-weight: 700; padding: 4px 6px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.015); }
.mtf-table .mtf-tf { text-align: left; color: var(--text-dim); font-size: 8px; font-weight: 800; letter-spacing: 0.5px; }
.mtf-buy { color: var(--green); background: var(--green-bg); border-radius: 2px; }
.mtf-sell { color: var(--red); background: var(--red-bg); border-radius: 2px; }
.mtf-neutral { color: var(--text-dim); }
.mtf-confluence { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; margin-top: 4px; border-top: 1px solid var(--border); }
.mtf-confluence-label { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); }
.mtf-confluence-val { font-family: var(--mono); font-size: 14px; font-weight: 900; }

/* Risk Meter */
.risk-meter-container { padding: 10px; text-align: center; }
.risk-bar { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--green), var(--gold), var(--red)); position: relative; margin: 10px 0; }
.risk-marker { position: absolute; top: -4px; width: 16px; height: 16px; background: #fff; border-radius: 50%; border: 2px solid var(--bg); transform: translateX(-50%); transition: left 0.5s; }
.risk-label { font-size: 20px; font-weight: 900; font-family: var(--mono); }
.risk-desc { font-size: 9px; font-weight: 600; margin: 4px 0; }
.risk-drivers { text-align: left; margin-top: 8px; }
.risk-driver { font-size: 8px; color: var(--text-dim); padding: 2px 0; }
.risk-scale { display: flex; justify-content: space-between; font-size: 7px; font-weight: 800; letter-spacing: 0.5px; }

/* Yield Curve */
.yield-curve-container { padding: 10px; text-align: center; }
.yc-value { font-family: var(--mono); font-size: 24px; font-weight: 900; }
.yc-label { font-size: 9px; font-weight: 800; letter-spacing: 1px; margin: 3px 0; }
.yc-impact { font-size: 8px; margin: 4px 0; }
.yc-note { font-size: 7px; color: var(--text-dim); font-style: italic; line-height: 1.4; }

/* AI Brief Bar */
.ai-brief-bar {
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(232,184,48,0.03), rgba(14,14,24,0.95));
    border-bottom: 1px solid rgba(232,184,48,0.15);
    border-left: 3px solid var(--gold);
}
.ai-brief-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.ai-icon {
    font-size: 10px; font-weight: 900; color: var(--gold);
    background: rgba(232,184,48,0.1); padding: 2px 6px; border-radius: 3px;
    letter-spacing: 1px;
}
.ai-brief-title {
    font-size: 8px; font-weight: 800; letter-spacing: 2px; color: var(--text-dim);
}
.ai-brief-time {
    font-size: 7px; color: var(--text-dim); font-family: var(--mono); margin-left: auto;
}
.ai-brief-text {
    font-size: 11px; color: var(--text-bright); line-height: 1.5; font-weight: 500;
}
.ai-brief-bar.bullish { border-left-color: var(--green); }
.ai-brief-bar.bearish { border-left-color: var(--red); }

/* Trade Signals */
.card-signals { border-color: rgba(232,184,48,0.2); display: flex; flex-direction: column; }
.signals-list { max-height: 400px; overflow-y: auto; flex: 1; }
.no-signals { padding: 18px 16px; color: var(--text-dim); text-align: center; font-size: 11px; line-height: 1.55; }
.no-signals-title { color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 6px; }
.no-signals-body { color: var(--text-dim); font-size: 11px; max-width: 480px; margin: 0 auto; }
.no-signals-body strong { color: var(--gold); font-weight: 700; }
/* Signal cards — redesigned 2026-08-31. The previous rules set 7-9px type for the
   levels, timestamp and status chip, which is below a comfortable reading size, and
   floated the status bottom-right where it read as decoration rather than the single
   most important fact about a signal. */
.cot-stamp {
    font-size: 10px; color: var(--text-dim); letter-spacing: 0.02em;
    padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.cot-stamp.warn { color: var(--orange); }

/* Armed state for the two-click BUY/SELL confirm (2026-09-02). The instruction lives on the
   button rather than in a corner toast, because the toast outlived the window it described —
   it said "click again to execute" for a full second after that had stopped being true. */
.pt-dir-btn[data-armed] {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    animation: ptArmedPulse 1s ease-in-out infinite;
}
@keyframes ptArmedPulse { 0%,100% { outline-color: var(--gold); } 50% { outline-color: rgba(232,184,48,0.35); } }
.pt-confirm-hint { pointer-events: none; }

.card-unavailable {
    padding: 22px 16px; text-align: center;
    font-size: 11px; color: var(--text-dim); font-style: italic;
}
.geo-driver-none { font-size: 10px; color: var(--text-dim); margin-top: 8px; text-align: center; }
.sh-note { font-size: 9px; color: var(--text-dim); margin-top: 6px; font-style: italic; }

.sg-group {
    font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--green); padding: 10px 12px 6px; border-bottom: 1px solid var(--border);
}
.sg-group.muted { color: var(--text-dim); margin-top: 4px; }
.sg-group.empty { color: var(--text-dim); font-weight: 600; letter-spacing: 0.02em; text-transform: none; font-size: 11px; }

.sg-card {
    padding: 12px 14px 14px; border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent; transition: background 0.15s;
}
.sg-card:hover { background: var(--bg-hover); }
.sg-card.buy { border-left-color: var(--green); }
.sg-card.sell { border-left-color: var(--red); }
.sg-card.closed { opacity: 0.55; }
.sg-card.closed:hover { opacity: 0.8; }

.sg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sg-spacer { flex: 1; }
.sg-dir {
    font-size: 12px; font-weight: 900; letter-spacing: 0.08em;
    padding: 3px 10px; border-radius: 4px;
}
.sg-dir.buy { background: var(--green); color: #000; }
.sg-dir.sell { background: var(--red); color: #fff; }
.sg-pair { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.sg-conf { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-dim); }
.sg-conf strong { color: var(--text); font-weight: 700; }
.sg-conf-bar { width: 46px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.10); overflow: hidden; }
.sg-conf-bar span { display: block; height: 100%; background: var(--gold); }
.sg-age { font-size: 11px; color: var(--text-dim); }
.sg-status {
    font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
    padding: 3px 8px; border-radius: 4px;
}
.sg-status.active { background: rgba(0,210,106,0.14); color: var(--green); }
.sg-status.expired { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.sg-status.hit-tp { background: rgba(0,210,106,0.18); color: var(--green); }
.sg-status.hit-sl { background: rgba(255,45,85,0.14); color: var(--red); }

.sg-win { font-size: 11px; color: var(--text-dim); }
.sg-win strong { color: var(--text); font-family: var(--mono); font-weight: 700; }
.sg-tier {
    font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
    padding: 2px 7px; border-radius: 4px;
    background: rgba(255,255,255,0.06); color: var(--text-dim);
}
.sg-tier.tier-a { background: rgba(0,210,106,0.16); color: var(--green); }
.sg-tier.tier-b { background: rgba(232,184,48,0.16); color: var(--gold); }
.sg-tier.tier-c { background: rgba(245,158,11,0.14); color: var(--orange); }
.sg-tier.tier-d { background: rgba(255,45,85,0.14); color: var(--red); }

/* Vote split. The headline percentage is a weighted share, so a near-even tally can
   still print as 82%. Showing the raw counts keeps the number honest. */
.sg-votes { margin-bottom: 10px; }
.sg-vote-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,0.06); }
.sg-vote-bar .agree { background: var(--green); }
.sg-vote-bar .neutral { background: rgba(255,255,255,0.16); }
.sg-vote-bar .disagree { background: var(--red); }
.sg-vote-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: var(--text-dim); margin-top: 5px; }
.sg-vote-meta strong { color: var(--text); font-family: var(--mono); font-weight: 700; }
.sg-vote-label { text-transform: capitalize; font-weight: 700; }
.sg-vote-label.weak { color: var(--orange); }

.sg-context { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sg-context span {
    font-size: 10px; color: var(--text-dim); text-transform: capitalize;
    background: rgba(255,255,255,0.03); border: 1px dashed var(--border);
    border-radius: 10px; padding: 2px 8px;
}
.sg-contra {
    margin-top: 8px; font-size: 10px; line-height: 1.5; color: var(--text-dim);
    background: rgba(245,158,11,0.07); border-left: 2px solid var(--orange);
    border-radius: 4px; padding: 6px 10px;
}
.sg-contra strong { color: var(--orange); }

.sg-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border-radius: 6px; overflow: hidden; }
.sg-lvl { background: var(--bg-card); padding: 8px 10px; }
.sg-lvl-label { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.sg-lvl-price { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text-bright); }
.sg-lvl-delta { font-family: var(--mono); font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.sg-lvl.sl .sg-lvl-price, .sg-lvl.sl .sg-lvl-delta { color: var(--red); }
.sg-lvl.tp .sg-lvl-delta { color: var(--green); }
.sg-lvl.entry { background: rgba(255,255,255,0.03); }

.sg-rr { font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.sg-rr strong { color: var(--text); font-family: var(--mono); font-weight: 700; }

.sg-track-wrap { margin-top: 10px; }
.sg-track { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(255,45,85,0.30), rgba(255,255,255,0.06) 50%, rgba(0,210,106,0.30)); }
.sg-track-fill { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.sg-track-fill.up { background: rgba(0,210,106,0.55); }
.sg-track-fill.down { background: rgba(255,45,85,0.55); }
.sg-track-entry { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--text-dim); transform: translateX(-1px); }
.sg-track-now { position: absolute; top: -3px; width: 3px; height: 12px; border-radius: 2px; background: var(--gold); transform: translateX(-1.5px); box-shadow: 0 0 6px rgba(232,184,48,0.7); }
.sg-track-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10px; color: var(--text-dim); margin-top: 6px; font-family: var(--mono); }
.sg-track-meta strong { color: var(--text-bright); }
.sg-track-meta .up { color: var(--green); }
.sg-track-meta .down { color: var(--red); }

.sg-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sg-reasons span {
    font-size: 10px; color: var(--text-dim); background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: 10px; padding: 2px 8px;
}
.sg-hist {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px;
    font-size: 10px; color: var(--text-dim);
    background: rgba(168,85,247,0.06); border-left: 2px solid #a855f7;
    border-radius: 4px; padding: 6px 10px;
}
.sg-hist strong { color: var(--text-bright); font-family: var(--mono); }
.sg-hist-tag { font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #c084fc; }
.sg-hist-verdict { margin-left: auto; font-weight: 800; letter-spacing: 0.04em; }
.sg-hist.good .sg-hist-verdict { color: var(--green); }
.sg-hist.bad .sg-hist-verdict { color: var(--red); }
.sg-hist.mid .sg-hist-verdict { color: var(--orange); }

.sg-action {
    margin-top: 10px; padding: 6px 12px; font-size: 11px; font-weight: 700;
    background: transparent; color: var(--gold);
    border: 1px solid rgba(232,184,48,0.35); border-radius: 5px; cursor: pointer;
}
.sg-action:hover { background: rgba(232,184,48,0.10); }

@media (max-width: 900px) {
    .sg-levels { grid-template-columns: repeat(3, 1fr); }
    .sg-lvl-price { font-size: 13px; }
}
@media (max-width: 560px) {
    .sg-levels { grid-template-columns: repeat(2, 1fr); }
}

/* Theme Toggle */
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--text-dim); width: 28px; height: 28px; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* Light Theme */
body.light {
    --bg: #f0f0f4; --bg-card: #ffffff; --bg-hover: #f5f5f8; --border: #e0e0e8;
    --text: #333340; --text-dim: #666; --text-bright: #111;
}
body.light .top-bar { background: linear-gradient(180deg, #fff, #f8f8fc); }
body.light .ticker-tape { background: #fafafa; }
body.light .summary-banner { background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(248,248,252,0.95)); }
body.light .ai-brief-bar { background: linear-gradient(90deg, rgba(232,184,48,0.05), rgba(255,255,255,0.95)); }
body.light ::-webkit-scrollbar-track { background: #f0f0f4; }
body.light ::-webkit-scrollbar-thumb { background: #ccc; }

/* Fed Rate Probability */
.fed-rate-container { padding: 10px; }
.fed-meeting { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.015); }
.fed-meeting:last-child { border-bottom: none; }
.fed-meeting-date { font-size: 9px; font-weight: 700; color: var(--text-dim); }
.fed-meeting-prob { font-family: var(--mono); font-size: 11px; font-weight: 800; }
.fed-bar { height: 6px; border-radius: 3px; background: var(--border); margin-top: 4px; overflow: hidden; }
.fed-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.fed-bar-cut { background: var(--green); }
.fed-bar-hold { background: var(--orange); }
.fed-bar-hike { background: var(--red); }
.fed-impact { font-size: 8px; color: var(--text-dim); text-align: center; margin-top: 6px; font-style: italic; }

/* COT Chart */
.cot-chart-container { padding: 8px; }
#cotChart { width: 100%; }

/* Smart Money */
.smart-money-container { padding: 10px; }
.sm-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.015); }
.sm-row:last-child { border-bottom: none; }
.sm-label { font-size: 9px; font-weight: 700; color: var(--text-dim); }
.sm-val { font-family: var(--mono); font-size: 12px; font-weight: 800; }
.sm-divergence { text-align: center; padding: 8px; margin-top: 6px; border-radius: 4px; }
.sm-divergence.bullish { background: var(--green-bg); border: 1px solid var(--green-border); }
.sm-divergence.bearish { background: var(--red-bg); border: 1px solid var(--red-border); }
.sm-divergence.neutral { background: rgba(255,255,255,0.02); border: 1px solid var(--border); }
.sm-signal { font-size: 11px; font-weight: 800; }
.sm-note { font-size: 8px; color: var(--text-dim); margin-top: 3px; }

/* Liquidity Heatmap */
.liquidity-container { padding: 8px; }
.liq-level { display: flex; align-items: center; gap: 6px; padding: 3px 6px; margin-bottom: 2px; border-radius: 3px; }
.liq-price { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--text-bright); width: 60px; }
.liq-bar-wrap { flex: 1; height: 10px; background: var(--border); border-radius: 2px; overflow: hidden; }
.liq-bar { height: 100%; border-radius: 2px; transition: width 0.5s; }
.liq-bar.high { background: linear-gradient(90deg, var(--red), var(--orange)); }
.liq-bar.medium { background: var(--orange); }
.liq-bar.low { background: var(--gold-dim); }
.liq-score { font-family: var(--mono); font-size: 8px; font-weight: 700; color: var(--text-dim); width: 24px; text-align: right; }
.liq-tag { font-size: 7px; font-weight: 800; padding: 1px 4px; border-radius: 2px; }
.liq-tag.above { color: var(--green); background: var(--green-bg); }
.liq-tag.below { color: var(--red); background: var(--red-bg); }
.liq-tag.current { color: var(--gold); background: rgba(232,184,48,0.1); }

/* Geopolitical Risk */
.geo-risk-container { padding: 10px; text-align: center; }
.geo-value { font-family: var(--mono); font-size: 28px; font-weight: 900; }
.geo-label { font-size: 9px; font-weight: 800; letter-spacing: 2px; margin: 3px 0; }
.geo-bar { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--green), var(--gold), var(--orange), var(--red)); position: relative; margin: 8px 0; }
.geo-marker { position: absolute; top: -4px; width: 12px; height: 12px; background: #fff; border-radius: 50%; border: 2px solid var(--bg); transform: translateX(-50%); transition: left 0.5s; }
.geo-scale { display: flex; justify-content: space-between; font-size: 7px; color: var(--text-dim); font-weight: 700; }
.geo-impact { font-size: 8px; margin-top: 4px; font-style: italic; }
.geo-drivers { text-align: left; margin-top: 8px; }
.geo-driver { font-size: 8px; color: var(--text-dim); padding: 2px 0; }

/* Economic Surprise */
.eco-surprise-container { padding: 10px; text-align: center; }
.eco-value { font-family: var(--mono); font-size: 28px; font-weight: 900; }
.eco-label { font-size: 9px; font-weight: 800; letter-spacing: 2px; margin: 3px 0; }
.eco-bar { height: 6px; border-radius: 3px; background: var(--border); position: relative; margin: 8px 0; overflow: hidden; }
.eco-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; position: absolute; }
.eco-impact { font-size: 8px; margin-top: 4px; font-style: italic; }
.eco-items { text-align: left; margin-top: 8px; }
.eco-item { display: flex; justify-content: space-between; padding: 3px 0; font-size: 9px; border-bottom: 1px solid rgba(255,255,255,0.015); }
.eco-item:last-child { border-bottom: none; }

/* Futures Curve */
.futures-curve-container { padding: 10px; text-align: center; }
.fc-type { font-family: var(--mono); font-size: 16px; font-weight: 900; letter-spacing: 1px; }
.fc-spread { font-family: var(--mono); font-size: 12px; font-weight: 700; margin: 4px 0; }
.fc-visual { display: flex; justify-content: space-around; align-items: flex-end; height: 60px; margin: 10px 0; padding: 0 10px; }
.fc-bar-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.fc-bar-val { font-family: var(--mono); font-size: 8px; font-weight: 700; color: var(--text-dim); }
.fc-bar-block { width: 30px; border-radius: 2px 2px 0 0; transition: height 0.5s; }
.fc-bar-label { font-size: 7px; font-weight: 800; color: var(--text-dim); }
.fc-note { font-size: 8px; color: var(--text-dim); font-style: italic; margin-top: 4px; }

/* Shanghai Premium */
.shanghai-container { padding: 10px; text-align: center; }
.sh-premium { font-family: var(--mono); font-size: 24px; font-weight: 900; }
.sh-label { font-size: 9px; font-weight: 800; letter-spacing: 1px; margin: 3px 0; }
.sh-detail { font-size: 9px; color: var(--text-dim); margin: 4px 0; }
.sh-impact { font-size: 8px; font-style: italic; margin-top: 4px; }

/* Mining Stocks */
.mining-container { padding: 10px; }
.mining-row { display: flex; justify-content: space-around; margin-bottom: 8px; }
.mining-item { text-align: center; }
.mining-label { font-size: 8px; font-weight: 700; color: var(--text-dim); margin-bottom: 2px; }
.mining-val { font-family: var(--mono); font-size: 14px; font-weight: 800; }
.mining-divergence { text-align: center; padding: 8px; border-radius: 4px; margin-top: 4px; }
.mining-signal { font-size: 11px; font-weight: 800; }
.mining-note { font-size: 8px; color: var(--text-dim); margin-top: 3px; }

/* ===== SUPPORT & RESISTANCE ===== */
.sr-container { padding: 6px; }
.sr-section { margin-bottom: 4px; }
.sr-section-title { font-size: 7px; font-weight: 900; letter-spacing: 2px; padding: 3px 8px; }
.sr-resist-title { color: var(--red); }
.sr-support-title { color: var(--green); }
.sr-level { padding: 5px 8px; margin-bottom: 2px; border-radius: 2px; }
.sr-level-top { display: flex; align-items: center; gap: 6px; }
.sr-price { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--text-bright); }
.sr-dist { font-family: var(--mono); font-size: 8px; font-weight: 700; margin-left: auto; }
.sr-near { font-size: 6px; font-weight: 900; letter-spacing: 1px; padding: 1px 4px; border-radius: 2px; background: rgba(232,184,48,0.15); color: var(--gold); }
.sr-level-bottom { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.sr-source { font-size: 6px; font-weight: 900; letter-spacing: 0.5px; padding: 1px 4px; border-radius: 2px; background: rgba(255,255,255,0.04); }
.sr-label-text { font-size: 8px; color: var(--text-dim); font-weight: 600; }
.sr-strength { display: flex; gap: 2px; margin-left: auto; }
.sr-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.sr-dot-active { background: var(--gold); }
.sr-current-price { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; margin: 4px 0; background: rgba(232,184,48,0.08); border: 1px solid rgba(232,184,48,0.2); border-radius: 4px; }
.sr-current-label { font-size: 7px; font-weight: 900; letter-spacing: 2px; color: var(--gold); }
.sr-current-val { font-family: var(--mono); font-size: 14px; font-weight: 900; color: var(--gold-bright); }

/* ===== CORRELATION MATRIX (Heatmap) ===== */
.corr-matrix { padding: 6px 8px; }
.corr-header-row { display: grid; grid-template-columns: 1fr 50px 1fr 60px; gap: 4px; padding: 3px 8px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.corr-header-label { font-size: 7px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); }
.corr-matrix-row { display: grid; grid-template-columns: 1fr 50px 1fr 60px; gap: 4px; align-items: center; padding: 5px 8px; border-radius: 3px; margin-bottom: 1px; border-left: 3px solid transparent; }
.corr-matrix-label { display: flex; flex-direction: column; }
.corr-matrix-sym { font-size: 9px; font-weight: 800; color: var(--text-bright); }
.corr-matrix-desc { font-size: 7px; color: var(--text-dim); }
.corr-matrix-val { font-family: var(--mono); font-size: 13px; font-weight: 900; text-align: center; }
.corr-matrix-bar-wrap { height: 8px; background: var(--border); border-radius: 4px; position: relative; overflow: hidden; }
.corr-matrix-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.15); }
.corr-matrix-bar { position: absolute; top: 0; height: 100%; border-radius: 4px; transition: width 0.5s; opacity: 0.7; }
.corr-matrix-strength { font-size: 7px; font-weight: 800; letter-spacing: 0.5px; text-align: right; }
.corr-legend { display: flex; justify-content: center; gap: 12px; padding: 6px 0 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.corr-leg-item { display: flex; align-items: center; gap: 4px; font-size: 7px; font-weight: 700; color: var(--text-dim); }
.corr-leg-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ===== SEASONALITY BAR CHART ===== */
.season-chart { padding: 8px; }
.season-bars-container { }
.season-bars-row { display: flex; gap: 2px; align-items: flex-end; }
.season-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0; border-radius: 3px; }
.season-bar-current { background: rgba(232,184,48,0.08); border: 1px solid rgba(232,184,48,0.2); }
.season-bar-val { font-family: var(--mono); font-size: 8px; font-weight: 800; }
.season-bar-track { width: 100%; height: 70px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
.season-bar-zero { position: absolute; top: 50%; left: 10%; right: 10%; height: 1px; background: rgba(255,255,255,0.1); }
.season-bar-fill { width: 70%; border-radius: 2px; min-height: 4px; }
.season-bar-up { position: absolute; bottom: 50%; }
.season-bar-down { position: absolute; top: 50%; }
.season-bar-month { font-size: 7px; font-weight: 800; color: var(--text-dim); letter-spacing: 0.5px; }
.season-bar-month-active { color: var(--gold-bright); font-weight: 900; }
.season-bar-wr { font-size: 7px; font-weight: 700; font-family: var(--mono); }
.season-bar-legend { display: flex; justify-content: center; gap: 10px; padding: 6px 0 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.season-bar-legend-item { font-size: 7px; color: var(--text-dim); font-weight: 600; }

/* Alert Flash Animation */
.alert-flash { animation: alertFlash 0.5s ease-in-out 3; }
@keyframes alertFlash {
    0%, 100% { background: transparent; }
    50% { background: rgba(0,210,106,0.15); }
}

/* ===== PAPER TRADING ===== */
.pt-container { padding: 8px; }
.pt-balance-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pt-balance-item { flex: 1; background: rgba(232,184,48,0.04); border: 1px solid rgba(232,184,48,0.1); border-radius: 6px; padding: 8px 10px; text-align: center; }
.pt-balance-label { display: block; font-size: 7px; font-weight: 900; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 2px; }
.pt-balance-val { font-family: var(--mono); font-size: 16px; font-weight: 800; color: var(--gold-bright); }
.pt-stats-row { display: flex; justify-content: space-around; margin-bottom: 10px; padding: 6px; background: rgba(255,255,255,0.02); border-radius: 4px; }
.pt-stat { text-align: center; }
.pt-stat-label { display: block; font-size: 7px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-dim); }
.pt-stat-val { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--text); }
.pt-form { margin-bottom: 8px; padding: 8px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 6px; }
.pt-form-row { display: flex; gap: 6px; margin-bottom: 6px; }
.pt-input { flex: 1; font-size: 10px; }
.pt-dir-toggle { display: flex; gap: 0; }
.pt-dir-btn { padding: 5px 12px; font-size: 9px; font-weight: 900; letter-spacing: 1px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); cursor: pointer; transition: all 0.2s; }
.pt-dir-long { border-radius: 4px 0 0 4px; }
.pt-dir-short { border-radius: 0 4px 4px 0; }
.pt-dir-long.active { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.pt-dir-short.active { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.pt-open-btn { width: 100%; padding: 7px; font-size: 10px; font-weight: 900; letter-spacing: 1px; background: linear-gradient(135deg, rgba(232,184,48,0.15), rgba(232,184,48,0.05)); border: 1px solid rgba(232,184,48,0.3); color: var(--gold); border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.pt-open-btn:hover { background: linear-gradient(135deg, rgba(232,184,48,0.25), rgba(232,184,48,0.1)); }
.pt-empty { text-align: center; padding: 10px; font-size: 9px; color: var(--text-dim); }
.pt-trade-row, .pt-hist-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-bottom: 1px solid var(--border); font-size: 9px; }
.pt-trade-dir { font-weight: 900; font-size: 8px; letter-spacing: 0.5px; min-width: 36px; }
.pt-journal-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 3px; cursor: pointer; font-size: 8px; font-weight: 700; letter-spacing: 0.5px; color: #fff; padding: 3px 8px; line-height: 1; transition: all 0.2s; white-space: nowrap; }
.pt-journal-btn:hover { background: rgba(232,184,48,0.15); border-color: var(--gold); color: var(--gold); }
.pt-open-trade { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 11px; }
.pt-trade-info { display: flex; align-items: center; gap: 4px; flex: 1; font-family: var(--mono); color: var(--text-dim); font-size: 11px; }
.pt-trade-dir { font-weight: 800; }
.pt-trade-dir.long { color: var(--green); }
.pt-trade-dir.short { color: var(--red); }
.pt-trade-size { color: var(--text-dim); }
.pt-trade-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pt-trade-pnl { font-family: var(--mono); font-weight: 700; font-size: 12px; min-width: 70px; text-align: right; }
.pt-trade-time { font-size: 8px; color: var(--text-dim); min-width: 70px; text-align: right; }
.pt-close-btn { padding: 4px 10px; font-size: 10px; font-weight: 800; background: var(--red); color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.pt-close-btn:hover { opacity: 0.8; }
.pt-history-header { font-size: 8px; font-weight: 900; letter-spacing: 1px; color: var(--text-dim); padding: 8px 6px 4px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ===== TRADE JOURNAL ===== */
.journal-container { padding: 8px; }
.journal-form { margin-bottom: 10px; }
.journal-textarea { width: 100%; min-height: 50px; padding: 8px; font-family: var(--font); font-size: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text); resize: vertical; margin-bottom: 6px; }
.journal-textarea:focus { outline: none; border-color: var(--gold-dim); }
.journal-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.journal-tag-btn { font-size: 8px; font-weight: 700; padding: 3px 8px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; transition: all 0.2s; }
.journal-tag-btn.active { background: rgba(232,184,48,0.1); border-color: var(--gold-dim); color: var(--gold); }
.journal-tag-btn:hover { border-color: var(--gold-dim); }
.journal-rating-row { display: flex; align-items: center; gap: 8px; }
.journal-rating-label { font-size: 8px; font-weight: 800; color: var(--text-dim); }
.journal-stars { display: flex; gap: 2px; }
.journal-star { font-size: 16px; color: var(--text-dim); cursor: pointer; transition: color 0.15s; }
.journal-star.active { color: var(--gold); }
.journal-star:hover { color: var(--gold-bright); }
.journal-add-btn { margin-left: auto; padding: 5px 14px; font-size: 9px; font-weight: 900; letter-spacing: 0.5px; background: linear-gradient(135deg, rgba(232,184,48,0.15), rgba(232,184,48,0.05)); border: 1px solid rgba(232,184,48,0.3); color: var(--gold); border-radius: 4px; cursor: pointer; }
.journal-add-btn:hover { background: linear-gradient(135deg, rgba(232,184,48,0.25), rgba(232,184,48,0.1)); }
.journal-empty { text-align: center; padding: 12px; font-size: 9px; color: var(--text-dim); }
.journal-entry { padding: 8px; border-bottom: 1px solid var(--border); }
.journal-entry-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.journal-entry-time { font-size: 8px; color: var(--text-dim); }
.journal-star-sm { font-size: 10px; color: var(--text-dim); }
.journal-star-sm.active { color: var(--gold); }
.journal-entry-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 3px; }
.journal-pill { font-size: 7px; font-weight: 700; padding: 1px 6px; border-radius: 8px; border: 1px solid; }
.journal-entry-notes { font-size: 9px; color: var(--text); line-height: 1.4; }

/* ===== LEADERBOARD ===== */
.lb-container { padding: 6px; }
.lb-empty { text-align: center; padding: 16px; font-size: 9px; color: var(--text-dim); }
.lb-header-row { display: flex; align-items: center; gap: 4px; padding: 4px 6px; font-size: 7px; font-weight: 900; letter-spacing: 0.5px; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.lb-row { display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 9px; transition: background 0.2s; }
.lb-row:hover { background: rgba(255,255,255,0.02); }
.lb-row-you { background: rgba(232,184,48,0.05); border-left: 2px solid var(--gold); }
.lb-rank { min-width: 28px; font-weight: 900; font-size: 10px; }
.lb-name { flex: 1; font-weight: 600; color: var(--text-bright); }
.lb-pnl { font-family: var(--mono); font-weight: 700; font-size: 10px; min-width: 60px; text-align: right; }
.lb-wr { font-family: var(--mono); font-size: 9px; color: var(--text-dim); min-width: 36px; text-align: right; }
.lb-trades { font-family: var(--mono); font-size: 9px; color: var(--text-dim); min-width: 20px; text-align: right; }

/* ===== ETF FLOW TRACKER ===== */
.etf-flows-container { padding: 0; }
.etf-flow-item { padding: 10px; border-bottom: 1px solid var(--border); }
.etf-flow-item:last-child { border-bottom: none; }
.etf-flow-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.etf-flow-ticker { font-family: var(--mono); font-size: 14px; font-weight: 900; color: var(--gold); }
.etf-flow-name { font-size: 8px; color: var(--text-dim); font-weight: 600; }
.etf-flow-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.etf-price-val { font-family: var(--mono); font-size: 16px; font-weight: 800; color: var(--text-bright); }
.etf-price-chg { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.etf-flow-vol { margin-bottom: 6px; }
.etf-vol-label { font-size: 9px; color: var(--text); margin-bottom: 3px; }
.etf-vol-bar-wrap { position: relative; height: 6px; background: var(--border); border-radius: 3px; overflow: visible; }
.etf-vol-bar { height: 100%; border-radius: 3px; transition: width 0.5s; }
.etf-vol-avg { position: absolute; top: -2px; width: 2px; height: 10px; background: var(--text-dim); transform: translateX(-50%); }
.etf-flow-direction { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 11px; letter-spacing: 1px; }
.etf-flow-icon { font-size: 10px; }
.etf-flow-label { font-size: 10px; }
.etf-flow-strength { font-family: var(--mono); font-size: 10px; opacity: 0.7; }

/* ===== ENHANCED ECONOMIC CALENDAR ===== */
.cal-next-event { padding: 10px; background: linear-gradient(135deg, rgba(232,184,48,0.06), rgba(232,184,48,0.02)); border-bottom: 1px solid var(--border); text-align: center; }
.cal-next-label { font-size: 7px; font-weight: 900; letter-spacing: 2px; color: var(--gold-dim); }
.cal-next-name { font-size: 12px; font-weight: 800; color: var(--gold); margin: 2px 0; }
.cal-next-timer { font-family: var(--mono); font-size: 18px; font-weight: 900; color: var(--gold-bright); letter-spacing: 1px; }
.cd-gold-note { font-size: 7px; color: var(--orange); font-style: italic; margin-top: 2px; line-height: 1.3; }
.cd-impact-badge { font-size: 7px; font-weight: 900; letter-spacing: 1px; text-align: right; margin-top: 2px; }

/* ===== OPTIONS FLOW ===== */
.options-flow-container { padding: 10px; text-align: center; }
.opt-pcr-display { margin-bottom: 8px; }
.opt-pcr-val { font-family: var(--mono); font-size: 32px; font-weight: 900; color: var(--text-bright); }
.opt-pcr-label { font-size: 8px; font-weight: 800; letter-spacing: 2px; color: var(--text-dim); }
.opt-gauge-wrap { margin: 8px 0; }
.opt-gauge-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--green), var(--gold), var(--orange), var(--red)); }
.opt-gauge-marker { position: absolute; top: -4px; width: 14px; height: 14px; background: #fff; border-radius: 50%; border: 2px solid var(--bg); transform: translateX(-50%); transition: left 0.5s; box-shadow: 0 0 6px rgba(255,255,255,0.3); }
.opt-gauge-labels { display: flex; justify-content: space-between; font-size: 7px; font-weight: 700; margin-top: 3px; }
.opt-sentiment { display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: 2px; padding: 4px 12px; border-radius: 4px; margin: 8px 0; border: 1px solid currentColor; }
.opt-details { text-align: left; margin: 8px 0; }
.opt-detail-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.02); font-size: 10px; }
.opt-detail-label { color: var(--text-dim); font-weight: 600; }
.opt-detail-val { font-family: var(--mono); font-weight: 700; color: var(--text-bright); }
.opt-oi-section { margin-top: 8px; }
.opt-oi-label { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 4px; }
.opt-oi-bar { display: flex; height: 20px; border-radius: 4px; overflow: hidden; font-size: 8px; font-weight: 800; letter-spacing: 0.5px; }
.opt-oi-calls { background: rgba(0,210,106,0.2); color: var(--green); display: flex; align-items: center; justify-content: center; transition: width 0.5s; }
.opt-oi-puts { background: rgba(255,45,85,0.2); color: var(--red); display: flex; align-items: center; justify-content: center; transition: width 0.5s; }

/* ===== SENTIMENT SCANNER ===== */
.sentiment-scanner-container { padding: 10px; text-align: center; }
.sent-score-display { margin-bottom: 6px; }
.sent-score-val { font-family: var(--mono); font-size: 32px; font-weight: 900; }
.sent-score-label { font-size: 9px; font-weight: 900; letter-spacing: 2px; }
.sent-gauge-wrap { margin: 8px 0; }
.sent-gauge-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--red), var(--orange), var(--gold), var(--green)); }
.sent-gauge-marker { position: absolute; top: -4px; width: 14px; height: 14px; background: #fff; border-radius: 50%; border: 2px solid var(--bg); transform: translateX(-50%); transition: left 0.5s; box-shadow: 0 0 6px rgba(255,255,255,0.3); }
.sent-gauge-labels { display: flex; justify-content: space-between; font-size: 7px; font-weight: 700; margin-top: 3px; }
.sent-pct-bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; font-size: 9px; font-weight: 800; }
.sent-pct-bull { background: rgba(0,210,106,0.2); color: var(--green); display: flex; align-items: center; justify-content: center; transition: width 0.5s; }
.sent-pct-neutral { background: rgba(255,255,255,0.04); color: var(--text-dim); display: flex; align-items: center; justify-content: center; transition: width 0.5s; }
.sent-pct-bear { background: rgba(255,45,85,0.2); color: var(--red); display: flex; align-items: center; justify-content: center; transition: width 0.5s; }
.sent-pct-labels { display: flex; justify-content: space-between; font-size: 7px; font-weight: 700; color: var(--text-dim); }
.sent-analyzed { font-size: 8px; color: var(--text-dim); margin: 6px 0; font-style: italic; }
.sent-headlines-section { text-align: left; margin-top: 6px; }
.sent-hl-label { font-size: 7px; font-weight: 900; letter-spacing: 1.5px; margin-bottom: 3px; }
.sent-hl-item { font-size: 9px; padding: 4px 6px; margin-bottom: 2px; border-radius: 3px; line-height: 1.3; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sent-hl-bull { background: var(--green-bg); border-left: 2px solid var(--green); }
.sent-hl-bear { background: var(--red-bg); border-left: 2px solid var(--red); }

/* ===== TRADE IDEAS ===== */
.card-trade-ideas { border-color: rgba(232,184,48,0.15); }
.ideas-list { max-height: 450px; overflow-y: auto; }
.no-ideas { padding: 20px; text-align: center; font-size: 10px; color: var(--text-dim); }
.idea-item { padding: 8px 10px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.idea-item:hover { background: var(--bg-hover); }
.idea-item.long { border-left-color: var(--green); background: var(--green-bg); }
.idea-item.short { border-left-color: var(--red); background: var(--red-bg); }
.idea-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.idea-dir { font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.idea-type-badge { font-size: 7px; font-weight: 800; letter-spacing: 0.5px; padding: 1px 5px; border-radius: 2px; background: rgba(255,255,255,0.05); color: var(--text-dim); }
.idea-confidence { font-size: 10px; margin-left: auto; letter-spacing: 1px; }
.idea-title { font-size: 11px; font-weight: 700; color: var(--text-bright); line-height: 1.3; }
.idea-levels { display: flex; gap: 8px; margin: 4px 0; font-size: 9px; font-family: var(--mono); }
.idea-levels span { color: var(--text-dim); }
.idea-levels strong { color: var(--text-bright); }
.idea-rationale { font-size: 8px; color: var(--text-dim); line-height: 1.3; font-style: italic; }
.idea-time { font-size: 7px; color: var(--text-dim); font-family: var(--mono); margin-top: 3px; }

/* ===== GOLD ACADEMY ===== */
.card-academy { border-color: rgba(167,139,250,0.15); }
.academy-container { max-height: 500px; overflow-y: auto; }
.academy-categories { display: flex; gap: 3px; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.academy-cat-btn { background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-dim); padding: 3px 8px; border-radius: 3px; font-size: 8px; font-weight: 700; cursor: pointer; letter-spacing: 0.5px; }
.academy-cat-btn:hover { border-color: var(--purple); color: var(--purple); }
.academy-cat-btn.active { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.3); color: var(--purple); }
.academy-list { display: flex; flex-direction: column; }
.academy-item { display: flex; align-items: center; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.015); cursor: pointer; }
.academy-item:hover { background: var(--bg-hover); }
.academy-item.academy-read { opacity: 0.6; }
.academy-item-left { display: flex; align-items: center; gap: 8px; }
.academy-icon { font-size: 10px; color: var(--purple); min-width: 16px; text-align: center; }
.academy-read .academy-icon { color: var(--green); }
.academy-item-title { font-size: 10px; font-weight: 700; color: var(--text-bright); line-height: 1.3; }
.academy-item-meta { display: flex; gap: 6px; margin-top: 2px; align-items: center; }
.academy-diff { font-size: 7px; font-weight: 800; letter-spacing: 0.5px; padding: 1px 5px; border-radius: 2px; }
.academy-dur { font-size: 7px; color: var(--text-dim); font-family: var(--mono); }
.academy-cat-label { font-size: 7px; color: var(--text-dim); font-style: italic; }
.academy-back { padding: 6px 10px; font-size: 9px; font-weight: 700; color: var(--purple); cursor: pointer; border-bottom: 1px solid var(--border); }
.academy-back:hover { background: var(--bg-hover); }
.academy-lesson-header { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.academy-lesson-title { font-size: 12px; font-weight: 800; color: var(--text-bright); }
.academy-lesson-meta { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.academy-lesson-body { padding: 10px 12px; font-size: 10px; color: var(--text); line-height: 1.6; }
.academy-lesson-body h3 { font-size: 10px; font-weight: 800; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin: 12px 0 6px; }
.academy-lesson-body h3:first-child { margin-top: 0; }
.academy-lesson-body p { margin-bottom: 8px; }
.academy-lesson-body strong { color: var(--text-bright); }

/* ===== STRATEGY BACKTESTER ===== */
.card-backtester { border-color: rgba(61,139,253,0.15); }
.bt-container { padding: 10px; }
.bt-controls { display: flex; flex-direction: column; gap: 12px; }
.bt-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bt-row label { font-size: 13px; font-weight: 600; color: var(--text-dim); min-width: 70px; }
.bt-row select { min-height: 48px; font-size: 14px; padding: 12px 14px; outline: none; }
.bt-row select:focus { border-color: var(--gold); box-shadow: none; outline: none; }
.bt-run-btn { background: var(--gold); color: #000; border: none; padding: 14px 20px; border-radius: 8px; font-size: 14px; font-weight: 800; letter-spacing: 1px; cursor: pointer; margin-top: 6px; width: 100%; }
.bt-run-btn:hover { opacity: 0.9; }
.bt-run-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bt-results { margin-top: 10px; }
.bt-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.bt-stat { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 3px; padding: 6px 8px; text-align: center; }
.bt-stat-label { font-size: 7px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-dim); display: block; }
.bt-stat-val { font-family: var(--mono); font-size: 13px; font-weight: 800; color: var(--text-bright); display: block; margin-top: 2px; }
.bt-equity-title, .bt-trades-title { font-size: 7px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); margin: 10px 0 4px; }
.bt-equity { display: flex; align-items: flex-end; gap: 2px; height: 44px; padding: 2px 0; border-bottom: 1px solid var(--border); }
.bt-eq-bar { flex: 1; border-radius: 1px 1px 0 0; min-width: 3px; transition: height 0.3s; }
.bt-trades { display: flex; flex-direction: column; }
.bt-trade-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; font-size: 8px; font-family: var(--mono); border-bottom: 1px solid rgba(255,255,255,0.015); }
.bt-trade-date { color: var(--text-dim); width: 60px; }
.bt-trade-entry, .bt-trade-exit { color: var(--text); width: 45px; text-align: right; }
.bt-trade-pnl { font-weight: 800; width: 50px; text-align: right; }

/* Trial Banner */
.trial-banner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; background: linear-gradient(90deg, rgba(232,184,48,0.15), rgba(232,184,48,0.05)); border-bottom: 1px solid rgba(232,184,48,0.3); font-size: 13px; color: var(--text); z-index: 1000; }
.trial-upgrade-btn { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; padding: 5px 16px; background: var(--gold); color: #000; border-radius: 4px; text-decoration: none; transition: opacity 0.2s; }
.trial-upgrade-btn:hover { opacity: 0.85; }

/* Upgrade Overlay */
.upgrade-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.upgrade-modal { background: var(--bg-card); border: 1px solid rgba(232,184,48,0.3); border-radius: 12px; padding: 40px 48px; max-width: 460px; text-align: center; }
.upgrade-icon { font-size: 36px; color: var(--gold); margin-bottom: 12px; }
.upgrade-modal h2 { font-size: 22px; font-weight: 800; color: var(--text); margin: 0 0 12px; }
.upgrade-modal p { font-size: 14px; color: var(--text-dim); line-height: 1.5; margin: 0 0 24px; }
.upgrade-btn { display: inline-block; padding: 12px 36px; background: linear-gradient(135deg, #e8b830, #d4a017); color: #000; font-size: 15px; font-weight: 800; letter-spacing: 0.5px; border-radius: 6px; text-decoration: none; transition: opacity 0.2s; }
.upgrade-btn:hover { opacity: 0.9; }
.upgrade-features { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.upgrade-feat { font-size: 13px; color: var(--green); }

/* ===== CHAT SUPPORT WIDGET ===== */
.chat-widget { position: fixed; bottom: 20px; right: 20px; width: 340px; z-index: 9999; font-family: var(--font); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.6); border: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg); }
.chat-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg-card); cursor: pointer; user-select: none; border-bottom: 1px solid var(--border); }
.chat-header-icon { color: var(--gold); font-size: 16px; }
.chat-header-title { font-size: 13px; font-weight: 700; color: var(--text); flex: 1; letter-spacing: 0.5px; text-transform: uppercase; }
.chat-header-badge { background: var(--red, #ff5f57); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.chat-header-toggle { color: var(--text-dim); font-size: 12px; transition: transform 0.2s; }
.chat-widget.open .chat-header-toggle { transform: rotate(180deg); }
.chat-body { display: flex; flex-direction: column; height: 380px; background: var(--bg); }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; word-wrap: break-word; }
.chat-bubble.bot { align-self: flex-start; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-bubble.user { align-self: flex-end; background: linear-gradient(135deg, rgba(232,184,48,0.2), rgba(232,184,48,0.1)); color: var(--gold); border: 1px solid rgba(232,184,48,0.25); border-bottom-right-radius: 4px; }
.chat-bubble.admin { align-self: flex-start; background: rgba(91,141,239,0.1); color: var(--blue, #5b8def); border: 1px solid rgba(91,141,239,0.2); border-bottom-left-radius: 4px; }
.chat-bubble .chat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; opacity: 0.6; }
.chat-bubble.bot .chat-label { color: var(--text-dim); }
.chat-bubble.admin .chat-label { color: var(--blue, #5b8def); }
.chat-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--bg-card); }
.chat-input { flex: 1; background: var(--bg, #080810); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; color: var(--text); font-size: 12.5px; font-family: var(--font); outline: none; }
.chat-input:focus { border-color: var(--gold); }
.chat-input::placeholder { color: var(--text-dim); }
.chat-send-btn { background: var(--gold); color: #000; border: none; border-radius: 8px; width: 36px; height: 36px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s; }
.chat-send-btn:hover { opacity: 0.85; }
.chat-escalate-btn { display: inline-block; margin-top: 6px; padding: 6px 14px; background: rgba(232,184,48,0.15); color: var(--gold); border: 1px solid rgba(232,184,48,0.25); border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.chat-escalate-btn:hover { background: rgba(232,184,48,0.25); }
.chat-email-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.chat-email-form input { background: var(--bg, #080810); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; color: var(--text); font-size: 12px; font-family: var(--font); }
.chat-email-form button { padding: 6px 14px; background: var(--gold); color: #000; border: none; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; }
@media (max-width: 500px) { .chat-widget { width: calc(100vw - 24px); right: 12px; bottom: 12px; } .chat-body { height: 350px; } }

/* ===== ONBOARDING TUTORIAL ===== */
.onboarding-overlay { position: fixed; inset: 0; background: rgba(8,8,16,0.97); backdrop-filter: blur(20px); z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: obFadeIn 0.4s ease; }
@keyframes obFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ob-fade-out { animation: obFadeOut 0.4s ease forwards; }
@keyframes obFadeOut { from { opacity: 1; } to { opacity: 0; } }
.ob-progress { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,0.05); }
.ob-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 0.4s ease; border-radius: 0 2px 2px 0; }
.ob-skip { position: absolute; top: 20px; right: 24px; background: none; border: 1px solid rgba(255,255,255,0.1); color: var(--text-dim); padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font); transition: all 0.2s; }
.ob-skip:hover { border-color: var(--gold); color: var(--gold); }
.ob-content { max-width: 680px; width: 90%; text-align: center; padding: 0 20px; max-height: 70vh; overflow-y: auto; }
.ob-title { font-size: 32px; font-weight: 900; color: var(--text-bright); margin: 0 0 8px; letter-spacing: -0.5px; }
.ob-subtitle { font-size: 16px; font-weight: 600; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; margin: 0 0 16px; }
.ob-desc { font-size: 15px; color: var(--text); line-height: 1.7; margin: 0 0 24px; }
.ob-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; margin: 0 0 24px; }
.ob-feat { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text); padding: 8px 12px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 6px; line-height: 1.4; }
.ob-feat-check { color: var(--green); font-weight: 800; min-width: 14px; margin-top: 1px; }
.ob-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0; }
.ob-badge { padding: 6px 14px; background: rgba(99,132,255,0.08); border: 1px solid rgba(99,132,255,0.15); border-radius: 20px; font-size: 11px; font-weight: 700; color: #6384ff; letter-spacing: 0.5px; }
.ob-data-trust { font-size: 11px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; margin-top: 12px; }
.ob-visual-welcome { margin-bottom: 24px; }
.ob-gold-icon { font-size: 56px; color: var(--gold); margin-bottom: 12px; filter: drop-shadow(0 0 20px rgba(232,184,48,0.4)); }
.ob-pulse { animation: obPulse 2s ease-in-out infinite; }
@keyframes obPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.ob-brand { font-size: 40px; font-weight: 900; color: var(--gold-bright); letter-spacing: -1px; margin-bottom: 4px; }
.ob-brand span { color: var(--text-dim); font-weight: 400; }
.ob-tagline { font-size: 14px; color: var(--text-dim); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 16px; }
.ob-visual-inst { margin-bottom: 20px; }
.ob-inst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob-inst-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 16px 12px; text-align: center; transition: border-color 0.2s; }
.ob-inst-card:hover { border-color: var(--gold); }
.ob-inst-logo { font-size: 18px; font-weight: 900; color: var(--gold); margin-bottom: 6px; letter-spacing: 1px; }
.ob-inst-name { font-size: 12px; font-weight: 700; color: var(--text-bright); margin-bottom: 4px; }
.ob-inst-desc { font-size: 10px; color: var(--text-dim); line-height: 1.3; }
.ob-visual-exp { margin-bottom: 20px; }
.ob-exp-cards { display: flex; gap: 14px; justify-content: center; }
.ob-exp-card { background: rgba(255,255,255,0.03); border: 2px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 20px 18px; width: 170px; text-align: center; cursor: pointer; transition: all 0.25s; }
.ob-exp-card:hover { border-color: rgba(232,184,48,0.3); transform: translateY(-3px); background: rgba(232,184,48,0.04); }
.ob-exp-card.selected { border-color: var(--gold); background: rgba(232,184,48,0.08); box-shadow: 0 0 20px rgba(232,184,48,0.15); }
.ob-visual-start { margin-bottom: 20px; }

/* Helper tips (info icons) */
.helper-tip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(232,184,48,0.4); color: var(--gold); margin-left: 8px; cursor: pointer; transition: all 0.2s; vertical-align: middle; flex-shrink: 0; font-size: 11px; font-weight: 800; font-style: italic; font-family: Georgia, serif; line-height: 1; }
.helper-tip:hover { background: var(--gold); color: #000; border-color: var(--gold); transform: scale(1.1); }

/* Tab info icons */
.tab-info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid rgba(232,184,48,0.3); color: var(--gold); margin-left: 4px; cursor: pointer; transition: all 0.2s; vertical-align: middle; font-size: 10px; font-weight: 800; font-style: italic; font-family: Georgia, serif; line-height: 1; }
.tab-info:hover { background: var(--gold); color: #000; border-color: var(--gold); }
.ob-trial-label { font-size: 20px; font-weight: 900; color: var(--gold); letter-spacing: 3px; margin-top: 12px; }
.ob-visual-default { margin-bottom: 20px; }
.ob-visual-icon { font-size: 48px; color: var(--gold); filter: drop-shadow(0 0 16px rgba(232,184,48,0.3)); }
.ob-nav { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.1); transition: all 0.3s; }
.ob-dot.active { background: var(--gold); transform: scale(1.2); }
.ob-back, .ob-next { background: none; border: 1px solid rgba(255,255,255,0.1); color: var(--text); padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font); transition: all 0.2s; }
.ob-back:hover { border-color: var(--text-dim); }
.ob-next { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: #000; border: none; font-weight: 800; letter-spacing: 0.5px; }
.ob-next:hover { opacity: 0.9; }

/* ===== Onboarding: experience slide (2026-08-29) =====
   Next used to look fully enabled while silently doing nothing when no card was
   chosen, so onboarding appeared frozen on slide 2. "Intermediate" is now the base
   selection, marked with this badge, so the slide is never a dead end. */
.ob-exp-card { position: relative; }
.ob-exp-default { margin-top: 10px; font-size: 9px; font-weight: 800; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--gold); opacity: 0; transition: opacity 0.2s; }
.ob-exp-card.selected .ob-exp-default { opacity: 0.75; }
@media (max-width: 640px) { .ob-features { grid-template-columns: 1fr; } .ob-inst-grid { grid-template-columns: 1fr 1fr; } .ob-title { font-size: 24px; } .ob-brand { font-size: 30px; } }

/* ===== INSTANT MARKET ALERTS ===== */
.instant-alert { position: fixed; top: 60px; right: 20px; width: 380px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; z-index: 99998; box-shadow: 0 8px 32px rgba(0,0,0,0.6); animation: iaSlideIn 0.4s ease; border-left: 4px solid var(--gold); }
.instant-alert-fed { border-left-color: #a78bfa; }
.instant-alert-event { border-left-color: var(--blue); }
.instant-alert-spike { border-left-color: var(--orange); }
@keyframes iaSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.ia-fade-out { animation: iaFadeOut 0.5s ease forwards; }
@keyframes iaFadeOut { to { transform: translateX(100%); opacity: 0; } }
.ia-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ia-icon { font-size: 16px; }
.ia-label { font-size: 12px; font-weight: 800; color: var(--gold); letter-spacing: 0.5px; flex: 1; }
.instant-alert-fed .ia-label { color: #a78bfa; }
.instant-alert-event .ia-label { color: var(--blue); }
.instant-alert-spike .ia-label { color: var(--orange); }
.ia-time { font-size: 9px; color: var(--text-dim); font-family: var(--mono); }
.ia-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 2px; }
.ia-close:hover { color: var(--text); }
.ia-message { font-size: 12px; color: var(--text); line-height: 1.5; }

/* ===== SECTION TITLE BAR ===== */
.section-title-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; background: rgba(255,255,255,0.02); border-radius: 8px; font-size: 13px; font-weight: 700; }
.section-title-icon { font-size: 14px; }
.section-title-text { font-size: 10px; font-weight: 900; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; }
.ecal-logos { display: flex; gap: 6px; margin-left: auto; }
.ecal-logo-badge { padding: 3px 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; font-size: 9px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.3px; }

/* ===== COMEX WAREHOUSE ===== */
.comex-container { padding: 10px; }
.comex-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.comex-item { text-align: center; padding: 8px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 4px; }
.comex-label { font-size: 7px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 2px; }
.comex-val { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-bright); }
.comex-change { font-family: var(--mono); font-size: 9px; font-weight: 700; margin-top: 2px; }
.comex-change.up { color: var(--green); }
.comex-change.down { color: var(--red); }
.comex-ratio { font-size: 9px; color: var(--gold); font-weight: 700; margin-top: 2px; }
.comex-bar-section { margin-bottom: 8px; }
.comex-bar-label { font-size: 8px; font-weight: 700; color: var(--text-dim); margin-bottom: 3px; }
.comex-bar-track { height: 10px; background: rgba(255,45,85,0.15); border-radius: 3px; overflow: hidden; }
.comex-bar-reg { height: 100%; background: var(--green); border-radius: 3px 0 0 3px; transition: width 0.5s; }
.comex-delivery { display: flex; justify-content: space-between; font-size: 9px; padding: 4px 0; border-top: 1px solid var(--border); }
.comex-updated { font-size: 7px; color: var(--text-dim); font-style: italic; margin-top: 6px; }

/* ===== LBMA GOLD FIX ===== */
.lbma-container { padding: 10px; }
.lbma-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.lbma-item { text-align: center; padding: 8px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 4px; }
.lbma-label { font-size: 7px; font-weight: 800; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 2px; }
.lbma-val { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text-bright); }
.lbma-val.up { color: var(--green); }
.lbma-val.down { color: var(--red); }
.lbma-time { font-size: 8px; color: var(--text-dim); margin-top: 2px; }
.lbma-pct { font-family: var(--mono); font-size: 9px; font-weight: 700; }
.lbma-pct.up { color: var(--green); }
.lbma-pct.down { color: var(--red); }
.lbma-history-label { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 4px; }
.lbma-hist-row { display: flex; justify-content: space-between; font-size: 9px; font-family: var(--mono); padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.02); }
.lbma-hist-date { color: var(--text-dim); }
.lbma-hist-am, .lbma-hist-pm { color: var(--text); }

/* ===== DISAGGREGATED COT ===== */
.dcot-container { padding: 10px; }
.dcot-category { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.dcot-category:last-of-type { border-bottom: none; }
.dcot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dcot-name { font-size: 10px; font-weight: 800; letter-spacing: 0.5px; }
.dcot-net { font-family: var(--mono); font-size: 10px; font-weight: 700; }
.dcot-net.up { color: var(--green); }
.dcot-net.down { color: var(--red); }
.dcot-bar-track { height: 8px; background: rgba(255,45,85,0.12); border-radius: 2px; overflow: hidden; margin-bottom: 3px; }
.dcot-bar-long { height: 100%; border-radius: 2px 0 0 2px; transition: width 0.5s; }
.dcot-labels { display: flex; justify-content: space-between; font-size: 8px; font-family: var(--mono); }
.dcot-long { color: var(--green); }
.dcot-short { color: var(--red); }
.dcot-change { font-size: 8px; font-family: var(--mono); font-weight: 700; margin-top: 2px; }
.dcot-change.up { color: var(--green); }
.dcot-change.down { color: var(--red); }
.dcot-date { font-size: 7px; color: var(--text-dim); font-style: italic; margin-top: 6px; }

/* ===== GOLD LEASE RATES ===== */
.lease-container { padding: 10px; }
.lease-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.lease-item { text-align: center; padding: 8px 4px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 4px; }
.lease-tenor { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 2px; }
.lease-rate { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-bright); }
.lease-rate.negative { color: var(--red); }
.lease-change { font-family: var(--mono); font-size: 8px; font-weight: 700; margin-top: 2px; }
.lease-change.up { color: var(--green); }
.lease-change.down { color: var(--red); }
.lease-gofo { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: rgba(232,184,48,0.05); border: 1px solid rgba(232,184,48,0.1); border-radius: 4px; margin-bottom: 6px; }
.lease-gofo .lease-label { font-size: 9px; font-weight: 700; color: var(--text-dim); }
.lease-gofo .lease-val { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--gold); }
.lease-note { font-size: 8px; color: var(--text-dim); font-style: italic; }

/* ===== ENHANCED ECONOMIC CALENDAR ===== */
.card-eco-calendar { overflow: hidden; }
.eco-calendar-container { overflow-x: auto; }
.ecal-table { min-width: 700px; }
.ecal-thead { display: grid; grid-template-columns: 70px 65px 80px 70px 1fr 65px 65px 85px 55px; padding: 8px 10px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
.ecal-th { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); text-transform: uppercase; }
.ecal-row { display: grid; grid-template-columns: 70px 65px 80px 70px 1fr 65px 65px 85px 55px; padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.02); align-items: center; transition: background 0.15s; }
.ecal-row:hover { background: var(--bg-hover); }
.ecal-row-high { background: rgba(255,45,85,0.03); border-left: 2px solid var(--red); }
.ecal-td { font-size: 10px; color: var(--text); }
.ecal-date-col { font-weight: 700; color: var(--text-dim); }
.ecal-time-col { font-family: var(--mono); font-size: 9px; }
.ecal-country-col { display: flex; align-items: center; gap: 4px; }
.ecal-flag { font-size: 12px; }
.ecal-impact-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.ecal-impact-dot.high { background: var(--red); }
.ecal-impact-dot.medium { background: var(--orange); }
.ecal-impact-dot.low { background: var(--text-dim); }
.ecal-event-col { font-weight: 600; }
.ecal-actual-col { font-family: var(--mono); font-weight: 700; }
.ecal-actual-col.beat { color: var(--green); }
.ecal-actual-col.miss { color: var(--red); }
.ecal-forecast-col, .ecal-bank-col, .ecal-prior-col { font-family: var(--mono); font-size: 9px; color: var(--text-dim); }
.ecal-bank-col { color: var(--gold); font-weight: 700; }

/* Calendar Playbook */
.ecal-playbook { margin: 10px; padding: 12px; background: rgba(167,139,250,0.04); border: 1px solid rgba(167,139,250,0.12); border-radius: 6px; }
.ecal-pb-title { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: var(--purple); text-transform: uppercase; margin-bottom: 4px; }
.ecal-pb-currency { font-size: 9px; color: var(--text-dim); margin-bottom: 8px; }
.ecal-pb-flag { font-size: 12px; }
.ecal-pb-scenarios { display: flex; flex-direction: column; gap: 6px; }
.ecal-pb-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 4px; background: rgba(255,255,255,0.02); }
.ecal-pb-above { border-left: 2px solid var(--green); }
.ecal-pb-forecast { border-left: 2px solid var(--text-dim); }
.ecal-pb-below { border-left: 2px solid var(--red); }
.ecal-pb-icon { font-size: 12px; min-width: 16px; }
.ecal-pb-label { font-size: 10px; font-weight: 700; color: var(--text); min-width: 80px; }
.ecal-pb-range { font-size: 9px; font-family: var(--mono); color: var(--text-dim); flex: 1; }
.ecal-pb-impact { font-size: 9px; font-weight: 800; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 3px; }
.ecal-pb-impact.bullish { color: var(--green); background: var(--green-bg); }
.ecal-pb-impact.bearish { color: var(--red); background: var(--red-bg); }
.ecal-pb-impact.neutral { color: var(--text-dim); background: rgba(255,255,255,0.03); }

/* ===== SIDE MENU ===== */
.side-menu { position: fixed; left: 0; top: 0; bottom: 0; width: 56px; background: #060610; border-right: 1px solid var(--border); z-index: 200; display: flex; flex-direction: column; align-items: center; padding: 8px 0; transition: width 0.3s; }
.side-menu.expanded { width: 220px; }
.sm-logo { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 22px; margin-bottom: 8px; cursor: pointer; filter: drop-shadow(0 0 6px rgba(232,184,48,0.3)); }

/* ===== Menu header (2026-08-29) =====
   Replaces the bare diamond as the expand/collapse control. A hamburger plus the word
   "Menu" so it reads as a control rather than decoration. Matches .sm-item geometry
   exactly so the icon column stays aligned in both states. */
.sm-header { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background: none; border: none; color: var(--gold); cursor: pointer;
    position: relative; margin: 2px 0 4px; padding: 10px 8px; transition: all 0.2s; font-family: inherit; }
.side-menu.expanded .sm-header { width: calc(100% - 16px); justify-content: flex-start; padding-left: 14px; gap: 12px; }
.sm-header:hover { background: rgba(232,184,48,0.12); }
.sm-header-icon { width: 16px; display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.sm-header-icon .bar { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 1px;
    transition: transform 0.25s, opacity 0.2s; }
/* Hamburger morphs into an X while open — reinforces that it toggles */
.side-menu.expanded .sm-header-icon .bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.side-menu.expanded .sm-header-icon .bar:nth-child(2) { opacity: 0; }
.side-menu.expanded .sm-header-icon .bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.sm-header-label { display: none; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; white-space: nowrap; }
.side-menu.expanded .sm-header-label { display: inline; }
.sm-header:hover .sm-tooltip { opacity: 1; }
.side-menu.expanded .sm-header .sm-tooltip { display: none; }

.sm-divider { width: 32px; height: 1px; background: var(--border); margin: 4px 0; }
.side-menu.expanded .sm-divider { width: calc(100% - 24px); }
.sm-item { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-dim); font-size: 16px; cursor: pointer; transition: all 0.2s; position: relative; margin: 2px 0; padding: 10px 8px; }
.side-menu.expanded .sm-item { width: calc(100% - 16px); justify-content: flex-start; padding-left: 14px; gap: 12px; }
.sm-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sm-item-logout:hover { background: rgba(255,45,85,0.10); color: var(--red); }
.sm-item.active { background: rgba(232,184,48,0.1); color: var(--gold); }
.sm-item-label { display: none; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Menu icons (2026-08-30). These were colour emoji, which render differently on every
   OS and — because a colour glyph carries its own palette — ignored .sm-item.active
   entirely: the label went gold while the icon stayed multicoloured. Settings was the
   odd one out the other way, using a monochrome text glyph. Inline SVG on currentColor
   means one visual language and icons that follow dim -> hover -> active with the row.
   width/height/fill are ALSO set as attributes in the markup: an <svg> carrying only a
   viewBox has no intrinsic width, so as a flex item it collapses to zero. With styles.css
   served at max-age=3600 that meant returning users saw no icons at all until the CSS
   expired. The rules below stay as the single place to change sizing. */
.sm-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sm-item svg {
  width: 20px; height: 20px;
  fill: currentColor; stroke: none;
}

.side-menu.expanded .sm-item-label { display: inline; }
.sm-tooltip { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); background: var(--bg-card); border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px; font-size: 10px; font-weight: 600; color: var(--text); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s; margin-left: 8px; }
.sm-item:hover .sm-tooltip { opacity: 1; }
.side-menu.expanded .sm-tooltip { display: none; }
body.has-sidemenu { margin-left: 56px; }
body.has-sidemenu .top-bar { left: 56px; }
body.has-sidemenu.sm-expanded { margin-left: 220px; }
body.has-sidemenu.sm-expanded .top-bar { left: 220px; }

/* Hamburger menu button — hidden by default, shown at tablet breakpoint */
.hamburger-btn { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text); cursor: pointer; font-size: 18px; padding: 0; margin-right: 8px; transition: all 0.15s; flex-shrink: 0; min-height: 44px; min-width: 44px; }
.hamburger-btn:hover { border-color: var(--gold); color: var(--gold); }
.hamburger-btn span { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.hamburger-btn .bar { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; transition: all 0.15s; }

/* Drawer overlay */
.drawer-overlay { display: none; }

/* ===== BLOOMBERG TERMINAL FEATURES ===== */

/* --- Depth of Market / Order Book --- */
.dom-header { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 11px; color: #888; text-transform: uppercase; border-bottom: 1px solid #222; }
.dom-asks, .dom-bids { max-height: 200px; overflow-y: auto; }
.dom-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; position: relative; }
.dom-row .dom-bar-bg { position: absolute; left: 0; top: 0; bottom: 0; opacity: 0.15; z-index: 0; }
.dom-ask .dom-bar-bg { background: #ff1744; }
.dom-bid .dom-bar-bg { background: #00c853; }
.dom-ask .dom-price { color: #ff1744; }
.dom-bid .dom-price { color: #00c853; }
.dom-price, .dom-size, .dom-cum { position: relative; z-index: 1; min-width: 60px; }
.dom-size { text-align: center; }
.dom-cum { text-align: right; color: #888; }
.dom-spread { text-align: center; padding: 6px; font-size: 12px; color: #ffd700; background: #1a1a00; border-top: 1px solid #333; border-bottom: 1px solid #333; font-weight: 600; }
.dom-imbalance { text-align: center; padding: 4px; font-size: 11px; color: #aaa; }

/* --- Physical Gold Premiums --- */
.premiums-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.premium-item { background: #1a1a1a; border-radius: 6px; padding: 10px; text-align: center; }
.premium-market { font-size: 12px; font-weight: 600; margin-bottom: 4px; color: #ccc; }
.premium-value { font-size: 16px; font-weight: 700; }
.premium-pct { font-size: 11px; color: #888; margin-top: 2px; }
.premium-demand { font-size: 10px; color: #888; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.demand-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.demand-high { background: #ff1744; }
.demand-medium { background: #ffd700; }
.demand-low { background: #00c853; }

/* --- Volatility Dashboard --- */
.vol-section { margin-bottom: 12px; }
.vol-section h4 { font-size: 11px; text-transform: uppercase; color: #ffd700; margin: 0 0 6px; letter-spacing: 1px; }
.vol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.vol-item { display: flex; justify-content: space-between; background: #1a1a1a; padding: 6px 10px; border-radius: 4px; font-size: 12px; }
.vol-label { color: #888; }
.vol-value { color: #e0e0e0; font-weight: 600; font-family: 'SF Mono', monospace; }

/* --- Forward Curve --- */
.fc-status { display: flex; align-items: center; gap: 12px; padding: 6px 0 10px; }
.fc-structure { padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.fc-contango { background: #1a2e1a; color: #00c853; }
.fc-backwardation { background: #2e1a1a; color: #ff1744; }
.fc-carry { font-size: 12px; color: #aaa; }
.fc-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 120px; padding: 0 4px; gap: 4px; }
.fc-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; }
.fc-bar { background: linear-gradient(to top, #ffd700, #ffab00); border-radius: 3px 3px 0 0; min-width: 24px; display: flex; align-items: flex-start; justify-content: center; transition: height 0.3s; }
.fc-bar span { font-size: 9px; color: #111; font-weight: 700; padding-top: 2px; white-space: nowrap; }
.fc-bar-label { font-size: 10px; color: #888; margin-top: 4px; text-align: center; }
.fc-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11px; }
.fc-tbl th { background: #1a1a1a; padding: 4px 8px; text-align: left; color: #888; font-weight: 600; text-transform: uppercase; font-size: 10px; }
.fc-tbl td { padding: 4px 8px; border-bottom: 1px solid #1a1a1a; color: #ccc; }

/* --- Central Bank Policy Tracker --- */
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cb-bank-card { background: #1a1a1a; border-radius: 6px; padding: 12px; border-left: 3px solid #ffd700; }
.cb-bank-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cb-bank-name { font-weight: 700; font-size: 13px; color: #e0e0e0; }
.cb-rate { font-size: 18px; font-weight: 700; color: #ffd700; font-family: 'SF Mono', monospace; }
.cb-details { font-size: 11px; }
.cb-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #222; }
.cb-row span:first-child { color: #888; }
.cb-row span:last-child { color: #ccc; font-weight: 500; }
.cb-tone { padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.cb-hawkish { background: #2e1a1a; color: #ff1744; }
.cb-dovish { background: #1a2e1a; color: #00c853; }
.cb-neutral { background: #1a1a2e; color: #448aff; }
.cb-expect { color: #ffd700 !important; }

/* --- Portfolio Risk Manager --- */
.risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.risk-item { background: #1a1a1a; padding: 10px; border-radius: 6px; text-align: center; }
.risk-label { display: block; font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.risk-val { display: block; font-size: 18px; font-weight: 700; margin-top: 4px; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.risk-tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.risk-tbl th { background: #1a1a1a; padding: 6px 8px; text-align: left; color: #888; font-weight: 600; text-transform: uppercase; font-size: 10px; }
.risk-tbl td { padding: 5px 8px; border-bottom: 1px solid #1a1a1a; color: #ccc; }

/* --- Global Macro Heatmap --- */
.macro-table-wrap { overflow-x: auto; }
.macro-tbl { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.macro-tbl th { background: #1a1a1a; padding: 6px 10px; text-align: left; color: #888; font-weight: 600; text-transform: uppercase; font-size: 10px; position: sticky; top: 0; }
.macro-tbl td { padding: 5px 10px; border-bottom: 1px solid #1a1a1a; color: #ccc; }
.macro-pos { color: #00c853 !important; font-weight: 600; }
.macro-neg { color: #ff1744 !important; font-weight: 600; }

/* --- Watchlist --- */
.watchlist-table-wrap { overflow-x: auto; max-height: 400px; overflow-y: auto; }
.wl-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.wl-tbl th { background: #1a1a1a; padding: 6px 8px; text-align: left; color: #888; font-weight: 600; text-transform: uppercase; font-size: 10px; position: sticky; top: 0; }
.wl-tbl td { padding: 5px 8px; border-bottom: 1px solid #1a1a1a; color: #ccc; font-family: 'SF Mono', monospace; font-size: 11px; }
.wl-name { color: #666; font-family: -apple-system, sans-serif; }
.wl-spark { padding: 2px 4px; }
.wl-spark svg { vertical-align: middle; }

/* --- Funding Rates / GOFO --- */
.funding-section { margin-bottom: 12px; }
.funding-section h4 { font-size: 11px; text-transform: uppercase; color: #ffd700; margin: 0 0 6px; letter-spacing: 1px; }
.funding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.funding-item { background: #1a1a1a; padding: 8px; border-radius: 4px; text-align: center; }
.funding-tenor { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.funding-rate { display: block; font-size: 14px; font-weight: 700; color: #e0e0e0; margin-top: 2px; font-family: 'SF Mono', monospace; }
.carry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.carry-item { background: #1a1a1a; padding: 8px 10px; border-radius: 4px; display: flex; justify-content: space-between; font-size: 12px; }
.carry-item span:first-child { color: #888; }
.carry-item span:last-child { font-weight: 700; font-family: 'SF Mono', monospace; }

/* --- Tick History / Time & Sales --- */
.tick-header { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 10px; color: #888; text-transform: uppercase; border-bottom: 1px solid #222; letter-spacing: 0.5px; }
.tick-list { max-height: 300px; overflow-y: auto; }
.tick-row { display: flex; justify-content: space-between; padding: 2px 8px; font-family: 'SF Mono', monospace; font-size: 11px; border-bottom: 1px solid #0a0a0a; transition: background 0.2s; }
.tick-buy { background: rgba(0, 200, 83, 0.05); }
.tick-sell { background: rgba(255, 23, 68, 0.05); }
.tick-row:first-child { animation: tickFlash 0.5s; }
@keyframes tickFlash { from { background: rgba(255, 215, 0, 0.15); } to { background: transparent; } }
.tick-time { color: #666; min-width: 70px; }
.tick-price { min-width: 70px; color: #e0e0e0; font-weight: 600; }
.tick-size { min-width: 40px; text-align: right; color: #aaa; }
.tick-side { min-width: 40px; text-align: right; font-weight: 600; }
.tick-buy .tick-side { color: #00c853; }
.tick-sell .tick-side { color: #ff1744; }
.tick-delta { text-align: center; padding: 6px; font-size: 12px; color: #aaa; border-top: 1px solid #222; }

/* --- Shared helpers --- */
.text-green { color: #00c853 !important; }
.text-red { color: #ff1744 !important; }

/* ===== AI INTELLIGENCE SUITE ===== */

/* --- AI Trade Coach --- */
.coach-tips { display: flex; flex-direction: column; gap: 8px; }
.coach-tip { display: flex; gap: 10px; padding: 10px; border-radius: 6px; background: #1a1a1a; border-left: 3px solid #448aff; }
.coach-tip.coach-high { border-left-color: #ff1744; background: #1a1010; }
.coach-tip.coach-medium { border-left-color: #ffd700; background: #1a1a10; }
.coach-tip.coach-low { border-left-color: #00c853; }
.coach-icon { font-size: 20px; flex-shrink: 0; }
.coach-msg { flex: 1; }
.coach-type { font-size: 9px; letter-spacing: 1px; color: #888; text-transform: uppercase; font-weight: 600; }
.coach-msg p { margin: 4px 0 0; font-size: 12px; color: #ccc; line-height: 1.4; }

/* --- AI Pattern Scanner --- */
.patterns-list { display: flex; flex-direction: column; gap: 8px; }
.pattern-item { padding: 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #448aff; }
.pattern-item.pattern-confirmed { border-left-color: #00c853; }
.pattern-item.pattern-invalidated { border-left-color: #ff1744; opacity: 0.6; }
.pattern-header { display: flex; justify-content: space-between; align-items: center; }
.pattern-name { font-weight: 700; font-size: 13px; color: #e0e0e0; }
.pattern-dir { font-size: 12px; font-weight: 700; }
.pattern-meta { display: flex; gap: 10px; margin-top: 4px; font-size: 11px; }
.pattern-tf { background: #222; padding: 1px 6px; border-radius: 3px; color: #aaa; }
.pattern-status { color: #ffd700; text-transform: capitalize; }
.pattern-conf { color: #888; }
.pattern-target { font-size: 12px; color: #aaa; margin-top: 4px; }
.pattern-desc { font-size: 11px; color: #666; margin-top: 4px; }

/* --- Live Market Narrator --- */
.narrator-content { }
.narrator-live { font-size: 13px; line-height: 1.6; color: #ccc; margin: 0; padding: 8px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #ffd700; }
.narrator-ts { display: block; text-align: right; color: #555; font-size: 10px; margin-top: 4px; }
.narrator-drivers-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.driver-tag { background: #1a1a2e; color: #448aff; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.narrator-keys { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.key-level { background: #2e1a00; color: #ffd700; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }

/* --- AI Event Predictor --- */
.event-predictions { display: flex; flex-direction: column; gap: 8px; }
.event-pred { padding: 10px; background: #1a1a1a; border-radius: 6px; }
.ep-header { display: flex; justify-content: space-between; align-items: center; }
.ep-name { font-weight: 700; font-size: 12px; color: #e0e0e0; }
.ep-dir { font-size: 11px; font-weight: 700; }
.ep-move { font-size: 11px; color: #aaa; margin-top: 4px; }
.ep-reasoning { font-size: 11px; color: #888; margin-top: 4px; line-height: 1.4; }
.ep-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: #666; }

/* --- Market Regime --- */
.regime-content { text-align: center; }
.regime-badge { font-size: 18px; font-weight: 900; padding: 8px 20px; border: 2px solid; border-radius: 8px; display: inline-block; margin-bottom: 8px; letter-spacing: 1px; }
.regime-conf { font-size: 12px; color: #888; }
.regime-desc { font-size: 12px; color: #aaa; margin: 8px 0; text-align: left; line-height: 1.4; }
.regime-section { text-align: left; margin: 6px 0; font-size: 12px; }
.regime-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.regime-tag { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.regime-good { background: #1a2e1a; color: #00c853; }
.regime-bad { background: #2e1a1a; color: #ff1744; }
.regime-tf { font-size: 11px; color: #ffd700; margin-top: 6px; text-align: left; }

/* --- Strategy Lab --- */
.strategy-list { display: flex; flex-direction: column; gap: 10px; max-height: 400px; overflow-y: auto; }
.strategy-item { padding: 12px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #ffd700; }
.strat-header { display: flex; justify-content: space-between; align-items: center; }
.strat-name { font-weight: 700; font-size: 13px; color: #e0e0e0; }
.strat-suit { font-size: 10px; background: #222; padding: 2px 8px; border-radius: 10px; color: #aaa; }
.strat-desc { font-size: 11px; color: #888; margin: 6px 0; line-height: 1.4; }
.strat-rules { font-size: 11px; color: #aaa; }
.strat-rules div { margin: 2px 0; }
.strat-backtest { display: flex; gap: 10px; margin-top: 8px; font-size: 11px; padding-top: 8px; border-top: 1px solid #222; }
.strat-backtest span { color: #ccc; }

/* --- Scenario Replay --- */
.scenario-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.scenario-item { padding: 10px; background: #1a1a1a; border-radius: 6px; cursor: pointer; transition: background 0.2s; }
.scenario-item:hover { background: #222; }
.scenario-header { display: flex; justify-content: space-between; align-items: center; }
.scenario-name { font-weight: 700; font-size: 13px; color: #e0e0e0; }
.scenario-dates { font-size: 11px; color: #888; }
.scenario-prices { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: #aaa; }
.scenario-detail { margin-top: 10px; padding-top: 10px; border-top: 1px solid #333; }
.scenario-events { display: flex; flex-direction: column; gap: 4px; }
.scenario-event { display: flex; gap: 8px; font-size: 11px; padding: 4px 0; border-bottom: 1px solid #1a1a1a; }
.se-date { color: #888; min-width: 80px; }
.se-text { color: #ccc; flex: 1; }
.se-price { color: #ffd700; min-width: 60px; text-align: right; }
.scenario-lessons, .scenario-signals { font-size: 11px; color: #aaa; margin-top: 6px; line-height: 1.4; }

/* ===== TRAINING & COMMUNITY ===== */

/* --- Quiz --- */
.quiz-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-cat-btn { padding: 10px 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.quiz-cat-btn:hover { background: #222; border-color: #ffd700; color: #ffd700; }
.quiz-cat-btn small { color: #888; }
.quiz-question { font-size: 14px; color: #e0e0e0; margin-bottom: 12px; line-height: 1.5; }
.quiz-num { background: #ffd700; color: #111; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; margin-right: 8px; }
.quiz-options { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt { padding: 10px 14px; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; color: #ccc; font-size: 13px; cursor: pointer; text-align: left; transition: all 0.2s; }
.quiz-opt:hover:not(:disabled) { background: #222; border-color: #ffd700; }
.quiz-opt:disabled { cursor: default; }
.quiz-correct { border-color: #00c853 !important; background: #1a2e1a !important; color: #00c853 !important; }
.quiz-wrong { border-color: #ff1744 !important; background: #2e1a1a !important; color: #ff1744 !important; }
.quiz-result { margin-top: 10px; padding: 10px; background: #1a1a1a; border-radius: 6px; font-size: 12px; color: #aaa; line-height: 1.4; }
.quiz-right { color: #00c853; font-weight: 700; margin-bottom: 4px; }
.quiz-wrong-msg { color: #ff1744; font-weight: 700; margin-bottom: 4px; }
.quiz-score { margin-top: 8px; font-size: 12px; color: #888; }
.quiz-final { text-align: center; padding: 20px; }
.quiz-final-score { font-size: 48px; font-weight: 900; font-family: 'SF Mono', monospace; }
.quiz-final-detail { font-size: 14px; color: #888; margin: 4px 0; }
.quiz-final-msg { font-size: 14px; margin: 12px 0; }
.quiz-nav { margin-top: 8px; }

/* --- Daily Challenge --- */
.challenge-content { }
.challenge-date { font-size: 11px; color: #ffd700; font-weight: 600; margin-bottom: 6px; }
.challenge-scenario { font-size: 13px; color: #ccc; line-height: 1.5; padding: 10px; background: #1a1a1a; border-radius: 6px; margin-bottom: 8px; }
.challenge-q { font-size: 13px; color: #e0e0e0; margin-bottom: 8px; }
.challenge-meta { font-size: 12px; margin-bottom: 8px; }
.challenge-answer { font-size: 12px; color: #aaa; line-height: 1.5; padding: 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #00c853; }

/* --- Certification --- */
.cert-levels { display: flex; flex-direction: column; gap: 10px; }
.cert-level { display: flex; align-items: center; gap: 12px; padding: 10px; background: #1a1a1a; border-radius: 6px; }
.cert-badge { font-size: 28px; flex-shrink: 0; }
.cert-name { font-weight: 700; font-size: 14px; color: #e0e0e0; }
.cert-req { font-size: 11px; color: #888; }
.cert-progress { font-size: 11px; color: #ffd700; margin-top: 2px; }

/* --- Mentor Mode --- */
.mentor-intro { font-size: 12px; color: #888; margin: 0 0 10px; }
.mentor-form { display: flex; flex-direction: column; gap: 8px; }
.mentor-form select, .mentor-form input, .mentor-form textarea { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 8px; color: #e0e0e0; font-size: 12px; }
.mentor-form textarea { resize: vertical; font-family: inherit; }
.btn-gold { background: #ffd700 !important; color: #111 !important; font-weight: 700; }
.btn-gold:hover { background: #ffab00 !important; }
.mentor-feedback { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mentor-verdict { padding: 8px 12px; border-radius: 6px; font-weight: 700; font-size: 13px; text-align: center; }
.mentor-approved { background: #1a2e1a; color: #00c853; }
.mentor-caution { background: #2e2e1a; color: #ffd700; }
.mentor-msg { display: flex; gap: 8px; padding: 6px 10px; background: #1a1a1a; border-radius: 4px; font-size: 12px; color: #ccc; align-items: flex-start; }
.mentor-icon { flex-shrink: 0; }
.mentor-warning { border-left: 2px solid #ff9100; }
.mentor-good { border-left: 2px solid #00c853; }
.mentor-question { border-left: 2px solid #448aff; }
.mentor-info { border-left: 2px solid #888; }

/* --- Psychology Tracker --- */
.psych-content { }
.psych-log-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.psych-log-form select { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 8px; color: #e0e0e0; font-size: 12px; }
.psych-confidence { font-size: 12px; color: #aaa; }
.psych-confidence input[type=range] { width: 100%; margin-top: 4px; accent-color: #ffd700; }
.psych-checkbox { font-size: 12px; color: #ccc; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.psych-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.psych-stat { text-align: center; background: #1a1a1a; padding: 8px; border-radius: 6px; }
.psych-num { display: block; font-size: 18px; font-weight: 700; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.psych-lbl { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.psych-emotions { display: flex; flex-wrap: wrap; gap: 4px; }
.psych-emo-tag { background: #222; padding: 2px 8px; border-radius: 10px; font-size: 10px; color: #aaa; }
.psych-insights { margin-top: 8px; }
.psych-insight { font-size: 12px; color: #ccc; padding: 6px 10px; background: #1a1a1a; border-radius: 4px; margin-bottom: 4px; line-height: 1.4; }
.psych-empty { color: #666; font-size: 12px; text-align: center; }

/* --- Community Poll --- */
.poll-content { text-align: center; }
.poll-question { font-size: 14px; color: #e0e0e0; margin-bottom: 12px; font-weight: 600; }
.poll-buttons { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.poll-btn { padding: 10px 24px; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.poll-bull { background: #1a2e1a; color: #00c853; border-color: #00c853; }
.poll-bull:hover { background: #00c853; color: #111; }
.poll-bear { background: #2e1a1a; color: #ff1744; border-color: #ff1744; }
.poll-bear:hover { background: #ff1744; color: #fff; }
.poll-bar-wrap { margin: 8px 0; }
.poll-bar { display: flex; height: 32px; border-radius: 6px; overflow: hidden; }
.poll-bar-bull { background: #00c853; color: #111; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; transition: width 0.5s; }
.poll-bar-bear { background: #ff1744; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; transition: width 0.5s; }
.poll-meta { font-size: 11px; color: #888; display: flex; justify-content: space-between; }

/* --- Trade Ideas Feed --- */
.ideas-share { display: flex; gap: 6px; margin-bottom: 10px; align-items: center; }
.ideas-share select, .ideas-share input { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px 8px; color: #e0e0e0; font-size: 12px; }
.ideas-list { display: flex; flex-direction: column; gap: 6px; max-height: 350px; overflow-y: auto; }
.idea-item { padding: 10px; background: #1a1a1a; border-radius: 6px; }
.idea-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.idea-user { font-weight: 700; color: #e0e0e0; }
.idea-dir { font-weight: 700; font-size: 11px; }
.idea-time { color: #666; font-size: 10px; }
.idea-text { font-size: 12px; color: #aaa; margin: 6px 0; line-height: 1.4; }
.idea-footer { display: flex; gap: 10px; align-items: center; font-size: 11px; color: #888; }
.idea-vote { background: #222; border: 1px solid #333; border-radius: 4px; padding: 2px 8px; color: #ccc; font-size: 11px; cursor: pointer; }
.idea-vote:hover { background: #333; color: #ffd700; }

/* --- Shared button styles --- */
.btn-sm { padding: 8px 18px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-sm:hover { background: rgba(255,255,255,0.1); border-color: var(--gold); color: var(--gold); }
.btn-sm.active, .btn-filter.active { background: var(--gold); color: #000; border-color: var(--gold); }
.btn-sm.btn-gold, button.btn-gold { background: var(--gold) !important; color: #000 !important; border: none; font-weight: 700; }

/* Global form element spacing inside cards */
.card .psych-log-form, .card .copy-wrap, .card .tg-wrap, .card .ref-wrap,
.card .review-wrap, .card .template-wrap, .card .improvement-wrap { display: flex; flex-direction: column; gap: 10px; }
.card .poll-buttons { display: flex; gap: 8px; margin-top: 8px; }
.card .ref-hero { margin-bottom: 10px; }
.card .ref-link-box { display: flex; gap: 0; margin-bottom: 10px; align-items: stretch; }
.card .ref-share { display: flex; gap: 6px; margin-bottom: 10px; }

/* ===== MARKET INTELLIGENCE ===== */

/* News Digest */
.digest-list { display: flex; flex-direction: column; gap: 8px; }
.digest-item { padding: 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #448aff; }
.digest-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.digest-impact { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 3px; }
.digest-bullish { background: #1a2e1a; color: #00c853; }
.digest-bearish { background: #2e1a1a; color: #ff1744; }
.digest-neutral { background: #222; color: #888; }
.digest-conf { font-size: 10px; color: #666; }
.digest-headline { font-size: 13px; font-weight: 600; color: #e0e0e0; }
.digest-action { font-size: 11px; color: #888; margin-top: 4px; font-style: italic; }
.digest-ts { display: block; text-align: right; color: #444; font-size: 10px; margin-top: 6px; }

/* Institutional Flows */
.flows-list { display: flex; flex-direction: column; gap: 6px; }
.flow-item { padding: 8px 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #448aff; }
.flow-item.flow-buy { border-left-color: #00c853; }
.flow-item.flow-sell { border-left-color: #ff1744; }
.flow-header { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.flow-side { font-weight: 700; min-width: 35px; }
.flow-size { font-weight: 600; color: #e0e0e0; }
.flow-price { color: #aaa; }
.flow-meta { display: flex; gap: 10px; font-size: 10px; color: #666; margin-top: 4px; }
.flow-type { background: #222; padding: 1px 6px; border-radius: 3px; text-transform: uppercase; }
.flow-sig { padding: 1px 6px; border-radius: 3px; }
.flow-major { background: #2e1a00; color: #ffd700; }
.flow-notable { background: #1a1a2e; color: #448aff; }
.flow-routine { background: #1a1a1a; color: #666; }

/* AI Chat */
.ai-chat-wrap { display: flex; flex-direction: column; height: 350px; }
.ai-chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.ai-msg { padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; max-width: 85%; }
.ai-msg-bot { background: #1a1a1a; color: #ccc; align-self: flex-start; border-bottom-left-radius: 2px; }
.ai-msg-user { background: #1a2e1a; color: #e0e0e0; align-self: flex-end; border-bottom-right-radius: 2px; }
.ai-typing { opacity: 0.6; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:0.6} 50%{opacity:1} }
.ai-chat-input { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid #222; }
.ai-chat-input input { flex: 1; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 8px; color: #e0e0e0; font-size: 12px; }
.ai-chat-input button { padding: 8px 16px; background: #ffd700; color: #111; border: none; border-radius: 4px; font-weight: 700; cursor: pointer; }

/* Screener */
.screener-filters { display: flex; gap: 6px; margin-bottom: 8px; }
.scr-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.scr-btn.active { background: #ffd700; color: #111; border-color: #ffd700; font-weight: 700; }
.screener-table-wrap { overflow-x: auto; max-height: 350px; overflow-y: auto; }
.scr-tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.scr-tbl th { background: #1a1a1a; padding: 6px 8px; text-align: left; color: #888; font-weight: 600; text-transform: uppercase; font-size: 10px; position: sticky; top: 0; }
.scr-tbl td { padding: 5px 8px; border-bottom: 1px solid #1a1a1a; color: #ccc; }
.scr-signal { padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.scr-buy { background: #1a2e1a; color: #00c853; }
.scr-sell { background: #2e1a1a; color: #ff1744; }
.scr-hold { background: #222; color: #888; }

/* ===== ADVANCED TOOLS ===== */

/* Bar Replay */
.replay-wrap { }
.replay-controls { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.replay-controls select { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 4px 8px; color: #e0e0e0; font-size: 11px; }
.replay-chart { background: #0a0a0a; border-radius: 6px; min-height: 150px; display: flex; align-items: center; justify-content: center; }
.replay-info { font-size: 11px; color: #aaa; padding: 6px 0; font-family: 'SF Mono', monospace; }
.replay-trade-btns { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.replay-buy { background: #1a2e1a !important; color: #00c853 !important; border-color: #00c853 !important; }
.replay-sell { background: #2e1a1a !important; color: #ff1744 !important; border-color: #ff1744 !important; }
.replay-pnl { font-size: 12px; color: #aaa; margin-left: auto; }

/* Alert Builder */
.alert-builder-wrap { }
.ab-form { display: flex; flex-direction: column; gap: 8px; }
.ab-input { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px 8px; color: #e0e0e0; font-size: 12px; width: 100%; box-sizing: border-box; }
.ab-conditions { display: flex; flex-direction: column; gap: 6px; }
.ab-condition { display: flex; gap: 6px; align-items: center; }
.ab-select { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 11px; }
.ab-val { width: 80px; }
.ab-notify { display: flex; gap: 12px; font-size: 12px; color: #aaa; }
.ab-notify label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.ab-alerts-list { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ab-alert-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #1a1a1a; border-radius: 4px; font-size: 11px; }
.ab-alert-name { font-weight: 600; color: #e0e0e0; }
.ab-alert-conds { color: #888; font-family: 'SF Mono', monospace; font-size: 10px; }
.ab-delete { background: none; border: none; color: #ff1744; font-size: 16px; cursor: pointer; padding: 0 4px; }

/* Gold Score */
.gold-score-wrap { text-align: center; }
.gs-score { font-size: 64px; font-weight: 900; font-family: 'SF Mono', monospace; }
.gs-grade { font-size: 16px; font-weight: 700; color: #ffd700; margin-bottom: 12px; }
.gs-breakdown { text-align: left; }
.gs-bar-item { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 11px; color: #aaa; }
.gs-bar-item span:first-child { min-width: 80px; }
.gs-bar-item span:last-child { min-width: 30px; text-align: right; color: #ccc; }
.gs-bar { flex: 1; height: 8px; background: #222; border-radius: 4px; overflow: hidden; }
.gs-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.gs-stats { font-size: 11px; color: #888; margin-top: 10px; }

/* Running P&L */
.running-pnl-wrap { }
.rpnl-chart { background: #0a0a0a; border-radius: 6px; min-height: 120px; }
.rpnl-stats { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: #aaa; }

/* ===== SOCIAL & CONNECTIVITY ===== */

/* Copy Trading */
.copy-wrap { }
.copy-intro { font-size: 12px; color: #888; margin: 0 0 10px; }
.copy-traders-list { display: flex; flex-direction: column; gap: 6px; }
.copy-trader { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #1a1a1a; border-radius: 6px; }
.copy-trader-info { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.copy-rank { color: #ffd700; font-weight: 700; }
.copy-name { font-weight: 600; color: #e0e0e0; }
.copy-wr { color: #888; }

/* Trader Profile */
.profile-wrap { }
.profile-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.profile-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #ffd700, #ff9100); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: #111; }
.profile-name { font-size: 16px; font-weight: 700; color: #e0e0e0; }
.profile-plan { font-size: 11px; color: #ffd700; }
.profile-joined { font-size: 10px; color: #666; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ps-item { text-align: center; background: #1a1a1a; padding: 8px; border-radius: 6px; }
.ps-num { display: block; font-size: 18px; font-weight: 700; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.ps-lbl { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.profile-badge { background: #2e1a00; color: #ffd700; padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 600; }

/* Telegram Connect */
.tg-wrap { }
.tg-intro { font-size: 12px; color: #888; margin: 0 0 10px; }
.tg-steps { margin-bottom: 10px; }
.tg-step { font-size: 12px; color: #aaa; margin: 4px 0; }
.tg-step code { background: #222; padding: 2px 6px; border-radius: 3px; color: #ffd700; }
.tg-form { display: flex; gap: 0; align-items: stretch; }
.tg-form input { flex: 1; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 8px; color: #e0e0e0; font-size: 12px; }
.tg-status { margin-top: 8px; font-size: 12px; }

/* Performance Report */
.report-wrap { }
.report-wrap p { font-size: 12px; color: #888; margin: 0 0 10px; }
.report-options { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.report-options select { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; }
.report-card { background: #1a1a1a; padding: 16px; border-radius: 8px; border-left: 3px solid #ffd700; }
.report-card h4 { color: #ffd700; margin: 0 0 10px; font-size: 14px; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 12px; color: #ccc; }

/* Dashboard Layout */
.layout-wrap { }
.layout-wrap p { font-size: 12px; color: #888; margin: 0 0 10px; }
.layout-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.layout-opt { padding: 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; color: #ccc; font-size: 12px; cursor: pointer; text-align: center; transition: all 0.2s; }
.layout-opt:hover { background: #222; border-color: #ffd700; color: #ffd700; }
.layout-status { margin-top: 8px; font-size: 12px; text-align: center; }

/* ===== REFERRAL PROGRAM ===== */
.referral-wrap { }
.ref-hero { text-align: center; margin-bottom: 14px; }
.ref-headline { font-size: 18px; font-weight: 800; color: #ffd700; }
.ref-sub { font-size: 12px; color: #aaa; margin-top: 4px; }
.ref-link-box { display: flex; gap: 0; margin-bottom: 10px; align-items: stretch; }
.ref-link-input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px 0 0 8px; padding: 10px 12px; color: var(--gold); font-size: 12px; font-family: var(--mono); border-right: none; margin-bottom: 0 !important; }
.ref-link-box .btn-sm, .ref-link-box .btn-gold { border-radius: 0 8px 8px 0 !important; padding: 10px 16px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ref-share { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.ref-share-btn { padding: 6px 14px; border-radius: 4px; font-size: 11px; font-weight: 600; cursor: pointer; border: none; }
.ref-twitter { background: #1a1a1a; color: #e0e0e0; border: 1px solid #333; }
.ref-whatsapp { background: #1a2e1a; color: #25D366; border: 1px solid #25D366; }
.ref-telegram { background: #1a1a2e; color: #0088cc; border: 1px solid #0088cc; }
.ref-share-btn:hover { opacity: 0.8; }
.ref-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ref-stat { text-align: center; background: #1a1a1a; padding: 10px; border-radius: 6px; }
.ref-stat-num { display: block; font-size: 24px; font-weight: 900; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.ref-stat-num.ref-gold { color: #ffd700; }
.ref-stat-lbl { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.ref-expires { font-size: 11px; color: #888; text-align: center; margin-bottom: 10px; }
.ref-section-title { font-size: 11px; color: #ffd700; text-transform: uppercase; letter-spacing: 1px; margin: 10px 0 6px; }
.ref-person { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: #1a1a1a; border-radius: 4px; margin-bottom: 4px; font-size: 12px; }
.ref-person-name { color: #e0e0e0; font-weight: 600; }
.ref-person-date { color: #666; font-size: 10px; }
.ref-converted { color: #00c853; font-weight: 600; }
.ref-pending { color: #888; }
.ref-lb-item { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: #1a1a1a; border-radius: 4px; margin-bottom: 4px; font-size: 12px; }
.ref-lb-rank { color: #ffd700; font-weight: 700; min-width: 24px; }
.ref-lb-name { color: #e0e0e0; font-weight: 600; flex: 1; }
.ref-lb-conv { color: #00c853; font-size: 11px; }
.ref-lb-days { font-size: 11px; }

/* ===== EXPERT FEATURES ===== */

/* Confluence Scorer */
.conf-score { font-size: 48px; font-weight: 900; text-align: center; font-family: 'SF Mono', monospace; }
.conf-score small { font-size: 18px; color: #888; }
.conf-rec { text-align: center; font-size: 12px; color: #aaa; margin-bottom: 10px; }
.conf-factors { display: flex; flex-direction: column; gap: 4px; }
.conf-factor { display: flex; justify-content: space-between; padding: 4px 8px; background: #1a1a1a; border-radius: 4px; font-size: 11px; }
.conf-factor-name { color: #888; }
.conf-factor-val { color: #ccc; font-weight: 600; }
.conf-factor-score { color: #ffd700; min-width: 40px; text-align: right; }

/* Correlation Regime */
.corr-pair { display: flex; justify-content: space-between; padding: 6px 8px; background: #1a1a1a; border-radius: 4px; margin-bottom: 4px; font-size: 12px; }
.corr-pair-name { color: #ccc; font-weight: 600; }
.corr-pair-regime { padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.corr-normal { background: #1a2e1a; color: #00c853; }
.corr-diverging { background: #2e2e1a; color: #ffd700; }
.corr-broken { background: #2e1a1a; color: #ff1744; }
.corr-alerts { margin-top: 8px; }
.corr-alert { font-size: 11px; color: #ffd700; padding: 4px 8px; background: #1a1a00; border-radius: 4px; margin-bottom: 4px; }

/* Market Profile */
.mp-levels { display: flex; justify-content: space-around; margin-bottom: 10px; }
.mp-level { text-align: center; padding: 8px; background: #1a1a1a; border-radius: 6px; min-width: 80px; }
.mp-poc { border: 1px solid #ffd700; }
.mp-level span:first-child { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.mp-price { display: block; font-size: 16px; font-weight: 700; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.mp-ib { font-size: 11px; color: #aaa; text-align: center; margin-bottom: 8px; }
.mp-dist { display: flex; flex-direction: column; gap: 2px; }
.mp-bar { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.mp-bar-price { color: #888; min-width: 45px; text-align: right; }
.mp-bar-fill { height: 12px; border-radius: 2px; min-width: 2px; }
.mp-bar-tpo { color: #666; }

/* Kelly / Monte Carlo / Greeks */
.kelly-form, .greeks-form { display: flex; flex-direction: column; gap: 10px; }
.kelly-form label, .greeks-form label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #aaa; }
.kelly-form input, .greeks-form input, .greeks-form select { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; color: #e0e0e0; font-size: 13px; width: 90px; text-align: right; }
.greeks-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.greeks-row label { flex: 1; min-width: 100px; }
.greeks-form select { width: 90px; padding: 8px; }
.kelly-scores { display: flex; justify-content: space-around; margin: 10px 0; }
.kelly-item { text-align: center; }
.kelly-item span:first-child { display: block; font-size: 10px; color: #888; }
.kelly-item span:last-child { display: block; font-size: 20px; font-weight: 700; font-family: 'SF Mono', monospace; }
.kelly-rec { font-size: 12px; color: #aaa; text-align: center; padding: 8px; background: #1a1a1a; border-radius: 4px; }
.mc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.mc-item { text-align: center; background: #1a1a1a; padding: 10px; border-radius: 6px; }
.mc-num { display: block; font-size: 22px; font-weight: 900; font-family: 'SF Mono', monospace; }
.mc-lbl { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.mc-percentiles { display: flex; flex-direction: column; gap: 4px; }
.mc-pct { display: flex; justify-content: space-between; padding: 4px 8px; background: #1a1a1a; border-radius: 4px; font-size: 11px; color: #aaa; }
.greeks-price { text-align: center; font-size: 16px; color: #ffd700; margin: 10px 0; }
.greeks-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.greek-item { text-align: center; background: #1a1a1a; padding: 8px 4px; border-radius: 4px; }
.greek-name { display: block; font-size: 10px; color: #888; }
.greek-val { display: block; font-size: 14px; font-weight: 700; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.greeks-meta { display: flex; justify-content: space-around; font-size: 11px; color: #888; }

/* Journal Pro */
.jrnl-tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.jrnl-tab { padding: 4px 10px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.jrnl-tab.active { background: #ffd700; color: #111; border-color: #ffd700; font-weight: 700; }
.jrnl-tab-content { min-height: 200px; }
.session-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.session-form select, .session-form input, .session-form textarea { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; }
.sn-item { padding: 8px; background: #1a1a1a; border-radius: 4px; margin-bottom: 6px; border-left: 3px solid #448aff; }
.sn-pre_market { border-left-color: #ffd700; }
.sn-post_market { border-left-color: #00c853; }
.sn-header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; font-size: 10px; }
.sn-type-badge { background: #222; padding: 1px 6px; border-radius: 3px; color: #aaa; text-transform: uppercase; }
.sn-bias-bullish { color: #00c853; }
.sn-bias-bearish { color: #ff1744; }
.sn-bias-neutral { color: #888; }
.sn-date { color: #666; }
.sn-body { font-size: 12px; color: #ccc; line-height: 1.4; }
.sn-levels { font-size: 10px; color: #ffd700; margin-top: 4px; }
.heat-grid { display: flex; flex-wrap: wrap; gap: 3px; }
.heat-cell { width: 24px; height: 24px; border-radius: 3px; display: flex; align-items: center; justify-content: center; cursor: default; }
.heat-day { font-size: 8px; color: rgba(255,255,255,0.5); }
.ta-title { font-size: 11px; color: #ffd700; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: 1px; }
.ta-items { display: flex; flex-direction: column; gap: 3px; }
.ta-item { display: flex; justify-content: space-between; padding: 4px 8px; background: #1a1a1a; border-radius: 4px; font-size: 11px; color: #aaa; }
.mistake-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.mistake-tag { font-size: 11px; color: #ccc; background: #1a1a1a; padding: 3px 8px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.mistake-item { display: flex; justify-content: space-between; padding: 4px 8px; background: #1a1a1a; border-radius: 4px; margin-bottom: 3px; font-size: 11px; color: #aaa; }
.wr-stats { display: flex; gap: 12px; font-size: 12px; color: #aaa; margin-bottom: 8px; padding: 8px; background: #1a1a1a; border-radius: 4px; }
.wr-content { font-size: 12px; color: #ccc; line-height: 1.6; padding: 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #ffd700; }

/* ===== VISUAL LEARNING CENTER ===== */

/* Candlestick Pattern Library */
.cp-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.cp-search { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px 10px; color: #e0e0e0; font-size: 12px; flex: 1; min-width: 120px; }
.cp-filter-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; transition: all 0.2s; }
.cp-filter-btn.active, .cp-filter-btn:hover { background: #ffd700; color: #111; border-color: #ffd700; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 500px; overflow-y: auto; }
.cp-card { background: #1a1a1a; border: 1px solid #222; border-radius: 6px; padding: 10px; cursor: pointer; transition: all 0.2s; text-align: center; }
.cp-card:hover { border-color: #ffd700; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,215,0,0.1); }
.cp-card.cp-bullish { border-left: 3px solid #00c853; }
.cp-card.cp-bearish { border-left: 3px solid #ff1744; }
.cp-card.cp-neutral { border-left: 3px solid #888; }
.cp-svg { height: 60px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.cp-svg-el { width: 100%; height: 100%; }
.cp-name { font-size: 11px; color: #e0e0e0; font-weight: 600; margin-bottom: 4px; }
.cp-meta { display: flex; gap: 6px; justify-content: center; font-size: 10px; }
.cp-type-badge { padding: 1px 6px; border-radius: 3px; text-transform: uppercase; font-size: 9px; font-weight: 700; }
.cp-type-bullish { background: rgba(0,200,83,0.2); color: #00c853; }
.cp-type-bearish { background: rgba(255,23,68,0.2); color: #ff1744; }
.cp-type-neutral { background: rgba(136,136,136,0.2); color: #888; }
.cp-reliability { color: #888; }

/* Pattern Detail Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #111; border: 1px solid #333; border-radius: 12px; padding: 24px; max-width: 600px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; }
.modal-content.modal-video { max-width: 800px; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: #888; font-size: 24px; cursor: pointer; z-index: 1; }
.modal-close:hover { color: #fff; }
.pd-svg-large { height: 120px; display: flex; align-items: center; justify-content: center; background: #0a0a0a; border-radius: 8px; margin: 12px 0; padding: 10px; }
.pd-svg-large svg { width: 100%; height: 100%; }
.pd-badges { display: flex; gap: 8px; margin: 10px 0; }
.cp-reliability-badge { padding: 2px 8px; background: #1a1a1a; border-radius: 3px; font-size: 10px; color: #aaa; }
.pd-section { margin: 12px 0; }
.pd-section h4 { font-size: 12px; color: #ffd700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.pd-section p { font-size: 12px; color: #ccc; line-height: 1.6; }

/* Chart Patterns */
.chp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 500px; overflow-y: auto; }
.chp-card { background: #1a1a1a; border: 1px solid #222; border-radius: 6px; padding: 10px; cursor: pointer; transition: all 0.2s; text-align: center; }
.chp-card:hover { border-color: rgba(232,184,48,0.3); transform: translateY(-2px); }
.chp-svg { height: 60px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.chp-svg-el { width: 100%; height: 100%; }
.chp-name { font-size: 11px; color: #e0e0e0; font-weight: 600; margin-bottom: 4px; }
.chp-meta { display: flex; gap: 8px; justify-content: center; font-size: 10px; }
.chp-type-reversal { color: #ff9800; }
.chp-type-continuation { color: #448aff; }
.chp-filter-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.chp-filter-btn.active { background: var(--gold); color: #111; border-color: var(--gold); }

/* Indicator Explainers */
.ind-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.ind-filter-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.ind-filter-btn.active { background: var(--gold); color: #111; border-color: var(--gold); }
.ind-card { display: flex; align-items: center; gap: 10px; padding: 10px; background: #1a1a1a; border-radius: 6px; margin-bottom: 6px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.ind-card:hover { border-color: rgba(232,184,48,0.3); background: rgba(255,255,255,0.04); }
.ind-icon { font-size: 20px; }
.ind-name { font-size: 12px; color: #e0e0e0; font-weight: 600; }
.ind-cat { font-size: 10px; color: #888; }
.ind-arrow { color: #444; font-size: 14px; margin-left: auto; }
.ind-detail { padding: 12px; background: #0a0a0a; border-radius: 8px; border: 1px solid #222; }
.ind-detail h4 { margin-bottom: 10px; }
.ind-formula { font-size: 11px; color: #aaa; background: #1a1a1a; padding: 8px; border-radius: 4px; margin-bottom: 10px; font-family: 'JetBrains Mono', monospace; }
.ind-steps { margin-bottom: 10px; }
.ind-steps h5 { font-size: 11px; color: #888; margin-bottom: 6px; text-transform: uppercase; }
.ind-step { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 12px; color: #ccc; }
.step-num { background: #ffd700; color: #111; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.ind-interp, .ind-gold-tip { margin-top: 10px; }
.ind-interp h5, .ind-gold-tip h5 { font-size: 11px; color: #888; margin-bottom: 4px; text-transform: uppercase; }
.ind-interp p, .ind-gold-tip p { font-size: 12px; line-height: 1.5; }
.ind-params { margin-top: 10px; }
.ind-params h5 { font-size: 11px; color: #888; margin-bottom: 6px; }
.ind-param { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ind-param label { font-size: 11px; color: #aaa; min-width: 80px; }
.ind-slider { flex: 1; accent-color: #ffd700; }
.ind-param span { font-size: 11px; color: #ffd700; min-width: 30px; text-align: right; }

/* Gold Infographics */
.info-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.info-tab-btn { padding: 5px 14px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.info-tab-btn.active { background: #ffd700; color: #111; border-color: #ffd700; font-weight: 700; }
.ig-cb-grid { display: flex; flex-direction: column; gap: 4px; }
.ig-cb-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ig-cb-country { font-size: 11px; color: #e0e0e0; min-width: 100px; }
.ig-cb-bar-wrap { flex: 1; height: 14px; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
.ig-cb-bar { height: 100%; background: linear-gradient(90deg, #ffd700, #ff9800); border-radius: 3px; transition: width 0.5s; }
.ig-cb-tonnes { font-size: 11px; color: #ffd700; min-width: 60px; text-align: right; font-family: 'JetBrains Mono', monospace; }
.ig-cb-pct { font-size: 10px; color: #888; min-width: 40px; text-align: right; }
.ig-supply-flow { display: flex; align-items: center; gap: 20px; justify-content: center; padding: 20px 0; }
.ig-supply-side, .ig-demand-side { background: #1a1a1a; border-radius: 8px; padding: 16px; min-width: 200px; }
.ig-supply-side h4, .ig-demand-side h4 { font-size: 12px; color: #ffd700; margin-bottom: 10px; text-transform: uppercase; }
.ig-flow-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; color: #ccc; border-bottom: 1px solid #222; }
.ig-flow-total { font-size: 13px; color: #ffd700; font-weight: 700; margin-top: 8px; padding-top: 8px; border-top: 2px solid #333; }
.ig-flow-arrow { font-size: 24px; color: #ffd700; }
.ig-timeline { position: relative; padding-left: 30px; }
.ig-tl-item { position: relative; padding: 10px 0 10px 20px; border-left: 2px solid #333; }
.ig-tl-item:last-child { border-left-color: transparent; }
.ig-tl-dot { position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; background: #ffd700; border-radius: 50%; border: 2px solid #111; }
.ig-tl-year { position: absolute; left: -80px; top: 10px; font-size: 12px; color: #ffd700; font-weight: 700; width: 50px; text-align: right; }
.ig-tl-event { font-size: 12px; color: #e0e0e0; font-weight: 600; }
.ig-tl-price { font-size: 11px; color: #00c853; }
.ig-tl-sig { font-size: 11px; color: #888; margin-top: 2px; }
.ig-season { padding: 10px 0; }
.ig-season-chart { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 130px; padding-bottom: 30px; position: relative; }
.ig-season-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ig-season-bar { width: 28px; border-radius: 3px 3px 0 0; transition: height 0.5s; }
.ig-bar-pos { background: linear-gradient(180deg, #00c853, #00c85355); }
.ig-bar-neg { background: linear-gradient(0deg, #ff1744, #ff174455); border-radius: 0 0 3px 3px; }
.ig-season-month { font-size: 10px; color: #888; }
.ig-season-val { font-size: 9px; font-family: 'JetBrains Mono', monospace; }

/* Video Academy */
.vid-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.vid-filter-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.vid-filter-btn.active { background: var(--gold); color: #111; border-color: var(--gold); }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 600px; overflow-y: auto; }
.vid-card { background: #1a1a1a; border: 1px solid #222; border-radius: 8px; overflow: hidden; cursor: pointer; transition: all 0.2s; }
.vid-card:hover { border-color: rgba(232,184,48,0.3); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.vid-card.vid-watched { opacity: 0.7; }
.vid-thumb { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid-duration { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.8); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; }
.vid-check { position: absolute; top: 4px; right: 4px; background: #00c853; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; }
.vid-info { padding: 8px; }
.vid-title { font-size: 12px; color: #e0e0e0; font-weight: 600; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-meta { font-size: 10px; }
.vid-diff { padding: 1px 6px; border-radius: 3px; font-size: 9px; text-transform: uppercase; }
.vid-diff-beginner { background: rgba(0,200,83,0.2); color: #00c853; }
.vid-diff-intermediate { background: rgba(68,138,255,0.2); color: #448aff; }
.vid-diff-advanced { background: rgba(255,152,0,0.2); color: #ff9800; }
.vid-diff-expert { background: rgba(255,23,68,0.2); color: #ff1744; }
.vid-player-wrap { position: relative; width: 100%; padding-bottom: 56.25%; margin-bottom: 10px; }
.vid-player-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px; }
.vid-takeaways { background: #1a1a1a; padding: 10px; border-radius: 6px; margin-bottom: 10px; }
.vid-takeaways h5 { font-size: 11px; color: #ffd700; margin-bottom: 6px; }
.vid-takeaways ul { list-style: none; padding: 0; }
.vid-takeaways li { font-size: 12px; color: #ccc; padding: 3px 0; }
.vid-takeaways li::before { content: '\2713 '; color: #00c853; }

/* Trade Simulator */
.sim-controls { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
.sim-controls button { padding: 5px 14px; border-radius: 4px; font-size: 11px; font-weight: 700; cursor: pointer; border: 1px solid #333; }
.sim-buy-btn { background: #00c853; color: #fff; border-color: #00c853; }
.sim-sell-btn { background: #ff1744; color: #fff; border-color: #ff1744; }
.sim-close-btn { background: #ff9800; color: #fff; border-color: #ff9800; }
.sim-svg { width: 100%; background: #0a0a0a; border-radius: 6px; }
.sim-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.sim-stat { display: flex; flex-direction: column; }
.sim-lbl { font-size: 9px; color: #666; text-transform: uppercase; }
.sim-val { font-size: 13px; color: #e0e0e0; font-family: 'JetBrains Mono', monospace; }
.sim-position { font-size: 12px; padding: 6px 10px; background: #1a1a1a; border-radius: 4px; margin: 6px 0; font-family: 'JetBrains Mono', monospace; }
.sim-trade-log { max-height: 80px; overflow-y: auto; }
.sim-log-item { font-size: 11px; padding: 3px 0; font-family: 'JetBrains Mono', monospace; }

/* Risk/Reward Calculator */
.rr-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.rr-inputs input { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.rr-inputs-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.rr-inputs-row2 input { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; }
.rr-svg { width: 100%; background: #0a0a0a; border-radius: 6px; margin-bottom: 10px; }
.rr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.rr-item { background: #1a1a1a; padding: 8px; border-radius: 4px; text-align: center; }
.rr-lbl { display: block; font-size: 9px; color: #666; text-transform: uppercase; }
.rr-val { display: block; font-size: 16px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.rr-verdict { padding: 10px; border-radius: 6px; font-size: 12px; text-align: center; }
.rr-good { background: rgba(0,200,83,0.1); color: #00c853; border: 1px solid rgba(0,200,83,0.3); }
.rr-ok { background: rgba(255,215,0,0.1); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.rr-bad { background: rgba(255,23,68,0.1); color: #ff1744; border: 1px solid rgba(255,23,68,0.3); }

/* Learning Paths */
.lp-selector { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.lp-btn { padding: 6px 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; color: #aaa; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.lp-btn.active { background: #ffd700; color: #111; border-color: #ffd700; font-weight: 700; }
.lp-header { margin-bottom: 12px; }
.lp-header h4 { color: #e0e0e0; margin-bottom: 8px; }
.lp-progress-bar { height: 8px; background: #1a1a1a; border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.lp-progress-fill { height: 100%; background: linear-gradient(90deg, #ffd700, #ff9800); border-radius: 4px; transition: width 0.5s; }
.lp-pct { font-size: 11px; color: #888; }
.lp-steps { display: flex; flex-direction: column; gap: 4px; max-height: 400px; overflow-y: auto; }
.lp-step { display: flex; align-items: center; gap: 8px; padding: 8px; background: #1a1a1a; border-radius: 4px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.lp-step:hover { border-color: #333; background: #1e1e1e; }
.lp-step.lp-done { opacity: 0.6; }
.lp-step-check { font-size: 14px; }
.lp-step-type { padding: 2px 6px; border-radius: 3px; font-size: 9px; text-transform: uppercase; font-weight: 700; }
.lp-type-lesson { background: rgba(68,138,255,0.2); color: #448aff; }
.lp-type-video { background: rgba(255,23,68,0.2); color: #ff1744; }
.lp-type-quiz { background: rgba(255,215,0,0.2); color: #ffd700; }
.lp-type-exercise { background: rgba(0,200,83,0.2); color: #00c853; }
.lp-step-title { font-size: 12px; color: #ccc; }

/* Animated Market Concepts */
.amc-btns { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.amc-btn { padding: 5px 14px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.amc-btn.active { background: #448aff; color: #fff; border-color: #448aff; }
.amc-svg-wrap { background: #0a0a0a; border-radius: 8px; padding: 12px; margin-bottom: 10px; display: flex; justify-content: center; }
.amc-svg { width: 100%; max-width: 400px; }
.amc-explain { font-size: 12px; color: #ccc; line-height: 1.6; padding: 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #ffd700; margin-bottom: 10px; }
.amc-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.amc-frame-num { font-size: 11px; color: #888; }

/* Enhanced Psychology / Emotion Wheel */
.ew-svg { width: 160px; height: 160px; margin: 0 auto; display: block; }
.ew-wrap { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.breath-circle { width: 100px; height: 100px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 10px auto; transition: all 4s ease-in-out; }
.breath-in { background: rgba(0,200,83,0.2); border: 2px solid #00c853; transform: scale(1.2); }
.breath-hold { background: rgba(255,215,0,0.2); border: 2px solid #ffd700; transform: scale(1.2); }
.breath-out { background: rgba(68,138,255,0.2); border: 2px solid #448aff; transform: scale(0.8); }
.breath-text { font-size: 11px; color: #e0e0e0; font-weight: 600; }
.breath-cycle { font-size: 9px; color: #888; margin-top: 4px; }

/* ===== EXTENDED ACADEMY ===== */

/* Course Modules */
.cm-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cm-tab { padding: 6px 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; color: #aaa; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.cm-tab.active { background: #ffd700; color: #111; border-color: #ffd700; font-weight: 700; }
.cm-info { margin-bottom: 12px; }
.cm-info h4 { color: #e0e0e0; margin-bottom: 4px; }
.cm-chapters { display: flex; flex-direction: column; gap: 4px; max-height: 400px; overflow-y: auto; }
.cm-chapter { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #1a1a1a; border-radius: 4px; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; }
.cm-chapter:hover { border-color: #333; background: #1e1e1e; }
.cm-chapter.cm-done { opacity: 0.6; }
.cm-check { font-size: 14px; }
.cm-ch-num { font-size: 10px; color: #ffd700; font-weight: 700; min-width: 35px; }
.cm-ch-title { font-size: 12px; color: #ccc; flex: 1; }
.cm-ch-time { font-size: 10px; color: #666; }

/* Case Studies */
.cs-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cs-filter-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.cs-filter-btn.active { background: #ffd700; color: #111; border-color: #ffd700; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 400px; overflow-y: auto; margin-bottom: 10px; }
.cs-card { background: #1a1a1a; border: 1px solid #222; border-radius: 6px; padding: 12px; cursor: pointer; transition: all 0.2s; }
.cs-card:hover { border-color: #ffd700; transform: translateY(-2px); }
.cs-category { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 9px; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.cs-cat-macro { background: rgba(68,138,255,0.2); color: #448aff; }
.cs-cat-event { background: rgba(255,152,0,0.2); color: #ff9800; }
.cs-cat-reversal { background: rgba(255,23,68,0.2); color: #ff1744; }
.cs-cat-fundamental { background: rgba(0,200,83,0.2); color: #00c853; }
.cs-title { font-size: 13px; color: #e0e0e0; font-weight: 600; margin-bottom: 4px; }
.cs-date { font-size: 10px; color: #888; }
.cs-move { font-size: 12px; color: #ffd700; font-family: 'JetBrains Mono', monospace; margin-top: 4px; }
.cs-detail { padding: 16px; background: #0a0a0a; border: 1px solid #222; border-radius: 8px; }
.cs-detail-header { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-section { margin: 12px 0; }
.cs-section h4 { font-size: 12px; color: #ffd700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.cs-section p { font-size: 12px; color: #ccc; line-height: 1.6; }
.cs-entry-exit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.cs-entry, .cs-exit { background: #1a1a1a; padding: 10px; border-radius: 6px; }
.cs-entry h4, .cs-exit h4 { font-size: 11px; margin-bottom: 4px; }
.cs-decision { background: #1a1a1a; padding: 12px; border-radius: 6px; margin: 8px 0; border-left: 3px solid #ffd700; }
.cs-dp-q { font-size: 12px; color: #e0e0e0; margin-bottom: 8px; }
.cs-dp-btns { display: flex; gap: 6px; margin-bottom: 8px; }
.cs-dp-buy { background: #00c853; color: #fff; border-color: #00c853; }
.cs-dp-sell { background: #ff1744; color: #fff; border-color: #ff1744; }
.cs-dp-hold { background: #448aff; color: #fff; border-color: #448aff; }
.cs-dp-close { background: #ff9800; color: #fff; border-color: #ff9800; }
.cs-correct { color: #00c853; font-weight: 700; margin-bottom: 4px; }
.cs-wrong { color: #ff1744; font-weight: 700; margin-bottom: 4px; }
.cs-lessons { list-style: none; padding: 0; }
.cs-lessons li { font-size: 12px; color: #ccc; padding: 4px 0; border-bottom: 1px solid #1a1a1a; }
.cs-lessons li::before { content: '→ '; color: #ffd700; }

/* Flashcard System */
.fc-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.fc-filter-btn { padding: 4px 10px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 10px; cursor: pointer; }
.fc-filter-btn.active { background: #448aff; color: #fff; border-color: #448aff; }
.fc-progress { font-size: 11px; color: #888; margin-bottom: 8px; }
.fc-card { background: #1a1a1a; border: 2px solid #333; border-radius: 12px; padding: 24px; min-height: 150px; cursor: pointer; transition: all 0.3s; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fc-card:hover { border-color: #ffd700; }
.fc-cat-badge { font-size: 9px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.fc-diff { font-size: 9px; padding: 1px 6px; border-radius: 3px; margin-bottom: 12px; }
.fc-diff-easy { background: rgba(0,200,83,0.2); color: #00c853; }
.fc-diff-medium { background: rgba(255,152,0,0.2); color: #ff9800; }
.fc-diff-hard { background: rgba(255,23,68,0.2); color: #ff1744; }
.fc-question { font-size: 16px; color: #e0e0e0; font-weight: 600; line-height: 1.4; }
.fc-tap-hint { font-size: 10px; color: #555; margin-top: 12px; }
.fc-answer { font-size: 14px; color: #ffd700; line-height: 1.5; padding: 12px; background: #0a0a0a; border-radius: 8px; margin-top: 12px; }
.fc-rating { margin-top: 12px; text-align: center; }
.fc-rate-label { font-size: 11px; color: #888; display: block; margin-bottom: 8px; }
.fc-rate-btns { display: flex; gap: 8px; justify-content: center; }
.fc-rate-btn { padding: 8px 16px; border-radius: 6px; font-size: 12px; cursor: pointer; border: 1px solid #333; transition: all 0.2s; }
.fc-rate-hard { background: rgba(255,23,68,0.15); color: #ff1744; }
.fc-rate-hard:hover { background: #ff1744; color: #fff; }
.fc-rate-med { background: rgba(255,152,0,0.15); color: #ff9800; }
.fc-rate-med:hover { background: #ff9800; color: #fff; }
.fc-rate-easy { background: rgba(0,200,83,0.15); color: #00c853; }
.fc-rate-easy:hover { background: #00c853; color: #fff; }
.fc-complete { text-align: center; padding: 20px; }

/* Glossary */
.gl-controls { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
.gl-search { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px 10px; color: #e0e0e0; font-size: 12px; flex: 1; min-width: 120px; }
.gl-filter-btn { padding: 3px 8px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 10px; cursor: pointer; }
.gl-filter-btn.active { background: #448aff; color: #fff; border-color: #448aff; }
.gl-letters { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; }
.gl-letter { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: #1a1a1a; border-radius: 3px; font-size: 10px; color: #888; cursor: pointer; }
.gl-letter:hover { background: #ffd700; color: #111; }
.gl-list { max-height: 400px; overflow-y: auto; }
.gl-item { padding: 10px; background: #1a1a1a; border-radius: 6px; margin-bottom: 4px; border-left: 3px solid #448aff; }
.gl-term { font-size: 13px; color: #ffd700; font-weight: 700; margin-bottom: 3px; }
.gl-def { font-size: 12px; color: #ccc; line-height: 1.5; }
.gl-meta { display: flex; gap: 8px; margin-top: 4px; font-size: 10px; }
.gl-cat { color: #888; background: #222; padding: 1px 6px; border-radius: 3px; }
.gl-related { color: #666; }

/* Market Scenarios */
.sc-filters { display: flex; gap: 6px; margin-bottom: 10px; }
.sc-diff-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.sc-diff-btn.active { background: #ff9800; color: #fff; border-color: #ff9800; }
.sc-progress { font-size: 11px; color: #888; margin-bottom: 8px; }
.sc-scenario { background: #1a1a1a; border-radius: 8px; padding: 16px; }
.sc-diff { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 9px; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.sc-diff-beginner { background: rgba(0,200,83,0.2); color: #00c853; }
.sc-diff-intermediate { background: rgba(255,152,0,0.2); color: #ff9800; }
.sc-diff-expert { background: rgba(255,23,68,0.2); color: #ff1744; }
.sc-situation { font-size: 12px; color: #ccc; line-height: 1.6; margin: 8px 0; }
.sc-context { display: flex; gap: 16px; font-size: 12px; color: #aaa; margin: 10px 0; padding: 8px; background: #0a0a0a; border-radius: 4px; }
.sc-context .text-gold { color: #ffd700; }
.sc-actions { display: flex; gap: 8px; margin: 12px 0; }
.sc-fb { margin-top: 12px; padding: 12px; border-radius: 6px; }
.sc-fb-good { background: rgba(0,200,83,0.1); border: 1px solid rgba(0,200,83,0.3); }
.sc-fb-bad { background: rgba(255,23,68,0.1); border: 1px solid rgba(255,23,68,0.3); }
.sc-fb-score { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.sc-fb p { font-size: 12px; color: #ccc; line-height: 1.5; }
.sc-fb-all { margin-top: 8px; }
.sc-fb-all h5 { font-size: 11px; color: #888; margin-bottom: 4px; }
.sc-fb-opt { font-size: 11px; color: #aaa; padding: 4px 0; }
.sc-fb-chosen { color: #ffd700; font-weight: 700; }
.sc-complete { text-align: center; padding: 20px; }

/* Checklists */
.cl-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.cl-tab { padding: 5px 14px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.cl-tab.active { background: #00c853; color: #fff; border-color: #00c853; }
.cl-progress-bar { height: 6px; background: #1a1a1a; border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.cl-items { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.cl-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: #1a1a1a; border-radius: 4px; font-size: 12px; color: #ccc; cursor: pointer; }
.cl-item input[type="checkbox"] { accent-color: #00c853; }
.cl-actions { display: flex; gap: 6px; margin-top: 8px; }

/* Resource Hub */
.res-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.res-filter-btn { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.res-filter-btn.active { background: #ffd700; color: #111; border-color: #ffd700; }
.res-grid { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.res-card { display: flex; gap: 10px; padding: 10px; background: #1a1a1a; border-radius: 6px; border: 1px solid #222; }
.res-icon { font-size: 24px; flex-shrink: 0; }
.res-title { font-size: 13px; color: #e0e0e0; font-weight: 600; }
.res-desc { font-size: 11px; color: #888; line-height: 1.4; margin-top: 2px; }
.res-cat { font-size: 10px; color: #666; margin-top: 3px; }

/* ===== ADVANCED JOURNAL ===== */

/* Equity Curve & Trade Stats */
.ec-svg { width: 100%; background: #0a0a0a; border-radius: 6px; }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 10px; }
.ts-item { background: #1a1a1a; padding: 8px; border-radius: 4px; text-align: center; }
.ts-item.ts-span { grid-column: span 2; }
.ts-lbl { display: block; font-size: 9px; color: #666; text-transform: uppercase; }
.ts-val { display: block; font-size: 14px; font-weight: 700; color: #e0e0e0; font-family: 'JetBrains Mono', monospace; }

/* Tag Performance */
.tag-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.tag-table th { color: #888; text-transform: uppercase; font-size: 10px; padding: 6px; text-align: left; border-bottom: 1px solid #333; }
.tag-table td { padding: 6px; border-bottom: 1px solid #1a1a1a; color: #ccc; }
.tag-badge { display: inline-block; padding: 1px 8px; background: #222; border-radius: 3px; color: #ffd700; font-size: 10px; }
.tag-presets { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.tag-preset { padding: 3px 8px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 10px; cursor: pointer; }
.tag-preset:hover { border-color: #ffd700; color: #ffd700; }

/* Detailed Review */
.dr-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.dr-tab { padding: 4px 12px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; color: #aaa; font-size: 11px; cursor: pointer; }
.dr-tab.active { background: #448aff; color: #fff; border-color: #448aff; }
.dr-form { display: flex; flex-direction: column; gap: 6px; }
.dr-form textarea, .dr-form input, .dr-form select { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; }
.dr-form textarea { min-height: 60px; resize: vertical; }
.dr-form label { font-size: 11px; color: #888; display: flex; align-items: center; gap: 6px; }
.ai-grade { font-size: 14px; color: #e0e0e0; margin-bottom: 8px; }
.grade-badge { display: inline-block; padding: 2px 12px; background: #ffd700; color: #111; border-radius: 4px; font-weight: 700; font-size: 16px; }
.ai-review-text { font-size: 12px; color: #ccc; line-height: 1.6; padding: 10px; background: #1a1a1a; border-radius: 6px; border-left: 3px solid #ffd700; }

/* Risk Journal */
.rj-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.rj-form input { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; }
.rj-form label { font-size: 10px; color: #888; display: flex; flex-direction: column; gap: 2px; }
.rj-score { text-align: center; margin-bottom: 10px; }
.rj-score-label { display: block; font-size: 10px; color: #888; text-transform: uppercase; }
.rj-score-val { display: block; font-size: 28px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.rj-score-sub { display: block; font-size: 11px; color: #888; }
.text-gold { color: #ffd700; }
.rj-calendar { display: flex; gap: 4px; justify-content: center; margin: 10px 0; }
.rj-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 4px; font-size: 10px; }
.rj-compliant { background: rgba(0,200,83,0.1); color: #00c853; }
.rj-violated { background: rgba(255,23,68,0.1); color: #ff1744; }
.rj-recent { display: flex; flex-direction: column; gap: 3px; }
.rj-log-item { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; background: #1a1a1a; border-radius: 4px; font-size: 11px; color: #aaa; }

/* Trade Plans */
.tp-plan { background: #1a1a1a; border-radius: 6px; padding: 12px; margin-bottom: 8px; }
.tp-name { font-size: 13px; color: #ffd700; margin-bottom: 8px; }
.tp-items { display: flex; flex-direction: column; gap: 3px; }
.tp-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #ccc; padding: 4px 0; }
.tp-num { background: #333; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #ffd700; flex-shrink: 0; }

/* Monthly Report */
.mr-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mr-month { font-size: 16px; color: #ffd700; font-weight: 700; }
.mr-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-bottom: 12px; }
.mr-stat { background: #1a1a1a; padding: 8px; border-radius: 4px; text-align: center; }
.mr-lbl { display: block; font-size: 9px; color: #666; text-transform: uppercase; }
.mr-val { display: block; font-size: 14px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.mr-trades { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mr-best, .mr-worst { background: #1a1a1a; padding: 10px; border-radius: 6px; }
.mr-best h5, .mr-worst h5 { font-size: 11px; margin-bottom: 4px; }
.mr-best p, .mr-worst p { font-size: 12px; color: #ccc; }
.mr-dow-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.mr-dow-item { background: #0a0a0a; padding: 6px 10px; border-radius: 4px; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* Improvement Goals */
.goal-form { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; align-items: flex-end; }
.goal-form input, .goal-form select { background: #1a1a1a; border: 1px solid #333; border-radius: 4px; padding: 6px; color: #e0e0e0; font-size: 12px; }
.goal-form label { font-size: 10px; color: #888; display: flex; flex-direction: column; gap: 2px; }
.goal-item { margin-bottom: 10px; }
.goal-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.goal-name { font-size: 12px; color: #e0e0e0; font-weight: 600; }
.goal-pct { font-size: 12px; color: #ffd700; font-family: 'JetBrains Mono', monospace; }
.goal-detail { font-size: 10px; color: #888; margin-top: 4px; }
.goal-progress-bar { height: 8px; background: #1a1a1a; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.goal-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #ff9800); border-radius: 4px; transition: width 0.5s ease; }

/* ===== MISSING GRID CLASSES ===== */
.grid { display: grid; gap: 14px; padding: 0; max-width: 2200px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ===== SECTION TITLE BAR FIX ===== */
.tab-content > .section-title-bar:first-child { margin-top: 0; }

/* ===== GENERIC REUSABLE: FILTER/TAB BUTTONS ===== */
.btn-filter { padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; color: var(--text-dim); font-size: 11px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; }
.btn-filter:hover { border-color: rgba(232,184,48,0.15); color: var(--text); }
.btn-filter.active { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }

/* Pattern library and filter containers — spacing between filters and content */
.candle-lib-wrap, .chart-pattern-wrap, .infographic-wrap, .video-academy-wrap { display: flex; flex-direction: column; gap: 12px; }
.candle-filters, .chart-filters, .infographic-tabs, .video-category-tabs,
.lp-tabs, .concept-tabs, .anim-tabs, .cs-tabs, .fc-tabs, .quiz-tabs,
.resource-tabs, .glossary-tabs, .checklist-tabs, .scenario-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.candlestick-grid, .chart-pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.indicator-lib-list { display: flex; flex-direction: column; gap: 6px; }
.data-src-badge { display: inline-block; padding: 3px 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 4px; font-size: 9px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.5px; margin-left: auto; text-transform: uppercase; }

/* ===== GENERIC MODAL SYSTEM ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #111; border: 1px solid #333; border-radius: 12px; padding: 24px; max-width: 600px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; }
.modal-content.modal-video { max-width: 800px; padding: 16px; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: #888; font-size: 24px; cursor: pointer; z-index: 1; }
.modal-close:hover { color: #fff; }

/* ===== VIDEO ACADEMY ENHANCEMENTS ===== */
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-height: 600px; overflow-y: auto; }
.vid-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; cursor: pointer; transition: all 0.2s ease; }
.vid-card:hover { border-color: rgba(232,184,48,0.15); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.vid-card.vid-watched { opacity: 0.7; }
.vid-thumb { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.vid-card:hover .vid-thumb img { transform: scale(1.05); }
.vid-duration { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.85); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; font-family: var(--mono); }
.vid-check { position: absolute; top: 4px; right: 4px; background: var(--green); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; }
.vid-info { padding: 10px; }
.vid-title { font-size: 12px; color: var(--text-bright); font-weight: 600; line-height: 1.3; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-meta { display: flex; gap: 6px; align-items: center; font-size: 10px; flex-wrap: wrap; }
.vid-diff { padding: 1px 6px; border-radius: 3px; font-size: 9px; text-transform: uppercase; font-weight: 700; }
.vid-diff-beginner { background: rgba(0,210,106,0.15); color: var(--green); }
.vid-diff-intermediate { background: rgba(232,184,48,0.15); color: var(--gold); }
.vid-diff-advanced { background: rgba(255,45,85,0.15); color: var(--red); }
.vid-diff-expert { background: rgba(167,139,250,0.15); color: var(--purple); }
.vid-filter-btn { padding: 4px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); font-size: 11px; cursor: pointer; transition: all 0.2s ease; }
.vid-filter-btn.active { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.vid-player-wrap { position: relative; width: 100%; padding-bottom: 56.25%; margin-bottom: 10px; }
.vid-player-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 8px; }

/* ===== CANDLESTICK/CHART PATTERN ENHANCEMENTS ===== */
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; max-height: 500px; overflow-y: auto; }
.cp-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.cp-card:hover { border-color: rgba(232,184,48,0.4); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(232,184,48,0.12); background: rgba(232,184,48,0.03); }
.chp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; max-height: 500px; overflow-y: auto; }
.chp-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.chp-card:hover { border-color: rgba(68,138,255,0.3); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* ===== INDICATOR EXPLAINERS ENHANCEMENTS ===== */
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ind-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg-card); border-radius: 6px; cursor: pointer; transition: all 0.2s ease; border: 1px solid rgba(255,255,255,0.06); }
.ind-card:hover { border-color: rgba(232,184,48,0.15); background: var(--bg-hover); }

/* ===== INFOGRAPHICS TAB ENHANCEMENTS ===== */
.ig-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.ig-tab { padding: 5px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); font-size: 11px; cursor: pointer; transition: all 0.2s ease; }
.ig-tab.active { background: var(--gold); color: #111; border-color: var(--gold); font-weight: 700; }
.ig-display { padding: 10px 0; }

/* ===== COURSE MODULES ENHANCEMENTS ===== */
.cm-chapter-list { display: flex; flex-direction: column; gap: 4px; max-height: 400px; overflow-y: auto; }
.cm-content { padding: 12px; background: #0a0a0a; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); line-height: 1.6; font-size: 12px; color: var(--text); }
.cm-chapter-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-card); border-radius: 4px; cursor: pointer; border: 1px solid transparent; transition: all 0.2s ease; }
.cm-chapter-item:hover { border-color: rgba(255,255,255,0.06); background: var(--bg-hover); }
.cm-chapter-item.active { border-color: var(--gold); background: rgba(232,184,48,0.06); }

/* ===== CASE STUDIES ENHANCEMENTS ===== */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; max-height: 400px; overflow-y: auto; margin-bottom: 10px; }
.cs-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: all 0.2s ease; }
.cs-card:hover { border-color: rgba(232,184,48,0.15); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.cs-detail { padding: 16px; background: #0a0a0a; border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }
.cs-decision { background: var(--bg-card); padding: 12px; border-radius: 6px; margin: 8px 0; border-left: 3px solid var(--gold); }

/* ===== FLASHCARD SYSTEM ENHANCEMENTS ===== */
.fc-display { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; }
.fc-card { background: var(--bg-card); border: 2px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 24px; min-height: 150px; cursor: pointer; transition: all 0.3s ease; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 500px; }
.fc-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(232,184,48,0.1); }
.fc-front, .fc-back { width: 100%; }
.fc-back { display: none; }
.fc-card.flipped .fc-front { display: none; }
.fc-card.flipped .fc-back { display: block; }
.fc-rating-btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.fc-stats { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; font-size: 11px; color: var(--text-dim); }
.fc-stats span { font-family: var(--mono); color: var(--text-bright); }
.fc-filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }

/* ===== GLOSSARY ENHANCEMENTS ===== */
.gl-search { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 6px 10px; color: var(--text-bright); font-size: 12px; flex: 1; min-width: 120px; outline: none; transition: border-color 0.2s ease; }
.gl-search:focus { border-color: var(--gold); }
.gl-alpha-bar { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; }
.gl-alpha-btn { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid transparent; border-radius: 3px; font-size: 10px; color: var(--text-dim); cursor: pointer; transition: all 0.2s ease; }
.gl-alpha-btn:hover, .gl-alpha-btn.active { background: var(--gold); color: #111; }
.gl-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.gl-term { font-size: 13px; color: var(--gold); font-weight: 700; margin-bottom: 3px; cursor: pointer; }
.gl-term:hover { text-decoration: underline; }

/* ===== SCENARIO BANK ENHANCEMENTS ===== */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.sc-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: all 0.2s ease; }
.sc-card:hover { border-color: rgba(232,184,48,0.15); transform: translateY(-1px); }
.sc-detail { padding: 16px; background: #0a0a0a; border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }

/* ===== TRADING CHECKLISTS ENHANCEMENTS ===== */
.cl-item.checked { opacity: 0.6; }
.cl-item.checked span { text-decoration: line-through; color: var(--text-dim); }

/* ===== RESOURCE HUB ENHANCEMENTS ===== */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 400px; overflow-y: auto; }
.res-card { display: flex; gap: 10px; padding: 12px 14px; background: var(--bg-card); border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); transition: all 0.2s ease; cursor: pointer; }
.res-card:hover { border-color: rgba(232,184,48,0.15); }
.res-card a { color: var(--text-bright); text-decoration: none; }
.res-card a:hover { color: var(--gold); }
.res-type { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 9px; text-transform: uppercase; font-weight: 700; }
.res-type-book { background: rgba(61,139,253,0.15); color: var(--blue); }
.res-type-website { background: rgba(0,210,106,0.15); color: var(--green); }
.res-type-tool { background: rgba(232,184,48,0.15); color: var(--gold); }
.res-type-podcast { background: rgba(167,139,250,0.15); color: var(--purple); }
.res-type-course { background: rgba(255,152,11,0.15); color: var(--orange); }

/* ===== TRADE SIMULATOR ENHANCEMENTS ===== */
.sim-chart { width: 100%; height: 300px; background: #0a0a0a; border-radius: 6px; overflow: hidden; position: relative; }
.sim-btn { padding: 6px 16px; border-radius: 4px; font-size: 11px; font-weight: 700; cursor: pointer; border: none; transition: all 0.2s ease; }
.sim-btn:hover { opacity: 0.85; }
.sim-pnl { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.sim-pnl.positive { color: var(--green); }
.sim-pnl.negative { color: var(--red); }
.sim-history-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 8px; }
.sim-history-table th { color: var(--text-dim); text-transform: uppercase; font-size: 9px; padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--border); }
.sim-history-table td { padding: 5px 4px; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text); font-family: var(--mono); }

/* ===== LEARNING PATHS ENHANCEMENTS ===== */
.lp-progress { height: 8px; background: #1a1a1a; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.lp-step.completed { opacity: 0.6; }
.lp-step.completed .lp-step-check { color: var(--green); }
.lp-step.current { border-color: var(--gold); background: rgba(232,184,48,0.06); }

/* ===== ANIMATED CONCEPTS ENHANCEMENTS ===== */
.amc-frame { background: #0a0a0a; border-radius: 8px; padding: 16px; display: flex; align-items: center; justify-content: center; min-height: 200px; margin-bottom: 10px; }
.amc-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.amc-controls button { padding: 6px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: 11px; cursor: pointer; transition: all 0.2s ease; }
.amc-controls button:hover { border-color: var(--gold); color: var(--gold); }
.amc-nav { display: flex; align-items: center; justify-content: center; gap: 6px; }
.amc-nav .amc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.2s ease; }
.amc-nav .amc-dot.active { background: var(--gold); }

/* ===== EMOTION WHEEL / PSYCHOLOGY ENHANCEMENTS ===== */
.ew-container { display: flex; align-items: center; justify-content: center; padding: 16px; }
.ew-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: center; }
.ew-legend-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-dim); }
.ew-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.breath-timer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; }

/* ===== EQUITY CURVE ENHANCEMENTS ===== */
.ec-chart { width: 100%; height: 200px; background: #0a0a0a; border-radius: 6px; overflow: hidden; }
.ec-chart svg { width: 100%; height: 100%; }
.ec-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-top: 10px; }

/* ===== TRADE TAGS / STATS ENHANCEMENTS ===== */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.tag-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: rgba(232,184,48,0.08); border: 1px solid rgba(232,184,48,0.15); border-radius: 20px; font-size: 10px; color: var(--gold); cursor: pointer; transition: all 0.2s ease; }
.tag-pill:hover { background: rgba(232,184,48,0.15); border-color: var(--gold); }
.tag-pill .tag-count { font-family: var(--mono); font-size: 9px; color: var(--text-dim); }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 10px; }

/* ===== DETAILED REVIEW ENHANCEMENTS ===== */
.dr-select { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 6px 10px; color: var(--text-bright); font-size: 12px; width: 100%; margin-bottom: 10px; outline: none; }
.dr-select:focus { border-color: var(--gold); }
.dr-tab-content { padding: 10px 0; }

/* ===== MONTHLY REPORT ENHANCEMENTS ===== */
.mr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-bottom: 12px; }
.mr-heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 10px; }
.mr-heatmap-day { width: 100%; aspect-ratio: 1; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-family: var(--mono); cursor: default; transition: all 0.2s ease; }
.mr-heatmap-day.mr-win { background: rgba(0,210,106,0.2); color: var(--green); }
.mr-heatmap-day.mr-loss { background: rgba(255,45,85,0.2); color: var(--red); }
.mr-heatmap-day.mr-empty { background: rgba(255,255,255,0.02); color: transparent; }

/* ===== GLOBAL UX POLISH ===== */
/* Smooth transitions on all interactive elements */
.card, .btn-sm, .tab-btn, .sm-item, .news-item, .data-row { transition: all 0.15s ease; }
a, button, .btn-gold, .badge, .pill, .sm-item, .tab-btn, .pt-dir-btn, .pt-open-btn, .pt-close-btn, .pt-history-btn { transition: all 0.15s ease; }

/* Touch-friendly tap targets */
.btn-sm, button.btn-sm, .pt-dir-btn, .pt-open-btn, .sm-item, .tab-btn { min-height: 44px; }

/* Empty state styling */
.empty-state, .lb-empty, .no-ideas, [class*="-empty"] {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-dim);
    font-size: 13px;
    font-style: italic;
}
.empty-state-icon { font-size: 28px; margin-bottom: 8px; display: block; opacity: 0.5; }
.empty-state-hint { font-size: 11px; color: var(--text-dim); margin-top: 6px; font-style: normal; }

/* Gold accent pulse animation for live badges */
@keyframes pulse-gold { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.badge-live, [class*="badge-live"] { animation: pulse-gold 2s ease-in-out infinite; }

/* Better scrollbar for card content */
.card::-webkit-scrollbar { width: 4px; }
.card::-webkit-scrollbar-thumb { background: rgba(232,184,48,0.2); border-radius: 2px; }

/* Tooltip-style hover for data values */
.data-val:hover { color: var(--gold); cursor: default; }

/* Focus ring for accessibility */
/* Inputs: enhanced focus ring for keyboard users */
.card input:focus-visible, .card select:focus-visible, .card textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    border-color: var(--gold);
}
/* Buttons keep outline for keyboard accessibility */
button:focus-visible, .tab-btn:focus-visible, a:focus-visible, .sm-item:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
/* Skip link for keyboard navigation */
.skip-link { position: absolute; top: -100%; left: 16px; background: var(--gold); color: #000; padding: 8px 16px; border-radius: 4px; font-weight: 700; font-size: 13px; z-index: 10000; text-decoration: none; }
.skip-link:focus { top: 8px; }

/* Loading text spinner */
.loading-text, .playbook-loading, .expectations-loading, .forecast-loading, .riskzones-loading { text-align: center; color: var(--text-dim); font-size: 12px; padding: 16px; }
.loading-text::before, .playbook-loading::before, .expectations-loading::before, .forecast-loading::before, .riskzones-loading::before { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: gt-spin 0.6s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes gt-spin { to { transform: rotate(360deg); } }

/* Pulse loading animation for placeholder text */
.pulse-loading { animation: pulseLoad 1.5s ease-in-out infinite; }
@keyframes pulseLoad { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Typing animation for AI loading states */
.typing-loading { position: relative; }
.typing-loading::after { content: ''; display: inline-block; width: 3px; height: 1em; background: var(--gold); margin-left: 2px; vertical-align: text-bottom; animation: typingBlink 0.8s step-end infinite; }
@keyframes typingBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Consistent card min-height to prevent layout shift */
.card { min-height: 80px; }
.card-chart { min-height: 400px; }

/* Card loading skeleton */
.skeleton-text {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    color: transparent;
    user-select: none;
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 1200px) { .dashboard { grid-template-columns: 1fr 1fr; } .section-grid.g-4 { grid-template-columns: 1fr 1fr; } .section-grid.g-3 { grid-template-columns: 1fr 1fr; } .section-grid.g-2-1 { grid-template-columns: 1fr; } .section-grid.g-chart { grid-template-columns: 1fr 300px; } .grid-3 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Tablet */
@media (max-width: 1024px) {
    .tab-bar { padding: 6px 8px; }
    .tab-btn { padding: 6px 14px; font-size: 12px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Tab bar: horizontally scrollable */
    .tab-bar { gap: 1px; padding: 4px 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; scrollbar-width: none; }
    .tab-bar::-webkit-scrollbar { display: none; }
    .tab-btn { padding: 6px 12px; font-size: 11px; flex-shrink: 0; min-height: 36px; }
    /* Cards stack single column */
    .section-grid.g-chart { grid-template-columns: 1fr !important; }
    .section-grid.g-2, .section-grid.g-2-1, .section-grid.g-3, .section-grid.g-4 { grid-template-columns: 1fr !important; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .card { padding: 12px; border-radius: 10px; }
    .card-header { padding: 8px 12px; margin: -12px -12px 10px -12px; }
    /* Chart min-height for mobile */
    .card-chart { min-height: 350px; }
    .card-chart .widget-wrap { min-height: 330px; }
    /* Info panel stacks below chart, full width */
    .card-info-panel { width: 100%; }
    .info-panel { padding: 14px; }
    .info-price { font-size: 26px !important; }
    /* Paper trading full-width */
    .info-trade-section { width: 100%; }
    .pt-form-row { flex-wrap: wrap; }
    .pt-form-row > * { flex: 1 1 calc(50% - 4px); min-width: 0; }
    /* Slightly larger base font for mobile readability */
    .card, .data-val, .data-lbl, .news-item { font-size: 13px; }
    .section-title-bar { font-size: 13px; }
    /* Fix challenge chart + order panel stacking */
    [style*="display:flex"][style*="height:500px"] { flex-direction: column !important; height: auto !important; }
    [style*="width:280px"] { width: 100% !important; }
    /* Fix news 2-column layout stacking */
    [style*="grid-template-columns:2fr 1fr"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: 2fr 1fr"] { grid-template-columns: 1fr !important; }
    /* Touch-friendly spacing between interactive elements */
    .sm-item + .sm-item { margin-top: 2px; }
    .btn-sm + .btn-sm, button + button { margin-left: 4px; }
}

@media (max-width: 800px) { .dashboard { grid-template-columns: 1fr; } .hero-price { display: none; } .info-perf-grid { grid-template-columns: repeat(3, 1fr); } .grid-1 { grid-template-columns: 1fr; } }

/* Tablet: side menu as collapsible drawer */
@media (max-width: 768px) and (min-width: 641px) {
    .side-menu {
        transform: translateX(-100%);
        width: 220px !important;
        z-index: 9999;
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }
    .side-menu.expanded {
        transform: translateX(0);
    }
    .side-menu .sm-item-label { display: inline !important; }
    /* Drawer is always full width here, so the Menu label shows regardless of .expanded */
    .side-menu .sm-header-label { display: inline !important; }
    .side-menu .sm-header { width: calc(100% - 16px); justify-content: flex-start; padding-left: 14px; gap: 12px; }
    .side-menu .sm-tooltip { display: none !important; }
    body.has-sidemenu { margin-left: 0 !important; }
    body.has-sidemenu .top-bar { left: 0 !important; }
    body.has-sidemenu.sm-expanded { margin-left: 0 !important; }
    body.has-sidemenu.sm-expanded .top-bar { left: 0 !important; }
    /* Hamburger button */
    .hamburger-btn { display: flex !important; }
    /* Overlay when drawer is open */
    .drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; }
    .drawer-overlay.active { display: block; }
}

/* Mobile: collapse side menu into bottom nav */
@media (max-width: 640px) {
    .hamburger-btn { display: none !important; }
    /* Bottom Navigation Bar */
    .side-menu {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        width: 100% !important; height: 60px;
        flex-direction: row; justify-content: space-evenly; align-items: center;
        padding: 4px 0; border-right: none;
        border-top: 1px solid rgba(232,184,48,0.15);
        background: linear-gradient(180deg, var(--bg-card), var(--bg)) !important;
        overflow-x: auto; overflow-y: hidden;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 9990;
        transform: none;
        box-shadow: none;
    }
    .side-menu .sm-toggle { display: none; }
    /* Bottom nav has no collapse concept — a hamburger here would toggle nothing visible */
    .side-menu .sm-header { display: none; }
    .side-menu .sm-divider { display: none; }
    .sm-item {
        width: auto; height: auto; margin: 0;
        font-size: 18px; flex-shrink: 0;
        display: flex; flex-direction: column; align-items: center;
        gap: 2px; padding: 4px 8px; border-radius: 8px;
        transition: all 0.15s;
        min-height: 44px; min-width: 44px;
        justify-content: center;
    }
    .sm-item.active {
        background: rgba(232,184,48,0.12);
    }
    .sm-item svg { width: 18px; height: 18px; }
    .sm-item-label {
        display: block !important;
        font-size: 8px !important;
        font-weight: 600;
        color: var(--text-dim);
        letter-spacing: 0.3px;
    }
    .sm-item.active .sm-item-label { color: var(--gold); }
    .sm-item[style*="margin-top:auto"] { margin-top: 0 !important; }
    .sm-tooltip { display: none !important; }

    /* Body adjustments */
    body.has-sidemenu { margin-left: 0 !important; padding-bottom: 68px; }
    body.has-sidemenu .top-bar { left: 0 !important; }
    body.has-sidemenu.sm-expanded { margin-left: 0 !important; }
    body.has-sidemenu.sm-expanded .top-bar { left: 0 !important; }
    .side-menu.expanded { width: 100% !important; }

    /* Top bar compact */
    .top-bar { padding: 0 10px; height: 42px; }
    .top-bar .logo-text { font-size: 13px; }
    .top-bar .logo-sub { display: none; }
    .top-bar .conn-status { display: none; }

    /* Tab bar */
    .tab-bar { top: 42px; padding: 4px 6px; gap: 2px; }
    .tab-btn { padding: 5px 10px; font-size: 10px; border-radius: 4px; }

    /* Ticker tape */
    .ticker-tape { font-size: 10px; height: 22px; }
    .tape-item { padding: 0 6px; }

    /* Content */
    .section { padding: 0 8px; }
    .section + .section { margin-top: 14px; }
    .section-title-bar { padding: 8px 10px; font-size: 12px; margin-bottom: 8px; }
    .card { padding: 12px; border-radius: 10px; }
    .card-header { padding: 8px 12px; margin: -12px -12px 10px -12px; }
    .card h3 { font-size: 13px; }

    /* Info panel */
    .info-panel { font-size: 12px; }
    .info-price { font-size: 28px !important; }
    .info-perf-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }

    /* Trade widget */
    .info-trade-section { padding: 8px 0; }
    .pt-balance-row { gap: 6px; }
    .pt-form-row { gap: 6px; }
    .pt-dir-btn { padding: 8px 12px; font-size: 12px; }
    .pt-open-trade { font-size: 10px; padding: 4px 6px; }
    .pt-trade-pnl { font-size: 11px; min-width: 60px; }
    .pt-close-btn { padding: 3px 8px; font-size: 9px; }

    /* Chat */
    .chat-widget { width: calc(100vw - 16px) !important; right: 8px !important; bottom: 68px !important; }
    #chatFab { bottom: 72px !important; right: 12px !important; width: 46px; height: 46px; font-size: 18px; }

    /* Challenge */
    [style*="width:320px"] { width: 100% !important; }
    [style*="height:500px"] { height: 350px !important; }

    /* News grid */
    [style*="grid-template-columns:2fr"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns: 2fr"] { grid-template-columns: 1fr !important; }

    /* Cards */
    .vid-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .cp-grid, .chp-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-grid, .res-grid, .ind-grid, .sc-grid { grid-template-columns: 1fr; }
    .fc-card { padding: 14px; min-height: 100px; }
    .sim-chart { height: 180px; }
    .mr-heatmap { grid-template-columns: repeat(7, 1fr); gap: 2px; }
    .modal-content { padding: 14px; margin: 8px; max-height: 90vh; }
    #goldCurrenciesGrid { grid-template-columns: 1fr 1fr !important; }

    /* Kelly/Backtester forms */
    .kelly-form input, .greeks-form input, .greeks-form select { width: 70px; }
    .bt-row { flex-wrap: wrap; }
    .bt-row select { width: 100%; }

    /* Trial banner */
    .trial-banner { font-size: 11px; padding: 6px 10px; gap: 6px; }
}

/* Small phones */
@media (max-width: 480px) {
    html { font-size: 11px; }
    #goldCurrenciesGrid { grid-template-columns: 1fr !important; }
    .info-perf-grid { grid-template-columns: repeat(2, 1fr); }
    .sm-item { padding: 4px 5px; min-height: 44px; min-width: 40px; }
    .sm-item-label { font-size: 7px !important; }
    .tab-btn { padding: 5px 10px; font-size: 10px; min-height: 36px; }
    .card { padding: 10px; border-radius: 8px; }
    .card-header { padding: 6px 10px; margin: -10px -10px 8px -10px; }
    .card h3 { font-size: 12px; }
    .section { padding: 0 6px; }
    .section-title-bar { font-size: 11px; padding: 6px 8px; }
    /* Chart shorter on small phones */
    .card-chart { min-height: 280px; }
    .card-chart .widget-wrap { min-height: 260px; }
    .info-price { font-size: 22px !important; }
    /* Paper trading compact */
    .pt-dir-btn { padding: 8px 10px; font-size: 11px; min-height: 44px; }
    .pt-form-row > * { flex: 1 1 100%; }
    /* Reduce padding on summary/brief */
    .summary-banner { padding: 6px 8px; }
    .ai-brief-bar { padding: 6px 8px; }
    .modal-content { padding: 12px; margin: 4px; }
}

/* ===== ORDER FLOW (Tokenized Gold PAXG) ===== */
.of-body { display: grid; grid-template-columns: 1fr 280px; gap: 12px; padding: 10px; }
.of-heatmap-wrap { position: relative; height: 380px; background: #08080d; border-radius: 4px; border: 1px solid var(--border); overflow: hidden; }
.of-heatmap-wrap canvas { width: 100%; height: 100%; display: block; }
.of-ladder { display: flex; flex-direction: column; font-family: var(--mono, monospace); font-size: 11px; max-height: 380px; overflow-y: auto; }
.of-ladder-side { display: flex; flex-direction: column; }
.of-row { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 2px 6px; height: 14px; line-height: 14px; }
.of-row .of-bar { position: absolute; right: 0; top: 0; bottom: 0; opacity: 0.18; z-index: 0; }
.of-row .of-bar.bid { background: var(--green); }
.of-row .of-bar.ask { background: var(--red); }
.of-row .of-price, .of-row .of-size { position: relative; z-index: 1; }
.of-row.bid .of-price { color: var(--green); font-weight: 600; }
.of-row.ask .of-price { color: var(--red); font-weight: 600; }
.of-row .of-size { color: var(--text); font-variant-numeric: tabular-nums; }
.of-row.cluster { box-shadow: inset 0 0 0 1px var(--gold); }
.of-row.cluster .of-price { color: var(--gold); }
.of-mid { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; background: rgba(232,184,48,0.08); border-top: 1px solid var(--gold-dim); border-bottom: 1px solid var(--gold-dim); font-size: 10px; color: var(--gold-bright); font-family: var(--mono, monospace); font-weight: 700; letter-spacing: 0.5px; }
.of-mid-px { font-size: 11px; }
.of-footer { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--border); }
.of-stat { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.of-stat-label { font-size: 9px; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; }
.of-stat-val { font-size: 14px; font-weight: 700; font-family: var(--mono, monospace); color: var(--text-bright); }
.of-imb-bar { display: flex; height: 6px; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,0.04); }
.of-imb-bid { background: var(--green); }
.of-imb-ask { background: var(--red); }
.of-imb-num { font-size: 10px; color: var(--text-dim); margin-top: 2px; font-family: var(--mono, monospace); }
.of-status.live { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.of-status.reconnecting { background: rgba(232,184,48,0.10); color: var(--gold); border: 1px solid rgba(232,184,48,0.3); }
.of-status.stale { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.of-info { color: var(--text-dim); cursor: help; margin-left: 6px; font-size: 12px; }
.of-info:hover { color: var(--gold); }

@media (max-width: 900px) {
    .of-body { grid-template-columns: 1fr; }
    .of-heatmap-wrap { height: 280px; }
    .of-ladder { max-height: 320px; }
}

