/* ── Shared pipeline flow view ──────────────────────────────────────────────
   The same definition drawn the same way in Daenerys and in the agent. Kept
   next to pipelineFlow.js and vendored together with it. */
.pflow {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pflow-empty {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.85);
}

.pflow-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(196, 181, 253, 0.95);
}

.pflow-job {
  border: 1px solid rgba(93, 74, 255, 0.25);
  border-radius: 0.8rem;
  padding: 0.55rem 0.7rem;
  background: rgba(15, 23, 42, 0.4);
}

.pflow-job-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.pflow-job-id {
  font-weight: 600;
  font-size: 0.82rem;
}

.pflow-edge,
.pflow-role {
  font-size: 0.7rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(148, 163, 184, 0.95);
}

.pflow-steps {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pflow-step {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.55rem;
  border-left: 2px solid rgba(129, 140, 248, 0.5);
  background: rgba(30, 41, 59, 0.35);
  border-radius: 0 0.5rem 0.5rem 0;
  min-width: 0;
}

.pflow-step-id {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.76rem;
  color: #c4b5fd;
}

.pflow-step-meta {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.85);
  overflow-wrap: anywhere;
}

.pflow-step-status {
  font-size: 0.68rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.pflow-step-done { border-left-color: rgba(52, 211, 153, 0.7); }
.pflow-step-status-done { color: #6ee7b7; background: rgba(52, 211, 153, 0.15); }
.pflow-step-live { border-left-color: rgba(56, 189, 248, 0.75); }
.pflow-step-status-live { color: #7dd3fc; background: rgba(56, 189, 248, 0.15); }
.pflow-step-failed { border-left-color: rgba(248, 113, 113, 0.75); }
.pflow-step-status-failed { color: #fca5a5; background: rgba(248, 113, 113, 0.15); }

/* ── Подробная карта списком (pipelineDetailList) ───────────────────────────
   Фолбэк без React Flow и режим телефона: дорожки вертикалью, узлы —
   кнопки. Классы pfl-* (pipeline flow list). */
.pfl {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.pfl-empty {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.85);
}

.pfl-lane {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 0.9rem;
  padding: 0.6rem 0.7rem 0.7rem;
  background: rgba(15, 23, 42, 0.35);
}

.pfl-lane-dialogue { background: rgba(76, 29, 149, 0.12); border-color: rgba(167, 139, 250, 0.28); }
.pfl-lane-execution { background: rgba(30, 58, 138, 0.1); border-color: rgba(96, 165, 250, 0.24); }

.pfl-lane-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  margin-bottom: 0.5rem;
}

.pfl-lane-dialogue .pfl-lane-title { color: rgba(196, 181, 253, 0.9); }
.pfl-lane-execution .pfl-lane-title { color: rgba(147, 197, 253, 0.9); }

.pfl-nodes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

/* Вертикальная линия связывает узлы дорожки, как стрелки на холсте. */
.pfl-nodes::before {
  content: '';
  position: absolute;
  left: 1.05rem;
  top: 0.8rem;
  bottom: 0.8rem;
  border-left: 2px solid rgba(148, 163, 184, 0.25);
}

.pfl-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem 0.55rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.55);
  color: var(--text-primary, #e2e8f0);
  text-align: left;
  font: inherit;
  cursor: default;
}

button.pfl-node { cursor: pointer; }
button.pfl-node:hover { background: rgba(30, 41, 59, 0.75); }
button.pfl-node:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.85); }
.pfl-node-on { box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.85); }

.pfl-node-phase { border-color: rgba(167, 139, 250, 0.45); background: rgba(46, 16, 101, 0.42); }
.pfl-node-step { border-color: rgba(96, 165, 250, 0.4); }
.pfl-node-compensation { border-style: dashed; border-color: rgba(248, 113, 113, 0.55); margin-left: 1.4rem; width: calc(100% - 1.4rem); }
.pfl-node-start, .pfl-node-end {
  align-self: flex-start;
  width: auto;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.9);
}
.pfl-node-start { border-color: rgba(52, 211, 153, 0.5); }

.pfl-node-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.pfl-node-label {
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.3;
  min-width: 0;
}

.pfl-node-kind {
  margin-left: auto;
  font-size: 0.66rem;
  color: rgba(148, 163, 184, 0.8);
  white-space: nowrap;
}

.pfl-node-start .pfl-node-kind, .pfl-node-end .pfl-node-kind { display: none; }

.pfl-node-subtitle {
  font-size: 0.74rem;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.95);
  word-break: break-word;
}

.pfl-node-chips, .pfl-node-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.pfl-chip {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.66rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.9);
}

.pfl-mark {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.06rem 0.42rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pfl-mark-undo { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.pfl-mark-review { background: rgba(251, 191, 36, 0.18); color: #fde68a; }
.pfl-mark-undone { background: rgba(234, 179, 8, 0.18); color: #fde68a; }
.pfl-mark-undo-failed { background: rgba(239, 68, 68, 0.24); color: #fecaca; }

.pfl-node-transitions {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.7rem;
  color: rgba(196, 181, 253, 0.9);
}

.pfl-dot {
  flex: 0 0 auto;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.6);
}

.pfl-dot-none { background: rgba(148, 163, 184, 0.28); }
.pfl-dot-succeeded { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }
.pfl-dot-running { background: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22); }
.pfl-dot-failed { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.22); }
.pfl-dot-pending { background: rgba(148, 163, 184, 0.6); }
