/* LQD Trading Dashboard - Dark Theme */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222838;
    --border: #2a3040;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #0f1629 100%);
    border-bottom: 1px solid var(--border);
    padding: 24px 32px;
}

.header-content h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.status-bar {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.online {
    background: var(--green-bg);
    color: var(--green);
}

.status-badge.online::before {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.status-badge.offline {
    background: var(--red-bg);
    color: var(--red);
}

.status-badge.offline::before {
    background: var(--red);
}

#last-update {
    color: var(--text-muted);
    font-size: 12px;
}

/* Main */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-card.win .stat-value {
    color: var(--green);
}

.stat-value.positive {
    color: var(--green);
}

.stat-value.negative {
    color: var(--red);
}

/* Charts */
.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.chart-section h2,
.signals-section h2,
.symbol-stats h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container.small {
    height: 250px;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-half {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

/* Signals Table */
.signals-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}

tr:hover td {
    background: var(--bg-card-hover);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
    font-family: var(--font) !important;
    font-style: italic;
}

.direction-long {
    color: var(--green);
    font-weight: 700;
}

.direction-short {
    color: var(--red);
    font-weight: 700;
}

.outcome-win {
    color: var(--green);
    font-weight: 700;
}

.outcome-loss {
    color: var(--red);
    font-weight: 700;
}

.outcome-pending {
    color: var(--yellow);
}

.outcome-breakeven {
    color: var(--text-muted);
}

/* Symbol Cards */
.symbol-stats {
    margin-bottom: 24px;
}

.symbol-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.symbol-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.symbol-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent);
}

.symbol-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(42, 48, 64, 0.5);
    font-size: 13px;
}

.symbol-stat-row:last-child {
    border-bottom: none;
}

.symbol-stat-label {
    color: var(--text-secondary);
}

.symbol-stat-value {
    font-family: var(--font-mono);
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.disclaimer {
    margin-top: 8px;
    color: var(--yellow);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 16px;
    }

    main {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-row {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
