
        #map {
            height: 100%;
            flex-grow: 1;
        }

        .map-sidebar {
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 999;
            background: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0,0,0,0.2);
            width: 250px;
        }

        .map-sidebar h3 {
            margin-top: 0;
        }

        .map-sidebar input,
        .map-sidebar select {
            width: 100%;
            margin-bottom: 10px;
            padding: 6px;
        }

        .popup-title {
            font-weight: bold;
            font-size: 16px;
        }

        .leaflet-container {
            z-index: 1;
        }
        
        .main-layout {
            display: flex;
            height: calc(100vh - 60px); /* Adjust based on navbar height */
        }

        .map-sidebar {
            width: 260px;
            background-color: #f4f4f4;
            padding: 20px;
            overflow-y: auto;
        }

.map-sidebar-filters {
    width: 250px;
    background: #f4f4f4;
    padding: 15px;
    border-right: 1px solid #ddd;
}

.map-sidebar-filters form {
    display: flex;
    justify-content: space-around;
    flex-direction: column;
}

.map-sidebar-filters label {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    box-sizing: border-box;
    flex-direction: column;
}

.map-sidebar-filters select {
    width: 100%;
    margin-left: 5px;
}

.main-wrapper {
    margin-left: 250px; /* same as sidebar width */
    transition: margin-left 0.3s ease;
}

.map-sidebar-filters.collapsed ~ .main-wrapper {
    margin-left: 0;
}

/* Responsive nav for small screens */
        
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        height: auto;
    }

    .map-sidebar-filters {
        width: 90%;
        background: #f4f4f4;
        padding: 15px;
        margin: 15px auto 0;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    #map {
        width: 100%;
        height: 80vh; /* Explicit height to make map visible */
        margin: 0 auto 20px;
    }
}
