* { box-sizing: border-box; }

body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/* ── scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ── year dropdown ───────────────────────────────────────── */
.year-dd .Select-control {
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* ── filter pill buttons ─────────────────────────────────── */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: background 0.12s, border-color 0.12s;
    line-height: 1;
}
.pill:hover { border-color: #aaa; }
.pill.active { background: #eef0ee; border-color: #aaa; }
.pill-green .dot { color: #4caf50; }
.pill-amber .dot { color: #f0a500; }
.pill-red   .dot { color: #e53935; }

/* ── municipality table ──────────────────────────────────── */
.muni-table { font-size: 13px; }
.muni-header {
    display: flex;
    padding: 8px 12px;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 600;
    font-size: 12px;
    color: #555;
}
.muni-row {
    display: flex;
    padding: 7px 12px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.muni-row:hover { background: #fafafa; }
.muni-name  { flex: 0 0 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muni-level { width: 72px; text-align: left; margin-right: 0; }
.muni-num   { width: 78px; text-align: right; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muni-num-wide { width: 100px; text-align: right; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── sort header buttons ─────────────────────────────────── */
.sort-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    text-align: inherit;
    white-space: normal;
    width: 100%;
    display: block;
    line-height: 1;
}
.sort-btn:hover { color: #111; }
.sort-btn.sort-active { color: #222; }

/* ── distribution chart ──────────────────────────────────── */
.js-plotly-plot .plotly { background: white !important; }

/* ── map click popup ─────────────────────────────────────── */
.map-popup {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.22);
    z-index: 999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
    border: 1px solid #ddd;
}
