/* Telemetry Map 1.1 · MapLibre + deck.gl */
.telemetry-map-tab {
  --map-cyan: #2be7f7;
  --map-green: #43f1a1;
  --map-yellow: #ffd34d;
  --map-red: #ff5f72;
  --map-muted: #9eb5c8;
}

.telemetry-map-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(31, 205, 230, 0.32);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 0%, rgba(43, 231, 247, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(5, 28, 42, 0.97), rgba(3, 17, 29, 0.96));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.telemetry-map-hero h2 {
  margin: 3px 0 7px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.telemetry-map-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #a9c1d1;
}

.telemetry-map-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.telemetry-map-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.telemetry-map-summary article {
  position: relative;
  min-height: 106px;
  padding: 17px 18px 15px;
  overflow: hidden;
  border: 1px solid rgba(31, 205, 230, 0.28);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(5, 28, 42, 0.96), rgba(3, 20, 32, 0.98));
}

.telemetry-map-summary article::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -46px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(43, 231, 247, 0.07);
}

.telemetry-map-summary span,
.telemetry-map-summary small {
  display: block;
  color: #9eb5c8;
}

.telemetry-map-summary span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telemetry-map-summary strong {
  display: block;
  margin: 3px 0 1px;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.telemetry-map-summary small {
  font-size: 0.75rem;
}

.telemetry-map-stage {
  position: relative;
  min-height: 690px;
  height: min(76vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(31, 205, 230, 0.42);
  border-radius: 24px;
  background: #03111c;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.33);
  isolation: isolate;
}

.telemetry-map-canvas {
  position: absolute;
  inset: 0;
}

.telemetry-map-stage .maplibregl-map,
.telemetry-map-stage .maplibregl-canvas-container,
.telemetry-map-stage .maplibregl-canvas {
  width: 100%;
  height: 100%;
}

.telemetry-map-stage .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(43, 231, 247, 0.32);
  border-radius: 12px;
  background: rgba(3, 18, 30, 0.88);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.telemetry-map-stage .maplibregl-ctrl button {
  background-color: transparent;
  filter: invert(1) brightness(1.55);
}

.telemetry-map-stage .maplibregl-ctrl-attrib {
  color: #b5c7d5;
  background: rgba(3, 18, 30, 0.8);
}

.telemetry-map-stage .maplibregl-ctrl-attrib a {
  color: #54dff0;
}

.telemetry-map-controls,
.telemetry-map-detail {
  position: absolute;
  z-index: 4;
  top: 18px;
  width: min(320px, calc(50% - 32px));
  max-height: calc(100% - 88px);
  overflow: auto;
  padding: 17px;
  border: 1px solid rgba(43, 231, 247, 0.3);
  border-radius: 18px;
  background: rgba(3, 18, 30, 0.91);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(15px);
  scrollbar-width: thin;
}

.telemetry-map-controls { left: 18px; }
.telemetry-map-detail { right: 18px; }

.telemetry-map-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.telemetry-map-panel-head h3,
.telemetry-map-detail h3 {
  margin: 2px 0 0;
}

.telemetry-map-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a8c0cf;
  font-size: 0.72rem;
  white-space: nowrap;
}

.telemetry-map-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7890a2;
  box-shadow: 0 0 0 4px rgba(120, 144, 162, 0.12);
}

.telemetry-map-live.is-live::before {
  background: var(--map-green);
  box-shadow: 0 0 0 4px rgba(67, 241, 161, 0.13), 0 0 13px rgba(67, 241, 161, 0.6);
}

.telemetry-map-live.is-error::before {
  background: var(--map-red);
  box-shadow: 0 0 0 4px rgba(255, 95, 114, 0.13);
}

.telemetry-map-field {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
  color: #a8c0cf;
  font-size: 0.76rem;
  font-weight: 700;
}

.telemetry-map-field input,
.telemetry-map-field select {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(43, 231, 247, 0.25);
  border-radius: 12px;
  background: rgba(7, 34, 49, 0.9);
  color: #f3fbff;
}

.telemetry-map-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.telemetry-map-toggles {
  display: grid;
  gap: 8px;
  margin: 5px 0 13px;
}

.telemetry-map-toggles label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: #d8e6ef;
  font-size: 0.79rem;
}

.telemetry-map-toggles input {
  width: 17px;
  height: 17px;
  accent-color: #25ddec;
}

.telemetry-map-clear { width: 100%; }

.telemetry-map-detail-empty {
  padding: 6px 2px;
  color: #a8c0cf;
}

.telemetry-map-device-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.telemetry-map-device-head h3 {
  margin: 3px 0;
  font-size: 1.16rem;
}

.telemetry-map-device-head p {
  margin: 0;
  color: #9eb5c8;
  font-size: 0.78rem;
}

.telemetry-map-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #9eb5c8;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.telemetry-map-state-badge.state-healthy { color: var(--map-green); }
.telemetry-map-state-badge.state-degraded,
.telemetry-map-state-badge.state-stale { color: var(--map-yellow); }
.telemetry-map-state-badge.state-fault { color: var(--map-red); }
.telemetry-map-state-badge.state-offline,
.telemetry-map-state-badge.state-unknown { color: var(--map-muted); }

.telemetry-map-device-reason {
  margin: 0 0 13px;
  padding: 10px 11px;
  border-left: 3px solid rgba(43, 231, 247, 0.55);
  border-radius: 0 10px 10px 0;
  background: rgba(10, 43, 58, 0.6);
  color: #c6d8e3;
  font-size: 0.8rem;
}

.telemetry-map-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.telemetry-map-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(43, 231, 247, 0.17);
  border-radius: 12px;
  background: rgba(5, 28, 42, 0.72);
}

.telemetry-map-metric span,
.telemetry-map-metric small {
  display: block;
  overflow: hidden;
  color: #8faabc;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telemetry-map-metric strong {
  display: block;
  margin: 3px 0 1px;
  color: #f7fcff;
  font-size: 0.96rem;
}

.telemetry-map-device-meta {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

.telemetry-map-device-meta div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #9eb5c8;
  font-size: 0.73rem;
}

.telemetry-map-device-meta dt,
.telemetry-map-device-meta dd { margin: 0; }
.telemetry-map-device-meta dd { color: #d9e8f0; text-align: right; }

.telemetry-map-alert-box {
  margin-bottom: 13px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 95, 114, 0.33);
  border-radius: 12px;
  background: rgba(80, 17, 29, 0.38);
}

.telemetry-map-alert-box strong,
.telemetry-map-alert-box span { display: block; }
.telemetry-map-alert-box strong { color: #ffb5bf; font-size: 0.78rem; }
.telemetry-map-alert-box span { margin-top: 3px; color: #c7d6df; font-size: 0.72rem; }

.telemetry-map-device-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.telemetry-map-device-actions button { width: 100%; }

.telemetry-map-legend {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  max-width: calc(100% - 80px);
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(43, 231, 247, 0.28);
  border-radius: 999px;
  background: rgba(3, 18, 30, 0.9);
  color: #c7d7e1;
  font-size: 0.72rem;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.telemetry-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.telemetry-map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.telemetry-map-gradient {
  width: 150px;
  height: 8px;
  border-radius: 999px;
}

.telemetry-map-fallback {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  padding: 40px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(43, 231, 247, 0.11), transparent 30%),
    #03111c;
}

.telemetry-map-fallback[hidden] { display: none; }
.telemetry-map-fallback strong { color: #f5fbff; font-size: 1.35rem; }
.telemetry-map-fallback p { max-width: 560px; color: #9eb5c8; }

.telemetry-map-unlocated-panel {
  margin-top: 16px;
}

.telemetry-map-unlocated-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.telemetry-map-unlocated-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(43, 231, 247, 0.18);
  border-radius: 13px;
  background: rgba(5, 27, 41, 0.72);
}

.telemetry-map-unlocated-item strong,
.telemetry-map-unlocated-item span { display: block; }
.telemetry-map-unlocated-item strong { color: #f3f9fc; font-size: 0.84rem; }
.telemetry-map-unlocated-item span { margin-top: 2px; color: #8fa8b9; font-size: 0.7rem; }
.telemetry-map-unlocated-item button { flex: 0 0 auto; }

.telemetry-map-tooltip {
  max-width: 240px;
  padding: 9px 11px;
  border: 1px solid rgba(43, 231, 247, 0.38);
  border-radius: 10px;
  background: rgba(3, 18, 30, 0.95);
  color: #eef9ff;
  font: 12px/1.4 system-ui, sans-serif;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.telemetry-map-tooltip strong,
.telemetry-map-tooltip span { display: block; }
.telemetry-map-tooltip span { color: #a9bfcd; }

body.presentation-mode .telemetry-map-stage {
  height: calc(100vh - 185px);
  min-height: 620px;
}

@media (max-width: 1050px) {
  .telemetry-map-summary { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .telemetry-map-controls,
  .telemetry-map-detail { width: min(290px, calc(50% - 28px)); }
}

@media (max-width: 820px) {
  .telemetry-map-hero { align-items: flex-start; flex-direction: column; }
  .telemetry-map-hero-actions { justify-content: flex-start; width: 100%; }
  .telemetry-map-hero-actions button { flex: 1 1 145px; }
  .telemetry-map-stage {
    display: grid;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .telemetry-map-canvas {
    position: relative;
    height: 58vh;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(31, 205, 230, 0.42);
    border-radius: 20px;
    background: #03111c;
  }
  .telemetry-map-controls,
  .telemetry-map-detail {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: none;
    margin-top: 12px;
    background: rgba(3, 18, 30, 0.96);
  }
  .telemetry-map-controls { order: -1; }
  .telemetry-map-legend {
    position: relative;
    left: auto;
    bottom: auto;
    flex-wrap: wrap;
    max-width: none;
    width: 100%;
    margin-top: 12px;
    border-radius: 15px;
    transform: none;
  }
  .telemetry-map-fallback { min-height: 430px; }
  body.presentation-mode .telemetry-map-stage { height: auto; min-height: 0; }
}

@media (max-width: 560px) {
  .telemetry-map-hero { padding: 18px; border-radius: 18px; }
  .telemetry-map-summary { gap: 9px; }
  .telemetry-map-summary article { min-height: 96px; padding: 14px; }
  .telemetry-map-summary strong { font-size: 1.65rem; }
  .telemetry-map-control-grid { grid-template-columns: 1fr; gap: 0; }
  .telemetry-map-canvas { height: 52vh; min-height: 380px; }
  .telemetry-map-metrics { grid-template-columns: 1fr 1fr; }
  .telemetry-map-device-actions { grid-template-columns: 1fr; }
  .telemetry-map-legend { justify-content: flex-start; }
  .telemetry-map-gradient { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .telemetry-map-stage *,
  .telemetry-map-stage *::before,
  .telemetry-map-stage *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Telemetry Map 1.1 · interfaz despejada y paneles plegables */
.telemetry-map-stage [hidden] {
  display: none !important;
}

.telemetry-map-floating-tools {
  position: absolute;
  z-index: 6;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(43, 231, 247, 0.28);
  border-radius: 14px;
  background: rgba(3, 18, 30, 0.84);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.telemetry-map-float-tool {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #c7d9e5;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.telemetry-map-float-tool:hover,
.telemetry-map-float-tool:focus-visible,
.telemetry-map-float-tool.is-active {
  border-color: rgba(43, 231, 247, 0.38);
  background: rgba(12, 55, 72, 0.82);
  color: #4ceafa;
}

.telemetry-map-controls,
.telemetry-map-detail {
  top: 68px;
  width: min(310px, calc(100% - 32px));
  max-height: calc(100% - 92px);
  animation: telemetry-map-panel-in 180ms ease-out both;
}

.telemetry-map-controls {
  left: 16px;
}

.telemetry-map-detail {
  right: 16px;
}

@keyframes telemetry-map-panel-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.telemetry-map-panel-head-actions,
.telemetry-map-detail-window-actions,
.telemetry-map-device-head-side {
  display: flex;
  align-items: center;
  gap: 7px;
}

.telemetry-map-panel-head-actions {
  align-items: flex-start;
}

.telemetry-map-device-head-side {
  flex-direction: column;
  align-items: flex-end;
}

.telemetry-map-icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(43, 231, 247, 0.3);
  border-radius: 9px;
  background: rgba(5, 33, 48, 0.86);
  color: #d8edf7;
  font-size: 1rem;
  line-height: 1;
  box-shadow: none;
}

.telemetry-map-icon-button:hover,
.telemetry-map-icon-button:focus-visible {
  border-color: rgba(43, 231, 247, 0.64);
  color: #4ceafa;
}

.telemetry-map-filter-toggles {
  margin-top: 2px;
}

.telemetry-map-detail-mini {
  position: absolute;
  z-index: 6;
  right: 16px;
  top: 16px;
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  max-width: min(280px, calc(100% - 190px));
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(43, 231, 247, 0.34);
  border-radius: 14px;
  background: rgba(3, 18, 30, 0.9);
  color: #eef9ff;
  text-align: left;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
}

.telemetry-map-detail-mini-dot {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7e98aa;
  box-shadow: 0 0 9px currentColor;
}

.telemetry-map-detail-mini-dot.state-healthy { color: var(--map-green); background: var(--map-green); }
.telemetry-map-detail-mini-dot.state-degraded,
.telemetry-map-detail-mini-dot.state-stale { color: var(--map-yellow); background: var(--map-yellow); }
.telemetry-map-detail-mini-dot.state-fault { color: var(--map-red); background: var(--map-red); }
.telemetry-map-detail-mini-dot.state-offline,
.telemetry-map-detail-mini-dot.state-unknown { color: var(--map-muted); background: var(--map-muted); }

.telemetry-map-detail-mini strong,
.telemetry-map-detail-mini small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telemetry-map-detail-mini strong {
  color: #f4fbff;
  font-size: 0.78rem;
}

.telemetry-map-detail-mini small {
  color: #9eb5c8;
  font-size: 0.66rem;
}

.telemetry-map-legend-dock {
  position: absolute;
  z-index: 5;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 120px);
}

.telemetry-map-legend {
  position: static;
  left: auto;
  bottom: auto;
  justify-content: flex-start;
  max-width: min(780px, calc(100vw - 120px));
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 13px;
  transform: none;
  animation: telemetry-map-panel-in 160ms ease-out both;
}

.telemetry-map-device-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.telemetry-map-device-actions button {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
}

body.presentation-mode .telemetry-map-controls,
body.presentation-mode .telemetry-map-legend {
  display: none !important;
}

body.presentation-mode .telemetry-map-floating-tools {
  opacity: 0.7;
}

@media (max-width: 1050px) {
  .telemetry-map-controls,
  .telemetry-map-detail {
    width: min(300px, calc(100% - 32px));
  }
}

@media (max-width: 820px) {
  .telemetry-map-stage {
    display: block;
    position: relative;
    height: 72vh;
    min-height: 500px;
    overflow: hidden;
    border: 1px solid rgba(31, 205, 230, 0.42);
    border-radius: 20px;
    background: #03111c;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.3);
  }

  .telemetry-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: inherit;
  }

  .telemetry-map-floating-tools {
    top: 10px;
    left: 10px;
    right: 10px;
    justify-content: flex-start;
    width: max-content;
    max-width: calc(100% - 20px);
    overflow-x: auto;
  }

  .telemetry-map-float-tool {
    flex: 0 0 auto;
  }

  .telemetry-map-controls,
  .telemetry-map-detail {
    position: absolute;
    inset: auto 10px 10px 10px;
    width: auto;
    max-height: min(68%, 520px);
    margin: 0;
    overflow: auto;
    border-radius: 18px;
    background: rgba(3, 18, 30, 0.96);
  }

  .telemetry-map-detail-mini {
    top: auto;
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .telemetry-map-legend-dock {
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .telemetry-map-legend {
    width: auto;
    max-width: calc(100vw - 40px);
    flex-wrap: wrap;
    margin: 0;
  }

  .telemetry-map-fallback {
    min-height: 0;
  }

  body.presentation-mode .telemetry-map-stage {
    height: calc(100vh - 135px);
    min-height: 500px;
  }
}

@media (max-width: 560px) {
  .telemetry-map-stage {
    height: 68vh;
    min-height: 460px;
  }

  .telemetry-map-floating-tools {
    gap: 4px;
    padding: 4px;
  }

  .telemetry-map-float-tool {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .telemetry-map-controls,
  .telemetry-map-detail {
    max-height: 72%;
    padding: 14px;
  }

  .telemetry-map-device-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .telemetry-map-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Telemetry Map 1.2 · fondo técnico, marcadores estables y paneles corregidos */
.telemetry-map-canvas,
.telemetry-map-stage .maplibregl-map,
.telemetry-map-stage .maplibregl-canvas-container {
  background: #04141c !important;
}

.telemetry-map-floating-tools {
  z-index: 12;
  top: 12px;
  left: 12px;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
}

.telemetry-map-float-tool {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 0.69rem;
}

.telemetry-map-controls {
  z-index: 11;
  top: 56px;
  left: 12px;
  width: min(286px, calc(100% - 24px));
  max-height: calc(100% - 72px);
}

.telemetry-map-detail {
  z-index: 10;
  top: 56px;
  right: 12px;
  width: min(292px, calc(100% - 24px));
  max-height: calc(100% - 72px);
}

.telemetry-map-panel-head {
  position: sticky;
  top: -17px;
  z-index: 2;
  margin: -17px -17px 13px;
  padding: 15px 17px 11px;
  background: linear-gradient(180deg, rgba(3, 18, 30, 0.99), rgba(3, 18, 30, 0.94));
  border-bottom: 1px solid rgba(43, 231, 247, 0.12);
}

.telemetry-map-stage[data-controls="filters"] .telemetry-map-floating-tools,
.telemetry-map-stage[data-controls="layers"] .telemetry-map-floating-tools {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

@media (max-width: 820px) {
  .telemetry-map-floating-tools {
    top: 8px;
    left: 8px;
    right: auto;
    width: auto;
    max-width: calc(100% - 16px);
  }

  .telemetry-map-controls,
  .telemetry-map-detail {
    z-index: 11;
    inset: auto 8px 8px 8px;
    max-height: min(68%, 520px);
  }

  .telemetry-map-panel-head {
    top: -14px;
    margin: -14px -14px 12px;
    padding: 13px 14px 10px;
  }
}

/* Telemetry Map 1.3 · drawer lateral izquierdo */
.telemetry-map-controls-backdrop {
  position: absolute;
  z-index: 13;
  inset: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 8, 14, 0.34), rgba(0, 8, 14, 0.08) 52%, transparent 78%);
  box-shadow: none;
  cursor: default;
  backdrop-filter: blur(1px);
  animation: telemetry-map-backdrop-in 180ms ease-out both;
}

.telemetry-map-controls {
  z-index: 14;
  inset: 0 auto 0 0;
  width: min(350px, calc(100% - 72px));
  max-height: none;
  min-height: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 72px 20px 20px;
  border-width: 0 1px 0 0;
  border-radius: 0 22px 22px 0;
  background: linear-gradient(180deg, rgba(3, 18, 30, 0.985), rgba(3, 18, 30, 0.955));
  box-shadow: 24px 0 58px rgba(0, 0, 0, 0.46);
  animation: telemetry-map-drawer-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  scrollbar-gutter: stable;
}

.telemetry-map-controls > section,
.telemetry-map-controls .telemetry-map-field,
.telemetry-map-controls .telemetry-map-control-grid,
.telemetry-map-controls input,
.telemetry-map-controls select,
.telemetry-map-controls button {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.telemetry-map-controls .telemetry-map-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.telemetry-map-controls .telemetry-map-panel-head {
  position: static;
  margin: 0 0 18px;
  padding: 0 0 14px;
  background: transparent;
  border-bottom: 1px solid rgba(43, 231, 247, 0.16);
}

.telemetry-map-controls .telemetry-map-panel-head-actions {
  flex-direction: column-reverse;
  align-items: flex-end;
}

.telemetry-map-floating-tools {
  z-index: 16;
}

.telemetry-map-stage[data-controls="filters"] .telemetry-map-floating-tools,
.telemetry-map-stage[data-controls="layers"] .telemetry-map-floating-tools {
  border-color: rgba(43, 231, 247, 0.42);
  background: rgba(4, 25, 38, 0.97);
}

@keyframes telemetry-map-drawer-in {
  from { opacity: 0.55; transform: translateX(-104%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes telemetry-map-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 820px) {
  .telemetry-map-controls {
    inset: 0 auto 0 0;
    width: min(88vw, 360px);
    max-height: none;
    min-height: 100%;
    padding: 66px 16px 18px;
    border-radius: 0 20px 20px 0;
  }

  .telemetry-map-controls .telemetry-map-panel-head {
    position: static;
    margin: 0 0 16px;
    padding: 0 0 12px;
  }

  .telemetry-map-controls-backdrop {
    background: rgba(0, 8, 14, 0.3);
    backdrop-filter: blur(1.5px);
  }
}

@media (max-width: 430px) {
  .telemetry-map-controls {
    width: calc(100% - 36px);
    padding-inline: 15px;
  }

  .telemetry-map-controls .telemetry-map-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .telemetry-map-controls,
  .telemetry-map-controls-backdrop {
    animation-duration: 1ms !important;
  }
}

.telemetry-map-controls-backdrop {
  cursor: pointer;
}

body.presentation-mode .telemetry-map-controls-backdrop {
  display: none !important;
}

/* Telemetry Map 1.3.1 · cabecera del drawer sin superposición */
.telemetry-map-stage {
  --telemetry-map-drawer-width: min(350px, calc(100% - 72px));
}

.telemetry-map-controls {
  width: var(--telemetry-map-drawer-width);
  padding: 92px 20px 20px;
}

.telemetry-map-stage[data-controls="filters"] .telemetry-map-floating-tools,
.telemetry-map-stage[data-controls="layers"] .telemetry-map-floating-tools {
  left: 20px;
  width: calc(var(--telemetry-map-drawer-width) - 40px);
  max-width: calc(100% - 92px);
  justify-content: center;
}

.telemetry-map-controls .telemetry-map-panel-head {
  display: block;
  position: static;
  margin: 0 0 18px;
  padding: 0 0 16px;
  background: transparent;
  border-bottom: 1px solid rgba(43, 231, 247, 0.18);
}

.telemetry-map-panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.telemetry-map-panel-title-copy {
  min-width: 0;
}

.telemetry-map-panel-title-copy .eyebrow {
  margin: 0 0 7px;
}

.telemetry-map-panel-title-copy h3 {
  margin: 0;
}

.telemetry-map-panel-close {
  flex: 0 0 auto;
  margin-top: 2px;
}

.telemetry-map-panel-status-row {
  display: flex;
  justify-content: flex-end;
  min-height: 20px;
  margin-top: 7px;
}

.telemetry-map-panel-status-row .telemetry-map-live {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telemetry-map-controls > section {
  padding-top: 0;
}

@media (max-width: 820px) {
  .telemetry-map-stage {
    --telemetry-map-drawer-width: min(88vw, 360px);
  }

  .telemetry-map-controls {
    width: var(--telemetry-map-drawer-width);
    padding: 88px 18px 20px;
  }

  .telemetry-map-stage[data-controls="filters"] .telemetry-map-floating-tools,
  .telemetry-map-stage[data-controls="layers"] .telemetry-map-floating-tools {
    left: 18px;
    width: calc(var(--telemetry-map-drawer-width) - 36px);
    max-width: calc(100% - 72px);
  }
}

@media (max-width: 430px) {
  .telemetry-map-stage {
    --telemetry-map-drawer-width: calc(100% - 36px);
  }

  .telemetry-map-controls {
    padding: 86px 15px 18px;
  }

  .telemetry-map-stage[data-controls="filters"] .telemetry-map-floating-tools,
  .telemetry-map-stage[data-controls="layers"] .telemetry-map-floating-tools {
    left: 14px;
    width: calc(var(--telemetry-map-drawer-width) - 28px);
    max-width: calc(100% - 64px);
  }
}

/* Telemetry Map · centrado vertical del grupo de controles */
.telemetry-map-floating-tools {
  height: 60px !important;
  min-height: 60px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;

  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  align-content: center !important;
  justify-content: center !important;
}

.telemetry-map-float-tool {
  align-self: center !important;
  flex: 0 0 auto !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
}

