html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

:root {
  --panel-bg: #f9fafb;
  --panel-border: #e5e7eb;
  --danger: #ef4444;
  --chip-border: #1d4ed8;
  --marker-green: #15803d;
  --marker-blue: #1d4ed8;
  --marker-orange: #c2410c;
  --marker-red: #b91c1c;
  --marker-gray: #4b5563;
}

/* TOP COMBINED PILL BAR */
#topBar {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 50;
}

#menuBtn,
#searchIcon {
  background: none;
  border: none;
  font-size: 18px;
  color: black;
  cursor: pointer;
}

#searchInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: black;
  background: transparent;
}

#searchInput::placeholder {
  color: #555;
}

/* FILTER CHIPS */
#floatingFilters {
  position: absolute;
  top: 65px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}

.chip {
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: black;
  border: 1px solid #000;
  cursor: pointer;
}

.chip.active {
  background: #000;
  color: #ffffff;
}

/* REPORT BUTTON */
#reportBtn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ffffff;
  color: black;
  border-radius: 999px;
  border: 1px solid #000;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  z-index: 40;
}

/* ADMIN BADGE */
#adminBadge {
  position: absolute;
  top: 52px;
  right: 12px;
  background: rgba(15,23,42,0.9);
  color: #f9fafb;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  z-index: 40;
  display: none;
}

/* RIGHT PANEL */
#rightPanel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90%;
  background: var(--panel-bg);
  box-shadow: -2px 0 7px rgba(0,0,0,0.18);
  padding: 20px 20px 16px 20px;
  display: none;
  z-index: 30;
  overflow-y: auto;
  border-left: 1px solid var(--panel-border);
  box-sizing: border-box;
}

/* CIRCLE CLOSE BUTTONS (ALL) */
#cancelReport,
#closeContact,
#closeConditions,
#closeLegend,
#closeWelcome {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
}

/* specific placements */
#cancelReport {
  top: 12px;
  right: 12px;
}

#closeContact {
  top: 10px;
  right: 10px;
}

#closeConditions {
  top: 10px;
  right: 10px;
}

#closeLegend {
  top: 8px;
  right: 8px;
}

#closeWelcome {
  top: 8px;
  right: 8px;
}

/* REPORT HEADER BOX */
#reportHeaderBox {
  background: #eef0f2;
  border-radius: 12px;
  border: 1px solid #d5d7da;
  padding: 16px;
  margin-bottom: 18px;
}

#reportSubtitle {
  margin: 0;
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* FORM */
.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #374151;
}

#rightPanel select,
#rightPanel textarea,
#rightPanel input[type="text"],
#rightPanel input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background: #ffffff;
}

#rightPanel textarea {
  min-height: 80px;
  resize: vertical;
}

/* CONFIRM BOX */
.confirm-box {
  background: #f1f3f4;
  border: 1px solid #d1d5da;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  margin-bottom: 18px;
}

.confirm-box label {
  font-size: 13px;
  color: #374151;
  display: flex;
  gap: 8px;
}

/* SUBMIT BUTTON */
#submitReport {
  background: #0f172a;
  border: none;
  padding: 10px;
  color: #ffffff;
  width: 100%;
  cursor: pointer;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

/* CONTACT MODAL */
#contactModal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  max-width: 90%;
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 18px 16px 18px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.28);
  display: none;
  z-index: 999;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
}

#contactModal h3 {
  margin: 4px 0 2px 0;
  font-size: 17px;
  color: #0f172a;
}

.modal-subtitle {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #6b7280;
}

/* COUNTERS */
#counters {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 30;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* LEGEND BUTTON + PANEL */
#legendBtn {
  position: absolute;
  bottom: 40px;
  left: 10px;
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid #000;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  z-index: 31;
}

#legendPanel {
  position: absolute;
  bottom: 80px;
  left: 12px;
  width: 230px;
  background: #ffffffd9;
  backdrop-filter: blur(8px);
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  padding: 16px 14px 12px 14px;
  display: none;
  z-index: 60;
}

#legendTitle {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

#legendContent {
  font-size: 12px;
  color: #374151;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.18);
}

.legend-plastic {
  background: var(--marker-green);
}

.legend-mixed {
  background: var(--marker-blue);
}

.legend-hazardous {
  background: var(--marker-red);
}

.legend-household {
  background: var(--marker-orange);
}

.legend-other {
  background: var(--marker-gray);
}

/* USER LOCATION */
.user-location-wrapper {
  position: relative;
  width: 28px;
  height: 28px;
}

.user-location-pin {
  width: 28px;
  height: 28px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('data:image/svg+xml;utf8,<svg width="64" height="64" viewBox="0 0 24 24" fill="white" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M12 21s-6-4.5-6-10a6 6 0 1 1 12 0c0 5.5-6 10-6 10z"/><circle cx="12" cy="11" r="3"/></svg>');
  z-index: 2;
}

.user-location-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: userPulse 2s infinite;
}

@keyframes userPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  70% { transform: translate(-50%, -50%) scale(2.3); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* TOASTS */
#toastContainer {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  flex-direction: column;
  z-index: 500;
}

.toast {
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  transition: opacity .2s, transform .2s;
}

.toast.success {
  background: rgba(22,163,74,0.95);
}

.toast.error {
  background: rgba(220,38,38,0.95);
}

/* POPUPS */
.mapboxgl-popup {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

.mapboxgl-popup.minimal-popup .mapboxgl-popup-content {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.mapboxgl-popup-tip {
  display: none !important;
}

/* CONDITIONS PANEL */
#conditionsPanel {
  position: absolute;
  top: 95px;
  left: 12px;
  width: 300px;
  background: #ffffffd9;
  backdrop-filter: blur(10px);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  padding: 18px 18px 14px 18px;
  display: none;
  z-index: 45;
  animation: condSlide .25s ease-out;
}

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

#conditionsTitle {
  margin: 0;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

#conditionsSubtitle {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #6b7280;
}

#conditionsContent {
  font-size: 13px;
  color: #111;
  line-height: 1.45;
}

/* ===================== HAMBURGER MENU PANEL ===================== */
#menuPanel {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  display: none;
  z-index: 900;
  backdrop-filter: blur(10px);
}

#menuPanelInner {
  position: absolute;
  top: 70px;
  left: 12px;
  width: 260px;
  padding: 16px 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15,23,42,0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.menu-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 4px;
}

.menu-item {
  width: 100%;
  text-align: left;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 8px 12px;
  font-size: 13px;
  color: #111827;
  cursor: pointer;
}

.menu-item:hover {
  background: #111827;
  color: #ffffff;
}

/* ===================== STATIC PAGES (ABOUT / MANUAL) ===================== */

.static-shell {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #e0f2fe 0, #f9fafb 42%, #f3f4f6 100%);
  color: #0f172a;
}

.static-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.static-logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.static-logo-mark {
  height: 28px;
  width: auto;
}

/* ABOUT WATERMARK */
.about-watermark {
  position: fixed;
  inset: 0;
  background-image: url("images/logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 320px auto;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

.static-link {
  font-size: 13px;
  text-decoration: none;
  color: #111827;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: rgba(255,255,255,0.8);
}

.static-link:hover {
  background: #111827;
  color: #ffffff;
}

.static-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px 32px 16px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.static-hero {
  margin-top: 12px;
  margin-bottom: 32px;
}

.static-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.9);
}

.static-hero h1 {
  margin: 10px 0 6px 0;
  font-size: 32px;
}

.static-hero p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  max-width: 520px;
}

.static-section {
  margin-bottom: 28px;
  padding: 16px 16px 16px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 18px 35px rgba(15,23,42,0.08);
}

.static-section h2 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.static-section p {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: #4b5563;
}

.static-section ul {
  margin: 8px 0 0 16px;
  padding: 0;
  font-size: 14px;
  color: #374151;
}

.static-section li {
  margin-bottom: 6px;
}

/* Manual steps grid */
.manual-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.manual-step {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: center;
}

.manual-step h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
}

.manual-step p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
}

.manual-step img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
  object-fit: cover;
}

/* Stack on small screens */
@media (max-width: 720px) {
  .manual-step {
    grid-template-columns: 1fr;
  }
}

/* WELCOME MODAL */
#welcomeModal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  max-width: 90%;
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 18px 16px 18px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.28);
  display: none;
  z-index: 950;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
}

#welcomeModal h3 {
  margin: 4px 0 6px 0;
  font-size: 17px;
  color: #0f172a;
}

#welcomeModal p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
}