/* ============================================================
   NEW STREET — GEN Z DASHBOARD STYLES
   Modern Glassmorphism · Dark Mode · Micro-animations
   ============================================================ */

/* ── LAYOUT BASIS ────────────────────────────────────────────── */
.dash-body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP NAVIGATION BAR ──────────────────────────────────────── */
.dash-top-nav {
  height: var(--top-nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 24px rgba(0,0,0,0.06);
  gap: 16px;
}

.dash-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Brand */
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.dash-brand:hover { transform: scale(1.02); }

.dash-brand-image {
  display: block;
  width: 142px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.dash-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79,142,247,0.45);
  flex-shrink: 0;
  transition: box-shadow 0.2s ease;
}
.dash-brand:hover .dash-brand-icon {
  box-shadow: 0 6px 20px rgba(79,142,247,0.65);
}

.dash-brand-text {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  font-family: var(--font-alt);
}

.dash-brand-text span {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-divider {
  width: 1px;
  height: 22px;
  background: linear-gradient(to bottom, transparent, var(--border-strong), transparent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* Location context — premium pill */
.dash-loc-context {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,0.9);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}
.dash-loc-context::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,142,247,0.08) 0%, rgba(99,102,241,0.08) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.dash-loc-context:hover {
  border-color: rgba(79,142,247,0.5);
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  box-shadow: 0 4px 16px rgba(79,142,247,0.18), 0 0 0 3px rgba(79,142,247,0.08);
  transform: translateY(-1px);
}
.dash-loc-context:hover::before { opacity: 1; }

.dash-loc-pin {
  font-size: 1rem;
  filter: drop-shadow(0 1px 2px rgba(244,63,94,0.3));
  flex-shrink: 0;
}

.dash-loc-details { display: flex; flex-direction: column; gap: 0px; }

.dash-loc-city {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.dash-loc-ward {
  font-size: 0.62rem;
  color: var(--text-tertiary);
  line-height: 1.25;
  font-weight: 500;
}

/* Real-time address tooltip on hover */
.dash-loc-context .nav-address-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  max-width: 260px;
  white-space: normal;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 300;
  pointer-events: none;
}
.dash-loc-context .nav-address-tooltip::before {
  content: '';
  position: absolute;
  top: -5px; left: 16px;
  width: 10px; height: 10px;
  background: #0f172a;
  transform: rotate(45deg);
  border-radius: 2px;
}
.dash-loc-context:hover .nav-address-tooltip { display: block; animation: tooltipFadeIn 0.18s ease; }

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Live GPS Indicator — premium pill */
.dash-gps-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald);
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(5,150,105,0.12) 100%);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  transition: all 0.22s ease;
  white-space: nowrap;
  cursor: default;
  box-shadow: 0 0 0 0 rgba(16,185,129,0);
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 4px 12px;
}
.dash-gps-live:hover {
  background: linear-gradient(135deg, rgba(16,185,129,0.14) 0%, rgba(5,150,105,0.18) 100%);
  box-shadow: 0 2px 12px rgba(16,185,129,0.2);
  transform: translateY(-1px);
}

.gps-top-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.gps-address-row {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  letter-spacing: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
  margin-top: 1px;
}

.dash-gps-live.searching {
  color: var(--amber);
  background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(217,119,6,0.12) 100%);
  border-color: rgba(245,158,11,0.25);
}
.dash-gps-live.error {
  color: var(--rose);
  background: linear-gradient(135deg, rgba(244,63,94,0.08) 0%, rgba(225,29,72,0.12) 100%);
  border-color: rgba(244,63,94,0.25);
}

.gps-dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  animation: pulseDot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* Global Search — premium */
.dash-top-search {
  flex: 1;
  max-width: 440px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 8px 18px;
  gap: 10px;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  color: var(--text-tertiary);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.dash-top-search:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,142,247,0.12), inset 0 1px 3px rgba(0,0,0,0.02);
  color: var(--primary);
  transform: scaleX(1.01);
}

.dash-top-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
  color: var(--text-primary);
}

.dash-top-search input::placeholder { color: var(--text-tertiary); }

.dash-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Weather widget — premium */
.dash-weather-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 5px 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 999px;
  transition: all 0.22s ease;
  cursor: default;
}
.dash-weather-widget:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,0.2);
  border-color: rgba(245,158,11,0.45);
}

.weather-temp { font-weight: 800; color: #d97706; font-size: 0.8rem; }
.weather-desc { color: var(--text-tertiary); font-size: 0.68rem; font-weight: 500; }

/* Language selector — premium */
.dash-lang-dropdown { position: relative; }

.dash-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  letter-spacing: -0.01em;
}
.dash-lang-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.dash-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  min-width: 160px;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: 210;
  overflow: hidden;
}

.dash-lang-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-opt {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.lang-opt:last-child { border-bottom: none; }
.lang-opt:hover { background: var(--surface-2); color: var(--text-primary); }
.lang-opt.active { color: var(--primary); background: var(--primary-light); }

/* Notification button — premium */
.dash-nav-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.dash-nav-icon-btn:hover {
  background: #eff6ff;
  border-color: rgba(79,142,247,0.5);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79,142,247,0.2);
}

.dash-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: white;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 999px;
  border: 2px solid white;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(244,63,94,0.4);
  animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* User profile button — premium */
.dash-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.dash-user-profile:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  border-color: rgba(79,142,247,0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,142,247,0.15);
}

.dash-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(79,142,247,0.3);
  transition: box-shadow 0.22s ease;
}
.dash-user-profile:hover .dash-user-avatar {
  box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(79,142,247,0.55);
}

.dash-user-info { display: flex; flex-direction: column; }

.dash-user-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dash-user-id {
  font-size: 0.62rem;
  color: var(--amber);
  font-weight: 700;
  line-height: 1.2;
}

/* ── LAYOUT CONTAINER ─────────────────────────────────────────── */
.dash-container {
  display: flex;
  flex: 1;
  max-width: 100vw;
  position: relative;
}

/* ── LEFT SIDEBAR ─────────────────────────────────────────────── */
.dash-sidebar-nav {
  width: var(--sidebar-width);
  background: var(--grad-sidebar);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: var(--top-nav-height);
  height: calc(100vh - var(--top-nav-height));
  padding: 16px 10px;
  flex-shrink: 0;
  z-index: 90;
  overflow-y: auto;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: left;
  transition: all var(--transition-fast);
  position: relative;
  letter-spacing: 0.01em;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: var(--grad-primary);
  border-radius: 0 3px 3px 0;
  transition: transform var(--transition-spring);
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.sidebar-item:hover::before { transform: translateY(-50%) scaleY(0.6); }

.sidebar-item.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}

.sidebar-item.active::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar-item.text-danger-hover:hover {
  color: var(--rose-light);
  background: rgba(244,63,94,0.15);
  border: 1px solid rgba(244,63,94,0.15);
}

.item-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 12px 0;
}

.sidebar-footer {
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-tertiary);
  font-size: 0.68rem;
  text-align: center;
}

.sidebar-footer p {
  margin-top: 4px;
  color: var(--text-tertiary);
}

/* ── MAIN CONTENT ─────────────────────────────────────────────── */
.dash-main-content {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
  min-width: 0;
}

/* ── ALERT BANNER ─────────────────────────────────────────────── */
.dash-active-alerts { margin-bottom: 20px; }

.alert-banner {
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 500;
  animation: slideDown 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-md);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-danger {
  background: var(--rose-light);
  border: 1px solid rgba(239,68,68,0.25);
  color: #991B1B;
}

.alert-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-emoji { font-size: 1.2rem; }

.alert-banner-close {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
  color: #991B1B;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.alert-banner-close:hover { background: rgba(239,68,68,0.2); color: #7F1D1D; }

/* ── VIEW CONTAINER CONTROLS ──────────────────────────────────── */
.dash-view-tab {
  animation: viewFadeIn 0.3s cubic-bezier(0.4,0,0.2,1);
}

.dash-view-tab[hidden] { display: none !important; }

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}

.view-header h1 {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── DASHBOARD STATS GRID ─────────────────────────────────────── */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.stat-card:hover::after { opacity: 1; }

.clickable-stat { cursor: pointer; }

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.stat-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  font-family: var(--font-alt);
}

.lbl-pts {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-trend {
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up      { color: var(--emerald); }
.trend-down    { color: var(--rose); }
.trend-neutral { color: var(--text-tertiary); }

/* ── GRID LAYOUTS ─────────────────────────────────────────────── */
.grid-2-column {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.grid-main-widgets { display: flex; flex-direction: column; gap: 20px; }
.grid-side-widgets  { display: flex; flex-direction: column; gap: 16px; }

/* ── DASHBOARD SECTIONS ───────────────────────────────────────── */
.dashboard-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
}

.dashboard-section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header-flex.compact { margin-bottom: 10px; }

.btn-text-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  transition: all var(--transition-fast);
}

.btn-text-link:hover { opacity: 0.8; text-decoration: underline; }

/* ── FEED CARDS ───────────────────────────────────────────────── */
.feed-list { display: flex; flex-direction: column; gap: 10px; }

.feed-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px 16px;
  background: var(--surface-2);
  border-left-width: 3px;
  transition: all var(--transition-fast);
  position: relative;
}

.feed-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
  background: var(--surface-3);
  transform: translateX(2px);
}

.feed-card.priority-high   { border-left-color: var(--rose); }
.feed-card.priority-medium { border-left-color: var(--amber); }
.feed-card.priority-low    { border-left-color: var(--emerald); }

.feed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.feed-tag {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: white;
}

.tag-water     { background: var(--cyan); }
.tag-traffic   { background: var(--amber); }
.tag-roads     { background: var(--violet); }
.tag-garbage   { background: var(--emerald); }

.feed-time {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.feed-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.feed-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.bullet { color: var(--border); }

/* ── MINI MAP PREVIEW CARD (Dashboard Overview) ──────────────── */
.mini-map-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
}

.mini-map-preview-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.mini-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.mini-map-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
}

.mini-map-live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-light);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

#miniMapContainer {
  height: 200px;
  width: 100%;
  background: var(--surface-2);
  position: relative;
}

.mini-map-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-map-status {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* ── ACTIVE COMPLAINT TRACKER ─────────────────────────────────── */
.dashboard-complaint-summary {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
}

.comp-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.comp-id-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.comp-summary-title {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.01em;
}

.comp-summary-dept {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Timeline */
.comp-summary-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  padding: 0 4px;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 5;
}

.timeline-step .step-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  transition: all var(--transition-base);
}

.timeline-step.completed .step-icon {
  background: var(--emerald);
  border-color: var(--emerald);
  color: white;
  box-shadow: 0 0 8px var(--emerald-glow);
}

.timeline-step.active .step-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-glow-blue);
  animation: stepPulse 2s infinite;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--primary-light); }
  50%       { box-shadow: 0 0 0 7px rgba(79,142,247,0.08); }
}

.step-title {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
  max-width: 55px;
  letter-spacing: 0.01em;
}

.timeline-step.completed .step-title { color: var(--emerald); }
.timeline-step.active .step-title { color: var(--primary); }

.timeline-line {
  flex: 1;
  height: 2px;
  background: var(--border-strong);
  transform: translateY(-13px);
  border-radius: 2px;
}

.timeline-line.completed { background: var(--emerald); }
.timeline-line.in-progress {
  background: linear-gradient(90deg, var(--emerald), var(--primary));
}

/* Complaint footer */
.comp-summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border);
  margin-top: 4px;
}

.officer-detail { display: flex; align-items: center; gap: 10px; }

.officer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  font-weight: 700;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(79,142,247,0.3);
}

.officer-name { font-size: 0.82rem; font-weight: 700; }
.officer-role { font-size: 0.68rem; color: var(--text-tertiary); }

.comp-eta { display: flex; flex-direction: column; text-align: right; }

.eta-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eta-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
}

/* ── QUICK ACTIONS GRID ───────────────────────────────────────── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-spring);
  cursor: pointer;
}

.action-tile:hover {
  background: var(--primary-light);
  border-color: rgba(79,142,247,0.25);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-blue);
}

.tile-icon { font-size: 1.6rem; }
.tile-name { font-size: 0.72rem; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.02em; }

.action-tile:hover .tile-name { color: var(--primary); }

/* ── BUDGET CARD ──────────────────────────────────────────────── */
.budget-chart-teaser { display: flex; flex-direction: column; gap: 12px; }

.budget-main-stat { }
.budget-stat-label { font-size: 0.7rem; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.budget-stat-value { font-size: 1.4rem; font-weight: 900; color: var(--text-primary); letter-spacing: -0.03em; font-family: var(--font-alt); }

.budget-progress-container { }

.budget-legend { display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-secondary); }

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.color-dot.spent   { background: var(--primary); box-shadow: 0 0 4px var(--primary-glow); }
.color-dot.pending { background: var(--surface-3); border: 1px solid var(--border-strong); }

/* ── RIGHT UTILITY PANEL ──────────────────────────────────────── */
.dash-right-utility {
  width: var(--right-panel-width);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 14px;
  position: sticky;
  top: var(--top-nav-height);
  height: calc(100vh - var(--top-nav-height));
  overflow-y: auto;
  flex-shrink: 0;
}

/* ── COMPLAINTS VIEW ──────────────────────────────────────────── */
.complaints-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* ── COMPLAINTS ACCORDION VIEW ──────────────────────────────────────────── */
.complaints-single-col { display: flex; flex-direction: column; gap: 0; }

.complaint-acc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.complaint-acc-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.comp-acc-header {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.comp-acc-header:hover {
  background: var(--surface-2);
}

.comp-acc-chevron {
  color: var(--text-tertiary);
  transition: transform var(--transition-fast);
  margin-top: 4px;
}

.complaint-acc-card.expanded .comp-acc-chevron {
  transform: rotate(180deg);
}

.comp-acc-body {
  padding: 0 20px 20px 20px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  padding-top: 24px;
}

.complaint-acc-card.expanded .comp-acc-body {
  display: grid;
}

/* Header Text Styles */
.comp-list-top { display: flex; gap: 12px; align-items: center; }
.comp-id-pill { font-size: 0.65rem; font-weight: 700; color: var(--text-tertiary); font-family: var(--font-mono); letter-spacing: 0.03em; }
.comp-list-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.comp-list-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }

/* Minimal Timeline */
.minimal-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.comp-timeline-minimal {
  padding-right: 24px;
  border-right: 1px dashed var(--border);
}

.comp-detailed-timeline.minimal { display: flex; flex-direction: column; }

.comp-detailed-timeline.minimal .dt-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 24px;
}

.comp-detailed-timeline.minimal .dt-step:last-child { padding-bottom: 0; }

.comp-detailed-timeline.minimal .dt-step::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}

.comp-detailed-timeline.minimal .dt-step:last-child::before { display: none; }
.comp-detailed-timeline.minimal .dt-step.completed::before { background: var(--emerald); }

.comp-detailed-timeline.minimal .dt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  flex-shrink: 0;
  z-index: 1;
  font-size: 0;
  margin-top: 4px;
}

.comp-detailed-timeline.minimal .dt-step.completed .dt-dot {
  background: var(--emerald);
  border-color: var(--emerald);
}

.comp-detailed-timeline.minimal .dt-step.active .dt-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.comp-detailed-timeline.minimal .dt-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 2px; }
.comp-detailed-timeline.minimal .dt-desc { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }

/* Minimal Chat */
.officer-detail-minimal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-mini-history.minimal {
  margin-bottom: 16px;
}

.chat-bubble.ai.minimal {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--text-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
}

.chat-mini-input.minimal {
  display: flex;
  gap: 8px;
}

.chat-mini-input.minimal input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 0.85rem;
  outline: none;
}

.chat-mini-input.minimal input:focus {
  border-color: var(--primary);
}

/* ── LIVE MAP VIEW ────────────────────────────────────────────── */
.map-full-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: 580px;
}

.map-sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.map-search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
}

.filter-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.map-search-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.map-helper-text {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 6px;
  line-height: 1.4;
}

.filter-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
}

.filter-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.choice-item:hover { color: var(--text-primary); }

.choice-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.map-sidebar-info-box,
.map-event-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
}

.box-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.legend-list { display: flex; flex-direction: column; gap: 7px; }

.leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.map-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-indicator-dot.red    { background: var(--rose);   box-shadow: 0 0 4px var(--rose-glow); }
.map-indicator-dot.yellow { background: var(--amber);  box-shadow: 0 0 4px var(--amber-glow); }
.map-indicator-dot.green  { background: var(--emerald); box-shadow: 0 0 4px var(--emerald-glow); }
.map-indicator-dot.blue   { background: var(--primary); box-shadow: 0 0 4px var(--primary-glow); }

.map-event-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }

.map-event-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.map-event-item:hover { border-color: var(--primary); background: var(--primary-light); }
.map-event-item.selected { border-color: var(--primary); background: var(--primary-light); }

.map-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.map-event-text { flex: 1; }
.map-event-title { font-size: 0.78rem; font-weight: 700; margin-bottom: 2px; }
.map-event-sub   { font-size: 0.68rem; color: var(--text-tertiary); }

/* Map Canvas — now Leaflet */
.map-canvas-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

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

/* Leaflet map styles */
.leaflet-container {
  font-family: var(--font-sans) !important;
  background: #e5e3df !important;
}

.leaflet-control-zoom {
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 1rem !important;
  transition: all var(--transition-fast) !important;
}

.leaflet-control-zoom a:hover { background: var(--surface-3) !important; color: var(--primary) !important; }
.leaflet-control-zoom-in  { border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important; }
.leaflet-control-zoom-out { border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important; border-bottom: none !important; }

.leaflet-popup-content-wrapper {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  color: var(--text-primary) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: var(--font-sans) !important;
  color: var(--text-primary) !important;
}

.leaflet-popup-tip { background: var(--surface) !important; }
.leaflet-popup-close-button { color: var(--text-secondary) !important; top: 8px !important; right: 10px !important; }
.leaflet-popup-close-button:hover { color: var(--rose) !important; }

/* Custom Leaflet popup content */
.map-popup-inner {
  padding: 14px 16px;
  min-width: 200px;
}

.map-popup-tag {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  display: inline-block;
}

.map-popup-tag.danger  { background: var(--rose-light);   color: var(--rose); }
.map-popup-tag.warning { background: var(--amber-light);  color: var(--amber); }
.map-popup-tag.success { background: var(--emerald-light); color: var(--emerald); }
.map-popup-tag.info    { background: var(--primary-light); color: var(--primary); }

.map-popup-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.map-popup-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.map-popup-coords {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.map-popup-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* Map Live Chip */
.map-live-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.03em;
  pointer-events: none;
}

/* Map user location (for legacy canvas, now via Leaflet) */
.map-user-location {
  position: absolute;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-user-location span {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
  display: block;
  animation: userPulse 2.5s infinite;
}

@keyframes userPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(59,130,246,0.2); }
  50%       { box-shadow: 0 0 0 8px rgba(59,130,246,0.05); }
}

/* Map zoom controls (now Leaflet handles) */
.map-zoom-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.zoom-btn:hover { background: var(--surface-3); color: var(--primary); border-color: var(--primary); }

/* Map detail popup */
.map-detail-popup {
  position: absolute;
  z-index: 900;
  top: 12px;
  right: 12px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUp 0.3s var(--transition-spring);
}

.map-detail-popup[hidden] { display: none; }

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.popup-title { font-size: 0.88rem; font-weight: 700; }

.popup-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close-btn:hover { background: var(--rose-light); color: var(--rose); border-color: var(--rose); }

.popup-body { padding: 12px 14px; }
.popup-dept, .popup-status, .popup-address, .popup-coords {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.4;
}
.popup-coords { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-tertiary); }
.popup-footer { padding: 10px 14px; border-top: 1px solid var(--border); }

/* Map pins (legacy – also used for Leaflet icons) */
.map-canvas-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 600;
}

.pin-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  transition: transform var(--transition-fast);
}

.map-canvas-pin:hover .pin-marker { transform: scale(1.5); }

.danger-bg  { background: var(--rose);    box-shadow: 0 0 8px var(--rose-glow); }
.warning-bg { background: var(--amber);   box-shadow: 0 0 8px var(--amber-glow); }
.success-bg { background: var(--emerald); box-shadow: 0 0 8px var(--emerald-glow); }
.primary-bg { background: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }

.pin-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  animation: pinPulse 2s infinite;
}

.danger-pulse  { border: 2px solid rgba(244,63,94,0.5); }
.warning-pulse { border: 2px solid rgba(245,158,11,0.5); }

@keyframes pinPulse {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── CUSTOM MAP MARKER STYLES (Leaflet divIcon) ──────────────── */
.custom-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

.custom-map-marker.danger  { background: var(--rose);    box-shadow: 0 0 12px var(--rose-glow); }
.custom-map-marker.warning { background: var(--amber);   box-shadow: 0 0 12px var(--amber-glow); }
.custom-map-marker.success { background: var(--emerald); box-shadow: 0 0 12px var(--emerald-glow); }
.custom-map-marker.info    { background: var(--primary); box-shadow: 0 0 12px var(--primary-glow); }
.custom-map-marker.user-loc { background: var(--primary); transform: rotate(0); border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 4px rgba(59,130,246,0.2), var(--shadow-sm); }

.marker-icon-inner {
  transform: rotate(45deg);
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
}

/* ── MAP STATUS ──────────────────────────────────────────────── */
.map-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.map-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  text-align: center;
  transition: all var(--transition-fast);
}

.map-status-card:hover { border-color: var(--border-strong); }

.map-status-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.map-status-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: var(--font-alt);
}

.map-status-value.success { color: var(--emerald); }

/* ── PROFILE VIEW ────────────────────────────────────────────── */
.profile-volunteer-toggle { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.profile-score-badge { font-size: 0.78rem; color: var(--amber); font-weight: 600; }
.profile-details-table { display: flex; flex-direction: column; gap: 0; }
.detail-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.detail-row span { color: var(--text-tertiary); }
.detail-row strong { color: var(--text-primary); }

/* ── FUND TRANSPARENCY VIEW ──────────────────────────────────── */
/* (uses stat-card + bar-chart from styles.css) */

/* ── TOAST (enhanced) ─────────────────────────────────────────── */
.toast-notification-area {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1400px) {
  .dash-right-utility { display: none; }
}

@media (max-width: 1200px) {
  .grid-2-column { grid-template-columns: 1fr; }
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .dash-sidebar-nav { display: none; }
  .dash-main-content { padding: 16px; }
  .map-full-container { grid-template-columns: 1fr; height: auto; }
  .map-sidebar-filters { flex-direction: row; flex-wrap: wrap; height: auto; overflow: visible; }
  .map-canvas-wrapper { height: 400px; }
  .complaints-dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --top-nav-height: 56px; }
  .dash-top-search { display: none; }
  .dash-weather-widget { display: none; }
  .dash-loc-context { display: none; }
  .dash-gps-live { display: none; }
  .dash-user-info { display: none; }
  .dash-main-content { padding: 12px 12px 80px; }
  .view-header { flex-direction: column; align-items: flex-start; }
  .map-status-grid { grid-template-columns: repeat(2, 1fr); }
  .complaints-dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2-column { grid-template-columns: 1fr; }
}


/* ============================================================
   NEW STREET — REDESIGNED DASHBOARD v2 COMPONENTS
   ============================================================ */

/* ── 5-COLUMN STATS GRID ──────────────────────────────────── */
.dash-stats-5-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat5-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat5-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card-glow);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.stat5-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); border-color: var(--primary-light); }
.stat5-card:hover::before { opacity: 1; }
.clickable-stat.stat5-card { cursor: pointer; }

.stat5-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.stat5-body { flex: 1; min-width: 0; }

.stat5-val {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0F172A;
  line-height: 1;
  letter-spacing: -0.04em;
  font-family: var(--font-alt);
  margin-bottom: 4px;
}

.stat5-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat5-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat5-sub {
  font-size: 0.63rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.stat5-sub-up { color: var(--emerald); }

/* ── FEED TABS ─────────────────────────────────────────────── */
.feed-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 5px 5px 5px 8px;
  box-shadow: var(--shadow-xs);
}

.feed-tabs-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}

.feed-tabs-nav::-webkit-scrollbar { display: none; }

.feed-tab {
  padding: 6px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.feed-tab:hover { background: var(--surface-2); color: var(--text-primary); }

.feed-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(59,130,246,0.28);
}

.feed-filter-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.feed-filter-icon-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── FEED CARDS V2 ─────────────────────────────────────────── */
.feed-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-v2-card {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.feed-v2-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Vote column */
.feed-v2-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 16px 10px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  min-width: 52px;
  flex-shrink: 0;
}

.feed-v2-vote-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.feed-v2-vote-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.feed-v2-vote-count {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-secondary);
  font-family: var(--font-alt);
  letter-spacing: -0.02em;
}

/* Content column */
.feed-v2-content {
  flex: 1;
  padding: 14px 16px;
  min-width: 0;
}

.feed-v2-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.feed-chip {
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.feed-chip-roads      { background: #EDE9FE; color: #6D28D9; }
.feed-chip-water      { background: #ECFEFF; color: #0E7490; }
.feed-chip-electricity { background: #FFFBEB; color: #B45309; }
.feed-chip-traffic    { background: #FFF7ED; color: #C2410C; }
.feed-chip-garbage    { background: #ECFDF5; color: #065F46; }
.feed-chip-urgent     { background: #FEF2F2; color: #DC2626; border: 1px solid rgba(220,38,38,0.18); }
.feed-chip-medium     { background: #FFFBEB; color: #D97706; border: 1px solid rgba(217,119,6,0.18); }

.feed-v2-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.42;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.feed-v2-desc {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
}

.feed-v2-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.feed-v2-sep { opacity: 0.35; }

/* Image column */
.feed-v2-img {
  width: 128px;
  flex-shrink: 0;
  padding: 10px;
}

.feed-img-thumb {
  width: 100%;
  height: 100%;
  min-height: 90px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.feed-img-roads      { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); border: 1px solid rgba(109,40,217,0.12); }
.feed-img-electricity { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); border: 1px solid rgba(245,158,11,0.18); }
.feed-img-water      { background: linear-gradient(135deg, #ECFEFF, #CFFAFE); border: 1px solid rgba(6,182,212,0.18); }

.feed-img-emoji { font-size: 1.8rem; }

.feed-img-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.85);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

/* Official response box */
.official-resp-box {
  background: #F0FDF4;
  border: 1px solid rgba(16,185,129,0.18);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius-lg);
  padding: 10px 13px;
  margin-bottom: 10px;
}

.official-resp-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.official-resp-icon { font-size: 0.85rem; }

.official-resp-from {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.official-resp-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.official-resp-ack {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--emerald-light);
  color: var(--emerald);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16,185,129,0.2);
}

.official-resp-text {
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 3px;
}

.official-resp-time {
  font-size: 0.63rem;
  color: var(--text-tertiary);
}

/* Feed action bar */
.feed-v2-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.feed-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.feed-act-btn:hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-primary);
}

.feed-act-report:hover {
  background: var(--rose-light);
  border-color: rgba(239,68,68,0.15);
  color: var(--rose);
}

.feed-act-follow {
  margin-left: auto;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--primary);
  color: white;
  border: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(59,130,246,0.22);
  white-space: nowrap;
}

.feed-act-follow:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.28);
}

/* Load more */
.feed-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

/* ── RIGHT PANEL CARDS ─────────────────────────────────────── */
.rp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
}

.rp-card:hover { border-color: var(--border-strong); }

.rp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rp-card-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ── ACTIVE ALERTS ─────────────────────────────────────────── */
.active-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: filter var(--transition-fast);
  cursor: pointer;
  gap: 8px;
}

.alert-pill:hover { filter: brightness(0.97); }

.alert-pill-danger  { background: #FFF5F5; border-color: rgba(239,68,68,0.18); }
.alert-pill-warning { background: #FFFBEB; border-color: rgba(245,158,11,0.18); }
.alert-pill-info    { background: #EFF6FF; border-color: rgba(59,130,246,0.18); }

.alert-pill-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.alert-pill-icon { font-size: 1rem; flex-shrink: 0; }

.alert-pill-info { flex: 1; min-width: 0; }

.alert-pill-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-pill-sub {
  font-size: 0.62rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.alert-pill-chevron {
  color: var(--text-tertiary);
  padding: 3px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.alert-pill-chevron:hover { background: rgba(0,0,0,0.06); color: var(--text-primary); }

/* ── QUICK ACTIONS 4x2 GRID ────────────────────────────────── */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.qa-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 4px 8px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: all var(--transition-spring);
  cursor: pointer;
}

.qa-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  border-color: var(--border-strong);
}

.qa-tile-icon {
  width: 33px;
  height: 33px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.qa-tile-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}

.qa-tile:hover .qa-tile-lbl { color: var(--text-primary); }

/* ── FUND DASHBOARD ─────────────────────────────────────────── */
.fund-3-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.fund-3-stat {
  text-align: center;
  padding: 7px 4px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.fund-3-lbl {
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.fund-3-val {
  font-size: 0.78rem;
  font-weight: 900;
  font-family: var(--font-alt);
  letter-spacing: -0.02em;
}

.fund-usage-title {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.fund-chart-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fund-donut-svg { flex-shrink: 0; }

.fund-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fund-leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.63rem;
}

.fund-leg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fund-leg-name { color: var(--text-secondary); font-weight: 600; flex: 1; }
.fund-leg-pct  { font-weight: 700; color: var(--text-primary); min-width: 26px; }
.fund-leg-amt  { color: var(--text-tertiary); font-size: 0.58rem; font-family: var(--font-mono); }

/* ── COMMUNITY VOICE POLL ─────────────────────────────────── */
.rp-poll-question {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.rp-poll-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rp-poll-opt { cursor: pointer; }

.rp-poll-opt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.rp-poll-opt-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.rp-poll-opt-pct {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-tertiary);
}

.rp-poll-bar-track {
  height: 5px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 2px;
}

.rp-poll-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.rp-poll-votes {
  font-size: 0.6rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.rp-poll-footer {
  font-size: 0.63rem;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* ── RESPONSIVE OVERRIDES ───────────────────────────────────── */
@media (max-width: 1500px) {
  .dash-stats-5-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
  .dash-stats-5-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .dash-stats-5-grid { grid-template-columns: repeat(2, 1fr); }
  .feed-v2-img { display: none; }
  .feed-tabs-wrap { padding: 4px; }
}


/* ============================================================
   EXACT UI MATCH STYLES FOR REDESIGNED DASHBOARD
   ============================================================ */

/* 5-Stats Cards: Icon on RIGHT, Clean SVG Box */
.dash-stats-5-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat5-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.stat5-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: #CBD5E1;
}

.stat5-body {
  display: flex;
  flex-direction: column;
}

.stat5-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 4px;
}

.stat5-val {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.1;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.stat5-unit {
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 600;
}

.stat5-sub {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94A3B8;
  margin-top: 3px;
}

.stat5-sub-up {
  color: #10B981;
}

.stat5-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Feed Item V2 Image layout */
.feed-v2-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.feed-v2-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.feed-v2-vote-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.feed-v2-vote-btn:hover {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #2563EB;
}

.feed-v2-vote-count {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0F172A;
  font-family: 'Outfit', sans-serif;
}

.feed-v2-body-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.feed-v2-header-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.feed-v2-content {
  flex: 1;
  min-width: 0;
}

.feed-v2-img-container {
  width: 140px;
  height: 100px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.feed-v2-img-src {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-img-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #FFFFFF;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.feed-v2-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.feed-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: capitalize;
}

.feed-chip-roads { background: #ECFDF5; color: #047857; }
.feed-chip-urgent { background: #FEF2F2; color: #DC2626; }
.feed-chip-electricity { background: #EFF6FF; color: #1D4ED8; }
.feed-chip-medium { background: #FFFBEB; color: #D97706; }

.feed-v2-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 6px;
}

.feed-v2-desc {
  font-size: 0.78rem;
  color: #64748B;
  line-height: 1.5;
}

.feed-v2-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #64748B;
  margin-bottom: 12px;
}

.feed-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #DC2626;
  font-weight: 600;
}

/* Quick Actions 4x2 Circles */
.qa-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.qa-tile-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.qa-circle-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.qa-tile-v2:hover .qa-circle-icon {
  transform: scale(1.08);
}

.qa-icon-blue   { background: #2563EB; color: #FFFFFF; }
.qa-icon-green  { background: #DCFCE7; color: #16A34A; }
.qa-icon-purple { background: #F3E8FF; color: #9333EA; }
.qa-icon-cyan   { background: #E0F2FE; color: #0284C7; }
.qa-icon-amber  { background: #FEF3C7; color: #D97706; }
.qa-icon-red    { background: #FEE2E2; color: #DC2626; }

.qa-lbl-v2 {
  font-size: 0.62rem;
  font-weight: 700;
  color: #475569;
  text-align: center;
  line-height: 1.2;
}

/* Alert Circles */
.alert-pill-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-circle-red   { background: #FEE2E2; color: #DC2626; }
.alert-circle-amber { background: #FEF3C7; color: #D97706; }
.alert-circle-blue  { background: #DBEAFE; color: #2563EB; }

/* Fund Colored Background Cards */
.fund-bg-blue   { background: #EFF6FF; border: 1px solid #DBEAFE; color: #1D4ED8; }
.fund-bg-green  { background: #ECFDF5; border: 1px solid #D1FAE5; color: #047857; }
.fund-bg-orange { background: #FFFBEB; border: 1px solid #FEF3C7; color: #B45309; }

.fund-3-stat {
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
}

.fund-3-lbl {
  font-size: 0.58rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.fund-3-val {
  font-size: 0.85rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
}

/* Follow Update Solid Blue Pill Button */
.feed-act-follow {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #2563EB;
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feed-act-follow:hover {
  background: #1D4ED8;
}


/* ============================================================
   COMMUNITY HUB EXACT SCREENSHOT MATCHING CSS
   ============================================================ */

.ch-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.ch-stat-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.ch-stat-info { display: flex; flex-direction: column; }
.ch-stat-lbl  { font-size: 0.72rem; font-weight: 700; color: #64748B; margin-bottom: 3px; }
.ch-stat-val  { font-size: 1.6rem; font-weight: 900; color: #0F172A; font-family: 'Outfit', sans-serif; line-height: 1.1; }
.ch-stat-sub  { font-size: 0.65rem; font-weight: 700; margin-top: 3px; }

.ch-stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Category Sub-Nav Bar */
.ch-subnav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 4px 6px 4px 8px;
  margin-bottom: 16px;
}

.ch-subnav-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ch-subnav-tabs::-webkit-scrollbar { display: none; }

.ch-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.ch-tab:hover { background: #F8FAFC; color: #0F172A; }

.ch-tab.active {
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 700;
}

.ch-filter-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 2-Column Body Grid */
.ch-body-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

.ch-discussions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.ch-disc-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: transform 0.15s, border-color 0.15s;
}

.ch-disc-card:hover {
  transform: translateY(-1px);
  border-color: #CBD5E1;
}

.ch-disc-img-wrap {
  width: 150px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.ch-disc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ch-disc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ch-disc-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.ch-chip {
  font-size: 0.63rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.ch-chip-roads { background: #FEF3C7; color: #B45309; }
.ch-chip-urgent { background: #FEF2F2; color: #DC2626; }
.ch-chip-garbage { background: #DCFCE7; color: #16A34A; }
.ch-chip-electricity { background: #FEF3C7; color: #D97706; }
.ch-chip-water { background: #E0F2FE; color: #0284C7; }

.ch-disc-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 4px;
}

.ch-disc-excerpt {
  font-size: 0.76rem;
  color: #64748B;
  line-height: 1.45;
  margin-bottom: 8px;
}

.ch-disc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: #64748B;
  margin-bottom: 10px;
}

.ch-meta-loc {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #DC2626;
  font-weight: 600;
}

.ch-disc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.ch-disc-stats {
  display: flex;
  gap: 12px;
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 600;
}

.ch-disc-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ch-btn-follow {
  padding: 5px 12px;
  border-radius: 16px;
  background: #2563EB;
  color: white;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* Load More */
.ch-load-more {
  text-align: center;
  margin-bottom: 20px;
}

/* Explore Categories Grid */
.ch-cat-section {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
}

.ch-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 12px;
}

.ch-cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.ch-cat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform 0.15s;
}

.ch-cat-card:hover { transform: translateY(-1px); background: #FFFFFF; }

.ch-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ch-cat-name { font-size: 0.72rem; font-weight: 800; color: #0F172A; line-height: 1.1; }
.ch-cat-sub  { font-size: 0.58rem; color: #64748B; }

/* Right Column Panels */
.ch-citizens-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ch-citizen-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.ch-cit-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2563EB;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ch-cit-info { flex: 1; min-width: 0; }
.ch-cit-name { font-size: 0.74rem; font-weight: 800; color: #0F172A; display: flex; align-items: center; gap: 4px; }
.ch-verified-badge { font-size: 0.55rem; background: #DCFCE7; color: #16A34A; padding: 1px 5px; border-radius: 8px; font-weight: 700; }
.ch-cit-sub { font-size: 0.62rem; color: #64748B; }

.ch-btn-msg {
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #2563EB;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.ch-btn-msg:hover { background: #EFF6FF; border-color: #2563EB; }

.ch-bottom-2cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}


/* ============================================================
   NEW STREET — EXHAUSTIVE RESPONSIVE DESIGN SYSTEM FOR ALL VIEWS
   ============================================================ */

/* ── 1. ULTRA LARGE DESKTOPS (> 1500px) ─────────────────────── */
@media (min-width: 1501px) {
  .dash-main-container {
    max-width: 1700px;
    margin: 0 auto;
  }
}

/* ── 2. DESKTOPS & LAPTOPS (1200px - 1500px) ────────────────── */
@media (max-width: 1500px) {
  .dash-stats-5-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .ch-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .ch-body-grid {
    grid-template-columns: 1fr 320px;
  }
}

/* ── 3. SMALL DESKTOPS & TABLETS LANDSCAPE (992px - 1199px) ── */
@media (max-width: 1199px) {
  .dash-layout-wrapper {
    grid-template-columns: 220px 1fr;
  }
  
  /* Right panel stacks below main content on smaller desktops */
  .dash-main-content-split {
    grid-template-columns: 1fr;
  }
  
  .dash-right-utility {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .ch-body-grid {
    grid-template-columns: 1fr;
  }

  .ch-right-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .ch-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── 4. TABLETS PORTRAIT (768px - 991px) ────────────────────── */
@media (max-width: 991px) {
  /* Sidebar collapses or becomes compact */
  .dash-sidebar-nav {
    width: 70px;
    padding: 12px 6px;
  }

  .sidebar-item {
    justify-content: center;
    padding: 10px;
    font-size: 0;
  }

  .sidebar-item svg {
    margin-right: 0;
    width: 22px;
    height: 22px;
  }

  .sidebar-badge, .sidebar-champion-card, .sidebar-footer {
    display: none !important;
  }

  .dash-stats-5-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ch-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qa-grid-v2 {
    grid-template-columns: repeat(4, 1fr);
  }

  .feed-v2-header-row {
    flex-direction: row;
  }

  .feed-v2-img-container {
    width: 110px;
    height: 85px;
  }
}

/* ── 5. MOBILE PHONES LANDSCAPE & PORTRAIT (< 767px) ────────── */
@media (max-width: 767px) {
  /* Top Nav Responsiveness */
  .dash-top-nav {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .dash-search-container {
    order: 3;
    width: 100%;
    margin-top: 4px;
  }

  .dash-weather-widget, .location-picker-btn span:last-child {
    display: none;
  }

  /* Hide Desktop Sidebar on Mobile, use mobile bottom bar */
  .dash-sidebar-nav {
    display: none;
  }

  .dash-container {
    flex-direction: column;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-tabbar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  }

  .mobile-tabbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: #64748B;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .mobile-tabbar-btn.active {
    color: #2563EB;
  }
  .mobile-tabbar-btn.danger {
    color: #EF4444;
  }
  .mobile-tabbar-btn span {
    font-size: 1.2rem;
  }

  .dash-view-tab {
    padding-bottom: 70px !important;
  }

  /* Grids collapse to 1 or 2 columns */
  .dash-stats-5-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat5-card {
    padding: 10px 12px;
  }

  .stat5-val {
    font-size: 1.3rem;
  }

  .ch-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .ch-stat-card {
    padding: 10px 12px;
  }

  .ch-stat-val {
    font-size: 1.3rem;
  }

  /* Right Panel on Mobile */
  .dash-right-utility, .ch-right-col {
    grid-template-columns: 1fr;
  }

  /* Feed Card Layout on Mobile */
  .feed-v2-card {
    flex-direction: column;
    padding: 12px;
  }

  .feed-v2-vote {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 0 8px 0;
    border-bottom: 1px solid #F1F5F9;
    width: 100%;
  }

  .feed-v2-header-row {
    flex-direction: column-reverse;
  }

  .feed-v2-img-container {
    width: 100%;
    height: 160px;
    margin-bottom: 10px;
  }

  /* Community Hub Discussion Cards on Mobile */
  .ch-disc-card {
    flex-direction: column;
    padding: 12px;
  }

  .ch-disc-img-wrap {
    width: 100%;
    height: 160px;
  }

  .ch-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ch-bottom-2cards {
    grid-template-columns: 1fr;
  }

  .qa-grid-v2 {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .qa-circle-icon {
    width: 38px;
    height: 38px;
  }

  .qa-lbl-v2 {
    font-size: 0.58rem;
  }

  .feed-v2-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .feed-act-follow {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* ── 6. EXTRA SMALL MOBILE PHONES (< 480px) ─────────────────── */
@media (max-width: 480px) {
  .dash-stats-5-grid, .ch-stats-grid {
    grid-template-columns: 1fr;
  }

  .qa-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .fund-3-stats {
    grid-template-columns: 1fr;
  }

  .fund-chart-area {
    flex-direction: column;
    align-items: center;
  }
}

/* Scrollbar Smoothness for Category Tabs Across Devices */
.feed-tabs-nav, .ch-subnav-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ============================================================
   MY COMPLAINTS REDESIGN
   ============================================================ */

.complaints-stats-6-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.stat6-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.stat6-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.stat6-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.stat6-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}
.stat6-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.stat6-desc {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.complaints-split-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
}

.complaints-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 0px;
}
.comp-filter-tabs {
  display: flex;
  gap: 24px;
}
.comp-ftab {
  background: none;
  border: none;
  padding: 12px 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.comp-ftab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}
.comp-sort-actions {
  display: flex;
  gap: 12px;
  padding-bottom: 8px;
}

.complaint-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cc-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 50px 1fr 180px 160px;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.cc-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.cc-card.status-inprogress { border-left-color: #10B981; }
.cc-card.status-pending { border-left-color: #C084FC; }
.cc-card.status-resolved { border-left-color: #10B981; }

.cc-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.cc-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.cc-meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-meta strong {
  color: var(--text-secondary);
}
.cc-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.cc-badge {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.cc-badge.inprogress { background: #ECFDF5; color: #10B981; }
.cc-badge.pending { background: #FFF7ED; color: #EA580C; }
.cc-badge.resolved { background: #ECFDF5; color: #10B981; }

.cc-officer-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px dashed #E2E8F0;
  padding-left: 16px;
}
.cc-officer-lbl {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 700;
}
.cc-officer-prof {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-off-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.cc-off-details {
  display: flex;
  flex-direction: column;
}
.cc-off-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cc-off-dept {
  font-size: 0.65rem;
  color: var(--text-tertiary);
}
.cc-eta-row {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
}
.cc-eta-lbl {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 700;
}
.cc-eta-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cc-actions-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.cc-btn-details {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.cc-btn-details:hover {
  background: #F8FAFC;
}
.cc-btn-chat {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-btn-chat:hover {
  background: #F8FAFC;
  color: var(--primary);
}

/* Sidebar Details */
.cs-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.cs-header-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.cs-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cs-id {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 600;
}
.cs-comp-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}
.cs-comp-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.cs-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* Horizontal Timeline */
.cs-timeline-hoz {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}
.cs-timeline-hoz::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #E2E8F0;
  z-index: 1;
}
.cs-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  flex: 1;
}
.cs-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  border: 2px solid #FFFFFF;
}
.cs-step.completed .cs-step-dot {
  background: #ECFDF5;
  color: #10B981;
}
.cs-step.active .cs-step-dot {
  background: #10B981;
  color: white;
}
.cs-step-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}
.cs-step-date {
  font-size: 0.6rem;
  color: var(--text-tertiary);
}

.cs-info-box {
  background: #ECFDF5;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.78rem;
  color: #065F46;
  margin-bottom: 16px;
  line-height: 1.4;
}
.cs-btn-full {
  width: 100%;
  background: #2563EB;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 24px;
}

.cs-help-box {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.cs-help-text h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.cs-help-text p {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}
.cs-btn-chat {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.cs-insights h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.cs-insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cs-insight-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-ins-lbl {
  font-size: 0.6rem;
  color: var(--text-tertiary);
}
.cs-ins-val {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.cs-ins-sub {
  font-size: 0.6rem;
  color: var(--text-tertiary);
}

/* RESPONSIVENESS for COMPLAINTS VIEW */
@media (max-width: 1500px) {
  .complaints-stats-6-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1199px) {
  .complaints-split-layout {
    grid-template-columns: 1fr;
  }
  .cc-card {
    grid-template-columns: 50px 1fr 180px;
  }
  .cc-actions-area {
    display: none;
  }
}
@media (max-width: 991px) {
  .complaints-stats-6-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .cc-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cc-icon-wrap {
    display: none;
  }
  .cc-officer-area {
    border-left: none;
    padding-left: 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: #F8FAFC;
    padding: 8px;
    border-radius: 8px;
  }
  .cs-insights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ============================================================
   LIVE MAP — FULL REDESIGN
   ============================================================ */

/* Header */
.lm-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.lm-view-toggle-group {
  display: flex;
  gap: 8px;
}
.lm-view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.lm-view-btn.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}
.lm-view-btn:not(.active):hover {
  background: #F8FAFC;
}

/* Chip filter bar */
.lm-chip-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lm-chip-bar::-webkit-scrollbar { display: none; }
.lm-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.lm-chip:hover { background: #F1F5F9; }
.lm-chip.active {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}
.lm-chip-count {
  background: rgba(0,0,0,0.08);
  color: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
}
.lm-chip.active .lm-chip-count { background: rgba(255,255,255,0.25); }

/* Main 2-col layout */
.lm-main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-bottom: 20px;
  min-height: 540px;
  align-items: start;
}

/* Map Wrapper */
.lm-map-wrapper {
  position: relative;
  height: 540px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  background: #E8ECF0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* Boundaries toggle overlay */
.lm-boundaries-overlay {
  position: absolute;
  bottom: 52px;
  left: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.lm-toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
.lm-toggle-switch input { display: none; }
.lm-toggle-thumb {
  position: absolute;
  inset: 0;
  background: #CBD5E1;
  border-radius: 10px;
  transition: 0.2s;
}
.lm-toggle-thumb::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: 0.2s;
}
.lm-toggle-switch input:checked + .lm-toggle-thumb { background: #2563EB; }
.lm-toggle-switch input:checked + .lm-toggle-thumb::after { left: 19px; }

/* Legend bar */
.lm-legend-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #E2E8F0;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  z-index: 999;
}
.lm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.lm-legend-dot.green  { background: #10B981; }
.lm-legend-dot.blue   { background: #3B82F6; }
.lm-legend-dot.orange { background: #F59E0B; }
.lm-legend-dot.red    { background: #EF4444; }
.lm-layers-btn {
  margin-left: auto;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}
.lm-layers-btn:hover { background: #E2E8F0; }

/* Right Sidebar */
.lm-right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 540px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E2E8F0 transparent;
}
.lm-sidebar-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
}
.lm-sidebar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.lm-sidebar-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}
.lm-link-btn {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Filter chips inside sidebar */
.lm-filter-section {
  margin-bottom: 16px;
}
.lm-filter-section:last-child { margin-bottom: 0; }
.lm-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.lm-filter-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.lm-filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  background: #F8FAFC;
  transition: 0.15s;
}
.lm-filter-chip input { width: 12px; height: 12px; accent-color: #2563EB; }
.lm-filter-chip.roads-chip    { border-color: #BFDBFE; background: #EFF6FF; color: #1D4ED8; }
.lm-filter-chip.water-chip    { border-color: #BAE6FD; background: #F0F9FF; color: #0369A1; }
.lm-filter-chip.elec-chip     { border-color: #FEF08A; background: #FEFCE8; color: #A16207; }
.lm-filter-chip.garb-chip     { border-color: #BBF7D0; background: #F0FDF4; color: #15803D; }
.lm-filter-chip.traf-chip     { border-color: #FED7AA; background: #FFF7ED; color: #C2410C; }
.lm-filter-chip.safe-chip     { border-color: #FECACA; background: #FEF2F2; color: #DC2626; }
.lm-filter-chip.proj-chip     { border-color: #E9D5FF; background: #FAF5FF; color: #7C3AED; }
.lm-filter-chip.other-chip    { border-color: #E2E8F0; background: #F8FAFC; color: #64748B; }

.lm-status-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lm-status-chk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.lm-status-chk input { accent-color: #2563EB; }
.lm-status-chk.pending  { color: #D97706; }
.lm-status-chk.inprog   { color: #2563EB; }
.lm-status-chk.resolved { color: #16A34A; }
.lm-status-chk.critical { color: #DC2626; }

.lm-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-primary);
  background: #FFFFFF;
  cursor: pointer;
}
.lm-range-slider {
  width: 100%;
  margin-top: 8px;
  accent-color: #2563EB;
}
.lm-dist-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

/* Alerts */
.lm-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lm-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #F1F5F9;
}
.lm-alert-item.critical { background: #FEF2F2; border-color: #FECACA; }
.lm-alert-item.warning  { background: #FFF7ED; border-color: #FED7AA; }
.lm-alert-item.info     { background: #EFF6FF; border-color: #BFDBFE; }
.lm-alert-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lm-alert-body { flex: 1; }
.lm-alert-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}
.lm-alert-sub {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.lm-alert-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
}

/* Projects */
.lm-projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lm-project-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lm-proj-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lm-proj-body { flex: 1; }
.lm-proj-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.lm-proj-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.lm-proj-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.lm-proj-badge.inprog   { background: #EFF6FF; color: #2563EB; }
.lm-proj-badge.approved { background: #F0FDF4; color: #16A34A; }
.lm-proj-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
}
.lm-proj-sub {
  font-size: 0.65rem;
  color: var(--text-tertiary);
}

/* Bottom Stats Bar */
.lm-stats-bar {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.lm-stats-bar-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.lm-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}
.lm-stat-item {
  flex: 1;
  min-width: 100px;
  padding: 0 16px;
}
.lm-stat-item:first-child { padding-left: 0; }
.lm-stat-divider {
  width: 1px;
  height: 48px;
  background: #E2E8F0;
  flex-shrink: 0;
}
.lm-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.lm-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 3px;
}
.lm-stat-delta {
  font-size: 0.68rem;
  font-weight: 600;
}
.lm-stat-delta.pos { color: #16A34A; }
.lm-stat-delta.neg { color: #DC2626; }

/* Responsive */
@media (max-width: 1199px) {
  .lm-main-layout {
    grid-template-columns: 1fr;
  }
  .lm-right-sidebar {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (max-width: 767px) {
  .lm-main-layout {
    min-height: auto;
  }
  .lm-map-wrapper {
    height: 350px;
  }
  .lm-right-sidebar {
    grid-template-columns: 1fr;
  }
  .lm-stats-row {
    flex-wrap: wrap;
    gap: 16px;
  }
  .lm-stat-divider { display: none; }
  .lm-stat-item {
    padding: 0;
    flex: 0 0 calc(50% - 8px);
  }
  .lm-view-toggle-group {
    flex-wrap: wrap;
  }
  .lm-filter-chip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   GOVERNMENT SERVICES
   ============================================================ */
.gs-header-row { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.gs-layout { display:grid; grid-template-columns:1fr 320px; gap:24px; align-items:start; }
.gs-main { min-width:0; }
.gs-sidebar { display:flex; flex-direction:column; gap:16px; }

.gs-search-wrap { position:relative; margin-bottom:20px; }
.gs-search-input { width:100%; padding:12px 16px 12px 44px; border:1px solid #E2E8F0; border-radius:10px; font-size:0.88rem; color:var(--text-primary); background:#FFFFFF; box-sizing:border-box; }
.gs-search-input:focus { outline:none; border-color:#2563EB; box-shadow:0 0 0 3px rgba(37,99,235,0.1); }

.gs-cat-tabs { display:flex; gap:4px; overflow-x:auto; flex-wrap:nowrap; margin-bottom:20px; scrollbar-width:none; padding-bottom:2px; }
.gs-cat-tabs::-webkit-scrollbar { display:none; }
.gs-cat-tab { display:flex; align-items:center; gap:5px; padding:7px 14px; background:#FFFFFF; border:1px solid #E2E8F0; border-radius:20px; font-size:0.78rem; font-weight:600; color:var(--text-secondary); cursor:pointer; white-space:nowrap; transition:all 0.15s; }
.gs-cat-tab:hover { background:#F1F5F9; }
.gs-cat-tab.active { background:#2563EB; color:#FFFFFF; border-color:#2563EB; }

.gs-section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.gs-section-title { font-size:1rem; font-weight:800; color:var(--text-primary); }
.gs-link-btn { background:none; border:none; color:#2563EB; font-size:0.78rem; font-weight:600; cursor:pointer; }

.gs-service-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; margin-bottom:24px; }
.gs-service-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; padding:16px; display:flex; flex-direction:column; gap:12px; box-shadow:0 1px 3px rgba(0,0,0,0.02); transition:box-shadow 0.2s; }
.gs-service-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.06); }
.gs-card-icon { width:52px; height:52px; border-radius:12px; display:flex; align-items:center; justify-content:center; margin-bottom:4px; }
.gs-card-title { font-size:0.9rem; font-weight:800; color:var(--text-primary); margin-bottom:4px; }
.gs-card-desc { font-size:0.72rem; color:var(--text-tertiary); line-height:1.4; }
.gs-card-actions { display:flex; gap:8px; align-items:center; margin-top:auto; }

.gs-btn-primary { padding:7px 14px; background:#16A34A; color:white; border:none; border-radius:7px; font-size:0.75rem; font-weight:700; cursor:pointer; transition:opacity 0.15s; }
.gs-btn-primary:hover { opacity:0.9; }
.gs-btn-primary.blue { background:#2563EB; }
.gs-btn-primary.purple { background:#7C3AED; }
.gs-btn-primary.cyan { background:#0891B2; }
.gs-btn-primary.yellow { background:#D97706; }
.gs-btn-primary.pink { background:#DB2777; }
.gs-btn-ghost { padding:7px 14px; background:#FFFFFF; color:var(--text-secondary); border:1px solid #E2E8F0; border-radius:7px; font-size:0.75rem; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:4px; }
.gs-btn-ghost:hover { background:#F8FAFC; }

.gs-banner { background:linear-gradient(135deg,#EFF6FF,#DBEAFE); border:1px solid #BFDBFE; border-radius:14px; padding:24px; display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:28px; }
.gs-banner-text h3 { font-size:1rem; font-weight:800; color:#1E40AF; margin-bottom:6px; }
.gs-banner-text p { font-size:0.78rem; color:#3B82F6; margin-bottom:14px; }
.gs-banner-btn { background:#2563EB; color:white; border:none; border-radius:8px; padding:9px 18px; font-weight:700; font-size:0.82rem; cursor:pointer; }
.gs-banner-art { flex-shrink:0; }

.gs-dept-grid { display:grid; grid-template-columns:repeat(6, 1fr); gap:12px; }
.gs-dept-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; padding:16px 10px; text-align:center; display:flex; flex-direction:column; gap:6px; align-items:center; cursor:pointer; transition:box-shadow 0.2s; }
.gs-dept-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.06); }
.gs-dept-icon { font-size:1.5rem; margin-bottom:2px; }
.gs-dept-name { font-size:0.78rem; font-weight:700; color:var(--text-primary); }
.gs-dept-count { font-size:0.68rem; color:var(--text-tertiary); }
.gs-dept-btn { background:none; border:none; color:#2563EB; font-size:0.7rem; font-weight:600; cursor:pointer; }

.gs-sidebar-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; padding:16px; }
.gs-sidebar-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.gs-sidebar-title { font-size:0.88rem; font-weight:800; color:var(--text-primary); }
.gs-sidebar-sub { font-size:0.75rem; color:var(--text-tertiary); margin-bottom:14px; }

.gs-app-list { display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.gs-app-item { display:flex; gap:10px; align-items:flex-start; padding-bottom:12px; border-bottom:1px solid #F1F5F9; }
.gs-app-item:last-child { border-bottom:none; padding-bottom:0; }
.gs-app-icon { width:34px; height:34px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.blue-bg { background:#DBEAFE; } .purple-bg { background:#EDE9FE; } .green-bg { background:#DCFCE7; } .cyan-bg { background:#CFFAFE; } .orange-bg { background:#FED7AA; } .yellow-bg { background:#FEF9C3; } .red-bg { background:#FEE2E2; }
.gs-app-body { flex:1; }
.gs-app-name { font-size:0.8rem; font-weight:700; color:var(--text-primary); margin-bottom:2px; }
.gs-app-sub { font-size:0.68rem; color:var(--text-tertiary); }
.gs-status-badge { font-size:0.62rem; font-weight:700; padding:3px 7px; border-radius:4px; }
.gs-status-badge.inprog { background:#DBEAFE; color:#1D4ED8; }
.gs-status-badge.paid { background:#DCFCE7; color:#16A34A; }
.gs-status-badge.approved { background:#DCFCE7; color:#15803D; }

.gs-view-all-btn { width:100%; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:8px; padding:9px; font-size:0.8rem; font-weight:600; color:var(--text-primary); cursor:pointer; }

.gs-tracker-steps { display:flex; flex-direction:column; gap:0; margin-bottom:14px; }
.gs-tracker-step { display:flex; gap:12px; align-items:flex-start; padding-bottom:16px; position:relative; }
.gs-tracker-step:last-child { padding-bottom:0; }
.gs-tracker-step:not(:last-child)::before { content:''; position:absolute; left:9px; top:20px; width:2px; height:calc(100% - 10px); background:#E2E8F0; z-index:0; }
.gs-tracker-dot { width:20px; height:20px; border-radius:50%; border:2px solid #E2E8F0; background:#FFFFFF; flex-shrink:0; z-index:1; position:relative; display:flex; align-items:center; justify-content:center; font-size:0.6rem; color:white; }
.gs-tracker-dot.completed { background:#16A34A; border-color:#16A34A; }
.gs-tracker-dot.completed::after { content:'✓'; font-size:0.65rem; color:white; }
.gs-tracker-dot.active { background:#2563EB; border-color:#2563EB; }
.gs-tracker-dot.active::after { content:'●'; font-size:0.5rem; color:white; }
.gs-tracker-dot.pending { background:#F8FAFC; border-color:#E2E8F0; }
.gs-tracker-label { font-size:0.8rem; font-weight:700; color:var(--text-primary); }
.gs-tracker-date { font-size:0.7rem; color:var(--text-tertiary); }
.gs-track-btn { width:100%; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:8px; padding:9px; font-size:0.78rem; font-weight:600; color:var(--primary); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; }

.gs-help-list { display:flex; flex-direction:column; gap:2px; }
.gs-help-item { display:flex; gap:10px; align-items:center; padding:10px; border-radius:8px; cursor:pointer; }
.gs-help-item:hover { background:#F8FAFC; }
.gs-help-icon { font-size:1.1rem; }
.gs-help-body { flex:1; }
.gs-help-title { font-size:0.8rem; font-weight:700; color:var(--text-primary); }
.gs-help-sub { font-size:0.68rem; color:var(--text-tertiary); }

/* ── RESPONSIVE ── */
@media (max-width:1400px) { .gs-service-grid { grid-template-columns:repeat(2,1fr); } .gs-dept-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:1199px) { .gs-layout { grid-template-columns:1fr; } }
@media (max-width:767px) { .gs-service-grid { grid-template-columns:1fr; } .gs-dept-grid { grid-template-columns:repeat(2,1fr); } }

/* ============================================================
   PUBLIC FUNDS (TRANSPARENCY)
   ============================================================ */
.pf-header-row { margin-bottom:24px; }
.pf-stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; margin-bottom:24px; }
.pf-stat-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; padding:16px; display:flex; gap:12px; align-items:flex-start; }
.pf-stat-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.pf-stat-label { font-size:0.72rem; font-weight:700; color:var(--text-primary); margin-bottom:4px; }
.pf-stat-val { font-size:1.35rem; font-weight:800; color:var(--text-primary); margin-bottom:2px; }
.pf-stat-sub { font-size:0.65rem; color:var(--text-tertiary); }

.pf-tabs-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; border-bottom:1px solid #E2E8F0; flex-wrap:wrap; gap:8px; }
.pf-tabs { display:flex; gap:0; overflow-x:auto; scrollbar-width:none; }
.pf-tab { background:none; border:none; border-bottom:2px solid transparent; padding:10px 16px; font-size:0.82rem; font-weight:600; color:var(--text-secondary); cursor:pointer; white-space:nowrap; margin-bottom:-1px; }
.pf-tab.active { color:#2563EB; border-bottom-color:#2563EB; }
.pf-tabs-actions { display:flex; gap:8px; align-items:center; }

.pf-main-layout { display:grid; grid-template-columns:1fr 300px; gap:24px; align-items:start; }
.pf-sidebar { display:flex; flex-direction:column; gap:16px; }

.pf-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; padding:20px; }
.pf-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.pf-card-title { font-size:0.92rem; font-weight:800; color:var(--text-primary); }

.pf-budget-overview-row { display:flex; gap:16px; align-items:flex-start; flex-wrap:wrap; }
.pf-donut-wrap { display:flex; flex-direction:column; gap:8px; }
.pf-donut-legend { display:flex; flex-direction:column; gap:5px; }
.pf-leg-row { display:flex; align-items:center; gap:6px; font-size:0.72rem; color:var(--text-secondary); }
.pf-leg-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.pf-leg-val { margin-left:auto; font-weight:600; color:var(--text-primary); }
.pf-trend-wrap { flex:1; min-width:220px; }
.pf-trend-title { font-size:0.8rem; font-weight:700; color:var(--text-primary); margin-bottom:10px; }

.pf-table { width:100%; border-collapse:collapse; font-size:0.78rem; }
.pf-table th { text-align:left; padding:8px 10px; font-size:0.68rem; font-weight:700; color:var(--text-tertiary); text-transform:uppercase; border-bottom:1px solid #E2E8F0; }
.pf-table td { padding:10px 10px; color:var(--text-primary); border-bottom:1px solid #F8FAFC; vertical-align:middle; }
.pf-table tr:last-child td { border-bottom:none; }
.pf-proj-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.pf-proj-dot.blue { background:#2563EB; } .pf-proj-dot.green { background:#10B981; } .pf-proj-dot.yellow { background:#F59E0B; } .pf-proj-dot.gray { background:#94A3B8; }
.pf-progress-bar { width:80px; height:5px; background:#F1F5F9; border-radius:3px; overflow:hidden; }
.pf-progress-bar div { height:100%; border-radius:3px; }
.pf-table-badge { font-size:0.62rem; font-weight:700; padding:3px 7px; border-radius:4px; }
.pf-table-badge.inprog { background:#DBEAFE; color:#1D4ED8; }
.pf-table-badge.pending { background:#F1F5F9; color:#64748B; }

.pf-fund-rows { display:flex; flex-direction:column; gap:10px; }
.pf-fund-row { display:flex; justify-content:space-between; align-items:center; font-size:0.78rem; color:var(--text-primary); padding-bottom:8px; border-bottom:1px solid #F1F5F9; }
.pf-fund-row:last-child { border-bottom:none; padding-bottom:0; }
.pf-fund-row.total { margin-top:4px; padding-top:8px; border-top:1px solid #E2E8F0; }
.pf-pct { font-size:0.7rem; color:#64748B; font-weight:600; }

.pf-dept-perf-list { display:flex; flex-direction:column; gap:10px; }
.pf-dept-perf-item { display:flex; flex-direction:column; gap:4px; }
.pf-dept-perf-row { display:flex; justify-content:space-between; font-size:0.75rem; color:var(--text-primary); }

.pf-activities-list { display:flex; flex-direction:column; gap:12px; }
.pf-act-item { display:flex; gap:10px; }
.pf-act-dot { width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0; }
.pf-act-amt { font-size:0.78rem; font-weight:700; }
.pf-act-sub { font-size:0.7rem; color:var(--text-secondary); }
.pf-act-time { font-size:0.65rem; color:var(--text-tertiary); }

.pf-bottom-banner { background:#EFF6FF; border:1px solid #BFDBFE; border-radius:12px; padding:16px 20px; display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:20px; }

@media (max-width:1400px) { .pf-stats-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:1199px) { .pf-main-layout { grid-template-columns:1fr; } }
@media (max-width:767px) { .pf-stats-grid { grid-template-columns:repeat(2,1fr); } }

/* ============================================================
   DEVELOPMENT PROJECTS
   ============================================================ */
.dp-header-row { margin-bottom:24px; }
.dp-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.dp-stat-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; padding:16px; display:flex; gap:12px; align-items:flex-start; }
.dp-stat-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.dp-stat-label { font-size:0.72rem; font-weight:700; color:var(--text-primary); margin-bottom:4px; }
.dp-stat-val { font-size:1.6rem; font-weight:800; color:var(--text-primary); margin-bottom:2px; }
.dp-stat-sub { font-size:0.65rem; color:var(--text-tertiary); }

.dp-main-layout { display:grid; grid-template-columns:1fr 320px; gap:24px; align-items:start; }
.dp-sidebar { display:flex; flex-direction:column; gap:16px; }

.dp-filter-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; flex-wrap:wrap; gap:8px; }
.dp-filter-tabs { display:flex; gap:20px; border-bottom:1px solid #E2E8F0; }
.dp-ftab { background:none; border:none; border-bottom:2px solid transparent; padding:10px 0; font-size:0.82rem; font-weight:600; color:var(--text-secondary); cursor:pointer; white-space:nowrap; margin-bottom:-1px; }
.dp-ftab.active { color:#2563EB; border-bottom-color:#2563EB; }
.dp-filter-actions { display:flex; gap:8px; align-items:center; }

.dp-projects-list { display:flex; flex-direction:column; gap:12px; }
.dp-project-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:12px; overflow:hidden; display:flex; gap:0; align-items:stretch; transition:box-shadow 0.2s; }
.dp-project-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.06); }
.dp-proj-img { width:100px; min-height:100px; flex-shrink:0; }
.dp-proj-body { padding:14px; flex:1; display:flex; flex-direction:column; gap:5px; }
.dp-proj-title { font-size:0.88rem; font-weight:800; color:var(--text-primary); }
.dp-proj-meta { font-size:0.7rem; color:var(--text-tertiary); display:flex; gap:8px; flex-wrap:wrap; }
.dp-proj-stats { display:flex; gap:24px; padding:14px; border-left:1px solid #F1F5F9; align-items:center; }
.dp-proj-stat { display:flex; flex-direction:column; gap:3px; min-width:90px; }
.dp-proj-stat-lbl { font-size:0.65rem; color:var(--text-tertiary); font-weight:600; text-transform:uppercase; }
.dp-proj-stat-val { font-size:0.85rem; font-weight:700; color:var(--text-primary); }
.dp-progress-bar { width:80px; height:5px; background:#F1F5F9; border-radius:3px; overflow:hidden; margin-top:3px; }
.dp-progress-bar div { height:100%; border-radius:3px; }
.dp-view-btn { padding:0 16px; background:#F8FAFC; border:none; border-left:1px solid #F1F5F9; font-size:0.75rem; font-weight:600; color:#2563EB; cursor:pointer; white-space:nowrap; }
.dp-view-btn:hover { background:#EFF6FF; }
.dp-status-badge { display:inline-block; font-size:0.62rem; font-weight:700; padding:3px 8px; border-radius:4px; }
.dp-status-badge.inprog { background:#ECFDF5; color:#10B981; }
.dp-status-badge.completed { background:#ECFDF5; color:#16A34A; }
.dp-status-badge.upcoming { background:#FEF9C3; color:#D97706; }

.dp-feedback-banner { background:#EFF6FF; border:1px solid #BFDBFE; border-radius:12px; padding:16px 20px; display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:20px; }

.dp-map-legend { display:flex; flex-wrap:wrap; gap:10px; font-size:0.72rem; color:var(--text-secondary); }
.dp-leg-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:3px; }
.dp-donut-legend { display:flex; flex-direction:column; gap:8px; }
.dp-donut-legend div { display:flex; align-items:center; gap:6px; font-size:0.74rem; color:var(--text-secondary); }
.dp-donut-legend span:last-child { margin-left:auto; font-weight:700; color:var(--text-primary); }
.dp-updates-list { display:flex; flex-direction:column; gap:12px; }
.dp-update-item { display:flex; gap:10px; align-items:flex-start; }
.dp-upd-dot { width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0; }
.dp-upd-title { font-size:0.78rem; font-weight:700; color:var(--text-primary); margin-bottom:2px; }
.dp-upd-sub { font-size:0.7rem; color:var(--text-secondary); }
.dp-upd-time { font-size:0.65rem; color:var(--text-tertiary); }

@media (max-width:1199px) { .dp-main-layout { grid-template-columns:1fr; } .dp-proj-stats { flex-wrap:wrap; } }
@media (max-width:767px) { .dp-stats-grid { grid-template-columns:repeat(2,1fr); } .dp-project-card { flex-direction:column; } .dp-proj-img { width:100%; height:120px; } }

/* ============================================================
   AI ASSISTANT
   ============================================================ */
.ai-layout { display:grid; grid-template-columns:1fr 320px; gap:24px; align-items:start; }
.ai-sidebar { display:flex; flex-direction:column; gap:16px; }

.ai-chat-panel { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:14px; display:flex; flex-direction:column; min-height:80vh; }
.ai-chat-header { display:flex; justify-content:space-between; align-items:flex-start; padding:20px 24px 16px; border-bottom:1px solid #F1F5F9; }
.ai-chat-title { font-size:1.4rem; font-weight:800; color:var(--text-primary); }
.ai-sparkle { font-size:1.1rem; }
.ai-chat-sub { font-size:0.78rem; color:var(--text-tertiary); margin-top:2px; }
.ai-header-btn { display:flex; align-items:center; gap:6px; padding:7px 14px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:8px; font-size:0.78rem; font-weight:600; color:var(--text-secondary); cursor:pointer; }
.ai-header-btn.icon-only { padding:7px 10px; }
.ai-header-btn:hover { background:#F1F5F9; }

.ai-quick-chips { display:flex; gap:10px; padding:16px 24px; border-bottom:1px solid #F1F5F9; overflow-x:auto; scrollbar-width:none; }
.ai-quick-chips::-webkit-scrollbar { display:none; }
.ai-chip { display:flex; align-items:center; gap:8px; padding:10px 14px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:10px; cursor:pointer; text-align:left; flex-shrink:0; transition:all 0.15s; }
.ai-chip:hover { background:#EFF6FF; border-color:#BFDBFE; }

.ai-messages-area { flex:1; padding:20px 24px; display:flex; flex-direction:column; gap:16px; overflow-y:auto; min-height:300px; }
.ai-msg-wrap { display:flex; gap:10px; }
.ai-msg-wrap.user { justify-content:flex-end; }
.ai-msg-wrap.ai { justify-content:flex-start; }
.ai-bot-avatar { width:32px; height:32px; background:#EFF6FF; border:2px solid #BFDBFE; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:4px; }
.ai-msg { max-width:70%; padding:12px 16px; border-radius:14px; font-size:0.85rem; line-height:1.5; }
.ai-msg.user { background:#2563EB; color:white; border-bottom-right-radius:4px; }
.ai-msg.ai { background:#F8FAFC; border:1px solid #E2E8F0; color:var(--text-primary); border-bottom-left-radius:4px; }
.ai-msg p { margin:0 0 8px 0; }
.ai-msg p:last-of-type { margin-bottom:0; }
.ai-msg-time { font-size:0.62rem; text-align:right; margin-top:6px; opacity:0.7; }
.ai-similar-issue-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:10px; padding:12px; margin-top:10px; }
.ai-complaint-card { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:10px; padding:14px; margin-top:10px; }
.ai-comp-row { display:flex; justify-content:space-between; align-items:center; font-size:0.76rem; padding:6px 0; border-bottom:1px solid #F8FAFC; gap:10px; }
.ai-comp-row:last-child { border-bottom:none; }
.ai-comp-lbl { color:var(--text-tertiary); font-weight:600; flex-shrink:0; }
.ai-comp-val { font-weight:600; color:var(--text-primary); text-align:right; }
.ai-comp-actions { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.ai-comp-btn { padding:6px 12px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:6px; font-size:0.72rem; font-weight:600; cursor:pointer; }
.ai-comp-btn:hover { background:#EFF6FF; }
.ai-copy-btn { background:none; border:none; cursor:pointer; font-size:0.85rem; padding:0; }

.ai-suggestion-pills { display:flex; gap:8px; padding:12px 24px; border-top:1px solid #F1F5F9; flex-wrap:wrap; }
.ai-pill { padding:6px 14px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:20px; font-size:0.75rem; font-weight:600; color:var(--text-secondary); cursor:pointer; white-space:nowrap; }
.ai-pill:hover { background:#EFF6FF; color:#2563EB; }

.ai-input-area { padding:12px 24px; border-top:1px solid #E2E8F0; }
.ai-input-wrap { background:#F8FAFC; border:1px solid #E2E8F0; border-radius:12px; padding:12px; }
.ai-textarea { width:100%; background:transparent; border:none; resize:none; font-size:0.85rem; color:var(--text-primary); font-family:inherit; outline:none; line-height:1.5; }
.ai-input-footer { display:flex; justify-content:space-between; align-items:center; margin-top:6px; }
.ai-char-count { font-size:0.7rem; color:var(--text-tertiary); }
.ai-input-btns { display:flex; gap:8px; align-items:center; }
.ai-icon-btn { background:none; border:none; font-size:1.1rem; cursor:pointer; padding:4px; border-radius:6px; }
.ai-icon-btn:hover { background:#E2E8F0; }
.ai-send-btn { background:#2563EB; color:white; border:none; border-radius:8px; padding:8px 12px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.ai-send-btn:hover { background:#1D4ED8; }
.ai-disclaimer { text-align:center; font-size:0.68rem; color:var(--text-tertiary); padding:8px 24px 16px; }

.ai-qa-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.ai-qa-btn { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 8px; border-radius:10px; border:none; cursor:pointer; font-size:0.7rem; font-weight:700; color:var(--text-primary); transition:all 0.15s; }
.ai-qa-btn:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgba(0,0,0,0.08); }
.ai-qa-btn.red-bg { background:#FEE2E2; color:#DC2626; } .ai-qa-btn.blue-bg { background:#DBEAFE; color:#2563EB; } .ai-qa-btn.green-bg { background:#DCFCE7; color:#16A34A; }
.ai-qa-btn.yellow-bg { background:#FEF9C3; color:#D97706; } .ai-qa-btn.cyan-bg { background:#CFFAFE; color:#0891B2; } .ai-qa-btn.purple-bg { background:#EDE9FE; color:#7C3AED; }

.ai-suggested-list { display:flex; flex-direction:column; }
.ai-sug-item { display:flex; justify-content:space-between; align-items:center; padding:10px; border-radius:8px; font-size:0.78rem; font-weight:600; color:var(--text-primary); background:none; border:none; cursor:pointer; text-align:left; }
.ai-sug-item:hover { background:#F8FAFC; color:#2563EB; }
.ai-sug-item span { color:#94A3B8; }

.ai-pop-services { display:flex; flex-direction:column; gap:10px; }
.ai-pop-srv-item { display:flex; gap:10px; align-items:center; }

@media (max-width:1199px) { .ai-layout { grid-template-columns:1fr; } .ai-chat-panel { min-height:auto; } }
@media (max-width:767px) { .ai-quick-chips { flex-wrap:wrap; } .ai-msg { max-width:90%; } .ai-qa-grid { grid-template-columns:repeat(2,1fr); } }

/* ============================================================
   RIGHT UTILITY PANEL — PER-TAB VISIBILITY FIX
   Show only on dashboard tab; hide for all others so other 
   views get full-width to use their own built-in sidebars.
   ============================================================ */

/* When body has .hide-right-panel, collapse the utility */
body.hide-right-panel .dash-right-utility {
  display: none !important;
  width: 0 !important;
}

/* Main content fills remaining space when right panel is hidden */
body.hide-right-panel .dash-main-content {
  max-width: 100%;
}

/* Each new full-width section: constrain content width sensibly */
#view-services,
#view-transparency,
#view-projects,
#view-ai {
  max-width: 1400px;
}

#view-complaints {
  max-width: 1400px;
}

#view-map {
  max-width: 1500px;
}

/* Ensure community hub doesn't get squished either */
#view-community {
  max-width: 1500px;
}

/* Section layouts already have their own sidebars - make sure 
   they use the full available width properly */
.gs-layout,
.pf-main-layout,
.dp-main-layout,
.ai-layout,
.complaints-split-layout,
.lm-main-layout {
  width: 100%;
}

/* ============================================================
   DASHBOARD CHARTS
   ============================================================ */
.dash-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.dash-chart-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.dash-chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
}
.dash-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-chart-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.dash-chart-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}
.dash-chart-controls {
  display: flex;
  gap: 4px;
}
.dash-chart-btn {
  padding: 4px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #F8FAFC;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.dash-chart-btn.active {
  background: #2563EB;
  color: white;
  border-color: #2563EB;
}
.cat-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.cat-leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-primary);
}
.cat-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-leg-count {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.74rem;
  color: var(--text-primary);
}

/* Live stat counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat5-val {
  animation: countUp 0.5s ease-out;
}

/* Feed card vote animation */
.feed-v2-vote-btn.voted {
  color: #2563EB !important;
  transform: scale(1.15);
}
.feed-v2-vote-btn {
  transition: transform 0.2s, color 0.2s;
}

/* Follow button active state */
.feed-act-follow.following {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
}

/* Comment box */
.feed-comment-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  display: none;
}
.feed-comment-box.open {
  display: block;
}
.feed-comment-input {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-family: inherit;
  resize: none;
  outline: none;
  box-sizing: border-box;
}
.feed-comment-input:focus { border-color: #2563EB; }
.feed-comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #0F172A;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: toastIn 0.25s ease-out;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 320px;
}
.toast.success { background: #16A34A; }
.toast.error { background: #DC2626; }
.toast.warning { background: #D97706; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

/* Complaint modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s;
}
.modal-box {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-title { font-size: 1.1rem; font-weight: 800; color: #0F172A; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
}
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-field label { display: block; font-size: 0.78rem; font-weight: 700; color: #475569; margin-bottom: 5px; }
.modal-field input,
.modal-field select,
.modal-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.83rem;
  font-family: inherit;
  color: #0F172A;
  background: #F8FAFC;
  box-sizing: border-box;
  outline: none;
}
.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus {
  border-color: #2563EB;
  background: #FFFFFF;
}
.modal-field textarea { resize: vertical; min-height: 80px; }
.modal-submit {
  background: #2563EB;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}
.modal-submit:hover { background: #1D4ED8; }

/* Live clock */
#dashboardClock {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

/* ============================================================
   PUBLIC FUNDS TRANSPARENCY — ENHANCED
   ============================================================ */
.pft-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:24px; flex-wrap:wrap; gap:12px; }
.pft-header-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.pft-kpi-card { cursor:pointer; transition:box-shadow 0.2s, transform 0.15s; }
.pft-kpi-card:hover { box-shadow:0 6px 20px rgba(0,0,0,0.08); transform:translateY(-2px); }

.pf-tab-panel[hidden] { display:none !important; }
.pf-tab-panel { animation:viewFadeIn 0.25s ease; }

.pft-delta { font-size:0.68rem; font-weight:700; }
.pft-delta.up { color:#16A34A; }
.pft-delta.down { color:#EA580C; }

/* Overview row */
.pft-overview-row { display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.pft-donut-container { position:relative; display:flex; flex-direction:column; align-items:center; gap:12px; flex-shrink:0; }
.pft-donut-center {
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-60%);
  text-align:center;
  pointer-events:none;
}
.pft-donut-center > div:first-child { font-size:1rem; font-weight:800; color:#0F172A; }
.pft-donut-center > div:last-child { font-size:0.62rem; color:#64748B; }
.pft-donut-legend { display:flex; flex-direction:column; gap:5px; width:100%; }
.pft-trend-container { flex:1; min-width:220px; }

/* Ward grid */
.pft-ward-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.pft-ward-card { background:#F8FAFC; border:1px solid #E2E8F0; border-radius:10px; padding:12px; cursor:pointer; transition:all 0.15s; }
.pft-ward-card:hover { border-color:#2563EB; background:#EFF6FF; }
.pft-ward-name { font-size:0.8rem; font-weight:700; color:#0F172A; margin-bottom:6px; }
.pft-ward-amt { font-size:0.72rem; color:#64748B; margin-bottom:6px; }
.pft-ward-bar { height:5px; background:#E2E8F0; border-radius:3px; overflow:hidden; }
.pft-ward-bar div { height:100%; border-radius:3px; transition:width 0.5s; }
.pft-ward-pct { font-size:0.68rem; font-weight:700; color:#2563EB; margin-top:4px; }

/* Scheme Tracker */
.pft-scheme-item { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #F1F5F9; }
.pft-scheme-item:last-child { border-bottom:none; }
.pft-scheme-name { font-size:0.82rem; font-weight:700; color:#0F172A; margin-bottom:3px; }
.pft-scheme-sub { font-size:0.7rem; color:#64748B; }
.pft-scheme-bar-wrap { flex:1; }
.pft-scheme-bar-track { height:7px; background:#F1F5F9; border-radius:4px; overflow:hidden; margin-top:5px; }
.pft-scheme-bar-fill { height:100%; border-radius:4px; transition:width 1s ease; }
.pft-scheme-pct { font-size:0.8rem; font-weight:800; width:38px; text-align:right; }

/* Burn Rate */
.pft-burn-wrap { display:flex; justify-content:space-between; align-items:center; font-size:0.78rem; color:#64748B; padding:8px 0; border-top:1px solid #F1F5F9; margin-top:6px; }

/* Live dot */
.pft-live-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#10B981; animation:pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(1.4);} }

/* Source legend */
.pft-source-leg-row { display:flex; align-items:center; gap:8px; font-size:0.78rem; color:#0F172A; padding:6px 0; border-bottom:1px solid #F8FAFC; }
.pft-source-leg-row:last-child { border-bottom:none; }
.pft-source-leg-amt { margin-left:auto; font-weight:700; }
.pft-source-leg-pct { font-size:0.68rem; color:#64748B; min-width:36px; text-align:right; }

/* Dept table */
.pft-dept-eff { font-weight:700; font-size:0.78rem; }
.pft-dept-eff.high { color:#16A34A; }
.pft-dept-eff.mid  { color:#D97706; }
.pft-dept-eff.low  { color:#DC2626; }

@media(max-width:1199px){.pft-overview-row{flex-direction:column;}.pft-ward-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:767px){.pft-ward-grid{grid-template-columns:1fr 1fr;}}

/* ── PF PANEL DISPLAY FIX ─────────────────────────────── */
/* Use JS-driven display:none instead of [hidden] attribute
   so Chart.js can measure canvas dimensions properly */
.pf-tab-panel { animation: viewFadeIn 0.22s ease; }

/* Override any [hidden] attr that may still be set */
#pfPanel-overview[hidden],
#pfPanel-dept[hidden],
#pfPanel-project[hidden],
#pfPanel-ward[hidden],
#pfPanel-scheme[hidden],
#pfPanel-sources[hidden] { display: none !important; }

/* Table row hover */
.pf-table tbody tr:hover { background: #F8FAFC; cursor: pointer; }

/* Dept efficiency badge */
.pft-dept-eff { font-weight: 700; padding: 2px 7px; border-radius: 4px; font-size: 0.75rem; }
.pft-dept-eff.high { background: #DCFCE7; color: #16A34A; }
.pft-dept-eff.mid  { background: #FEF3C7; color: #D97706; }
.pft-dept-eff.low  { background: #FEE2E2; color: #DC2626; }

/* Ward grid responsive */
@media (max-width: 900px) { .pft-ward-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 540px) { .pft-ward-grid { grid-template-columns: 1fr !important; } }

/* Overview row responsive */
@media (max-width: 900px) {
  .pft-overview-row { flex-direction: column; }
  .pft-donut-container { width: 100%; }
  .pft-trend-container { width: 100%; min-width: unset; }
}

/* KPI cards clickable cursor */
.pft-kpi-card { cursor: pointer; }

/* ── PROJECT CARD IMAGE FIX ─────────────────────── */
.dp-proj-img {
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  flex-shrink: 0;
  background: #E2E8F0;
}
.dp-proj-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.dp-project-card:hover .dp-proj-img img {
  transform: scale(1.05);
}

/* ── NEW COMPLAINT PULSE MARKER ─────────────────────────────── */
.map-new-complaint-pulse {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-pulse-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #F43F5E;
  animation: mapPulseRing 1.2s ease-out infinite;
  opacity: 0;
}

.map-pulse-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #F43F5E;
  border: 3px solid white;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.7);
  animation: mapPulseDot 1.2s ease-in-out infinite;
  z-index: 2;
}

.map-new-label {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: #F43F5E;
  color: white;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.5);
  animation: mapNewLabelBounce 0.5s ease-out;
}

@keyframes mapPulseRing {
  0%   { transform: scale(0.4); opacity: 1; }
  80%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes mapPulseDot {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

@keyframes mapNewLabelBounce {
  0%   { transform: translateX(-50%) translateY(-6px); opacity: 0; }
  60%  { transform: translateX(-50%) translateY(2px); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── VIEW ON MAP BUTTON (complaint card) ─────────────────────── */
.cc-btn-map {
  background: linear-gradient(135deg, #3B82F6, #6366F1);
  border: none;
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  white-space: nowrap;
}
.cc-btn-map:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ── WORK SITE LAYER LEGEND (in map sidebar) ─────────────────── */
.lm-worksite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lm-worksite-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2, #F8FAFC);
  border: 1px solid var(--border, #E2E8F0);
  cursor: pointer;
  transition: all 0.2s;
}

.lm-worksite-item:hover {
  border-color: var(--primary, #3B82F6);
  background: rgba(59, 130, 246, 0.04);
  transform: translateX(2px);
}

.lm-ws-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lm-ws-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary, #0F172A);
  flex: 1;
  line-height: 1.3;
}

.lm-ws-pct {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary, #94A3B8);
}

.lm-ws-status {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lm-ws-status.inprog  { background: #DBEAFE; color: #1D4ED8; }
.lm-ws-status.pending { background: #FEF3C7; color: #D97706; }
.lm-ws-status.upcoming { background: #F3E8FF; color: #7C3AED; }

/* ── LIVE WORK SITE SECTION HEADER ──────────────────────────── */
.lm-worksite-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.lm-worksite-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.15); }
}
