/* Reset/Base */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Prevent body scroll */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Container */
.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: block;
    padding: 0;
    margin: 0;
    max-width: none;
}

/* Map */
.map-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
}

/* Sidebar - Floating Panel */
.sidebar {
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 24px;
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 18px;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close-sidebar-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #333;
}

/* Form Elements */
.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input[type="text"],
.filter-group input[type="date"],
.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    transition: all 0.2s;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2E7D32;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-bio {
    background: #2E7D32;
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.btn-bio:hover {
    background: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.3);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #eeeeee;
    color: #333;
    border-color: #d0d0d0;
}
.open-sidebar-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 900;
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

/* ... */

/* Stats Bar */
.stats-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 900;
    display: flex;
    gap: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2E7D32;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsiveness */
/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 250px;
        height: 100%;
        border-radius: 0;
        padding: 20px;
        transform: translateX(-100%); /* Hidden by default on mobile */
        opacity: 0;
        pointer-events: none;
    }

    .sidebar.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: all;
    }

    .stats-bar {
        top: auto;
        bottom: 40px; /* Move up slightly to avoid potential bottom nav bars */
        right: 10px;
        left: 10px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .open-sidebar-btn {
        top: 15px;
        left: 15px;
    }
}

/* Info Window */
.info-window {
    padding: 5px;
    max-width: 300px;
}
.info-window h3 {
    font-size: 16px;
    margin: 0 0 10px 0;
    color: #333;
    border-bottom: 2px solid #2E7D32;
    padding-bottom: 5px;
}