/* automation views */
.auto-head { margin-bottom: 12px; }
.auto-back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); margin-bottom: 6px; }
.auto-head-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.auto-name { font-size: 18px; font-weight: 650; max-width: 360px; flex: 1 1 200px; }
.auto-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.flow-if { display: flex; flex-direction: column; align-items: center; width: 100%; }
.flow-branch { min-width: 0; }
.flow-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.flow-node.warn { border-color: var(--bad); }
.flow-node.end-cap { cursor: default; text-align: center; max-width: 120px; padding: 6px; color: var(--muted); font-size: 12px; border-style: dashed; box-shadow: none; }
.flow-node.end-cap:hover { border-color: var(--border); }
.flow-add { padding: 0; flex: none; }
.auto-warn { color: var(--bad); margin-top: 4px; }
.auto-preview { width: 100%; height: 320px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.auto-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.auto-run { border-bottom: 1px solid var(--border); }
.auto-run:last-child { border-bottom: 0; }
.auto-run-row { flex-wrap: wrap; border-bottom: 0; }
.auto-log { padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 3px; background: var(--surface-2); }
.rule-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 8px; align-items: center; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--ink); }
@media (max-width: 900px) { .auto-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .flow-branches { grid-template-columns: 1fr; }
  .rule-row { grid-template-columns: 1fr 1fr; }
  .auto-head-row .row { margin-left: 0 !important; flex-wrap: wrap; }
}
