/* Analytics Dashboard Styles */

.analytics-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Summary Cards */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #e1e5e9;
}

.summary-card h3 {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin: 0;
}

/* Analytics Controls */
.analytics-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.analytics-controls .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1e3c72;
    color: white;
}

.btn-primary:hover {
    background: #152a5a;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Analytics Sections */
.analytics-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.analytics-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    flex: 0 0 150px;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.activity-type {
    flex: 0 0 100px;
    font-size: 0.85rem;
    color: #1e3c72;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-description {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

/* Chart Container */
.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Speed Test Stats */
.speed-test-stats {
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.stat-item h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin: 0;
}

/* Loading and No Data States */
.loading, .no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-dashboard {
        padding: 15px;
    }
    
    .analytics-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .summary-value {
        font-size: 1.5rem;
    }
    
    .analytics-section {
        padding: 20px;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .activity-time, .activity-type {
        flex: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .analytics-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .analytics-summary {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-controls {
        flex-direction: column;
    }
    
    .analytics-controls .btn {
        width: 100%;
    }
} 