.routes-board {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  touch-action: pan-y;
  contain: layout paint;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(31, 60, 94, 0.42), transparent 56%),
    #0a131f;
  background-size: 38px 38px, 38px 38px, auto, auto;
  box-shadow: var(--shadow-heavy);
}

.routes-board::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(243, 107, 22, 0.12);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.routes-board__head {
  position: absolute;
  z-index: 4;
  top: 24px;
  right: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.routes-board__status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dce2e9;
  font-size: 0.78rem;
  font-weight: 800;
}

.routes-board__status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #53e08d;
  box-shadow: 0 0 18px rgba(83, 224, 141, 0.7);
  content: "";
}

.route-filters {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: rgba(5, 12, 21, 0.68);
}

.route-filter {
  min-height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 2px;
  color: var(--color-muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.route-filter.is-active {
  color: #fff;
  background: var(--color-orange);
}

.route-canvas {
  position: absolute;
  inset: 94px 30px 34px;
  overflow: hidden;
  touch-action: pan-y;
}

.route-canvas svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  touch-action: pan-y;
}

.route-path {
  opacity: 0.09;
  fill: none;
  stroke: #7f91a8;
  stroke-dasharray: 9 11;
  stroke-width: 1.5;
  transition: opacity 300ms ease, stroke 300ms ease, stroke-width 300ms ease;
}

.route-path.is-active {
  opacity: 0.82;
  stroke: var(--color-orange);
  stroke-width: 2;
  animation: route-flow 10s linear infinite;
}

.route-node {
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.route-node.is-active {
  opacity: 1;
}

.route-node circle:first-child {
  fill: #0d1a2a;
  stroke: #76869a;
  stroke-width: 1.4;
}

.route-node circle:nth-child(2) {
  fill: #96a4b4;
}

.route-node text {
  fill: #d7dee6;
  font-family: var(--font-arabic);
  font-size: 12px;
  font-weight: 800;
}

.route-node.is-origin circle:first-child {
  fill: var(--color-orange);
  stroke: #ffab71;
}

.route-node.is-origin circle:nth-child(2) {
  fill: #fff;
}

.route-node.is-origin text {
  fill: #fff;
  font-size: 13px;
}

.route-node.is-active circle:first-child {
  filter: drop-shadow(0 0 7px rgba(243, 107, 22, 0.74));
}


.route-board-label {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--color-muted);
  font-size: 0.72rem;
}

.route-board-label::before {
  width: 22px;
  height: 1px;
  background: var(--color-orange);
  content: "";
}

@keyframes route-flow {
  to { stroke-dashoffset: -200; }
}

@media (max-width: 700px) {
  .routes-board {
    min-height: 630px;
  }

  .routes-board__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-filters {
    width: 100%;
  }

  .route-filter {
    flex: 1;
  }

  .route-canvas {
    inset: 132px 6px 34px;
  }

  .route-node text {
    font-size: 10px;
  }

  .route-board-label {
    right: 16px;
    bottom: 16px;
  }
}
