/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 2px;
}

.stat-card {
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 20px;
    height: 20px;
}

.stat-icon.purple { background: #f5f3ff; color: var(--purple); }
.stat-icon.green { background: #ecfdf5; color: var(--green); }
.stat-icon.blue { background: #eff6ff; color: var(--blue); }
.stat-icon.orange { background: #fffbeb; color: var(--orange); }

.stat-info h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Analytics & Charts */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.analytics-grid .large {
    grid-column: span 3;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 12px;
}

.chart-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 600;
}

.chart-container canvas {
    flex: 1;
    max-height: 300px;
}

/* Scanner Logs */
.logs-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 380px;
    display: flex;
    flex-direction: column;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logs-output {
    flex: 1;
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    line-height: 1.4;
}

.log-entry.system { color: #94a3b8; font-style: italic; }
.log-entry.error { color: #f87171; }

/* Dashboard Responsive */
@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

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

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