:root {
  --ink:#10233b; --ink-soft:#41556b; --panel:#f7f9fb; --panel-2:#ffffff; --line:#dce3ea;
  --pin:#3b82f6; --accent:#d1495b;
  --ui-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --ink:#e8edf3; --ink-soft:#a9b6c4; --panel:#0f1720; --panel-2:#161f2b; --line:#2a3746;
    --pin:#60a5fa; }
}
:root[data-theme="dark"] { --ink:#e8edf3; --ink-soft:#a9b6c4; --panel:#0f1720; --panel-2:#161f2b;
  --line:#2a3746; --pin:#60a5fa; }
:root[data-theme="light"] {
  --ink:#10233b; --ink-soft:#41556b; --panel:#f7f9fb; --panel-2:#ffffff; --line:#dce3ea;
  --pin:#3b82f6;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { font: 15px/1.45 var(--ui-font); color: var(--ink); background: var(--panel); }
#map { width: 100%; height: 100vh; height: 100dvh; }
a:focus-visible { outline: 2px solid var(--pin); outline-offset: 1px; }

/* Position Leaflet controls cleanly below top nav bar on all screen sizes */
.leaflet-top.leaflet-left {
  top: 58px !important;
  left: 12px !important;
}

@media (max-width: 640px) {
  .leaflet-top.leaflet-left {
    top: 56px !important;
    left: 10px !important;
  }
}

/* overlays sit above Leaflet's panes (max 800) and its controls (1000) */
/* Leaflet Attribution with intelQong brand */
.leaflet-control-attribution {
  font-size: 11px !important;
  background: var(--panel-2) !important;
  color: var(--ink-soft) !important;
  border-radius: 4px 0 0 0 !important;
  padding: 2px 8px !important;
  box-shadow: 0 1px 4px rgba(16,35,59,.12);
}
.leaflet-control-attribution a {
  color: var(--ink-soft) !important;
  text-decoration: none;
}
.leaflet-control-attribution a:hover {
  text-decoration: underline;
  color: var(--ink) !important;
}
.attribution-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  vertical-align: middle;
}
.attribution-logo {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
}
.brand-q-icon {
  width: 14px;
  height: 14px;
  color: #C8F751;
  display: inline-block;
  vertical-align: -2px;
  margin: 0 1px;
}

.brand-lock-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 6px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.brand-lock-logo {
  border-radius: 8px;
}
.brand-lock-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.top-nav-bar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(520px, calc(100% - 24px));
}
.top-brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #0A0B0D;
  border: 1px solid #2a3746;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.top-brand-badge:hover {
  border-color: #C8F751;
  box-shadow: 0 0 14px rgba(200, 247, 81, 0.4);
  transform: translateY(-1px);
}
.top-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.drawer-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  background: #0A0B0D;
  border: 1px solid #2a3746;
  padding: 2px;
}
.search-input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  box-shadow: 0 2px 8px rgba(16,35,59,.18);
}
.search-input:focus-visible { outline: 2px solid var(--pin); outline-offset: 1px; }
.search-input.miss { border-color: var(--accent); }   /* typed text matched no university */

/* Hamburger Menu Button */
.btn-hamburger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16,35,59,.18);
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-hamburger:hover {
  border-color: var(--pin);
  color: var(--pin);
  transform: translateY(-1px);
}
.menu-active-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* loading / fetch-failure notice — bottom-left, clear of the zoom control and the search box */
.loading { position: absolute; bottom: 12px; left: 12px; z-index: 1100; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2);
  color: var(--ink-soft); font-size: .82rem; box-shadow: 0 1px 3px rgba(16,35,59,.25); }
.loading.error { color: var(--accent); font-weight: 600; }

/* GPU acceleration for butter-smooth 60fps zooming and panning */
.leaflet-container,
.leaflet-tile-container,
.leaflet-marker-pane,
.leaflet-zoom-animated {
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* map markers — teardrop: square rotated -45deg so the unrounded corner points at the coordinate */
.uni-pin {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin);
  border: 2px solid #fff;
  filter: drop-shadow(0 2px 3px rgba(16,35,59,.4));
  transition: background-color .15s ease, opacity .15s ease;
}
.uni-pin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
}
.uni-pin:hover { transform: rotate(-45deg) scale(1.18); transition: transform 0.12s ease; z-index: 1000; }

/* Selected / Highlighted Pin (Solid Clean Emerald Green - No Glow) */
.uni-pin.is-selected {
  background: #10b981 !important;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  filter: drop-shadow(0 2px 4px rgba(16, 35, 59, 0.35));
  transform: rotate(-45deg);
  z-index: 1000;
}
.uni-pin.is-selected::after {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
}
.uni-pin.is-selected:hover {
  transform: rotate(-45deg) scale(1.18);
  transition: transform 0.12s ease;
}

/* Dimmed / Inactive Pin (when selection is active) */
.uni-pin.is-dimmed {
  background: #64748b !important;
  opacity: 0.35;
  transform: rotate(-45deg) scale(0.85);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.uni-pin.is-dimmed:hover {
  opacity: 0.85;
  transform: rotate(-45deg) scale(1.05);
}

/* Leaflet Tooltips & University Name Badges */
.leaflet-tooltip.uni-label {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  font: 600 11.5px var(--ui-font);
  box-shadow: 0 2px 6px rgba(16, 35, 59, 0.15);
  white-space: nowrap;
}

/* Selected University Name Badge (Opens on Hover/Tap) */
.leaflet-tooltip.is-selected-label {
  background: #ffffff !important;
  color: #065f46 !important;
  border: 1.5px solid #10b981 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(16, 35, 59, 0.18) !important;
  border-radius: 6px !important;
  padding: 3px 9px !important;
  font-size: 12px !important;
}
@media (prefers-color-scheme: dark) {
  .leaflet-tooltip.is-selected-label {
    background: #161f2b !important;
    color: #34d399 !important;
    border-color: #059669 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  }
}
:root[data-theme="dark"] .leaflet-tooltip.is-selected-label {
  background: #161f2b !important;
  color: #34d399 !important;
  border-color: #059669 !important;
}

/* popups — name, address, website link and highlight toggle */
.popup { font: 13px/1.4 var(--ui-font); color: var(--ink); min-width: 200px; padding: 2px 0; }
.popup h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.popup .popup-addr { margin: 6px 0 10px; font-size: .8rem; color: var(--ink-soft); line-height: 1.35; }
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.btn-popup-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid #10b981;
  border-radius: 6px;
  color: #059669;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-popup-highlight:hover {
  background: #10b981;
  color: #ffffff;
}
.btn-popup-highlight.is-active {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}
.popup .popup-web {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--pin);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.popup .popup-web:hover {
  background: var(--pin);
  color: #fff;
  border-color: var(--pin);
}

/* Hamburger Sliding Menu Drawer */
.menu-drawer {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1200;
  width: min(390px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(16,35,59,.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInDown .18s ease-out;
}
.menu-drawer[hidden] {
  display: none !important;
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.drawer-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}
.drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}
.drawer-title {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.btn-icon-close {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.btn-icon-close:hover {
  background: var(--line);
  color: var(--ink);
}

.drawer-section-title {
  font-family: var(--display-font);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  margin: 8px 0 4px;
}
.drawer-view-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.btn-map-mode {
  flex: 1;
  padding: 6px 4px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}
.btn-map-mode:hover {
  border-color: var(--pin);
  color: var(--ink);
}
.btn-map-mode.is-active {
  background: var(--pin);
  color: #ffffff;
  border-color: var(--pin);
}
.btn-mode-lock {
  flex: 0 0 58px;
}

.drawer-search-row {
  margin-bottom: 8px;
}
.drawer-filter-input {
  width: 100%;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
}
.drawer-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.btn-chip {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.btn-chip:hover {
  border-color: var(--pin);
  color: var(--ink);
}
.btn-chip-danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-chip-danger:hover {
  background: #ef4444;
  color: #ffffff;
}
.paste-box-wrapper {
  margin-top: 8px;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.paste-box-wrapper textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  font: inherit;
  font-size: 0.78rem;
  resize: vertical;
  background: var(--panel);
  color: var(--ink);
}
.paste-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}
.btn-chip-primary {
  padding: 4px 10px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-chip-subtle {
  padding: 4px 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--ink-soft);
  cursor: pointer;
}

/* Drawer List */
.drawer-uni-list {
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background-color 0.12s ease;
}
.drawer-item:hover {
  background: var(--panel);
}
.drawer-item.is-selected {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}
.drawer-item-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}
.drawer-checkbox {
  margin-top: 3px;
  accent-color: #10b981;
  cursor: pointer;
}
.drawer-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.drawer-item.is-selected .drawer-item-name {
  color: #059669;
}
.drawer-item-tags {
  display: flex;
  gap: 4px;
}
.tag-city, .tag-region {
  font-size: 0.7rem;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
}
.btn-zoom-uni {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}
.btn-zoom-uni:hover {
  opacity: 1;
  background: var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .uni-pin { transition: none; }
}

/* ==========================================================================
   Passkey Lockscreen & Access Control UI
   ========================================================================== */
.lockscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 32, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lockscreen-card {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
}

.lock-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: var(--pin);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.lock-icon {
  width: 28px;
  height: 28px;
}

.lock-title {
  margin: 0 0 8px 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lock-desc {
  margin: 0 0 20px 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.auth-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  text-align: left;
  line-height: 1.4;
  word-break: break-word;
}
.auth-status.info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--pin);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.auth-status.success {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.auth-status.error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.lock-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary, .btn-secondary, .btn-accent, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--pin);
  color: #ffffff;
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.fingerprint-icon {
  width: 20px;
  height: 20px;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
  font-size: 0.85rem;
  font-weight: 500;
}
.btn-secondary:hover {
  background: var(--panel);
  color: var(--ink);
}

.btn-accent {
  background: #10b981;
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 14px;
}
.btn-accent:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-size: 0.8rem;
  padding: 6px 12px;
}
.btn-outline:hover {
  background: var(--panel);
}

.divider {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.setup-panel {
  text-align: left;
  margin-top: 16px;
  animation: fadeIn .15s ease-out;
}
.setup-panel h3 {
  margin: 0 0 6px 0;
  font-size: 1rem;
}
.setup-desc {
  margin: 0 0 12px 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.form-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.text-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}
.text-input:focus {
  outline: 2px solid var(--pin);
}

.keys-list {
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.keys-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.empty-keys {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 6px 0;
}
.key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.key-meta {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.btn-del-key {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.85rem;
  border-radius: 4px;
}
.btn-del-key:hover {
  background: rgba(239, 68, 68, 0.15);
}

.export-box {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}
.export-info {
  margin: 0 0 8px 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

@media (max-width: 640px) {
  .top-nav-bar {
    top: 10px;
    width: calc(100% - 20px);
    left: 10px;
    transform: none;
    gap: 6px;
  }
  .search-input {
    font-size: 0.82rem;
    padding: 7px 12px;
  }
  .btn-hamburger {
    width: 36px;
    height: 36px;
  }
  .menu-drawer {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 16px);
  }
  .bottom-brand-badge {
    bottom: 8px;
  }
}

/* ==========================================================================
   Comprehensive Dark Mode Styles & Leaflet Dark Overrides
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  /* Leaflet Popups in Dark Mode */
  .leaflet-popup-content-wrapper,
  .leaflet-popup-tip {
    background: #161f2b !important;
    color: #e8edf3 !important;
    border: 1px solid #2a3746 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
  }
  .leaflet-popup-close-button {
    color: #94a3b8 !important;
    padding: 6px 8px 0 0 !important;
  }
  .leaflet-popup-close-button:hover {
    color: #f1f5f9 !important;
  }
  .popup {
    color: #e8edf3 !important;
  }
  .popup h3 {
    color: #f8fafc !important;
  }
  .popup .popup-addr {
    color: #94a3b8 !important;
  }
  .popup .popup-web {
    background: #0f1720 !important;
    border-color: #2a3746 !important;
    color: #60a5fa !important;
  }
  .popup .popup-web:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
  }
  .btn-popup-highlight {
    background: #0f1720 !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
  }
  .btn-popup-highlight:hover,
  .btn-popup-highlight.is-active {
    background: #10b981 !important;
    color: #ffffff !important;
  }
  .tag-city, .tag-region {
    background: #0f1720 !important;
    border-color: #2a3746 !important;
    color: #94a3b8 !important;
  }

  /* Leaflet Zoom Controls */
  .leaflet-bar {
    border-color: #2a3746 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  }
  .leaflet-bar a {
    background: #161f2b !important;
    color: #e8edf3 !important;
    border-color: #2a3746 !important;
  }
  .leaflet-bar a:hover {
    background: #0f1720 !important;
    color: #60a5fa !important;
  }
  .leaflet-bar a.leaflet-disabled {
    background: #0f1720 !important;
    color: #475569 !important;
  }

  /* Leaflet Tooltips */
  .leaflet-tooltip.uni-label {
    background: #161f2b !important;
    color: #e8edf3 !important;
    border-color: #2a3746 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  }

  /* Leaflet Attribution */
  .leaflet-control-attribution {
    background: rgba(15, 23, 32, 0.85) !important;
    color: #94a3b8 !important;
    border-top: 1px solid #2a3746 !important;
    border-left: 1px solid #2a3746 !important;
    backdrop-filter: blur(8px) !important;
  }
  .attribution-brand {
    color: #f1f5f9 !important;
  }

  /* Search & Top Nav */
  .search-input {
    background: #161f2b !important;
    border-color: #2a3746 !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
  }
  .search-input::placeholder {
    color: #64748b !important;
  }
  .btn-hamburger {
    background: #161f2b !important;
    border-color: #2a3746 !important;
    color: #f8fafc !important;
  }

  /* Drawer UI */
  .menu-drawer {
    background: #161f2b !important;
    border-color: #2a3746 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65) !important;
  }
  .drawer-header {
    background: #0f1720 !important;
    border-bottom-color: #2a3746 !important;
  }
  .drawer-filter-input {
    background: #0f1720 !important;
    border-color: #2a3746 !important;
    color: #f8fafc !important;
  }
  .drawer-filter-input::placeholder {
    color: #64748b !important;
  }
  .btn-map-mode {
    background: #0f1720 !important;
    border-color: #2a3746 !important;
    color: #94a3b8 !important;
  }
  .btn-map-mode:hover {
    color: #f8fafc !important;
    border-color: #60a5fa !important;
  }
  .btn-map-mode.is-active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
  }
  .btn-chip {
    background: #0f1720 !important;
    border-color: #2a3746 !important;
    color: #94a3b8 !important;
  }
  .btn-chip:hover {
    color: #f8fafc !important;
    border-color: #60a5fa !important;
  }
  .drawer-item:hover {
    background: #0f1720 !important;
  }
  .drawer-item.is-selected {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
  }
  .drawer-item.is-selected .drawer-item-name {
    color: #34d399 !important;
  }
  .btn-zoom-uni:hover {
    background: #2a3746 !important;
  }
  .paste-box-wrapper {
    background: #0f1720 !important;
    border-color: #2a3746 !important;
  }
  .paste-box-wrapper textarea {
    background: #161f2b !important;
    border-color: #2a3746 !important;
    color: #f8fafc !important;
  }
}

:root[data-theme="dark"] .leaflet-popup-content-wrapper,
:root[data-theme="dark"] .leaflet-popup-tip {
  background: #161f2b !important;
  color: #e8edf3 !important;
  border: 1px solid #2a3746 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
}
:root[data-theme="dark"] .leaflet-popup-close-button {
  color: #94a3b8 !important;
}
:root[data-theme="dark"] .popup h3 {
  color: #f8fafc !important;
}
:root[data-theme="dark"] .popup .popup-addr {
  color: #94a3b8 !important;
}
:root[data-theme="dark"] .popup .popup-web {
  background: #0f1720 !important;
  border-color: #2a3746 !important;
  color: #60a5fa !important;
}
:root[data-theme="dark"] .btn-popup-highlight {
  background: #0f1720 !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}
:root[data-theme="dark"] .tag-city,
:root[data-theme="dark"] .tag-region {
  background: #0f1720 !important;
  border-color: #2a3746 !important;
  color: #94a3b8 !important;
}
:root[data-theme="dark"] .leaflet-bar a {
  background: #161f2b !important;
  color: #e8edf3 !important;
  border-color: #2a3746 !important;
}
:root[data-theme="dark"] .search-input {
  background: #161f2b !important;
  border-color: #2a3746 !important;
  color: #f8fafc !important;
}
:root[data-theme="dark"] .btn-hamburger {
  background: #161f2b !important;
  border-color: #2a3746 !important;
  color: #f8fafc !important;
}
:root[data-theme="dark"] .menu-drawer {
  background: #161f2b !important;
  border-color: #2a3746 !important;
}
:root[data-theme="dark"] .drawer-header {
  background: #0f1720 !important;
}






