/* ClockIn: assets/manage/manage.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 */
/* ============================================================
   PROJECTS & TAGS TAB
   ============================================================ */
.tab-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  /* Doubled from the ~16px this was rendering at with no explicit
     margin (inherited spacing) to a literal 32px down to the list
     header below. */
  margin-bottom: var(--space-6);
  /* No top padding: every page title (Projects, Clients, Reports,
     Settings) starts at the same distance under the nav, set only by
     .app's top padding. */
  padding: 0 0 var(--space-4);
}

.tab-header-row h1 { margin: 0; }

/* Text block (title + description) and actions block (Merge +
   Create) are now two siblings inside .tab-header-row, both centered
   against each other by that row's own align-items: center — so the
   buttons sit vertically centered against the full title+description
   height, not just against the title alone. */
.tab-header-text { min-width: 0; }
.tab-header-text .section-note { margin: var(--space-2) 0 0; }

.tab-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Deliberately quieter than .btn-start: transparent background, an
   outline rather than a filled fill, so "Merge" reads as the minor
   action next to "+ Create New Project"/"+ Add New Client". */
.btn-merge {
  background: none;
  border: none;
  /* Drawn as an inset shadow rather than a real border — a real 2px
     border adds its own width to the button's rendered footprint
     (box-sizing: border-box only stops a border from shrinking
     content on an element with a FIXED width; this button's width
     is auto, so a real border was making it measurably bigger/
     unevenly padded next to .btn-start rather than matching it).
     This keeps the exact same box as a plain borderless button. */
  box-shadow: inset 0 0 0 2px var(--accent-text);
  /* Text and border are the same color now, as asked. */
  color: var(--accent-text);
  font-weight: var(--weight-medium);
  /* Matches .btn-start's padding exactly so the two buttons are the
     same size, just filled vs outlined. */
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-merge:hover { background: var(--paper-raised); }

.tag-form {
  /* Also .tab-header-actions: a flex row, centered, on the right of the
     Tags page header. Just the name box and the Add Tag button. */
  margin: 0;
}

/* M (40px), the same height as the Add Tag button beside it. */
.tag-form input[type="text"] {
  box-sizing: border-box;
  height: var(--btn-h-md);
  min-width: 200px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* .project-row (inside this wrapper) now carries its own full
   border, radius, and margin-bottom gap — see the ROW HEIGHT
   CONSISTENCY / permanent-border work on .entry-row. This wrapper
   used to also draw its own border-bottom divider, which is exactly
   what was producing a stray flat 1px line sitting just outside
   each row's rounded border ("weird" double-border look). Nothing
   left for this wrapper to draw. */
.project-card.archived { opacity: 0.6; }

.archived-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  flex-shrink: 0;
}

.archived-toggle-btn { margin-top: 4px; }
.archived-toggle-btn.hidden { display: none; }
#archived-projects-list.hidden { display: none; }
/* There is no global .hidden rule: each hideable thing needs its own.
   Without this one the archived tags list stayed on screen after
   "Hide archived tags", and kept a tag that had just been unarchived. */
#archived-tags-list.hidden { display: none; }
#archived-clients-list.hidden { display: none; }

/* One row per project — Project, Tasks, Client, Rate, Actions — same
   five-column grid used for both the header (see
   .project-list-header) and every data row. See the GRID-ROW
   ALIGNMENT CONVENTION at the top of this file for why every column
   here is minmax(floor, fr) or a fixed px, never auto, and why every
   direct child below needs min-width: 0.

   Weights reflect what each column actually holds: Client is
   smaller than Project/Tasks since it's always just a first + last
   name, but has enough floor width that a longer name isn't clipped.
   Tasks holds several chips plus "+ Add task" and gets the most
   room. Rate has enough room for both the dollar figure and its
   "default"/"client rate" label without truncating. Actions is a
   fixed width, not proportional, since its button text is
   effectively constant ("Edit Archive Delete" or "Unarchive
   Delete") — same reasoning as the Report list's own fixed trailing
   columns. */
.project-row {
  display: grid;
  /* Project, Tasks, Client, Rate, Budget (1.28.0), Actions */
  grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1.1fr) minmax(120px, 0.7fr) minmax(120px, 0.6fr) minmax(200px, 1.2fr) 170px;
  align-items: center;
  gap: 20px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: box-shadow 160ms ease, transform 160ms ease,
              border-color 160ms ease, background-color 160ms ease;
}

#projects-list .project-row,
#archived-projects-list .project-row {
  /* Matches .entry-row's explicit 72px exactly, not just the 28px
     content line inside it — see ROW HEIGHT CONSISTENCY at
     .report-meta. Projects stays single-line (no stacked
     description), so this is extra top/bottom breathing room
     around that one line, not a second line of content. Safe as a
     fixed height since .project-tasks-chips truncates with
     flex-wrap: nowrap rather than wrapping. */
  height: 72px;
  margin-bottom: 6px;
  border-color: var(--line);
  /* CARD color; the header band's own row inside stays clear. */
  background: var(--surface);
}

/* :last-child here has to target .project-card, not .project-row —
   each row is wrapped in its own individual .project-card (one row
   per card, see projectCardHtml in app.js), so .project-row:last-
   child was true for EVERY row (each is the only, and therefore
   "last", child of its own private wrapper), not just the actual
   last one in the list. That's what was zeroing margin-bottom on
   every row and collapsing all the spacing between them. */
#projects-list .project-card:last-child .project-row,
#archived-projects-list .project-card:last-child .project-row { margin-bottom: 0; }

#projects-list .project-row:hover,
#archived-projects-list .project-row:hover {
  position: relative;
  z-index: 1;
  background: var(--paper-raised);
  border-color: var(--line-raised, var(--ink-light));
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.project-list-header {
  padding: var(--space-2) var(--space-4);
  background: var(--head-bg, var(--paper-raised));
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  /* Same 24px gap to the first row as everywhere else this pattern
     appears — see SECTION HEADER BAND note near .week-heading. */
  margin-bottom: var(--space-5);
  /* Sticks below the nav once you scroll past the title/description/
     Create button block above it (that block is deliberately NOT
     sticky, only nav + this column-header row are). Same 66px offset
     (56px nav height + 10px gap) as .timer-bar on Tracker — see
     TRACKER STICKY GAP there for why that number is what it is. */
  position: sticky;
  top: 66px;
  z-index: 4;
}
.project-list-header .project-row { padding: 0; }

.project-list-header .project-row {
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


.project-name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }

.project-row .project-name { min-width: 0; font-size: var(--font-size-md); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-row .project-client { color: var(--text-muted); font-size: var(--font-size-base); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.project-row .project-rate {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.rate-tag {
  color: var(--text-muted);
  font-family: var(--font-body, inherit);
  font-size: var(--font-size-xs);
  margin-left: 2px;
}

.project-actions {
  display: flex;
  gap: 6px;
  justify-self: end;
  min-width: 0;
}

/* Tasks are a fixed, single-line grid cell so a project with a lot of
   them can't grow the row — overflow chips collapse into a "+N" chip
   instead of wrapping (see .task-chip-more below). The chips live in
   their own inner wrapper (.project-tasks-chips) that does the actual
   clipping, so "+ Add task" — a sibling, not a child, of that wrapper
   — never gets clipped along with them, however little room is left. */
.project-tasks-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--font-size-sm);
}

.project-tasks-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 4px 2px 8px;
  color: var(--ink-light);
  flex-shrink: 0;
  white-space: nowrap;
}

.task-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--font-size-base);
  line-height: 1;
  padding: 2px 4px;
}

.task-chip-remove:hover { color: var(--danger); }

/* Quiet visual cue only (no click target here) for a task that's set
   billable-by-default — the actual $ toggle lives in the "+ Add task"
   popover and the tracker/edit task pickers. */
.task-chip-billable {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* The "+N more" overflow indicator for a project's Tasks row: not
   removable itself, just a summary — hover it (title attribute) to
   see the full task list. */
.task-chip-more {
  color: var(--text-muted);
  cursor: default;
  padding: 2px 8px;
}

.empty-inline { color: var(--text-muted); font-style: italic; }

.add-task-link { margin: 0; padding: 0; font-size: var(--font-size-sm); flex-shrink: 0; }

/* ============================================================
   CLIENTS TAB
   Same six-column grid convention as .project-row (see the GRID-ROW
   ALIGNMENT CONVENTION note at the top of this file): Client,
   Tracked, Billed, Amount, Rate, Actions — minmax(floor, fr) or a
   fixed px, never auto, and every direct child gets min-width: 0.
   Weights: Client gets the most room (name + archived badge), the
   three stat columns are narrow and share width evenly (they're
   short numbers/money, right up against each other so they read
   like a mini ledger), Rate gets a bit more room for its "$X.XX/hr
   client rate"/"default" label, Actions is fixed width like
   Projects' own Actions column.
   ============================================================ */
.client-row {
  display: grid;
  /* Tracked/Billed/Earned floors bumped from 80/80/90px to comfortably
     clear their actual rendered content width (measured at ~104-115px
     with the info icon + sort arrow) — that's what was wrapping
     "Tracked (yr)" onto two lines. Rate gave up the room: its floor
     dropped from 120px to 80px and its share from 0.7fr to 0.35fr,
     since rate values ("$50.00/hr default") don't need nearly that
     much width — see .client-row .client-rate below, now
     right-aligned so it sits closer to Actions in its smaller column
     rather than floating in leftover whitespace. */
  /* The columns (8 since the Budget column, 1.29.0) and every breakpoint
     are in the 1.29.0 CLIENT BUDGETS block at the end of this file. */
  align-items: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: box-shadow 160ms ease, transform 160ms ease,
              border-color 160ms ease, background-color 160ms ease;
}

#clients-list .client-row,
#archived-clients-list .client-row {
  /* Matches .entry-row's explicit 72px exactly — see ROW HEIGHT
     CONSISTENCY at .report-meta. */
  height: 72px;
  margin-bottom: 6px;
  border-color: var(--line);
  /* CARD color; the header band's own row inside stays clear. */
  background: var(--surface);
}

/* Same bug/fix as Projects — see the note above
   #projects-list .project-card:last-child .project-row. */
#clients-list .client-page-card:last-child .client-row,
#archived-clients-list .client-page-card:last-child .client-row { margin-bottom: 0; }

#clients-list .client-row:hover,
#archived-clients-list .client-row:hover {
  position: relative;
  z-index: 1;
  background: var(--paper-raised);
  border-color: var(--line-raised, var(--ink-light));
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

/* Same as .project-card above: .client-row now carries its own full
   border/radius/gap, this wrapper's old border-bottom was the other
   half of the same double-border bug on this page. */
.client-page-card.archived { opacity: 0.6; }

.client-list-header {
  padding: var(--space-2) var(--space-4);
  background: var(--head-bg, var(--paper-raised));
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  /* Same 24px gap to the first row as everywhere else this pattern
     appears — see SECTION HEADER BAND note near .week-heading. */
  margin-bottom: var(--space-5);
  /* Same sticky treatment as .project-list-header — see its comment
     for the 66px offset and what does/doesn't stick with it. */
  position: sticky;
  top: 66px;
  z-index: 4;
}
.client-list-header .client-row { padding: 0; }

.client-list-header .client-row {
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Rate is the 6th column (Client, Projects, Tracked, Billed, Earned,
   Rate, Actions) — right-aligned to match .client-row .client-rate. */
.client-list-header .client-row > :nth-child(6) { text-align: right; }

.client-list-header .client-sort-btn { display: inline-flex; align-items: center; gap: 4px; }

.client-row .client-name {
  min-width: 0;
  font-size: var(--font-size-md);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Clicking the name opens the same Edit modal as the Edit button (see
   the clients-list and projects-list click delegates in wire-manage.js),
   only on active rows, which carry data-edit-client / data-edit-project;
   archived rows don't. No underline (Omar 2026-10-09): just the hand. */
.client-row .client-name[data-edit-client],
.project-row .project-name[data-edit-project],
.project-row .project-client[data-edit-client],
.task-chip[data-open-tasks],
.client-projects-chips .task-chip[data-edit-project],
.client-projects-chips .task-chip[data-edit-client] {
  cursor: pointer;
}

/* Projects column: same single-line, clipped-chip treatment as a
   project's own Tasks column (.project-tasks-chips / .task-chip /
   .task-chip-more — reused as-is, not redefined here) — first
   couple of projects show as chips, the rest collapse into a
   "+N more" chip with the full list in its title. Glance-only, so
   unlike Tasks there's no remove button and no "+ Add" link. */
.client-projects-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 6px;
  min-width: 0;
  font-size: var(--font-size-sm);
}

.client-projects-chips .task-chip { padding: 2px 8px; }


/* Rate cell: plain read-only text, same convention as a project's
   own Rate column (see projectCardHtml's rateHtml / .project-row
   .project-rate) — the rate itself is edited from the Edit client
   modal now, not inline here. */
.client-row .client-rate {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  min-width: 0;
}

.client-row .client-stat {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.client-actions, .tag-actions {
  display: flex;
  gap: 6px;
  justify-self: end;
  min-width: 0;
}

/* Small "i" info glyph next to a sortable stat heading — native
   title-attribute tooltip on hover, same convention already used
   everywhere else in the app (task chip overflow, tag chips, entry
   descriptions) rather than a new hover-panel component. */
.info-icon {
  display: inline-block;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  cursor: help;
}

/* ============================================================
   TAGS TAB
   Same list conventions as Clients: a header band and data rows that
   share one grid, a fixed 72px row, icon buttons for row actions.
   Three columns: Tags, Billable, actions (Edit, Archive, Delete). The
   Budgets column from 1.29.1 is gone again in 1.29.4 (see COMPLIMENTARY
   TAG at the end of this file).
   Fixed px or minmax, never auto, and every direct child gets
   min-width: 0 (see GRID-ROW ALIGNMENT CONVENTION).
   ============================================================ */
.tag-page-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(100px, 0.3fr) 140px;
  align-items: center;
  gap: 20px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: box-shadow 160ms ease, transform 160ms ease,
              border-color 160ms ease, background-color 160ms ease;
}

.tag-page-row > * { min-width: 0; }

#tags-list .tag-page-row,
#archived-tags-list .tag-page-row {
  /* Same fixed 72px as every other list row. */
  height: 72px;
  margin-bottom: 6px;
  border-color: var(--line);
  background: var(--surface);
}

/* Scoped to the wrapper: :last-child on the row itself would match every
   row, since each row sits alone inside its own card. */
#tags-list .tag-page-card:last-child .tag-page-row,
#archived-tags-list .tag-page-card:last-child .tag-page-row { margin-bottom: 0; }

#tags-list .tag-page-row:hover,
#archived-tags-list .tag-page-row:hover {
  position: relative;
  z-index: 1;
  background: var(--paper-raised);
  border-color: var(--line-raised, var(--ink-light));
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.tag-page-card.archived { opacity: 0.6; }

.tag-list-header {
  padding: var(--space-2) var(--space-4);
  background: var(--head-bg, var(--paper-raised));
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  position: sticky;
  top: 66px;
  z-index: 4;
}

.tag-list-header .tag-page-row {
  padding: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-page-row .tag-page-name {
  min-width: 0;
  font-size: var(--font-size-md);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Clicking the name opens the same Edit tag window as the Edit button.
   Only on active rows, which carry data-edit-tag. No underline, at rest
   or on hover. */
.tag-page-row .tag-page-name[data-edit-tag] { cursor: pointer; }

.tag-page-billable { display: flex; align-items: center; }

/* A $ that only shows that a tag is billable (the Report tag filter).
   Same look as an on .task-billable-toggle, but not clickable. */
.tag-billable-flag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-dark);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--font-size-xs);
  line-height: 1;
}

/* Edit-client modal's "Assign projects" checklist — reuses
   .picker-list/.picker-item sizing but needs its own row layout
   since each row carries a checkbox, name, and up to two badges. */
.edit-client-card { max-width: 420px; }

.assign-projects-list {
  /* ~2 rows tall (each .picker-item row is ~33px including padding)
     rather than a fixed 220px — the Edit/Add Client modals were
     running too tall on shorter screens with the assigned-projects
     summary chips added above this. Still scrolls for longer lists. */
  max-height: 68px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 4px;
}

.assign-project-item {
  justify-content: flex-start;
}

.assign-project-item input[type="checkbox"] { flex-shrink: 0; }

/* "Assigned projects" summary above the search/checklist in the Add
   New Client and Edit Client modals — the projects currently checked
   in .assign-projects-list below, shown as chips so they're visible
   without scrolling the list. Click a chip's × to unassign it, same
   effect as unchecking it below. */
.assigned-projects-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 22px;
}

.assigned-project-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 1px 4px 1px 8px;
  font-size: var(--font-size-xs);
  color: var(--accent-text);
  white-space: nowrap;
}

.assigned-project-chip .chip-remove {
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 3px;
}

.assigned-project-chip .chip-remove:hover { color: var(--danger); }


.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: var(--font-size-base);
  color: var(--text-muted);
}

.settings-row input[type="number"] {
  width: 110px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.section-note {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 0 12px;
}

.backup-actions { display: flex; gap: 10px; }

.file-btn {
  cursor: pointer;
}


/* ============================================================
   1.29.4: COMPLIMENTARY TAG
   One built-in tag (see COMPLIMENTARY TAG in app.js). After its name in
   the tag pickers and on the Tags page sits a small mark with a tooltip.
   It is NOT an icon button: a plain span, not clickable, 14px glyph.
   No global .hidden rule, so each hideable piece has its own.
   ============================================================ */
.tag-special-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: var(--accent);
  cursor: help;
  vertical-align: middle;
}
.tag-special-mark svg { display: block; }
/* Edit Tag: the $ is hidden for the Complimentary tag (never billable). */
#edit-tag-billable.hidden { display: none; }

/* ============================================================
   PHONE LAYOUT (1.45.0), 700px and below
   Same idea as the Tracker's rows: a project or client row becomes a small
   card of lines instead of squeezed columns, with nothing hidden.
     Project:  Name                         Edit Archive Delete
               Client · $50.00/hr default
               [task] [task] + Add Task
               (budget bar, when there is a budget)
     Client:   Name                         Edit Archive Delete
               [project] [project]
               TRACKED    BILLED     EARNED
               00:24:00   00:24:00   $81.00
               $80.00/hr
               (budget bar, when there is a budget)
   ::before is the line break after the name line. The header band keeps
   only its sort buttons, as a row of buttons. Tags keep their three
   columns, which fit.
   ============================================================ */
@media (max-width: 700px) {
  #projects-list .project-row, #archived-projects-list .project-row,
  #clients-list .client-row, #archived-clients-list .client-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    height: auto;
    padding: 12px 14px;
  }
  #projects-list .project-row::before, #archived-projects-list .project-row::before,
  #clients-list .client-row::before, #archived-clients-list .client-row::before {
    content: ''; order: 3; flex: 1 0 100%; height: 0;
  }

  /* Projects */
  .project-row .project-name-cell { order: 1; flex: 1 1 0; }
  .project-row .project-actions { order: 2; }
  .project-row .project-client { order: 4; flex: 0 1 auto; }
  .project-row .project-rate { order: 5; flex: 1 1 0; }
  .project-row .project-client:not(:has(.empty-inline)) + .project-rate::before { content: '\00b7\00a0'; color: var(--text-muted); }
  .project-row .project-client:has(.empty-inline) { display: none; }
  .project-row .project-tasks-group { order: 6; flex: 1 0 100%; }
  .project-row .project-budget { order: 7; flex: 1 0 100%; }

  /* Clients */
  .client-row .client-name { order: 1; flex: 1 1 0; }
  .client-row .client-actions { order: 2; }
  .client-row .client-projects-chips { order: 4; flex: 1 0 100%; }
  .client-row .client-projects-chips:has(> .empty-inline:only-child) { display: none; }
  .client-row .client-stat { order: 5; flex: 1 1 0; }
  .client-row .client-stat::before { display: block; font-size: var(--font-size-xs); font-weight: var(--weight-bold); letter-spacing: 0.03em; color: var(--text-muted); }
  .client-row .client-stat:nth-child(3)::before { content: 'TRACKED'; }
  .client-row .client-stat:nth-child(4)::before { content: 'BILLED'; }
  .client-row .client-stat:nth-child(5)::before { content: 'EARNED'; }
  .client-row .client-rate { order: 6; flex: 1 0 100%; text-align: left; }
  .client-row .client-budget { order: 7; flex: 1 0 100%; }

  /* The budget gets a row of its own with room above it (a divider line,
     like the Tracker card's) and below it, so the bar never crowds the
     tasks. */
  .project-row .project-budget,
  .client-row .client-budget {
    margin: 6px -14px 0;
    padding: 12px 14px 2px;
    border-top: 1px solid var(--line);
  }

  /* No budget: no line for its "-". */
  .project-row .project-budget:has(> .empty-inline),
  .client-row .client-budget:has(> .empty-inline) { display: none; }

  /* The header bands: only the sort buttons, side by side. */
  .project-list-header .project-row,
  .client-list-header .client-row { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .project-list-header .project-row > div,
  .client-list-header .client-row > div { display: none; }
  /* Their info icons only explain on hover, which a phone does not have. */
  .client-list-header .info-icon { display: none; }

  /* Tags: the name takes what the Billable $ (32px) and the three buttons
     (3 x 32px and two 6px gaps) leave. The header's "Billable" runs on into
     the empty column above the buttons. */
  .tag-page-row { grid-template-columns: minmax(0, 1fr) 32px 108px; gap: 10px; }
  .tag-list-header .tag-page-row > :nth-child(2) { min-width: 0; overflow: visible; white-space: nowrap; }
  .tag-list-header .info-icon { display: none; }
  /* The new tag's name box fills the line, Add Tag beside it. */
  .tab-header-actions.tag-form { flex: 1 1 100%; }
  .tag-form #tag-name { flex: 1 1 auto; min-width: 0; }
}
