/* ═══════════════════════════════════════════════════════════════════════════
   EARNINGS INTELLIGENCE - PREMIUM TRADING TERMINAL
   Modern, sleek, professional stock market design
   Inspired by Bloomberg Terminal & TradingView aesthetics
   ═══════════════════════════════════════════════════════════════════════════ */

/* Root-level CSS variable for drawer width (needed for fixed positioning) */
:root {
    --earnings-drawer-width: 480px;
}

/* Color System - Stock Market Terminal Palette */
.earnings-intelligence-container {
    --terminal-bg: #0d1117;
    --terminal-surface: #161b22;
    --terminal-elevated: #1c2128;
    --terminal-card: #21262d;
    --terminal-border: #30363d;
    --terminal-border-subtle: #21262d;
    
    /* Market Colors */
    --market-bull: #3fb950;
    --market-bull-soft: rgba(63, 185, 80, 0.15);
    --market-bear: #f85149;
    --market-bear-soft: rgba(248, 81, 73, 0.15);
    --market-neutral: #8b949e;
    
    /* Accent Colors */
    --accent-primary: #58a6ff;
    --accent-primary-soft: rgba(88, 166, 255, 0.15);
    --accent-warning: #d29922;
    --accent-warning-soft: rgba(210, 153, 34, 0.15);
    --accent-purple: #a371f7;
    --accent-orange: #f0883e;
    
    /* Setup Tags */
    --setup-a: #3fb950;
    --setup-b: #58a6ff;
    --setup-watch: #d29922;
    --setup-avoid: #f85149;
    
    /* Move Intensity */
    --move-low: #8b949e;
    --move-normal: #d29922;
    --move-high: #f0883e;
    --move-extreme: #f85149;
    
    /* Text */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --text-dim: #484f58;
    
    --drawer-width: var(--earnings-drawer-width);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTAINER - Full Terminal Feel
   ═══════════════════════════════════════════════════════════════════════════ */
.earnings-intelligence-container {
    min-height: 100vh;
    padding: 0;
    background: var(--terminal-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   A) COMMAND STRIP - Bloomberg-style Control Bar
   ═══════════════════════════════════════════════════════════════════════════ */
.command-strip {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(180deg, var(--terminal-surface) 0%, var(--terminal-bg) 100%);
    border-bottom: 1px solid var(--terminal-border);
    backdrop-filter: blur(12px);
}

.command-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.command-center {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    padding: 0 0.75rem;
}

.command-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Divider between filter groups */

/* Date Range Selector - Pill Toggle */
.date-selector {
    display: flex;
    gap: 2px;
    background: var(--terminal-elevated);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--terminal-border);
}

.date-selector button {
    padding: 0.25rem 0.625rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.date-selector button:hover {
    color: var(--text-primary);
    background: var(--terminal-card);
}

.date-selector button.active {
    background: var(--market-bull);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(63, 185, 80, 0.3);
}

/* Time Filter Chips - Compact Pills */
.time-chips {
    display: flex;
    gap: 2px;
    background: var(--terminal-elevated);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--terminal-border);
}

.time-chips .chip {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-chips .chip:hover {
    color: var(--text-primary);
    background: var(--terminal-card);
}

.time-chips .chip.active {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

/* Risk Mode Toggle - Minimal Style */

/* Direction Toggle (Bull/Bear Filter) - Same style as risk-toggle */
.direction-toggle {
    display: flex;
    gap: 1px;
    background: var(--terminal-elevated);
    padding: 3px;
    border-radius: 4px;
    border: 1px solid var(--terminal-border);
}

.direction-toggle button {
    padding: 0.2rem 0.4rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.direction-toggle button:hover {
    color: var(--text-secondary);
}

.direction-toggle button.active {
    background: var(--terminal-card);
    color: var(--text-primary);
}

.direction-toggle button.bull.active {
    background: rgba(63, 185, 80, 0.15);
    color: var(--gain-green);
}

.direction-toggle button.bear.active {
    background: rgba(248, 81, 73, 0.15);
    color: var(--loss-red);
}

/* Market Regime Badges - Compact Indicators */

.regime-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 4px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.regime-badge i {
    font-size: 0.6rem;
    opacity: 0.8;
}

.regime-badge.badge-bullish {
    color: var(--market-bull);
    background: var(--market-bull-soft);
    border-color: rgba(63, 185, 80, 0.3);
}

.regime-badge.badge-bearish {
    color: var(--market-bear);
    background: var(--market-bear-soft);
    border-color: rgba(248, 81, 73, 0.3);
}

.regime-badge.badge-neutral {
    color: var(--text-secondary);
    background: var(--terminal-elevated);
    border-color: var(--terminal-border);
}

.regime-badge.badge-low {
    color: var(--market-bull);
    background: var(--market-bull-soft);
    border-color: rgba(63, 185, 80, 0.3);
}

.regime-badge.badge-high {
    color: var(--accent-warning);
    background: var(--accent-warning-soft);
    border-color: rgba(210, 153, 34, 0.3);
}

/* Key Counts - Compact Stats */
.key-counts {
    display: flex;
    gap: 0.25rem;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 500;
    border-radius: 4px;
    background: var(--terminal-elevated);
    border: 1px solid var(--terminal-border);
    white-space: nowrap;
}

.count-badge strong {
    font-size: 0.75rem;
    font-weight: 700;
}

.count-badge.today-badge strong {
    color: var(--accent-primary);
}

.count-badge.high-vol-badge strong {
    color: var(--accent-orange);
}

.count-badge.a-setup-badge strong {
    color: var(--setup-a);
}

/* Search Container - Terminal Style */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 0.625rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

.search-container input {
    width: 180px;
    padding: 0.375rem 0.625rem 0.375rem 1.75rem;
    border: 1px solid var(--terminal-border);
    border-radius: 6px;
    background: var(--terminal-elevated);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--terminal-card);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.search-container input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.clear-search {
    position: absolute;
    right: 0.375rem;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.125rem;
    line-height: 1;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.clear-search:hover {
    color: var(--text-primary);
    background: var(--terminal-card);
}

/* ═══════════════════════════════════════════════════════════════════════════
   B) MAIN TABLE SECTION - Terminal Data Grid
   ═══════════════════════════════════════════════════════════════════════════ */
.earnings-table-section {
    padding: 0.75rem 1rem;
}

/* Table Controls - Compact Secondary Bar */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--terminal-surface);
    border: 1px solid var(--terminal-border);
    border-radius: 6px;
}

.table-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.last-updated {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-left: 0.75rem;
    border-left: 1px solid var(--terminal-border);
}

.table-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Setup Filter - Compact Tag Toggles */
.setup-filter {
    display: flex;
    gap: 0.375rem;
    padding: 0.25rem;
    background: var(--terminal-elevated);
    border-radius: 4px;
    border: 1px solid var(--terminal-border);
}

.setup-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.375rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
    user-select: none;
}

.setup-checkbox input {
    width: 10px;
    height: 10px;
    accent-color: currentColor;
}

.setup-checkbox.setup-a {
    color: var(--setup-a);
}
.setup-checkbox.setup-a:hover {
    background: var(--market-bull-soft);
}

.setup-checkbox.setup-b {
    color: var(--setup-b);
}
.setup-checkbox.setup-b:hover {
    background: var(--accent-primary-soft);
}

.setup-checkbox.setup-watch {
    color: var(--setup-watch);
}
.setup-checkbox.setup-watch:hover {
    background: var(--accent-warning-soft);
}

.setup-checkbox.setup-avoid {
    color: var(--setup-avoid);
}
.setup-checkbox.setup-avoid:hover {
    background: var(--market-bear-soft);
}

/* Select Dropdowns - Terminal Style */
.sector-select, .sort-select, .direction-select {
    padding: 0.3rem 0.5rem;
    padding-right: 1.5rem;
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    background: var(--terminal-elevated);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236e7681' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.25rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
}

.sector-select:hover, .sort-select:hover, .direction-select:hover {
    border-color: var(--text-muted);
}

.sector-select:focus, .sort-select:focus, .direction-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

/* Table Container - Clean Border */
.table-container {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid var(--terminal-border);
    background: var(--terminal-surface);
}

/* High-Density Earnings Table - Bloomberg Style */
.earnings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.earnings-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--terminal-elevated);
}

.earnings-table th {
    padding: 0.5rem 0.625rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--terminal-border);
    white-space: nowrap;
}

.earnings-table tbody tr {
    cursor: pointer;
    transition: background 0.1s ease;
    border-left: 3px solid transparent;
}

.earnings-table tbody tr:hover {
    background: var(--terminal-card);
}

.earnings-table td {
    padding: 0.375rem 0.625rem;
    border-bottom: 1px solid var(--terminal-border-subtle);
    vertical-align: middle;
    height: 28px;
    color: var(--text-primary);
}

/* Row Variants - Subtle Left Border Accent */
.earnings-row.row-a-setup {
    border-left-color: var(--setup-a);
}

.earnings-row.row-b-setup {
    border-left-color: var(--setup-b);
}

.earnings-row.row-watch {
    border-left-color: var(--setup-watch);
}

.earnings-row.row-avoid {
    opacity: 0.6;
    border-left-color: var(--setup-avoid);
}

/* Column Widths - Optimized for density */
.col-ticker { width: 130px; }
.col-datetime { width: 85px; }
.col-iv { width: 70px; }
.col-edge { width: 60px; } /* Combined TES, Engine, TickIQ Score */
.col-action-rating { width: 132px; } /* Action (5-tier) + When timing */
.col-history { width: 140px; }
.col-action { width: 36px; }

/* ===== Action + When cell ===== */
.action-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.action-badge .action-text { line-height: 1; }

.action-badge.action-strong-buy {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.55);
    color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
}

.action-badge.action-buy {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.action-badge.action-none {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}

.action-badge.action-short {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.action-badge.action-strong-short {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.55);
    color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

.action-when {
    font-size: 0.58rem;
    color: var(--text-muted, #8b8b9e);
    white-space: nowrap;
}

.clickable-modal:hover .action-badge {
    transform: scale(1.03);
    transition: transform 0.12s ease;
}

/* Clickable Column Styles */
.clickable-chart {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.clickable-chart:hover {
    background-color: rgba(88, 166, 255, 0.08);
}

.clickable-chart:hover .ticker-symbol {
    color: var(--accent-primary);
    text-decoration: underline;
}

.clickable-drawer {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.clickable-drawer:hover {
    background-color: rgba(139, 148, 158, 0.08);
}

.clickable-modal {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-modal:hover {
    background-color: rgba(88, 166, 255, 0.12);
}

/* Tooltip Header Styles */
th.has-tooltip {
    position: relative;
    cursor: help;
}

th.has-tooltip .header-text {
    margin-right: 4px;
}

th.has-tooltip .tooltip-icon {
    font-size: 0.65rem;
    opacity: 0.6;
    vertical-align: super;
    cursor: help;
}

th.has-tooltip:hover .tooltip-icon {
    opacity: 1;
}

/* Engine Cell Styles */

.engine-pending {
    color: var(--text-muted);
}

/* Engine Score Badge */

/* Engine Score Tier Styles */

/* Neutral tier - analyzed but no clear directional edge */

/* Neutral direction indicator */

/* Direction Indicator in Engine Cell */

@keyframes subtle-pulse-bull {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes subtle-pulse-bear {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* Ticker Cell - Compact with logo */
.ticker-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.company-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.logo-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--terminal-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Fallback emoji shown when logo image fails to load (404) */
.logo-fallback {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--terminal-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ticker-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.ticker-symbol {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.company-name {
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

/* Ticker Row - Symbol + Liquidity Chip */
.ticker-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Liquidity Chip - Small indicator beside ticker */
.liquidity-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.liquidity-chip.liquidity-mega {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.25) 0%, rgba(88, 166, 255, 0.15) 100%);
    color: #a371f7;
    border: 1px solid rgba(163, 113, 247, 0.3);
}

.liquidity-chip.liquidity-high {
    background: rgba(88, 166, 255, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(88, 166, 255, 0.25);
}

.liquidity-chip.liquidity-medium {
    background: rgba(210, 153, 34, 0.12);
    color: var(--accent-warning);
    border: 1px solid rgba(210, 153, 34, 0.25);
}

.liquidity-chip.liquidity-low {
    background: rgba(139, 148, 158, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(139, 148, 158, 0.2);
}

/* DateTime Cell - Compact */
.datetime-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.earnings-date {
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-primary);
}

.earnings-date.date-today {
    color: var(--accent-primary);
    font-weight: 700;
}

.earnings-date.date-tomorrow {
    color: var(--accent-warning);
}

.earnings-date.date-soon {
    color: var(--text-secondary);
}

.earnings-time {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.earnings-time.bmo {
    color: var(--accent-warning);
}

.earnings-time.amc {
    color: var(--accent-purple);
}

/* Market Cap - Muted */

/* Sector Chip - Minimal */

/* Estimates Cell */

.eps-estimate {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

.rev-estimate {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* YoY Growth - Color coded */

/* Expected Move Cell - Prominent */

.expected-move {
    font-weight: 700;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.expected-move.move-low { color: var(--move-low); }
.expected-move.move-normal { color: var(--move-normal); }
.expected-move.move-high { color: var(--move-high); }
.expected-move.move-extreme { color: var(--move-extreme); }

.proxy-indicator {
    font-size: 0.55rem;
    color: var(--text-dim);
    cursor: help;
}

/* IV Live Indicator */
.iv-live-indicator {
    font-size: 0.6rem;
    color: var(--market-bull);
    cursor: help;
}

/* Price Cell */
.price-value {
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--text-primary);
}

/* IV Cell - Standalone */
.iv-cell {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* Hist Cell */

/* ═══════════════════════════════════════════════════════════════════════════════
   MODERN INDICATOR COLUMNS - TES, TickIQ Score, Earnings Engine (Redesign)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* === CONSENSUS ROW HIGHLIGHTING === */
.earnings-row.consensus-bull-row {
    background: linear-gradient(90deg, rgba(63, 185, 80, 0.08) 0%, transparent 60%);
    border-left: 3px solid var(--market-bull);
}

.earnings-row.consensus-bull-row:hover {
    background: linear-gradient(90deg, rgba(63, 185, 80, 0.12) 0%, rgba(63, 185, 80, 0.04) 60%);
}

.earnings-row.consensus-bear-row {
    background: linear-gradient(90deg, rgba(248, 81, 73, 0.08) 0%, transparent 60%);
    border-left: 3px solid var(--market-bear);
}

.earnings-row.consensus-bear-row:hover {
    background: linear-gradient(90deg, rgba(248, 81, 73, 0.12) 0%, rgba(248, 81, 73, 0.04) 60%);
}

/* === TES (Technical Engine Stance) - Modern Icon-Only Design === */
.stance-cell-modern {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TES Stance Variants */

@keyframes tes-glow-bull {
    0%, 100% { box-shadow: 0 0 8px rgba(63, 185, 80, 0.2); }
    50% { box-shadow: 0 0 16px rgba(63, 185, 80, 0.35); }
}

@keyframes tes-glow-bear {
    0%, 100% { box-shadow: 0 0 8px rgba(248, 81, 73, 0.2); }
    50% { box-shadow: 0 0 16px rgba(248, 81, 73, 0.35); }
}

/* === TickIQ Score - Modern Pill Design === */

/* TickIQ Tier Variants */

/* Direction colors in TickIQ */

/* === Earnings Engine - Modern Dual Score Design === */

.engine-score {
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    line-height: 1;
}

/* Engine Bull/Bear Variants */

/* Neutral Engine (Dual Score Display) */

/* ═══════════════════════════════════════════════════════════════════════════════
   COMBINED DIRECTION COLUMN - New Compact Design
   Combines TES, Earnings Engine, and TickIQ Score into single column
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Mini Indicator Icons */

/* TES Mini Variants */

/* Engine Mini Variants */

@keyframes mini-glow-bull {
    0%, 100% { box-shadow: 0 0 4px rgba(63, 185, 80, 0.2); }
    50% { box-shadow: 0 0 10px rgba(63, 185, 80, 0.4); }
}

@keyframes mini-glow-bear {
    0%, 100% { box-shadow: 0 0 4px rgba(248, 81, 73, 0.2); }
    50% { box-shadow: 0 0 10px rgba(248, 81, 73, 0.4); }
}

/* TickIQ Score Mini */

/* ═══════════════════════════════════════════════════════════════════════════════
   DIRECTION DETAILS MODAL
   ═══════════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.direction-modal {
    background: var(--terminal-surface);
    border: 1px solid var(--terminal-border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.direction-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--terminal-elevated);
    border-bottom: 1px solid var(--terminal-border);
}

.modal-title-group {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.modal-ticker {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-company {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--terminal-card);
    color: var(--text-primary);
}

.direction-modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

/* Consensus Banner */
.consensus-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.consensus-banner.bull {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.2) 0%, rgba(63, 185, 80, 0.1) 100%);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: var(--market-bull);
}

.consensus-banner.bear {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.2) 0%, rgba(248, 81, 73, 0.1) 100%);
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: var(--market-bear);
}

.consensus-icon {
    font-size: 1.25rem;
}

.consensus-text {
    flex: 1;
}

.consensus-count {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Detail Cards */
.direction-detail-card {
    background: var(--terminal-card);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.detail-icon {
    font-size: 1.1rem;
}

.detail-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.detail-content {
    color: var(--text-secondary);
}

.detail-value-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.detail-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.detail-indicator.stance-bullish,
.detail-indicator.direction-bull {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: var(--market-bull);
}

.detail-indicator.stance-bearish,
.detail-indicator.direction-bear {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--market-bear);
}

.detail-indicator.stance-bull-reversal {
    background: rgba(63, 185, 80, 0.2);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: var(--market-bull);
}

.detail-indicator.stance-bear-reversal {
    background: rgba(248, 81, 73, 0.2);
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: var(--market-bear);
}

.detail-indicator.stance-ranging {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #eab308;
}

.detail-indicator.engine-neutral {
    background: rgba(139, 148, 158, 0.12);
    border: 1px solid rgba(139, 148, 158, 0.25);
    color: var(--text-secondary);
}

.indicator-icon {
    font-size: 1rem;
}

.indicator-label {
    text-transform: capitalize;
}

.detail-score {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.detail-score.tier-elite {
    background: rgba(63, 185, 80, 0.15);
    color: var(--market-bull);
}

.detail-score.tier-high {
    background: rgba(59, 130, 246, 0.15);
    color: #58a6ff;
}

.detail-score.tier-moderate,
.detail-score.tier-fair {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
}

.detail-score.tier-low {
    background: rgba(248, 81, 73, 0.12);
    color: var(--market-bear);
}

.engine-scores {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.bull-score-detail {
    color: var(--market-bull);
}

.bear-score-detail {
    color: var(--market-bear);
}

.detail-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.no-data {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
    margin: 0;
}

/* TickIQ Score Large Display */
.tradeiq-score-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 70px;
}

.tradeiq-score-large .score-number {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Consolas', monospace;
    line-height: 1;
}

.tradeiq-score-large .score-tier {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-top: 0.15rem;
}

.tradeiq-score-large.tier-elite {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.2) 0%, rgba(88, 166, 255, 0.15) 100%);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: var(--market-bull);
}

.tradeiq-score-large.tier-high {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #58a6ff;
}

.tradeiq-score-large.tier-watch {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #eab308;
}

.tradeiq-score-large.tier-weak {
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(139, 148, 158, 0.2);
    color: var(--text-secondary);
}

.direction-bias {
    font-size: 1.5rem;
    margin-left: auto;
}

/* Score Breakdown */
.score-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: var(--terminal-elevated);
    border-radius: 4px;
    font-size: 0.75rem;
}

.breakdown-label {
    color: var(--text-secondary);
}

.breakdown-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* Modal Footer */
.direction-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--terminal-elevated);
    border-top: 1px solid var(--terminal-border);
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.modal-btn.secondary {
    background: var(--terminal-card);
    color: var(--text-secondary);
    border: 1px solid var(--terminal-border);
}

.modal-btn.secondary:hover {
    background: var(--terminal-surface);
    color: var(--text-primary);
}

.modal-btn.primary {
    background: var(--accent-primary);
    color: #ffffff;
}

.modal-btn.primary:hover {
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LEGACY STYLES (kept for backward compatibility)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Stance Cell - Technical Stance Badge (Legacy) */
.stance-cell {
    display: flex;
    align-items: center;
}

.stance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: help;
}

.stance-icon {
    font-size: 0.7rem;
    line-height: 1;
}

.stance-label {
    letter-spacing: 0.01em;
}

.stance-badge.stance-bullish {
    background: var(--market-bull-soft);
    color: var(--market-bull);
}

.stance-badge.stance-bearish {
    background: var(--market-bear-soft);
    color: var(--market-bear);
}

.stance-badge.stance-bull-reversal {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.25), rgba(63, 185, 80, 0.15));
    color: var(--market-bull);
    border: 1px solid rgba(63, 185, 80, 0.5);
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.3), inset 0 0 12px rgba(63, 185, 80, 0.1);
    font-weight: 700;
}

.stance-badge.stance-bear-reversal {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.25), rgba(248, 81, 73, 0.15));
    color: var(--market-bear);
    border: 1px solid rgba(248, 81, 73, 0.5);
    box-shadow: 0 0 8px rgba(248, 81, 73, 0.3), inset 0 0 12px rgba(248, 81, 73, 0.1);
    font-weight: 700;
}

.stance-badge.stance-ranging {
    background: var(--accent-warning-soft);
    color: var(--accent-warning);
}

.stance-badge.stance-weak {
    background: rgba(139, 148, 158, 0.15);
    color: var(--text-secondary);
}

.stance-badge.stance-unknown {
    background: var(--terminal-elevated);
    color: var(--text-muted);
}

.stance-pending {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Score Cell - Badge Style (Legacy) */

/* Direction Indicator - Bull/Bear Icon */
.direction-indicator {
    font-size: 1rem;
    line-height: 1;
    cursor: help;
    transition: transform 0.2s ease;
}

.direction-indicator:hover {
    transform: scale(1.2);
}

.direction-indicator.direction-bullish {
    filter: drop-shadow(0 0 4px rgba(63, 185, 80, 0.5));
}

.direction-indicator.direction-bearish {
    filter: drop-shadow(0 0 4px rgba(248, 81, 73, 0.5));
}

.direction-indicator.direction-neutral {
    opacity: 0.5;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

.score-badge .score-value {
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.score-badge .letter-grade {
    font-size: 0.55rem;
    opacity: 0.7;
    font-weight: 600;
}

.score-badge.score-excellent {
    background: var(--market-bull-soft);
    color: var(--market-bull);
}

.score-badge.score-good {
    background: var(--accent-primary-soft);
    color: var(--accent-primary);
}

.score-badge.score-neutral {
    background: var(--accent-warning-soft);
    color: var(--accent-warning);
}

.score-badge.score-poor {
    background: var(--market-bear-soft);
    color: var(--market-bear);
}

.score-badge.score-pending {
    background: var(--terminal-elevated);
    color: var(--text-dim);
    border: 1px dashed var(--terminal-border);
}

/* TickIQ Tier Label - Replaces letter grade */
.score-badge .tier-label {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

/* Tier styling variations */
.score-badge.tier-elite .tier-label {
    color: var(--market-bull);
}

.score-badge.tier-high .tier-label {
    color: var(--accent-primary);
}

.score-badge.tier-watch .tier-label {
    color: var(--accent-warning);
}

.score-badge.tier-weak .tier-label {
    color: var(--text-muted);
}

.score-badge.tier-pending .tier-label {
    color: var(--text-dim);
}

/* Elite Setup Row - Subtle Pulsing Glow Effect */
.earnings-row.elite-setup-row {
    animation: elite-pulse 4s ease-in-out infinite;
    border-left: 2px solid rgba(63, 185, 80, 0.5);
}

.earnings-row.elite-setup-row td:first-child {
    padding-left: calc(1rem - 2px); /* Compensate for border */
}

@keyframes elite-pulse {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(63, 185, 80, 0.03);
    }
}

/* Elite tier badge special styling */
.score-badge.tier-elite {
    background: linear-gradient(135deg, var(--market-bull-soft) 0%, rgba(88, 166, 255, 0.1) 100%);
    border: 1px solid rgba(63, 185, 80, 0.3);
}

/* Setup Tag - Compact Badge */
.setup-tag {
    display: inline-block;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
}

.setup-tag.setup-a {
    background: var(--market-bull-soft);
    color: var(--setup-a);
}

.setup-tag.setup-b {
    background: var(--accent-primary-soft);
    color: var(--setup-b);
}

.setup-tag.setup-watch {
    background: var(--accent-warning-soft);
    color: var(--setup-watch);
}

.setup-tag.setup-avoid {
    background: var(--market-bear-soft);
    color: var(--setup-avoid);
}

/* History Pills - Mini Sparkline Style */
.history-pills {
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
}

.move-pill {
    padding: 0.1rem 0.25rem;
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 2px;
    white-space: nowrap;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.move-pill.positive {
    background: var(--market-bull-soft);
    color: var(--market-bull);
}

.move-pill.negative {
    background: var(--market-bear-soft);
    color: var(--market-bear);
}

.no-history {
    font-size: 0.6rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Action Button - Minimal */
.open-btn {
    border: none;
    background: none;
    color: var(--text-muted);
    padding: 0.2rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 3px;
}

.open-btn:hover {
    color: var(--accent-primary);
    background: var(--terminal-card);
}

/* Pagination - Compact */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
}

.pagination-controls .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    border: 1px solid var(--terminal-border);
    background: var(--terminal-elevated);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pagination-controls .btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.pagination-controls .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Loading State - Terminal Style */
.loading-state {
    padding: 1.5rem;
}

.skeleton-table {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.skeleton-row {
    display: flex;
    gap: 0.5rem;
    height: 28px;
}

.skeleton-cell {
    background: linear-gradient(90deg, var(--terminal-elevated) 0%, var(--terminal-card) 50%, var(--terminal-elevated) 100%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-cell.ticker { width: 130px; }
.skeleton-cell.date { width: 85px; }
.skeleton-cell.mcap { width: 65px; }
.skeleton-cell.sector { width: 90px; }
.skeleton-cell.eps { width: 95px; }
.skeleton-cell.move { width: 75px; }
.skeleton-cell.score { width: 75px; }
.skeleton-cell.tag { width: 65px; }
.skeleton-cell.history { width: 140px; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State - Clean */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.empty-state .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.empty-state .btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* Footer - Minimal */
.earnings-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--terminal-border);
    background: var(--terminal-surface);
}

.earnings-footer p {
    margin: 0;
    font-size: 0.65rem;
    color: var(--text-dim);
}

.earnings-footer i {
    margin-right: 0.25rem;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   C) DRAWER STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.earnings-drawer {
    position: fixed;
    top: 60px; /* Account for sticky ticker bar */
    right: 0;
    bottom: 0;
    width: var(--earnings-drawer-width, 480px); /* Use root variable with fallback */
    max-width: 480px; /* Hard limit to prevent full-width */
    background: var(--terminal-surface, #161b22);
    border-left: 1px solid var(--terminal-border, #30363d);
    z-index: 201;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.2s ease-out;
    max-height: calc(100vh - 60px); /* Ensure drawer doesn't exceed viewport */
    overflow: hidden; /* Prevent content overflow */
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Drawer Header */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--terminal-border, #30363d);
    background: linear-gradient(180deg, var(--terminal-surface, #161b22) 0%, var(--terminal-bg, #0d1117) 100%);
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

/* Drawer Header Chart Background */

/* Ensure SVG paths render correctly and are visible */

/* Make the sparkline area fill more visible */

/* Make the sparkline stroke more visible */

/* Show placeholder when chart is empty/failed */

@keyframes chartPulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.3; }
}

/* Chart fallback gradient element - shown when no chart data */

/* Chart Container for Hover */
.drawer-chart-container {
    cursor: crosshair;
}

/* Chart Hover Tooltip */
.chart-hover-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.chart-hover-tooltip .tooltip-date {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.chart-hover-tooltip .tooltip-price {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.drawer-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.drawer-ticker-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    position: relative;
    z-index: 1;
}

.drawer-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Fallback emoji shown when drawer logo image fails to load (404) */
.drawer-logo-fallback {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.drawer-title-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* Ticker row with inline price */
.drawer-ticker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.drawer-ticker {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-company {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Inline Price Display (next to ticker) */
.live-price-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    font-size: 0.95rem;
}

.live-price-inline .price-value {
    font-weight: 700;
    color: var(--text-primary);
}

.live-price-inline .price-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.live-price-inline .price-change.positive {
    color: var(--market-bull);
}

.live-price-inline .price-change.negative {
    color: var(--market-bear);
}

.live-price-inline .price-live-indicator {
    color: var(--market-bull);
    font-size: 0.7rem;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chart Timeframe Selector - Bottom Right */
.earnings-drawer .drawer-chart-timeframe {
    position: absolute;
    bottom: 12px;
    right: 50px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0;
    border-radius: 0;
    z-index: 10;
}

/* Complete button reset for timeframe pills */
.earnings-drawer .drawer-chart-timeframe .timeframe-pill,
.earnings-drawer .drawer-chart-timeframe button.timeframe-pill,
.drawer-chart-timeframe .timeframe-pill,
button.timeframe-pill {
    /* Complete reset - explicit values instead of all:unset for better compatibility */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    
    /* Custom styling - transparent round pills */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 10px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.02em !important;
    min-width: 32px !important;
    text-align: center !important;
}

.earnings-drawer .drawer-chart-timeframe .timeframe-pill:hover,
.earnings-drawer .drawer-chart-timeframe button.timeframe-pill:hover,
.drawer-chart-timeframe .timeframe-pill:hover,
button.timeframe-pill:hover {
    color: rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.earnings-drawer .drawer-chart-timeframe .timeframe-pill.active,
.earnings-drawer .drawer-chart-timeframe button.timeframe-pill.active,
.drawer-chart-timeframe .timeframe-pill.active,
button.timeframe-pill.active {
    color: #fff !important;
    background: rgba(16, 185, 129, 0.4) !important;
    font-weight: 600 !important;
}

.drawer-close {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    position: relative;
    z-index: 1;
}

.drawer-close:hover {
    color: var(--text-primary);
}

/* Drawer Tabs */
.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
}

.drawer-tabs .tab-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.drawer-tabs .tab-btn:hover {
    color: var(--text-primary);
}

.drawer-tabs .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.drawer-tabs .tab-btn i {
    margin-right: 0.25rem;
}

/* Drawer Content */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.drawer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    gap: 1rem;
    color: var(--text-muted);
}

.drawer-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tab Pane */
.tab-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-pane h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-pane h4 i {
    color: var(--primary);
}

/* Event Info Card */
.event-info-card {
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
}

.event-date-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.event-date-time i {
    color: var(--primary);
}

.event-date {
    font-weight: 600;
}

.event-time {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-time.bmo {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.event-time.amc {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.event-estimates {
    display: flex;
    gap: 1.5rem;
}

.estimate-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.estimate-item .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.estimate-item .value {
    font-weight: 600;
}

.estimate-item .value.move {
    color: var(--earnings-move-normal);
}

/* AI Summary Card */
.ai-summary-card {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 229, 204, 0.1) 0%, transparent 100%);
    border: 1px solid rgba(0, 229, 204, 0.2);
    border-radius: 0.5rem;
}

.ai-summary-card p {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.ai-bullets {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.ai-bullets li {
    font-size: 0.8rem;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

/* Levels Card */
.levels-card {
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
}

.levels-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
}

.level-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.level-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.level-values {
    font-weight: 500;
    font-size: 0.85rem;
}

.level-values.bullish { color: var(--earnings-positive); }
.level-values.bearish { color: var(--earnings-negative); }

/* Scenarios Card */
.scenarios-card {
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
}

.scenarios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.generate-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s;
}

.generate-ai-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--text-inverse);
}

.generate-ai-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.generate-ai-btn i {
    font-size: 0.8rem;
}

.spinner-sm {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.scenarios-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.scenario {
    padding: 0.75rem;
    border-radius: 0.375rem;
    background: var(--bg-base);
}

.scenario-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.scenario.beat .scenario-label { color: var(--earnings-positive); }
.scenario.miss .scenario-label { color: var(--earnings-negative); }
.scenario.mixed .scenario-label { color: var(--text-muted); }

.scenario-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* AI Price Targets Card */
.price-targets-card {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
}

.targets-grid {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.target-range {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-base);
    border-radius: 0.375rem;
    text-align: center;
}

.target-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.375rem;
}

.target-values {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.target-low {
    color: var(--earnings-negative);
}

.target-separator {
    color: var(--text-muted);
}

.target-high {
    color: var(--earnings-positive);
}

.target-range-pct {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.target-disclaimer {
    margin: 0.75rem 0 0;
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.target-disclaimer i {
    color: var(--text-muted);
}

/* Trade Plan Card */
.trade-plan-card {
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
}

.trade-plan-card p {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Score Breakdown Card */
.score-breakdown-card {
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
}

.score-components {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.component-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.component-label {
    width: 130px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.component-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-base);
    border-radius: 4px;
    overflow: hidden;
}

.component-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.component-value {
    width: 30px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tooltip icon in card headers */
.score-breakdown-card h4 {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.score-breakdown-card h4 .tooltip-icon {
    font-size: 0.65rem;
    opacity: 0.5;
    cursor: help;
    margin-left: 0.25rem;
}

.score-breakdown-card h4:hover .tooltip-icon {
    opacity: 1;
}

/* Earnings Engine Card */
.earnings-engine-card {
    margin-top: 1rem;
    border-left: 3px solid var(--primary);
}

.direction-summary {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.direction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.direction-badge.bullish {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.direction-badge.bearish {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.direction-badge .direction-icon {
    font-size: 1rem;
}

.direction-tooltip {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* History Tab */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.history-table th {
    padding: 0.5rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.history-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.eps-cell, .rev-cell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.eps-cell .actual, .rev-cell .actual {
    font-weight: 500;
}

.eps-cell .delta, .rev-cell .delta {
    font-size: 0.65rem;
}

.delta.positive { color: var(--earnings-positive); }
.delta.negative { color: var(--earnings-negative); }

.move.positive { color: var(--earnings-positive); }
.move.negative { color: var(--earnings-negative); }

.na {
    color: var(--text-dim);
}

/* 3-Month Price Percentile Column Styles */
.percentile {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

.percentile-high {
    color: var(--earnings-positive);
    background: rgba(63, 185, 80, 0.1);
}

.percentile-mid-high {
    color: #7ce38b;
}

.percentile-mid {
    color: var(--text-muted);
}

.percentile-mid-low {
    color: #f0a868;
}

.percentile-low {
    color: var(--earnings-negative);
    background: rgba(248, 81, 73, 0.1);
}

.distribution-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-weight: 600;
}

/* Peers Tab */

.peer-ticker {
    font-weight: 600;
    color: var(--text-primary);
}

.peer-metrics {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced Peers Tab - Sector/Industry Tabs */
.peer-group-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.peer-group-tab {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.75rem;
}

.peer-group-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.peer-group-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.peer-group-tab i {
    font-size: 0.85rem;
}

.peer-group-tab .group-name {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.9;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Peer Performance Summary */
.peer-performance-summary {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.summary-stat.main-stat {
    align-items: flex-start;
    padding-left: 0.5rem;
}

.summary-stat .stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-stat.main-stat .stat-value {
    font-size: 1.25rem;
}

.summary-stat .stat-value.positive { color: var(--earnings-positive); }
.summary-stat .stat-value.negative { color: var(--earnings-negative); }
.summary-stat .stat-value.beat-count { color: var(--earnings-positive); }
.summary-stat .stat-value.miss-count { color: var(--earnings-negative); }

/* Peer Performance Table */
.peer-table-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.peer-performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.peer-performance-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.peer-performance-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.peer-performance-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.05));
}

.peer-performance-table tbody tr:hover {
    background: var(--bg-hover);
}

.peer-performance-table .peer-ticker-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.peer-performance-table .peer-ticker {
    font-weight: 600;
    color: var(--text-primary);
}

.peer-performance-table .peer-date {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.peer-performance-table .change-cell {
    font-weight: 500;
}

.peer-performance-table .positive { color: var(--earnings-positive); }
.peer-performance-table .negative { color: var(--earnings-negative); }
.peer-performance-table .na { color: var(--text-muted); }

/* Beat/Miss Badges */
.beat-miss-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.beat-miss-badge.beat {
    background: rgba(16, 185, 129, 0.2);
    color: var(--earnings-positive);
}

.beat-miss-badge.miss {
    background: rgba(239, 68, 68, 0.2);
    color: var(--earnings-negative);
}

.beat-miss-badge.inline {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

/* Peer Tab Bottom Note */
.peer-note {
    margin-top: 0.75rem;
    padding: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

.peer-note i {
    margin-right: 0.25rem;
}

/* No Peer Data State */
.no-peer-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.no-peer-data i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-peer-data p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.no-peer-data .hint {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* Notes Tab */

.no-data {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Mobile-first Breakpoints
   ═══════════════════════════════════════════════════════════════════════════ */

/* Large screens - hide some badges for cleaner look */
@media (max-width: 1400px) {
    
    .regime-badge i {
        display: none;
    }
}

@media (max-width: 1200px) {
    .command-strip {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    
    .command-center {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 0.375rem 0;
        border-top: 1px solid var(--terminal-border);
        margin-top: 0.25rem;
    }
    
    .table-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .table-info {
        width: 100%;
    }
}

@media (max-width: 992px) {
    
    .company-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .command-strip {
        padding: 0.5rem;
    }
    
    .command-center {
        display: none;
    }
    
    .search-container input {
        width: 140px;
    }
    
    .date-selector button,
    .time-chips .chip {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .earnings-table {
        font-size: 0.7rem;
    }
    
    .col-history {
        display: none;
    }
    
    .table-controls {
        padding: 0.375rem 0.5rem;
    }
    
    .setup-filter {
        display: none;
    }
    
    .earnings-drawer {
        width: 100%;
        max-width: 100%; /* Allow full width only on mobile */
    }
}

@media (max-width: 576px) {
    .earnings-table-section {
        padding: 0.5rem;
    }
    
    .ticker-cell {
        gap: 0.25rem;
    }
    
    .company-logo,
    .logo-placeholder,
    .logo-fallback {
        width: 18px;
        height: 18px;
    }
    
    .ticker-symbol {
        font-size: 0.7rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   D) LIVE PRICE DISPLAY
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   E) TECHNICAL INDICATORS TAB
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pro Badge on Tab */

/* Technicals Tab Pane */
.technicals-tab {
    padding: 0;
}

/* Technicals Header */

/* Overall Bias Summary */

/* Indicators Grid */

/* Indicator States */

/* Indicator Legend */

/* ═══════════════════════════════════════════════════════════════════════════
   F) UPGRADE OVERLAY FOR FREE USERS
   ═══════════════════════════════════════════════════════════════════════════ */

.upgrade-icon {
    margin-bottom: 1rem;
}

.upgrade-icon i {
    font-size: 3rem;
    color: var(--accent-warning);
    opacity: 0.8;
}

/* Preview Indicators for Free Users */

/* Upgrade CTA Button */

.btn-upgrade-pro {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-warning) 0%, var(--accent-orange) 100%);
    color: #000;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-upgrade-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(210, 153, 34, 0.3);
}

.btn-upgrade-pro i {
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   F) LINEAR GAUGE CHARTS FOR TECHNICAL INDICATORS - COMPACT
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overall Bias Gauge Section - Compact */

/* Bias Gauge Header with Label and Counts */

/* Bias Gauge Container with Side Labels */

/* Triangle pointer marker for bias gauge */

/* Indicators Gauge Grid - Ultra Compact */

/* ═══════════════════════════════════════════════════════════════════════════
   NEW 3-ROW INDICATOR LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

/* Individual indicator item in the 3-column grid */

/* Header row: name + value */

/* Gauge bar */

/* Signal text below gauge */

/* Responsive: 2 columns on smaller screens */

/* Ultra-Compact Indicator Row - 2 lines max */

/* Top row: Name + Value on left, Signal on right */
.gauge-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

/* Bottom row: Gauge track with pointer */

/* The visible gradient track - Red (sell/overbought) on LEFT, Green (buy/oversold) on RIGHT */
.gauge-track {
    position: relative;
    flex: 1;
    height: 6px;
    background: linear-gradient(to right,
        #f85149 0%,
        rgba(248, 81, 73, 0.5) 25%,
        #21262d 45%,
        #21262d 55%,
        rgba(63, 185, 80, 0.5) 75%,
        #3fb950 100%
    );
    border-radius: 3px;
}

/* Triangle pointer */

/* Legacy support for old classes */

/* Badge for signal text - Compact */

/* Signal styles (legacy support) */

/* Indicator Value Display - Compact */

/* Gauge Bar Container - Inline */

/* Linear Gauge Bar - Compact with Triangle Pointer */

/* Triangle pointer for indicator gauge */

/* Gauge Labels - Hidden in compact mode, shown on hover */
.gauge-labels {
    display: none;
}

/* Gauge Range - Hidden by default */

/* Responsive adjustments */

/* ═══════════════════════════════════════════════════════════════════════════
   NEW: TOP PICKS BANNER (Bull/Bear Highlights)
   ═══════════════════════════════════════════════════════════════════════════ */

.top-picks-banner {
    margin: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--terminal-surface) 0%, var(--terminal-elevated) 100%);
    border-radius: 12px;
    border: 1px solid var(--terminal-border);
    overflow: hidden;
}

.top-picks-banner .banner-icon {
    font-size: 1.25rem;
}

.top-picks-banner .picks-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
}

/* No Picks Today State */
.top-picks-banner .picks-container.no-picks-today {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    background: var(--terminal-card);
    border-radius: 8px;
    border: 1px dashed var(--terminal-border-subtle);
}

.top-picks-banner .no-picks-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text-secondary);
}

.top-picks-banner .no-picks-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.top-picks-banner .no-picks-text {
    font-size: 0.8rem;
    line-height: 1.5;
    max-width: 500px;
}

@media (max-width: 768px) {
    .top-picks-banner .picks-container {
        grid-template-columns: 1fr;
    }
    
    .top-picks-banner .no-picks-message {
        flex-direction: column;
        text-align: center;
    }
}

/* Pick Card */
.pick-card {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--terminal-card);
    border-radius: 8px;
    border: 1px solid var(--terminal-border-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pick-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pick-card.bull-pick {
    border-left: 3px solid var(--market-bull);
}

.pick-card.bull-pick:hover {
    background: var(--market-bull-soft);
    border-color: var(--market-bull);
}

.pick-card.bear-pick {
    border-left: 3px solid var(--market-bear);
}

.pick-card.bear-pick:hover {
    background: var(--market-bear-soft);
    border-color: var(--market-bear);
}

/* Pick Direction */

/* Pick Content */

/* ═══════════════════════════════════════════════════════════════════════════
   NEW: MOVE INTELLIGENCE (Expected vs Historical)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Opportunity classes */

/* ═══════════════════════════════════════════════════════════════════════════
   NEW: BEAT/MISS REACTIONS (History Column Enhancement)
   ═══════════════════════════════════════════════════════════════════════════ */

.history-container {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.beat-miss-reactions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.beat-miss-reactions .beat-reaction,
.beat-miss-reactions .miss-reaction {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    font-size: 0.6rem;
    font-weight: 500;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    white-space: nowrap;
}

.beat-miss-reactions .beat-reaction {
    background: var(--market-bull-soft);
    color: var(--market-bull);
}

.beat-miss-reactions .miss-reaction {
    background: var(--market-bear-soft);
    color: var(--market-bear);
}

/* Make the history column wider to accommodate beat/miss data */
.earnings-table .col-history {
    min-width: 160px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN: Manual Job Trigger Button (Temporary - Remove after debugging)
   ═══════════════════════════════════════════════════════════════════════════ */
.admin-run-job-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    margin-left: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-run-job-btn:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-1px);
}

.admin-run-job-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-run-job-btn.running {
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.admin-run-job-btn i {
    font-size: 0.8rem;
}

.admin-run-job-btn i.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.5); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW: DUAL PICKS CONTAINER (Engine + AI side by side)
   ═══════════════════════════════════════════════════════════════════════════ */

.picks-section {
    background: var(--terminal-elevated);
    border-radius: 8px;
    border: 1px solid var(--terminal-border-subtle);
    overflow: hidden;
}

.picks-section .section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--terminal-card);
    border-bottom: 1px solid var(--terminal-border-subtle);
}

.picks-section .section-icon {
    font-size: 1rem;
}

.picks-section .section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.picks-section .section-subtitle {
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* AI Section specific styling */
.picks-section.ai-section .section-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, var(--terminal-card) 100%);
}

.picks-section.ai-section .section-icon {
    color: #8b5cf6;
}

/* Engine Section specific styling */

/* Picks container inside sections */
.picks-section .picks-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

/* Make pick cards in sections smaller/more compact */
.picks-section .pick-card {
    padding: 0.75rem;
}

/* Agreement badge styling */

.pick-card.agreement {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.pick-card.bull-pick.agreement {
    border-left-color: var(--market-bull);
    border-right: 2px solid rgba(139, 92, 246, 0.3);
}

.pick-card.bear-pick.agreement {
    border-left-color: var(--market-bear);
    border-right: 2px solid rgba(139, 92, 246, 0.3);
}

/* Responsive: Stack sections vertically on small screens */
@media (max-width: 900px) {
    
    .picks-section .picks-container {
        flex-direction: row;
    }
    
    .picks-section .pick-card {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .picks-section .picks-container {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIGNAL GRADE BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.25rem;
    cursor: help;
}

/* Grade A - High Confidence (Gold/Premium) */
.grade-badge.grade-a {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.35));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}

/* Grade B - Moderate Edge (Silver/Blue) */
.grade-badge.grade-b {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(59, 130, 246, 0.3));
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.4);
}

/* Grade C - Directional Only (Bronze/Gray) */
.grade-badge.grade-c {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW: COMPACT PICKS BANNER (Modern, Minimal Design)
   ═══════════════════════════════════════════════════════════════════════════ */

.top-picks-compact {
    margin: 0.5rem 1rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.6) 0%, rgba(20, 20, 30, 0.8) 100%);
    border: 1px solid rgba(100, 100, 150, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.picks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.picks-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.picks-badge {
    font-size: 1rem;
}

.picks-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.picks-time {
    font-size: 0.625rem;
    color: var(--text-muted);
    padding: 0.15rem 0.4rem;
    background: rgba(100, 100, 150, 0.15);
    border-radius: 3px;
}

.picks-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Best track-record headline chip ───────────────────────────── */
.best-scenario-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.4rem 0.3rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    color: #e5e7eb;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    animation: bsc-glow 3.2s ease-in-out infinite;
}

.best-scenario-chip.ai {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.16) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(168, 85, 247, 0.35);
}

.best-scenario-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
    color: #fff;
}

@keyframes bsc-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.12); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.28); }
}

.bsc-flame { font-size: 0.9rem; line-height: 1; }

.bsc-headline {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
}

.bsc-source { font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.03em; }

.best-scenario-chip.ai .bsc-source { color: #d8b4fe; }

.bsc-window { color: var(--text-muted, #9ca3af); font-size: 0.58rem; }

.bsc-return {
    font-weight: 800;
    color: #34d399;
    font-size: 0.82rem;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.bsc-return small {
    font-size: 0.5rem;
    font-weight: 600;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
}

.bsc-win {
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    color: #d1fae5;
    font-size: 0.62rem;
}

.bsc-count {
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-muted, #9ca3af);
    font-weight: 600;
    font-size: 0.58rem;
}

@media (max-width: 980px) {
    .best-scenario-chip .bsc-win { display: none; }
}

@media (max-width: 820px) {
    .best-scenario-chip .bsc-count,
    .best-scenario-chip .bsc-window { display: none; }
}

/* ── "This row is a daily pick" flag in the Action/When column ──── */
.pick-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.42rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.pick-flag i { font-size: 0.62rem; }

.pick-flag.engine {
    background: rgba(6, 182, 212, 0.16);
    border-color: rgba(6, 182, 212, 0.4);
    color: #22d3ee;
}

.pick-flag.ai {
    background: rgba(168, 85, 247, 0.16);
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.picks-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 500;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.picks-link:hover {
    background: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
    transform: translateY(-1px);
}

.picks-run-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.picks-run-btn:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.picks-run-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.picks-run-btn.running i {
    animation: spin 1s linear infinite;
}

.picks-job-msg {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
}

.picks-job-msg.success {
    background: rgba(46, 160, 67, 0.1);
    color: #2ea043;
}

/* ═══════════ PICK CHIPS GRID ═══════════ */
.picks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

/* AI-only layout (Engine picks retired from display) */
.picks-grid.picks-ai-only {
    grid-template-columns: repeat(2, 1fr);
}

.pick-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.5rem;
    background: rgba(40, 40, 55, 0.5);
    border: 1px solid rgba(100, 100, 150, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.pick-chip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: all 0.25s ease;
}

.pick-chip.bull::before {
    background: var(--market-bull);
}

.pick-chip.bear::before {
    background: var(--market-bear);
}

.pick-chip:hover {
    background: rgba(60, 60, 80, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pick-chip.bull:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.pick-chip.bear:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.pick-chip.agree {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.08);
}

.pick-chip.agree::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

.pick-chip.empty {
    opacity: 0.4;
    cursor: default;
}

.pick-chip.empty:hover {
    transform: none;
    box-shadow: none;
}

.chip-source {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    background: rgba(100, 100, 150, 0.25);
    color: var(--text-muted);
}

.pick-chip.ai .chip-source {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.pick-chip.engine .chip-source {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.chip-dir {
    font-size: 0.9rem;
    line-height: 1;
}

.chip-symbol {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-score {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}

.pick-chip.bull .chip-score {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.pick-chip.bear .chip-score {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.chip-agree {
    font-size: 0.6rem;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
}

.chip-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
    .picks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .picks-grid {
        grid-template-columns: 1fr;
    }
    
    .picks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .picks-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EARNINGS EVENT STUDY (drawer tab) — modern, animated
   ═══════════════════════════════════════════════════════════════════════════ */
.earnings-event-study {
    width: 100%;
    height: 100%;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    animation: es-fade 0.35s ease both;
}

@keyframes es-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Loading / empty */
.es-loading, .es-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 320px; gap: 0.75rem; color: #8b8b9e; text-align: center;
}
.es-empty i { font-size: 2.4rem; opacity: 0.5; }
.es-empty p { margin: 0; font-weight: 600; color: #c7c7d4; }
.es-empty small { opacity: 0.7; max-width: 280px; }
.es-spinner {
    width: 28px; height: 28px; border: 3px solid rgba(124,77,255,0.25);
    border-top-color: #a78bfa; border-radius: 50%; animation: es-spin 0.8s linear infinite;
}
@keyframes es-spin { to { transform: rotate(360deg); } }

/* Layout */
.es-grid { display: grid; grid-template-columns: 1fr 220px; gap: 0.85rem; flex: 1; min-height: 340px; }
.es-chart-col { display: flex; flex-direction: column; min-width: 0; }

/* Top bar */
.es-top-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.es-legend { display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }
.es-leg { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.66rem; color: #9aa0ae; white-space: nowrap; }
.es-sw { display: inline-block; border-radius: 2px; }
.es-sw.line { width: 18px; height: 3px; }
.es-sw.median { width: 18px; height: 3px; background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,0.6); }
.es-sw.band { width: 18px; height: 11px; background: linear-gradient(180deg, rgba(99,102,241,0.4), rgba(99,102,241,0.12)); }
.es-sw.indiv { width: 18px; height: 2px; background: rgba(124,77,255,0.4); }

.es-pills { display: inline-flex; gap: 3px; background: rgba(0,0,0,0.28); padding: 3px; border-radius: 10px; }
.es-pill {
    background: transparent; border: none; color: #8b8b9e;
    padding: 0.28rem 0.6rem; font-size: 0.62rem; font-weight: 600; border-radius: 7px;
    cursor: pointer; transition: all 0.18s ease; display: inline-flex; align-items: center; gap: 0.25rem;
}
.es-pill:hover { color: #e0e0e6; background: rgba(255,255,255,0.06); }
.es-pill.active { background: rgba(124,77,255,0.28); color: #c4b5fd; box-shadow: 0 0 0 1px rgba(124,77,255,0.45), 0 0 10px rgba(124,77,255,0.25); }
.es-pill i { font-size: 0.58rem; }

/* SVG */
.es-svg-wrap {
    width: 100%; flex: 1; min-height: 290px;
    background: radial-gradient(120% 120% at 50% 0%, rgba(124,77,255,0.06), rgba(0,0,0,0.28));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.es-svg { width: 100%; height: 100%; display: block; }

/* Animated average line draw-in (alternating class re-triggers per ticker) */
.es-avg.anim-a, .es-avg.anim-b {
    stroke-dasharray: 1600; stroke-dashoffset: 1600;
    animation: es-draw 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    filter: drop-shadow(0 0 5px currentColor);
}
@keyframes es-draw { to { stroke-dashoffset: 0; } }

/* Info chips under chart */
.es-info { display: flex; gap: 0.45rem; padding: 0.5rem 0 0.1rem; }
.es-chip-sm {
    display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.62rem; color: #9aa0ae;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
    padding: 0.22rem 0.55rem; border-radius: 20px;
}
.es-chip-sm strong { color: #c4b5fd; font-size: 0.72rem; }
.es-chip-sm.up strong { color: #22c55e; }

/* ===== Right stats column ===== */
.es-stats-col { display: flex; flex-direction: column; gap: 0.55rem; min-width: 210px; }

/* Action hero card */
.es-action-card {
    border-radius: 14px; padding: 0.8rem; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03); position: relative; overflow: hidden;
    animation: es-fade 0.4s ease 0.05s both;
}
.es-action-card.action-strong-buy { background: linear-gradient(135deg, rgba(34,197,94,0.24), rgba(34,197,94,0.04)); border-color: rgba(34,197,94,0.5); box-shadow: 0 0 24px rgba(34,197,94,0.14); }
.es-action-card.action-buy { background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(34,197,94,0.02)); border-color: rgba(34,197,94,0.32); }
.es-action-card.action-short { background: linear-gradient(135deg, rgba(239,68,68,0.14), rgba(239,68,68,0.02)); border-color: rgba(239,68,68,0.32); }
.es-action-card.action-strong-short { background: linear-gradient(135deg, rgba(239,68,68,0.24), rgba(239,68,68,0.04)); border-color: rgba(239,68,68,0.5); box-shadow: 0 0 24px rgba(239,68,68,0.14); }
.es-action-card.action-none { background: rgba(120,120,140,0.08); border-color: rgba(255,255,255,0.1); }

.es-action-top { display: flex; align-items: center; gap: 0.55rem; }
.es-action-icon { flex-shrink: 0; display: flex; }
.es-action-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.es-action-label { font-size: 1rem; font-weight: 800; letter-spacing: 0.3px; color: #fff; text-transform: uppercase; }
.es-action-sub { font-size: 0.62rem; color: #adb5bd; display: inline-flex; align-items: center; gap: 0.25rem; }

.es-conv { margin-top: 0.6rem; }
.es-conv-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.58rem; color: #9aa0ae; text-transform: uppercase; letter-spacing: 0.4px; }
.es-conv-num { font-size: 0.95rem; font-weight: 800; color: #fff; font-family: monospace; }
.es-conv-num small { font-size: 0.55rem; color: #8b8b9e; font-weight: 500; }
.es-conv-track { margin-top: 0.25rem; height: 7px; border-radius: 4px; background: rgba(0,0,0,0.35); overflow: hidden; }
.es-conv-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7c4dff, #22c55e); box-shadow: 0 0 8px rgba(124,77,255,0.5); transition: width 0.7s cubic-bezier(0.22,1,0.36,1); }

/* When card */
.es-when-card { background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 0.6rem 0.7rem; animation: es-fade 0.4s ease 0.1s both; }
.es-when-head { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.4px; color: #9aa0ae; display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.3rem; }
.es-when-detail { font-size: 0.74rem; font-weight: 600; color: #e0e0e6; }
.es-when-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 0.4rem; font-size: 0.58rem; color: #9aa0ae; }
.es-rr strong { color: #22c55e; font-family: monospace; font-size: 0.74rem; }
.es-consistency { color: #818cf8; }

/* Three windows */
.es-windows { display: flex; flex-direction: column; gap: 0.3rem; animation: es-fade 0.4s ease 0.15s both; }
.es-win { display: flex; align-items: center; gap: 0.45rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 0.34rem 0.55rem; border-radius: 9px; }
.es-win.accent { background: rgba(124,77,255,0.1); border-color: rgba(124,77,255,0.28); }
.es-win-badge { width: 16px; height: 16px; min-width: 16px; border-radius: 50%; background: rgba(124,77,255,0.3); color: #c4b5fd; font-size: 0.54rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.es-win-label { font-size: 0.6rem; color: #9aa0ae; text-transform: uppercase; letter-spacing: 0.3px; }
.es-win-val { font-size: 0.78rem; font-weight: 700; font-family: monospace; margin-left: auto; }
.es-win-val.pos { color: #22c55e; }
.es-win-val.neg { color: #ef4444; }

.es-disclaimer { font-size: 0.54rem; color: #6c757d; line-height: 1.35; display: flex; gap: 0.3rem; margin-top: auto; padding-top: 0.2rem; }
.es-disclaimer i { flex-shrink: 0; margin-top: 1px; }

/* Responsive: stack on narrow drawers */
@media (max-width: 560px) {
    .es-grid { grid-template-columns: 1fr; }
    .es-stats-col { order: -1; min-width: 0; }
}
