/* VS-006.W — Page-Specific Living Intelligence Maps */

.rv-w-panel {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--rv-border-subtle);
  box-shadow: var(--rv-shadow-panel);
  overflow: hidden;
}

.rv-w-header {
  min-height: 50px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--rv-border-subtle);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.rv-w-title strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .075em;
  color: var(--rv-text-primary);
}

.rv-w-title span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--rv-text-secondary);
}

.rv-w-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.rv-w-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  background: #fff;
  border: 1px solid var(--rv-border-subtle);
  color: var(--rv-text-secondary);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .065em;
}

.rv-w-badge.live {
  color: var(--rv-state-ready);
  border-color: rgba(47,125,89,.35);
}

.rv-w-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 12px;
  padding: 12px;
}

.rv-w-left {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.rv-w-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.rv-w-kpi {
  border: 1px solid var(--rv-border-subtle);
  background: #fff;
  padding: 9px;
  cursor: help;
}

.rv-w-kpi span {
  display: block;
  color: var(--rv-text-muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.rv-w-kpi strong {
  display: block;
  margin-top: 4px;
  color: var(--rv-text-primary);
  font-size: 21px;
}

.rv-w-kpi small {
  display: block;
  margin-top: 3px;
  color: var(--rv-text-secondary);
  font-size: 10px;
  line-height: 1.35;
}

.rv-w-stage {
  position: relative;
  min-height: 640px;
  border: 1px solid var(--rv-border-subtle);
  background:
    radial-gradient(circle at 50% 50%, rgba(31,111,159,.09), transparent 33%),
    linear-gradient(to right, rgba(25,37,50,.04) 1px, transparent 1px) 0 0 / 10% 100%,
    linear-gradient(to bottom, rgba(25,37,50,.04) 1px, transparent 1px) 0 0 / 100% 20%,
    #fff;
  overflow: hidden;
}

.rv-w-svg {
  width: 100%;
  height: 640px;
  display: block;
}

.rv-w-map-node,
.rv-w-map-flow,
.rv-w-map-room,
.rv-w-map-sector,
.rv-w-map-spine,
.rv-w-map-radar,
.rv-w-map-lattice {
  cursor: pointer;
  transition: opacity .16s ease, stroke-width .16s ease, filter .16s ease, transform .16s ease;
}

.rv-w-map-flow {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 12;
  animation: rvWFlow 3.5s linear infinite;
  opacity: .58;
}

.rv-w-map-flow.active,
.rv-w-map-flow:hover {
  opacity: .98;
  stroke-width: 5.5;
}

@keyframes rvWFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -40; }
}

.rv-w-ready { stroke: rgba(47,125,89,.90); fill: rgba(47,125,89,.10); }
.rv-w-warning { stroke: rgba(168,110,0,.90); fill: rgba(168,110,0,.10); }
.rv-w-blocked { stroke: rgba(124,31,31,.90); fill: rgba(124,31,31,.10); }
.rv-w-future { stroke: rgba(91,74,125,.84); fill: rgba(91,74,125,.10); }
.rv-w-neutral { stroke: rgba(31,111,159,.82); fill: rgba(31,111,159,.10); }

.rv-w-map-node {
  stroke-width: 2.2;
}

.rv-w-map-node.active,
.rv-w-map-node:hover,
.rv-w-map-room.active,
.rv-w-map-room:hover,
.rv-w-map-sector.active,
.rv-w-map-sector:hover,
.rv-w-map-spine.active,
.rv-w-map-spine:hover,
.rv-w-map-radar.active,
.rv-w-map-radar:hover,
.rv-w-map-lattice.active,
.rv-w-map-lattice:hover {
  filter: drop-shadow(0 0 7px rgba(31,111,159,.36));
  opacity: 1;
}

.rv-w-map-sector {
  fill: none;
  stroke-width: 30;
  opacity: .9;
}

.rv-w-map-sector.active,
.rv-w-map-sector:hover {
  stroke-width: 38;
}

.rv-w-map-room,
.rv-w-map-spine,
.rv-w-map-radar,
.rv-w-map-lattice {
  stroke-width: 2;
  opacity: .94;
}

.rv-w-center {
  fill: rgba(255,255,255,.98);
  stroke: rgba(25,37,50,.26);
  stroke-width: 1.6;
}

.rv-w-center-pulse {
  fill: none;
  stroke: rgba(31,111,159,.18);
  stroke-width: 2;
  animation: rvWCenterPulse 2.9s ease-in-out infinite;
}

.rv-w-center-pulse.two {
  animation-delay: 1.45s;
}

@keyframes rvWCenterPulse {
  0% { r: 74px; opacity: .9; }
  100% { r: 148px; opacity: .05; }
}

.rv-w-event-particle {
  fill: rgba(31,111,159,.96);
  opacity: 0;
}

.rv-w-event-particle.active {
  opacity: 1;
  animation: rvWParticle 1.2s ease-out 1;
}

@keyframes rvWParticle {
  0% { r: 4px; opacity: 1; }
  100% { r: 18px; opacity: 0; }
}

.rv-w-label {
  font-size: 11px;
  fill: var(--rv-text-primary);
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .05em;
  pointer-events: none;
}

.rv-w-sub {
  font-size: 10px;
  fill: var(--rv-text-secondary);
  pointer-events: none;
}

.rv-w-mini {
  font-size: 8.5px;
  fill: var(--rv-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  pointer-events: none;
}

.rv-w-caption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 11px;
  color: var(--rv-text-muted);
}

.rv-w-inspector {
  border: 1px solid var(--rv-border-subtle);
  background: #fff;
  min-width: 0;
}

.rv-w-inspector-head {
  min-height: 50px;
  padding: 10px 11px;
  background: #162331;
  color: #fff;
}

.rv-w-inspector-head strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.rv-w-inspector-head span {
  display: block;
  margin-top: 3px;
  opacity: .84;
  font-size: 11px;
  line-height: 1.35;
}

.rv-w-inspector-body {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.rv-w-row {
  display: grid;
  grid-template-columns: 114px minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rv-border-subtle);
}

.rv-w-row:last-child {
  border-bottom: 0;
}

.rv-w-row label {
  color: var(--rv-text-muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.rv-w-row div {
  color: var(--rv-text-primary);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rv-w-facts {
  display: grid;
  gap: 6px;
}

.rv-w-fact {
  border: 1px solid var(--rv-border-subtle);
  background: #f8fafc;
  padding: 7px;
  color: var(--rv-text-secondary);
  font-size: 10px;
  line-height: 1.35;
}

.rv-w-event-box {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--rv-border-subtle);
}

.rv-w-event-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.rv-w-event-box button {
  display: block;
  width: 100%;
  min-height: 31px;
  margin-bottom: 6px;
  border: 1px solid var(--rv-border-subtle);
  background: #f8fafc;
  padding: 0 8px;
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}

.rv-w-event-box button:hover {
  background: #edf4f9;
}

.rv-w-log {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.rv-w-log-item {
  border: 1px solid var(--rv-border-subtle);
  background: #f8fafc;
  padding: 7px;
  color: var(--rv-text-secondary);
  font-size: 10px;
  line-height: 1.35;
}

.rv-w-tooltip {
  position: fixed;
  display: none;
  z-index: 99999;
  max-width: 340px;
  padding: 10px 11px;
  background: #162331;
  color: #f6f8fb;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 46px rgba(0,0,0,.24);
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
}

.rv-w-tooltip strong {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

@media (max-width: 1180px) {
  .rv-w-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .rv-w-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .rv-w-badges {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .rv-w-badge {
    flex: 0 0 auto;
  }

  .rv-w-layout {
    padding: 8px;
    gap: 9px;
  }

  .rv-w-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .rv-w-kpi {
    padding: 8px;
  }

  .rv-w-kpi strong {
    font-size: 17px;
  }

  .rv-w-stage {
    min-height: auto;
    width: 100%;
    aspect-ratio: 1 / 1.32;
    overflow: visible;
  }

  .rv-w-svg {
    width: 100%;
    height: auto;
    display: block;
  }

  .rv-w-map-sector {
    stroke-width: 48;
  }

  .rv-w-map-sector.active {
    stroke-width: 56;
  }

  .rv-w-map-flow {
    stroke-width: 4.8;
    opacity: .64;
  }

  .rv-w-map-flow.active {
    stroke-width: 7;
    opacity: .98;
  }

  .rv-w-label {
    font-size: 13px;
  }

  .rv-w-sub {
    font-size: 11px;
  }

  .rv-w-mini {
    display: none;
  }

  .rv-w-caption {
    position: static;
    padding: 8px 2px 0;
    font-size: 10.5px;
  }

  .rv-w-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .rv-w-tooltip {
    left: 10px !important;
    right: 10px;
    top: auto !important;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .rv-w-stage {
    aspect-ratio: 1 / 1.38;
  }

  .rv-w-map-sector {
    stroke-width: 52;
  }

  .rv-w-map-flow {
    stroke-width: 5.2;
  }

  .rv-w-label {
    font-size: 14px;
  }

  .rv-w-sub {
    font-size: 11px;
  }
}
