/* ClockIn: assets/tracker/entries.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 */
/* ============================================================
   ENTRIES LIST (grouped by day, under a heading per week)
   ============================================================ */

/* One heading per week (This week / Last week / Mon-Sun date range)
   sits above that week's day-groups as the user scrolls, showing the
   week's total, billable, and billable $ so far. */
/* SECTION HEADER BAND — background + left accent border, not just a
   flat text color on the page background. Used for .week-heading and
   .day-header here, and reused with the same look on .report-list-
   header / .project-list-header / .client-list-header so a "this is
   a header, not a row" signal reads the same on every page. */
.week-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: var(--space-6) 0 0;
  padding: var(--space-3) var(--space-4);
  background: var(--head-bg, var(--paper-raised));
  border-left: 4px solid var(--accent);
  /* Flat bottom corners — .day-header sits flush underneath with
     matching flat top corners, so together they read as one
     continuous rounded block, not two separate cards. The line
     between "This week" and "Today" is the ::after below, not a
     border on this element — a border spans the full box edge to
     edge; this needs to stop at the text, with room on each side. */
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  color: var(--head-fg, var(--ink));
}

/* The dividing line between "This week" and "Today": 1px (was 2px),
   muted heading color (was --ink, i.e. not fully black), and inset
   from the box edges rather than spanning full width. Left/right are
   exactly the box's own padding (--space-4), which is where the label
   text starts and where the rightmost stat ends, so the line runs
   from the first letter of "This week" to the last letter of
   "billable" with nothing extra on either side. (It was inset a
   further --space-2 each side before, which left it 8px short of
   both words.) */
.week-heading::after {
  content: '';
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: 0;
  height: 1px;
  background: var(--head-fg-muted, var(--text-muted));
}

.week-heading:first-child { margin-top: 0; }

.week-heading-label {
  font-weight: var(--weight-bold);
  /* 30% larger than the old 15px (--font-size-md) rounds to 19.5px
     — the scale's existing --font-size-lg (20px) lands right there,
     so this reuses the token instead of inventing a 19.5px one-off. */
  font-size: var(--font-size-lg);
}

.week-heading-stats {
  display: flex;
  /* Doubled from --space-3 (12px) */
  gap: var(--space-5);
  font-family: var(--font-mono);
  /* Two steps up the type scale from the old --font-size-sm (12px):
     sm -> base -> md, landing on 15px. */
  font-size: var(--font-size-md);
  color: var(--head-fg-muted, var(--text-muted));
  white-space: nowrap;
}

.day-group { margin-bottom: var(--space-5); }

/* Reverted from its own background box (too much visual separation
   from "This week" right above it) back to plain text over a long
   divider line, closer to the pre-0.6.0 look — "This week" and
   "Today" now read as one connected header unit rather than two
   separate floating cards. Left padding matches .week-heading's
   effective text-start position (4px border-left + 16px padding
   above) so the two labels still align vertically. */
/* Same background + accent tab as .week-heading right above it —
   you said both should carry the identical band style, joined
   together as one block rather than "This week" alone having it. */
.day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) var(--space-4);
  background: var(--head-bg, var(--paper-raised));
  border-left: 4px solid var(--accent);
  /* Flat top corners — flush against .week-heading's flat bottom
     corners above, rounded only on the outside of the joined pair. */
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  /* Gap down to the first record — unchanged from last pass, this
     wasn't part of what felt too wide. */
  margin-bottom: var(--space-5);
  font-weight: var(--weight-bold);
  font-size: var(--font-size-base);
  color: var(--head-fg, var(--ink));
}

.day-header .day-total {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--head-fg-muted, var(--text-muted));
}

/* Each row is two stacked lines: a meta line (project/task, client,
   tag, billable, time, duration, actions) laid out as a grid with a
   fixed slot per column so nothing wraps or crowds its neighbor,
   followed by the description as a secondary, full-width line below
   it. Everything that can run long (project, client, tags,
   description) is truncated with an ellipsis instead of wrapping. */
.entry-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  /* Explicit height, not min-height: this is the single source of
     truth for row height on Tracker AND Reports (report-row is
     entry-row + report-row, so it inherits this) — see ROW HEIGHT
     CONSISTENCY at .report-meta for why min-height alone left
     Tracker (70px natural) and Reports (70.4px natural) a hair
     apart instead of identical. Safe as a fixed height rather than
     a floor because every cell inside (.entry-desc, .entry-tags,
     .report-tags, .project-tasks-chips) truncates with
     white-space: nowrap / flex-wrap: nowrap — nothing in this row
     wraps to a second line that a fixed height could clip. */
  height: 72px;
  padding: 10px 12px;
  margin-bottom: 6px;
  /* Full border on all four sides at rest now, not just a shared
     bottom divider — each row reads as its own bordered card even
     before you hover it. The margin-bottom is what makes that
     actually look right: without a gap, two touching rows' borders
     would double up into a 2px line and the border-radius on
     adjoining corners would be invisible (nothing to round against). */
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  /* CARD color (was transparent, so cards showed the page color). */
  background: var(--surface);
  transition: box-shadow 160ms ease, transform 160ms ease,
              border-color 160ms ease, background-color 160ms ease;
}

.entry-row:last-child { margin-bottom: 0; }

.entry-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);
}

.entry-desc {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--radius-sm);
  transition: box-shadow 120ms ease, background-color 120ms ease;
}

.entry-desc:hover { background: var(--paper-raised); box-shadow: 0 0 0 1px var(--line) inset; }

/* On report rows, keep the description from running the full row
   width: stop it level with the end of the CLIENT column (1.9.2; it used to
   end at the Tags column) so it doesn't read as disconnected from the meta
   line. This is worked out from the .report-meta grid instead of measured, so
   it holds at any window width: the row's width less every fixed column and
   gap (24 + 70 + 30 + 150 + 90 + 104 = 468px of columns, 9 gaps of 20px =
   180px, plus the Duration column) is shared by Project 1fr, Client 0.7fr and
   Tags 0.5fr, and the description ends after the first two of those (1.7 / 2.2).
   The 28px is the space the description starts inside the row (40px) less the
   column start (64px) plus the 4px of padding at the end of its text. If
   the columns in .report-meta change, change the numbers here to match. */
.report-row .entry-desc { max-width: max(120px, calc((100% - (648px + var(--report-dur-col))) * 1.7 / 2.2 + 28px)); }

/* The checkbox column pushes the meta line right, so the description
   below it starts level with the project name (24px checkbox + 20px gap,
   less the 4px the description's own hover padding is pulled back). */
.report-row .entry-desc { margin-left: calc(24px + 20px - 4px); }

/* On the Tracker's own rows (not Reports), stop the description at
   the same point the Project ("name") column ends and Client begins
   above it. 34% measured directly against the rendered app (text ends about
   7px past the project column's right edge at the widest page, a 1440px
   window with --app-gutter 150px) rather than computed from the grid's fr weights,
   since the fixed-px columns (tags/billable/time/duration) throw off
   a pure fr-ratio estimate. Purely visual alignment, not a real grid
   tie-in — if .entry-meta's column widths change later, re-measure
   rather than trust this number. The full text still shows on hover
   via this element's title attribute (set in entryRowHtml, app.js),
   unchanged by this. */
.entry-row:not(.report-row) .entry-desc { max-width: 34%; }

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

.entry-desc-input {
  /* Fills the whole .entry-desc box (which has 2px 4px padding and
     clips its contents), so the border and focus ring are never cut
     off top or bottom. */
  display: block;
  box-sizing: border-box;
  width: calc(100% + 8px);
  height: 21px;
  margin: -2px -4px;
  font: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-body);
  line-height: 1;
  padding: 0 var(--space-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.entry-meta {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) minmax(80px, 0.7fr) 100px 30px 158px 92px auto;
  align-items: center;
  gap: 20px;
  /* Shared line height so Tracker, Reports, Projects, and Clients
     rows all read as the same scale of component — currently set by
     .entry-billable's natural height (24px font, no padding), the
     tallest thing in this particular grid. See ROW HEIGHT
     CONSISTENCY note near .report-meta for the other three. */
  min-height: 28px;
}

.entry-project {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-muted); /* fallback for the empty/"No project" state; a set project overrides this with its own color inline */
}

.entry-project-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The " - Task name" suffix after a project name. No color of its
   own so it inherits the project color set inline on
   .entry-project-name; kept bold/same size to read as one unit with
   the project name rather than a muted aside. */
.entry-project-task {
  font-weight: 700;
}

/* An entry whose project was deleted — name/color snapshotted at
   delete time (see dbDeleteProject), rendered muted and italic so
   it still reads clearly but is visually distinct from a live
   project. */
.entry-project-name.deleted-project {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 600;
}

.entry-client {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--font-size-base);
  color: var(--text-muted);
}

/* Fixed and narrow on purpose (about 2-3 words) since most entries
   carry a single short tag; a longer or multi-tag list truncates
   with an ellipsis and the full list is still readable via the
   title tooltip, same as the description does. */
.entry-tags {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--font-size-sm);
  color: var(--accent-text);
  cursor: pointer;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--radius-sm);
  transition: box-shadow 120ms ease, background-color 120ms ease;
}

.entry-tags:hover { background: var(--paper-raised); box-shadow: 0 0 0 1px var(--line) inset; }

/* Always shows the $, just dimmed when off, so it reads consistently
   with the billable-toggle buttons elsewhere in the app. Same size
   on the Tracker and Reports tabs. Muted text when off, accent when on
   (1.47.1, was ink). --accent-text, not --accent: it is the accent made
   readable as text on every theme. Not --line when off (a hairline
   color, too faint on themes with a subtle line). */
.entry-billable {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-muted);
  width: 28px;
  text-align: center;
}

.entry-billable.active { color: var(--accent-text); }

/* Fixed (not auto-sized) so the column lines up the same way on
   every row: each row is its own separate grid, so a content-based
   width let a "5:05 PM" row and a "12:14 PM ... +1" row compute
   different column widths and the whole line would drift row to row. */
.entry-time {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  padding: 3px 5px;
  border-radius: var(--radius-sm);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
}

.entry-time:hover { color: var(--ink); background: var(--paper-raised); box-shadow: 0 0 0 1px var(--line) inset; }

.entry-time-plus {
  color: var(--accent-text);
  font-weight: 700;
}

/* Report list only: time on top, date(s) underneath — same button,
   just laid out as two lines instead of one so the row's date is
   never missing (the tracker's own list stays single-line above,
   since it's already grouped by day). Padding is tighter than the
   base .entry-time (1px vs 3px top/bottom) specifically so two
   stacked lines still land under the shared 28px row floor — see
   ROW HEIGHT CONSISTENCY at .report-meta — instead of becoming the
   tallest thing in the grid and stretching the row past Tracker's. */
.entry-time-stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding-top: 1px;
  padding-bottom: 1px;
  white-space: normal;
}

.report-time-top {
  white-space: nowrap;
  line-height: 1.2;
}

.report-time-bottom {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.2;
}

.entry-duration {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  text-align: right;
  white-space: nowrap;
}

/* Inline duration edit (1.19.0, reworked 1.19.1): click a finished
   entry's duration to type a new one. The input fills the Duration cell
   exactly (negative margin = the cell's padding), so it never spills into
   the Time column. One 1px accent border, no extra outline or hover
   shadow, same look as the inline description field (.entry-desc-input). */
.entry-duration.is-editable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 3px 5px;
  margin-right: -5px;
  min-width: 0;
}
.entry-duration.is-editable:not(.is-editing):hover { background: var(--paper-raised); box-shadow: 0 0 0 1px var(--line) inset; }
.entry-duration-input {
  display: block;
  box-sizing: border-box;
  width: calc(100% + 10px);
  height: 26px;
  margin: -3px -5px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-align: right;
  padding: 0 4px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}
.entry-duration-input:focus,
.entry-duration-input:focus-visible { outline: none; box-shadow: none; }

.entry-actions { display: flex; gap: 4px; justify-self: end; }

/* Shared icon-button look for every row-action button in the app:
   Play/More/Delete on Tracker and Reports (More opens the row menu, 1.26.0),
   Edit/Archive/Delete on Projects/Clients/Tags. One class keeps them all the same size
   (matching .entry-duration's 16px) and look, instead of each page
   styling its own buttons.

   ICON RULE: an icon button is always .icon-btn, a 32 x 32px (S) box with
   an 18px glyph (font-size 18px, or an 18px SVG). Never resize one in a
   modifier class. Toggles swap the SVG and take the accent color when
   open. No triangles except Play.

   NOTE FOR FUTURE ROW ACTIONS: if you add another row-level edit,
   delete, duplicate, archive, etc. action anywhere in the app, give
   it this class and an icon glyph + title tooltip — don't add a new
   text link button (no more ".link-btn" on a row action). Text
   labels are fine for standalone buttons (Add tag, Export data,
   etc.), just not for per-row actions. */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover { color: var(--ink); }
/* pointer-events: none so a click anywhere on the SVG always reports
   the <button> itself as e.target — several row-action handlers read
   e.target.dataset directly (no .closest()), which broke once an SVG
   child could intercept the click. */
.icon-btn svg { display: block; pointer-events: none; }

.empty-state {
  color: var(--text-muted);
  padding: 30px 0;
  text-align: center;
}

/* ============================================================
   WELCOME SLIDES (1.51.0)
   The empty Tracker for a new user (tracker/welcome.js): two slides of
   three bento boxes, the same hover as the Achievements cards (lift,
   shadow) with the badge's Shine Sweep on the icon. Each box carries its
   own hue in --welcome-hue. The track slides by translateX; the dots are
   in the accent color.
   ============================================================ */
.welcome { padding: var(--space-5) 0 var(--space-3); text-align: center; }
/* On any page but the Tracker it sits under the page's content, a line over it. */
.welcome.is-below { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
/* The Tracker's heading font (This week, modal titles), not the page title one. */
.welcome-title { margin: 0 0 var(--space-4); font-family: var(--font-subheading); text-transform: none; }
.welcome-viewport { overflow: hidden; padding: 6px 4px 10px; margin: 0 -4px; }
.welcome-track { display: flex; transition: transform 600ms cubic-bezier(0.2, 0, 0, 1); }
.welcome-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.welcome-slide[aria-hidden="true"] { visibility: hidden; transition: visibility 0s 600ms; }
.welcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  min-width: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.welcome-box:hover {
  background: var(--paper-raised);
  border-color: var(--line-raised, var(--ink-light));
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}
.welcome-box:focus-visible { outline: 2px solid var(--focus-ring, var(--ink)); outline-offset: 2px; }
.welcome-box.hidden { display: none; }
.welcome-icon {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: var(--space-2);
  border-radius: 50%;
  color: var(--welcome-hue);
  background: color-mix(in srgb, var(--welcome-hue) 14%, transparent);
  transition: transform 220ms ease;
}
.welcome-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.welcome-box:hover .welcome-icon::after { transition: transform 700ms ease; transform: translateX(120%); }
.welcome-box-title { font-family: var(--font-subheading); font-weight: var(--weight-bold); line-height: var(--line-height-heading); color: var(--welcome-hue); }
.welcome-box-text { font-size: var(--font-size-sm); color: var(--text-muted); }
.welcome-foot { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.welcome-dots { display: flex; gap: var(--space-2); }
.welcome-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}
.welcome-dot.is-active { background: var(--accent); }
.welcome-dot:hover { transform: scale(1.2); }
.welcome-done[hidden] { display: none; }
@media (max-width: 700px) {
  .welcome-slide { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-track, .welcome-box, .welcome-icon, .welcome-icon::after { transition: none !important; }
}

/* ============================================================
   EDIT / MANUAL ENTRY MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.hidden { display: none; }
/* Phones (2.0.1): a 16px margin round the card, and the backdrop scrolls
   when the card is taller than what the keyboard leaves. "safe" keeps the
   top of a tall card reachable instead of centering it off the screen. */
@media (max-width: 700px) {
  .modal { padding: var(--space-4); overflow-y: auto; align-items: safe center; }
}

.modal-card {
  background: var(--paper-raised);
  padding: var(--space-5);
  /* Panel-level radius, not the small-control one the bulk sweep
     landed it on (it was a flat 4px before this pass, same as a
     button) — a surface this size reads better with the bigger
     radius, same idea as the banking reference's cards. */
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-card);
}

/* Modal titles sit one level below page titles (see HEADING SCALE
   at the top of the file) — a dialog on top of a page shouldn't
   read as loud as the page itself. Modal titles are <h3>. */
.modal-card h3 { margin: 0 0 var(--space-1); }

.modal-card input, .modal-card select {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.modal-card input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

/* .picker defaults to flex:1 for the timer bar's row layout; inside
   the modal's column layout that would stretch it to fill the
   remaining vertical space instead, so it needs to size naturally
   like every other stacked field here. */
.modal-card .picker { flex: none; }

.modal-card label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--font-size-base);
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* ============================================================
   ROW MENU (1.26.0)
   The middle row action on Tracker and Detailed Report (Edit, Split,
   Duplicate) and the running timer's button next to Stop (Split,
   Discard). One fixed-position menu placed by setupRowMenu() in app.js.
   z-index 16: over the sticky timer bar (5) and pickers (15), under
   modals (20). The button that opened it takes the accent color while
   it is open (ICON RULE).
   ============================================================ */
.row-menu {
  position: fixed;
  z-index: 16;
  min-width: 160px;
  padding: var(--space-1) 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
}
.row-menu.hidden { display: none; }
.row-menu-item {
  display: block;
  width: 100%;
  height: var(--btn-h-md);
  padding: 0 var(--space-4);
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--font-size-base);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.row-menu-item:hover,
.row-menu-item:focus-visible { background: var(--paper-raised); outline: none; }
.row-menu-item.is-danger { color: var(--danger); }
.row-more-btn.is-open { color: var(--accent-text); }
#timer-more-btn { flex: none; } /* always shown since 1.32.0 (no hidden rule needed) */
/* A thin line between the running timer's actions and the two Add choices. */
.row-menu-sep { height: 1px; margin: 4px 0; background: var(--line); }

/* ============================================================
   SPLIT MODAL (1.26.0)
   Split at field, then a slider from start to end: the time bubble
   rides above the thumb and each part's duration sits centered under
   its half (positions set in render() in setupSplitModal, app.js).
   ============================================================ */
.modal-card.split-card { max-width: 520px; gap: var(--space-3); }
.split-head { display: flex; align-items: center; justify-content: space-between; }
.split-head h3 { margin: 0; }
.modal-card label.split-at { flex-direction: row; align-items: center; gap: var(--space-3); color: var(--ink); }
.modal-card .split-at input { width: 160px; height: var(--btn-h-md); box-sizing: border-box; font-family: var(--font-mono); }
.split-track { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.split-end { flex: none; font-size: var(--font-size-sm); color: var(--text-muted); white-space: nowrap; }
.split-range-wrap { position: relative; flex: 1; min-width: 0; padding: 26px 0 24px; }
.modal-card .split-range-wrap input[type="range"] {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  height: 16px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
/* One line in the theme's readable accent on both sides of the thumb, like
   Clockify's. --accent-text, not --accent: in some themes --accent is a
   light button fill that would vanish on the card. */
.split-range-wrap input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: var(--accent-text); }
.split-range-wrap input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--accent-text); }
.split-range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  border-radius: 50%;
  border: 2px solid var(--paper-raised);
  background: var(--accent-text);
  box-sizing: border-box;
}
.split-range-wrap input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--paper-raised);
  background: var(--accent-text);
  box-sizing: border-box;
}
.split-range-wrap input[type="range"]:focus-visible { outline: none; }
.split-range-wrap input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--focus-ring, var(--line)); }
.split-bubble {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}
.split-dur {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}
.split-note { margin: 0; font-size: var(--font-size-sm); color: var(--text-muted); }

/* ============================================================
   GROUPED ENTRIES (0.8.8)
   ============================================================ */
/* The number after the project name: how many entries are in the group. */
.entry-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 24px;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent-strong);
  font-family: var(--font-ui);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  line-height: 1;
  /* 1.39.2: dead center. Lining figures (Playfair's default old-style 3,
     5, 7 and 9 drop below the line and read low) and the text box trimmed
     to the digits' own height, so the flex box centers the digits and not
     the font's extra space above and below. */
  font-variant-numeric: lining-nums tabular-nums;
  text-box: trim-both cap alphabetic;
}
.entry-project .entry-project-name { min-width: 0; }

.entry-group-row { cursor: pointer; }
/* Read-only cells on a grouped row: no edit affordance on hover. */
.entry-group-row .entry-static { cursor: inherit; }
.entry-group-row .entry-static:hover { background: none; box-shadow: none; color: inherit; }
.entry-group-row .entry-billable.entry-static { display: inline-flex; align-items: center; justify-content: center; }
.entry-group-row .entry-time.entry-static { display: block; text-align: left; }
.entry-actions .icon-btn-spacer { width: var(--btn-h-sm); height: var(--btn-h-sm); display: inline-block; flex: none; }
/* No size overrides here on purpose: it is a normal .icon-btn (32px box, 18px glyph). */
.entry-group-row.open .entry-group-toggle { color: var(--accent-text); }

/* The left accent bar marks the group row, open or closed (2.0.2, Omar);
   its entries, shown under it when open, are plain rows. Until 2.0.0 the
   bar was on the open group's entries, in 2.0.1 on the closed group only.
   The bar is a background image, not a border, so the row keeps exactly
   the same inner width as every other row. */
.entry-group-row {
  background: var(--surface) linear-gradient(var(--accent), var(--accent)) no-repeat left / 4px 100%;
}
.entry-group-row:hover {
  background: var(--paper-raised) linear-gradient(var(--accent), var(--accent)) no-repeat left / 4px 100%;
}

/* Opening and closing (2.0.2, Omar: it wasn't obvious they opened; slower
   in 2.0.3, like Zen's Resume Previous). Done in wire-tracker.js
   (animateGroupRow, a Web Animation): each entry grows out of the group and
   drops in, one after another, and the rows below slide down with them. */


/* ============================================================
   1.9.0  BILLABLE ITEMS
   Something bought or sold for a client that is not time (a theme, a
   font pack). See BILLABLE ITEMS in app.js. There is no global .hidden
   rule, so each hideable piece has its own below.
   ============================================================ */

/* The two text links under the timer sit side by side. The .link-btn
   margins (12px above, 24px below) still set the gap to the list. */
.tracker-links { display: flex; align-items: baseline; gap: var(--space-5); flex-wrap: wrap; }
#add-item-btn.hidden { display: none; }
#filter-type-picker.hidden { display: none; }
#report-items-stat.hidden { display: none; }

/* The Item chip: a small outlined pill, in the accent color. */
.item-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent-text);
  font-family: var(--font-body, inherit);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

/* Tracker: an item has no time and no duration, so one cell takes the
   place of both columns (the grid's Time and Duration tracks, 158px and
   60px). The chip sits where the time starts, and the amount ends where
   every duration ends, so the columns around it stay aligned. It is a
   button that opens the item for editing. */
.entry-item-cell {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  margin: 0 -5px 0 0; /* the 5px of padding sits outside the tracks, so the amount ends exactly where durations end */
  border-radius: var(--radius-sm);
  font: inherit;
  color: inherit;
  transition: box-shadow 120ms ease, background-color 120ms ease;
}
.entry-item-cell:hover { background: var(--paper-raised); box-shadow: 0 0 0 1px var(--line) inset; }
.entry-item-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

/* A non-billable item adds nothing to Amount, so its figure is dimmed
   (Tracker and Reports). */
.entry-item-amount.is-unbilled,
.report-amount .is-unbilled {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Reports: the Item chip inside the Duration cell keeps the cell's
   right alignment. */
.report-row .entry-duration .item-chip { vertical-align: middle; }

/* ============================================================
   PHONE LAYOUT (1.44.0), 700px and below
   A Tracker row (not a Reports row) becomes a small card of lines, the way
   the Clockify app does it, instead of a squeezed one-line grid:
     Description (up to 2 lines)          00:21:44
     Project - Task  · Client
     #tag #tag
     ------------------------------------------------
     $   3:50 PM - 4:12 PM               Play  More  Delete
   No new markup: .entry-meta steps aside (display: contents), so its cells
   and the description are all items of the row, put in order with `order`.
   ::before is the line break after the duration, ::after the divider above
   the bottom line. Grouped rows and billable items use the same layout.
   ============================================================ */
@media (max-width: 700px) {
  .entry-row:not(.report-row) {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0 10px;
    height: auto;
    padding: 12px 14px 4px;
  }
  .entry-row:not(.report-row) .entry-meta { display: contents; }

  .entry-row:not(.report-row) .entry-desc {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    margin: -2px 0 -2px -4px;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
  }
  .entry-row:not(.report-row) .entry-duration { order: 2; flex: none; margin-left: auto; align-self: flex-start; }
  /* A fixed width (the 8 digits and colons, plus the padding), so the box
     that opens when you click it to type a new duration is only a little
     wider than the time, and the description beside it never moves. */
  .entry-row:not(.report-row) .entry-duration.is-editable { box-sizing: border-box; width: calc(8ch + 16px); }
  .entry-row:not(.report-row)::before { content: ''; order: 3; flex: 1 0 100%; height: 8px; }

  .entry-row:not(.report-row) .entry-project { order: 4; flex: 0 1 auto; min-width: 0; }
  .entry-row:not(.report-row) .entry-client { order: 5; flex: 1 1 0; min-width: 0; }
  .entry-row:not(.report-row) .entry-client:has(.empty-inline) { display: none; }
  .entry-row:not(.report-row) .entry-client::before { content: '\00b7\00a0'; }
  /* A long project name leaves the client some room on its line, instead of
     pushing the client down to a line of its own. */
  .entry-row:not(.report-row) .entry-project { max-width: calc(100% - 7em); }
  .entry-row:not(.report-row):has(.entry-client .empty-inline) .entry-project { max-width: 100%; }

  .entry-row:not(.report-row) .entry-tags { order: 6; flex: 1 0 100%; margin: 6px 0 0 -4px; }
  /* A grouped row with no tags has nothing to add there (its tags are not
     editable), so no line for them. */
  .entry-row:not(.report-row) .entry-tags.entry-static:has(.empty-inline) { display: none; }

  .entry-row:not(.report-row)::after {
    content: '';
    order: 7;
    flex: 1 0 calc(100% + 28px);
    height: 1px;
    margin: 10px -14px 4px;
    background: var(--line);
  }
  /* 2.0.7: on a group row the divider starts after the 4px accent bar
     instead of crossing it. */
  .entry-group-row.entry-row:not(.report-row)::after { flex-basis: calc(100% + 24px); margin-left: -10px; }

  .entry-row:not(.report-row) .entry-billable { order: 8; flex: none; }
  .entry-row:not(.report-row) .entry-time,
  .entry-row:not(.report-row) .entry-item-cell { order: 9; flex: 0 1 auto; min-width: 0; }
  /* A billable item's chip and amount take what is left of the line, so its
     buttons stay on it. */
  .entry-row:not(.report-row) .entry-item-cell { flex: 1 1 0; justify-content: flex-start; gap: var(--space-2); margin: 0; overflow: hidden; }
  /* Its empty Play slot only lines the columns up on a wide screen. */
  .entry-row.is-item:not(.report-row) .entry-actions .icon-btn-spacer { display: none; }
  .entry-row:not(.report-row) .entry-actions { order: 10; margin-left: auto; }

  /* Every dialog keeps 16px from the screen's sides, like the pages. (The
     tall ones already scroll inside themselves.) */
  .modal { padding: 16px; box-sizing: border-box; }

  /* The week heading: its totals wrap under the label instead of running off
     the screen. */
  .week-heading-stats { flex-wrap: wrap; gap: 2px var(--space-4); font-size: var(--font-size-base); }
}

/* 2.3.2: on page 2 or later of the Tracker list, a note at the top with
   Back To Newest (see trackerToNewest in entries.js). */
.entries-page-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* ============================================================
   BULK EDIT ONE DAY (2.14.0, tracker/day-bulk.js)
   The button sits right of the day's total. In bulk mode the day's rows get
   a checkbox column at the start (the project column gets narrower), and
   the header gets the select-all box and the Reports bar (Bulk Edit,
   Delete, Clear). The checkbox look is .report-select (reports.css).
   ============================================================ */
.day-header { align-items: center; }
.day-header-main,
.day-header-side {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.day-header-side { gap: var(--space-2); flex: none; }
/* The 32px button, without making the header taller. */
.day-header .day-bulk-btn { margin: -6px -8px -6px 0; color: var(--head-fg-muted, var(--text-muted)); }
.day-header .day-bulk-btn:hover,
.day-header .day-bulk-btn.active { color: var(--accent-dark, var(--accent)); }
.day-header .day-bulk-btn.active { background: var(--accent-tint); }

.day-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-left: var(--space-2);
  font-weight: var(--weight-medium);
}
/* The small button size, so the header stays one line tall. */
.day-bulk-bar .btn-secondary,
.day-bulk-bar .btn-danger { height: var(--btn-h-sm); margin: -6px 0; }
.day-bulk-bar .link-btn { margin: 0; }
.day-bulk-bar .link-btn.hidden { display: none; }
.day-bulk-count { color: var(--head-fg-muted, var(--text-muted)); margin-right: var(--space-1); }

/* The checkbox column: 18px, taken from the project column (same gap). */
.entry-row.is-bulk .entry-meta {
  grid-template-columns: 18px minmax(92px, 1.2fr) minmax(80px, 0.7fr) 100px 30px 158px 92px auto;
}
/* The description lines up under the project again. */
.entry-row.is-bulk:not(.report-row) .entry-desc { margin-left: 38px; max-width: calc(34% - 38px); }

@media (max-width: 700px) {
  /* Phone: the bar takes its own line under the day's name, and a row's
     checkbox sits before the description on its first line. */
  .day-header.is-bulk { align-items: flex-start; }
  .day-header.is-bulk .day-header-main { flex-wrap: wrap; row-gap: var(--space-2); }
  .day-header.is-bulk .day-bulk-bar { flex-basis: 100%; margin-left: 0; }
  .entry-row.is-bulk:not(.report-row) .entry-select { order: 0; flex: none; margin-right: 2px; }
  .entry-row.is-bulk:not(.report-row) .entry-desc { margin-left: -4px; max-width: none; }
}
