/* ── DESIGN TOKENS ── */
:root {
  --red: #3b82f6;
  --red-dark: #2563eb;
  --red-light: #60a5fa;
  --cream: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --sidebar-w: 370px;
  --header-h: 60px;
  --blue: #3b82f6;
}

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

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--cream);
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── HEADER ── */
header {
  height: var(--header-h);
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}

.logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: .04em;
  white-space: nowrap;
}
.logo span { opacity: 1; font-weight: 700; }

.header-count {
  margin-left: auto;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* ── BODY ── */
.body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── SIDEBAR ── */
aside {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
  box-shadow: 2px 0 20px rgba(0,0,0,.04);
  position: relative;
  z-index: 10;
}

.search-wrap {
  padding: 16px 16px 10px;
}

.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.search-box input::placeholder {
  color: var(--muted);
  opacity: .7;
}
.search-box svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* ── CUSTOM SELECT (DISTRICTS) ── */
.custom-select-wrap {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.select-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.select-box {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all .2s;
}
.select-box:hover { border-color: var(--red); }
.select-box span {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}
.select-box svg { color: var(--muted); transition: transform .2s; }
.select-box.active svg { transform: rotate(180deg); }

.select-menu {
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-top: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  z-index: 100;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.select-menu.show { display: flex; flex-direction: column; animation: menuFadeIn .2s ease-out; }

.menu-search {
  padding: 10px;
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.menu-search input {
  width: 100%;
  padding: 8px 10px 8px 30px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: var(--cream);
}
.menu-search input:focus { border-color: var(--blue); }
.menu-search svg {
  position: absolute;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  opacity: 0.6;
}

#district-list {
  max-height: 300px;
  overflow-y: auto;
}

.select-actions {
  padding: 10px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.select-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-reset {
  background: var(--cream);
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-reset:hover { background: #f1f5f9; }
.btn-apply {
  background: var(--red);
  color: #fff;
  border: none;
}
.btn-apply:hover { background: var(--red-dark); transform: translateY(-1px); }

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

.select-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s;
}
.select-item:hover { background: #eff6ff; }
.select-item input {
  width: 16px; height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}
.select-item span { font-size: 13px; color: var(--ink); }

/* Remove old origin input styles */
.btn-navigate svg { flex-shrink: 0; }

/* ── LIST ── */
.list-header {
  padding: 4px 16px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}

.station-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.station-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s, border-left .15s;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-left: 3px solid transparent;
}
.station-item:hover { background: var(--cream); }
.station-item.active { background: #eff6ff; border-left: 3px solid var(--blue); }

.station-num {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  background: #dbeafe;
  border-radius: 6px;
  padding: 3px 6px;
  white-space: nowrap;
  margin-top: 1px;
  flex-shrink: 0;
}

.station-info { flex: 1; min-width: 0; }

.station-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-addr {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-tags {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: #EEF2FF;
  color: #4B5EBD;
}
.tag.district { background: #dbeafe; color: #1d4ed8; }

.btn-navigate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--blue);
  border: none;
  transition: all .2s;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}
.btn-navigate:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-navigate-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all .2s;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}
.btn-navigate-list:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ── MAP ── */
#map {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* ── LEAFLET CUSTOM ZOOM CONTROLS ── */
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 20px; }

.leaflet-bar {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.leaflet-bar a,
.leaflet-touch .leaflet-bar a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  color: var(--ink) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all .2s !important;
  margin-top: 10px !important;
}
.leaflet-bar a:hover,
.leaflet-touch .leaflet-bar a:hover {
  background: var(--blue) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3) !important;
}

/* ── CUSTOM POPUP ── */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  border: none;
  padding: 0;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0;
  min-width: fit-content;
}

.leaflet-popup-close-button {
  color: #fff !important;
  font-size: 18px !important;
  padding: 8px 10px 0 0 !important;
  z-index: 1001;
}
.leaflet-popup-close-button:hover {
  color: #e2e8f0 !important;
}


.user-loc-popup {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

.popup-img {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 2px solid var(--blue);
}

.popup-head {
  background: linear-gradient(135deg, var(--blue) 0%, #1e40af 100%);
  padding: 12px 16px;
  min-width: 240px;
}
.popup-head h3 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.popup-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.popup-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
}
.popup-row .label {
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  width: 90px;
}
.popup-row .val { color: var(--ink); }
.popup-actions {
  padding: 8px 16px 14px;
  display: flex;
  gap: 8px;
}
.popup-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .15s;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.popup-btn:hover { opacity: .85; transform: translateY(-1px); }
.popup-btn.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25);
}
.popup-btn.secondary {
  background: var(--cream);
  color: var(--ink);
  border: 1.5px solid var(--border);
}

/* ── ROUTING PANEL ── */
.directions-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 340px;
  max-height: calc(100vh - var(--header-h) - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn .3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.directions-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.directions-header h4 {
  font-size: 14px;
  font-weight: 600;
}
.close-directions {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  font-size: 14px;
  flex-shrink: 0;
}
.close-directions:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1);
}

#routing-instructions {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* ─── HIDE Leaflet Routing Machine's default UI completely ─── */
.leaflet-routing-container,
.leaflet-control.leaflet-routing-container,
.leaflet-top .leaflet-routing-container,
.leaflet-bottom .leaflet-routing-container,
.leaflet-right .leaflet-routing-container,
.leaflet-left .leaflet-routing-container,
div.leaflet-routing-container,
.leaflet-routing-container-hide,
#map .leaflet-control-container .leaflet-routing-container {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ─── Route destination card ─── */
.route-dest-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.route-dest-img {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
}
.route-dest-info {
  padding: 12px 16px;
}
.route-dest-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.route-dest-info p {
  font-size: 12px;
  color: var(--muted);
}
.route-dest-info p.extra {
  margin-top: 4px;
}
.route-dest-info p.extra strong {
  font-weight: 600;
  color: var(--ink);
}

/* ─── Route summary cards ─── */
.route-summary {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f0f7ff;
}
.route-stat {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.route-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}
.route-stat-label {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}

/* ─── Step-by-step guide ─── */
.route-steps {
  background: #f8fafc;
  padding: 8px 0;
}
.route-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 16px;
  transition: background .15s;
  cursor: default;
}
.route-step:hover {
  background: #eef5ff;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-detail {
  flex: 1;
  min-width: 0;
}
.step-text {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.45;
}
.step-dist {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}

/* ─── Loading & Error ─── */
.route-loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}
.route-loading::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.route-error {
  padding: 30px 20px;
  text-align: center;
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
}

/* ── EMPTY STATE ── */
.empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 50px 20px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
.empty svg { opacity: .25; }
.empty-text { font-weight: 500; }

/* ── LEGEND ── */
.map-legend {
  position: absolute;
  bottom: 30px;
  right: 16px;
  background: rgba(255,255,255,.96);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 500;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.legend-title { font-weight: 700; margin-bottom: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legend-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ── MY LOCATION BUTTON ── */
.my-location-btn {
  position: absolute;
  bottom: 130px;
  left: 10px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  color: var(--ink);
}
.my-location-btn:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}
.my-location-btn.locating { animation: pulse-loc 1s infinite; }
@keyframes pulse-loc {
  0%, 100% { box-shadow: 0 4px 15px rgba(59, 130, 246,.2); }
  50% { box-shadow: 0 4px 25px rgba(59, 130, 246,.5); }
}

/* ── MOBILE UI ELEMENTS ── */
.mobile-top-controls {
  display: none; /* Hidden on desktop */
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 1001;
  position: relative;
}

.top-controls-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Adjust the filter when inside the top bar */
.top-filter {
  flex: 1;
  padding: 0 !important;
  border-bottom: none !important;
}

.top-filter .select-label {
  display: none; /* Hide label in top bar */
}

.top-filter .select-menu {
  left: 0;
  right: 0;
  width: auto;
}

.list-toggle-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transition: all 0.2s;
}

.list-toggle-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.list-toggle-btn span {
  display: none; /* Hide text as requested, show icon only */
}

.sidebar-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1999;
  display: none;
  opacity: 0;
  transition: opacity .3s;
}
.sidebar-backdrop.show { display: block; opacity: 1; }

.sidebar-mobile-header {
  display: none;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.sidebar-mobile-header h4 { font-size: 15px; font-weight: 600; }
.close-sidebar {
  background: none; border: none; font-size: 20px; color: var(--muted); cursor: pointer;
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  .mobile-top-controls { display: block; }
  .sidebar-filter { display: none; } /* Hide the sidebar copy on mobile */
  header .header-count { display: none; }
  
  .body { flex-direction: column; }
  
  aside {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 75dvh;
    background: #fff;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  }
  aside.show { transform: translateY(0); }
  
  aside .search-wrap { display: block; padding-top: 10px; }
  .list-header { background: var(--cream); }
  .sidebar-mobile-header { display: flex; }

  #map { height: calc(100dvh - var(--header-h) - 62px); width: 100%; }
  
  .directions-panel {
    width: 100%;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 80dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(calc(100% - 33.33dvh)); /* Show 1/3 of viewport */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  }
  .directions-panel.expanded {
    transform: translateY(0);
  }
  
  .directions-header {
    border-radius: 20px 20px 0 0;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
  }
  /* Drag handle */
  .directions-header::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
  }
  
  .route-dest-card { display: none; }
  .directions-panel.expanded .route-dest-card { display: flex; }
  
  .route-steps { display: block; } /* Allow peeking at steps */
  
  .route-summary {
    padding: 10px 16px;
  }
  .route-stat {
    padding: 6px 10px;
  }
  .route-stat-value { font-size: 16px; }
  .route-stat-label { font-size: 10px; }
  

  
  .my-location-btn {
    bottom: 145px;
    left: 10px;
  }
  
  .leaflet-bottom .leaflet-control { margin-bottom: 25px; }
  .leaflet-bar a { margin-top: 5px !important; }
  
  .map-legend {
    bottom: 10px;
    right: 12px;
    left: auto;
    font-size: 11px;
    padding: 8px 12px;
  }
}
