/* ============================================================
   Centro de monitoreo de riesgo — demo bespoke de Resiliencia (prefijo rm-)
   Mapa de Colombia con focos + feed de noticias/redes + índice + protocolo.
   Reusa tokens de marca y el patrón .hca-fstep/.hca-output (hero-console-anim.css).
   ============================================================ */
.rm {
  margin-top: 42px;
  border: 1px solid rgba(147, 197, 253, 0.20); border-radius: 18px;
  background: rgba(8, 12, 19, 0.64);
  backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.rm-bar {
  display: flex; justify-content: space-between; align-items: center; padding: 13px 18px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.14);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #93c5fd;
}
.rm-live { display: inline-flex; align-items: center; gap: 7px; color: #f0a868; }
.rm-live i { width: 7px; height: 7px; border-radius: 50%; background: #f0a868; box-shadow: 0 0 0 0 rgba(240,168,104,.6); animation: rmPulse 2s ease-out infinite; }
@keyframes rmPulse { 0% { box-shadow: 0 0 0 0 rgba(240,168,104,.5); } 70% { box-shadow: 0 0 0 8px rgba(240,168,104,0); } 100% { box-shadow: 0 0 0 0 rgba(240,168,104,0); } }

.rm-body { display: grid; grid-template-columns: 1.1fr 0.9fr; }

/* ---- Mapa ---- */
.rm-map { padding: 16px 18px 18px; border-right: 1px solid rgba(147, 197, 253, 0.10); }
.rm-map-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 12px; }
.rm-situ { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: #cfe0f5; }
.rm-index-wrap { font-family: var(--f-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #8392a4; white-space: nowrap; }
.rm-index-wrap b { color: #f0a868; font-size: 12px; margin-left: 5px; }

.rm-map-canvas { position: relative; height: 296px; display: grid; place-items: center; overflow: hidden; }
.rm-map-svg { grid-area: 1 / 1; height: 100%; width: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
.rm-map-svg.is-active { opacity: 1; }
.rm-country { fill: rgba(96, 165, 250, 0.06); stroke: rgba(147, 197, 253, 0.34); stroke-width: 1.2; stroke-linejoin: round; }

.rm-hot { opacity: 0.20; transition: opacity 0.5s ease; }
.rm-hot.active { opacity: 1; }
.rm-hot-core { fill: #f0a868; }
.rm-hot-ring { fill: none; stroke: #f0a868; stroke-width: 1.4; opacity: 0; }
.rm-hot.active .rm-hot-ring { animation: rmRing 1.9s ease-out infinite; }
@keyframes rmRing { 0% { r: 4px; opacity: 0.75; } 100% { r: 19px; opacity: 0; } }
.rm-hot-label { fill: #aeb9c7; font-family: var(--f-mono); font-size: 7.5px; }
.rm-hot.active .rm-hot-label { fill: #f3c79a; }

.rm-index-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); margin-top: 14px; overflow: hidden; }
.rm-index-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #60a5fa, #f0a868); transition: width 0.9s cubic-bezier(.2,.7,.2,1); }

/* ---- Feed ---- */
.rm-feed { padding: 16px 18px; display: flex; flex-direction: column; min-height: 0; }
.rm-feed-head { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #8392a4; margin-bottom: 12px; display: flex; justify-content: space-between; }
.rm-feed-list { display: flex; flex-direction: column; gap: 9px; }
.rm-card { border: 1px solid rgba(147, 197, 253, 0.14); border-radius: 11px; background: rgba(255, 255, 255, 0.02); padding: 11px 13px; opacity: 0; transform: translateY(8px); transition: opacity 0.45s ease, transform 0.45s ease; }
.rm-card.show { opacity: 1; transform: none; }
.rm-card.crit { border-color: rgba(240, 168, 104, 0.42); background: rgba(240, 168, 104, 0.06); }
.rm-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rm-tag { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; border: 1px solid currentColor; flex: 0 0 auto; }
.rm-tag.electoral { color: #93c5fd; } .rm-tag.laboral { color: #f0a868; } .rm-tag.medios { color: #c9a0f0; } .rm-tag.natural { color: #6fcf97; }
.rm-card-src { font-family: var(--f-mono); font-size: 8.5px; color: #6b7689; margin-left: auto; white-space: nowrap; }
.rm-card-txt { color: #cfd8e3; font-size: 0.9rem; line-height: 1.42; }
.rm-card-sev { font-family: var(--f-mono); font-size: 8.5px; color: #f0a868; margin-top: 6px; display: inline-block; }

/* ---- Escalamiento → protocolo (reusa .hca-fstep / .hca-output) ---- */
.rm-escala { padding: 14px 18px 18px; border-top: 1px solid rgba(147, 197, 253, 0.12); }
.rm-alert { display: flex; align-items: center; gap: 11px; border: 1px solid rgba(240, 168, 104, 0.32); background: rgba(240, 168, 104, 0.09); border-radius: 11px; padding: 11px 14px; opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.rm-alert.on { opacity: 1; transform: none; }
.rm-alert-ic { color: #f0a868; font-size: 14px; flex: 0 0 auto; }
.rm-alert-txt { color: #f3c79a; font-size: 0.9rem; line-height: 1.35; flex: 1; }
.rm-alert-txt b { color: #fff; }
.rm-alert-chip { flex: 0 0 auto; font-family: var(--f-mono); font-size: 9px; text-transform: uppercase; color: #f0a868; border: 1px solid rgba(240, 168, 104, 0.4); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.rm-flow { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.rm-flow .hca-fstep { font-size: 0.86rem; }
.rm-output-row { margin-top: 13px; }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .rm-body { grid-template-columns: 1fr; }
  .rm-map { border-right: none; border-bottom: 1px solid rgba(147, 197, 253, 0.10); }
  .rm-map-canvas { height: 240px; }
  .rm-flow { gap: 8px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-live i, .rm-hot.active .rm-hot-ring { animation: none; }
  .rm-card, .rm-alert { transition: none; }
}
