/* ═══════════════════════════════════════════
   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 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.ind-card {
    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 ─── */
@media (max-width: 768px) {
    .indicator-strip { grid-template-columns: repeat(2, 1fr); }
    .indicator-strip .ind-card:last-child { grid-column: span 2; }
    .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; }
