.pg-graph {
  --pg-mint: #79ead7;
  --pg-violet: #a89cff;
  --pg-amber: #ffc777;
  color: #e8eff8;
  background: #0e1725;
  border: 1px solid #24334a;
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.pg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  min-height: 44px;
  box-sizing: border-box;
}
.pg-heading {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
}
.pg-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-demo,
.pg-live-label {
  font-size: 12px;
  color: #92a4bc;
}
.pg-demo {
  color: var(--pg-amber);
}
.pg-motion {
  border: 1px solid #33445c;
  border-radius: 6px;
  padding: 5px 9px;
  background: #162236;
  color: #d8e5f5;
  font:
    12px/1.3 system-ui,
    sans-serif;
  cursor: pointer;
}
.pg-motion:hover {
  border-color: var(--pg-mint);
}
.pg-frame {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  box-sizing: border-box;
  scrollbar-color: #40546f #111b2b;
}
.pg-svg {
  display: block;
  width: 100%;
  min-width: 1100px;
  height: 200px;
  max-height: 215px;
  overflow: hidden;
}
.pg-node {
  --pg-accent: var(--pg-mint);
  box-sizing: border-box;
  height: 60px;
  margin: 3px;
  border: 1px solid #365365;
  border-radius: 8px;
  background: #111f2e;
  overflow: hidden;
}
.pg-node-bot,
.pg-node-crm {
  --pg-accent: var(--pg-violet);
  border-color: #4c456c;
  background: #1a2033;
}
.pg-node-operator {
  --pg-accent: var(--pg-amber);
  border-color: #66513a;
  background: #24242d;
}
.pg-node-waiting {
  --pg-accent: #a4bddb;
}
.pg-node.pg-selected {
  border-color: var(--pg-accent);
  box-shadow: 0 0 0 2px var(--pg-accent);
}
.pg-node.pg-occupied {
  box-shadow: inset 2px 0 var(--pg-accent);
}
.pg-node.pg-selected.pg-occupied {
  box-shadow:
    inset 2px 0 var(--pg-accent),
    0 0 0 2px var(--pg-accent);
}
.pg-stage-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 8px 8px;
  background: transparent;
  border: 0;
  text-align: left;
  color: #e8eff8;
  cursor: pointer;
}
.pg-stage-button:hover {
  background: #ffffff08;
}
.pg-node-title {
  font:
    600 12px/1.25 system-ui,
    sans-serif;
  white-space: nowrap;
}
.pg-node-count {
  color: var(--pg-accent);
  font:
    600 20px/1 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.pg-node-note {
  grid-column: 1/-1;
  color: #a1b0c4;
  font:
    12px/1.25 system-ui,
    sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-motion:focus-visible,
.pg-stage-button:focus-visible,
.pg-frame:focus-visible,
.pg-unknown:focus-visible {
  outline: 2px solid #79ead7;
  outline-offset: -3px;
}
.pg-wire {
  fill: none;
  stroke: #40536b;
  stroke-width: 1.6;
}
.pg-alternate .pg-wire {
  stroke-width: 1.3;
  stroke-dasharray: 4 5;
}
.pg-arrowhead {
  fill: none;
  stroke: #7991aa;
  stroke-width: 1.3;
}
.pg-pulse {
  fill: none;
  stroke: var(--pg-mint);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 5 55;
  animation: pg-circulate 4s linear infinite;
  filter: drop-shadow(0 0 3px #79ead755);
  opacity: 0.55;
}
.pg-link-bot .pg-pulse,
.pg-link-crm .pg-pulse {
  stroke: var(--pg-violet);
}
.pg-link-operator .pg-pulse {
  stroke: var(--pg-amber);
}
.pg-alternate .pg-pulse {
  opacity: 0.3;
}
.pg-label {
  fill: #93a5bd;
  font:
    12px system-ui,
    sans-serif;
}
.pg-transition-marker {
  fill: #f2fffc;
  stroke: #79ead7;
  stroke-width: 2;
}
.pg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  border-top: 1px solid #24334a;
  padding: 5px 16px;
  color: #a1b0c4;
  font:
    12px/1.5 system-ui,
    sans-serif;
  box-sizing: border-box;
}
.pg-footer-note {
  color: #92a4bc;
}
.pg-unknown {
  color: #eaa0ae;
  background: transparent;
  border: 1px dashed #674456;
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
  font:
    12px/1.5 system-ui,
    sans-serif;
  white-space: nowrap;
}
.pg-unknown.pg-selected {
  border-color: #ff7a93;
  background: #302031;
}
.pg-paused .pg-pulse,
.pg-stale .pg-pulse,
.pg-hidden .pg-pulse {
  animation-play-state: paused;
}
.pg-stale .pg-pulse {
  opacity: 0.2;
}
@keyframes pg-circulate {
  to {
    stroke-dashoffset: -120;
  }
}
.pg-ticket-route {
  margin-top: 20px;
  padding: 14px;
  background: #111b2b;
  border: 1px solid #293a51;
  border-radius: 10px;
  color: #e8eff8;
}
.pg-ticket-route header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pg-ticket-route h3,
.pg-ticket-route h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.pg-ticket-route h4 {
  margin-bottom: 10px;
  color: #bbcadd;
  font-size: 13px;
}
.pg-route-stage {
  color: #79ead7;
  font-size: 12px;
}
.pg-route-cycles,
.pg-route-events {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pg-route-cycle {
  padding: 12px 0;
  border-top: 1px solid #293a51;
}
.pg-route-points {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
}
.pg-route-points > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pg-route-points > span:nth-child(2) {
  color: #79ead7;
}
.pg-route-points small,
.pg-route-events small {
  display: block;
  color: #92a4bc;
  font-size: 12px;
  margin-top: 5px;
}
.pg-route-cycle p,
.pg-route-note {
  margin: 9px 0 0;
  color: #a1b0c4;
  font-size: 12px;
  line-height: 1.6;
}
.pg-route-technical {
  margin-top: 18px;
}
.pg-route-events {
  margin-top: 12px;
  border-left: 1px solid #60558a;
  padding-left: 15px;
}
.pg-route-events li {
  position: relative;
  padding: 0 0 16px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.pg-route-events li::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a89cff;
}
.pg-route-events li > span {
  margin-left: 10px;
  color: #a1b0c4;
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .pg-pulse {
    animation: none;
    opacity: 0.3;
  }
}
@media (max-width: 700px) {
  .pg-header {
    flex-wrap: wrap;
    padding: 9px 12px;
    gap: 8px;
  }
  .pg-controls {
    gap: 9px;
    flex-wrap: wrap;
  }
  .pg-footer {
    flex-wrap: wrap;
    padding: 7px 12px;
    gap: 5px;
  }
  .pg-svg {
    width: 1100px;
  }
  .pg-ticket-route {
    padding: 12px;
  }
}
