/* Trading Dashboard - Light Theme to match main site */

/* Dashboard Controls */
.dashboard-controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.status-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--muted));
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: hsl(var(--muted-foreground));
}

.status-dot.connected {
    background: hsl(var(--trust-green));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 hsla(var(--trust-green) / 0.7); }
    70% { box-shadow: 0 0 0 10px hsla(var(--trust-green) / 0); }
    100% { box-shadow: 0 0 0 0 hsla(var(--trust-green) / 0); }
}

.timestamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}

/* Master Signal Card */
.master-signal {
    margin: 2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.master-signal.neutral {
    background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--background)) 100%);
    border: 1px solid hsl(var(--border));
}

.master-signal.bullish {
    background: linear-gradient(135deg, hsla(var(--trust-green) / 0.1) 0%, hsl(var(--background)) 100%);
    border: 1px solid hsl(var(--trust-green));
}

.master-signal.bearish {
    background: linear-gradient(135deg, hsla(var(--destructive) / 0.1) 0%, hsl(var(--background)) 100%);
    border: 1px solid hsl(var(--destructive));
}

.master-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.master-icon {
    font-size: 3rem;
    line-height: 1;
}

.master-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin: 0;
}

.master-subtitle {
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

/* Metrics Grid */
.master-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.metric-box {
    text-align: center;
    padding: 1rem;
    background: hsl(var(--background));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.metric-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.metric-box .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    font-family: 'JetBrains Mono', monospace;
}

.metric-box .value.cyan {
    color: hsl(var(--secondary));
}

.metric-box .sub {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

/* Master Action Box */
.master-action {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: hsl(var(--muted));
    border-top: 1px solid hsl(var(--border));
}

.action-item {
    text-align: center;
}

.action-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.action-item .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    font-family: 'JetBrains Mono', monospace;
}

.action-item .value.caution {
    color: hsl(var(--warning-amber));
}

/* Confluence Bar */
.confluence-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: hsl(var(--background));
    border-radius: var(--radius);
    margin: 1rem 0;
}

.confluence-label {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.confluence-indicators {
    display: flex;
    gap: 1.5rem;
}

.confluence-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
}

.confluence-item strong {
    color: hsl(var(--foreground));
}

.confluence-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--primary));
    font-family: 'JetBrains Mono', monospace;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 0.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: inherit;
}

.tab-btn:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.tab-btn.active {
    background: hsl(38 92% 50%);
    color: white;
    border-color: hsl(38 92% 45%);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alert Banner */
.alert-banner {
    display: none;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    align-items: center;
    gap: 0.75rem;
}

.alert-banner.show {
    display: flex;
}

.alert-banner.warning {
    background: hsla(var(--warning-amber) / 0.1);
    border-left: 4px solid hsl(var(--warning-amber));
    color: hsl(var(--warning-amber));
}

.alert-banner.error {
    background: hsla(var(--destructive) / 0.1);
    border-left: 4px solid hsl(var(--destructive));
    color: hsl(var(--destructive));
}

.alert-banner.success {
    background: hsla(var(--trust-green) / 0.1);
    border-left: 4px solid hsl(var(--trust-green));
    color: hsl(var(--trust-green));
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsla(var(--background) / 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid hsl(var(--border));
    border-radius: 50%;
    border-top-color: hsl(var(--primary));
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 1rem;
    color: hsl(var(--foreground));
    font-size: 1.1rem;
    font-weight: 500;
}

/* Data Sources Grid */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

/* Cheat Sheet */
.cheat-sheet {
    margin: 2rem 0;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cheat-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: hsl(var(--muted));
    border-radius: var(--radius) var(--radius) 0 0;
}

.cheat-header span {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.cheat-content {
    padding: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}

.cheat-content:not(.open) {
    display: none;
}

.cheat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.cheat-item {
    padding: 1rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
}

.cheat-item-title {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.cheat-item-desc {
    font-size: 0.9rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
}

/* Overview Tab Specific Styles */
.dual-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.regime-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.regime-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.regime-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-green {
    background: hsla(var(--trust-green) / 0.2);
    color: hsl(var(--trust-green));
}

.badge-yellow {
    background: hsla(var(--warning-amber) / 0.2);
    color: hsl(var(--warning-amber));
}

.badge-cyan {
    background: hsla(var(--secondary) / 0.2);
    color: hsl(var(--secondary));
}

.badge-red {
    background: hsla(var(--destructive) / 0.2);
    color: hsl(var(--destructive));
}

.regime-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.regime-indicator {
    font-size: 3rem;
    line-height: 1;
}

.regime-info h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: hsl(var(--foreground));
}

.regime-subtitle {
    color: hsl(var(--muted-foreground));
}

.regime-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.regime-stat {
    text-align: center;
    padding: 0.75rem;
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) - 2px);
}

.regime-stat .label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
}

.regime-stat .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.regime-action {
    padding: 1rem;
    background: hsla(var(--primary) / 0.05);
    border-radius: calc(var(--radius) - 2px);
    border-left: 3px solid hsl(var(--primary));
    margin-bottom: 1rem;
}

.regime-action h4 {
    margin: 0 0 0.5rem 0;
    color: hsl(var(--foreground));
}

.regime-action p {
    margin: 0;
    color: hsl(var(--muted-foreground));
}

.edge-decay {
    margin-top: 1rem;
}

.edge-decay .label {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.edge-bar {
    height: 8px;
    background: hsl(var(--muted));
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.edge-fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(var(--trust-green)) 0%, hsl(var(--warning-amber)) 100%);
    transition: width 0.3s ease;
}

.edge-text {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}

/* GEX Card Styles */
.gex-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.gex-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.net-gex-display {
    text-align: center;
    padding: 1.5rem;
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 1.5rem;
}

.net-gex-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.net-gex-value.positive {
    color: hsl(var(--trust-green));
}

.net-gex-value.negative {
    color: hsl(var(--destructive));
}

.net-gex-label {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
}

.price-position-bar {
    margin-bottom: 1.5rem;
}

.position-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.position-labels .put {
    color: hsl(var(--trust-green));
}

.position-labels .call {
    color: hsl(var(--destructive));
}

.position-track {
    height: 8px;
    background: linear-gradient(90deg, hsl(var(--trust-green)) 0%, hsl(var(--muted)) 50%, hsl(var(--destructive)) 100%);
    border-radius: 4px;
    position: relative;
    margin-bottom: 0.5rem;
}

.position-marker {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    background: hsl(var(--foreground));
    border: 2px solid hsl(var(--card));
    border-radius: 50%;
    transform: translateX(-50%);
}

.position-text {
    text-align: center;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}

.gex-timeframes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.gex-tf-card {
    padding: 1rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
}

.gex-tf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid hsl(var(--border));
}

.gex-tf-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.gex-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.gex-level .label {
    color: hsl(var(--muted-foreground));
}

.gex-level .value {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.gex-level .value.call {
    color: hsl(var(--destructive));
}

.gex-level .value.zero {
    color: hsl(var(--warning-amber));
}

.gex-level .value.put {
    color: hsl(var(--trust-green));
}

/* GEX Chart (GEX tab) */
.gex-chart-container {
    position: relative;
    margin: 1.5rem 0 1rem;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bar-wrapper.current .bar-label {
    font-weight: 600;
    color: hsl(var(--primary));
}

.bar {
    height: 20px;
    border-radius: 2px;
    transition: width 0.3s ease;
    flex: 0 0 auto;
}

.bar-label {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    min-width: 3rem;
    text-align: right;
}

/* VIX Tab Specific */
.vix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vix-metric {
    text-align: center;
    padding: 1rem;
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) - 2px);
}

.vix-metric .metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
}

.vix-metric .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    font-family: 'JetBrains Mono', monospace;
}

.vix-metric .metric-sub {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

.vix-chart {
    min-height: 200px;
    padding: 1rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 1rem;
}

/* Signals Grid */
.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.signal-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
}

.signal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.signal-dot.bullish {
    background: hsl(var(--trust-green));
}

.signal-dot.bearish {
    background: hsl(var(--destructive));
}

.signal-dot.neutral {
    background: hsl(var(--warning-amber));
}

.signal-content {
    flex: 1;
}

.signal-name {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.signal-value {
    font-size: 0.9rem;
    color: hsl(var(--muted-foreground));
}

.signal-status {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

/* Implications List */
.implications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.implications-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.implications-list li:last-child {
    border-bottom: none;
}

.implications-list .icon {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* Implications Grid */
.implications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.implication-card {
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.implication-card h4 {
    margin: 0 0 1rem 0;
    color: hsl(var(--foreground));
}

.implication-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.implication-card li {
    padding: 0.5rem 0;
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.implication-card .icon {
    color: hsl(var(--primary));
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-controls-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .master-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .confluence-indicators {
        flex-direction: column;
        gap: 0.5rem;
    }
}
