/* Dashboard styles */

.dashboard-hero {
    background: linear-gradient(120deg, #232946 0%, #3a8dde 100%);
    color: #fff;
    padding: 40px 24px 32px;
    text-align: center;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 8px 32px rgba(35, 41, 70, 0.3);
}
.dashboard-hero h1 { font-size: 2rem; margin-bottom: 6px; font-weight: 700; }
.dashboard-hero p { font-size: 0.95rem; color: rgba(255,255,255,0.85); margin: 0; }

/* KPI Cards */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: -28px auto 20px;
    max-width: 1200px;
    padding: 0 20px;
}
@media (max-width: 900px) { .dashboard-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .dashboard-metrics { grid-template-columns: 1fr; } }

.metric-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(35,41,70,0.1);
    text-align: center;
}
.metric-card .metric-value { display: block; font-size: 1.6rem; font-weight: 700; color: #232946; }
.metric-card .metric-value.pnl-positive { color: #166534; }
.metric-card .metric-value.pnl-negative { color: #991b1b; }
.metric-card .metric-label { display: block; font-size: 0.8rem; color: #63708f; margin-top: 4px; }

/* Dashboard body */
.dashboard-body { max-width: 1200px; margin: 0 auto 60px; padding: 0 20px; }

/* Panels */
.panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(35,41,70,0.08);
    padding: 18px;
    margin-bottom: 16px;
}
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-header h2 { font-size: 1.05rem; font-weight: 600; color: #232946; margin: 0; }

/* Signal Table */
.signal-table-wrap { overflow-x: auto; }
.signal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.signal-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.78rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
}
.signal-table th:hover { background: #eef1f5; }
.signal-table td {
    padding: 8px 12px;
    border-top: 1px solid #f0f1f3;
    white-space: nowrap;
}
.signal-table tr:hover { background: #f9fafb; }

.pair-cell { }
.coin-icon { width: 22px; height: 22px; border-radius: 50%; }
.pair-quote { color: #6b7280; font-size: 0.75rem; }
.ts-cell { color: #6b7280; font-size: 0.78rem; }

/* Signal badges */
.signal-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.signal-buy { background: #dcfce7; color: #166534; }
.signal-sell { background: #fee2e2; color: #991b1b; }
.signal-hold { background: #f3f4f6; color: #4b5563; }

/* Model badge */
.model-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    text-transform: capitalize;
}

/* PnL colors */
.pnl-positive { color: #166534 !important; font-weight: 600; }
.pnl-negative { color: #991b1b !important; font-weight: 600; }

/* Stale warning */
.stale-warning td { opacity: 0.5; }
.stale-warning td:last-child { color: #dc2626; opacity: 1; font-weight: 600; }

/* Status dots */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.dot-green { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.5); }
.dot-red { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.5); }

/* Accuracy grid */
.accuracy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 700px) { .accuracy-grid { grid-template-columns: repeat(2, 1fr); } }

.accuracy-stat {
    background: #f5f8ff;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.accuracy-stat .stat-value { display: block; font-size: 1.3rem; font-weight: 700; color: #232946; }
.accuracy-stat .stat-label { display: block; font-size: 0.73rem; color: #63708f; margin-top: 2px; }

/* PnL grid */
.pnl-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.pnl-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex: 1;
    min-width: 300px;
}
@media (max-width: 700px) { .pnl-cards { grid-template-columns: repeat(2, 1fr); } }

.top-pairs { flex: 1; min-width: 300px; }
.top-pairs h3 { font-size: 0.95rem; color: #232946; margin: 0 0 10px; }

/* Activity cards (reused) */
.activity-card {
    background: #f5f8ff;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.activity-card .activity-value { display: block; font-size: 1rem; font-weight: 700; color: #232946; }
.activity-card .activity-label { display: block; font-size: 0.72rem; color: #63708f; margin-top: 2px; }

/* Activity table */
.activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.activity-table th {
    background: #f8fafc;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.78rem;
}
.activity-table td { padding: 8px 12px; border-top: 1px solid #f0f1f3; }
.activity-table tr:hover { background: #f9fafb; }

/* Status grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
@media (max-width: 900px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .status-grid { grid-template-columns: repeat(2, 1fr); } }

.status-item {
    background: #f5f8ff;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.status-item .status-label { display: block; font-size: 0.72rem; color: #63708f; margin-bottom: 4px; }
.status-item .status-value { display: block; font-size: 0.9rem; font-weight: 600; color: #232946; }

/* Equity chart */
.equity-chart-container { height: 300px; position: relative; }

/* Subscriber gate */
.subscriber-gate {
    text-align: center;
    padding: 32px 20px;
    color: #63708f;
}
.subscriber-gate p { margin-bottom: 12px; }
.cta-btn-sm {
    display: inline-block;
    background: linear-gradient(90deg, #3a8dde 0%, #43c1ff 100%);
    color: #fff;
    padding: 8px 18px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Timeframe toggle */
.tf-toggle { display: flex; gap: 3px; }
.tf-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    background: #e5e7eb;
    color: #4b5563;
    transition: all 0.15s;
}
.tf-btn:hover { background: #d1d5db; }
.tf-btn.active { background: #3a8dde; color: #fff; }

/* Pair link in signal table */
.pair-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.pair-link:hover { color: #3a8dde; }

/* Loading state */
.loading { text-align: center; color: #6b7280; padding: 20px; }
