/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
}

.dashboard-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.dashboard-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.dashboard-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.date-range,
.fleet-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-controls label {
    font-weight: 600;
    font-size: 0.9rem;
}

.dashboard-controls select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.dashboard-controls select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Key Metrics */
.key-metrics {
    padding: 60px 0;
    background: #f8fafc;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.metric-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i {
    font-size: 1.5rem;
    color: white;
}

.metric-content h3 {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

/* Detailed Analytics */
.detailed-analytics {
    padding: 60px 0;
    background: white;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.analytics-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.analytics-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-card h3 i {
    color: #2563eb;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.chart-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Driver Analysis */
.driver-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.driver-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.driver-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.driver-name {
    font-weight: 600;
    color: #1e293b;
}

.driver-cost {
    color: #ef4444;
    font-weight: 600;
}

.driver-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Incident Stats */
.incident-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Incident Timeline */
.incident-timeline h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    min-width: 50px;
}

.timeline-content {
    flex: 1;
    font-size: 0.9rem;
    color: #1e293b;
}

.timeline-cost {
    display: block;
    color: #ef4444;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Cost Breakdown */
.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cost-label {
    font-weight: 600;
    color: #1e293b;
}

.cost-amount {
    font-weight: 700;
    color: #ef4444;
}

.cost-percentage {
    font-size: 0.8rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Recent Incidents */
.recent-incidents {
    padding: 60px 0;
    background: #f8fafc;
}

.recent-incidents h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.incidents-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.incidents-table table {
    width: 100%;
    border-collapse: collapse;
}

.incidents-table th {
    background: #1e293b;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.incidents-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.incidents-table tr:hover {
    background: #f8fafc;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.pending {
    background: #fef3c7;
    color: #d97706;
}

.status.resolved {
    background: #d1fae5;
    color: #059669;
}

.status.in-progress {
    background: #dbeafe;
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .incident-stats {
        grid-template-columns: 1fr;
    }
    
    .incidents-table {
        overflow-x: auto;
    }
    
    .incidents-table table {
        min-width: 600px;
    }
    
    .metric-card {
        flex-direction: column;
        text-align: center;
    }
    
    .driver-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .cost-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 100px 0 40px;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .recent-incidents h2 {
        font-size: 2rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .analytics-card {
        padding: 1.5rem;
    }
} 