:root {
  --bg: #f4efe8;
  --ink: #1e1b16;
  --accent: #ff6b4a;
  --accent-dark: #cf5136;
  --surface: #fff7ef;
  --mystery: #f0c93d;
  --line: #e2d6c7;
  --shadow: 0 20px 40px rgba(30, 27, 22, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #ffe0c4, transparent 45%),
    radial-gradient(circle at 10% 90%, #ffd9d2, transparent 50%),
    var(--bg);
  min-height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 340px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(255, 247, 239, 0.9);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-weight: 700;
  border-radius: 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  box-shadow: var(--shadow);
}

.brand h1 {
  margin: 0;
  font-size: 1.6rem;
  font-family: "Space Grotesk", sans-serif;
}

.brand p {
  margin: 4px 0 0;
  color: #4a3f33;
  font-size: 0.9rem;
}

.panel {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(30, 27, 22, 0.08);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.muted {
  color: #6a5a49;
  font-size: 0.92rem;
  margin-top: 0;
}

.file-input {
  display: block;
  margin: 14px 0 10px;
  border: 2px dashed #d8c7b5;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  background: #fff;
}

.file-input input {
  display: none;
}

.file-input span {
  font-weight: 600;
}

.search-input {
  display: grid;
  gap: 8px;
  margin: 16px 0 12px;
  font-size: 0.9rem;
}

.search-input span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.search-input input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: "Space Grotesk", sans-serif;
}

.select-input {
  display: grid;
  gap: 8px;
  margin: 16px 0 12px;
  font-size: 0.9rem;
}

.select-input span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.select-input select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: "Space Grotesk", sans-serif;
  background: #fff;
}

.primary {
  width: 100%;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(255, 107, 74, 0.35);
}

.secondary {
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(255, 107, 74, 0.4);
}

.status {
  margin-top: 12px;
  font-size: 0.9rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 8px;
}

.chip-live {
  background: #ffefe9;
  color: #a33f29;
}

.chip-mystery {
  background: #fff7d4;
  color: #a17700;
}

.chip-gone {
  background: #ece8e2;
  color: #6f6458;
}

.report-list {
  display: grid;
  gap: 10px;
}

.filter-group {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.filter-row span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.demo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  flex-wrap: wrap;
}

.report img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.report small {
  color: #6a5a49;
}

.report-btn {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
}

.report-btn-clean {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.report-btn .btn-line {
  display: inline;
  margin-left: 6px;
}

.report-btn-poop {
  background: #fff;
}

.popup-card img {
  width: 140px;
  margin-top: 6px;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.map-wrap {
  flex: 1;
  position: relative;
}

#map {
  height: 100%;
}

.help-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 600;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 247, 239, 0.95);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(30, 27, 22, 0.12);
}

.map-overlay {
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 500;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 247, 239, 0.92);
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 16px rgba(30, 27, 22, 0.12);
  font-size: 0.85rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.poop {
  background: var(--accent-dark);
}

.dot.mystery {
  background: var(--mystery);
}

.leaflet-container {
  font-family: "Space Grotesk", sans-serif;
}

.marker-emoji {
  font-size: 28px;
  transform: translate(-6px, -6px);
}

.marker-logo {
  background: transparent;
  border: none;
}

.marker-logo svg {
  width: 36px;
  height: 36px;
  transform: translate(-18px, -34px);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.street-dot-wrapper {
  background: transparent;
  border: none;
}

.street-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
  display: block;
}

.street-counts {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.85rem;
}

.labels-pane {
  filter: contrast(1.35) saturate(1.2);
}


@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  #map {
    height: 60vh;
  }
}
