/* ==========================================================================
   Ontology, Analytics & Pipeline
   ========================================================================== */

.ont-class-item {
  border: 1px solid var(--md-divider);
  border-radius: 6px;
  padding: 10px 14px;
  background: #fafafa;
}

.ont-class-item.subclass {
  margin-left: 20px;
  border-left: 3px solid var(--md-primary);
  background: var(--md-surface);
}

.ont-class-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.ont-class-desc {
  font-size: 0.84rem;
  color: var(--md-text-secondary);
  margin-top: 4px;
}

.ont-align-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ont-align-link {
  font-size: 0.78rem;
  color: var(--md-primary);
  background: var(--md-primary-soft);
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
}

.ont-align-link:hover { text-decoration: underline; }

.shacl-rules {
  margin: 6px 0 0 18px;
  padding: 0;
  font-size: 0.84rem;
  color: var(--md-text-secondary);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--md-surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--md-elev-1);
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--md-primary);
  margin-top: 4px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 165px 1fr 42px;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}

.bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  background: #eeeeee;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
}

.bar-val {
  text-align: right;
  font-weight: 500;
  color: var(--md-text-secondary);
  font-variant-numeric: tabular-nums;
}

.stepper-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--md-divider);
  border-top: 4px solid var(--md-divider);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.stepper-node.stage-active {
  border-color: #ffcc80;
  border-top-color: var(--md-primary);
  background: #fff8f3;
}

.stepper-node.stage-done {
  border-color: #a5d6a7;
  border-top-color: #2e7d32;
  background: #f1f8f4;
}

.stepper-node.stage-done .stepper-circle {
  background: #2e7d32;
  color: #ffffff;
}

.stepper-node.stage-active .stepper-circle {
  background: var(--md-primary);
  color: #ffffff;
}

.stepper-node.stage-failed {
  border-color: #ef9a9a;
  border-top-color: #c62828;
  background: #fff5f5;
}

.stepper-node.stage-failed .stepper-circle {
  background: #c62828;
  color: #ffffff;
}

.stepper-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stepper-foot code {
  font-size: 0.78rem;
  color: var(--md-text-secondary);
}

.log-console {
  margin: 0;
  padding: 14px 16px;
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  border-radius: 6px;
  background: #212121;
  color: #eeeeee;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
