<%= budget_item[:category_name] %>
<% case budget_item[:status] %>
<% when :over %>
<%= icon("alert-circle", class: "w-3 h-3") %>
<%= t("reports.budget_performance.status.over") %>
<% when :warning %>
<%= icon("alert-triangle", class: "w-3 h-3") %>
<%= t("reports.budget_performance.status.warning") %>
<% when :good %>
<%= icon("check-circle", class: "w-3 h-3") %>
<%= t("reports.budget_performance.status.good") %>
<% end %>
<%= budget_item[:percent_used].round(0) %>%
<%= t("reports.budget_performance.spent") %>:
<%= Money.new(budget_item[:actual], Current.family.currency).format %>
<%= t("reports.budget_performance.budgeted") %>:
<%= Money.new(budget_item[:budgeted], Current.family.currency).format %>
<% if budget_item[:remaining] >= 0 %>
<%= t("reports.budget_performance.remaining") %>:
<%= Money.new(budget_item[:remaining], Current.family.currency).format %>
<% else %>
<%= t("reports.budget_performance.over_by") %>:
<%= Money.new(budget_item[:remaining].abs, Current.family.currency).format %>
<% end %>
<%# Suggested Daily Limit (if remaining days in month) %>
<% if budget_item[:remaining] > 0 && start_date.month == Date.current.month && start_date.year == Date.current.year %>
<% days_remaining = (start_date.end_of_month - Date.current).to_i + 1 %>
<% if days_remaining > 0 %>
<%= t("reports.budget_performance.suggested_daily",
amount: Money.new((budget_item[:remaining] / days_remaining), Current.family.currency).format,
days: days_remaining) %>