/**
 * Vehizo Statistics Page Styles
 * Custom CSS for vehicle statistics dashboard
 */

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

.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-card h3 {
    font-size: 2em;
    margin: 0 0 10px 0;
    color: #0073aa;
    font-weight: 600;
}

.stat-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

/* Chart Containers */
.chart-container {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 320px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-container h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.chart-container canvas {
    flex: 1;
    min-height: 0;
    max-height: 250px;
    width: 100% !important;
    height: auto !important;
    display: block;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    margin-top: 20px;
}

/* Meta Boxes */
.meta-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.meta-box h3 {
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
}

.meta-box .chart-container {
    padding: 0 20px 20px;
}

/* Vehicle Items & Stats */
.vehicle-item, .quick-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.vehicle-item:hover, .quick-stat-item:hover {
    background-color: #f8f9fa;
}

.vehicle-item:last-child, .quick-stat-item:last-child {
    border-bottom: none;
}

.vehicle-title, .quick-stat-label {
    font-weight: 500;
    color: #23282d;
    flex: 1;
}

.vehicle-count, .quick-stat-value {
    background: #0073aa;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* PRO Badge Styling */
.pro-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.pro-feature-box {
    border-left: 3px solid #667eea;
}

.pro-feature-box h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Vehicle Item Enhanced Styling */
.vehicle-item > div {
    display: flex;
    flex-direction: column;
}

.vehicle-item strong {
    font-size: 13px;
    color: #23282d;
}

/* Quick Stat Item Enhanced */
.quick-stat-item > div {
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 782px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card h3 {
        font-size: 1.5em;
    }

    .dashboard-grid {
        gap: 15px;
    }

    .chart-container {
        height: 350px;
    }

    .vehicle-item, .quick-stat-item {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .vehicle-count, .quick-stat-value {
        align-self: flex-end;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .stat-card, .meta-box {
        background: #1e1e1e;
        border-color: #333;
        color: #fff;
    }
    
    .meta-box h3 {
        background: #2a2a2a;
        border-color: #333;
        color: #fff;
    }
    
    .vehicle-item:hover, .quick-stat-item:hover {
        background-color: #2a2a2a;
    }
    
    .vehicle-title, .quick-stat-label {
        color: #fff;
    }
}
