:root {
  --bg: #f7ebe7;
  --surface: rgba(255, 246, 242, 0.84);
  --surface-strong: rgba(255, 246, 242, 0.96);
  --accent: #e98272;
  --accent-line: #bb4f45;
  --ink: #182114;
  --muted: #67705b;
  --line: rgba(41, 56, 30, 0.12);
  --shadow: 0 24px 60px rgba(84, 71, 25, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(228, 82, 67, 0.22), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 164, 124, 0.3), transparent 22%),
    linear-gradient(160deg, #fff7f2 0%, #f5dfd8 48%, #ead1c9 100%);
}

.page-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 22px;
}

.hero {
  margin-bottom: 18px;
}

.hero-bar,
.processing-filters,
.map-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
}

.hero-bar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.category-tabs,
.processing-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.processing-filters {
  margin-bottom: 16px;
  padding: 12px;
}

.processing-filters.is-hidden {
  display: none;
}

.category-tab,
.status-chip {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.category-tab:hover,
.status-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(44, 57, 28, 0.16);
}

.category-tab.is-active,
.status-chip.is-active {
  background: color-mix(in srgb, var(--accent) 72%, white);
  border-color: var(--accent-line);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 210, 0.9),
    0 8px 18px rgba(191, 155, 39, 0.18);
}

.tab-symbol,
.chip-symbol {
  font-size: 20px;
  line-height: 1;
}

.map-card {
  padding: 10px;
}

#map {
  width: 100%;
  min-height: 78vh;
  border-radius: 22px;
  overflow: hidden;
  background: #e5ecd1;
}

.leaflet-container {
  font: inherit;
}

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

.emoji-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--marker-accent) 18%, white);
  box-shadow:
    0 16px 30px rgba(98, 83, 25, 0.18),
    0 0 0 7px color-mix(in srgb, var(--marker-accent) 18%, transparent);
  font-size: 24px;
  line-height: 1;
}

.parcel-popup {
  min-width: 228px;
  color: var(--ink);
}

.leaflet-popup-content-wrapper {
  border-radius: 22px;
  box-shadow: 0 20px 42px rgba(39, 39, 24, 0.18);
}

.leaflet-popup-content {
  margin: 16px 18px 14px;
}

.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px;
  background: rgba(250, 246, 234, 0.95);
  color: #4a4f3a !important;
  font-size: 18px !important;
  line-height: 24px !important;
  box-shadow: 0 8px 16px rgba(41, 46, 31, 0.16);
}

.leaflet-popup-close-button:hover {
  background: white;
  color: #1f2415 !important;
}

.parcel-popup h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.08;
}

.popup-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.popup-meta div {
  display: grid;
  gap: 3px;
}

.popup-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  color: var(--muted);
}

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

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(26, 33, 20, 0.1);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 22px rgba(35, 38, 20, 0.1);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.action-link img {
  display: block;
  width: 28px;
  height: 28px;
}

.action-link--big-map {
  color: #d6a900;
  font-size: 25px;
  text-decoration: none;
}

.action-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(35, 38, 20, 0.16);
}

.empty-state {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 251, 241, 0.96);
  color: var(--muted);
}

@media (max-width: 960px) {
  .page-shell {
    padding: 14px;
  }

  .hero-bar {
    flex-direction: column;
    align-items: stretch;
  }

  #map {
    min-height: 72vh;
  }
}
