/* ═══════════════════════════════════════════
   Dashboard Report Styles v6
   Visual overhaul: gauges, bars, fib ruler
   ═══════════════════════════════════════════ */

.dashboard-section { padding: 2rem 0 4rem; }

.dash-card-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dashboard Header */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.dash-ticker-info { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.dash-symbol { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.dash-name { color: var(--text-secondary); font-size: 1rem; }
.dash-price { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.dash-meta { display: flex; align-items: center; gap: 1rem; }
.dash-time { color: var(--text-muted); font-size: 0.85rem; }

/* ─── Score Hero (with arc gauge + integrated options play) ─── */
.score-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
.score-gauge { flex-shrink: 0; }
.score-arc { display: block; }
.score-details { flex: 1; }
.score-dots { display: flex; gap: 5px; margin-bottom: 0.5rem; }
.score-dot { width: 14px; height: 14px; border-radius: 50%; transition: all 0.3s ease; }
.score-dot.filled { opacity: 1; }
.score-dot.empty { opacity: 1; }
.score-mode { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.score-action { color: var(--text-secondary); font-size: 0.95rem; }

/* Options play integrated into hero */
.hero-play { margin-top: 0.5rem; }
.hero-play-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.35rem;
}
.hero-play-details {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.hero-play-stat {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* RSI mini gauge in hero */
.hero-rsi { margin-top: 0.5rem; }
.hero-rsi-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 3px;
}
.hero-rsi-track {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    max-width: 200px;
}
.hero-rsi-zone { height: 100%; }
.hero-rsi-oversold { width: 30%; background: rgba(16,185,129,0.25); }
.hero-rsi-neutral { width: 40%; background: rgba(107,114,128,0.2); }
.hero-rsi-overbought { width: 30%; background: rgba(239,68,68,0.25); }
.hero-rsi-needle {
    position: absolute;
    top: -2px;
    width: 4px;
    height: 10px;
    background: #818cf8;
    border-radius: 2px;
    transform: translateX(-50%);
}

/* ─── Dashboard Chart ─── */
.charts-row { margin-bottom: 1.5rem; }
.chart-cell {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 200px;
}
.chart-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.chart-img { width: 100%; height: auto; display: block; cursor: zoom-in; border-radius: var(--radius-xl); }
.loading-spinner-sm {
    width: 24px; height: 24px;
    border: 3px solid var(--border-dark);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Indicator Strip (visual gauges) ─── */
/* indicator-strip — see compact pills below */
.ind-card-legacy {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.75rem 0.6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ind-ribbon {
    height: 4px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.ind-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    margin-top: 0.2rem;
}
.ind-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Mini gauge (RSI-style) */
.mini-gauge { margin: 0.4rem 0; }
.mini-gauge-track {
    position: relative;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: visible;
    margin-bottom: 0.25rem;
}
.mini-gauge-zone {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
}
.mini-gauge-needle {
    position: absolute;
    top: -2px;
    width: 5px;
    height: 12px;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.5s ease;
    box-shadow: 0 0 4px rgba(255,255,255,0.3);
}
.mini-gauge-val {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Momentum bar (MACD) */
.momentum-bar { margin: 0.4rem 0; }
.momentum-track {
    position: relative;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.momentum-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255,255,255,0.2);
}
.momentum-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: all 0.5s ease;
}

/* Bandwidth gauge (Bollinger) */
.bandwidth-gauge { margin: 0.4rem 0; }
.bandwidth-track {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.bandwidth-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Direction indicator (EMA Stack, Trend) */
.direction-indicator {
    margin: 0.25rem 0;
    line-height: 1;
}

/* ─── Key Levels Ladder (with distance bars) ─── */
.levels-ladder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.levels-ladder { display: flex; flex-direction: column; gap: 0; }
.level-row {
    display: grid;
    grid-template-columns: 50px 100px 1fr 140px;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    gap: 0.75rem;
}
.level-row:nth-child(odd) { background: rgba(255,255,255,0.02); }
.level-tag {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.level-tag.trim { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.level-tag.support { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.level-tag.current { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.level-tag.slow { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.level-tag.fib { background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; }
.level-price { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }
.level-label { color: var(--text-secondary); font-size: 0.85rem; }
.current-row { background: rgba(99, 102, 241, 0.08) !important; border: 1px solid rgba(99, 102, 241, 0.3); }

/* Distance bar */
.level-dist { }
.dist-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dist-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.dist-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.dist-pct {
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 45px;
    text-align: right;
}
.level-here-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #818cf8;
    background: rgba(99,102,241,0.15);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

/* ─── Fibonacci Retracement (Visual Ruler) ─── */
.fib-zone-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.fib-role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}
.fib-visual {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}
.fib-ruler {
    flex-shrink: 0;
    width: 80px;
    display: flex;
    justify-content: center;
}
.fib-ruler-bar {
    position: relative;
    width: 8px;
    height: 180px;
    background: linear-gradient(to top, #ef4444, #6b7280, #10b981);
    border-radius: 4px;
    opacity: 0.3;
}
.fib-ruler-label {
    position: absolute;
    left: 20px;
    white-space: nowrap;
    transform: translateY(50%);
}
.fib-ruler-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.fib-ruler-tag {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 4px;
}
.fib-ruler-zone {
    position: absolute;
    left: -12px;
    right: -12px;
    transform: translateY(50%);
}
.fib-zone-line {
    height: 2px;
    border-radius: 1px;
    width: 100%;
}
.fib-zone-label {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.fib-zone-ratio {
    font-size: 0.7rem;
    font-weight: 700;
    color: #a855f7;
}
.fib-zone-price {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.fib-zone-glow .fib-zone-line {
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
    height: 3px;
}
.fib-ruler-current {
    position: absolute;
    left: -18px;
    transform: translateY(50%);
}
.fib-current-arrow {
    color: #818cf8;
    font-size: 0.9rem;
    text-shadow: 0 0 6px rgba(129,140,248,0.5);
}
.fib-ruler-fill {
    position: absolute;
    left: 0;
    width: 100%;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 4px;
}

.fib-info { flex: 1; }
.fib-swing-info { margin-bottom: 1rem; }
.fib-swing-dir { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.fib-swing-range { font-size: 0.9rem; color: var(--text-primary); font-weight: 600; }
.fib-swing-dates { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }

.fib-level-cards { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.fib-level-card {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-lg);
    transition: box-shadow 0.3s ease;
}
.fib-level-card.fib-glow {
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.6);
}
.fib-level-label {
    font-size: 0.7rem;
    color: #a855f7;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}
.fib-level-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.fib-level-dist {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.15rem;
}
.fib-proximity-badge {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ─── Scenarios (with probability bars) ─── */
.dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.scenarios-card { background: var(--bg-card); border: 1px solid var(--border-dark); border-radius: var(--radius-xl); padding: 1.5rem; }
.scenarios-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.scenario-item { border-radius: var(--radius-lg); padding: 0.75rem 1rem; border-left: 4px solid; }
.scenario-type { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.25rem; display: flex; justify-content: space-between; }
.scenario-prob-badge { font-weight: 700; font-size: 0.85rem; }
.scenario-prob-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.scenario-prob-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    opacity: 0.7;
}
.scenario-trigger { font-size: 0.85rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.scenario-action-text { font-size: 0.8rem; color: var(--text-secondary); }

/* Pattern Card */
.pattern-card { background: var(--bg-card); border: 1px solid var(--border-dark); border-radius: var(--radius-xl); padding: 1.5rem; }
.pattern-content { display: flex; flex-direction: column; gap: 0.75rem; }
.pattern-none { color: var(--text-muted); text-align: center; padding: 2rem 0; }
.pattern-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; background: rgba(255,255,255,0.03); border-radius: var(--radius-md); }
.pattern-name { font-weight: 600; font-size: 0.95rem; }
.pattern-badge { font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: var(--radius-full); }
.pattern-badge.bullish { background: var(--bullish-bg); color: var(--bullish); }
.pattern-badge.bearish { background: var(--bearish-bg); color: var(--bearish); }
.pattern-badge.neutral { background: rgba(107,114,128,0.15); color: var(--neutral-light); }
.pattern-conf-bar { width: 60px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.pattern-conf-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* ─── Options Flow (Individual Block/Sweep Orders) ─── */
.options-analysis-card { background: var(--bg-card); border: 1px solid var(--border-dark); border-radius: var(--radius-xl); padding: 1.5rem; margin-bottom: 1.5rem; }

/* Summary stats bar */
.flow-summary-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.flow-summary-stat {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
}
.flow-summary-val { font-size: 1rem; font-weight: 700; color: var(--text-primary); font-family: 'SF Mono', 'Cascadia Code', monospace; }
.flow-summary-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

/* Call/Put ratio bar */
.flow-cp-bar-wrap { margin-bottom: 0.75rem; }
.flow-cp-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,0.05); }
.flow-cp-call { background: rgba(16,185,129,0.5); height: 100%; transition: width 0.5s; }
.flow-cp-put { background: rgba(239,68,68,0.5); height: 100%; transition: width 0.5s; }
.flow-cp-labels { display: flex; justify-content: space-between; font-size: 0.7rem; margin-top: 4px; }

/* Header row */
.dash-flow-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 6px 0;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}

/* Trade rows */
.dash-flow-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 5px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}
.dash-flow-row:last-child { border-bottom: none; }
.dash-flow-rank { width: 24px; color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }
.dash-flow-type { width: 44px; font-weight: 700; flex-shrink: 0; }
.dash-flow-type.call { color: var(--bullish); }
.dash-flow-type.put { color: var(--bearish); }
.dash-flow-strike { flex: 1; color: var(--text-primary); font-weight: 600; }
.dash-flow-exp { flex: 1; color: var(--text-muted); font-size: 0.8rem; }
.dash-flow-side { width: 40px; font-size: 0.7rem; font-weight: 600; padding: 1px 4px; border-radius: 3px; text-align: center; flex-shrink: 0; }
.dash-flow-side.buy { background: rgba(16, 185, 129, 0.15); color: var(--bullish); }
.dash-flow-side.sell { background: rgba(239, 68, 68, 0.15); color: var(--bearish); }
.dash-flow-side.unknown { background: rgba(139, 148, 158, 0.1); color: var(--text-muted); }
.dash-flow-size { flex: 1; color: var(--text-secondary); font-size: 0.8rem; }
.dash-flow-prem { flex: 1; font-weight: 600; color: #f59e0b; }
.dash-flow-signal { width: 60px; font-size: 0.65rem; font-weight: 700; padding: 1px 4px; border-radius: 3px; text-align: center; flex-shrink: 0; }
.dash-flow-signal.bullish { background: rgba(16, 185, 129, 0.15); color: var(--bullish); }
.dash-flow-signal.bearish { background: rgba(239, 68, 68, 0.15); color: var(--bearish); }
.dash-sweep-badge { font-size: 0.6rem; background: rgba(88, 166, 255, 0.2); color: #58a6ff; padding: 1px 4px; border-radius: 3px; margin-left: 3px; }

/* ─── Macro Bar ─── */
.macro-bar { display: flex; gap: 0; background: var(--bg-card); border: 1px solid var(--border-dark); border-radius: var(--radius-xl); margin-bottom: 1.5rem; overflow: hidden; }
.macro-item { flex: 1; padding: 0.75rem 1rem; text-align: center; border-right: 1px solid var(--border-dark); }
.macro-item:last-child { border-right: none; }
.macro-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.macro-value { font-size: 1rem; font-weight: 700; margin-top: 2px; }
.macro-dir { font-size: 0.75rem; margin-left: 3px; }
.macro-dir.up { color: var(--bullish); }
.macro-dir.down { color: var(--bearish); }

/* ─── Options Play Card (legacy, hidden — now in hero) ─── */
.options-play-card { display: none !important; }

/* ─── Responsive ─── */

/* ─── Compact Indicator Pills ─── */
.indicator-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.ind-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.ind-pill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ind-pill-name { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.65rem; }
.ind-pill-val { font-weight: 700; font-size: 0.75rem; font-family: 'SF Mono', 'Cascadia Code', monospace; }
.ind-pill-status { font-weight: 600; font-size: 0.7rem; }

/* ─── Compact Scenarios ─── */
.scenario-item-compact {
    padding: 6px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    margin-bottom: 4px;
}
.scenario-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.scenario-label { font-weight: 700; font-size: 0.8rem; min-width: 50px; }
.scenario-prob { font-weight: 700; font-size: 0.8rem; min-width: 32px; text-align: right; }
.scenario-bar-inline { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.scenario-trigger-compact { font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; padding-left: 2px; }

/* ─── Compact Scenarios + Patterns side-by-side ─── */
.scenarios-card { padding: 1rem; }
.scenarios-stack { gap: 0.25rem; }
.pattern-card { padding: 1rem; }
.pattern-item { padding: 0.5rem; }
.pattern-name { font-size: 0.85rem; }


/* Unified hero 3-column grid */
.unified-hero-grid {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
}
@media (max-width: 640px) {
    .unified-hero-grid {
        grid-template-columns: 80px 1fr;
    }
    .unified-col-bars {
        grid-column: 1 / -1;
    }
}
.unified-col-ring { display: flex; justify-content: center; }
.unified-col-info { min-width: 0; }
.unified-col-bars { min-width: 0; }

/* Inline strategy metrics */
.unified-strat-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}
.usi-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 3px;
    padding: 1px 5px;
    font-family: 'SF Mono', monospace;
}
.usi-name { color: #f59e0b; border-color: rgba(245,158,11,0.2); }
.unified-trig-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
}
.usi-trig {
    font-size: 0.58rem;
    font-weight: 600;
    color: #fb923c;
    background: rgba(251,146,60,0.08);
    border: 1px solid rgba(251,146,60,0.15);
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: capitalize;
}
.usi-iv-warn {
    font-size: 0.62rem;
    color: #ef4444;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 3px;
    padding: 2px 6px;
    margin-top: 3px;
}
.usi-rationale {
    font-size: 0.65rem;
    color: var(--text-muted, #64748b);
    margin-top: 3px;
    line-height: 1.3;
}

/* old ring styles removed — see below */

/* Make component bars more compact */
.unified-comp-row {
    gap: 4px !important;
    margin-bottom: 1px !important;
}
.unified-comp-label {
    font-size: 0.6rem !important;
    min-width: 40px !important;
}
.unified-comp-val {
    font-size: 0.6rem !important;
    min-width: 30px !important;
}
.unified-comp-track {
    height: 5px !important;
}


/* Unified hero compact row layout */
.unified-hero { border-width: 2px !important; padding: 0.6rem 0.8rem !important; }
.unified-hero-row {
    display: grid;
    grid-template-columns: 76px 1fr 1fr;
    gap: 0.6rem;
    align-items: center;
}
.unified-col-ring { display: flex; justify-content: center; }
.unified-col-left { min-width: 0; }
.unified-col-right { min-width: 0; font-size: 0.7rem; }
.unified-score-ring { width: 72px; height: 72px; position: relative; display: inline-block; }
.unified-score-ring svg { width: 72px; height: 72px; display: block; }
.unified-score-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.unified-score-num { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.unified-score-label { font-size: 0.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; line-height: 1; margin-top: 2px; }
@media (max-width: 640px) {
    .unified-hero-row { grid-template-columns: 70px 1fr; }
    .unified-col-right { grid-column: 1 / -1; }
}


/* Plain score number (no ring) */
.unified-col-score {
    text-align: center;
    padding: 4px 0;
}
.usc-num {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}
.usc-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-top: 2px;
}

/* Play tier badges */
.play-tier-badge {
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
}
.play-tier-rec {
    background: rgba(16,185,129,0.08);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.15);
}
.play-tier-spec {
    background: rgba(245,158,11,0.08);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.15);
}
.play-tier-lotto {
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.15);
}


/* Full-width scenarios — horizontal layout */
.scenarios-full {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.scenarios-full .scenarios-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}
@media (max-width: 640px) {
    .scenarios-full .scenarios-stack {
        grid-template-columns: 1fr;
    }
}


/* Exit Strategy box grid */
.exit-box-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
@media (max-width: 640px) {
    .exit-box-grid { grid-template-columns: repeat(2, 1fr); }
}
.exit-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 6px 8px;
    text-align: center;
}
.exit-box-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.exit-box-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.2;
}
.exit-box-move {
    font-size: 0.7rem;
    font-weight: 600;
}
.exit-box-opt {
    font-size: 0.6rem;
    color: #B2B5BE;
}
.exit-box-action {
    font-size: 0.55rem;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.2;
}
.exit-time-row {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.exit-time-tag {
    font-size: 0.6rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 3px;
    padding: 1px 6px;
}


/* Chart legend (top-right overlay) */
.tv-chart-legend {
    position: absolute;
    top: 6px;
    left: 8px;
    z-index: 6;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    pointer-events: none;
    color: #94a3b8;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .indicator-strip { gap: 0.4rem; }

    .dash-two-col { grid-template-columns: 1fr; }
    .flow-summary-bar { grid-template-columns: repeat(2, 1fr); }
    .dash-flow-exp { display: none; }
    .dash-flow-size { display: none; }
    .macro-bar { flex-wrap: wrap; }
    .macro-item { flex: 0 0 33.33%; border-bottom: 1px solid var(--border-dark); }
    .level-row { grid-template-columns: 45px 80px 1fr; }
    .level-dist { display: none; }
    .score-hero { flex-direction: column; text-align: center; }
    .score-dots { justify-content: center; }
    .hero-play-details { justify-content: center; }
    .hero-rsi-track { margin: 0 auto; }
    .fib-visual { flex-direction: column; }
    .fib-ruler { width: 100%; }
    .fib-ruler-bar { width: 100%; height: 8px; }
    .fib-level-cards { flex-direction: column; }
}

/* Gate overlay + signup animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.gate-overlay {
    backdrop-filter: blur(2px);
}

/* Chart Layer Toggles */
.chart-toolbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: var(--bg-darker); border: 1px solid var(--border-dark); border-bottom: none; border-radius: var(--radius-md) var(--radius-md) 0 0; flex-wrap: wrap; }
.chart-toggle { display: flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.7rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border-dark); background: transparent; color: var(--text-muted); transition: all 0.15s; user-select: none; }
.chart-toggle.active { border-color: currentColor; opacity: 1; }
.chart-toggle.active[data-layer="targets"] { color: #10b981; background: rgba(16,185,129,0.1); }
.chart-toggle.active[data-layer="supports"] { color: #ef4444; background: rgba(239,68,68,0.1); }
.chart-toggle.active[data-layer="ema"] { color: #3b82f6; background: rgba(59,130,246,0.1); }
.chart-toggle.active[data-layer="bb"] { color: #8b5cf6; background: rgba(139,92,246,0.1); }
.chart-toggle.active[data-layer="fib"] { color: #f59e0b; background: rgba(245,158,11,0.1); }
.chart-toggle.active[data-layer="volume"] { color: #06b6d4; background: rgba(6,182,212,0.1); }
.chart-toggle:hover { border-color: var(--text-secondary); color: var(--text-secondary); }
.chart-toggle .toggle-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ═══ Interactive TradingView Chart ═══ */
.tv-chart-wrap {
    background: #131722;
    border: 1px solid #2A2E39;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.tv-chart-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    background: #1E222D;
    border-bottom: 1px solid #2A2E39;
    flex-wrap: wrap;
}
.tv-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.tv-toolbar-label {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.15rem;
}
.tv-pill {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    border: 1px solid #334155;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    white-space: nowrap;
}
.tv-pill:hover {
    border-color: #94a3b8;
    color: #94a3b8;
}
.tv-pill.tv-pill-active {
    border-color: #2962ff;
    color: #2962ff;
    background: rgba(41,98,255,0.1);
}
.tv-pill.tv-pill-on {
    border-color: #089981;
    color: #089981;
    background: rgba(8,153,129,0.1);
}
.tv-pill.tv-pill-draw-active {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245,158,11,0.15);
    animation: drawPulse 1.5s ease-in-out infinite;
}
@keyframes drawPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 0 4px rgba(245,158,11,0); }
}
.tv-chart-container {
    position: relative;
}
.tv-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 200px;
    color: #64748b;
    font-size: 0.85rem;
}
.tv-sub-section {
    position: relative;
    border-top: 1px solid #1e293b;
}
.tv-sub-label {
    position: absolute;
    top: 4px;
    left: 12px;
    z-index: 10;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: #475569;
    pointer-events: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.tv-main-wrap {
    position: relative;
}
/* Ensure canvas overlay doesn't eat clicks unless in draw mode */
#tvDrawOverlay {
    pointer-events: none;
}

/* ═══ Fullscreen Mode ═══ */
.tv-chart-wrap:fullscreen,
.tv-chart-wrap:-webkit-full-screen {
    background: #131722;
    padding: 0;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}
.tv-chart-wrap:fullscreen .tv-chart-toolbar,
.tv-chart-wrap:-webkit-full-screen .tv-chart-toolbar {
    flex-shrink: 0;
}
.tv-chart-wrap:fullscreen .tv-chart-container,
.tv-chart-wrap:-webkit-full-screen .tv-chart-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tv-chart-wrap:fullscreen .tv-main-wrap,
.tv-chart-wrap:-webkit-full-screen .tv-main-wrap {
    flex: 1;
    min-height: 0;
}
.tv-chart-wrap:fullscreen .tv-sub-section,
.tv-chart-wrap:-webkit-full-screen .tv-sub-section {
    flex-shrink: 0;
}


/* CSS-based fullscreen for mobile (iOS Safari doesn't support Fullscreen API) */
.tv-chart-wrap.tv-fs-active {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: #131722;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tv-chart-wrap.tv-fs-active .tv-chart-toolbar {
    flex-shrink: 0;
}
.tv-chart-wrap.tv-fs-active .tv-chart-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tv-chart-wrap.tv-fs-active .tv-main-wrap {
    flex: 1;
    min-height: 0;
}
.tv-chart-wrap.tv-fs-active .tv-sub-section {
    flex-shrink: 0;
}

/* ═══ Mobile Responsiveness ═══ */
@media (max-width: 768px) {
    .tv-chart-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        gap: 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .tv-chart-toolbar::-webkit-scrollbar {
        display: none;
    }
    .tv-toolbar-group {
        flex-shrink: 0;
    }
    .tv-pill {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    .tv-toolbar-label {
        font-size: 0.55rem;
    }
    #tvMainChart {
        height: 280px !important;
    }
    .tv-sub-section > div:last-child {
        height: 50px !important;
    }
    .tv-sub-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .tv-pill {
        font-size: 0.6rem;
        padding: 2px 5px;
    }
    #tvMainChart {
        height: 240px !important;
    }
    .tv-sub-section > div:last-child {
        height: 45px !important;
    }
}

/* Hide Lightweight Charts attribution logo */
.tv-lightweight-charts a[href*="tradingview"],
div[style*="tradingview"] a,
.tv-chart-wrap a[title*="TradingView"],
#tvMainChart a, #tvRsiChart a, #tvMacdChart a,
#tvSqueezeChart a, #tvStochChart a, #tvAdxChart a {
    display: none !important;
}

/* ═══ Unified Score Hero ═══ */

.unified-hero {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
}

.unified-score-ring {
    position: relative;
    flex-shrink: 0;
    width: 110px;
    height: 110px;
}

.unified-score-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    text-align: center;
    line-height: 1.1;
}

.unified-score-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.unified-score-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.unified-score-right {
    flex: 1;
    min-width: 0;
}

.unified-dir-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.unified-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
}

.unified-meta-tag {
    font-size: 0.72rem;
    color: #64748b;
    padding: 2px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
}

/* Component breakdown bars */
.unified-components {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.unified-comp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
}

.unified-comp-label {
    width: 48px;
    color: #94a3b8;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.unified-comp-track {
    flex: 1;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
    max-width: 120px;
}

.unified-comp-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.unified-comp-val {
    width: 42px;
    color: #64748b;
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* ═══ Strategy Card ═══ */

.unified-strategy-card {
    background: var(--card, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.unified-strat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.unified-play-style {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.unified-strat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.unified-strat-item {
    text-align: center;
    padding: 8px 6px;
    background: var(--bg, #0d1117);
    border-radius: 6px;
}

.unified-strat-val {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
}

.unified-strat-lbl {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unified-strat-rationale {
    font-size: 0.82rem;
    color: #94a3b8;
    padding: 8px 10px;
    background: var(--bg, #0d1117);
    border-radius: 6px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.unified-triggers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.unified-trigger-tag {
    font-size: 0.72rem;
    color: #fb923c;
    padding: 2px 8px;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 4px;
    text-transform: capitalize;
}

.unified-iv-warn {
    font-size: 0.78rem;
    color: #ef4444;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 6px;
    margin-top: 8px;
}

/* ═══ Exit Strategy ═══ */

.unified-exit-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.unified-exit-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.unified-exit-step-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.unified-exit-step-body {
    flex: 1;
}

.unified-exit-trigger {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
}

.unified-exit-action {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.unified-targets-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.unified-target-item {
    display: grid;
    grid-template-columns: 30px 80px 60px 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg, #0d1117);
    border-radius: 5px;
    font-size: 0.8rem;
}

.unified-target-label {
    font-weight: 700;
    font-size: 0.75rem;
}

.unified-target-price {
    font-weight: 600;
    color: #e2e8f0;
}

.unified-target-move {
    color: #10b981;
    font-size: 0.75rem;
}

.unified-target-option {
    font-size: 0.75rem;
    font-weight: 600;
}

.unified-stop-loss {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.unified-time-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.unified-time-tag {
    font-size: 0.72rem;
    color: #94a3b8;
    padding: 2px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
}

/* Loading spinner */
.unified-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #1e293b;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: unified-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes unified-spin {
    to { transform: rotate(360deg); }
}

/* ═══ Mobile ═══ */

@media (max-width: 640px) {
    .unified-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .unified-score-right {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .unified-meta {
        justify-content: center;
    }
    .unified-comp-row {
        font-size: 0.68rem;
    }
    .unified-comp-track {
        max-width: 80px;
    }
    .unified-strat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .unified-target-item {
        grid-template-columns: 25px 1fr 50px 1fr;
        font-size: 0.75rem;
    }
}

.usc-contract {
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    letter-spacing: 0.02em;
}
