/* Operator layout lock: readable cards, stable columns and no horizontal clipping. */
.reference-automations .automation-layout {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:14px;
  min-width:0;
}

.reference-automations .automation-board {
  min-width:0;
  padding:18px;
  overflow:hidden;
}

.reference-automations .automation-board-header {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(280px, 420px);
  gap:14px;
  align-items:start;
  margin-bottom:14px;
}

.reference-automations .automation-board-tools {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:8px;
  min-width:0;
}

.reference-automations .chip-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.reference-automations .kanban {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  min-width:0;
}

.reference-automations .kanban-column {
  min-width:0;
  min-height:360px;
  max-height:430px;
  padding:12px;
  overflow:auto;
}

.reference-automations .flow-card {
  min-width:0;
  min-height:150px;
  padding:12px;
}

.reference-automations .flow-card-head {
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:10px;
  align-items:start;
}

.reference-automations .flow-title,
.reference-automations .flow-name {
  min-width:0;
}

.reference-automations .flow-name strong,
.reference-automations .flow-card strong {
  display:block;
  overflow-wrap:anywhere;
}

.reference-automations .flow-actions {
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.reference-automations .automation-side {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  min-width:0;
}

.reference-automations .automation-builder {
  grid-column:1 / -1;
}

.reference-automations .automation-builder .form-grid {
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.reference-automations .automation-builder textarea {
  min-height:76px;
}

.reference-automations .automation-builder .action-row {
  gap:8px;
  flex-wrap:wrap;
}

.reference-automations .automation-bottom {
  margin-top:14px;
}

@media (max-width: 1280px) {
  .reference-automations .automation-board-header,
  .reference-automations .kanban,
  .reference-automations .automation-side,
  .reference-automations .automation-builder .form-grid {
    grid-template-columns:1fr;
  }

  .reference-automations .kanban-column {
    min-height:260px;
    max-height:360px;
  }
}
