.runtime-only-card {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}

.runtime-only-card summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.runtime-only-card summary::-webkit-details-marker {
  display: none;
}

.runtime-only-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.runtime-only-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  color: var(--muted);
}

.runtime-only-item strong {
  color: var(--text);
  font-size: 13px;
}


.btn-outline-primary {
  min-width: 110px;
  padding: 10px 14px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: #fff;
  color: #2563eb;
  cursor: pointer;
  font-weight: 800;
}

.btn-outline-primary.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn-locate {
  margin-left: 0;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  font-weight: 700;
}

.btn-locate:hover {
  background: #bae6fd;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.map-editor-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 800;
  width: 340px;
  max-width: calc(100vw - 60px);
  display: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.map-editor-panel.open {
  display: block;
}

.map-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.96);
}

.map-editor-title {
  display: grid;
  gap: 4px;
}

.map-editor-title strong {
  font-size: 15px;
  color: var(--text);
}

.map-editor-title span {
  font-size: 12px;
  color: var(--muted);
}

.map-editor-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.map-editor-panel {
  max-height: 80vh;
  overflow-y: auto;
}

.editor-grid {
  display: grid;
  gap: 12px;
}

.editor-field {
  display: grid;
  gap: 6px;
}

.editor-field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.editor-field input,
.editor-field select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  box-sizing: border-box;
}

.editor-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editor-hint {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  font-size: 12px;
  line-height: 1.5;
}

.editor-status {
  min-height: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.editor-status.error {
  color: #dc2626;
}

.editor-status.success {
  color: #059669;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-actions--left,
.editor-device-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.editor-actions--left .btn,
.editor-device-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 12px;
  font-weight: 800;
}

.map-edit-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 700;
  display: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.map-edit-badge.show {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.drawer-group-tabs-wrap {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.drawer-group-title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.drawer-group-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drawer-group-tab {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.drawer-group-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.editor-main-tabs {
  display: flex;
  gap: 8px;
  padding: 2px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.14);
}

.editor-main-tab {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.editor-main-tab.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.editor-panel-section {
  display: none;
  gap: 14px;
}

.editor-panel-section.active {
  display: grid;
}

.editor-section-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.82);
}

.editor-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-section-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}

.editor-device-filter {
  min-width: 140px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: #fff;
}

.smartmap-mapwrap {
  height: calc(100vh - 180px) !important;
  min-height: 60%;
}

#googleWrap,
#tilesWrap {
  width: 100%;
  height: 100%;
}

#googleMap,
#leafletMap {
  width: 100%;
  height: 100%;
}

.marker-tooltip-group {
  min-width: 180px;
  line-height: 1.45;
}

.marker-tooltip-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.marker-tooltip-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.35);
  margin: 6px 0 8px;
}

.marker-tooltip-list {
  display: grid;
  gap: 4px;
}

#btnLocateMarker,
#btnLocateCreateMarker {
  margin-left: 0;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

#btnLocateMarker:hover,
#btnLocateCreateMarker:hover {
  background: #bae6fd;
}

@media (max-width: 900px) {
  .map-editor-panel {
    left: 12px;
    right: 12px;
    top: 12px;
    width: auto;
    max-width: none;
  }

  .editor-row-2 {
    grid-template-columns: 1fr;
  }

  .smartmap-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {

  .editor-actions--left,
  .editor-device-actions {
    grid-template-columns: 1fr;
  }
}

.smartmap-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.smartmap-topbar-row .indicator-bar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.smartmap-topbar-row .indicator {
  flex: 0 0 auto;
  white-space: nowrap;
}

.smartmap-topbar-row .smartmap-topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.map-mode-switch {
  --switch-bg: #eef2ff;
  --switch-border: #bfdbfe;
  --switch-active-bg: #ffffff;
  --switch-active-text: #1d4ed8;
  --switch-text: #475569;
  --switch-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);

  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-width: 180px;
  padding: 4px;
  border: 1px solid var(--switch-border);
  border-radius: 999px;
  background: var(--switch-bg);
  box-sizing: border-box;
}

.map-mode-switch__option {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--switch-text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.2s ease;
}

.map-mode-switch__option.active {
  color: var(--switch-active-text);
}

.map-mode-switch__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: var(--switch-active-bg);
  box-shadow: var(--switch-shadow);
  transition: transform 0.24s ease;
}

.map-mode-switch[data-active="tileserver"] .map-mode-switch__thumb {
  transform: translateX(100%);
}

.map-mode-switch[data-active="google"] .map-mode-switch__thumb {
  transform: translateX(0);
}

.smartmap-topbar-row .smartmap-topbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-wrap: wrap;
}

.drawer-device-meta {
  margin-bottom: 12px;
}

.drawer-device-meta .sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.drawer-title{
  font-size: 18px;   
  font-weight: 900;
  color: var(--text);
}

#drawerTitle {
  font-weight: 800;
  color: var(--text);
}

.campus-filter-box {
  position: absolute;
  top: 14px;
  right: 58px;
  z-index: 450;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.campus-filter-toggle {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.campus-filter-toggle__icon {
  margin-left: 8px;
  font-size: 12px;
}

.campus-filter-panel {
  width: 280px;
  max-height: 420px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
  padding: 12px;
}

.campus-filter-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.campus-filter-actions button {
  flex: 1;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  background: #e0f2fe;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.campus-filter-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.campus-filter-chip {
  min-height: 60px;
  padding: 10px 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
}

.campus-filter-chip small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.campus-filter-chip.active {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}

.campus-filter-chip.active small {
  color: rgba(255, 255, 255, 0.9);
}

.campus-bubble-marker {
  background: transparent;
  border: 0;
}

.campus-bubble {
  border: 0;
  border-radius: 999px;
  background: rgba(217, 155, 53, 0.88);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  cursor: pointer;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}

.campus-bubble:hover {
  transform: scale(1.06);
  background: rgba(245, 158, 11, 0.95);
}

.campus-bubble {
  border-radius: 999px;
  background: rgba(217, 155, 53, 0.9);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.campus-name {
  font-size: 14px;
  line-height: 1.2;
}

.campus-count {
  font-size: 12px;
  opacity: 0.85;
}

.campus-bubble-marker {
  background: transparent !important;
  border: 0 !important;
}

.campus-bubble-marker .campus-bubble {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(217, 155, 53, 0.92) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
  user-select: none;
}

.campus-bubble-marker .campus-name {
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 900;
}

.campus-bubble-marker .campus-count {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 11px;
  font-weight: 800;
  margin-top: 3px;
}

.campus-bubble-marker .campus-bubble:hover {
  transform: scale(1.06);
  background: rgba(245, 158, 11, 0.98) !important;
}

@media (max-width: 640px) {
  .map-mode-switch {
    min-width: 160px;
  }

  .map-mode-switch__option {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }


}