/* Command Centre Specific Styles */
/* Inherits base styles from style.css */

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Corner Button */
.corner-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.corner-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.corner-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

@media (max-width: 768px) {
    .corner-button {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
}

/* Regime Banner - Compact & Clean */
.regime-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.5rem 2rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.regime-banner.macro {
    background: rgba(255, 23, 68, 0.15);
    border-bottom: 2px solid #ff1744;
}

.regime-banner.normal {
    background: rgba(255, 167, 38, 0.15);
    border-bottom: 2px solid #ffa726;
}

.regime-banner.alt {
    background: rgba(0, 255, 157, 0.15);
    border-bottom: 2px solid var(--accent-green);
}

#regime-icon {
    font-size: 1rem;
}

#regime-text {
    font-size: 0.85rem;
    font-weight: 700;
}

.regime-confidence {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
}

/* Header Adjustments */
header {
    margin-top: 80px;
    padding: 1rem 2rem;
}

/* Command Container */
.command-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Main Grid Layout */
.command-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.column-left,
.column-center,
.column-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card Styling */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 8px 32px rgba(0, 255, 157, 0.1);
}

.card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* Portfolio Stats */
.portfolio-stats,
.regime-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row,
.regime-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.accent-green {
    color: var(--accent-green);
}

.stat-value.accent-red {
    color: #ff1744;
}

/* System Health */
.health-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

.health-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.health-status {
    font-size: 1.2rem;
}

.health-status.online {
    color: var(--accent-green);
}

.health-status.offline {
    color: #ff1744;
}

.health-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ARIA Statistics */
.aria-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.aria-stat {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.aria-stat.veto {
    border-color: rgba(255, 23, 68, 0.3);
}

.aria-stat.boost {
    border-color: rgba(0, 255, 157, 0.3);
}

.aria-stat.approve {
    border-color: rgba(41, 98, 255, 0.3);
}

.aria-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.aria-stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
}

.aria-stat-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

/* Position Cards */
.positions-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 800px;
    overflow-y: auto;
}

.no-positions {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.position-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.position-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 4px 16px rgba(0, 255, 157, 0.1);
    transform: translateY(-2px);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.position-symbol {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-primary);
}

.position-direction {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.position-direction.long {
    background: rgba(0, 255, 157, 0.2);
    color: var(--accent-green);
}

.position-direction.short {
    background: rgba(255, 23, 68, 0.2);
    color: #ff1744;
}

.position-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.position-detail {
    display: flex;
    justify-content: space-between;
}

.position-detail-label {
    color: var(--text-secondary);
}

.position-detail-value {
    color: var(--text-primary);
    font-weight: 700;
}

.position-pnl {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-weight: 900;
    font-size: 1rem;
}

.position-pnl.positive {
    color: var(--accent-green);
}

.position-pnl.negative {
    color: #ff1744;
}

/* Market Leaders */
.market-leaders {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leader-item {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.leader-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-green);
}

.leader-symbol {
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.leader-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

.leader-change {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
}

.leader-change.positive {
    color: var(--accent-green);
}

.leader-change.negative {
    color: #ff1744;
}

.leader-breakout {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-green);
    animation: pulse 2s infinite;
}

/* Activity Feed */
.activity-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-green);
}

.filter-btn.active {
    background: var(--accent-green);
    color: #000;
    border-color: var(--accent-green);
    font-weight: 700;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border-left: 3px solid var(--accent-green);
    font-size: 0.85rem;
    animation: fadeIn 0.5s ease;
}

.activity-item.entry {
    border-left-color: var(--accent-green);
}

.activity-item.exit {
    border-left-color: var(--accent-blue);
}

.activity-item.aria {
    border-left-color: #ffa726;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.activity-text {
    color: var(--text-primary);
}

/* Correlation Matrix */
.correlation-matrix {
    overflow-x: auto;
}

.corr-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
}

.corr-table th {
    padding: 0.75rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
}

.corr-table td {
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.corr-table td:hover {
    transform: scale(1.1);
}

.corr-cell-high {
    background: rgba(255, 23, 68, 0.3);
    color: #ff1744;
}

.corr-cell-medium {
    background: rgba(255, 167, 38, 0.3);
    color: #ffa726;
}

.corr-cell-low {
    background: rgba(0, 255, 157, 0.3);
    color: var(--accent-green);
}

/* Equity Chart */
.equity-card {
    min-height: 350px;
}

#equity-chart {
    width: 100%;
    height: 300px;
    max-height: 300px;
}

/* Full Width Sections */
.full-width-section {
    margin-bottom: 1.5rem;
}

/* Alert Overlay */
.alert-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: none;
    animation: alertPulse 1s ease-in-out;
}

.alert-overlay.show {
    display: block;
}

.alert-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-green);
    text-align: center;
    min-width: 300px;
}

.alert-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.alert-message {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

@keyframes alertPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Scrollbar Styling */
.positions-grid::-webkit-scrollbar,
.activity-feed::-webkit-scrollbar {
    width: 6px;
}

.positions-grid::-webkit-scrollbar-track,
.activity-feed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.positions-grid::-webkit-scrollbar-thumb,
.activity-feed::-webkit-scrollbar-thumb {
    background: var(--accent-green);
    border-radius: 3px;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .command-grid {
        grid-template-columns: 1fr 1.5fr;
    }
    
    .column-right {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .regime-banner {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .command-container {
        padding: 1rem;
    }
    
    .command-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card h3 {
        font-size: 0.9rem;
    }
    
    .aria-stats {
        grid-template-columns: 1fr;
    }
    
    .position-details {
        grid-template-columns: 1fr;
    }
    
    .leader-item {
        grid-template-columns: 1fr 1fr 1fr;
        font-size: 0.85rem;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease;
}
