> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commander.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Budget Lines

Budget lines organize your transactions into categories that track spending and income patterns. Each line
operates as an independent container where transactions accumulate according to your chosen [budgeting mode](/core-concepts/budget-modes).
The app calculates totals, displays progress, and provides detailed spending analysis for each line throughout
your budget cycles.

## Creating, editing, and deleting lines

When you create a budget line, you provide a name and color that identify the line throughout the app.
The app adds the created line to the Budget page, but it shows no activity until you assign transactions to it.

* **Targets Mode:** the create and edit form includes a target amount field that sets your spending goal for the current
  and future cycles.
* **Envelope Mode:** the create form includes an initial funding field where you transfer money from your unbudgeted
  funds pool into the new line.

Editing a line allows you to change its name or color at any time. These changes update the line across all
historical records and carry forward into future cycles without triggering recalculations.

<Note>
  In **Targets Mode**, you can also modify the target amount, which affects
  the current cycle and all future cycles while refreshing calculations that
  compare spending against the target, such as "Remaining Amount" and status
  bar percentages.
</Note>

If you want to remove a line from the app, in most cases you should archive the budget line rather than deleting it.
Archiving removes the line from your main list and prevents new transaction assignments while preserving all historical data.
If you need to fully delete a line, you must first reassign or remove all associated transactions.
Deletion alters historical records as if the line never existed, which is why this action is deliberately difficult to perform.

## Budget page overview

The Budget page displays all active budget lines in a list with each line showing its name
and current cycle activity. Below each line name, a status bar fills from left to right representing
spending as a percentage of a comparison metric that varies by mode.

* **Tracking Mode:** the status bar shows current
  cycle activity compared to previous cycle totals (spending \$70 this cycle versus \$100 last cycle
  displays as 70%).
* **Targets Mode:** the status bar represents spending against your defined target.
* **Envelope Mode:** the status bar shows spending against available funds, which includes carryover from the previous cycle plus net transfers
  into the envelope.

The status bar changes color based on spending thresholds to provide quick visual feedback. The page also shows
an aggregated total of spending across all active lines for the current cycle, and includes a graph comparing
current and previous cycle activity. In Targets Mode, additional statistics display targeted spending and
remaining targeted spending across all lines. In Envelope Mode, a funding section shows total
available funds across all envelopes, and a Line Transfers section records movements between envelopes
and transfers from the unbudgeted funds pool.

### Status bar colors

While viewing the main Budget page, each line has a status bar shown underneath the line's name.
This bar shows the amount spent as a percentage of the line's spending limit, as defined in the chart below:

| Budget Mode  | Amount                                                                                           | Limit                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| **Tracking** | Expenses and income transactions assigned to that line                                           | The total of all expenses and income in the previous cycle                                             |
| **Targets**  | Expenses and income transactions assigned to that line                                           | The most recently defined line target at the end of the cycle                                          |
| **Envelope** | Expenses and income transactions assigned to that line, which doesn't include envelope transfers | The funds which carried over from the previous cycle, plus the net transferred funds into the envelope |

The status bar is then also displayed with a color based on the threshold level to make it easier to view your budget status at a glance.

| Threshold         | Color      |                                                                                     |
| ----------------- | ---------- | ----------------------------------------------------------------------------------- |
| Income, >100%     | Dark Green | <div style={{"background-color": "#005620", "width": "16px", "height": "16px" }} /> |
| Income, 0-100%    | Green      | <div style={{"background-color": "#00752b", "width": "16px", "height": "16px" }} /> |
| Spending, 0-60%   | Blue       | <div style={{"background-color": "#1C60D9", "width": "16px", "height": "16px" }} /> |
| Spending, 60-75%  | Yellow     | <div style={{"background-color": "#F59E0B", "width": "16px", "height": "16px" }} /> |
| Spending, 75-90%  | Orange     | <div style={{"background-color": "#B45309", "width": "16px", "height": "16px" }} /> |
| Spending, 90-100% | Red        | <div style={{"background-color": "#E42E3A", "width": "16px", "height": "16px" }} /> |
| Spending, >100%   | Dark Red   | <div style={{"background-color": "#9A172D", "width": "16px", "height": "16px" }} /> |

## Reading the Budget Line Detail page

The detail page for an individual budget line presents a comprehensive view of that line's activity over time.
A graph displays all historical spending for the line, while a transaction table lists every transaction
assigned to the line across all past periods. The inspector pane displays spending statistics for multiple time ranges
including "Spending this Cycle," "Spending Last Month," and "Spending Last Year." Positive amounts appear in
green while negative amounts display in red.

* **Tracking Mode:** The detail page displays current cycle metrics and compares spending against
  previous cycles.
* **Targets Mode:** The Budget Line Detail page includes a targets section showing "Remaining Amount" and
  "Targeted Amount" for the current cycle, along with a target history section that records all past and
  current target values you've set for the line.
* **Envelope Mode:** The detail page has a funding section showing "Remaining Funds" available in the
  envelope/line and provides a funding history showing all transfers into and out of the line, including
  movements from the unbudgeted funds pool and exchanges with other budget lines.
