How to set backgroud color on GroupFooterTemplate

<GroupFooterTemplate style="background-color: red;">
                Group amount: <b>@String.Format(new System.Globalization.CultureInfo("en-US"), "{0:C}", context.Data.Items.Cast<Order>().Sum(o => o.Freight))</b>
            </GroupFooterTemplate>
```

You cannot set style on a template, the style should be set on an element declared in this template.

This is solution

<style>

    .bg-color-default {
        background-color: #bbbfca !important;
    }

    .bg-color-red {
        background-color: #ff7878 !important;
    }

    .bg-color-yellow {
        background-color: #ffdf41 !important;
    }

    .bg-color-blue {
        background-color: #bbbfca !important;
    }
</style>

<RadzenDataGridColumn TItem="PurchaseAnalysisDetailModel" Property="Sugerido" Title="Sugerido" GroupFooterCssClass="@footerBackgroundColor">
                                <Template Context="data">
                                    @String.Format(new System.Globalization.CultureInfo("en-US"), "{0:N0}", data.Sugerido)
                                </Template>
                                <GroupFooterTemplate Context="group">
                                    @{
                                        var groupItems = (IEnumerable<PurchaseAnalysisDetailModel>)group.Data.Items;
                                        var sugeridoTotal = groupItems.Sum(x => x.Sugerido);
                                        var anualTotal = groupItems.Sum(x => x.Anual);
                                        
                                        footerBackgroundColor = "bg-color-default";

                                        if (sugeridoTotal <= anualTotal * 2)
                                        {
                                            footerBackgroundColor = "bg-color-red";
                                        }
                                        else if (sugeridoTotal <= anualTotal * 4)
                                        {
                                            footerBackgroundColor = "bg-color-yellow";
                                        }
                                    }
                                    <b style="font-size: 14px;">
                                        @String.Format(new System.Globalization.CultureInfo("en-US"), "{0:N0}", sugeridoTotal)
                                    </b>
                                </GroupFooterTemplate>
                            </RadzenDataGridColumn>

@code {
    
    string footerBackgroundColor = "";
}