/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e5e7eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    background: #3b82f6;
    padding: 12px;
    border-radius: 12px;
    color: white;
    font-size: 24px;
}

.header-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.header-text p {
    color: #6b7280;
    font-size: 14px;
}

.header-right {
    text-align: right;
}

.report-date p:first-child {
    color: #6b7280;
    font-size: 14px;
}

.report-date p:last-child {
    font-weight: 600;
    color: #1f2937;
}

/* Main Content */
.main {
    padding: 32px 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    gap: 4px;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab-button.active {
    background: #3b82f6;
    color: white;
}

.tab-button i {
    font-size: 16px;
}

/* Tab Content */
.tab-content {
    min-height: 600px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header p {
    color: #6b7280;
    font-size: 14px;
}

.card-content {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.blue::before { background: #3b82f6; }
.stat-card.green::before { background: #10b981; }
.stat-card.purple::before { background: #8b5cf6; }
.stat-card.orange::before { background: #f59e0b; }

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

.stat-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.stat-header i {
    font-size: 20px;
    opacity: 0.7;
}

.stat-card.blue .stat-header i { color: #3b82f6; }
.stat-card.green .stat-header i { color: #10b981; }
.stat-card.purple .stat-header i { color: #8b5cf6; }
.stat-card.orange .stat-header i { color: #f59e0b; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Progress Items */
.progress-item {
    margin-bottom: 20px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-header span:first-child {
    font-weight: 500;
    color: #374151;
}

.progress-header span:last-child {
    font-size: 14px;
    color: #6b7280;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.blue { background: #3b82f6; }
.progress-fill.green { background: #10b981; }
.progress-fill.purple { background: #8b5cf6; }
.progress-fill.orange { background: #f59e0b; }

/* Finding Items */
.finding-item {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.finding-item:last-child {
    margin-bottom: 0;
}

.finding-item.blue {
    background: #eff6ff;
    border-color: #3b82f6;
}

.finding-item.green {
    background: #ecfdf5;
    border-color: #10b981;
}

.finding-item.purple {
    background: #f3e8ff;
    border-color: #8b5cf6;
}

.finding-item.orange {
    background: #fffbeb;
    border-color: #f59e0b;
}

.finding-item h4 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.finding-item p {
    color: #6b7280;
    font-size: 14px;
}

/* Map Container */
#map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* Chart Containers */
#routes-chart,
#metro-chart,
#vehicle-pie-chart,
#hourly-chart {
    height: 400px;
    width: 100%;
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.summary-stat {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
}

.summary-stat.blue { background: #eff6ff; }
.summary-stat.green { background: #ecfdf5; }
.summary-stat.purple { background: #f3e8ff; }
.summary-stat.orange { background: #fffbeb; }

.summary-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.summary-stat.blue .summary-value { color: #3b82f6; }
.summary-stat.green .summary-value { color: #10b981; }
.summary-stat.purple .summary-value { color: #8b5cf6; }
.summary-stat.orange .summary-value { color: #f59e0b; }

.summary-label {
    font-size: 14px;
    color: #6b7280;
}

/* Methodology and Recommendation Items */
.methodology-item,
.recommendation-item {
    margin-bottom: 24px;
}

.methodology-item:last-child,
.recommendation-item:last-child {
    margin-bottom: 0;
}

.methodology-item h4,
.recommendation-item h4 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.methodology-item p,
.recommendation-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.map-legend h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-button {
        justify-content: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .header-text h1 {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* Chart Styles */
.chart-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
}

.axis text {
    font-size: 12px;
    fill: #6b7280;
}

.axis path,
.axis line {
    fill: none;
    stroke: #e5e7eb;
    shape-rendering: crispEdges;
}

.bar {
    transition: opacity 0.2s ease;
}

.bar:hover {
    opacity: 0.8;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6b7280;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

