:root {
    --bg-color: #f0f2f5;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-color: #334155;
    --text-light: #64748b;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --border-color: #e2e8f0;
    --font-family: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.container { display: flex; width: 100%; }

.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--border-color); }
.sidebar-header h2, .sidebar-header p { line-height: 1.4; }
.filters { padding: 1.5rem; flex-grow: 1; overflow-y: auto; }
.filters h3 { font-size: 1rem; margin-bottom: 1.5rem; }
.filter-group { margin-bottom: 1.25rem; }
.filter-group label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 600; }
.filter-group select { width: 100%; padding: 0.6rem; border: 1px solid var(--border-color); border-radius: 6px; }

.dashboard {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem;
    align-content: start;
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.card h3 { font-size: 1.1rem; margin-bottom: 1rem; }

.kpi-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.kpi-card h3 {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.chart-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container svg { width: 100%; height: 100%; }

.kpi-card,
#line-chart-container,
#map-container {
    grid-column: 1 / -1; 
}

#map-container {
    height: 700px;
}

.tooltip {
    position: absolute;
    background-color: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.legend { font-size: 12px; cursor: pointer; }
.legend-item { display: inline-block; margin-right: 15px; }
.legend-rect { width: 12px; height: 12px; margin-right: 5px; display: inline-block; vertical-align: middle; }
.legend-text { vertical-align: middle; }
.heatmap-axis text { font-size: 11px; }

.district {
    fill: #e9ecef; /* Cor cinza padrão para os distritos */
    stroke: #ffffff;
    stroke-width: 1.5px;
}
.station-point {
    stroke: white;
    stroke-width: 1.5px;
    opacity: 0.8;
    cursor: pointer;
    transition: r 0.2s, opacity 0.2s;
}

.station-point:hover { opacity: 1; stroke: #000; }

.district-label {
    font-size: 10px;
    font-weight: 600;
    fill: #475569;
    text-anchor: middle;
    pointer-events: none;
    text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}

@media (max-width: 1300px) {
    .dashboard { grid-template-columns: repeat(2, 1fr); }
    #heatmap-container { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; }
    body { flex-direction: column; height: auto; }
    .sidebar { width: 100%; height: auto; border-bottom: 1px solid var(--border-color); }
    .dashboard { padding: 1rem; gap: 1rem; }
}
