/* Dashboard Styles */

/* Metric Cards */
.metric-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.metric-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card-icon {
    font-size: 1.2rem;
    color: #007bff;
}

.metric-card-body {
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-sub-value {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.metric-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.25rem;
}

.metric-trend.up {
    color: #28a745;
}

.metric-trend.down {
    color: #dc3545;
}

.metric-trend.neutral {
    color: #6c757d;
}

.metric-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1.5rem;
}

.chart-container canvas {
    max-height: 100%;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Dashboard Container */
.dashboard-container {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Section */
.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-section h2 {
    color: #495057;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.dashboard-section h2 i {
    margin-right: 0.5rem;
    color: #007bff;
}

/* Chart Cards */
.chart-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.dashboard-controls .btn {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.dashboard-controls .btn i {
    margin-right: 0.25rem;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Dashboard Navigation */
.dashboard-nav {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.dashboard-nav .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.dashboard-nav .nav-link:hover {
    background: #e9ecef;
    color: #007bff;
}

.dashboard-nav .nav-link.active {
    background: #007bff;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid,
    .dashboard-grid-2,
    .dashboard-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .dashboard-header {
        padding: 1.5rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .metric-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 1.8rem;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* Loading States */
.dashboard-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}

.dashboard-loading .spinner-border {
    margin-right: 0.5rem;
}

/* Error States */
.dashboard-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
}

/* Success States */
.dashboard-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin-bottom: 1rem;
}

/* Refresh Button */
.dashboard-refresh {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.dashboard-refresh .btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Last Updated */
.dashboard-last-updated {
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}
