#map {
    width: 100%;
    height: 500px;
    background: #e9edf3;
    border: 1px solid #cfd6df;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info {
    padding: 6px 8px;
    font:
        14px/16px Arial,
        Helvetica,
        sans-serif;
    background: white;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.info h4 {
    margin: 0 0 5px;
    color: #777;
}

.legend {
    text-align: left;
    line-height: 18px;
    color: #555;
}

.legend {
    background: white;
    padding: 10px;
    line-height: 18px;
    color: #555;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    font-family: Arial, Helvetica, sans-serif;
    opacity: 0.7;
}
.legend img {
    display: block;
    margin: 0 auto;
}

/* General style for all dashboard cards (Table & Chart) */
.chart-container {
    background: #d5f2e2;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 20px;
    position: relative; /* Essential for Chart.js placement */
}

/* Specific: Table Panel (Scrollable) */
#tablePanel {
    height: 500px; /* Fixed height matching the chart */
    border-radius: 12px; /* Force rounding */
    overflow-y: auto; /* Allow scrolling */
    padding-right: 5px;
}

/* Custom Rounded Scrollbar */
#tablePanel::-webkit-scrollbar {
    width: 8px; /* Make scrollbar thinner */
}

#tablePanel::-webkit-scrollbar-track {
    background: transparent; /* Track is see-through so green bg shows */
    margin: 10px 0; /* Add margin so scrollbar doesn't touch the very top/bottom edges */
}

#tablePanel::-webkit-scrollbar-thumb {
    background-color: rgba(45, 86, 107, 0.3); /* Semi-transparent dark blue to match text */
    border-radius: 20px; /* Round the scrollbar handle */
    border: 2px solid transparent; /* Spacing around the handle */
    background-clip: content-box; /* clean rendering */
}

/* Hover effect for scrollbar */
#tablePanel::-webkit-scrollbar-thumb:hover {
    background-color: rgba(45, 86, 107, 0.6); /* Darker on hover */
}

/* Specific: Chart Panel (Fixed) */
#chartPanel {
    height: 500px; /* Fixed height to prevent squishing */
    display: flex;
    align-items: center; /* Vertically center the chart */
    justify-content: center;
}

/* Force the canvas to fill the #chartPanel */
#linebarChart {
    width: 100%;
    height: 100%;
    display: block;
}

#groupTable {
    border-collapse: separate; /* Required for rounding */
    border-spacing: 0; /* Removes gaps between cells */
    border: 1px solid #ccebd6; /* Outer border matching theme */
    border-radius: 12px; /* The rounding value */
    overflow: hidden; /* Clips the corners */
    width: 100%;
}

/* Sticky Header: Keeps the month names visible while scrolling */
#groupTable thead th {
    position: sticky;
    top: 0;
    background-color: #bcebcffa; /* Slightly darker green for contrast */
    color: #2d566b;
    font-size: 14px;
    font-weight: 700;
    padding: 12px;
    z-index: 2; /* Ensures header stays on top of content */
    border-bottom: 2px solid #a8dcb9;
}

#groupTable tbody td {
    background-color: transparent;
    color: #2d566b;
    font-size: 13px;
    padding: 10px;
    border-bottom: 1px solid #ccebd6;
}

/* Hover effect for table rows */
#groupTable tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    #tablePanel,
    #chartPanel {
        height: auto;
        min-height: 400px;
    }
}
