/* Nepal Development Project Tracker - Design System */

:root {
  --primary: #c8102e;
  --primary-light: #fee2e2;
  --primary-dark: #991b1b;
  --secondary: #0284c7;
  --secondary-light: #e0f2fe;
  --secondary-dark: #0369a1;
  --accent: #10b981;
  --accent-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #6366f1;
  --info-light: #e0e7ff;

  /* Dark mode default */
  --bg-main: #0b0f19;
  --bg-card: #131c2e;
  --bg-card-hover: #1c2742;
  --bg-subtle: #192339;
  --border: #24324f;
  --border-light: #334468;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navbar */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.92);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
}

.brand-emblem {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, #881337 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.4);
}

.brand span.highlight {
  color: var(--primary);
}

.nav-meta-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.nav-meta-badge strong {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.45);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

/* Hero Carousel / Slideshow Section */
.slideshow-section {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  background: #000;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.2) 0%, rgba(11, 15, 25, 0.6) 50%, rgba(11, 15, 25, 0.95) 100%);
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: 50px;
}

.slide-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge-tag {
  background: rgba(200, 16, 46, 0.85);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-location {
  background: rgba(2, 132, 199, 0.85);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-status {
  background: rgba(245, 158, 11, 0.9);
  color: #111;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
}

.slide-title {
  font-size: 2.2rem;
  color: white;
  margin-bottom: 10px;
  max-width: 860px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.slide-desc {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 760px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.slide-meta-strip {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.slide-meta-item {
  font-size: 0.85rem;
  color: #94a3b8;
}

.slide-meta-item strong {
  color: white;
}

.slide-progress-wrap {
  width: 180px;
  background: rgba(255, 255, 255, 0.2);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.slide-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: var(--radius-full);
}

/* Carousel Controls */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(11, 15, 25, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.3rem;
}

.carousel-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.08);
}

.carousel-nav-btn.prev {
  left: 24px;
}

.carousel-nav-btn.next {
  right: 24px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 32px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background: var(--primary);
  width: 48px;
}

/* Search Bar & Hierarchical Filter System */
.search-filter-section {
  padding: 40px 0 20px;
  position: relative;
  z-index: 20;
}

.search-box-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.search-box-card:focus-within,
.search-box-card.active {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18), var(--shadow-md);
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-icon-large {
  font-size: 1.3rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
}

.search-input-main {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
  font-weight: 500;
}

.search-input-main::placeholder {
  color: var(--text-muted);
}

.filter-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* Filter Panel (Opens only when clicked on search bar or toggle) */
.filter-drawer {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  animation: slideDown 0.3s ease-out forwards;
}

.filter-drawer.open {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.filter-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.filter-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--secondary);
}

.filter-select optgroup,
.form-control optgroup {
  font-weight: 800;
  color: var(--secondary);
  background: var(--bg-card);
  padding: 8px 6px 4px;
  font-style: normal;
  letter-spacing: 0.3px;
}

[data-theme="dark"] .filter-select optgroup,
[data-theme="dark"] .form-control optgroup {
  color: #38bdf8;
  background: #172033;
}

.filter-select option,
.form-control option {
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  padding: 6px 12px;
}

/* ==========================================================================
   Interactive Map of Nepal Section (Election Commission Style Drilldown)
   ========================================================================== */
.map-section {
  padding: 30px 0 40px;
}

.map-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.map-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(19, 28, 46, 0.7);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .map-card-header {
  background: rgba(248, 250, 252, 0.9);
}

/* Election Commission Style Breadcrumb Bar */
.map-breadcrumb-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.breadcrumb-crumb {
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb-crumb:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.breadcrumb-crumb.active {
  color: var(--primary);
  font-weight: 700;
  cursor: default;
  text-decoration: none;
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.map-header-title h3 {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.map-header-title p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.map-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.map-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.map-container {
  width: 100%;
  height: 580px;
  background: #090d16;
  position: relative;
  z-index: 1;
}

[data-theme="light"] .map-container {
  background: #e2e8f0;
}

/* Floating District & Province Inspector Card on the Map (Disabled per user request) */
.map-inspector-card {
  display: none !important;
}

[data-theme="light"] .map-inspector-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.inspector-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.inspector-province {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.inspector-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.inspector-stat-row strong {
  color: var(--text-primary);
}

.inspector-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* Administrative Directory Strip (Written Section: Provinces -> Districts -> Palikas) */
.map-directory-section {
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-directory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.map-directory-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-directory-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.map-directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 2px 0;
}

.map-dir-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.map-dir-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--secondary);
  transform: translateY(-1px);
}

.map-dir-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.dir-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dir-abbr-tag {
  display: inline-block;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--secondary);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

[data-theme="light"] .dir-abbr-tag {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
}

.map-dir-btn.active .dir-abbr-tag {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.legend-naming-rule {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* On-Map Text Labels */
.map-label-marker {
  background: transparent !important;
  border: none !important;
  pointer-events: none !important;
}

.map-label-abbr {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-right: 3px;
  color: #facc15;
}

[data-theme="light"] .map-label-abbr {
  background: rgba(0, 0, 0, 0.08);
  color: #b45309;
}

.map-label-wrapper {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  pointer-events: none !important;
}

/* Compact, non-overlapping Province short-code badge (SDP, LBN, KRN, GDK, BGM, MDH, KSP) */
.map-province-abbr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  color: #ffffff !important;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 900;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  letter-spacing: 0.9px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  pointer-events: auto !important;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.map-province-abbr-badge:hover {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 12px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .map-province-abbr-badge {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a !important;
  border: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  text-shadow: none;
}

.satellite-mode .map-province-abbr-badge {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

.map-province-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  color: #f8fafc;
  padding: 5px 12px 5px 6px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  user-select: none;
}

.map-province-tag .prov-tag-code {
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.map-province-tag .prov-tag-name {
  line-height: 1;
}

[data-theme="light"] .map-province-tag {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* High-contrast on-map district abbreviation badge (e.g. JP, MRG, KTM) */
.map-district-abbr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(4px);
  color: #ffffff !important;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.60rem;
  font-weight: 900;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  pointer-events: auto !important;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.2;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .map-district-abbr-badge {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a !important;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-shadow: none;
}

.map-district-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-left-width: 3.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  user-select: none;
}

.map-district-tag .dist-tag-code {
  background: rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
}

[data-theme="light"] .map-district-tag {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .map-district-tag .dist-tag-code {
  background: rgba(0, 0, 0, 0.08);
  color: #0369a1;
}

/* Compact and crisp on-map Palika abbreviation badge (e.g. GRD, BTM, DMK) */
.map-palika-abbr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(4px);
  color: #ffffff !important;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.50rem;
  font-weight: 900;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  pointer-events: auto !important;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.2;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.map-palika-abbr-badge.selected {
  background: #f59e0b !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.95), 0 2px 10px rgba(0, 0, 0, 0.8) !important;
  font-weight: 900 !important;
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 1000;
  text-shadow: none;
}

[data-theme="light"] .map-palika-abbr-badge {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a !important;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-shadow: none;
}

[data-theme="light"] .map-palika-abbr-badge.selected {
  background: #f59e0b !important;
  color: #0f172a !important;
  border-color: #0f172a !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.9) !important;
}

/* Satellite & Photographic Mode Override for crystal-clear readability */
.satellite-mode .map-district-abbr-badge,
.satellite-mode .map-palika-abbr-badge {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.9) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

.satellite-mode .map-palika-abbr-badge.selected {
  background: #f59e0b !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 1), 0 2px 10px rgba(0, 0, 0, 0.9) !important;
}

[data-theme="light"] .map-palika-badge {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Map Legend Bar */
.map-legend-bar {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
}

.legend-provinces-list,
.legend-categories-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.legend-beacon-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Small Blinking / Pulsing Red Dot for Mega-Projects */
.beacon-marker-container {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.beacon-core-dot {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.95);
  position: relative;
  z-index: 2;
  border: 1px solid #ffffff;
}

.beacon-pulse-ring {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(239, 68, 68, 0.5);
  animation: beaconPulseAnim 1.8s infinite cubic-bezier(0.2, 0.6, 0.35, 1);
  z-index: 1;
  pointer-events: none;
}

@keyframes beaconPulseAnim {
  0% {
    transform: scale(0.35);
    opacity: 1;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Custom Leaflet Tooltip & Popup styling */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
}

.beacon-popup-content {
  padding: 8px 12px;
  min-width: 200px;
}

.beacon-popup-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.beacon-popup-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.beacon-popup-row {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

/* Custom Leaflet Tooltip for Pop-up Hover */
.leaflet-tooltip.map-custom-tooltip {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-family: inherit;
  font-size: 0.85rem;
  pointer-events: none;
}

[data-theme="light"] .leaflet-tooltip.map-custom-tooltip {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
  display: none !important;
}

.map-hover-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.map-hover-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.map-hover-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-hover-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.map-hover-cta {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

/* Upload Modal Card & Header (Matches Screenshot) */
.upload-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 36px 40px;
  position: relative;
  animation: modalScale 0.25s ease-out;
}

[data-theme="light"] .upload-modal-card {
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
}

.upload-modal-badge {
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.upload-modal-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  max-width: 620px;
  margin: 0 auto 28px;
  line-height: 1.5;
}

.modal-close-icon {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1.6rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* Ward Interactive Pills Grid */
.ward-selector-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.ward-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ward-selector-header h4 {
  font-size: 0.92rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ward-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 4px;
}

.ward-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ward-pill-btn:hover {
  border-color: var(--secondary);
  color: var(--text-primary);
}

.ward-pill-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* Active Filter Chips & Actions Row */
.filter-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.active-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: var(--secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip-remove-btn {
  cursor: pointer;
  font-weight: 800;
  color: var(--text-muted);
}

.chip-remove-btn:hover {
  color: #f87171;
}

.filter-btns {
  display: flex;
  gap: 10px;
}

/* Project Statistics Section */
.statistics-section {
  padding: 20px 0 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.stat-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.stat-icon-wrapper.ongoing {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-icon-wrapper.completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon-wrapper.upcoming {
  background: rgba(99, 102, 241, 0.15);
  color: var(--info);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.stat-icon-wrapper.total {
  background: rgba(2, 132, 199, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.stat-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Region Header / Current View Title */
.current-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.current-view-title h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.current-view-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Project Cards Section */
.projects-section {
  padding: 10px 0 60px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.project-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.project-status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-status-badge.Ongoing {
  background: #f59e0b;
  color: #111;
}

.project-status-badge.Completed {
  background: #10b981;
  color: white;
}

.project-status-badge.Upcoming {
  background: #6366f1;
  color: white;
}

.project-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.project-sector-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.project-name {
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.project-location-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.project-progress-block {
  margin-bottom: 18px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--secondary) 0%, #38bdf8 100%);
}

.progress-fill.Completed {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.project-meta-table {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-row span.label {
  color: var(--text-muted);
}

.meta-row span.val {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

.project-card-footer {
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

/* Empty State */
.empty-state-box {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 60px 24px;
  text-align: center;
  max-width: 640px;
  margin: 40px auto;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state-box h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.empty-state-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Modal Overlay & Upload Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.25s ease-out;
}

@keyframes modalScale {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .form-control {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-control:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Floating Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 3000;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  display: none;
  align-items: center;
  gap: 12px;
  animation: toastSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast-notification.show {
  display: flex;
}

@keyframes toastSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsiveness */
@media (max-width: 900px) {
  .slideshow-section {
    height: 440px;
  }
  .slide-title {
    font-size: 1.7rem;
  }
  .nav-meta-badge {
    display: none;
  }
}

@media (max-width: 600px) {
  .slideshow-section {
    height: 380px;
  }
  .slide-title {
    font-size: 1.35rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Citizen Watchdog & Ground Reality Features
   1. Interactive Before & After Photo Comparison Slider
   2. Financial vs Physical Progress Discrepancy Indicators
   3. Citizen Ground Reports & Whistleblower Feed
   ========================================================================== */

/* 1. Interactive Before/After Photo Slider */
.ba-slider-container {
  position: relative;
  width: 100%;
  height: 340px;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
  background: #090d16;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.ba-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ba-layer-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, var(--slider-pos, 50%) 0, var(--slider-pos, 50%) 100%, 0 100%);
  transition: clip-path 0.04s ease-out;
}

.ba-badge {
  position: absolute;
  top: 14px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 5;
  backdrop-filter: blur(8px);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ba-badge-before {
  right: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ba-badge-after {
  left: 14px;
  background: rgba(2, 132, 199, 0.9);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.6);
}

.ba-divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--slider-pos, 50%);
  width: 3px;
  background: #ffffff;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 0 6px rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
  transition: left 0.04s ease-out;
}

.ba-divider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0284c7;
  border: 3px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
  font-weight: 900;
}

.ba-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 10;
  margin: 0;
}

.ba-quick-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--bg-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ba-control-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.ba-control-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

/* 2. Financial vs. Physical Progress Discrepancy Indicator */
.audit-discrepancy-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  border: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-discrepancy-card.critical {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.audit-discrepancy-card.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.audit-discrepancy-card.balanced {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.audit-discrepancy-card.ahead {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.35);
  color: #818cf8;
}

.audit-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.92rem;
}

.audit-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.audit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.audit-pill.critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.audit-pill.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.audit-pill.balanced {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.audit-pill.ahead {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

/* 3. Citizen Ground Reality & Whistleblower Feed */
.watchdog-section {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.watchdog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.watchdog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.watchdog-reports-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.watchdog-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}

.watchdog-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.watchdog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.watchdog-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
}

.watchdog-type-tag.halted {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.watchdog-type-tag.substandard {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.watchdog-type-tag.hazard {
  background: rgba(217, 70, 239, 0.18);
  color: #e879f9;
  border: 1px solid rgba(217, 70, 239, 0.4);
}

.watchdog-type-tag.ontrack {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.watchdog-type-tag.suggestion {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.community-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.watchdog-headline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.watchdog-details {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.watchdog-photo-thumb {
  height: 120px;
  width: 100%;
  max-width: 280px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  margin-top: 4px;
}

.watchdog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.watchdog-reporter-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.watchdog-upvote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent);
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.watchdog-upvote-btn:hover {
  background: var(--accent);
  color: #ffffff;
  transform: scale(1.03);
}

.watchdog-upvote-btn.upvoted {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

/* Light Theme Overrides for Watchdog & Slider */
[data-theme="light"] .ba-slider-container {
  background: #e2e8f0;
}

[data-theme="light"] .ba-badge-before {
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .audit-discrepancy-card.critical {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

[data-theme="light"] .audit-discrepancy-card.warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}

[data-theme="light"] .audit-discrepancy-card.balanced {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

[data-theme="light"] .audit-discrepancy-card.ahead {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}

[data-theme="light"] .watchdog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   4. Construction Company & Contractor Dossier Styles
   ========================================================================== */

.contractor-dossier-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.contractor-dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.contractor-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contractor-logo-emblem {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-space(135deg, rgba(2, 132, 199, 0.2), rgba(245, 158, 11, 0.2));
  background-color: rgba(2, 132, 199, 0.15);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.contractor-company-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.contractor-class-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contractor-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 800;
}

.contractor-score-pill.critical {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.contractor-score-pill.good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.contractor-compliance-banner {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  line-height: 1.5;
  border: 1px solid;
}

.contractor-compliance-banner.critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.contractor-compliance-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.contractor-compliance-banner.good {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.contractor-grid-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.contractor-detail-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.contractor-detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
  font-weight: 700;
}

.contractor-detail-value {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
}

.contractor-track-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
  text-align: center;
}

.contractor-track-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.contractor-track-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 2px;
}

.contractor-badge-pill {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.contractor-badge-pill:hover {
  border-color: var(--accent);
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent);
}

[data-theme="light"] .contractor-dossier-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .contractor-compliance-banner.critical {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

[data-theme="light"] .contractor-compliance-banner.good {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

/* ==========================================================================
   5. Satellite Imagery & Under-Construction Alignments
   ========================================================================== */

/* Satellite Basemap Switcher Toolbar */
.map-basemap-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.basemap-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.basemap-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.basemap-pill.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.6);
}

/* Light Theme Switcher */
[data-theme="light"] .map-basemap-switcher {
  background: rgba(255, 255, 255, 0.96);
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .basemap-pill {
  color: #64748b;
}

[data-theme="light"] .basemap-pill:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .basemap-pill.active {
  background: #0284c7;
  color: #ffffff;
}

/* Satellite Mode Overlay Adjustments */
body.satellite-mode .map-container {
  box-shadow: 0 0 24px rgba(2, 132, 199, 0.25);
}

/* Satellite Popups */
.satellite-project-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.94) !important;
  color: #ffffff !important;
  border: 1.5px solid #0284c7 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
}

.satellite-project-popup .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1.5px solid #0284c7 !important;
}

.satellite-popup-body {
  padding: 6px 2px;
}

.satellite-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.satellite-popup-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

.satellite-popup-title {
  font-size: 0.98rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: #ffffff;
  line-height: 1.3;
}

.satellite-popup-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 8px;
  line-height: 1.4;
}

.satellite-popup-progress {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 8px;
  border-radius: 4px;
}

/* Satellite Action Button on Card */
.btn-satellite-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(2, 132, 199, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-satellite-pill:hover {
  background: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   6. Google Maps Look & Feel Elements
   ========================================================================== */

/* Google Maps Iconic Floating "Layers" Card (Bottom Left) */
.gmap-layers-widget {
  position: absolute;
  bottom: 24px;
  left: 20px;
  z-index: 500;
  cursor: pointer;
  background: #ffffff;
  border-radius: 8px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.gmap-layers-widget:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}

.gmap-layers-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.gmap-layers-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(32, 33, 36, 0.84);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  padding: 2px 0;
  letter-spacing: 0.3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Google Maps Style Leaflet Zoom Controls */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.leaflet-control-zoom a {
  background: #ffffff !important;
  color: #3c4043 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 18px !important;
  line-height: 32px !important;
  width: 34px !important;
  height: 34px !important;
  border-bottom: 1px solid #dadce0 !important;
}

.leaflet-control-zoom a:hover {
  background: #f1f3f4 !important;
  color: #202124 !important;
}


/* ==========================================================================
   Clean Road Alignment & Division Flag Styles
   ========================================================================== */

.road-division-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff !important;
  border: 1.5px solid #10b981;
  border-radius: 9999px;
  padding: 3px 10px 3px 6px;
  font-size: 0.76rem;
  font-weight: 800;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), 0 0 10px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  pointer-events: auto !important;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
}

.road-division-flag:hover {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 16px rgba(16, 185, 129, 0.8);
}

.road-division-flag.status-completed {
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), 0 0 10px rgba(16, 185, 129, 0.5);
}

.road-division-flag.status-ongoing {
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), 0 0 10px rgba(245, 158, 11, 0.5);
}

.road-division-flag.status-delayed {
  border-color: #ef4444;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75), 0 0 10px rgba(239, 68, 68, 0.5);
}

[data-theme="light"] .road-division-flag {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Division Profile Popup & Drawer */
.road-division-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.96) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  padding: 0 !important;
}

.road-division-popup .leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
}

.division-profile-box {
  font-family: inherit;
  font-size: 0.82rem;
}

.division-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
}

.division-tab-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.division-tab-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.division-tab-btn.active {
  background: #10b981;
  color: #0f172a;
  border-color: #10b981;
  font-weight: 800;
}

.division-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.78rem;
}

.division-meta-item strong {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.4px;
}

.division-structures-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: 4px;
}

/* Interactive Road Line & Buffer */
.interactive-road-line {
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: stroke-width 0.18s ease, stroke-opacity 0.18s ease;
}
.road-click-buffer {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Active Selected Khanda Flag */
.road-division-flag.active-khanda {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.55), 0 6px 20px rgba(0, 0, 0, 0.85) !important;
  transform: translate(-50%, -50%) scale(1.18);
}

/* Khanda Select Banner Button in Overview Popup */
.khanda-select-banner-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}
.khanda-select-banner-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Milestone Structure Icon Hover */
.milestone-structure-icon {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  cursor: pointer !important;
}
.milestone-structure-icon:hover {
  transform: scale(1.25);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8), 0 4px 10px rgba(0, 0, 0, 0.8) !important;
}

/* Block all Leaflet popup bubbles across the site per user request */
.leaflet-popup,
.leaflet-popup-pane,
.leaflet-popup-content-wrapper,
.leaflet-popup-tip-container,
.road-division-popup {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Sleek Floating Khanda Detail Card (Chitikka Pareko Detail Card)
   ========================================================================== */
.khanda-floating-card {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1200 !important;
  width: 340px;
  max-width: calc(100% - 36px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 16px 18px;
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.15);
  animation: khandaCardPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  font-family: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

[data-theme="light"] .khanda-floating-card {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15), 0 0 20px rgba(2, 132, 199, 0.1);
}

@keyframes khandaCardPop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.khanda-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .khanda-card-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.khanda-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.khanda-card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 9999px;
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.khanda-card-flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.74rem;
  font-weight: 800;
}


.khanda-card-top-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.khanda-card-min-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.15s ease;
  padding: 0;
}

[data-theme="light"] .khanda-card-min-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
  color: #334155;
}

.khanda-card-min-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

.khanda-floating-card.minimized .khanda-card-body {
  display: none !important;
}

.khanda-floating-card.minimized {
  max-height: 48px !important;
  overflow: hidden !important;
  padding: 6px 12px !important;
}

.khanda-card-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
}

[data-theme="light"] 
.khanda-card-top-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.khanda-card-min-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.15s ease;
  padding: 0;
}

[data-theme="light"] .khanda-card-min-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
  color: #334155;
}

.khanda-card-min-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

.khanda-floating-card.minimized .khanda-card-body {
  display: none !important;
}

.khanda-floating-card.minimized {
  max-height: 48px !important;
  overflow: hidden !important;
  padding: 6px 12px !important;
}

.khanda-card-close-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  color: #64748b;
}

.khanda-card-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.12);
}

.khanda-card-title {
  margin: 0 0 2px 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
}

[data-theme="light"] .khanda-card-title {
  color: #0f172a;
}

.khanda-card-corridor-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-bottom: 10px;
}

[data-theme="light"] .khanda-card-corridor-sub {
  color: #64748b;
}

.khanda-card-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.76rem;
}

[data-theme="light"] .khanda-card-meta-grid {
  background: rgba(0, 0, 0, 0.04);
}

.khanda-meta-cell.full-width {
  grid-column: span 2;
}

.khanda-meta-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.3px;
  margin-bottom: 1px;
}

[data-theme="light"] .khanda-meta-label {
  color: #64748b;
}

.khanda-meta-value {
  display: block;
  font-weight: 700;
  color: #ffffff;
}

[data-theme="light"] .khanda-meta-value {
  color: #0f172a;
}

.khanda-card-structures-row {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.35;
}

[data-theme="light"] .khanda-card-structures-row {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.khanda-card-active-assets {
  margin-top: 8px;
  font-size: 0.74rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 5px;
}

[data-theme="light"] .khanda-card-active-assets {
  color: #0284c7;
}

.khanda-card-actions {
  margin-top: 12px;
}

.khanda-btn-redirect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 9px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.khanda-btn-redirect:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
}

/* ==========================================================================
   Full-Page Project Dossier View (True Full-Screen Page, NOT a modal hover)
   ========================================================================== */
#projectDetailViewModal.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: var(--bg-main, #0b0f19) !important;
  padding: 0 !important;
  display: none;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  backdrop-filter: none !important;
}

#projectDetailViewModal.modal-overlay.open {
  display: block !important;
  animation: fullPageSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes fullPageSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#projectDetailViewModal .modal-card {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: var(--bg-main, #0b0f19) !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  animation: none !important;
}

#projectDetailViewModal .modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: rgba(11, 15, 25, 0.96) !important;
  backdrop-filter: blur(18px) !important;
  border-bottom: 1.5px solid var(--border-light, rgba(255, 255, 255, 0.12)) !important;
  padding: 14px 28px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

[data-theme="light"] #projectDetailViewModal .modal-header {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

#projectDetailViewModal .modal-body {
  flex: 1 !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 32px 28px 70px 28px !important;
}

#projectDetailViewModal .modal-footer {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border-light) !important;
  padding: 16px 28px !important;
  width: 100% !important;
}

#projectDetailViewModal .modal-footer-inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

@media (max-width: 640px) {
  .khanda-floating-card {
    position: absolute !important;
    top: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45) !important;
    z-index: 1200 !important;
  }
  .khanda-floating-card.minimized {
    max-height: 46px !important;
    overflow: hidden !important;
  }
  #projectDetailViewModal .modal-header {
    padding: 10px 14px !important;
  }
  #projectDetailViewModal .modal-body {
    padding: 16px 14px 50px 14px !important;
  }
}

/* ==========================================================================
   Minimalist Hero Slide Styles (Per User Request)
   - Project Name only
   - Status symbol: Ongoing (blinking yellow with white border), Delayed (red), Completed (green)
   ========================================================================== */
.slide-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: 42px;
}

.slide-minimal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.status-indicator-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #ffffff !important;
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Ongoing: Yellow blinking with White border */
.status-indicator-dot.status-dot-ongoing {
  background-color: #facc15 !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.95);
  animation: blinkYellowWithWhiteBorder 1.1s infinite ease-in-out;
}

@keyframes blinkYellowWithWhiteBorder {
  0% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.95), 0 0 0 0 rgba(250, 204, 21, 0.7);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.9);
    box-shadow: 0 0 2px rgba(250, 204, 21, 0.3), 0 0 0 6px rgba(250, 204, 21, 0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.95), 0 0 0 0 rgba(250, 204, 21, 0);
  }
}

/* Delayed: Red with White border */
.status-indicator-dot.status-dot-delayed {
  background-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Completed: Green with White border */
.status-indicator-dot.status-dot-completed {
  background-color: #10b981 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.slide-title {
  font-size: 2.15rem;
  color: #ffffff;
  margin: 0;
  max-width: 860px;
  line-height: 1.25;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Responsive helper text */
.mobile-only-text {
  display: none;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsiveness Overhaul (< 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .desktop-only-text {
    display: none !important;
  }
  .mobile-only-text {
    display: inline !important;
  }

  /* 1. Header & Navbar (Zero Overlap on Mobile - Ultra Responsive) */
  .header {
    padding: 0 !important;
  }
  .nav-container {
    height: 54px !important;
    padding: 0 8px !important;
    gap: 6px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .brand {
    font-size: 0.95rem !important;
    gap: 6px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .brand-emblem {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
  }
  .nav-actions {
    gap: 5px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
  .btn-upload-nav, .btn-auth-nav, .btn-lang-toggle {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    height: 30px !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center !important;
    gap: 4px !important;
  }
  #authBtn[style*="display: none"],
  #userProfileWidget[style*="display: none"] {
    display: none !important;
  }
  .user-profile-widget {
    padding: 3px 8px 3px 4px !important;
    gap: 5px !important;
    height: 30px !important;
  }
  .user-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.72rem !important;
  }
  .user-name {
    font-size: 0.72rem !important;
    max-width: 60px !important;
  }
  .btn-icon#themeToggle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 2px !important;
    font-size: 0.85rem !important;
  }

  /* 2. Hero Slideshow on Mobile */
  .slideshow-section {
    height: 280px !important;
  }
  .slide-content {
    padding: 0 14px 28px 14px !important;
  }
  .slide-minimal-badge {
    padding: 3.5px 10px !important;
    font-size: 0.70rem !important;
    margin-bottom: 6px !important;
  }
  .status-indicator-dot {
    width: 11px !important;
    height: 11px !important;
  }
  .slide-title {
    font-size: 1.20rem !important;
    line-height: 1.3 !important;
  }
  .carousel-nav-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 1.1rem !important;
    background: rgba(0, 0, 0, 0.45) !important;
  }
  .carousel-nav-btn.prev { left: 6px !important; }
  .carousel-nav-btn.next { right: 6px !important; }
  .carousel-dots { bottom: 8px !important; }
  .carousel-dot { width: 7px !important; height: 7px !important; }

  /* 3. Search Bar & Filter Toggle */
  .search-box-card {
    padding: 12px 14px !important;
    margin-top: 14px !important;
  }
  .search-input-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .search-input-main {
    font-size: 0.88rem !important;
    padding: 6px 0 !important;
    width: 100% !important;
  }
  .filter-toggle-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 12px !important;
    font-size: 0.82rem !important;
  }
  .filter-grid-5 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* 4. Quick Statistics Grid (Clean 2x2 Grid) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-top: 14px !important;
  }
  .stat-card {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .stat-number {
    font-size: 1.40rem !important;
  }
  .stat-label {
    font-size: 0.70rem !important;
  }

  /* 5. Map Container & Interactive Directory */
  .map-container {
    height: 360px !important;
  }
  .map-directory-section {
    padding: 8px 10px !important;
    overflow-x: auto !important;
  }
  .map-legend-bar {
    padding: 8px 10px !important;
    font-size: 0.70rem !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .legend-provinces-list {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 6. Floating Khanda Card on Mobile */
  .khanda-floating-card {
    position: absolute !important;
    top: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45) !important;
    z-index: 1200 !important;
  }
  .khanda-floating-card.minimized {
    max-height: 46px !important;
    overflow: hidden !important;
  }

  /* 7. Full-Page Project Dossier */
  #projectDetailViewModal .modal-header {
    padding: 10px 14px !important;
  }
  #projectDetailViewModal .modal-body {
    padding: 16px 14px 60px 14px !important;
  }
}


/* ==========================================================================
   Bikash Tracker Citizen Portal Authentication & User Profile Styles
   ========================================================================== */

.btn-auth-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-auth-nav:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: var(--primary);
  color: #f87171;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.auth-icon {
  display: inline-block;
  flex-shrink: 0;
}

/* User Profile Widget in Nav */
.user-profile-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.user-profile-widget:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-caret {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* User Dropdown Menu */
.user-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  z-index: 10001;
  overflow: hidden;
  animation: fadeInDown 0.15s ease-out;
}

.dropdown-header {
  padding: 12px 14px;
  background: var(--bg-subtle);
}

.dropdown-email {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 0.70rem;
  font-weight: 600;
  color: #38bdf8;
}

.dropdown-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.dropdown-item.dropdown-logout {
  color: #ef4444;
}

.dropdown-item.dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Auth Modal Card */
.auth-modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  animation: scaleUpModal 0.2s ease-out;
}

.auth-modal-header {
  margin-bottom: 20px;
}

.auth-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 9999px;
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.auth-modal-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

/* Auth Tab Bar */
.auth-tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.auth-tab {
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

/* Alert Notification in Modal */
.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
  line-height: 1.4;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.auth-alert.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: #ef4444 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
}

.auth-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}



/* ==========================================================================
   OTP (One-Time Password) 6-Digit Verification Styles
   ========================================================================== */

.otp-security-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px 0;
}

.perk-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.otp-sent-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.otp-inputs-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 18px 0;
}

.otp-digit-box {
  width: 46px;
  height: 54px;
  font-size: 1.55rem;
  font-weight: 800;
  text-align: center;
  background: var(--bg-subtle);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  font-family: inherit;
}

.otp-digit-box:focus {
  border-color: #dc2626;
  background: var(--bg-card);
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.45);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .otp-inputs-grid {
    gap: 6px;
  }
  .otp-digit-box {
    width: 40px;
    height: 48px;
    font-size: 1.3rem;
    border-radius: 6px;
  }
}

.otp-resend-row {
  margin-top: 14px;
  text-align: center;
  font-size: 0.80rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-resend-otp {
  background: transparent;
  border: none;
  color: #f87171;
  font-weight: 700;
  font-size: 0.80rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn-resend-otp:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.12);
  text-decoration: underline;
}

.otp-help-hint {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  line-height: 1.45;
  color: #fbbf24;
}


/* Notice right below OTP input boxes */
.otp-spam-notice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.80rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin: 10px auto 4px auto;
  line-height: 1.4;
  text-align: center;
  max-width: 95%;
}

.otp-spam-notice strong {
  color: #ffffff;
  text-decoration: underline;
}


/* Language Switcher Button (NE / EN) */
.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  height: 36px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}


/* ==========================================================================
   Map Names Toggle Checkbox Widget (Top-Left of Map)
   ========================================================================== */

.map-names-toggle-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 900;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  user-select: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.map-names-toggle-pill:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.35);
}

.map-names-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.86rem;
  color: #ffffff;
  margin: 0;
}

/* Touch-friendly, larger checkbox */
.map-names-toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  cursor: pointer;
  accent-color: #ef4444;
  border-radius: 4px;
}

/* Instant toggle: Hide all map labels cleanly when unticked */
.hide-map-labels .map-label-wrapper,
.hide-map-labels .map-province-abbr-badge,
.hide-map-labels .map-district-abbr-badge,
.hide-map-labels .map-palika-abbr-badge,
.hide-map-labels .leaflet-pane.leaflet-labelsPane-pane {
  display: none !important;
}


/* District & Palika Real Name Badges on Map */
.map-district-abbr-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.92) !important;
  color: #ffffff !important;
  padding: 3px 8px !important;
  border-radius: 5px !important;
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.75) !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  transform: translate(-50%, -50%) !important;
  user-select: none !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  z-index: 500 !important;
}

.map-district-abbr-badge:hover {
  transform: translate(-50%, -50%) scale(1.15) !important;
  background: #dc2626 !important;
  border-color: #ffffff !important;
  z-index: 1000 !important;
}

.map-palika-abbr-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.88) !important;
  color: #ffffff !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 0.56rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  border: 1.2px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.65) !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  transform: translate(-50%, -50%) !important;
  user-select: none !important;
  transition: transform 0.15s ease !important;
  z-index: 600 !important;
}

.map-palika-abbr-badge:hover {
  transform: translate(-50%, -50%) scale(1.15) !important;
  background: #f59e0b !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  z-index: 1000 !important;
}

.map-palika-abbr-badge.selected {
  background: #f59e0b !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.95) !important;
  font-weight: 900 !important;
  transform: translate(-50%, -50%) scale(1.15) !important;
  z-index: 1000 !important;
}

/* When unticked, hide all labels */
.hide-map-labels .map-label-wrapper,
.hide-map-labels .map-province-abbr-badge,
.hide-map-labels .map-district-abbr-badge,
.hide-map-labels .map-palika-abbr-badge,
.hide-map-labels .leaflet-pane.leaflet-labelsPane-pane {
  display: none !important;
}

/* ==========================================================================
   Map Names Toggle Pill Auto-Hide & Integration
   ========================================================================== */
#mapNamesTogglePill.hide-names-pill,
.hide-names-pill,
body:has(#khandaFloatingCard.active) #mapNamesTogglePill,
body:has(#structureDetailModal.open) #mapNamesTogglePill,
body:has(#structureDetailModal.active) #mapNamesTogglePill {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#structureDetailModal.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  display: none;
  align-items: center;
  justify-content: center;
}

#structureDetailModal.modal-overlay.open,
#structureDetailModal.modal-overlay.active {
  display: flex !important;
}

.custom-milestone-marker-wrapper {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.milestone-structure-icon {
  pointer-events: auto !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: rgba(56, 189, 248, 0.4);
  touch-action: manipulation;
}

/* ==========================================================================
   Enhanced Khanda Floating Detail Card
   ========================================================================== */
.khanda-floating-card {
  max-height: 86vh !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

.khanda-floating-card::-webkit-scrollbar {
  width: 5px;
}
.khanda-floating-card::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 4px;
}

.khanda-meta-value.highlight-contractor {
  color: #38bdf8 !important;
  font-size: 0.82rem;
  line-height: 1.35;
}

[data-theme="light"] .khanda-meta-value.highlight-contractor {
  color: #0284c7 !important;
}

/* Expandable Structures & Assets Section */
.khanda-structures-expand-wrapper {
  margin: 10px 0 6px 0;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
}

[data-theme="light"] .khanda-structures-expand-wrapper {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(2, 132, 199, 0.25);
}

.khanda-structures-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="light"] .khanda-structures-toggle-btn {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #0f172a;
}

.khanda-structures-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(30, 41, 59, 0.95));
  color: #38bdf8;
}

[data-theme="light"] .khanda-structures-toggle-btn:hover {
  background: #cbd5e1;
  color: #0284c7;
}

.btn-left-label {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
}

.btn-arrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 800;
  padding: 2px 7px;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

[data-theme="light"] .btn-arrow {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}

.khanda-structures-accordion {
  max-height: 230px;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(10, 15, 29, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

[data-theme="light"] .khanda-structures-accordion {
  background: #ffffff;
  border-top-color: rgba(0, 0, 0, 0.08);
}

.khanda-struct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.16s ease;
}

[data-theme="light"] .khanda-struct-row {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(226, 232, 240, 0.9);
}

.khanda-struct-row:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(2px);
}

[data-theme="light"] .khanda-struct-row:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
}

.struct-row-icon {
  font-size: 1.15rem;
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .struct-row-icon {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.struct-row-body {
  flex: 1;
  min-width: 0;
}

.struct-row-title {
  font-size: 0.77rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

[data-theme="light"] .struct-row-title {
  color: #0f172a;
}

.struct-row-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

[data-theme="light"] .struct-row-desc {
  color: #64748b;
}

.struct-row-specs {
  font-size: 0.66rem;
  color: #38bdf8;
  font-weight: 600;
  margin-top: 1px;
}

.struct-chip-action {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
}

[data-theme="light"] .struct-chip-action {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}

/* ==========================================================================
   Dedicated Structure & Bridge Dossier Modal
   ========================================================================== */
.structure-dossier-card {
  max-width: 640px !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  padding: 24px 26px !important;
}

.struct-modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.struct-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.struct-modal-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.struct-modal-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 4px 0;
  line-height: 1.35;
}

[data-theme="light"] .struct-modal-title {
  color: #0f172a;
}

.struct-modal-corridor {
  font-size: 0.84rem;
  color: #94a3b8;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="light"] .struct-modal-corridor {
  color: #64748b;
}

.struct-modal-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

[data-theme="light"] .struct-modal-banner {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-color: rgba(2, 132, 199, 0.25);
}

.struct-modal-big-icon {
  font-size: 2.4rem;
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 12px;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
}

.struct-modal-banner-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e2e8f0;
}

[data-theme="light"] .struct-modal-banner-text {
  color: #334155;
}

.struct-specs-table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

[data-theme="light"] .struct-specs-table-grid {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.struct-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.struct-spec-item.full-width {
  grid-column: span 2;
}

.struct-spec-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.4px;
}

[data-theme="light"] .struct-spec-label {
  color: #64748b;
}

.struct-spec-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
}

[data-theme="light"] .struct-spec-val {
  color: #0f172a;
}

.struct-highlights-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

[data-theme="light"] .struct-highlights-card {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.22);
}

.struct-highlights-title {
  font-size: 0.80rem;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

[data-theme="light"] .struct-highlights-title {
  color: #059669;
}

.struct-highlights-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.5;
}

[data-theme="light"] .struct-highlights-list {
  color: #334155;
}

.struct-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.struct-btn-full-profile {
  flex: 1.4;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 10px 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.struct-btn-full-profile:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
}

.struct-btn-focus-map {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}

[data-theme="light"] .struct-btn-focus-map {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}

.struct-btn-focus-map:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .struct-btn-focus-map:hover {
  background: #0284c7;
  color: #ffffff;
}


/* ==========================================================================
   PROPOSED PROJECTS: VERIFIED CITIZEN PORTAL & LIVE MAP BEACONS
   ========================================================================== */

.modal-verified-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 18px;
  font-size: 0.86rem;
  color: var(--text-primary);
}

.verified-phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #10b981;
  color: #064e3b;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
}

.pulse-dot-green {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseBeacon 1.8s infinite;
}

.progress-slider-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-range-slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  outline: none;
  accent-color: #38bdf8;
  cursor: pointer;
}

/* 2 Photo Upload Grid: Before & After */
.photo-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .photo-upload-grid {
    grid-template-columns: 1fr;
  }
}

.photo-upload-box {
  background: var(--bg-subtle);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.photo-upload-box:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.photo-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.photo-optional-tag {
  font-size: 0.70rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.photo-preview-wrap {
  min-height: 120px;
  max-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
}

.photo-img-preview {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Custom Live Project Map Marker & Beacon */
.custom-live-project-beacon {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.live-beacon-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 2;
}

.live-beacon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  animation: liveBeaconPulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes liveBeaconPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

/* Rich Live Project Leaflet Popup Card */
.live-project-popup-card {
  font-family: inherit;
  min-width: 260px;
  max-width: 320px;
  color: var(--text-primary);
  padding: 4px;
}

.live-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.live-popup-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #38bdf8;
  color: #032b43;
  font-size: 0.70rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.live-popup-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 4px 0 6px 0;
  color: var(--text-primary);
}

.live-popup-headline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 10px;
}

.live-popup-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
}

.live-popup-meta-item {
  display: flex;
  flex-direction: column;
}

.live-popup-meta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.live-popup-meta-val {
  font-weight: 700;
  color: var(--text-primary);
}

.live-popup-quote-box {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.80rem;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.35;
}

.live-popup-photos-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.live-popup-photo-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.live-popup-actions {
  display: flex;
  gap: 8px;
}

.live-popup-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  color: #ffffff;
  border: none;
}


/* ==========================================================================
   PROPOSED PROJECTS UPLOAD MODAL - HIGH PRIORITY MOBILE & DESKTOP OVERLAYS
   ========================================================================== */
#projectUploadModal.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#projectUploadModal.modal-overlay.open,
#projectUploadModal.modal-overlay.active {
  display: flex !important;
}

#projectUploadModal .upload-modal-card {
  position: relative !important;
  z-index: 100000 !important;
  width: 100% !important;
  max-width: 780px !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: auto !important;
}

@media (max-width: 640px) {
  #projectUploadModal.modal-overlay {
    padding: 10px 8px !important;
    align-items: flex-start !important;
  }
  #projectUploadModal .upload-modal-card {
    padding: 22px 14px 20px 14px !important;
    max-height: 95vh !important;
    border-radius: 14px !important;
    margin-top: 12px !important;
  }
}


/* ==========================================================================
   HYBRID PROPOSE SYSTEM: 3-MODE TABS, MAP PICKER BAR & ROAD ROUTE BUILDER
   ========================================================================== */
.upload-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.upload-mode-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}

.upload-mode-tab > span {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.upload-mode-tab strong {
  display: block;
  font-size: 0.80rem;
  font-weight: 800;
  line-height: 1.2;
}

.upload-mode-tab small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.upload-mode-tab:hover {
  border-color: #38bdf8;
}

.upload-mode-tab.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.upload-mode-tab.active strong {
  color: #38bdf8;
}

@media (max-width: 640px) {
  .upload-mode-tabs {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .upload-mode-tab {
    padding: 8px 12px;
  }
}

/* Point Pick-on-Map Banner */
.point-map-picker-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.45);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.btn-map-pick-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #38bdf8;
  color: #082f49;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-map-pick-trigger:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-map-pick-trigger.secondary {
  background: #10b981;
  color: #022c22;
}

/* Road Route Builder Box */
.route-builder-box {
  background: rgba(56, 189, 248, 0.06);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.route-builder-header {
  font-size: 0.84rem;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 10px;
}

.route-method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.route-method-title {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.route-from-to-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.route-from-to-grid .form-control {
  flex: 1;
  min-width: 130px;
}

.route-arrow-sep {
  font-weight: 900;
  color: #38bdf8;
  font-size: 1.1rem;
}

.route-auto-coverage-box {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
}

.route-coverage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--text-primary);
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.coverage-chip.district {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
}

/* Update Existing Preview Card */
.update-project-preview-card {
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.80rem;
}

/* Floating Map Picker / Route Drawer Toolbar over #nepalMap */
.map-picker-floating-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  width: calc(100% - 28px);
  max-width: 640px;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  backdrop-filter: blur(10px);
}

.map-picker-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-picker-bar-info > span {
  font-size: 1.4rem;
}

.map-picker-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-picker-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.map-picker-btn.primary {
  background: #10b981;
  color: #022c22;
  border-color: #10b981;
}

.map-picker-btn.cancel {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}


/* ==========================================================================
   CLEAN MINIMAL POPUP CARD & FULL-PAGE DOSSIER (BABAL UI)
   ========================================================================== */
.clean-popup-card {
  background: var(--bg-card, #111827);
  border-radius: 14px;
  overflow: hidden;
  color: var(--text-primary, #f8fafc);
  font-family: inherit;
}

.clean-popup-photo-wrap {
  position: relative;
  width: 100%;
  height: 155px;
  background: #0f172a;
  overflow: hidden;
}

.clean-popup-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clean-popup-status-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 11px;
  border-radius: 9999px;
  font-size: 0.80rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.blink-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  animation: cleanDotBlink 1.3s infinite ease-in-out;
}

.blink-dot.green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.blink-dot.yellow {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.blink-dot.red {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes cleanDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.clean-popup-top-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.clean-popup-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.clean-popup-body {
  padding: 14px 15px 15px 15px;
}

.clean-popup-title {
  margin: 0 0 4px 0;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
}

.clean-popup-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.clean-popup-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.clean-popup-cell {
  background: var(--bg-subtle, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}

.clean-popup-cell-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.clean-popup-cell-val {
  display: block;
  font-size: 0.80rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.clean-popup-see-details-btn {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.clean-popup-see-details-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* Ensure Leaflet popup wraps clean-popup-card nicely */
.custom-live-beacon-popup .leaflet-popup-content-wrapper {
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: var(--bg-card, #111827) !important;
  border: 1px solid var(--border) !important;
}

.custom-live-beacon-popup .leaflet-popup-content {
  margin: 0 !important;
  width: 300px !important;
}

/* ==========================================================================
   FULL NEW PAGE DOSSIER (Exact Top Match + Chevron Details + Proposer Profile)
   ========================================================================== */
.fullpage-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
}

.fullpage-hero-photo-wrap {
  position: relative;
  width: 100%;
  height: 290px;
  background: #0f172a;
}

@media (max-width: 640px) {
  .fullpage-hero-photo-wrap {
    height: 210px;
  }
  .form-grid-3 {
    grid-template-columns: 1fr !important;
  }
}

.fullpage-details-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}

.fullpage-details-toggle-btn:hover {
  border-color: #38bdf8;
}

.chevron-down-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.fullpage-details-toggle-btn.open .chevron-down-icon {
  transform: rotate(180deg);
}

.fullpage-tech-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.fullpage-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .fullpage-tech-grid {
    grid-template-columns: 1fr;
  }
}

.fullpage-tech-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.fullpage-tech-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.fullpage-tech-val {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
}

.proposer-public-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 18px;
}

.proposer-public-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #10b981;
  flex-shrink: 0;
  background: #064e3b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
}


/* ==========================================================================
   2-STEP UPLOAD WIZARD, MAP SEARCH BAR & PRIVACY NOTE
   ========================================================================== */
.upload-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.step-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.step-pill.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 800;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.optional-fields-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}

.optional-fields-toggle-btn.open .chevron-down-icon {
  transform: rotate(180deg);
}

.privacy-phone-note {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.map-picker-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}

.map-picker-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 7px 10px;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
}

.map-picker-search-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.map-picker-search-input:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.15);
}


/* ==========================================================================
   v9.5 STATIC ROAD CENTER ICONS (NO BLINK) & ROAD SPLIT / CUT CONTROLS
   ========================================================================== */
.live-beacon-ring,
.custom-live-project-beacon .live-beacon-ring {
  display: none !important;
  animation: none !important;
}

.custom-live-project-beacon .live-beacon-core {
  animation: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55) !important;
}

.map-picker-btn.split {
  background: rgba(234, 179, 8, 0.22);
  border-color: #eab308;
  color: #fef08a;
}

.map-picker-btn.split.active {
  background: #eab308;
  color: #1e293b;
}

.map-picker-split-choice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.cut-point-marker-pin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  border: 2.5px solid #ffffff;
  color: #ffffff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   Before / After Sliding Comparison Photo
   ========================================================================== */
.clean-popup-status-pill,
.clean-popup-top-controls {
  z-index: 6 !important;
}

.ba-slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  --ba-pos: 50%;
}

.ba-slider-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-after-img {
  z-index: 1;
}

.ba-before-img {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--ba-pos)) 0 0);
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos);
  width: 2.5px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.65);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.ba-label {
  position: absolute;
  z-index: 4;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.ba-label-before {
  top: 10px;
  left: 10px;
}

.ba-label-after {
  bottom: 10px;
  right: 10px;
}

.ba-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
  -webkit-appearance: none;
  appearance: none;
}

/* ==========================================================================
   Admin Approval Queue Modal & Badge
   ========================================================================== */
.admin-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 800;
  margin-left: 4px;
}

.admin-approval-card {
  background: var(--bg-card, rgba(15, 23, 42, 0.72));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.admin-approval-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-type-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.admin-approval-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.admin-approval-thumbs img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-approval-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-approve {
  flex: 1;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-reject {
  flex: 1;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Citizen Profile View Mode + Contributions (Uploads & Edits)
   ========================================================================== */
.profile-pen-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.18));
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f8fafc);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.profile-pen-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  transform: scale(1.06);
}

.profile-view-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  margin-bottom: 14px;
}

.profile-view-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #be123c);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.profile-info-cell {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.10));
}

.profile-info-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.profile-info-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

.profile-contrib-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.profile-contrib-tab {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.profile-contrib-tab.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.profile-contrib-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.09));
  margin-bottom: 8px;
  cursor: pointer;
}

.profile-contrib-item:hover {
  border-color: #38bdf8;
}

/* ==========================================================================
   Worldwide Country Phone Picker + Green Circle Valid Badge
   ========================================================================== */
.phone-input-wrap {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.phone-country-select {
  max-width: 145px;
  min-width: 115px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--bg-main, #0f172a);
  color: var(--text-primary, #f8fafc);
  font-size: 0.80rem;
  font-weight: 700;
  cursor: pointer;
}

.phone-number-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.phone-number-box input {
  width: 100%;
  padding-right: 60px !important;
}

.phone-status-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}

.phone-valid-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.55);
}

body.map-picker-active .custom-milestone-marker-wrapper,
body.map-picker-active .mega-beacon-marker,
body.map-picker-active .leaflet-marker-icon:not(.route-vertex-handle) {
  pointer-events: none !important;
  opacity: 0.35 !important;
}
