/*
 * Monthly Budget in the Accounts & Assets style (budgetsimple, 2026-11-24; the mockup is the Claude Design canvas
 * "Budget page in the Accounts style"). Display only: every id, control and writer of the page is unchanged; this
 * sheet restyles them and js/app/budgetcalculator/ui/budgetOverview.js adds what the layout needs around them (the
 * "What you spend on" list in the summary card, the one Add menu). Every rule starts at .bud-simple (the class on
 * .budget-container) or .bud-menu (the Add menu's own parts).
 */
.bud-simple {
    --bud-line: var(--ui-borders-borderLight);
}

/* ---------- Summary card: the figure on the left, what it is made of on the right ---------- */
.bud-simple #budgetSummaryBar {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
    grid-template-areas: "head spend" "body spend";
    grid-template-rows: auto 1fr;
    gap: 6px 40px;
    padding: 22px 26px;
    margin-bottom: 14px;
    border-radius: 16px;
}
.bud-simple #budgetSummaryBar > .budget-snapshot-header { grid-area: head; justify-content: flex-start; }
/* The age on show (budgetSnapshotAge.js, 2026-11-29): under the title, "average month at N", then ‹ › together, then
   one jump button. An arrow at the end of the range is hidden (keeps its room so nothing moves), never greyed out. */
.bud-simple #budgetSummaryBar .budget-summary-card-titles { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bud-simple #budgetSummaryBar .snap-age-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.bud-simple #budgetSummaryBar .snap-age-row .budget-summary-card-context { margin-left: 0; }
.bud-simple #budgetSummaryBar .snap-age { display: inline-flex; align-items: center; gap: 2px; margin-left: -4px; }
.bud-simple #budgetSummaryBar .snap-age-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ui-text-secondaryText);
    font-size: var(--text-xs, 12px);
    cursor: pointer;
}
.bud-simple #budgetSummaryBar .snap-age-step:hover { background: rgba(var(--color-gray-500-rgb), 0.14); color: var(--ui-text-primaryText); }
.bud-simple #budgetSummaryBar .snap-age-step:focus-visible,
.bud-simple #budgetSummaryBar .snap-age-jump:focus-visible { outline: 2px solid var(--ui-text-linkText); outline-offset: 1px; }
.bud-simple #budgetSummaryBar .snap-age-step.is-off { visibility: hidden; pointer-events: none; }
.bud-simple #budgetSummaryBar .snap-age-jump {
    padding: 3px 11px;
    border: 1px solid var(--ui-borders-borderDefault);
    border-radius: 999px;
    background: transparent;
    color: var(--ui-text-linkText);
    font-size: var(--text-xs, 12px);
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}
.bud-simple #budgetSummaryBar .snap-age-jump:hover { background: rgba(var(--color-gray-500-rgb), 0.08); }
.bud-simple #budgetSummaryBar > .budget-snapshot-body {
    grid-area: body;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.bud-simple #budgetSummaryBar > .bud-spend { grid-area: spend; }
.bud-simple #budgetSummaryBar .budget-snapshot-flex-badge { display: none; }
.bud-simple #budgetSummaryBar .budget-summary-card-vdivider { display: none; }
.bud-simple #budgetSummaryBar .budget-summary-stat:first-child .budget-summary-stat-label { display: none; }
.bud-simple #budgetSummaryBar .budget-summary-stat-value { font-size: 36px; letter-spacing: -0.8px; }
.bud-simple #budgetSummaryBar .budget-summary-stat:not(:first-child) { flex-direction: row; align-items: baseline; gap: 8px; }
.bud-simple #budgetSummaryBar .budget-summary-stat:not(:first-child) .budget-summary-stat-label {
    order: 2;
    font-size: var(--text-small, 14px);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.bud-simple #budgetSummaryBar .budget-summary-stat-value--annual {
    font-size: var(--text-medium, 15px);
    font-weight: 700;
}
.bud-simple #budgetSummaryBar .budget-summary-mini { width: 100%; max-width: 320px; margin-top: 6px; }
.bud-simple .bud-spend { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bud-simple .bud-spend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 700; color: var(--ui-text-primaryText); }
.bud-simple .bud-spend-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; }
.bud-simple .bud-spend-seg { min-width: 2px; }
.bud-simple .bud-spend-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px 18px;
    align-items: baseline;
    font-size: var(--text-medium, 15px);
    color: var(--ui-text-primaryText);
}
.bud-simple .bud-spend-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bud-simple .bud-spend-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bud-simple .bud-spend-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.bud-simple .bud-spend-amt { font-weight: 700; text-align: right; }
.bud-simple .bud-spend-pct { text-align: right; color: var(--ui-text-secondaryText); }
@media (max-width: 900px) {
    .bud-simple #budgetSummaryBar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "spend"; }
}

/* ---------- Notices: quiet lines, no boxes ---------- */
.bud-simple .budget-usage-note {
    margin: 0 0 8px;
    padding: 0 4px;
    background: none;
    border: 0;
    border-radius: 0;
}
.bud-simple .budget-usage-note--warn { background: none; }
.bud-simple .budget-usage-note-help { margin-left: 6px; }

/* ---------- Quick Actions ----------
   2026-11-28 (Steve: "Let's add the Quick Actions back"): the Quick Actions row keeps its own look
   (css/budget_calculator.css), above the tabs; the one Add menu it was folded into (2026-11-24) is gone. */
.bud-simple .budget-tabs-right { display: flex; align-items: center; gap: 8px; }

/* ---------- Category sections: the Accounts section header ---------- */
.bud-simple .budget-category-box {
    border: 1px solid var(--bud-line);
    border-radius: 16px;
    background: var(--ui-backgrounds-cardBg);
    box-shadow: 0 1px 2px rgba(var(--color-ui-shadow-rgb), 0.05);
    overflow: hidden;
}
.bud-simple .budget-category-box > .section-header {
    padding: 14px 18px 14px 22px;
    border: 0;
    border-bottom: 1px solid var(--bud-line);
    border-radius: 0;
    background: none;
}
.bud-simple .budget-category-box.collapsed > .section-header { border-bottom: 0; }
.bud-simple .budget-category-box .category-icon-square {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50% !important;
}
.bud-simple .budget-category-box .section-labels { display: flex !important; flex-direction: row !important; align-items: baseline; gap: 12px; min-width: 0; }
.bud-simple .budget-category-box .category-name { font-size: 17px !important; font-weight: 700; }
.bud-simple .budget-category-box .category-header-stats {
    display: inline;
    margin: 0;
    font-size: var(--text-medium, 15px);
    font-weight: 400;
}
/* The total moves to the right of the header (.category-header-total); the count stays beside the name. */
.bud-simple .budget-category-box .chs-total,
.bud-simple .budget-category-box .chs-sep { display: none; }
.bud-simple .category-header-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--ui-text-primaryText);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.bud-simple .budget-category-box .category-add-item-btn {
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--ui-borders-borderDefault);
    border-radius: 10px;
    background: var(--ui-backgrounds-cardBg);
    color: var(--ui-text-primaryText);
    font-size: var(--text-small, 14px);
    font-weight: 500;
    box-shadow: none;
}
.bud-simple .budget-category-box .category-add-item-btn:hover { border-color: var(--ui-text-linkText); }

/* ---------- Rows: no column headers, no lines; a figure that needs a word carries it ---------- */
/* No column headers (the columns size to what they hold, see the end of this sheet). */
.bud-simple .category-inner-table thead { display: none; }
.bud-simple .category-inner-table tbody tr.expense-row > td.expense-cell { padding-left: 8px !important; padding-right: 8px !important; }
.bud-simple .category-inner-table tbody.category-tbody > tr.expense-row:first-child > td.expense-cell { padding-top: 14px; }
.bud-simple .category-inner-table { border: 0; }
.bud-simple .category-inner-table tbody tr.expense-row { border: 0 !important; }
.bud-simple .category-inner-table tbody tr.expense-row > td.expense-cell {
    border: 0 !important;
    padding-top: 9px;
    padding-bottom: 9px;
    background: none;
}
.bud-simple .category-inner-table tbody tr.expense-row > td.expense-cell:first-child {
    padding-left: 22px !important;
    font-weight: 600;
    color: var(--ui-text-primaryText);
}
.bud-simple .category-inner-table tbody tr.expense-row:hover > td.expense-cell { background: var(--ui-backgrounds-hoverBg); }
/* An item whose price changes over time (its period rows): the rows sit close together, with the usual space before
   the item and after its last period, so they read as one item (Steve 2026-11-28). */
/* !important: budget_calculator.css pads every cell 14px !important at desktop widths. */
.bud-simple .category-inner-table tbody tr.expense-row--period-first > td.expense-cell { padding-bottom: 2px !important; }
.bud-simple .category-inner-table tbody tr.expense-row--period-later > td.expense-cell { padding-top: 2px !important; padding-bottom: 2px !important; }
.bud-simple .category-inner-table tbody tr.expense-row--period-later.expense-row--period-last > td.expense-cell { padding-bottom: 14px !important; }
/* Resting controls read as text; the outline comes back on hover and focus. */
.bud-simple .category-inner-table tbody tr.expense-row select:not(.editable-type),
.bud-simple .category-inner-table tbody tr.expense-row input.editable-amount {
    border: 1px solid transparent !important;
    background-color: transparent;
    box-shadow: none;
    color: var(--ui-text-secondaryText);
}
.bud-simple .category-inner-table tbody tr.expense-row input.editable-amount { color: var(--ui-text-primaryText); }
.bud-simple .category-inner-table tbody tr.expense-row select:not(.editable-type):hover,
.bud-simple .category-inner-table tbody tr.expense-row select:not(.editable-type):focus,
.bud-simple .category-inner-table tbody tr.expense-row input.editable-amount:hover,
.bud-simple .category-inner-table tbody tr.expense-row input.editable-amount:focus {
    border-color: var(--ui-borders-borderDefault) !important;
    background-color: var(--ui-backgrounds-cardBg);
}
.bud-simple .category-inner-table .budget-age-pair { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(5) .budget-age-pair::before,
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(6) .budget-age-pair::before {
    color: var(--ui-text-secondaryText);
    font-size: var(--text-small, 14px);
}
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(6) .budget-age-pair::before { content: "to"; }
/* A synced loan row's start is plain text, on one line (the loan owns it, 2026-11-28). */
.bud-simple .category-inner-table .budget-loan-start { white-space: nowrap; }
.bud-simple .category-inner-table .budget-monthly-calc {
    font-weight: 700;
    color: var(--ui-text-primaryText);
    font-variant-numeric: tabular-nums;
}
/* Steve 2026-11-27: the column is a monthly figure, so it says so ("$1,800.00/mo"); the suffix is quieter than the
   number. */
.bud-simple .category-inner-table .budget-monthly-per {
    font-weight: 400;
    color: var(--ui-text-secondaryText);
}
/* The category's total is in its header now. */
.bud-simple .category-inner-table tr.category-total { display: none; }
.bud-simple .category-inner-table tbody tr.expense-row > td.action-icons i { opacity: 0.55; }
.bud-simple .category-inner-table tbody tr.expense-row:hover > td.action-icons i { opacity: 1; }

/* The outer table is only a list of sections. */
.bud-simple .expense-table > thead { display: none; }
.bud-simple .table-container { border: 0; background: none; box-shadow: none; }

/* The older sheet gives the nine columns percentages that add to 100, and a control wider than its share then
   stretches the whole table past its box (the monthly figure ran off the right edge). Here each column is as wide
   as what it holds and the name takes the rest. */
.bud-simple .expense-table .category-inner-table th:nth-child(n),
.bud-simple .expense-table .category-inner-table td:nth-child(n) { width: auto; }
.bud-simple .expense-table .category-inner-table th:nth-child(1),
.bud-simple .expense-table .category-inner-table td:nth-child(1) { width: 34%; }
.bud-simple .expense-table .category-inner-table td.action-icons { white-space: nowrap; padding-right: 14px; }

/* ---------- Category icons: solid, like the Accounts section icons (Steve 2026-11-24: "should we adopt the same
   colors (brighter) for the icons?"). Each category keeps its OWN colour (the Graphs tab's), at full strength with a
   light glyph, where the older look draws a pale tint with a coloured glyph. ---------- */
.bud-simple .budget-category-box .category-icon-0 { background-color: var(--color-budget-blue); }
.bud-simple .budget-category-box .category-icon-1 { background-color: var(--color-budget-orange); }
.bud-simple .budget-category-box .category-icon-2 { background-color: var(--color-budget-indigo); }
.bud-simple .budget-category-box .category-icon-3 { background-color: var(--color-budget-turquoise); }
.bud-simple .budget-category-box .category-icon-4 { background-color: var(--color-budget-teal); }
.bud-simple .budget-category-box .category-icon-5 { background-color: var(--color-budget-green); }
.bud-simple .budget-category-box .category-icon-6 { background-color: var(--color-budget-mauve); }
.bud-simple .budget-category-box .category-icon-7 { background-color: var(--color-budget-red); }
.bud-simple .budget-category-box .category-icon-8 { background-color: var(--color-budget-pink); }
.bud-simple .budget-category-box .category-icon-9 { background-color: var(--color-budget-navy); }
.bud-simple .budget-category-box .category-icon-square i { color: var(--ui-backgrounds-cardBg); }

/* ---------- A row's choices read as text; the dropdown floats over it (Steve 2026-11-24) ---------- */
/* budgetOverview.js wraps each select in .bud-pick with its short text beside it. The select covers the text and is
   not drawn, so nothing changes size on hover and a click opens the browser's own list as a popup. */
.bud-simple .bud-pick {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    border-radius: 6px;
    padding: 2px 6px;
    margin: 0 -6px;
    white-space: nowrap;
    color: var(--ui-text-secondaryText);
    font-style: normal;
}
.bud-simple .bud-pick[hidden],
.bud-simple .bud-pick.is-empty { display: none; }
.bud-simple .bud-pick--month { margin-left: 2px; font-size: var(--text-small, 14px); }
.bud-simple .bud-pick > select {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
.bud-simple .bud-pick:hover { background: rgba(var(--color-blue-6-rgb), 0.10); color: var(--ui-text-primaryText); }
.bud-simple .bud-pick:focus-within { outline: 2px solid var(--ui-text-linkText); outline-offset: 1px; }
/* The ages are one tidy pair: the start on the right of its cell, "to", the end on the left of its own. */
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(5) { text-align: right !important; }
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(6) { text-align: left !important; }
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(5) .bud-pick,
.bud-simple .category-inner-table tbody tr.expense-row > td:nth-child(6) .bud-pick { color: var(--ui-text-primaryText); font-variant-numeric: tabular-nums; }
.bud-simple .category-inner-table .budget-age-pair { gap: 8px; }
/* The amount box keeps one size whether or not its outline shows. */
.bud-simple .category-inner-table tbody tr.expense-row input.editable-amount { box-sizing: border-box; }
