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

:root {
  --teal-950: #062120;
  --teal-900: #0b3532;
  --teal-800: #0f4b47;
  --teal-700: #125e58;
  --teal-600: #15746c;
  --teal-500: #1f9186;
  --teal-300: #71cec0;
  --teal-100: #d3f1ec;
  --teal-50: #eefaf8;
  --signal-400: #f5b241;
  --signal-500: #eb9a1e;
  --signal-600: #c97e11;
  --paper: #f6f7f5;
  --concrete: #edebe4;
  --concrete-dark: #d8d4c8;
  --ink: #0e1f1c;
  --muted: #6b7280;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  margin: 0;
  font-weight: 700;
}

button {
  cursor: pointer;
  font-family: inherit;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
}

nav.main-nav {
  position: sticky;
  top: 0;
  z-index: 1100; /* FIXED – above Leaflet controls */
  background: rgba(246,247,245,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(11,53,50,0.1);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--teal-900);
}

.brand-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--teal-900);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(11,53,50,0.55);
  transition: background 0.2s, color 0.2s;
}

.tab-btn:hover {
  background: rgba(11,53,50,0.06);
  color: var(--teal-900);
}

.tab-btn.active {
  background: rgba(11,53,50,0.1);
  color: var(--teal-900);
}

.cta-btn {
  background: var(--signal-500);
  color: var(--teal-950);
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(11,53,50,0.4);
  transition: background 0.2s, transform 0.1s;
}

.cta-btn:hover {
  background: var(--signal-400);
}

.cta-btn:active {
  transform: scale(0.97);
}

.login-btn {
  background: none;
  border: 1.5px solid rgba(11,53,50,0.22);
  color: var(--teal-900);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.login-btn:hover {
  background: rgba(11,53,50,0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--teal-900);
  padding: 4px;
}

.mobile-actions {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--teal-950);
  color: white;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url(images/home.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 24px 90px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--teal-100);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  max-width: 600px;
}

.hero h1 span {
  display: block;
  color: var(--teal-300);
}

.hero p {
  max-width: 520px;
  font-size: 17px;
  color: rgba(255,255,255,0.78);
  margin-top: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.ghost-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}

.ghost-btn:hover {
  background: rgba(255,255,255,0.1);
}

section.block {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal-600);
}

.block h2 {
  font-size: 28px;
  margin-top: 8px;
  color: var(--teal-950);
}

.subtitle {
  color: var(--muted);
  margin-top: 8px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.link-arrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal-700);
  text-decoration: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.step-card {
  background: #cbb385;
  border: 1px solid rgba(11,53,50,0.08);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(11,53,50,0.06), 0 8px 24px -12px rgba(11,53,50,0.15);
}

.step-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: #f3e8c1;
  border: 1px solid rgba(11,53,50,0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(11,53,50,0.06), 0 8px 24px -12px rgba(11,53,50,0.15);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: var(--concrete);
}

.card-body {
  padding: 14px;
}

.badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245,178,65,0.18);
  color: #8a5c07;
}

.time-txt {
  font-size: 12px;
  color: var(--muted);
}

.card-desc {
  font-size: 13px;
  color: rgba(14,31,28,0.75);
  margin: 0 0 6px;
  min-height: 32px;
}

.cat-tag {
  position: relative;
  top: -32px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-900);
}

.empty {
  border: 2px dashed var(--concrete-dark);
  border-radius: 18px;
  padding: 56px 24px;
  text-align: center;
  background: white;
}

.empty h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.empty p {
  color: var(--muted);
  font-size: 14px;
  max-width: 340px;
  margin: 0 auto 16px;
}

.form-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.field {
  margin-bottom: 26px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--teal-950);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-chip {
  border: 1.5px solid var(--concrete-dark);
  background: white;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(11,53,50,0.6);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.cat-chip.selected {
  border-color: transparent;
  color: white;
}

textarea {
  width: 100%;
  border: 1.5px solid var(--concrete-dark);
  border-radius: 16px;
  padding: 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  background: white;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.dropzone {
  height: 220px;
  border: 2px dashed var(--concrete-dark);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: rgba(11,53,50,0.03);
  cursor: pointer;
}

.dropzone:hover {
  border-color: var(--teal-500);
}

.dropzone .dz-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.dz-hint {
  font-size: 12px;
  color: var(--muted);
}

.photo-preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--concrete-dark);
}

.photo-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.remove-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(6,33,32,0.7);
  color: white;
  font-size: 16px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}

.status-line.info {
  color: var(--teal-700);
}

.status-line.warn {
  color: #a9670a;
}

#picker-map,
#main-map {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--concrete-dark);
}

#picker-map {
  height: 230px;
}

.coord-txt {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.error-txt {
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}

.submit-btn {
  width: 100%;
  background: var(--signal-500);
  border: none;
  border-radius: 999px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal-950);
  box-shadow: 0 6px 16px -6px rgba(11,53,50,0.4);
  transition: background 0.2s;
}

.submit-btn:hover {
  background: var(--signal-400);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.use-loc-btn {
  background: none;
  border: none;
  color: var(--teal-700);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.success-box {
  max-width: 440px;
  margin: 0 auto;
  padding: 90px 24px;
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(31,145,134,0.12);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
}

.success-box h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.success-box p {
  color: var(--muted);
  margin-bottom: 22px;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.secondary-btn {
  background: none;
  border: 1.5px solid var(--concrete-dark);
  color: var(--teal-900);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}

.secondary-btn:hover {
  background: rgba(11,53,50,0.05);
}

.view#view-map {
  background: var(--concrete);
  min-height: calc(100vh - 60px);
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid rgba(11,53,50,0.08);
  box-shadow: 0 2px 10px -4px rgba(11,53,50,0.1);
}

.map-toolbar .filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-900);
  margin-right: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--concrete-dark);
  background: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(11,53,50,0.6);
  transition: all 0.2s ease;
}

.filter-chip:hover {
  border-color: var(--teal-500);
  color: var(--teal-700);
}

.filter-chip.active {
  background: var(--teal-900);
  color: white;
  border-color: transparent;
}

.filter-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  background: var(--concrete);
  padding: 4px 10px;
  border-radius: 999px;
}

#main-map {
  width: 100%;
  height: 520px;
  background: var(--concrete);
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11,53,50,0.2);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  width: 240px !important;
}

.popup-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  border-bottom: 3px solid var(--signal-500);
}

.popup-body {
  padding: 12px;
  background: var(--paper);
}

.popup-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.popup-cat {
  font-weight: 700;
  font-size: 14px;
  color: var(--teal-900);
}

.popup-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245,178,65,0.2);
  color: #8a5c07;
}

.popup-desc {
  font-size: 12px;
  color: rgba(14,31,28,0.7);
  margin: 6px 0;
  line-height: 1.4;
}

.popup-time {
  font-size: 11px;
  color: var(--muted);
}

.leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--teal-900) !important;
  border: 1px solid var(--concrete-dark) !important;
}

.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255,255,255,0.8) !important;
}

.civic-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 3px;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(11,53,50,0.35);
}

.civic-pin span {
  transform: rotate(-45deg);
  font-size: 14px;
}

footer {
  background: var(--teal-950);
  color: rgba(209,241,236,0.6);
  padding: 30px 24px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }
  .tabs {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--concrete-dark);
    padding: 10px 20px;
    flex-direction: column;
    align-items: stretch;
    display: none;
  }
  .tabs.open {
    display: flex;
  }
  .tab-btn {
    width: 100%;
    text-align: left;
    padding: 12px;
    border-radius: 10px;
  }
  .mobile-actions {
    display: flex;
  }
  .mobile-actions .login-btn,
  .mobile-actions .cta-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .nav-actions {
    display: none;
  }
  #main-map {
    height: 400px;
  }
  .map-toolbar {
    padding: 10px 14px;
  }
}