/* styles.css */
body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    height: 100%;
    overflow: hidden;
    background: #000;
}
#map-container, #map {
    width: 100%;
    height: 100vh;
}
#hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 58, 108, 0.8);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    font-size: 16px;
}
#hamburger:hover {
    background: rgba(0, 58, 108, 1);
}
#left-menu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.menu-visible {
    left: 0 !important;
}
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem 1.5rem 2rem;
    background: #003A6C;
    color: white;
    gap: 1.2rem;
}
.menu-header h3 {
    margin: 0;
    flex: 1;
    padding-left: 1rem;
    font-size: 1.15em;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    line-height: 1;
    transition: opacity 0.2s;
}
.close-menu:hover {
    opacity: 0.8;
}
.menu-search {
    padding: 1rem;
    display: flex;
    gap: 5px;
}
.menu-search input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.menu-search button {
    padding: 8px;
    background: #003A6C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.menu-section {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}
.menu-section h4 {
    margin: 0 0 0.75rem;
    color: #003A6C;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu-section h4 i {
    margin-right: 8px;
}
.menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}
.menu-section li {
    padding: 0.75rem 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.menu-section li:hover {
    background: #f8f9fa;
}
.number {
    font-weight: bold;
    width: 30px;
    margin-right: 0.5rem;
}
.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 0.75rem;
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.legend {
    font-size: 0.9em;
}
.legend-item {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
}
.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
}
.legend-color.green {
    background: #10b981;
}
.legend-color.yellow {
    background: #f59e0b;
}
.legend-color.red {
    background: #ef4444;
}
.legend-conditions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}
.legend-conditions h5 {
    margin: 0 0 0.5rem;
    font-size: 0.85em;
    color: #6b7280;
    font-weight: 600;
}
.legend-item-small {
    font-size: 0.8em;
    color: #4b5563;
    margin: 0.35rem 0;
    padding-left: 0.5rem;
}
.basemap-controls {
    display: flex;
    gap: 5px;
}
.basemap-controls button {
    flex: 1;
    padding: 8px;
    background: #003A6C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}
.basemap-controls button:hover {
    background: #004a8a;
}
#flood-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}
.sidebar-visible {
    right: 0 !important;
}
#flood-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}
.sidebar-visible::before {
    opacity: 1;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #003A6C;
    color: white;
}
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}
#sidebar-content {
    padding: 1rem;
    color: #333;
}
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: bold;
    color: white;
}
.status-green {
    background: #10b981;
}
.status-yellow {
    background: #f59e0b;
}
.status-red {
    background: #ef4444;
}
.sensor-section {
    margin: 1rem 0;
    padding: 0.5rem;
    border: 1px solid #eee;
    border-radius: 4px;
}
.sensor-section h4 {
    margin: 0 0 0.5rem;
    font-size: 1em;
    color: #003A6C;
}
.info-row {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0;
    font-size: 0.9em;
}
#toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #003A6C;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    z-index: 3000;
    animation: fadeInOut 3s forwards;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}
@media (max-width: 768px) {
    #left-menu, #flood-sidebar {
        width: 100%;
    }
    #left-menu {
        left: -100%;
    }
    .menu-visible {
        left: 0 !important;
    }
}
#barangay-list li.list-highlight {
    background-color: #e0f2fe !important;
    border-left: 4px solid #003A6C;
    font-weight: bold;
}
.edit-btn {
    width: 100%;
    padding: 10px;
    margin-top: 1rem;
    background: #003A6C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.edit-btn:hover {
    background: #004a8a;
}
.edit-input {
    width: 80px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.info-section {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid #003A6C;
}
.info-label {
    font-weight: bold;
    color: #003A6C;
    margin-bottom: 0.35rem;
    font-size: 0.95em;
}
.info-value {
    font-size: 1.05em;
    color: #1e293b;
}
.info-value.highlight {
    font-weight: bold;
    color: #0369a1;
}
.info-value.action-text {
    font-weight: bold;
    color: #000000;
    line-height: 1.4;
}
.status-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.filter-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 8px;
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
    background: #003A6C;
    color: white;
    border-color: #003A6C;
}
.filter-btn[data-status="green"]:hover {
    background: #10b981;
}
.filter-btn[data-status="yellow"]:hover {
    background: #f59e0b;
}
.filter-btn[data-status="red"]:hover {
    background: #ef4444;
}
.status-counter {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95em;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    color: #4b5563;
}
.counter-item {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.counter-item i {
    font-size: 10px;
}
.counter-total {
    margin-left: auto;
    color: #1e293b;
    font-weight: 500;
}
.barangay-marker.highlight svg {
    filter: drop-shadow(0 0 0 black);
}
.barangay-marker.highlight {
    z-index: 10 !important;
}
.hidden {
    display: none;
}