/* Стили интерактивного трекера пайплайна и потока мыслей агентов */

.pipeline-tracker-box {
  background: var(--panel-bg);
  backdrop-filter: var(--panel-blur);
  border: var(--panel-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.pipeline-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pipeline-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pipeline-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-completed {
  background: rgba(0, 208, 132, 0.2);
  color: var(--accent-green);
  border: 1px solid rgba(0, 208, 132, 0.4);
}

.status-running {
  background: rgba(0, 119, 255, 0.2);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 119, 255, 0.4);
  animation: pulse-border 2s infinite;
}

.status-idle {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(0, 119, 255, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(0, 119, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 119, 255, 0); }
}

.btn-run-pipeline {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: linear-gradient(135deg, #0077ff 0%, #00d084 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-run-pipeline:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.pipeline-progress-wrapper {
  margin-bottom: 16px;
}

.pipeline-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pipeline-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.pipeline-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0077ff, #00d084);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.stage-card {
  background: rgba(11, 15, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.stage-card.is-active {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 119, 255, 0.25);
}

.stage-card.stage-completed {
  border-left: 3px solid var(--accent-green);
}

.stage-card.stage-in_progress {
  border-left: 3px solid var(--accent-blue);
  background: rgba(0, 119, 255, 0.06);
}

.stage-card.stage-critique {
  border-left: 3px solid var(--accent-red);
}

.stage-card.stage-pending {
  border-left: 3px solid var(--text-muted);
  opacity: 0.75;
}

.stage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-icon {
  font-size: 16px;
}

.stage-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
}

.badge-completed { color: var(--accent-green); background: rgba(0, 208, 132, 0.15); }
.badge-in_progress { color: var(--accent-blue); background: rgba(0, 119, 255, 0.15); }
.badge-critique { color: var(--accent-red); background: rgba(255, 77, 77, 0.15); }
.badge-pending { color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }

.stage-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-agent {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Фильтры мыслей агентов */
.thoughts-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  font-weight: 600;
}

/* Карточки мыслей (Agent Thought Cards) */
.thoughts-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.thought-card {
  background: var(--panel-bg);
  border: var(--panel-border);
  border-radius: 10px;
  padding: 16px 20px;
  backdrop-filter: var(--panel-blur);
  transition: transform 0.15s ease;
}

.thought-card:hover {
  transform: translateY(-2px);
}

.thought-card.thought-hypothesis {
  border-left: 4px solid var(--accent-purple);
  background: rgba(157, 78, 221, 0.06);
}

.thought-card.thought-analysis {
  border-left: 4px solid var(--accent-blue);
  background: rgba(0, 119, 255, 0.06);
}

.thought-card.thought-calculation {
  border-left: 4px solid var(--accent-green);
  background: rgba(0, 208, 132, 0.06);
}

.thought-card.thought-legal {
  border-left: 4px solid var(--accent-yellow);
  background: rgba(255, 184, 0, 0.06);
}

.thought-card.thought-critique {
  border-left: 4px solid var(--accent-red);
  background: rgba(255, 77, 77, 0.08);
}

.thought-card.thought-conclusion {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.thought-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.thought-author-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thought-author-role {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.thought-author-name {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.thought-meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thought-stage-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text-secondary);
}

.thought-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.badge-type-hypothesis { background: rgba(157, 78, 221, 0.25); color: #d8b4fe; }
.badge-type-analysis { background: rgba(0, 119, 255, 0.25); color: #93c5fd; }
.badge-type-calculation { background: rgba(0, 208, 132, 0.25); color: #86efac; }
.badge-type-legal { background: rgba(255, 184, 0, 0.25); color: #fde047; }
.badge-type-critique { background: rgba(255, 77, 77, 0.25); color: #fca5a5; }
.badge-type-conclusion { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }

.thought-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.thought-cot-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.thought-cot-summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  user-select: none;
}

.thought-cot-text {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.thought-conclusion-box {
  background: rgba(0, 208, 132, 0.08);
  border: 1px solid rgba(0, 208, 132, 0.2);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 8px;
}

.conclusion-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conclusion-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.thought-artifacts {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}
