@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}

/* Map container */
#map {
  height: 100%;
  width: 100%;
  background: #f0f0f0;
}

/* Glass Morphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ward-label {
  padding: 4px 14px;
  font-size: 0.9em;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  text-transform: capitalize;
  letter-spacing: 0.4px;
}

.ward-hover-card {
  min-width: 220px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ward-hover-card h4 {
  margin: 0 0 8px 0;
  font-size: 1.05em;
  font-weight: 600;
  color: black;
}

.ward-hover-card p {
  margin: 0 0 6px 0;
  color:black ;
}

.ward-hover-card ul {
  margin: 0;
  padding-left: 18px;
}

/* Left Sidebar */
#sidebar {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 360px;
  max-height: calc(100vh - 30px);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

#sidebar.collapsed {
  transform: translateX(-340px);
}

#toggle-sidebar-btn {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 60px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-left: none;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
  color: #333;
  font-size: 22px;
  z-index: 1001;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

#toggle-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.05);
}

#sidebar.collapsed #toggle-sidebar-btn {
  transform: translateY(-50%) rotate(180deg);
}

#sidebar-content {
  padding: 16px;
  overflow-y: auto;
  width: 100%;
  flex: 1;
}

#sidebar-content::-webkit-scrollbar {
  width: 6px;
}

#sidebar-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

#sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Right Filters Panel */
#filters-panel {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 260px;
  max-height: calc(100vh - 30px);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

#filters-panel.collapsed {
  transform: translateX(240px);
}

.filters-toggle-btn {
  position: absolute;
  left: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 60px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-right: none;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
  color: #333;
  font-size: 22px;
  z-index: 1001;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
}

.filters-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.05);
}

#filters-panel.collapsed .filters-toggle-btn {
  transform: translateY(-50%) rotate(180deg);
}

#filters-content {
  padding: 16px;
  overflow-y: auto;
  width: 100%;
  flex: 1;
}
#login-form {
  color:white ;
  background: transparent;

}


#filters-content::-webkit-scrollbar {
  width: 6px;
}

#filters-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#filters-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

#filters-content h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 1.1em;
  font-weight: 600;
}

.filter-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.filter-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-card label {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-weight: 600;
  font-size: 0.85em;
}

h2, h3 {
  margin-top: 0;
  color: #333;
  font-weight: 600;
}

h2 {
  font-size: 1.3em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.1em;
  margin-bottom: 10px;
}

h4 {
  font-size: 1em;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-section, form {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.3s ease;
}

.form-section:hover, form:hover {
  background: rgba(255, 255, 255, 0.15);
}

label {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85em;
  color: #333;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  padding: 0;
}

.checkbox-group label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
  font-size: 0.9em;
}

.checkbox-group label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

select, input[type="text"], input[type="number"], input[type="datetime-local"], textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  box-sizing: border-box;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #333;
  transition: all 0.3s ease;
  font-family: "Ubuntu", sans-serif;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.6);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select option {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
}

.button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  color: #333;
  text-align: center;
  margin-top: 6px;
  transition: all 0.3s ease;
  font-size: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: "Ubuntu", sans-serif;
}

.button:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.button-primary:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.button-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
}

.button-danger:hover {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.form-message {
  margin-top: 8px;
  font-size: 0.85em;
  min-height: 1em;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
}

.info-window-content {
  padding: 12px;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.info-window-content h4 {
  margin: 0 0 8px 0;
  color: #333;
}

.info-window-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 6px;
  margin-bottom: 8px;
}

.info-window-content li {
  padding: 4px 0;
  font-size: 0.9em;
  color: #555;
}

.action-info-window {
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.glass-popup {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 12px !important;
  padding: 12px !important;
}

.action-info-window button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}

.action-info-window button:last-child {
  margin-bottom: 0;
}

#issues-list, #events-list, #overall-top-issues-list, #events-timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#issues-list li, #events-list li, #overall-top-issues-list li, #events-timeline-list li, #wards-list li {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
}

.ward-list-item {
  cursor: default !important;
}

.ward-list-item:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: none !important;
}

#events-list li:hover, #issues-list li:hover, #events-timeline-list li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.event-list-item {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
}

.event-list-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.event-list-item button {
  white-space: nowrap;
}

#issues-list li.active {
  background: rgba(102, 126, 234, 0.25);
  font-weight: bold;
  border-left: 3px solid #667eea;
}

#issues-list .issue-count {
  float: right;
  color: #666;
  font-weight: normal;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
}

.chart-container {
  position: relative;
  margin: auto;
  height: 220px;
  width: 100%;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  color: white;
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

/* Error Message */
.error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(217, 83, 79, 0.9);
  backdrop-filter: blur(10px);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
  font-family: "Ubuntu", sans-serif;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.error-message.success {
  background: rgba(92, 184, 92, 0.9);
}

/* Login Modal */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10002;
}

.login-modal.hidden {
  display: none;
}

.login-content {
  background:rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
}

.login-content h2 {
  margin-top: 0;
  margin-bottom: 8px;
  text-align: center;
  color: #333333;
  font-size: 1.8em;
  font-weight: 700;
}

.login-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: #333333;
  font-weight: 600;
  font-size: 1.2em;
}

.login-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.login-content input {
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  font-size: 15px;
  background: #ffffff;
  color: #333;
  font-family: "Ubuntu", sans-serif;
}

.login-content input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-content .button-primary {
  color: #000000;
  background: #ffffff;
  border: 2px solid #000000;
  font-weight: 600;
}

.login-content .button-primary:hover {
  background: #f5f5f5;
  color: #000000;
}

.login-content button {
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: "Ubuntu", sans-serif;
}

/* Button disabled state */
.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Form loading state */
.form-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Header styling */
#sidebar-content > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#user-info {
  font-size: 0.8em;
  color: rgba(51, 51, 51, 0.8);
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

#logout-btn {
  padding: 6px 12px;
  font-size: 0.8em;
  margin: 0;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 12px 0;
}

/* Campaign Title Overlay */
.campaign-title-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  pointer-events: none;
}

.campaign-title-overlay.hidden {
  display: none;
}

.campaign-title-card {
  position: relative;
  padding: 12px 40px 12px 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.campaign-title-card:hover {
  opacity: 1;
}

.campaign-title-card h2 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 400;
  color: #333;
  font-family: "Ubuntu", sans-serif;
}

.close-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  font-family: Arial, sans-serif;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

/* Google Maps InfoWindow styling */
.gm-style .gm-style-iw-c {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  padding: 0 !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
}

/* Ward-only view toggle button active state */
#toggle-ward-only-view-btn.active {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

#toggle-ward-only-view-btn.active:hover {
  background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}
