Build a responsive layout for a dashboard application.
Implement the layout algorithm that selects a column count from responsive breakpoints and places widgets in input order using the earliest available grid position. Each widget has an identifier, column span, and row span.
Input: a widget list, viewport width, and breakpoint configurations. Output: widget positions containing row, column, rowSpan, and colSpan; spans larger than the active column count must be clamped.
def layout_dashboard(widgets, viewport_width, breakpoints):