/* ══════════════════════════════════════
   Automation — workflow list & editor
   ══════════════════════════════════════ */

.automation-layout { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-lg); }

/* ── Workflow list (left column) ── */
.workflow-list-col { display: flex; flex-direction: column; gap: var(--space-sm); }
.workflow-list { display: flex; flex-direction: column; gap: var(--space-sm); }

/* ── Workflow detail (right column) ── */
.workflow-detail-col { display: flex; flex-direction: column; gap: var(--space-lg); }
.workflow-editor-card, .run-history-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: var(--space-lg); }

.workflow-dsl-host { min-height: 280px; }
.dsl-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 280px; color: var(--text-muted); text-align: center;
  font-family: var(--font-body);
}
.dsl-empty svg { width: 56px; height: 56px; margin-bottom: var(--space-md); opacity: 0.25; }
.dsl-empty p { font-size: 0.875rem; line-height: 1.6; }

/* ── Run history ── */
.run-history-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.run-history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.run-history-item .run-time { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; }
.run-history-item .run-badge { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.run-history-item .run-badge.success { color: var(--emerald); }
.run-history-item .run-badge.error   { color: var(--rose); }

/* ── DSL step nodes ── */
.dsl-step {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  position: relative;
  transition: border-color var(--dur-fast);
}
.dsl-step:hover { border-color: var(--accent); }
.dsl-step-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--surface-3); display: grid; place-items: center;
  flex-shrink: 0; color: var(--accent);
}
.dsl-step-icon svg { width: 16px; height: 16px; }
.dsl-step-text { flex: 1; }
.dsl-step-name   { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.dsl-step-detail { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }
.dsl-connector { width: 2px; height: 20px; background: var(--border); margin: 0 0 var(--space-sm) 26px; }

/* ── Workflow actions ── */
.wf-actions { display: flex; gap: var(--space-sm); }
.hidden { display: none !important; }

@media (max-width: 900px) { .automation-layout { grid-template-columns: 1fr; } }
