* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
#map-container {
    flex: 1;
    position: relative;
    width: 100%;
}
#map {
    width: 100%;
    height: 100%;
    min-height: 300px; /* add this */
}

/* Control panel overlay */
.control-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(30, 30, 35, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 14px 20px;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    pointer-events: auto;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .control-panel {
        bottom: 20px;
        left: 20px;
        right: auto;
        width: 340px;
        border-radius: 20px;
    }
}

.panel-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.panel-header .sub {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 12px;
}

.layer-tools {
    margin: 8px 0 12px;
}

.layer-tools label {
    font-size: 0.8rem;
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
}

.filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

#concernFilter {
    flex: 2;
    background: #2c2c32;
    color: white;
    border: 1px solid #555;
    padding: 8px 10px;
    border-radius: 30px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.btn-small {
    background: #3b82f6;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    color: white;
    font-weight: 500;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-small:hover {
    background: #2563eb;
}

.btn-small.reset {
    background: #4b5563;
}

.btn-small.reset:hover {
    background: #374151;
}

.legend-note {
    margin-top: 10px;
    font-size: 0.7rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.75rem;
    font-family: monospace;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.stats span {
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 40px;
}

.loading-data {
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Custom leaflet layer control styling (optional) */
.leaflet-control-layers {
    background: rgba(0,0,0,0.75);
    border-radius: 12px;
    color: white;
    padding: 6px;
    backdrop-filter: blur(4px);
}

.leaflet-control-layers-expanded {
    background: rgba(20,20,25,0.9);
}

.leaflet-control-layers-toggle {
    background-color: #2c3e50;
}