/* style.css - Community Connect: South Delhi Civic Portal */

/* =========================================================
   1. Theme Variables & Technical Typography
   ========================================================= */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --background: #f8fafc;
  --card: #ffffff;
  --card-hover: #ffffff;
  --text: #0f172a;
  --border: #e2e8f0;
  --border-focus: #2563eb;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --input-bg: #ffffff;
  --pill-bg: #f1f5f9;
  --pill-text: #334155;
  --badge-bg: #e2e8f0;
  --badge-text: #334155;
  --header-bg: #ffffff;
  --modal-backdrop: rgba(15, 23, 42, 0.55);

  /* Status Colors */
  --status-reported-color: #b45309; /* High-visibility Amber */
  --status-reported-bg: #fef3c7;
  --status-reported-border: #fde68a;

  --status-inprogress-color: #1d4ed8; /* Terminal / Blueprint Blue */
  --status-inprogress-bg: #dbeafe;
  --status-inprogress-border: #bfdbfe;

  --status-resolved-color: #15803d; /* Terminal Emerald */
  --status-resolved-bg: #d1fae5;
  --status-resolved-border: #a7f3d0;

  /* Severity Colors */
  --sev-critical-color: #b91c1c;
  --sev-critical-bg: #fee2e2;
  --sev-critical-border: #fca5a5;

  --sev-high-color: #c2410c;
  --sev-high-bg: #ffedd5;
  --sev-high-border: #fdba74;

  --sev-medium-color: #a16207;
  --sev-medium-bg: #fef9c3;
  --sev-medium-border: #fde047;

  --sev-low-color: #0369a1;
  --sev-low-bg: #e0f2fe;
  --sev-low-border: #bae6fd;

  /* Tactile Sharp Geometry */
  --radius-card: 10px;
  --radius-btn: 8px;
  --radius-sm: 6px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 35px -10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
  --background: #090d16;
  --card: #111827;
  --card-hover: #162032;
  --text: #f8fafc;
  --border: #1f2937;
  --border-focus: #3b82f6;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.12);
  --input-bg: #0c121e;
  --pill-bg: #162032;
  --pill-text: #cbd5e1;
  --badge-bg: #1e293b;
  --badge-text: #94a3b8;
  --header-bg: #111827;
  --modal-backdrop: rgba(0, 0, 0, 0.75);

  --status-reported-color: #fbbf24;
  --status-reported-bg: rgba(245, 158, 11, 0.12);
  --status-reported-border: rgba(245, 158, 11, 0.3);

  --status-inprogress-color: #60a5fa;
  --status-inprogress-bg: rgba(37, 99, 235, 0.14);
  --status-inprogress-border: rgba(37, 99, 235, 0.32);

  --status-resolved-color: #34d399;
  --status-resolved-bg: rgba(16, 185, 129, 0.14);
  --status-resolved-border: rgba(16, 185, 129, 0.32);

  --sev-critical-color: #f87171;
  --sev-critical-bg: rgba(220, 38, 38, 0.18);
  --sev-critical-border: rgba(220, 38, 38, 0.35);

  --sev-high-color: #fb923c;
  --sev-high-bg: rgba(234, 88, 12, 0.18);
  --sev-high-border: rgba(234, 88, 12, 0.35);

  --sev-medium-color: #fcd34d;
  --sev-medium-bg: rgba(217, 119, 6, 0.18);
  --sev-medium-border: rgba(217, 119, 6, 0.35);

  --sev-low-color: #7dd3fc;
  --sev-low-bg: rgba(56, 189, 248, 0.14);
  --sev-low-border: rgba(56, 189, 248, 0.32);

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 25px 45px -10px rgba(0, 0, 0, 0.7);
}

/* =========================================================
   2. Base Styles & Global Resets
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Monospace Utilities */
.font-mono {
  font-family: var(--font-mono);
}

.issue-id-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--pill-bg);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.coord-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.timestamp-mono {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  user-select: none;
}

.lucide-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* =========================================================
   3. Header & Navigation Bar
   ========================================================= */
header.app-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 1px solid #1d4ed8;
}

.logo-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.76rem;
  color: var(--muted);
  display: block;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--pill-bg);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav-tab-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.nav-tab-btn.active {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nav-tab-btn:hover:not(.active) {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--pill-bg);
  border-color: var(--muted);
}

.theme-toggle-btn:active {
  transform: translateY(1px);
}

/* Tactile Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  border-color: #1d4ed8;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background-color: var(--pill-bg);
  border-color: var(--border-subtle);
}

.btn-outline.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Authority Banner */
.authority-banner {
  background: #0f172a;
  color: #f8fafc;
  padding: 0.5rem 1.5rem;
  font-size: 0.82rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
}

.authority-banner.active {
  display: flex;
}

/* =========================================================
   4. Main Content Layout & Project Overview Card
   ========================================================= */
main.main-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  flex: 1;
  width: 100%;
}

.project-intro-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}

.intro-text h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.intro-text p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 680px;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.intro-stats {
  display: flex;
  gap: 1rem;
}

.stat-box {
  background: var(--pill-bg);
  border: 1px solid var(--border);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-btn);
  text-align: center;
  min-width: 95px;
}

.stat-box .num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.stat-box .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

/* =========================================================
   5. Search Bar & Quick Filter Chips
   ========================================================= */
.filter-container {
  background: var(--card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.filter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.55rem 4.2rem 0.55rem 2.4rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-icon-left {
  position: absolute;
  left: 0.75rem;
  color: var(--muted);
  pointer-events: none;
}

.search-meta-hints {
  position: absolute;
  right: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.search-clear-btn:hover {
  color: var(--text);
  background: var(--pill-bg);
}

.search-clear-btn.visible {
  display: flex;
}

.secondary-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background-color: var(--input-bg);
  font-size: 0.82rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
  font-weight: 500;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

/* Quick Filter Chips (Tactile Monospace counts) */
.quick-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.category-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--pill-bg);
  color: var(--pill-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.08s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.category-pill-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}

.category-pill-btn:active {
  transform: translateY(1px);
}

.category-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: #1d4ed8;
}

.category-pill-btn .pill-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.category-pill-btn.active .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* =========================================================
   6. Civic Issues Grid & Dev-Crafted Cards
   ========================================================= */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.35rem;
}

.issue-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.issue-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-card-hover);
}

.issue-media {
  height: 185px;
  width: 100%;
  position: relative;
  background-color: #0f172a;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.issue-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-top-badges {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  right: 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

/* Technical Badges */
.badge {
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.badge-status-Reported {
  background: var(--status-reported-bg);
  color: var(--status-reported-color);
  border: 1px solid var(--status-reported-border);
}

.badge-status-InProgress {
  background: var(--status-inprogress-bg);
  color: var(--status-inprogress-color);
  border: 1px solid var(--status-inprogress-border);
}

.badge-status-Resolved {
  background: var(--status-resolved-bg);
  color: var(--status-resolved-color);
  border: 1px solid var(--status-resolved-border);
}

.badge-severity-Critical {
  background: var(--sev-critical-bg);
  color: var(--sev-critical-color);
  border: 1px solid var(--sev-critical-border);
}

.badge-severity-High {
  background: var(--sev-high-bg);
  color: var(--sev-high-color);
  border: 1px solid var(--sev-high-border);
}

.badge-severity-Medium {
  background: var(--sev-medium-bg);
  color: var(--sev-medium-color);
  border: 1px solid var(--sev-medium-border);
}

.badge-severity-Low {
  background: var(--sev-low-bg);
  color: var(--sev-low-color);
  border: 1px solid var(--sev-low-border);
}

.issue-body {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.issue-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.category-tag-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--pill-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.issue-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.issue-card:hover .issue-title {
  color: var(--primary);
}

.issue-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.issue-address {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.95rem;
}

.ai-summary-card {
  background: var(--pill-bg);
  border-left: 3px solid #8b5cf6;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.95rem;
  font-size: 0.82rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #8b5cf6;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.issue-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* =========================================================
   7. Tactile Upvote Button & Copy Link
   ========================================================= */
.upvote-btn {
  background: var(--pill-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease, background-color 0.15s ease;
}

.upvote-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.upvote-btn.upvoted {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

.upvote-btn:active {
  transform: translateY(1px);
}

.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.copy-link-btn:hover {
  color: var(--text);
  border-color: var(--border-focus);
}

.copy-link-btn:active {
  transform: translateY(1px);
}

.copy-tooltip-toast {
  color: #10b981 !important;
  border-color: #10b981 !important;
}

/* =========================================================
   8. Empty State Card
   ========================================================= */
.empty-state-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
}

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 1.25rem;
}

/* =========================================================
   9. Interactive Map View Container
   ========================================================= */
.map-view-container {
  display: none;
  flex-direction: column;
  gap: 1rem;
  height: calc(100vh - 175px);
  min-height: 560px;
}

.map-view-container.active {
  display: flex;
}

.map-view-split {
  display: flex;
  gap: 1.25rem;
  height: 100%;
}

.map-pane {
  flex: 2;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  background: var(--card);
}

#leafletMap {
  width: 100%;
  height: 100%;
  min-height: 480px;
}

.map-sidebar {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.custom-map-pin {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  cursor: pointer;
}

.custom-map-pin.critical { background-color: #dc2626; }
.custom-map-pin.high { background-color: #ea580c; }
.custom-map-pin.medium { background-color: #d97706; }
.custom-map-pin.low { background-color: #2563eb; }
.custom-map-pin.resolved { background-color: #10b981; }

/* =========================================================
   10. Authority Analytics Dashboard
   ========================================================= */
.analytics-view-container {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.analytics-view-container.active {
  display: flex;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  border: 1px solid var(--border);
}

.kpi-val {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.35rem;
}

.chart-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

table.management-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

table.management-table th {
  background: var(--pill-bg);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

table.management-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* =========================================================
   11. Modals & Status Stepper
   ========================================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  color: var(--text);
}

.modal-header {
  padding: 1.15rem 1.45rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.45rem;
}

.modal-footer {
  padding: 1rem 1.45rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  background-color: var(--pill-bg);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

/* Status Stepper on Issue Detail */
.status-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 1.25rem 0;
}

.status-stepper::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 16px;
  height: 2px;
  background-color: var(--border);
  z-index: 1;
}

.stepper-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: bold;
  color: var(--muted);
}

.stepper-step.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.stepper-step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.stepper-step.active .step-label {
  color: var(--primary);
}

.stepper-step.completed .step-label {
  color: #10b981;
}

.photo-upload-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius-btn);
  padding: 1.35rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--input-bg);
}

.photo-upload-box:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.photo-preview-container {
  margin-top: 0.75rem;
  max-height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: none;
}

.photo-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   12. Student Developer Footer
   ========================================================= */
footer.app-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-weight: 700;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .project-intro-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .charts-row {
    grid-template-columns: 1fr;
  }
  .map-view-split {
    flex-direction: column;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .filter-top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

.app-footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
}

.footer-container {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* Elevate Issue Cards on Hover */
.issue-card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform;
}

.issue-card:hover {
  transform: translateY(-6px) !important; /* Lifts the card up */
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3) !important;
}

/* Elevate Category Pills (Roads, Water, etc.) */
.category-pill-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}

.category-pill-btn:hover {
  transform: translateY(-3px) !important; /* Lifts the pill up */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2) !important;
}

.category-pill-btn:active {
  transform: translateY(1px) !important; /* Pushes down into the page when clicked */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================================
   12. Authentication UI & Dropdowns (Student-Dev Aesthetic)
   ========================================================= */
.auth-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.auth-tabs {
  display: flex;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 1.15rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.auth-tab-btn:hover:not(.active) {
  color: var(--text);
}

.auth-tab-btn.active {
  background: var(--card);
  color: var(--primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.auth-alert-box {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid #f59e0b;
  color: #b45309;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 1rem;
  line-height: 1.35;
}

[data-theme="dark"] .auth-alert-box {
  background: rgba(245, 158, 11, 0.18);
  border-color: #d97706;
  color: #fbbf24;
}

.form-control.input-error {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25) !important;
}

.user-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}

.user-chip-btn:hover {
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.user-avatar-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 230px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-modal);
  padding: 0.5rem;
  z-index: 1200;
  display: none;
  flex-direction: column;
  animation: authFadeInDown 0.15s ease;
}

.user-dropdown-menu.active {
  display: flex;
}

.user-dropdown-header {
  padding: 0.45rem 0.6rem 0.55rem;
}

.user-dropdown-handle {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.2;
}

.user-dropdown-email {
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.15rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.dropdown-item:hover {
  background: var(--pill-bg);
  color: var(--primary);
}

.dropdown-item-danger {
  color: #ef4444;
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

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