/* ClockIn: assets/budgets/budgets.css. Part of what was style.css (split in 1.42.2, rules moved as is). The load order in index.html matters: see CLAUDE.md */
/* ============================================================
   1.28.0  PROJECT BUDGETS
   See PROJECT BUDGETS in app.js. The Budget column on Projects, the
   budget fields in Create New Project and Edit Project, and the
   milestone boxes in Settings > Reminders > Budget Alerts. There is no
   global .hidden rule, so each hideable piece has its own below.
   ============================================================ */

/* Between 1180px and 701px the six project columns need tighter floors
   (header and rows share the rule, see GRID-ROW ALIGNMENT CONVENTION). */
@media (max-width: 1180px) and (min-width: 701px) {
  .project-row {
    grid-template-columns: minmax(110px, 1.1fr) minmax(130px, 0.9fr) minmax(90px, 0.7fr) minmax(100px, 0.6fr) minmax(170px, 1.4fr) 120px;
    gap: 14px;
  }
}

/* ---- The Budget cell: a thin bar over "64h / 80h (80%)" ---- */
.project-budget { min-width: 0; }
.budget-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.budget-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.budget-bar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  /* --accent-text, the accent's readable shade: some themes (Klaude AI)
     have an accent almost as pale as the --line track. */
  background: var(--accent-text, var(--accent));
}
.budget-warn .budget-bar-fill { background: var(--warning, #D97706); }
.budget-over .budget-bar-fill { background: var(--danger); }
.budget-text {
  display: block; /* block, not flex, so a narrow column ends in an ellipsis */
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.budget-over .budget-text { color: var(--danger); }
.budget-period { font-family: var(--font-body, inherit); font-size: var(--font-size-xs); color: var(--text-muted); }
.budget-alerts-off { display: inline-block; margin-left: 4px; vertical-align: -2px; color: var(--text-muted); }
.budget-cell-loading { color: var(--text-muted); }
/* The narrower Tasks column (1.28.0) must not wrap "None yet" onto two lines. */
.project-tasks-chips .empty-inline { white-space: nowrap; }

/* ---- Budget fields in the project windows ---- */
/* A little wider than a plain modal so the segmented controls fit, and
   it scrolls in a short window (children do not shrink, see the
   Customize window note in DEVLOG). */
.modal-card.project-modal-card {
  /* One column again in 1.29.2: without the Billing Day and When over
     budget fields the budget fits a 1440 x 800 window. */
  max-width: 420px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.modal-card.project-modal-card > * { flex-shrink: 0; }
.budget-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.budget-fields { display: flex; flex-direction: column; gap: var(--space-2); }
.budget-fields.hidden { display: none; }
.budget-form-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.budget-form-label { width: 64px; flex: none; font-size: var(--font-size-base); color: var(--text-muted); }
/* 1.29.3: "Project Budget" and "Client Budget" need more room than "Budget"; Resets lines up with them. */
.budget-form .budget-form-label { width: 112px; }
/* The segmented options are labels; the modal's column label style must not reach them. */
.modal-card .budget-form .segmented-opt { display: block; color: inherit; }
.modal-card .budget-form select {
  height: var(--btn-h-md);
  box-sizing: border-box;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}
.budget-stopped {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.budget-stopped.hidden { display: none; }
.budget-stopped-text { color: var(--ink); font-size: var(--font-size-sm); }

/* ---- Settings > Reminders > Budget Alerts ---- */
.budget-milestone-boxes { display: flex; gap: 6px; margin-right: var(--space-3); }
/* Each milestone box shows a % after the number (1.28.1). */
.pct-box { display: inline-flex; align-items: center; gap: 3px; }
.pct-sign { color: var(--text-muted); font-family: var(--font-mono); }
.field-row .budget-milestone-boxes input[type="number"] { width: 64px; }

/* ---- Help icon with a short explanation (1.28.1) ----
   A small circled ?. Hover, or focus (tab to it or tap it), shows the
   text from data-tip in a small card under it. .help-tip-end opens the
   card to the left, for an icon near the right edge of a window. */
.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 1px;
  cursor: help;
  opacity: 0.75;
}
.help-tip:hover, .help-tip:focus-visible { opacity: 1; outline: none; }
.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  z-index: 30;
  width: 210px;
  padding: 8px 10px;
  border: 1px solid var(--line-raised, var(--line));
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  font-family: var(--font-body, inherit);
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  /* 1.29.5: display none while hidden, not only invisible. An invisible
     card still counted as content, so a window that scrolls
     (overflow-y: auto) got a few px of empty scroll below a ? near its
     bottom. The fade in is kept with @starting-style. */
  display: none;
  opacity: 0;
  transition: opacity 120ms ease;
}
.help-tip.help-tip-end::after { left: auto; right: -8px; }
.help-tip:hover::after, .help-tip:focus::after { display: block; opacity: 1; }
@starting-style {
  .help-tip:hover::after, .help-tip:focus::after { opacity: 0; }
}
/* .help-tip-up opens the card above the ?, for one near the bottom of a
   window that scrolls (the Client Budget ?, 1.29.5), so it is not cut off. */
.help-tip.help-tip-up::after { top: auto; bottom: calc(100% + 8px); }
/* Inside a segmented option: undo the option's own span styling
   (.segmented-opt > span has padding, a border and a radius). */
.segmented-opt .help-tip {
  display: inline-flex;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
}
/* The selected option's text is on the accent; keep the tip card readable. */
.segmented-opt input:checked + span .help-tip::after { color: var(--ink); }

/* ============================================================
   1.29.0  CLIENT BUDGETS, BILLING DAY AND BUDGET VISIBILITY
   See CLIENT BUDGETS, BUDGET PILL and DASHBOARD BUDGETS PANEL in
   app.js. No global .hidden rule, so each hideable piece has its own.
   ============================================================ */

/* ---- Add New Client and Edit Client: two columns ----
   Details and projects on the left, Billing Day and Budget on the right,
   so the budget fits without the window growing taller. It still
   scrolls in a very short window (children do not shrink, see the
   Customize window note in DEVLOG). One column below 760px. */
.modal-card.edit-client-card {
  max-width: 760px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.modal-card.edit-client-card > * { flex-shrink: 0; }
.client-modal-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}
.client-modal-col { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.client-modal-col > * { flex-shrink: 0; }
/* 1.29.5: the Client Budget sits under Rate and Additional Fields, after
   some room and a line (the .budget-form border-top). */
.client-modal-col .budget-form { margin-top: var(--space-3); padding-top: var(--space-4); }
@media (max-width: 760px) {
  .client-modal-cols { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
}
/* Color and Rate side by side (the color swatch needs little room). */
.client-modal-pair { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: start; }

/* Web Address with its open icon (an .icon-btn, 32 x 32, 18px glyph). */
.web-address-field { display: flex; flex-direction: column; gap: 4px; }
.modal-card .web-address-field > label { display: block; }
.web-address-row { display: flex; align-items: center; gap: 6px; }
.web-address-row input { flex: 1; min-width: 0; }
.web-address-open:disabled { opacity: 0.35; cursor: default; }
.web-address-open:disabled:hover { color: var(--text-muted); }

.field-hint { font-size: var(--font-size-sm); color: var(--text-muted); }
/* A hint under a budget field (Start counting from, 1.29.2). */
.budget-fields label .field-hint { display: block; margin-top: 4px; }

/* ---- Clients page: the Budget column (same cell as Projects) ----
   Client, Projects, Tracked, Billed, Earned, Rate, Budget, Actions. The
   header and the rows share every rule (GRID-ROW ALIGNMENT CONVENTION).
   Actions is three 32px icon buttons, so 116px is enough. */
.client-row {
  grid-template-columns: minmax(120px, 1.1fr) minmax(120px, 1fr) minmax(135px, 0.55fr) minmax(135px, 0.55fr) minmax(135px, 0.55fr) minmax(90px, 0.5fr) minmax(160px, 1.1fr) 116px;
  gap: 16px;
}
.client-budget { min-width: 0; }
/* The Rate column is no longer the one before Actions, so the header's
   6th column keeps its right alignment and Budget (7th) is left aligned. */
.client-list-header .client-row > :nth-child(7) { text-align: left; }

/* Up to 1360px: Tracked (Yr) drops out first, as it does at 480px, so
   Budget keeps its room. */
@media (max-width: 1360px) and (min-width: 701px) {
  .client-row > :nth-child(3) { display: none; }
  .client-row {
    grid-template-columns: minmax(110px, 1.1fr) minmax(110px, 1fr) minmax(125px, 0.55fr) minmax(125px, 0.55fr) minmax(90px, 0.5fr) minmax(150px, 1.1fr) 116px;
    gap: 14px;
  }
}
/* Up to 1100px: Projects drops out too (still shown in Edit Client). */
@media (max-width: 1100px) and (min-width: 701px) {
  .client-row > :nth-child(2) { display: none; }
  .client-row {
    grid-template-columns: minmax(100px, 1.1fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr) minmax(80px, 0.5fr) minmax(140px, 1.2fr) 116px;
  }
}
/* 1000px to 701px: Rate drops out too, as it does at 700px. */
@media (max-width: 1000px) and (min-width: 701px) {
  .client-row > :nth-child(6) { display: none; }
  .client-row {
    grid-template-columns: minmax(90px, 1.1fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr) minmax(130px, 1.3fr) 116px;
    gap: 12px;
  }
}
/* 700px and below: a card per client, see PHONE LAYOUT in manage/manage.css. */

/* ---- Timer bar: the budget pill and its popover ---- */
.budget-pill-wrap { position: relative; flex: none; }
.budget-pill-wrap.hidden { display: none; }
.budget-pill {
  box-sizing: border-box;
  height: var(--btn-h-sm);
  padding: 0 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  /* Same colors as the Budget column's bar (--accent-text normal). */
  color: var(--accent-text, var(--accent));
}
/* 1.41.0: the pill stays in the accent at every level (was orange past the
   last milestone and red when over); the % in it says how far along it is. */
.budget-pill:hover { background: var(--paper-raised); }
.budget-pill:focus-visible { outline: 2px solid var(--focus-ring, var(--ink)); outline-offset: 2px; }
.budget-pill-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 16;
  width: 300px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--paper-raised);
  border: 1px solid var(--line-raised, var(--line));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  font-size: var(--font-size-sm);
}
.budget-pill-popover.hidden { display: none; }
.budget-pop-item { display: flex; flex-direction: column; gap: var(--space-2); }
.budget-pop-item + .budget-pop-item { padding-top: var(--space-3); border-top: 1px solid var(--line); }
.budget-pop-head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.budget-pop-name { font-weight: 700; font-size: var(--font-size-base); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-pop-kind { flex: none; font-size: var(--font-size-xs); color: var(--text-muted); }
.budget-pop-head .budget-alerts-off { margin-left: auto; }
.budget-pop-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--space-3); margin: 0; }
.budget-pop-facts dt { color: var(--text-muted); }
.budget-pop-facts dd { margin: 0; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.budget-pop-item.budget-over .budget-pop-facts dd { color: var(--danger); }
.budget-pop-item.budget-over .budget-pop-facts dd:last-of-type { color: var(--ink); }
.budget-pop-btn { align-self: flex-start; height: var(--btn-h-sm); padding: 0 12px; font-size: var(--font-size-sm); }
/* Column timer bar (700px and below): the pill sits left, so the popover opens to the right. */
@media (max-width: 700px) {
  .budget-pill-wrap { align-self: flex-start; }
  .budget-pill-popover { right: auto; left: 0; }
}

/* ---- Budget Report (1.30.0; was the Dashboard Report Budgets panel) ----
   Name (with its client or projects under it), Type, Period, Budget,
   Used, Left (time and money on two lines since 1.36.0), Progress, actions (alerts icon and
   Mark Complete, or Reopen Budget). Header and rows share .dash-budget-row
   (GRID-ROW ALIGNMENT CONVENTION). The actions column is 64px: a 14px
   icon, a gap and a 32px icon button. */
.dash-budgets-card { margin-top: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.dash-budgets-header { display: flex; flex-direction: column; gap: 2px; }
.dash-budgets-note { font-size: var(--font-size-sm); color: var(--text-muted); }
.dash-budgets-list { display: flex; flex-direction: column; }
.dash-budget-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) 64px minmax(110px, 0.9fr) minmax(90px, 0.6fr) minmax(90px, 0.6fr) minmax(90px, 0.6fr) minmax(130px, 1.1fr) 64px;
  gap: 14px;
  align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
  font-size: var(--font-size-sm);
}
.dash-budget-row > * { min-width: 0; }
.dash-budget-head {
  border-top: none;
  padding-top: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.dash-budget-row[data-budget-row] { cursor: default; }
.dash-budget-name-cell { min-width: 0; }
.dash-budget-sub { color: var(--text-muted); font-size: var(--font-size-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-budget-pair { display: flex; flex-direction: column; gap: 2px; }
.dash-budget-line { display: block; overflow: hidden; text-overflow: ellipsis; }
.dash-budget-est { color: var(--text-muted); font-size: var(--font-size-xs); }
.dash-budget-name { font-weight: 700; font-size: var(--font-size-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-budget-name[data-budget-edit] { cursor: pointer; } /* opens Edit Project / Edit Client (2.13.0) */
.dash-budget-kind, .dash-budget-period { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-budget-num { font-family: var(--font-mono); color: var(--ink-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-budget-row.budget-over .dash-budget-left { color: var(--danger); }
.dash-budget-progress { display: flex; flex-direction: column; gap: 5px; }
.dash-budget-pct { font-family: var(--font-mono); color: var(--ink-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-budget-row.budget-over .dash-budget-pct { color: var(--danger); }
.dash-budget-off { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.dash-budget-off .budget-alerts-off { margin-left: 0; }
/* The bar colors come from the Budget column rules (.budget-warn,
   .budget-over .budget-bar-fill), shared by the pill popover too. */
/* 700px and below: a card per budget, see PHONE LAYOUT at the end of this file. */
/* While the pill shows, the pickers and the description give up a little
   room so the timer bar stays on one line where it did before (1.29.0). */
.timer-bar:has(.budget-pill-wrap:not(.hidden)) > .picker { min-width: 90px; }
.timer-bar:has(.budget-pill-wrap:not(.hidden)) #timer-description { min-width: 110px; }

/* ============================================================
   1.29.1: BUDGETS COUNT PREPAID (NON-BILLABLE) WORK
   ============================================================ */
/* No rate on an Amount budget: warning color, in the pill popover and the
   Dashboard Budgets panel. Empty in the popover when there is a rate. */
.budget-norate { margin: 0; font-size: var(--font-size-sm); color: var(--warning); white-space: normal; }
.budget-pop-item .budget-norate:empty { display: none; }
/* Amount budgets add "(about 7h 45m at $80/hr)" to Left, so it may wrap. */
.budget-pop-facts dd[data-pop-field="left"] { white-space: normal; }

/* ============================================================
   1.29.3: SIMPLER BUDGET WINDOWS
   ============================================================ */
/* Client windows: the projects checklist has the right column to itself,
   so it can show more rows than the 68px it had in one column. */
.client-modal-col .assign-projects-list { max-height: 168px; }
/* Contact details fold (email, phone, Web Address, Client ID). */
.client-contact { display: flex; flex-direction: column; gap: var(--space-2); }
.client-contact:not(.open) { display: none; }

/* ============================================================
   1.30.0: BUDGET REPORT AND MARK COMPLETE
   ============================================================ */
/* The two cards on Budget Report: Current Budgets, then Completed. */
#report-page-budgets .dash-budgets-card:first-of-type { margin-top: var(--space-3); }
/* Edit Project and Edit Client: the Mark Complete / Reopen Budget row,
   the same look as Budget alerts are stopped. */
.budget-done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.budget-done.hidden { display: none; }
.budget-done-text { color: var(--ink); font-size: var(--font-size-sm); }

/* ============================================================
   1.31.0: BUDGET REPORT, PAST BUDGETS AND EARNINGS
   Charts are hand-drawn SVG like Dashboard Report and reuse its classes
   (.dash-card, .dash-summary, .dash-bar-chart, .dash-gridline, donut and
   legend). No global .hidden rule: the empty states reuse
   .dash-chart-empty.hidden.
   ============================================================ */
.budget-earn-section { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-5); }
.budget-earn-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.budget-earn-header .dash-budgets-header { flex: 1 1 360px; min-width: 0; }
/* Five stats instead of the Dashboard's three. */
.dash-summary.budget-earn-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.budget-earn-summary .dash-summary-stat strong { font-size: var(--font-size-lg); }
@media (max-width: 1000px) {
  .dash-summary.budget-earn-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .budget-earn-summary .dash-summary-stat:nth-child(4) { border-left: none; }
  .budget-earn-summary .dash-summary-stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}
/* Two charts side by side on a wide screen, stacked below 1180px. */
.budget-earn-charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); }
@media (max-width: 1180px) { .budget-earn-charts { grid-template-columns: minmax(0, 1fr); } }
.budget-chart-title { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--space-2); }
.budget-chart-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--font-size-sm); color: var(--text-muted); }
.budget-earn-chart, .budget-rate-chart { height: 240px; }
/* Package fees in the stacked bars and their swatches (the extras reuse
   .dash-billable-color). */
.budget-fee-color { fill: var(--ink-light); background: var(--ink-light); }
.budget-rate-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.budget-rate-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.budget-rate-ref { stroke: var(--success); stroke-width: 1.5; stroke-dasharray: 6 5; }
.budget-donut-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
@media (max-width: 700px) {
  .budget-earn-section .dash-donut-card { flex-direction: column; align-items: center; }
  .budget-donut-side { width: 100%; }
}
/* The periods table: Name, Period, Used, Package Fee, Extras, Earned,
   Rate. Header and rows share .budget-period-row (GRID-ROW ALIGNMENT). */
.budget-period-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) minmax(130px, 1.1fr) minmax(140px, 1.3fr) minmax(80px, 0.6fr) minmax(80px, 0.6fr) minmax(80px, 0.6fr) minmax(80px, 0.6fr);
  gap: 14px;
  align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
  font-size: var(--font-size-sm);
}
.budget-period-row > * { min-width: 0; }
.budget-period-head {
  border-top: none;
  padding-top: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.budget-period-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.budget-period-cell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-period-sub { color: var(--text-muted); }
/* 2.3.4: Remove Past Budget, after the status on a past setup's periods. */
.budget-period-cell > .budget-period-sub:has(.budget-period-remove) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; white-space: normal; }
.budget-period-remove { margin: -4px 0 -4px -6px; flex: none; color: var(--text-muted); }
.budget-period-remove:hover { color: var(--danger, #c62828); }
.budget-period-earned { color: var(--ink); font-weight: var(--weight-bold); }
.budget-estimated { color: var(--warning); cursor: help; }
@media (max-width: 1000px) {
  /* Extras and Rate drop out first. */
  .budget-period-row > :nth-child(5), .budget-period-row > :nth-child(7) { display: none; }
  .budget-period-row { grid-template-columns: minmax(110px, 1.2fr) minmax(110px, 1fr) minmax(120px, 1.2fr) minmax(70px, 0.6fr) minmax(70px, 0.6fr); gap: 10px; }
}

/* ============================================================
   1.32.0: BUDGET REPORT LISTS SHOW 5, THEN SHOW ALL
   Show All (N) / Show Fewer under Current Budgets and Completed Budgets And
   Earnings: a text button, like the other text
   links (not a sized button).
   ============================================================ */
.budget-list-more {
  align-self: flex-start;
  margin-top: var(--space-2);
  padding: var(--space-1) 0;
  background: none;
  border: none;
  color: var(--accent-text);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  cursor: pointer;
}

/* Start / Stop keeps one width (1.32.0): "Stop" is narrower than "Start",
   so the timer bar shifted a few px when a timer started. Wide enough for
   "Start" in every font set, text centered. */
#timer-toggle-btn { min-width: 104px; justify-content: center; text-align: center; }

/* ============================================================
   PHONE LAYOUT (1.45.0), 700px and below: Budget Report
   Like the Tracker and Manage lists: each budget and each past period is
   a small card with every number in it (each labelled, since the column
   headers are gone), instead of columns dropping out.
     Current:  Name / its client or projects        (alerts, Complete)
               Project · This month
               BUDGET      USED        LEFT
               20h         4h          16h
               (progress bar, 20% of 20h)
     Period:   Name / Client, Hours, monthly
               Oct 1 to Oct 31 / Running
               (progress bar, 4h of 20h)
               PACKAGE FEE   EXTRAS
               EARNED        RATE
   The earnings totals stack, one per line, like the Dashboard's.
   ============================================================ */
@media (max-width: 700px) {
  .dash-budget-row.dash-budget-head, .budget-period-row.budget-period-head { display: none; }

  .dash-budget-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
  .dash-budget-row::before, .dash-budget-row::after { content: ''; flex: 1 0 100%; height: 0; margin: -4px 0; }
  .dash-budget-row::before { order: 3; }
  .dash-budget-row::after { order: 6; }
  .dash-budget-row > :nth-child(1) { order: 1; flex: 1 1 0; }
  .dash-budget-row > :nth-child(8) { order: 2; }
  .dash-budget-row > :nth-child(2) { order: 4; flex: none; }
  .dash-budget-row > :nth-child(3) { order: 5; flex: 1 1 0; margin-left: -12px; }
  .dash-budget-row > :nth-child(4) { order: 7; flex: 1 1 0; }
  .dash-budget-row > :nth-child(5) { order: 8; flex: 1 1 0; }
  .dash-budget-row > :nth-child(6) { order: 9; flex: 1 1 0; }
  .dash-budget-row > :nth-child(7) { order: 10; flex: 1 0 100%; }
  .dash-budget-row > :nth-child(3)::before { content: '\00a0\00b7\00a0'; }
  .dash-budget-row > :nth-child(4)::before,
  .dash-budget-row > :nth-child(5)::before,
  .dash-budget-row > :nth-child(6)::before,
  .budget-period-row > :nth-child(n+4)::before {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-body, inherit);
  }
  .dash-budget-row > :nth-child(4)::before { content: 'Budget'; }
  .dash-budget-row > :nth-child(5)::before { content: 'Used'; }
  .dash-budget-row > :nth-child(6)::before { content: 'Left'; }

  .budget-period-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "name name"
      "period period"
      "prog prog"
      "fee extras"
      "earned rate";
    gap: 8px 12px;
  }
  .budget-period-row > :nth-child(1) { grid-area: name; }
  .budget-period-row > :nth-child(2) { grid-area: period; }
  .budget-period-row > :nth-child(3) { grid-area: prog; }
  .budget-period-row > :nth-child(4) { grid-area: fee; }
  .budget-period-row > :nth-child(5) { grid-area: extras; }
  .budget-period-row > :nth-child(6) { grid-area: earned; }
  .budget-period-row > :nth-child(7) { grid-area: rate; }
  /* These two drop out below 1000px on a wider screen; a card has room. */
  .budget-period-row > :nth-child(5), .budget-period-row > :nth-child(7) { display: block; }
  .budget-period-row > :nth-child(4)::before { content: 'Package Fee'; }
  .budget-period-row > :nth-child(5)::before { content: 'Extras'; }
  .budget-period-row > :nth-child(6)::before { content: 'Earned'; }
  .budget-period-row > :nth-child(7)::before { content: 'Rate'; }

  .dash-summary.budget-earn-summary { grid-template-columns: minmax(0, 1fr); }
  .budget-earn-summary .dash-summary-stat:nth-child(n) { border-left: none; border-top: 1px solid var(--line); }
  .budget-earn-summary .dash-summary-stat:first-child { border-top: none; }
}
