/* Waterfall прогона (макет agent-runs-review 30.10.2026, спецификация 4.3).
   Токены — графитового каркаса Daenerys с запасными значениями: файл общий с HolyAgent. */

.rwf { display: flex; flex-direction: column; min-width: 0; color: var(--text-primary, #ececef); font-size: 12px; }
.rwf-empty { padding: 16px; color: var(--text-muted, #71717a); font-size: 13px; }

.rwf-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px 4px; }
.rwf-head h5 { margin: 0; font-size: 16px; font-weight: 600; }
.rwf-spacer { flex: 1; }
.rwf-legend { display: inline-flex; gap: 12px; font-size: 12px; color: var(--text-secondary, #a1a1aa); }
.rwf-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.rwf-ldot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.rwf-ldot-phase { background: #7c3aed; }
.rwf-ldot-step { background: #60a5fa; }
.rwf-ldot-llm { background: #a78bfa; }
.rwf-hint {
  font-family: var(--font-mono, 'JetBrains Mono', 'SF Mono', Consolas, monospace);
  font-size: 11px; color: var(--text-muted, #71717a);
  border: 1px solid var(--border-color, #2a2a2f); border-radius: 999px; padding: 2px 9px;
}

.rwf-rows { padding: 6px 16px 0; overflow-x: auto; }
.rwf-row {
  display: grid; grid-template-columns: 210px minmax(120px, 1fr) 170px; gap: 10px; align-items: center;
  height: 24px; border-radius: 6px; font-size: 12px; min-width: 520px;
}
.rwf-row:hover { background: rgba(255, 255, 255, 0.025); }
.rwf-click { cursor: pointer; }
.rwf-click:focus-visible { outline: 1px solid #4c3a99; outline-offset: -1px; }
.rwf-sel, .rwf-sel:hover { background: #16122b; }
.rwf-open { box-shadow: inset 2px 0 0 var(--accent-glow, #a855f7); }
.rwf-axis { height: 22px; cursor: default; }
.rwf-axis:hover { background: none; }
.rwf-ticks {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono, 'JetBrains Mono', 'SF Mono', Consolas, monospace);
  font-size: 10px; color: var(--text-muted, #71717a); font-variant-numeric: tabular-nums;
}

.rwf-nm { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-secondary, #a1a1aa); }
.rwf-d1 { padding-left: 12px; }
.rwf-d2 { padding-left: 24px; }
.rwf-d3 { padding-left: 36px; }
.rwf-grp { color: var(--text-primary, #ececef); font-weight: 600; }
.rwf-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rwf-k {
  flex: none; font-family: var(--font-mono, 'JetBrains Mono', 'SF Mono', Consolas, monospace); font-size: 9.5px; font-weight: 500;
  color: var(--text-muted, #71717a); border: 1px solid var(--border-color, #2a2a2f); border-radius: 4px; padding: 0 4px; line-height: 14px;
}

.rwf-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.rwf-dot-wait, .rwf-dot-muted { background: #64748b; }
.rwf-dot-restart { background: #a78bfa; }
.rwf-dot-phase, .rwf-dot-group { background: #7c3aed; }
.rwf-dot-bad { background: var(--accent-red, #ef4444); }
.rwf-dot-retry { background: var(--accent-yellow, #eab308); }
.rwf-dot-skip { background: #475569; }
.rwf-dot-live { background: #60a5fa; animation: rwf-pulse 1.4s ease-in-out infinite; }

.rwf-lane {
  position: relative; height: 24px; min-width: 0;
  border-left: 1px solid var(--border-color, #2a2a2f); border-right: 1px solid var(--border-color, #2a2a2f);
  background-image: linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 25% 100%;
}
.rwf-axis .rwf-ticks { border: 0; }
.rwf-lane-zoom { background-color: rgba(124, 58, 237, 0.07); }

.rwf-bar {
  position: absolute; top: 5px; height: 15px; min-width: 4px; border-radius: 5px; box-sizing: border-box;
  padding: 0 5px; overflow: hidden; white-space: nowrap; text-overflow: clip;
  font-family: var(--font-mono, 'JetBrains Mono', 'SF Mono', Consolas, monospace); font-size: 9.5px; line-height: 15px; color: #fff;
}
.rwf-bar-step { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.rwf-bar-tool { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.rwf-bar-llm { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.rwf-bar-wait { background: repeating-linear-gradient(135deg, #334155 0 4px, #1e293b 4px 8px); }
.rwf-bar-phase, .rwf-bar-group { background: linear-gradient(90deg, rgba(124, 58, 237, 0.35), rgba(124, 58, 237, 0.18)); border: 1px solid #4c3a99; }
.rwf-bar-final { background: linear-gradient(90deg, #16a34a, #4ade80); }
.rwf-bar-bad { background: linear-gradient(90deg, #dc2626, #f87171); }
.rwf-bar-retry { background: linear-gradient(90deg, #ea580c, #fb923c); }
.rwf-bar-muted { background: #64748b; }
.rwf-bar-live { background: linear-gradient(90deg, #3b82f6, #60a5fa); animation: rwf-pulse 1.4s ease-in-out infinite; }
.rwf-bar-restart {
  background: repeating-linear-gradient(135deg, rgba(167, 139, 250, 0.55) 0 6px, rgba(124, 58, 237, 0.35) 6px 12px);
  border: 1px solid #a78bfa;
}
.rwf-pt { position: absolute; top: 4.5px; width: 15px; height: 15px; margin-left: -7px; border-radius: 50%; background: #334155; }

.rwf-meta {
  font-family: var(--font-mono, 'JetBrains Mono', 'SF Mono', Consolas, monospace); font-size: 10.5px; color: var(--text-muted, #71717a);
  text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums;
}

@keyframes rwf-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .rwf-dot-live, .rwf-bar-live { animation: none; } }
