    /* Reset and Base Styles */


/* Map Container */
#map { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 1; }

/* Leaflet Control Positioning */
.leaflet-top { top: 4rem !important; }
.leaflet-control-zoom { margin-top: 10px !important; margin-left: 10px !important; }
.leaflet-control-layers { margin-top: 10px !important; }

/* Advanced Location Marker */
.advanced-location-marker-container { background: transparent !important; border: none !important; }

.advanced-location-marker { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }

.location-pulse { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: rgba(59, 130, 246, 0.4); animation: locationPulseEffect 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes locationPulseEffect {
  0% { transform: scale(0.8); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

.location-dot { position: relative; z-index: 2; width: 24px; height: 24px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); transition: transform 0.3s ease; }

.advanced-location-marker:hover .location-dot { transform: scale(1.15); }

/* Advanced Location Popup */
.advanced-location-popup { font-family: 'Inter', sans-serif; min-width: 200px; }

.location-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

.location-header h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); }

.accuracy-badge-inline { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.location-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.stat-item { display: flex; flex-direction: column; padding: 8px; background: var(--surface-dark); border-radius: 6px; border: 1px solid var(--border-light); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.location-time { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Map Control Buttons */
.map-type-control { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; overflow: hidden; margin-top: 10px !important; }
.map-type-btn { background: none; border: none; padding: 0.75rem; cursor: pointer; transition: var(--transition); color: var(--text-secondary); border-right: 1px solid var(--border); }
.map-type-btn:last-child { border-right: none; }
.map-type-btn:hover { background: var(--surface-darker); }
.map-type-btn.active { background: var(--primary); color: white; }

/* Location Refresh Control */
.location-refresh-control { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-top: 10px !important; }
.location-refresh-btn { background: var(--primary); color: white; border: none; padding: 0.75rem; cursor: pointer; border-radius: var(--radius-lg); transition: var(--transition); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.location-refresh-btn:hover { background: var(--primary-dark); transform: scale(1.05); }
.location-refresh-btn:active { transform: scale(0.95); }

/* Map Action Buttons */
.map-button { position: fixed; background: var(--primary); color: white; border: none; padding: 1rem 1.5rem; border-radius: var(--radius-xl); font-weight: 600; font-size: 0.875rem; cursor: pointer; z-index: 30; box-shadow: var(--shadow-lg); transition: var(--transition); display: flex; align-items: center; gap: 0.5rem; }
.map-button:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-xl); }
.map-button:active { transform: translateY(0); }
#recommendBtn { bottom: 2rem; right: 2rem; background: var(--success); }
#recommendBtn:hover { background: #047857; }
#loginBtn { bottom: 2rem; right: 2rem; background: var(--warning); }
#loginBtn:hover { background: #b45309; }

/* Emergency Alert */
.emergency-alert { position: fixed; top: 4rem; left: 0; right: 0; z-index: 40; background: var(--danger); color: white; padding: 1rem 1.5rem; text-align: center; font-weight: 600; font-size: 0.875rem; border-bottom: 1px solid rgba(0, 0, 0, 0.1); animation: emergencyPulse 2s infinite; display: none; }

@keyframes emergencyPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.9; } }

/* Disaster Selection Panel */
.disaster-selection { position: fixed; top: 5rem; left: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--shadow-xl); z-index: 40; width: 24rem; max-height: 75vh; overflow-y: auto; display: none; }
.disaster-selection.show { display: block; animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes slideInLeft { from { transform: translateX(-1rem); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.disaster-selection h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); line-height: 1.2; }
.disaster-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Disaster Type List */
.disaster-types-list { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.disaster-checkbox-item { display: flex; align-items: center; padding: 1rem; border-radius: var(--radius-lg); cursor: pointer; transition: var(--transition); border: 1px solid var(--border-light); background: var(--surface-dark); }
.disaster-checkbox-item:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--accent); }
.disaster-checkbox-item.has-checked { background: rgba(59, 130, 246, 0.15); border-color: var(--primary); }
.disaster-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { width: 1.25rem; height: 1.25rem; background: var(--surface); border: 2px solid var(--border); border-radius: 0.375rem; margin-right: 0.75rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.disaster-checkbox:checked ~ .checkmark { background: var(--primary); border-color: var(--primary); }
.disaster-checkbox:checked ~ .checkmark::after { content: "✓"; color: white; font-size: 0.75rem; font-weight: 600; }
.disaster-label { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); line-height: 1.3; flex: 1; }

/* Selected Disasters */
.selected-disasters { margin-bottom: 1.25rem; padding: 1rem; background: rgba(59, 130, 246, 0.1); border-radius: var(--radius-lg); border: 1px solid rgba(59, 130, 246, 0.2); }
.selected-title { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.selected-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.selected-tag { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: var(--primary); color: white; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.tag-remove { background: none; border: none; color: rgba(255, 255, 255, 0.8); font-size: 1rem; cursor: pointer; padding: 0; width: 1rem; height: 1rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition); }
.tag-remove:hover { background: rgba(255, 255, 255, 0.2); color: white; }

/* Action Buttons */
.disaster-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.disaster-btn { padding: 0.75rem 1rem; border: none; border-radius: var(--radius-lg); font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.375rem; }
.disaster-btn.primary { background: var(--primary); color: white; grid-column: 1 / -1; }
.disaster-btn.primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.disaster-btn.primary:disabled { background: var(--secondary); cursor: not-allowed; transform: none; }
.disaster-btn.secondary { background: var(--surface-light); color: var(--text-primary); border: 1px solid var(--border); }
.disaster-btn.secondary:hover { background: var(--surface-darker); }
.disaster-btn.tertiary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.disaster-btn.tertiary:hover { background: var(--surface-light); }
.no-disasters { text-align: center; padding: 2rem 1rem; color: var(--text-muted); font-style: italic; font-size: 0.875rem; }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 60; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); }
.modal-content { position: relative; background: var(--surface); margin: 5% auto; padding: 0; width: 90%; max-width: 32rem; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); border: 1px solid var(--border); max-height: 110vh; display: flex; flex-direction: column; animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes modalSlideIn { from { opacity: 0; transform: scale(0.95) translateY(-2rem); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 2rem 2rem 1rem; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.close-modal { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 0.5rem; border-radius: var(--radius); transition: var(--transition); }
.close-modal:hover { background: var(--surface-light); color: var(--text-primary); }
.modal-body { 
  padding: 2rem; 
  padding-right: calc(2rem + 8px);
  overflow-y: auto; 
  flex: 1;
  background: transparent;
}

/* Form Toggle */
.form-toggle { 
  display: flex; 
  background: rgba(15, 23, 42, 0.5); 
  border-radius: var(--radius-lg); 
  margin-bottom: 1.75rem; 
  padding: 0.375rem; 
  gap: 0.375rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.form-toggle button { 
  flex: 1; 
  background: transparent; 
  border: none; 
  color: rgba(255, 255, 255, 0.7); 
  padding: 0.875rem 1.25rem; 
  border-radius: calc(var(--radius-lg) - 2px); 
  font-weight: 600; 
  font-size: 0.9375rem; 
  cursor: pointer; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.form-toggle button:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}
.form-toggle button.active { 
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
  color: white; 
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* Form Styles */
.form-container { 
  display: none; 
  animation: fadeInUp 0.3s ease-out;
}
.form-container.active { 
  display: flex; 
  flex-direction: column; 
}
.form-row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1rem; 
}
.form-group { 
  margin-bottom: 1.5rem; 
}
.form-group label { 
  display: block; 
  margin-bottom: 0.625rem; 
  font-weight: 600; 
  color: rgba(255, 255, 255, 0.95); 
  font-size: 0.875rem; 
  letter-spacing: 0.01em;
}
.form-group input, .form-group select { 
  width: 100%; 
  padding: 0.875rem 1.125rem; 
  background: rgba(15, 23, 42, 0.6); 
  border: 1.5px solid rgba(59, 130, 246, 0.3); 
  border-radius: var(--radius-lg); 
  color: rgba(255, 255, 255, 0.95); 
  font-size: 0.9375rem; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  appearance: menulist;
}
.form-group select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.form-group input:hover, .form-group select:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(15, 23, 42, 0.7);
}
.form-group input:focus, .form-group select:focus { 
  outline: none; 
  border-color: #3b82f6; 
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.2); 
  transform: translateY(-1px);
}
.form-group input::placeholder { 
  color: rgba(255, 255, 255, 0.4); 
}
.form-group select option { 
  background: #1e293b; 
  color: rgba(255, 255, 255, 0.95); 
  padding: 0.75rem;
}
/* Ensure select dropdowns are always clickable and functional */
#modal_municipality_select,
#modal_city_select,
#modal_barangay {
  pointer-events: auto !important;
  cursor: pointer !important;
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  user-select: auto !important;
}
#modal_municipality_select:disabled,
#modal_city_select:disabled,
#modal_barangay:disabled {
  pointer-events: none !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}
.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.password-hint { 
  color: rgba(255, 255, 255, 0.5); 
  font-size: 0.8125rem; 
  display: block; 
  margin-top: 0.5rem; 
}
.btn-submit { 
  width: 100%; 
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
  color: white; 
  border: none; 
  padding: 1rem 1.5rem; 
  border-radius: var(--radius-lg); 
  font-weight: 700; 
  font-size: 0.9375rem; 
  cursor: pointer; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  margin-top: 0.75rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  letter-spacing: 0.02em;
}
.btn-submit:hover { 
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.btn-submit:active { 
  transform: translateY(0); 
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Messages */
.message { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-lg); font-weight: 500; font-size: 0.875rem; }
.error-message { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.success-message { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }

/* Popup Styles */
.leaflet-popup-content-wrapper { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-xl) !important; }
.leaflet-popup-content { margin: 0 !important; padding: 1rem !important; color: var(--text-primary) !important; font-family: 'Inter', sans-serif !important; min-width: 18rem !important; }
.leaflet-popup-tip { background: var(--surface) !important; border: 1px solid var(--border) !important; }

.center-popup-container { font-family: Inter, sans-serif; }
.center-name { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.center-category-badge { margin: 8px 0; padding: 6px 12px; border-radius: 12px; font-size: 12px; text-align: center; font-weight: bold; }
.center-details { margin: 4px 0; font-size: 14px; color: var(--text-secondary); }

/* Status Badges */
.status-badge { padding: 0.375rem 0.75rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem; margin-bottom: 0.625rem; text-transform: uppercase; letter-spacing: 0.025em; }

/* Popup Actions */
.popup-actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Route Buttons */
.route-button { padding: 8px 12px; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 4px; }
.route-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.route-button:active { transform: translateY(0); }
.route-button.show-route { background: #3b82f6; color: white; }
.route-button.show-route:hover { background: #2563eb; }
.route-button.stop-route { background: #ef4444; color: white; }
.route-button.stop-route:hover { background: #b91c1c; }
.route-button:disabled { background: #9ca3af; color: white; cursor: not-allowed; transform: none !important; }
.route-button.view-needs { background: #8b5cf6; color: white; }
.route-button.view-needs:hover { background: #7c3aed; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4); }
.route-button.view-needs:active { transform: translateY(0); }



/* Enhanced Marker Styles */
.custom-div-icon { background: transparent !important; border: none !important; }
.evacuation-marker { cursor: pointer; transition: all 0.3s ease; }
.evacuation-marker:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important; }

/* Occupancy Details */
.occupancy-details { margin-top: 12px; padding: 12px; background: #3b3a3aff; border-radius: 8px; border: 1px solid #000000ff; }
.occupancy-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.capacity-bar { width: 100%; height: 20px; background: #dbdde0ff; border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 8px; }
.capacity-fill { height: 100%; transition: all 0.3s ease; }
.capacity-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 600; color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.occupancy-row { display: flex; justify-content: space-between; margin: 4px 0; font-size: 13px; }
.occupancy-label { color: var(--text-secondary); }
.occupancy-value { font-weight: 600; color: var(--text-primary); }

/* Barangay Popup Styles */
.barangay-popup { font-family: Inter, sans-serif; }
.barangay-popup-title { margin: 0 0 8px 0; color: #1e3a8a; font-size: 14px; font-weight: 600; }
.barangay-popup-item { margin: 4px 0; font-size: 13px; color: var(--text-primary); }
.barangay-popup-area { margin: 4px 0; font-size: 11px; color: #6b7280; }

/* Hazard Popup Styles */
.hazard-popup { font-family: Inter, sans-serif; }
.hazard-popup-title { margin: 0; font-size: 14px; font-weight: 600; }
.hazard-popup-title.fire { color: #dc2626; }
.hazard-popup-title.flood { color: #0891b2; }
.hazard-popup-title.landslide { color: #92400e; }
.hazard-popup-title.earthquake { color: #7c2d12; }
.hazard-popup-text { margin: 4px 0; font-size: 13px; color: var(--text-secondary); }

/* Barangay Label */
.barangay-label { background: transparent !important; border: none !important; }
.barangay-label-text { font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; color: #1e3a8a; text-shadow: 1px 1px 2px white, -1px -1px 2px white, 1px -1px 2px white, -1px 1px 2px white; white-space: nowrap; pointer-events: none; }

/* Needs Modal Styles */
.needs-modal-content { max-width: 40rem; max-height: 85vh; margin-top:30px}
.needs-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; padding: 1.5rem; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%); border-radius: var(--radius-xl); border: 1px solid var(--border); }
.summary-stat { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.summary-stat i { font-size: 2rem; color: var(--primary); }
.stat-value { font-size: 1.875rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Needs Categories */
.needs-categories { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }
.needs-category { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.5rem; }
.category-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.category-title::before { content: ''; width: 4px; height: 1.125rem; background: var(--primary); border-radius: 2px; }
.needs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.need-item { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; background: var(--surface-dark); border: 1px solid var(--border-light); border-radius: var(--radius-lg); transition: var(--transition); animation: fadeInUp 0.3s ease-out; animation-fill-mode: both; }
.need-item:hover { background: var(--surface-light); border-color: var(--primary); transform: translateY(-2px); }
.need-item:nth-child(1) { animation-delay: 0.05s; }
.need-item:nth-child(2) { animation-delay: 0.1s; }
.need-item:nth-child(3) { animation-delay: 0.15s; }
.need-item:nth-child(4) { animation-delay: 0.2s; }
.need-item:nth-child(5) { animation-delay: 0.25s; }
.need-item:nth-child(6) { animation-delay: 0.3s; }
.need-icon { width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); border-radius: var(--radius); color: white; font-size: 1.125rem; flex-shrink: 0; }
.need-info { flex: 1; min-width: 0; }
.need-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.need-quantity { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }

/* Needs Breakdown */
.needs-breakdown { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.5rem; }
.breakdown-list { display: flex; flex-direction: column; gap: 1rem; max-height: 400px; overflow-y: auto; padding-right: 0.5rem; }
.breakdown-list::-webkit-scrollbar { width: 6px; }
.breakdown-list::-webkit-scrollbar-track { background: var(--surface-dark); border-radius: 3px; }
.breakdown-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.breakdown-list::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.breakdown-item { background: var(--surface-dark); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1rem; transition: var(--transition); animation: fadeInUp 0.3s ease-out; animation-fill-mode: both; }
.breakdown-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.breakdown-item:nth-child(1) { animation-delay: 0.05s; }
.breakdown-item:nth-child(2) { animation-delay: 0.1s; }
.breakdown-item:nth-child(3) { animation-delay: 0.15s; }
.breakdown-item:nth-child(4) { animation-delay: 0.2s; }
.breakdown-item:nth-child(5) { animation-delay: 0.25s; }
.breakdown-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.breakdown-title { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.breakdown-title i { color: var(--primary); }
.breakdown-date { font-size: 0.75rem; color: var(--text-muted); }
.breakdown-needs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breakdown-tag { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 9999px; color: var(--text-primary); font-size: 0.75rem; font-weight: 500; }
.breakdown-tag i { color: var(--primary); font-size: 0.625rem; }
.other-needs-section { margin-top: 0.75rem; padding: 0.75rem; background: rgba(139, 92, 246, 0.1); border-radius: var(--radius); font-size: 0.8125rem; color: var(--text-secondary); }
.other-needs-section strong { color: var(--text-primary); }
.no-needs-message { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; }
.no-needs-message i { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; }
.no-needs-message p { color: var(--text-secondary); font-size: 1rem; max-width: 24rem; }

/* Real-time Badge */
.real-time-badge { background: #10b981; color: white; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; margin-left: 8px; animation: pulse 2s infinite; }

/* Loading States */
.loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.8); display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-xl); z-index: 10; }
.loading-overlay p { margin-top: 10px; color: #6b7280; font-size: 14px; }
.loading-spinner { width: 2.5rem; height: 2.5rem; border: 3px solid rgba(255, 255, 255, 0.2); border-top: 3px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }

/* Notification Styles */
.notification { position: fixed; top: 80px; right: 20px; z-index: 3000; padding: 16px 20px; border-radius: 12px; backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); font-weight: 500; max-width: 300px; animation: slideInRight 0.3s ease; font-family: Inter, sans-serif; }
.notification-info { background: rgba(59, 130, 246, 0.95); color: white; }
.notification-success { background: rgba(16, 185, 129, 0.95); color: white; }
.notification-warning { background: rgba(245, 158, 11, 0.95); color: white; }
.notification-error { background: rgba(239, 68, 68, 0.95); color: white; }
.notification-fadeout { animation: slideOutRight 0.3s ease; }



/* Focus States for Accessibility */
.form-group input:focus-visible, .form-group select:focus-visible, .btn-submit:focus-visible, .disaster-btn:focus-visible, .map-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Animation Keyframes */
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
@keyframes fadeInUp { 
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  } 
  to { 
    opacity: 1; 
    transform: translateY(0); 
  } 
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Scrollbar Styling */
.disaster-selection::-webkit-scrollbar { width: 4px; }
.disaster-selection::-webkit-scrollbar-track { background: transparent; }
.disaster-selection::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.disaster-selection::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; height: 3.5rem; }
  .nav-brand { font-size: 1.25rem; }
  .nav-brand-logo { height: 1.75rem; }
  .nav-links { gap: 0.5rem; }
  .nav-links a { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
  .nav-links span { display: none; }
  .nav-links a { min-width: 2.5rem; justify-content: center; }
  .leaflet-top { top: 3.5rem !important; }
  .disaster-selection { left: 1rem; right: 1rem; width: auto; top: 4.5rem; padding: 1.5rem; max-height: 70vh; }
  .disaster-checkbox-item { padding: 0.875rem 1rem; }
  .disaster-label { font-size: 0.9375rem; }
  .disaster-actions { grid-template-columns: 1fr; gap: 0.625rem; }
  .disaster-btn { padding: 0.875rem 1rem; font-size: 0.9375rem; }
  .disaster-btn.primary { grid-column: auto; }
  .map-button { bottom: 1.25rem; right: 1.25rem; padding: 0.875rem 1.25rem; font-size: 0.8125rem; }
  .modal-content { margin: 10% auto; width: 95%; border-radius: var(--radius-lg); max-height: 90vh; }
  .modal-header { padding: 1.5rem 1.5rem 1rem; }
  .modal-header h2 { font-size: 1.25rem; }
  .modal-body { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-group { margin-bottom: 1rem; }
  .form-group input, .form-group select { padding: 0.875rem 1rem; font-size: 1rem; }
  .route-button { min-width: auto; font-size: 11px; padding: 6px 10px; }
  .leaflet-popup-content { min-width: 14rem !important; padding: 0.875rem !important; }
  .center-name { font-size: 14px; }
  .center-details { font-size: 12px; }
  .needs-modal-content { max-width: 95%; margin: 5% auto; max-height: 85vh; }
  .needs-summary { grid-template-columns: 1fr; padding: 1rem; margin-bottom: 1.5rem; }
  .summary-stat { padding: 0.75rem; }
  .stat-value { font-size: 1.5rem; }
  .needs-grid { grid-template-columns: 1fr; }
  .needs-category { padding: 1rem; }
  .category-title { font-size: 1rem; }
  .need-item { padding: 0.75rem; }
  .need-icon { width: 2rem; height: 2rem; font-size: 1rem; }
  .needs-breakdown { padding: 1rem; }
  .breakdown-list { max-height: 300px; }
  .breakdown-item { padding: 0.75rem; }
  .breakdown-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .breakdown-date { align-self: flex-start; }
  .breakdown-tag { font-size: 0.6875rem; padding: 0.25rem 0.625rem; }
  .other-needs-section { padding: 0.625rem; font-size: 0.75rem; }
  .layer-control-panel-resident { top: 140px; right: 5px; min-width: 180px; }
  .layer-control-header { font-size: 11px; padding: 8px 10px; }
  .layer-control-label { font-size: 11px; }
  .layer-control-checkbox { width: 16px; height: 16px; }
  .notification { top: 60px; right: 10px; max-width: 250px; padding: 12px 16px; font-size: 13px; }
  .advanced-location-marker { width: 32px; height: 32px; }
  .location-dot { width: 20px; height: 20px; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 0.75rem; height: 3rem; }
  .nav-brand { font-size: 1.125rem; }
  .nav-links { gap: 0.25rem; }
  .nav-links a { padding: 0.5rem; font-size: 0.75rem; }
  .leaflet-top { top: 3rem !important; }
  .modal { padding: 0.25rem; }
  .modal-content { border-radius: var(--radius-lg); max-height: 96vh; padding-top: 20px; }
  .modal-header { padding: 1rem 1rem 0.75rem; }
  .modal-header h2 { font-size: 1.125rem; }
  .modal-body { padding: 1rem;}
  .disaster-selection { padding: 1rem; max-height: 60vh; top: 3.5rem; }
  .needs-modal-content { max-width: 100%; margin: 2% auto; border-radius: var(--radius-lg);  }
  .needs-summary { padding: 0.75rem; gap: 0.75rem; }
  .summary-stat { padding: 0.625rem; gap: 0.75rem; }
  .summary-stat i { font-size: 1.5rem; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: 0.75rem; }
  .needs-category { padding: 0.75rem; }
  .category-title { font-size: 0.9375rem; margin-bottom: 0.75rem; }
  .need-name { font-size: 0.8125rem; }
  .need-quantity { font-size: 0.6875rem; }
  .needs-breakdown { padding: 0.75rem; }
  .breakdown-list { max-height: 250px; }
  .breakdown-title { font-size: 0.8125rem; }
  .breakdown-date { font-size: 0.6875rem; }
  .route-button { font-size: 10px; padding: 5px 8px; }
  .popup-actions { gap: 4px; }
  .center-popup-container { font-size: 12px; }
  .center-name { font-size: 13px; }
  .center-category-badge { font-size: 10px; padding: 4px 8px; }
  .notification { top: 55px; right: 8px; max-width: 220px; padding: 10px 14px; font-size: 12px; }
  .advanced-location-marker { width: 28px; height: 28px; }
  .location-dot { width: 18px; height: 18px; }
  .location-stats { grid-template-columns: 1fr; gap: 8px; }
  .stat-item { padding: 6px; }
  .stat-value { font-size: 14px; }
}







/* ========== CSS Extracted from index.php ========== */

/* Evacuation Center Categories Legend */
.evac-categories-legend {
  position: fixed;
  top: 70%;
  left: 15px;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.evac-legend-card {
  background: white;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e7eb;
  pointer-events: auto;
  transition: all 0.2s ease;
  min-width: 180px;
}

.evac-legend-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: translateX(2px);
}

.evac-legend-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.evac-legend-barricade::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(251, 191, 36, 0.9) 4px, rgba(251, 191, 36, 0.9) 8px);
  z-index: 0;
}

.evac-legend-barricade i {
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  position: relative;
}

.evac-legend-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.evac-legend-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.evac-legend-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

/* Mobile Responsive for Evac Categories Legend */
@media (max-width: 768px) {
  .evac-categories-legend {
    left: 10px;
    gap: 6px;
  }
  
  .evac-legend-card {
    padding: 8px 10px;
    gap: 8px;
    min-width: 160px;
  }
  
  .evac-legend-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .evac-legend-title {
    font-size: 12px;
  }
  
  .evac-legend-desc {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .evac-categories-legend {
    left: 7px;
    gap: 4px;
  }
  
  .evac-legend-card {
    padding: 6px 8px;
    gap: 6px;
    min-width: 140px;
  }
  
  .evac-legend-icon {
    width: 35px;
    height: 35px;
    font-size: 13px;
  }
  
  .evac-legend-title {
    font-size: 9px;
  }
  
  .evac-legend-desc {
    font-size: 7px;
  }
}

/* Layer Control Panel */
.layer-control-container { position: absolute; top: 50px; right: 10px; z-index: 1000; }
.layer-toggle-btn { background: white; border: 1px solid #e5e7eb; border-radius: 8px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.2s ease; color: #3b82f6; font-size: 18px; }
.layer-toggle-btn:hover { background: #eff6ff; border-color: #3b82f6; transform: scale(1.05); box-shadow: 0 4px 12px rgba(59,130,246,0.2); }
.layer-toggle-btn:active { transform: scale(0.95); }
.layer-control-panel-resident { position: absolute; top: 50px; right: 0; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 0; width: 240px; border: 1px solid #e5e7eb; font-family: 'Inter', sans-serif; display: none; animation: slideInRight 0.3s ease; }
.layer-control-panel-resident.show { display: block; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.layer-control-header { font-weight: 700; font-size: 14px; color: white; background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); padding: 12px 16px; border-radius: 12px 12px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.layer-control-header i { font-size: 16px; margin-right: 8px; }
.layer-close-btn { background: transparent; border: none; color: white; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; font-size: 16px; width: 28px; height: 28px; }
.layer-close-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); }
.layer-close-btn:active { transform: scale(0.95); }
.layer-control-body { padding: 12px; }
.layer-control-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 4px 0; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; background: #f9fafb; border: 1px solid #f3f4f6; }
.layer-control-item:hover { background: #eff6ff; border-color: #bfdbfe; transform: translateX(2px); }
.layer-control-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: #3b82f6; border-radius: 4px; flex-shrink: 0; margin: 0; }
.layer-control-label { font-size: 13px; font-weight: 500; color: #1f2937; cursor: pointer; flex: 1; user-select: none; margin: 0; }
.layer-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.layer-icon.barangay { color: #3b82f6; }
.layer-icon.fire { color: #dc2626; }
.layer-icon.flood { color: #0891b2; }
.layer-icon.landslide { color: #92400e; }
.layer-icon.earthquake { color: #7c2d12; }

/* Mobile Responsive - Tablets */
@media (max-width: 768px) {
  .layer-control-panel-resident { top: 50px; right: 8px; width: 220px; }
  .layer-control-header { font-size: 13px; padding: 10px 14px; }
  .layer-control-header i { font-size: 15px; }
  .layer-close-btn { width: 26px; height: 26px; font-size: 15px; }
  .layer-control-body { padding: 10px; }
  .layer-control-item { padding: 9px 10px; gap: 10px; margin: 4px 0; }
  .layer-control-label { font-size: 12px; }
  .layer-icon { width: 22px; height: 22px; font-size: 15px; }
  .layer-control-checkbox { width: 18px; height: 18px; }
}

/* Mobile Responsive - Phones */
@media (max-width: 480px) {
  .layer-control-container { position: absolute; top: 50px; right: 10px; z-index: 1000; }
  .layer-control-panel-resident { position: absolute; top: 50px; right: 6px; width: 200px; max-height: 70vh; overflow-y: auto; }
  .layer-control-header { font-size: 12px; padding: 8px 12px; }
  .layer-control-header i { font-size: 14px; }
  .layer-close-btn { width: 24px; height: 24px; font-size: 14px; }
  .layer-control-body { padding: 8px; }
  .layer-control-item { padding: 8px 10px; gap: 8px; margin: 4px 0; border-radius: 6px; }
  .layer-control-item:hover { transform: translateX(1px); }
  .layer-control-label { font-size: 11px; }
  .layer-icon { width: 20px; height: 20px; font-size: 14px; }
  .layer-control-checkbox { width: 16px; height: 16px; }
}

/* Mobile Responsive - Small Phones */
@media (max-width: 360px) {
  .layer-control-panel-resident { top: 50px; right: 4px; width: 180px; }
  .layer-control-header { font-size: 11px; padding: 7px 10px; }
  .layer-control-header i { font-size: 13px; }
  .layer-close-btn { width: 22px; height: 22px; font-size: 13px; }
  .layer-control-body { padding: 6px; }
  .layer-control-item { padding: 7px 8px; gap: 6px; margin: 3px 0; }
  .layer-control-label { font-size: 10px; }
  .layer-icon { width: 18px; height: 18px; font-size: 12px; }
  .layer-control-checkbox { width: 14px; height: 14px; }
}
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #64748b;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --surface: #1e293b;
  --surface-dark: #0f172a;
  --surface-darker: #334155;
  --surface-light: #475569;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-light: #475569;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
#modalRegisterForm.form-container {
  display: none;
  height: auto;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
  box-sizing: border-box;
}

#modalRegisterForm.form-container.active {
  display: flex;
  flex-direction: column;
  padding-right: 4px;
  box-sizing: border-box;
}
.modal  { display: none; position: fixed; z-index: 80; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); }
.modal-content { position: relative; background: var(--surface); margin: 5% auto; padding: 0; width: 90%; max-width: 32rem; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); border: 1px solid var(--border); max-height: 110vh; display: flex; flex-direction: column; animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.population-modal-content { 
  max-width: 85%; 
  width: 85%; 
  max-width: 1000px; 
  max-height: 95vh; 
  background: white !important; 
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 3000;
}
.population-modal-content .modal-body { padding: 1rem; max-height: calc(95vh + 20px); overflow-y: auto; }
.population-modal-content .modal-header { background: white; border-bottom: 1px solid #e5e7eb; padding: 1rem 1.5rem; }
.population-modal-content .modal-header h2 { color: #1f2937; }
.population-pyramid-container { background: white !important; }
#modalLoginForm.form-container {
  height: auto;
}
@keyframes modalSlideIn { from { opacity: 0; transform: scale(0.95) translateY(-2rem); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 2rem 2rem 1rem; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.close-modal { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 0.5rem; border-radius: var(--radius); transition: var(--transition); }
.close-modal:hover { background: var(--surface-light); color: var(--text-primary); }
.modal-body { 
  padding: 2rem; 
  padding-right: calc(2rem + 8px);
  overflow-y: auto; 
  flex: 1;
  background: transparent;
}


html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; 
  background: var(--surface-dark); 
  color: var(--text-primary); 
  line-height: 1.6; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale; 
  overflow: hidden; 
  overflow-x: hidden;
}

/* Navigation Bar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; height: 4rem; }
.nav-left { display: flex; align-items: center; gap: 1rem; }
.nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--primary); letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.75rem; }
.nav-brand-logo { height: 2rem; width: auto; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.875rem; padding: 0.5rem 1rem; border-radius: var(--radius); transition: var(--transition); display: flex; align-items: center; gap: 0.5rem; }
.nav-links a:hover { background: var(--surface-darker); color: var(--text-primary); }
.nav-links a.active { background: var(--primary); color: white; }
.nav-links a i { font-size: 0.875rem; }

@media (max-width: 480px) {
  .navbar { padding: 0 0.75rem; height: 3rem; }
  .nav-brand { font-size: 1.125rem; }
  .nav-brand-logo { height: 1.5rem; }
  .nav-links { gap: 0.25rem; }
  .nav-links a { padding: 0.5rem; font-size: 0.75rem; }
  .leaflet-top { top: 3rem !important; }
  .modal { padding: 0.25rem; }
  .modal-content { border-radius: var(--radius-lg); max-height: 96vh; margin-top: 60px; }
  .modal-header { padding: 1rem 1rem 0.75rem; }
  .modal-header h2 { font-size: 1.125rem; }
  .modal-body { padding: 1rem;}
  .disaster-selection { padding: 1rem; max-height: 60vh; top: 3.5rem; }
  .needs-modal-content { max-width: 100%; margin: 2% auto; border-radius: var(--radius-lg); max-height: 87vh; margin-top: 65px;  }
  .needs-summary { padding: 0.75rem; gap: 0.75rem; }
  .summary-stat { padding: 0.625rem; gap: 0.75rem; }
  .summary-stat i { font-size: 1.5rem; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: 0.75rem; }
  .needs-category { padding: 0.75rem; }
  .category-title { font-size: 0.9375rem; margin-bottom: 0.75rem; }
  .need-name { font-size: 0.8125rem; }
  .need-quantity { font-size: 0.6875rem; }
  .needs-breakdown { padding: 0.75rem; }
  .breakdown-list { max-height: 250px; }
  .breakdown-title { font-size: 0.8125rem; }
  .breakdown-date { font-size: 0.6875rem; }
  .route-button { font-size: 10px; padding: 5px 8px; }
  .popup-actions { gap: 4px; }
  .center-popup-container { font-size: 12px; }
  .center-name { font-size: 13px; }
  .center-category-badge { font-size: 10px; padding: 4px 8px; }
  .notification { top: 55px; right: 8px; max-width: 220px; padding: 10px 14px; font-size: 12px; }
  .advanced-location-marker { width: 28px; height: 28px; }
  .location-dot { width: 18px; height: 18px; }
  .location-stats { grid-template-columns: 1fr; gap: 8px; }
  .stat-item { padding: 6px; }
  .stat-value { font-size: 14px; }
}
    .location-detection-info{display:flex;align-items:center;gap:0.5rem;padding:0.75rem;background:#eff6ff;border:1px solid #bfdbfe;border-radius:var(--radius);color:#1e40af;font-size:0.875rem;margin-bottom:1rem;}
    .location-detection-info i{font-size:1rem;}
    .location-detection-info.success{background:#f0fdf4;border-color:#bbf7d0;color:#15803d;}
    .location-detection-info.error{background:#fef2f2;border-color:#fecaca;color:#dc2626;}
#welcomeLegendTrigger{position:fixed;bottom:2rem;left:2rem;z-index:1500;color:white;border:none;padding:1rem 1.5rem;border-radius:var(--radius-xl);font-weight:600;font-size:0.875rem;cursor:pointer;box-shadow:var(--shadow-lg);transition:var(--transition);display:flex;align-items:center;gap:0.5rem;white-space:nowrap;}
#welcomeLegendTrigger:hover{background:var(--primary);transform:translateY(-2px);box-shadow:var(--shadow-xl);}
#welcomeLegendTrigger:active{transform:translateY(0);}
    .hazard-levels{display:none;margin-top:0.75rem;padding-top:0.75rem;border-top:1px solid var(--border-light);}
    .hazard-levels.show{display:block;animation:fadeIn 0.3s ease;}
    .hazard-level-item{display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.5rem 0.5rem 1.5rem;margin:0.25rem 0;border-radius:var(--radius);background:rgba(255,255,255,0.05);transition:var(--transition);}
    .hazard-level-color{width:16px;height:16px;border-radius:4px;border:2px solid white;box-shadow:0 1px 3px rgba(0,0,0,0.3);}
    .hazard-level-info{flex:1;}
    .hazard-level-name{font-size:0.8rem;font-weight:600;color:var(--text-primary);margin-bottom:0.125rem;}
    .hazard-level-desc{font-size:0.7rem;color:var(--text-secondary);}
    .hazard-expand-btn{background:none;border:none;color:var(--text-muted);cursor:pointer;padding:0.25rem;border-radius:var(--radius);transition:var(--transition);margin-left:auto;}
    .hazard-expand-btn:hover{background:var(--surface-light);color:var(--text-primary);}
    .hazard-expand-btn i{transition:transform 0.3s ease;}
    .hazard-expand-btn.expanded i{transform:rotate(180deg);}
@keyframes fadeIn{from{opacity:0;transform:translateY(-5px);}to{opacity:1;transform:translateY(0);}}
@media(max-width:768px){
    .legend-grid{grid-template-columns:1fr;}#welcomeLegendTrigger{bottom:1rem;left:1rem;padding:0.875rem;width:48px;height:48px;border-radius:50%;justify-content:center;}#welcomeLegendTrigger 
    .legend-text,#welcomeLegendTrigger span{display:none;}
    .hazard-levels{margin-top:0.5rem;padding-top:0.5rem;}
    .hazard-level-item{padding:0.375rem 0.375rem 0.375rem 1rem;}
    .hazard-level-name{font-size:0.75rem;}
    .hazard-level-desc{font-size:0.65rem;}
    .hazard-level-color{width:14px;height:14px;}}
@media(max-width:480px){
    .legend-section-title{font-size:1rem; color: white;}
    #welcomeLegendTrigger{bottom:0.75rem;left:0.75rem;padding:0.75rem;width:44px;height:44px;}
    .legend-grid{gap:0.5rem;}
    .legend-item{padding:0.625rem;}
    .hazard-levels{margin-top:0.375rem;padding-top:0.375rem;}}

/* Sidebar Styles - Matching LGU Sidebar Design */
.sidebar-toggle-btn {
  background: #2c3e50;
  border: none;
  color: white;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  width: 36px;
  height: 36px;
}

.sidebar-toggle-btn:hover {
  background: #34495e;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.main-sidebar {
  position: fixed;
  top: 0;
  left: -240px;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  color: white;
  z-index: 2000;
  transition: left 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Hide scrollbar but keep functionality */
.main-sidebar::-webkit-scrollbar {
  width: 6px;
}

.main-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.main-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.main-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-dropdown-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-dropdown-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-dropdown-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.main-sidebar.active {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1999;
  display: none;
}

.sidebar-overlay.active {
  display: block;
}

.sidebar-header {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(155, 89, 182, 0.1) 100%);
  position: relative;
}

.sidebar-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.sidebar-header-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

.sidebar-header:hover .sidebar-header-logo {
  transform: scale(1.1) rotate(5deg);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}

.sidebar-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.sidebar-content {
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  box-sizing: border-box;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  flex-shrink: 0;
  box-sizing: border-box;
}

.sidebar-section {
  margin-bottom: 0;
}

.sidebar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  margin-bottom: 0;
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  gap: 8px;
}

.sidebar-section-header > div:last-child,
.sidebar-section-header > i:last-child {
  flex-shrink: 0;
  margin-top: 2px;
}

.sidebar-section-header:hover {
  background: rgba(255,255,255,0.05);
}

.sidebar-section-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: white;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sidebar-section-header h4 > i:first-child {
  flex-shrink: 0;
  margin-top: 2px;
}

.sidebar-section-header h4 i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-badge {
  background: #3498db;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-btn {
  width: calc(100% - 32px);
  margin: 12px 16px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  box-sizing: border-box;
  max-width: calc(100% - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-btn-primary {
  background: #3498db;
  color: white;
}

.sidebar-btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.sidebar-btn-danger {
  background: #e74c3c;
  color: white;
}

.sidebar-btn-danger:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.sidebar-btn-info {
  background: #3498db;
  color: white;
}

.sidebar-btn-info:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.sidebar-item-link:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: 25px;
}

/* Evacuation Content Modal */
.evac-content-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.evac-content-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.evac-content-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
}

.evac-content-modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.evac-content-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.evac-content-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.evac-content-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.evac-content-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-family: 'Inter', sans-serif;
  line-height: 1.8;
  color: #1f2937;
}

.evac-content-modal-body h1,
.evac-content-modal-body h2,
.evac-content-modal-body h3,
.evac-content-modal-body h4,
.evac-content-modal-body h5,
.evac-content-modal-body h6 {
  color: #1e3a8a;
  margin-top: 20px;
  margin-bottom: 12px;
  font-weight: 700;
}

.evac-content-modal-body p {
  margin-bottom: 16px;
}

.evac-content-modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.evac-content-modal-body ul,
.evac-content-modal-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.evac-content-modal-body li {
  margin-bottom: 8px;
}

.evac-content-modal-body a {
  color: #3b82f6;
  text-decoration: underline;
}

.evac-content-modal-body a:hover {
  color: #1e40af;
}

.evac-content-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.evac-content-modal-body table th,
.evac-content-modal-body table td {
  padding: 12px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.evac-content-modal-body table th {
  background: #f9fafb;
  font-weight: 600;
  color: #1e3a8a;
}

.sidebar-btn i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-dropdown {
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  border: none;
}

.sidebar-dropdown-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
  user-select: none;
  color: white;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}

.sidebar-dropdown-header:hover {
  background: rgba(255,255,255,0.1);
  padding-left: 20px;
}

.sidebar-dropdown-header i {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.sidebar-dropdown-header.active i {
  transform: rotate(180deg);
}

.sidebar-dropdown-content {
  max-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  transition: max-height 0.3s ease-out;
  background: rgba(0,0,0,0.1);
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-dropdown-content.active {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  min-height: 50px;
  width: 100%;
  box-sizing: border-box;
}

/* Show only 3 items initially, then scroll */
.center-item {
  padding: 10px 16px 10px 44px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.3s;
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  border-left: 3px solid transparent;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sidebar-loading {
  padding: 20px;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.center-item:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-left-color: #3498db;
  padding-left: 47px;
}

.center-item:last-child {
  border-bottom: none;
}

.center-item-name {
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
  font-size: 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.center-item-info {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

.center-item-info i {
  margin-right: 4px;
}

.population-chart-container {
  padding: 12px 16px;
}

.barangay-population-item {
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.barangay-population-header {
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
  font-size: 12px;
}

.population-total {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
}

.population-chart {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.population-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.population-bar-label {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  text-align: center;
  font-weight: 500;
}

.population-bar-value {
  height: 60px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.population-bar-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-radius: 4px;
  transition: height 0.3s ease;
}

.population-bar-fill.male {
  background: #3498db;
}

.population-bar-fill.female {
  background: #e91e63;
}

.population-bar-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.age-group-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-top: 5px;
}

/* Barangay List Styles */
.barangay-list-container {
  padding: 10px 0;
}

.barangay-list-item {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.barangay-list-item:hover {
  background: rgba(255,255,255,0.1);
  padding-left: 20px;
}

.barangay-list-name {
  color: white;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barangay-list-name i {
  color: #3498db;
  font-size: 12px;
}

.barangay-list-total {
  display: flex;
  align-items: center;
  gap: 8px;
}

.barangay-total-badge {
  background: rgba(52, 152, 219, 0.3);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.barangay-list-item:hover .barangay-total-badge {
  background: rgba(52, 152, 219, 0.5);
}

.barangay-list-item i.fa-chevron-right {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
}

/* Population Pyramid Styles */
.population-pyramid-container {
  padding: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  position: relative;
  max-height: calc(95vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pyramid-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: #6b7280;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.pyramid-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

.pyramid-menu-btn {
  position: absolute;
  top: 10px;
  right: 50px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: #6b7280;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-direction: column;
  gap: 3px;
}

.pyramid-menu-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

.pyramid-menu-btn span {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  display: block;
}

.pyramid-menu-dropdown {
  position: absolute;
  top: 45px;
  right: 10px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 20;
  min-width: 180px;
  display: none;
  overflow: hidden;
}

.pyramid-menu-dropdown.show {
  display: block;
}

.pyramid-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 0.875rem;
  transition: all 0.2s;
  border-bottom: 1px solid #f3f4f6;
}

.pyramid-menu-item:last-child {
  border-bottom: none;
}

.pyramid-menu-item:hover {
  background: #f9fafb;
  color: #1f2937;
}

.pyramid-menu-item i {
  width: 18px;
  text-align: center;
  color: #6b7280;
}

.pyramid-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
  position: relative;
  padding-right: 50px;
  flex-shrink: 0;
}

.pyramid-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #3498db, #e91e63);
}

.pyramid-back-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  margin-bottom: 8px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pyramid-back-btn:hover {
  background: rgba(255,255,255,0.2);
}

.pyramid-title {
  color: #1f2937;
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.pyramid-address {
  color: #9ca3af;
  font-size: 0.6875rem;
  margin-top: 2px;
  margin-bottom: 4px;
  font-style: italic;
}

.pyramid-footer {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 2px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.pyramid-total-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 15px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  min-width: 120px;
}

.pyramid-total-item.total-population {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
  min-width: 150px;
}

.pyramid-total-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pyramid-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.pyramid-indicator.male-indicator {
  background: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.pyramid-indicator.female-indicator {
  background: #e91e63;
  box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.2);
}

.pyramid-indicator.total-indicator {
  background: linear-gradient(135deg, #3498db 0%, #e91e63 100%);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.pyramid-total-value {
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.pyramid-chart {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  position: relative;
  padding: 10px 8px;
  background: linear-gradient(to right, 
    rgba(52, 152, 219, 0.03) 0%, 
    rgba(52, 152, 219, 0.03) 48%, 
    transparent 49%, 
    transparent 51%, 
    rgba(233, 30, 99, 0.03) 52%, 
    rgba(233, 30, 99, 0.03) 100%);
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.pyramid-chart::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    #d1d5db 10%, 
    #d1d5db 90%, 
    transparent 100%);
  transform: translateX(-50%);
  z-index: 1;
}

.pyramid-labels-left,
.pyramid-labels-right {
  width: 42px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 10px;
  position: relative;
  align-items: center;
}

.pyramid-labels-left::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 2px;
  height: 35px;
  background: #3498db;
  transform: translateY(-50%);
  z-index: 1;
}

.pyramid-labels-right::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 35px;
  background: #e91e63;
  transform: translateY(-50%);
  z-index: 1;
}

.pyramid-sex-label {
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 5px 2px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.pyramid-labels-left .pyramid-sex-label {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.pyramid-labels-right .pyramid-sex-label {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
}

.pyramid-bars-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  padding: 3px 0;
  overflow: hidden;
  min-height: 0;
}

/* Grid lines for reference */
.pyramid-bars-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 12px,
      rgba(0, 0, 0, 0.02) 12px,
      rgba(0, 0, 0, 0.02) 13px
    );
  pointer-events: none;
  z-index: 0;
}

.pyramid-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 12px;
  height: 12px;
  position: relative;
  z-index: 1;
  padding: 0;
  flex-shrink: 0;
}

.pyramid-row:last-child {
  border-bottom: none;
}

.pyramid-row:hover {
  background: rgba(0, 0, 0, 0.01);
  border-radius: 4px;
}

.pyramid-age-label-center {
  width: 50px;
  color: #374151;
  font-size: 0.625rem;
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 3px;
  padding: 1px 3px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.pyramid-bars {
  flex: 1;
  display: flex;
  gap: 2px;
  align-items: center;
  position: relative;
  padding: 0 2px;
  justify-content: space-between;
}

.pyramid-bars::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d1d5db;
  transform: translateX(-50%);
  z-index: 0;
}

.pyramid-bar-container {
  flex: 1;
  display: flex;
  justify-content: center;
}

.pyramid-bar {
  height: 12px;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  min-width: 3px;
}

.pyramid-bar.male-bar {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  justify-content: flex-start;
  border-left: 3px solid #1f5f8b;
}

.pyramid-bar.male-bar:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.pyramid-bar.female-bar {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  justify-content: flex-end;
  border-right: 3px solid #8b0e3d;
}

.pyramid-bar.female-bar:hover {
  background: linear-gradient(135deg, #c2185b 0%, #8b0e3d 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(233, 30, 99, 0.3);
}

.pyramid-bar-value {
  color: white;
  font-size: 7px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 1px rgba(0,0,0,0.4);
  white-space: nowrap;
  letter-spacing: 0.2px;
  padding: 0 1px;
}

@media (max-width: 768px) {
  .main-sidebar {
    width: 240px;
    left: -240px;
  }
  
  .sidebar-header {
    padding: 16px 14px;
  }
  
  .sidebar-header-logo {
    height: 28px;
  }
  
  .sidebar-header h3 {
    font-size: 15px;
  }
  
  .sidebar-section-header {
    padding: 11px 14px;
  }
  
  .sidebar-section-header h4 {
    font-size: 12.5px;
  }
  
  .sidebar-btn {
    width: calc(100% - 28px);
    margin: 11px 14px;
    padding: 11px 14px;
    font-size: 12.5px;
  }
  
  .population-modal-content {
    max-width: 95%;
    width: 95%;
    max-height: 95vh;
    margin-left: auto;
    margin-right: auto;
  }
  
  .population-modal-content .modal-body {
    padding: 1rem;
  }
  
  .pyramid-title {
    font-size: 1.1rem;
  }
  
  .pyramid-address {
    font-size: 0.75rem;
  }
  
  .pyramid-subtitle {
    font-size: 0.8125rem;
  }
  
  .pyramid-chart {
    gap: 4px;
  }
  
  .pyramid-labels-left,
  .pyramid-labels-right {
    width: 35px;
    padding-top: 10px;
  }
  
  .pyramid-sex-label {
    font-size: 0.6875rem;
  }
  
  .pyramid-age-label-left,
  .pyramid-age-label-right {
    width: 40px;
    font-size: 0.6875rem;
    padding: 0 4px;
  }
  
  .pyramid-bar {
    height: 12px;
  }
  
  .pyramid-bar-value {
    font-size: 7px;
  }
  
  .pyramid-row {
    gap: 4px;
    min-height: 14px;
  }
  
  .pyramid-chart::before {
    width: 1px;
  }
  
  .pyramid-bars::after {
    width: 0.5px;
  }
  
  .pyramid-bars-container::before {
    background-image: 
      repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 12px,
        rgba(0, 0, 0, 0.015) 12px,
        rgba(0, 0, 0, 0.015) 13px
      );
  }
  
  .pyramid-footer {
    flex-direction: column;
    gap: 10px;
  }
  
  .pyramid-total-item {
    width: 100%;
    min-width: auto;
  }
  
  .pyramid-total-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .main-sidebar {
    width: 100%;
    left: -100%;
  }
  
  .population-modal-content {
    max-width: 95%;
    width: 95%;
    max-height: 95vh;
    margin-left: auto;
    margin-right: auto;
  }
  
  .sidebar-header {
    padding: 14px 12px;
  }
  
  .sidebar-header-logo {
    height: 24px;
  }
  
  .sidebar-header h3 {
    font-size: 14px;
  }
  
  .sidebar-section-header {
    padding: 10px 12px;
  }
  
  .sidebar-section-header h4 {
    font-size: 12px;
  }
  
  .sidebar-btn {
    width: calc(100% - 24px);
    margin: 10px 12px;
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .center-item {
    padding: 8px 12px 8px 36px;
    font-size: 11px;
    min-height: 50px;
  }
  
  .center-item:hover {
    padding-left: 40px;
  }
  
  .barangay-list-item {
    padding: 8px 12px;
    font-size: 11px;
  }
  
  .barangay-list-item:hover {
    padding-left: 16px;
  }
  
  .sidebar-footer {
    padding: 12px;
  }
}
    .barricade-marker { width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
    .barricade-icon { width: 25px; height: 25px; background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); color: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 3px solid white; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6), 0 0 0 2px rgba(220, 38, 38, 0.2); animation: barricadePulse 2s infinite; position: relative; overflow: hidden; }
    .barricade-icon::before { content: ''; position: absolute; top: 0; left: -50%; width: 200%; height: 100%; background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(251, 191, 36, 0.9) 4px, rgba(251, 191, 36, 0.9) 8px); animation: stripeMove 20s linear infinite; z-index: 0; }
    .barricade-icon::after { content: ''; position: absolute; inset: -2px; border-radius: 8px; background: linear-gradient(45deg, #dc2626, #fbbf24); opacity: 0; z-index: -1; animation: glowPulse 2s infinite; }
    .barricade-icon i { font-size: 18px; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); position: relative; }
@keyframes barricadePulse { 0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6), 0 0 0 2px rgba(220, 38, 38, 0.2); } 50% { transform: scale(1.08); box-shadow: 0 6px 16px rgba(220, 38, 38, 0.8), 0 0 0 4px rgba(220, 38, 38, 0.3); } }
@keyframes stripeMove { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }
@keyframes glowPulse { 0%, 100% { opacity: 0; } 50% { opacity: 0.3; } }
    .barricade-inactive .barricade-icon { background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%); animation: none; opacity: 0.6; }
    .barricade-inactive .barricade-icon::before { background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(209, 213, 219, 0.5) 4px, rgba(209, 213, 219, 0.5) 8px); animation: none; }
    .barricade-inactive .barricade-icon::after { display: none; }
    .barricade-radius-circle { pointer-events: none; animation: radiusPulse 3s infinite; }
@keyframes radiusPulse { 0%, 100% { opacity: 0.25; stroke-width: 2; } 50% { opacity: 0.4; stroke-width: 3; } }
    .leaflet-popup.barricade-popup .leaflet-popup-content-wrapper { border-left: 4px solid #dc2626; box-shadow: 0 8px 24px rgba(220, 38, 38, 0.25); }
    .leaflet-popup.barricade-popup .leaflet-popup-tip { border-top-color: #dc2626; }
@media (max-width: 768px) { 
    .barricade-marker { width: 36px; height: 36px; } 
    .barricade-icon { width: 36px; height: 36px; border: 2px solid white; } 
    .barricade-icon i { font-size: 16px; } }
@media (max-width: 480px) { 
    .barricade-marker { width: 32px; height: 32px; } 
    .barricade-icon { width: 32px; height: 32px; } 
    .barricade-icon i { font-size: 14px; } 
    .barricade-icon::before { background: repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(251, 191, 36, 0.9) 3px, rgba(251, 191, 36, 0.9) 6px); } }
@keyframes warningShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
    .barricade-warning { animation: warningShake 0.5s ease-in-out 3, barricadePulse 2s infinite; }
    .marker-cluster-barricade { background-color: rgba(220, 38, 38, 0.6); border: 3px solid #dc2626; }
    .marker-cluster-barricade div { background-color: rgba(220, 38, 38, 0.8); color: white; font-weight: bold; }
    .leaflet-tooltip.barricade-tooltip { background-color: #dc2626; color: white; border: 2px solid white; font-weight: 600; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5); }
    .leaflet-tooltip.barricade-tooltip::before { border-top-color: #dc2626; }
    .barricade-loading { opacity: 0.5; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
    /* Aura effects for evacuation centers - Green pulsing similar to location marker */
    .evacuation-marker-aura {
      position: relative;
    }
    .evacuation-marker-aura::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: rgba(202, 255, 0, 0.6); /* Bright yellow-green color for better visibility */
      animation: evacuationPulseEffect 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
      z-index: -1;
    }
    /* Stronger pulsing effect for occupied centers */
    .evacuation-marker-aura-occupied::before {
      background: rgba(202, 255, 0, 0.7); /* Brighter yellow-green for occupied centers */
      animation: evacuationPulseEffectStrong 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }
    @keyframes evacuationPulseEffect {
      0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
      }
      50% {
        transform: translate(-50%, -50%) scale(2.0);
        opacity: 0.6;
      }
      100% {
        transform: translate(-50%, -50%) scale(3.0);
        opacity: 0;
      }
    }
    @keyframes evacuationPulseEffectStrong {
      0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
      }
      50% {
        transform: translate(-50%, -50%) scale(2.3);
        opacity: 0.7;
      }
      100% {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
      }
    }
#legendModal .modal-content { max-width: 600px; max-height: 85vh; margin: 3% auto; display: flex; flex-direction: column; overflow: hidden; margin-top:80px; }
#legendModal .modal-header { flex-shrink: 0; padding: 1.5rem; border-bottom: 2px solid #e5e7eb; }
#legendModal .modal-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1.5rem; -webkit-overflow-scrolling: touch; }
#legendModal .modal-body::-webkit-scrollbar { width: 8px; }
#legendModal .modal-body::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 4px; }
#legendModal .modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
#legendModal .modal-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.legend-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.legend-section { margin-bottom: 2rem; }
.legend-section:last-child { margin-bottom: 0; }
.legend-section-title { font-size: 1.125rem; font-weight: 600; color: white; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e5e7eb; }
.legend-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem; background: #f9fafb; border-radius: 8px; transition: all 0.2s ease; }
.legend-item:hover { background: #f3f4f6; transform: translateX(4px); }
.legend-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.legend-text { flex: 1; min-width: 0; }
.legend-label { font-weight: 600; color: #1f2937; font-size: 0.9375rem; margin-bottom: 0.25rem; }
.legend-description { font-size: 0.8125rem; color: #6b7280; line-height: 1.4; }
.hazard-levels { display: none; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #e5e7eb; }
.hazard-levels.show { display: block; animation: fadeIn 0.3s ease; }
.hazard-level-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.625rem 0.625rem 1rem; margin: 0.25rem 0; border-radius: 6px; background: rgba(255, 255, 255, 0.5); transition: all 0.2s ease; }
.hazard-level-item:hover { background: rgba(255, 255, 255, 0.8); }
.hazard-level-color { width: 16px; height: 16px; border-radius: 4px; border: 2px solid white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); flex-shrink: 0; }
.hazard-level-info { flex: 1; min-width: 0; }
.hazard-level-name { font-size: 0.8125rem; font-weight: 600; color: #1f2937; margin-bottom: 0.125rem; }
.hazard-level-desc { font-size: 0.75rem; color: white; }
.hazard-expand-btn { background: none; border: none; color: #6b7280; cursor: pointer; padding: 0.375rem; border-radius: 4px; transition: all 0.2s ease; flex-shrink: 0; }
.hazard-expand-btn:hover { background: rgba(0, 0, 0, 0.05); color: #1f2937; }
.hazard-expand-btn i { transition: transform 0.3s ease; font-size: 0.875rem; }
.hazard-expand-btn.expanded i { transform: rotate(180deg); }

@media (max-width: 768px) { 
    #legendModal .modal-content { max-width: 95%; max-height: 90vh; margin: 2% auto; } 
    #legendModal .modal-header { padding: 1.25rem; } 
    #legendModal .modal-header h2 { font-size: 1.25rem; } 
    #legendModal .modal-body { padding: 1.25rem; } 
    .legend-section-title { font-size: 1rem; } 
    .legend-item { padding: 0.75rem; } 
    .legend-icon { width: 36px; height: 36px; } 
    .legend-label { font-size: 0.875rem; } 
    .legend-description { font-size: 0.75rem; } }

@media (max-width: 480px) { 
    #legendModal { padding: 0; } 
    #legendModal .modal-content { max-width: 110%; width:95%; max-height: 87vh; height: 87vh; margin: 0; border-radius: 8; margin-top: 70px; margin-left:10px; } 
    #legendModal .modal-header { padding: 1rem; border-radius: 0; } 
    #legendModal .modal-header h2 { font-size: 1.125rem; }
    #legendModal .modal-body { padding: 1rem; flex: 1; overflow-y: auto; } 
    #authModal .modal-content { 
      max-width: 95%; 
      width: 95%; 
      max-height: 85vh; 
      margin: 5% auto;
    } 
    #authModal .modal-header { 
      padding: 1.5rem 1.5rem 1.25rem; 
    }
    #authModal .modal-header h2 { 
      font-size: 1.5rem; 
    }
    #authModal .modal-body { 
      padding: 1.5rem;
      padding-right: calc(1.5rem + 8px);
    }
    #authModal .form-toggle { 
      margin-bottom: 1.5rem; 
      padding: 0.25rem; 
    }
    #authModal .form-toggle button { 
      padding: 0.75rem 1rem; 
      font-size: 0.875rem; 
    }
    #authModal .form-group { 
      margin-bottom: 1.25rem; 
    }
    #authModal .form-group input, 
    #authModal .form-group select { 
      padding: 0.8125rem 1rem; 
      font-size: 0.9375rem; 
    }
    #authModal .btn-submit { 
      padding: 0.9375rem 1.25rem; 
      font-size: 0.9375rem; 
    }
    #modalRegisterForm.form-container { 
      max-height: calc(75vh - 120px); 
      overflow-y: auto;
      padding-right: 4px;
      box-sizing: border-box;
    } 
    .legend-section { margin-bottom: 1.5rem; } 
    .legend-section-title { font-size: 0.9375rem; margin-bottom: 0.75rem; color:white;} 
    .legend-grid { gap: 0.5rem; } 
    .legend-item { padding: 0.625rem; gap: 0.625rem; } 
    .legend-icon { width: 32px; height: 32px; } 
    .legend-icon i { font-size: 0.75rem !important; } 
    .legend-label { font-size: 0.8125rem; } 
    .legend-description { font-size: 0.6875rem; } 
    .hazard-levels { margin-top: 0.5rem; padding-top: 0.5rem; } 
    .hazard-level-item { padding: 0.5rem 0.5rem 0.5rem 0.75rem; gap: 0.5rem; } 
    .hazard-level-color { width: 14px; height: 14px; } 
    .hazard-level-name { font-size: 0.75rem; } 
    .hazard-level-desc { font-size: 0.6875rem; }
    .hazard-expand-btn { padding: 0.25rem; } 
    .hazard-expand-btn i { font-size: 0.75rem; }
    #legendModal .modal-body::after { content: ''; display: block; height: 2rem; } }
    #modalRegisterForm.form-container {
  display: none;
  height: auto;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
  box-sizing: border-box;
}

#modalRegisterForm.form-container.active {
  display: flex;
  flex-direction: column;
}

@media (max-width: 360px) { 
    #legendModal .modal-header { padding: 0.875rem; } 
    #legendModal .modal-header h2 { font-size: 1rem; } 
    #legendModal .modal-body { padding: 0.875rem; } 
    .legend-icon { width: 28px; height: 28px; } 
    .legend-label { font-size: 0.75rem; } 
    .legend-description { font-size: 0.625rem; } }

@media (max-width: 768px) and (orientation: landscape) { 
    #legendModal .modal-content { max-height: 95vh; } 
    #legendModal .modal-header { padding: 0.75rem 1rem; } 
    #legendModal .modal-body { padding: 0.875rem 1rem; } 
    .legend-section { margin-bottom: 1.25rem; } }

@supports (padding: max(0px)) { 
    #legendModal .modal-content { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); } 
    #legendModal .modal-body::after { height: max(2rem, env(safe-area-inset-bottom)); } }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.disaster-selection { position: fixed; top: 5rem; left: 1.5rem; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: var(--radius-xl); padding: 1.25rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.1); z-index: 40; width: 20rem; max-height: 75vh; overflow-y: auto; display: none; backdrop-filter: blur(20px); }
.disaster-selection.show { display: block; animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes slideInLeft { from { transform: translateX(-2rem); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.disaster-selection h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.2; letter-spacing: -0.025em; }
.disaster-subtitle { font-size: 0.8125rem; color: #94a3b8; margin-bottom: 1rem; line-height: 1.4; }
.legend-info { background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: var(--radius-lg); padding: 0.75rem; margin-bottom: 1rem; }
.legend-row { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.375rem; font-size: 0.75rem; color: #cbd5e1; flex-wrap: wrap; }
.legend-row:last-child { margin-bottom: 0; }
.legend-row i { font-size: 1rem; width: 20px; text-align: center; }
.legend-row span { font-weight: 500; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.25rem; box-shadow: 0 0 8px currentColor; }
.disaster-types-list { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.625rem; }
.disaster-checkbox-item { display: flex; align-items: center; padding: 0.875rem 1rem; border-radius: var(--radius-lg); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 2px solid rgba(71, 85, 105, 0.4); background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%); position: relative; overflow: hidden; }
.disaster-checkbox-item::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent); transition: left 0.5s; }
.disaster-checkbox-item:hover::before { left: 100%; }
.disaster-checkbox-item:hover { background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%); border-color: rgba(59, 130, 246, 0.5); transform: translateX(4px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2); }
.disaster-checkbox-item:has(.disaster-checkbox:checked) { background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%); border-color: #3b82f6; box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 0 20px rgba(59, 130, 246, 0.1); }
.disaster-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { width: 1.25rem; height: 1.25rem; background: rgba(30, 41, 59, 0.8); border: 2px solid #475569; border-radius: 0.5rem; margin-right: 0.75rem; display: flex; align-items: center; justify-content: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); flex-shrink: 0; }
.disaster-checkbox:checked ~ .checkmark { background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); border-color: #3b82f6; transform: scale(1.1); box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); }
.disaster-checkbox:checked ~ .checkmark::after { content: "✓"; color: white; font-size: 0.875rem; font-weight: 700; animation: checkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
@keyframes checkPop { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.disaster-label { font-size: 0.8125rem; font-weight: 600; color: #f1f5f9; line-height: 1.3; flex: 1; letter-spacing: 0.01em; }
.selected-disasters { margin-bottom: 1rem; padding: 1rem; background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%); border-radius: var(--radius-lg); border: 1px solid rgba(59, 130, 246, 0.3); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2); }
.selected-title { font-size: 0.8125rem; font-weight: 700; color: #94a3b8; margin-bottom: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 0.5rem; }
.selected-title::before { content: ''; width: 4px; height: 16px; background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%); border-radius: 2px; }
.selected-tags { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.selected-tag { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); color: white; border-radius: 9999px; font-size: 0.8125rem; font-weight: 600; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); transition: all 0.3s ease; animation: tagSlideIn 0.3s ease; }
@keyframes tagSlideIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.selected-tag:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4); }
.tag-remove { background: rgba(255, 255, 255, 0.2); border: none; color: white; font-size: 1.125rem; cursor: pointer; padding: 0; width: 1.25rem; height: 1.25rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s ease; font-weight: 700; }
.tag-remove:hover { background: rgba(255, 255, 255, 0.3); transform: rotate(90deg); }
.disaster-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(71, 85, 105, 0.4); }
.disaster-btn { padding: 0.75rem 1rem; border: none; border-radius: var(--radius-lg); font-weight: 700; font-size: 0.8125rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; gap: 0.5rem; letter-spacing: 0.02em; position: relative; overflow: hidden; }
.disaster-btn::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.disaster-btn:hover::before { width: 300px; height: 300px; }
.disaster-btn i { position: relative; z-index: 1; }
.disaster-btn span { position: relative; z-index: 1; }
.disaster-btn.primary { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: white; grid-column: 1 / -1; box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4); }
.disaster-btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5); }
.disaster-btn.primary:active:not(:disabled) { transform: translateY(0); }
.disaster-btn.primary:disabled { background: linear-gradient(135deg, #64748b 0%, #475569 100%); cursor: not-allowed; transform: none; box-shadow: none; }
.disaster-btn.secondary { background: linear-gradient(135deg, rgba(71, 85, 105, 0.3) 0%, rgba(51, 65, 85, 0.3) 100%); color: #f1f5f9; border: 2px solid rgba(71, 85, 105, 0.5); }
.disaster-btn.secondary:hover { background: linear-gradient(135deg, rgba(71, 85, 105, 0.5) 0%, rgba(51, 65, 85, 0.5) 100%); border-color: rgba(100, 116, 139, 0.7); transform: translateY(-2px); }
.disaster-btn.tertiary { background: transparent; color: #94a3b8; border: 2px solid rgba(71, 85, 105, 0.4); }
.disaster-btn.tertiary:hover { background: rgba(71, 85, 105, 0.2); border-color: rgba(71, 85, 105, 0.6); color: #cbd5e1; }
.no-disasters { text-align: center; padding: 3rem 1rem; color: #64748b; font-style: italic; font-size: 0.9375rem; }
.disaster-selection::-webkit-scrollbar { width: 6px; }
.disaster-selection::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.5); border-radius: 3px; }
.disaster-selection::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%); border-radius: 3px; }
.disaster-selection::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #2563eb 0%, #7c3aed 100%); }
@media (max-width: 768px) { .disaster-selection { left: 1rem; right: 1rem; width: auto; top: 4.5rem; padding: 1rem; max-height: 70vh; } .disaster-selection h3 { font-size: 1.125rem; } .disaster-subtitle { font-size: 0.75rem; } .legend-info { padding: 0.75rem; } .legend-row { font-size: 0.6875rem; gap: 0.5rem; } .disaster-checkbox-item { padding: 0.875rem; } .disaster-label { font-size: 0.8125rem; } .disaster-actions { grid-template-columns: 1fr; gap: 0.625rem; } .disaster-btn { padding: 0.875rem; font-size: 0.8125rem; } .disaster-btn.primary { grid-column: auto; } }
@media (max-width: 480px) { .disaster-selection { padding: 1rem; max-height: 65vh; top: 4rem; } .disaster-selection h3 { font-size: 1rem; } .disaster-subtitle { font-size: 0.6875rem; margin-bottom: 1rem; } .legend-info { padding: 0.625rem; } .disaster-checkbox-item { padding: 0.75rem; } .checkmark { width: 1.125rem; height: 1.125rem; margin-right: 0.625rem; } .selected-disasters { padding: 0.875rem; } .selected-tag { padding: 0.375rem 0.75rem; font-size: 0.6875rem; } }

