/* ── CSS Variables (light / dark) ───────────────────────────────────────── */
:root {
  --pill-bg: rgba(255, 255, 255, 0.96);
  --pill-border: rgba(229, 231, 235, 1);
  --pill-text: #1a1a1a;
  --pill-sub: #6b7280;
  --pill-hover: rgba(243, 244, 246, 1);
  --nav-underline: #ffd000;
  --nav-hover-bg: rgba(255, 208, 0, 0.15);
  --overlay-bg: #ffffff;
  --overlay-hero: linear-gradient(135deg, #1a1a1a 0%, #111111 100%);
  --card-bg: #f9fafb;
  --card-border: #e5e7eb;
  --text-h: #111111;
  --text-body: #4b5563;
  --text-muted: #9ca3af;
  --input-bg: #ffffff;
  --input-border: #e5e7eb;
  --divider: rgba(229, 231, 235, 1);
  --search-bg: rgba(255, 255, 255, 0.96);
}
html[data-theme="dark"] {
  --pill-bg: rgba(17, 17, 17, 0.97);
  --pill-border: rgba(55, 65, 81, 0.9);
  --pill-text: #f3f4f6;
  --pill-sub: #9ca3af;
  --pill-hover: rgba(31, 41, 55, 1);
  --nav-hover-bg: rgba(255, 208, 0, 0.12);
  --overlay-bg: #111111;
  --overlay-hero: linear-gradient(135deg, #000000 0%, #111111 100%);
  --card-bg: #1f2937;
  --card-border: #374151;
  --text-h: #f9fafb;
  --text-body: #9ca3af;
  --text-muted: #6b7280;
  --input-bg: #1f2937;
  --input-border: #374151;
  --divider: rgba(55, 65, 81, 1);
  --search-bg: rgba(17, 17, 17, 0.97);
}

body {
  margin: 0;
}

/* ── Shared frosted surface (search, T-Code sidebar/sheet, multi-route) ── */
.explore-glass-card {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 231, 235, 0.6);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.06);
  color: var(--pill-text);
}
html[data-theme="dark"] .explore-glass-card {
  background: rgba(15, 23, 42, 0.92);
  border-color: var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32);
}
.explore-glass-interactive:hover {
  background: rgba(255, 255, 255, 0.96);
}
html[data-theme="dark"] .explore-glass-interactive:hover {
  background: rgba(30, 41, 59, 0.96) !important;
}

.explore-search-stack {
  touch-action: manipulation;
}

#explore-root {
  height: 100dvh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.search-results-heading {
  color: var(--text-muted);
  background: var(--card-bg);
  border-color: var(--divider);
}
.search-results-status,
.search-results-empty {
  color: var(--text-muted);
}

/* Hide Google Maps chrome */
.gm-style .gm-style-cc {
  display: none !important;
}
.gm-bundled-control {
  margin-bottom: 80px !important;
}

/* Eliminate tile seam lines in dark mode */
html[data-theme="dark"] #map img[src*="maps"] {
  filter: brightness(0.95) contrast(1.1);
}
html[data-theme="dark"] #map,
html[data-theme="dark"] #map > div {
  background: #111111 !important;
}

/* ── Pill (shared top-bar card style) ─────────────────────────────────── */
.pill {
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.06);
  color: var(--pill-text);
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}

/* ── Nav links ─────────────────────────────────────────────────────────── */
.center-nav-link {
  position: relative;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pill-sub);
  border-radius: 10px;
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.center-nav-link:hover {
  background: var(--nav-hover-bg);
  color: var(--pill-text);
}
.center-nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--nav-underline);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.center-nav-link:hover::after {
  transform: scaleX(1);
}

/* Mobile nav row version */
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pill-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: transparent;
  text-align: left;
}
.mobile-nav-link:hover {
  background: var(--pill-hover);
}

/* ── Icon buttons in top bar ───────────────────────────────────────────── */
.tb-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pill-sub);
  cursor: pointer;
  border: none;
  background: transparent;
  transition:
    background 0.15s,
    color 0.15s;
  flex-shrink: 0;
}
.tb-btn:hover {
  background: var(--pill-hover);
  color: var(--pill-text);
}

/* ── Dropdown (lang + app popup) ──────────────────────────────────────── */
.tb-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  overflow: hidden;
  animation: dropIn 0.18s ease-out both;
}
@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.map-controls {
  background: var(--pill-bg) !important;
  border-color: var(--pill-border) !important;
}

html[data-theme="dark"] .map-controls {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(55, 65, 81, 0.9) !important;
}

/* Search stack: one glass surface for input + dropdown (results inherit parent) */
#search-bar-card .explore-search-results {
  background: transparent;
  border-color: var(--divider);
}

/* ── Full-screen search overlay ──────────────────────────────────────────── */
#search-container.search-active {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  padding: 12px 12px 0 !important;
  z-index: 2000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  background: var(--pill-bg) !important;
  border-radius: 0 !important;
}
/* Inner flex-row wrapper → becomes a column, takes all remaining height */
#search-container.search-active > div:first-child {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden !important;
}
/* Hide multi-route buttons while search is active */
#search-container.search-active #multi-route-open-mobile,
#search-container.search-active #multi-route-open {
  display: none !important;
}
/* Search input flex-wrapper → fill full width as a column */
#search-container.search-active > div:first-child > div:first-child {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
}
/* Search bar card → flex col, fill height, round top only */
#search-container.search-active #search-bar-card {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  margin-top: 0 !important;
  border-radius: 16px 16px 0 0 !important;
  overflow: hidden !important;
}
/* Search glass icon → hide in active state (back button replaces it) */
#search-container.search-active .search-glass-icon {
  display: none !important;
}
/* Back button → show when active */
#search-container.search-active .search-back-btn {
  display: flex !important;
  color: var(--pill-text);
}
.search-back-btn:hover {
  background: var(--pill-hover);
}
/* Results → fill remaining space */
#search-container.search-active #search-results {
  flex: 1 !important;
  max-height: none !important;
  border-radius: 0 !important;
  overflow-y: auto !important;
}
/* Dark mode for full-screen search */
html[data-theme="dark"] #search-container.search-active {
  background: var(--pill-bg) !important;
}
.explore-search-input {
  color: var(--text-h);
  min-height: 40px;
}
.explore-search-input::placeholder {
  color: var(--text-muted);
}
.explore-type-filter-btn {
  color: var(--pill-sub);
}
.explore-type-filter-btn:hover {
  background: var(--pill-hover);
}
html[data-theme="dark"] .explore-type-filter-btn:hover {
  background: var(--pill-hover) !important;
}

html[data-theme="dark"] #search-input,
html[data-theme="dark"] .explore-search-input {
  color: var(--text-h) !important;
}
html[data-theme="dark"] .explore-search-input::placeholder {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] #search-clear {
  background: var(--card-border) !important;
  color: var(--pill-text) !important;
}
html[data-theme="dark"] #search-clear:hover {
  background: var(--pill-hover) !important;
}
html[data-theme="dark"] #search-results,
html[data-theme="dark"] .explore-search-results {
  background: transparent !important;
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] .search-result:hover {
  background: var(--pill-hover) !important;
}
html[data-theme="dark"] .search-result .text-gray-900 {
  color: var(--text-h) !important;
}
html[data-theme="dark"] .search-result .text-gray-500 {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] #search-results .border-t,
html[data-theme="dark"] #search-results .border-b,
html[data-theme="dark"] #search-results .border-gray-100,
html[data-theme="dark"] .explore-search-results .border-t,
html[data-theme="dark"] .explore-search-results .border-b,
html[data-theme="dark"] .explore-search-results .border-gray-100 {
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] #search-results .bg-gray-50,
html[data-theme="dark"] .explore-search-results .bg-gray-50 {
  background: var(--card-bg) !important;
}
html[data-theme="dark"] #search-results .text-gray-400,
html[data-theme="dark"] .explore-search-results .text-gray-400 {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] .search-results-status,
html[data-theme="dark"] .search-results-empty {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] .search-results-heading {
  color: var(--text-muted) !important;
  background: var(--card-bg) !important;
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] .search-place-icon-wrap {
  background-color: rgba(22, 101, 52, 0.35) !important;
}

html[data-theme="dark"] #type-filter-menu {
  background: var(--pill-bg) !important;
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] .search-type-btn:not(.active) {
  background: var(--pill-bg) !important;
  color: var(--text-muted) !important;
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] .search-type-btn:not(.active):hover {
  background: var(--pill-hover) !important;
}
html[data-theme="dark"] .search-type-btn.active {
  background: #ffd000 !important;
  color: #1a1a1a !important;
}

/* Dark detail panel */
html[data-theme="dark"] #detail-panel {
  background: rgba(15, 23, 42, 0.95) !important;
}
html[data-theme="dark"] #detail-panel .text-gray-900 {
  color: var(--text-h) !important;
}
html[data-theme="dark"] #detail-panel .text-gray-600 {
  color: var(--text-body) !important;
}
html[data-theme="dark"] #detail-panel .bg-gray-50 {
  background: var(--card-bg) !important;
}
html[data-theme="dark"] #detail-panel .bg-gray-100 {
  background: rgba(51, 65, 85, 0.5) !important;
}
html[data-theme="dark"] #detail-panel .hover\:bg-gray-200:hover {
  background: rgba(71, 85, 105, 0.6) !important;
}
html[data-theme="dark"] #detail-panel hr {
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] #detail-panel .border-gray-100 {
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] #detail-panel .drag-handle {
  background: var(--card-border) !important;
}

/* Dark map layer / zoom controls */
html[data-theme="dark"] #layer-btn,
html[data-theme="dark"] #locate-btn,
html[data-theme="dark"] #tilt-btn,
html[data-theme="dark"] #zoom-in-btn,
html[data-theme="dark"] #zoom-out-btn {
  color: var(--pill-text) !important;
}
html[data-theme="dark"] #zoom-in-btn:hover,
html[data-theme="dark"] #zoom-out-btn:hover {
  background: var(--pill-hover) !important;
}

/* ── Responsive: mobile nav menu + hamburger ──────────────────────────── */
#mobile-nav-menu {
  display: none;
}
#mobile-nav-menu.open {
  display: block;
}

/* Force-hide hamburger & its divider on desktop (overrides .tb-btn display:flex) */
@media (min-width: 1024px) {
  #mobile-nav-toggle,
  #mobile-nav-toggle + * {
    display: none !important;
  }
}

/* ── T-Code Sidebar (desktop) ──────────────────────────────────────────── */
#tcode-sidebar {
  display: none;
}
@media (min-width: 1024px) {
  #tcode-sidebar {
    display: block;
    transition: opacity 0.2s ease-in-out;
  }
}
#sidebar-list {
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#sidebar-collapse-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#sidebar-collapse-btn {
  transition:
    background 0.15s ease-in-out,
    transform 0.15s ease-in-out;
}
#sidebar-collapse-btn:hover {
  background: var(--pill-hover);
}
#sidebar-collapse-btn:active {
  transform: scale(0.9);
}
#tcode-sidebar .sidebar-item:hover {
  background: var(--pill-hover) !important;
}
#tcode-sidebar .sidebar-item.active {
  background: #fff3b0 !important;
}
html[data-theme="dark"] #tcode-sidebar .sidebar-item.active {
  background: rgba(255, 208, 0, 0.15) !important;
}
html[data-theme="dark"] #tcode-sidebar {
  background: transparent;
}
html[data-theme="dark"] #sidebar-header {
  border-color: var(--card-border) !important;
}

/* ── Mobile bottom sheet toggle button ─────────────────────────────────── */
#sheet-toggle {
  display: flex;
  left: 16px;
  bottom: 0;
  /* Dock to screen bottom; top corners rounded only */
  border-radius: 16px 16px 0 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  box-shadow:
    0 -4px 24px rgba(0, 0, 0, 0.08),
    0 -1px 0 rgba(0, 0, 0, 0.04);
}
html[data-theme="dark"] #sheet-toggle {
  box-shadow:
    0 -6px 28px rgba(0, 0, 0, 0.35),
    0 -1px 0 rgba(255, 255, 255, 0.06);
}
@media (min-width: 1024px) {
  #sheet-toggle {
    display: none;
  }
}

/* ── Mobile bottom sheet ────────────────────────────────────────────────── */
#tcode-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(229, 231, 235, 0.75);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
  color: var(--pill-text);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 70dvh;
  display: flex;
  flex-direction: column;
  /* Flush with physical bottom; respect home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html[data-theme="dark"] #tcode-sheet {
  background: rgba(15, 23, 42, 0.96);
  border-top-color: var(--card-border);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}
@media (min-width: 1024px) {
  #tcode-sheet {
    display: none !important;
  }
}
#tcode-sheet.open {
  transform: translateY(0);
}
#tcode-sheet .sheet-item:hover,
#tcode-sheet .sheet-item:active {
  background: var(--pill-hover) !important;
}
#tcode-sheet .sheet-item.active {
  background: #fff3b0 !important;
}
html[data-theme="dark"] #tcode-sheet .sheet-item.active {
  background: rgba(255, 208, 0, 0.15) !important;
}
#sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}
#sheet-backdrop.open {
  display: block;
}

/* ── Location permission popup ─────────────────────────────────────────── */
#location-popup {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}
#location-popup.open {
  opacity: 1;
  visibility: visible;
}
#location-popup-card {
  background: var(--overlay-bg);
  border-radius: 24px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#location-popup.open #location-popup-card {
  transform: translateY(0);
}

/* ── SOS countdown dark mode ───────────────────────────────────────────── */
html[data-theme="dark"] #panel-sos-countdown .text-red-600 {
  color: #f87171 !important;
}
html[data-theme="dark"] #panel-sos-countdown .text-red-400 {
  color: #f87171 !important;
}
html[data-theme="dark"] #panel-sos-badge {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

/* Multi-route open buttons use .explore-glass-card + .explore-glass-interactive */

/* Theme-aware multi-route brand marks: /assets/multi_route_light.svg, multi_route_dark.svg */
.multi-route-brand-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.multi-route-brand-icon img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.multi-route-brand-icon__light {
  display: block;
}
.multi-route-brand-icon__dark {
  display: none;
}
html[data-theme="dark"] .multi-route-brand-icon__light {
  display: none;
}
html[data-theme="dark"] .multi-route-brand-icon__dark {
  display: block;
}

/* Sidebar: less top offset when full-width multi-route button is hidden */
@media (max-width: 1023px) {
  #tcode-sidebar {
    top: 138px !important;
    max-height: calc(100dvh - 188px) !important;
  }
}

/* ── Multi-stop route: modal ───────────────────────────────────────────── */
#multi-route-modal-panel {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
html[data-theme="dark"] #multi-route-modal-panel {
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.55);
}
/* Header divider only (.explore-glass-card on modal shell) */
html[data-theme="dark"] #multi-route-modal .border-b {
  border-color: var(--divider) !important;
}
html[data-theme="dark"] #multi-route-title {
  color: var(--text-h) !important;
}
html[data-theme="dark"] #multi-route-close {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] #multi-route-close:hover {
  background: var(--pill-hover) !important;
}
/* Stop list area */
html[data-theme="dark"] #mr-stop-list {
  background: rgba(15, 23, 42, 0.95) !important;
}
html[data-theme="dark"] #mr-stop-list .text-gray-400 {
  color: var(--text-muted) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}
html[data-theme="dark"] .mr-stop-item {
  background: var(--card-bg) !important;
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] .mr-stop-item:hover {
  border-color: rgba(255, 208, 0, 0.5) !important;
}
html[data-theme="dark"] .mr-stop-item .text-gray-900 {
  color: var(--text-h) !important;
}
html[data-theme="dark"] .mr-stop-item .text-gray-500 {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] .mr-remove {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] .mr-remove:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
}
html[data-theme="dark"] #mr-manual-input {
  /* background: var(--input-bg) !important; */
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: var(--input-border) !important;
  color: var(--text-h) !important;
}
html[data-theme="dark"] #mr-manual-input::placeholder {
  color: var(--text-muted) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}
/* Radio mode labels */
html[data-theme="dark"] #multi-route-modal .text-gray-700 {
  color: var(--text-body) !important;
  border-color: var(--card-border) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}
/* Pick from map button */
html[data-theme="dark"] #mr-pick-from-map {
  background: var(--card-bg) !important;
  border-color: var(--card-border) !important;
  color: var(--text-body) !important;
}
html[data-theme="dark"] #mr-pick-from-map:hover {
  background: var(--pill-hover) !important;
}
/* Footer border */
html[data-theme="dark"] #multi-route-modal .border-t:last-child {
  border-color: var(--divider) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}

/* ── Multi-stop route: mode cards ──────────────────────────────────────── */
.mr-mode-card {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.mr-mode-card:hover {
  border-color: rgba(255, 208, 0, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.08);
}
.mr-mode-card.active {
  border-color: #ffd000 !important;
  box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.15);
}
.mr-mode-card.active .mr-mode-icon {
  background: #ffd000 !important;
  color: #1a1a1a !important;
}
.mr-mode-card.active .mr-mode-check {
  border-color: #ffd000 !important;
}
.mr-mode-card.active .mr-mode-check span {
  opacity: 1 !important;
}

html[data-theme="dark"] .mr-mode-card.active {
  background: rgba(255, 208, 0, 0.05) !important;
}
html[data-theme="dark"] .mr-mode-card:hover {
  background: rgba(255, 208, 0, 0.04) !important;
}

/* hover states for modal buttons with inline styles */
#mr-pick-from-map:hover {
  background: var(--pill-hover) !important;
}
#multi-route-close:hover {
  background: var(--pill-hover) !important;
}

/* ── Multi-stop route: pick bar ────────────────────────────────────────── */
html[data-theme="dark"] #mr-pick-bar {
  background: rgba(10, 14, 23, 0.97) !important;
  border-color: var(--divider) !important;
}
html[data-theme="dark"] #mr-pick-bar .text-gray-800 {
  color: var(--text-h) !important;
}

/* ── Multi-stop route: panel add/remove button ─────────────────────────── */
html[data-theme="dark"] #panel-add-to-route {
  border-color: var(--card-border) !important;
  color: var(--text-muted) !important;
}
html[data-theme="dark"] #panel-add-to-route:hover {
  border-color: rgba(255, 208, 0, 0.6) !important;
  color: var(--text-h) !important;
  background: rgba(255, 208, 0, 0.06) !important;
}

/* ── Multi-stop route: sidebar toggle buttons ──────────────────────────── */
html[data-theme="dark"] .mr-sb-btn {
  border-color: var(--card-border) !important;
}
html[data-theme="dark"] .mr-sb-btn:hover {
  border-color: rgba(255, 208, 0, 0.6) !important;
}

/* ── QR code container ─────────────────────────────────────────────────── */
.qr-box {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
  border: 1px solid #e2e8f0;
}
