/* HiveLogic list system: one compact table, two densities.

   Compact (default for everyone) is a real table row about 36px tall, one line per
   row. Comfortable is the same table with room to breathe (56px, titles may wrap to
   two lines). The choice is the person's, saved on their account (api/user-settings,
   key list_density) and applied to every list at once through
   <html data-hl-density="compact|comfortable">.

   Tokens only (--card, --line, --ink, --mut, --gold-bg, --hl-fs-*), so light and
   dark both come from the page theme. Sizes come from the type scale in hl-ui.css.

   Markup contract (public/hl-list.js builds it):
     .hl-lt-wrap > table.hl-lt > thead/tbody; cells carry c-pick c-type c-num c-who
     c-title c-date c-sent c-status c-total c-act; .num right-aligns. */

:root { --hl-row: 36px; --hl-row-pad: 0px; --hl-lt-max: calc(100vh - 130px); }
html[data-hl-density="comfortable"] { --hl-row: 56px; --hl-row-pad: 6px; }

/* ---- page header: title and the primary action on one line ------------------- */
html body .hl-head { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; padding: 4px 2px 10px; min-width: 0; }
html body .hl-head > h1 { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; margin: 0; white-space: nowrap; }
html body .hl-head .hl-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }

/* ---- the thin summary strip (replaces status bars, migration cards, KPI rows) -- */
html body .hl-strip { display: flex; flex-direction: column; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin: 0 0 8px; color: var(--ink); }
html body .hl-strip-row { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 3px 6px 3px 12px; min-width: 0; }
html body .hl-strip-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green-ink); }
html body .hl-strip[data-tone="warn"] .hl-strip-dot { background: var(--amber); }
html body .hl-strip-text { flex: 1; min-width: 0; font-size: var(--hl-fs-body); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .hl-strip-text b { font-weight: 800; }
html body .hl-strip-btn { flex: none; font: inherit; font-size: var(--hl-fs-micro); font-weight: 700; color: var(--ink); background: transparent; border: 0; border-radius: 6px; padding: 5px 9px; min-height: 28px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
html body .hl-strip-btn:hover { background: var(--gold-bg); }
html body .hl-strip-btn svg { width: 10px; height: 10px; transition: transform .15s; }
html body .hl-strip-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
html body .hl-strip-d { border-top: 1px solid var(--line); padding: 10px 12px 12px; }
html body .hl-strip-d[hidden] { display: none; }
html body .hl-strip-d .efl-cards { margin: 0; gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
html body .hl-strip-d .efl-card { padding: 9px 11px; }
html body .hl-strip-d .efl-card h4 { margin-bottom: 4px; font-size: var(--hl-fs-micro); }
html body .hl-strip-d .efl-card .big { font-size: 18px; }
html body .hl-strip-d .efl-card .under { display: none; }

/* An existing status bar restyled as the strip (Jobs, Leads and similar bars whose text is
   rewritten by other scripts by id): one thin line, the hint line moves into Details. */
html body [data-hl-strip] { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-height: 34px; margin: 0 0 8px; padding: 3px 6px 3px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
html body [data-hl-strip] > span { font-size: var(--hl-fs-body); font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
html body [data-hl-strip] > span:first-child:not(#rlv-jobs-summary):not(#rlv-leads-summary) { flex: none; font-size: var(--hl-fs-micro); font-weight: 800; letter-spacing: .04em; color: var(--green-ink); }
html body [data-hl-strip] > span:not(:first-child):not([id$="summary"]) { display: none; margin-left: 0; }
html body [data-hl-strip="open"] > span:not(:first-child):not([id$="summary"]) { display: inline; white-space: normal; }
html body [data-hl-strip="open"] { flex-wrap: wrap; }
html body [data-hl-strip] > [id$="summary"] { flex: 1; }
html body [data-hl-strip] > .hl-strip-btn { margin-left: auto; }

/* ---- toolbar: search, filters, sort, density and refresh in ONE row ----------- */
html body .hl-tb { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin: 0 0 8px; min-width: 0; }
html body .hl-tb .hl-tb-chips { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
html body .hl-tb .hl-tb-chips::-webkit-scrollbar { display: none; }
html body .hl-tb .hl-tb-grow { flex: 1 1 160px; min-width: 120px; max-width: 360px; }
html body .hl-tb .hl-tb-end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
html body .hl-tb .eqtab, html body .hl-tb .hl-fchip { white-space: nowrap; flex: none; }
html body .hl-sel { height: var(--hl-h-sm); border: 1px solid var(--line); border-radius: var(--hl-r); background: var(--card); color: var(--ink); font: inherit; font-size: var(--hl-fs-micro); font-weight: 700; padding: 0 8px; max-width: 170px; }

/* density toggle: two segments */
html body .hl-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--hl-r); background: var(--card); padding: 2px; gap: 2px; flex: none; }
html body .hl-seg button { font: inherit; font-size: var(--hl-fs-micro); font-weight: 700; color: var(--mut); background: transparent; border: 0; border-radius: 7px; padding: 0 10px; height: calc(var(--hl-h-sm) - 6px); min-height: 24px; cursor: pointer; white-space: nowrap; }
html body .hl-seg button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
html body .hl-seg button:focus-visible { outline: 2px solid var(--hl-primary); outline-offset: 1px; }

/* small icon buttons (Refresh and similar) */
html body .hl-icobtn { flex: none; width: var(--hl-h-sm); height: var(--hl-h-sm); min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--hl-r); background: var(--card); color: var(--ink); cursor: pointer; }
html body .hl-icobtn:hover { background: var(--gold-bg); }
html body .hl-icobtn svg { width: 15px; height: 15px; }
html body .hl-icobtn.spin svg { animation: hl-spin .8s linear infinite; }
@keyframes hl-spin { to { transform: rotate(360deg); } }

/* ---- the table ---------------------------------------------------------------- */
html body .hl-lt-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: var(--hl-lt-max); min-height: 120px; margin-bottom: 12px; overscroll-behavior: contain; }
html body table.hl-lt { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--hl-fs-body); color: var(--ink); }
html body table.hl-lt thead th { position: sticky; top: 0; z-index: 2; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); text-align: left; font-size: var(--hl-fs-micro); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); height: 32px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body table.hl-lt tbody td { height: calc(var(--hl-row) + 1px); padding: var(--hl-row-pad) 10px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; line-height: 1.3; background: transparent; }
html[data-hl-density="comfortable"] body table.hl-lt tbody td.c-title, html[data-hl-density="comfortable"] body table.hl-lt tbody td.c-who { white-space: normal; display: table-cell; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
html body table.hl-lt tbody tr:last-child td { border-bottom: 0; }
html body table.hl-lt tbody tr.hl-zebra td, html body table.hl-lt tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--gold-bg) 40%, transparent); }
html body table.hl-lt tbody tr:hover td { background: var(--gold-bg); }
html body table.hl-lt tbody tr[tabindex] { cursor: pointer; }
html body table.hl-lt tbody tr:focus-visible { outline: 2px solid var(--hl-primary); outline-offset: -2px; }
html body table.hl-lt td.num, html body table.hl-lt th.num { text-align: right; font-variant-numeric: tabular-nums; }
html body table.hl-lt td.num { font-family: var(--mono); font-weight: 700; }
html body table.hl-lt td.c-num { font-family: var(--mono); font-weight: 700; }
html body table.hl-lt td.c-who { font-weight: 700; }
html body table.hl-lt td.c-date, html body table.hl-lt td.c-sent { color: var(--mut); }
html body table.hl-lt td.c-act, html body table.hl-lt th.c-act { text-align: right; padding-right: 6px; overflow: visible; }
html body table.hl-lt .c-pick { width: 34px; padding: 0 0 0 10px; }
html body table.hl-lt .c-pick input { margin: 0; width: 16px; height: 16px; vertical-align: middle; }
html body table.hl-lt .c-type { width: 104px; }
html body table.hl-lt .c-num { width: 104px; }
html body table.hl-lt .c-who { width: 19%; }
html body table.hl-lt .c-date { width: 104px; }
html body table.hl-lt .c-sent { width: 96px; }
html body table.hl-lt .c-status { width: 146px; }
html body table.hl-lt .c-total { width: 112px; }
html body table.hl-lt .c-act { width: 44px; }
html body table.hl-lt .c-title { width: auto; }
html body table.hl-lt .hl-from { display: block; font-size: var(--hl-fs-micro); font-weight: 600; color: var(--mut); line-height: 1.1; }
html body table.hl-lt .ef-st, html body table.hl-lt .hl-badge { font-size: var(--hl-fs-micro); padding: 2px 8px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
html body table.hl-lt .hl-type, html body table.hl-lt .hl-type.jobber { display: inline; font-size: var(--hl-fs-micro); font-weight: 600; letter-spacing: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--mut); white-space: nowrap; }
html[data-hl-density="compact"] body table.hl-lt .hl-from { display: inline; margin-left: 6px; }

/* row action: one "..." menu */
html body .hl-kebab { width: 32px; height: 28px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--mut); border-radius: 7px; font-size: 18px; line-height: 1; font-weight: 800; cursor: pointer; }
html body .hl-kebab:hover, html body .hl-kebab[aria-expanded="true"] { background: var(--gold-bg); color: var(--ink); }
html body .hl-kebab:focus-visible { outline: 2px solid var(--hl-primary); outline-offset: 1px; }
html body .hl-menu-pop { position: fixed; z-index: 9800; min-width: 190px; max-width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: var(--hl-r-lg); box-shadow: var(--hl-pop); padding: 5px; display: flex; flex-direction: column; }
html body .hl-menu-pop[hidden] { display: none; }
html body .hl-menu-pop > button { text-align: left; font: inherit; font-size: var(--hl-fs-body); font-weight: 600; color: var(--ink); background: transparent; border: 0; border-radius: 7px; padding: 8px 10px; min-height: 34px; cursor: pointer; width: 100%; justify-content: flex-start; box-shadow: none; }
html body .hl-menu-pop > button:hover, html body .hl-menu-pop > button:focus-visible { background: var(--gold-bg); outline: none; }
html body .hl-menu-pop > button.ef-sl-danger, html body .hl-menu-pop > button.danger { color: var(--red); }

/* footer: counts and Load more */
html body .hl-lt-foot { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 10px; font-size: var(--hl-fs-micro); font-weight: 700; color: var(--mut); border-top: 1px solid var(--line); }
html body .hl-count { font-size: var(--hl-fs-micro); font-weight: 700; color: var(--mut); white-space: nowrap; }

/* states: skeleton rows keep the row height so nothing jumps when data lands */
html body .hl-skel td { height: calc(var(--hl-row) + 1px); }
html body .hl-skel i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--line), var(--gold-bg), var(--line)); background-size: 200% 100%; animation: hl-shim 1.2s linear infinite; }
@keyframes hl-shim { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { html body .hl-skel i, html body .hl-icobtn.spin svg { animation: none; } }
html body .hl-lt-state td { white-space: normal; height: auto; padding: 8px; }

/* ---- Compact density for lists that keep their own markup (Clients, Jobs, Leads, ...) */
html[data-hl-density="compact"] body :is(.cdb-table) thead th { position: sticky; top: 0; z-index: 2; background: var(--card); height: 32px; padding-top: 0; padding-bottom: 0; }
html[data-hl-density="compact"] body :is(.cdb-table) tbody td { padding-top: 0; padding-bottom: 0; height: 37px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
html[data-hl-density="compact"] body :is(.cdb-table) tbody tr:hover td { background: var(--gold-bg); }
html[data-hl-density="comfortable"] body :is(.cdb-table) tbody td { height: 56px; }
html body :is(.cdb-table-scroll) { max-height: var(--hl-lt-max); overflow: auto; overscroll-behavior: contain; }

/* ---- phones: each row stacks to two compact lines ------------------------------- */
@media (max-width: 700px) {
  :root { --hl-lt-max: none; }
  html body .hl-head > h1 { font-size: 20px; }
  html body .hl-tb { flex-wrap: wrap; }
  html body .hl-tb .hl-tb-grow { flex: 1 1 100%; max-width: none; order: -1; }
  html body .hl-tb .hl-tb-chips { flex: 1 1 100%; order: 0; }
  html body .hl-tb .hl-tb-end { margin-left: 0; width: 100%; justify-content: space-between; order: 1; }
  html body .hl-strip-d .efl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .hl-lt-wrap { overflow: visible; max-height: none; }
  html body table.hl-lt, html body table.hl-lt tbody { display: block; }
  html body table.hl-lt thead { display: none; }
  html body table.hl-lt tbody tr { display: grid; grid-template-columns: 28px auto minmax(0, 1fr) auto auto 40px; grid-template-areas: "pick type num status total act" "pick who who title title act"; align-items: center; column-gap: 8px; row-gap: 1px; padding: 6px 4px 6px 6px; border-bottom: 1px solid var(--line); min-height: 52px; }
  html body table.hl-lt tbody tr:last-child { border-bottom: 0; }
  html body table.hl-lt tbody td { display: block; height: auto; border: 0; padding: 0; background: transparent !important; min-width: 0; width: auto !important; }
  html body table.hl-lt tbody tr:hover, html body table.hl-lt tbody tr:nth-child(even) { background: transparent; }
  html body table.hl-lt tbody tr:hover { background: var(--gold-bg); }
  html body table.hl-lt td.c-pick { grid-area: pick; padding: 0; }
  html body table.hl-lt td.c-type { grid-area: type; }
  html body table.hl-lt td.c-num { grid-area: num; }
  html body table.hl-lt td.c-status { grid-area: status; }
  html body table.hl-lt td.c-total { grid-area: total; font-size: var(--hl-fs-body); }
  html body table.hl-lt td.c-who { grid-area: who; font-size: var(--hl-fs-micro); color: var(--mut); font-weight: 700; }
  html body table.hl-lt td.c-title { grid-area: title; font-size: var(--hl-fs-micro); text-align: right; }
  html body table.hl-lt td.c-act { grid-area: act; text-align: center; padding: 0; }
  html body table.hl-lt td.c-date, html body table.hl-lt td.c-sent { display: none; }
  html body table.hl-lt .hl-from { display: none; }
  html body .hl-kebab { width: 40px; height: 44px; }
  html body .hl-lt-state { display: block; }
  html body .hl-lt-state td { display: block; }
}

/* ---- engine pieces: two-line cells, sortable heads, pills, overview cards ---------------- */
html body table.hl-lt .hl-main { font-weight: 700; color: var(--ink); }
html body table.hl-lt .hl-sub { color: var(--mut); font-weight: 500; font-size: var(--hl-fs-micro); }
html[data-hl-density="compact"] body table.hl-lt .hl-sub { margin-left: 8px; }
html[data-hl-density="comfortable"] body table.hl-lt .hl-sub { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
html[data-hl-density="comfortable"] body table.hl-lt td { line-height: 1.25; }
html body table.hl-lt td.c-client, html body table.hl-lt td.c-who { font-weight: 700; }
html body table.hl-lt td.c-number .hl-main { font-family: var(--mono); }
html body table.hl-lt td.c-property, html body table.hl-lt td.c-schedule, html body table.hl-lt td.c-created, html body table.hl-lt td.c-sent, html body table.hl-lt td.c-expires { color: var(--mut); font-weight: 500; }
html body table.hl-lt td.c-property .hl-main { color: var(--ink); font-weight: 500; }
html body .hl-sortbtn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; border-radius: 4px; }
html body .hl-sortbtn span { overflow: hidden; text-overflow: ellipsis; }
html body .hl-sortbtn svg { flex: none; width: 8px; height: 10px; }
html body .hl-sortbtn.on { color: var(--ink); }
html body .hl-sortbtn:focus-visible { outline: 2px solid var(--hl-primary); outline-offset: 2px; }
html body th.num .hl-sortbtn { flex-direction: row-reverse; }

html body .hl-pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: var(--hl-fs-micro); font-weight: 700; line-height: 1; padding: 5px 10px; border-radius: 99px; background: #eceef4; color: #414a60; }
html body .hl-pill.s-amber { background: #fdf1dc; color: #7a4b00; }
html body .hl-pill.s-blue { background: #e5f0f9; color: #1f4f8a; }
html body .hl-pill.s-green { background: #e2f1ea; color: #14663c; }
html body .hl-pill.s-red { background: #f9ebe8; color: #8f2a1d; }
html body .hl-pill.s-grey { background: #eceef4; color: #414a60; }
body.hl-dark .hl-pill { background: #26304a; color: #c9d3e4; }
body.hl-dark .hl-pill.s-amber { background: #37301b; color: #fbbf24; }
body.hl-dark .hl-pill.s-blue { background: #1b2a44; color: #9bbcff; }
body.hl-dark .hl-pill.s-green { background: #1b3129; color: #5ccf9b; }
body.hl-dark .hl-pill.s-red { background: #3a2521; color: #f0a095; }
body.hl-dark .hl-pill.s-grey { background: #26304a; color: #c9d3e4; }

html body .hl-pill-f { display: inline-flex; align-items: center; gap: 6px; height: var(--hl-h-sm); padding: 0 4px 0 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: var(--hl-fs-micro); font-weight: 700; color: var(--mut); flex: none; }
html body .hl-pill-f select { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 800; height: 100%; max-width: 150px; padding: 0 6px 0 0; cursor: pointer; outline: none; }
html body .hl-pill-f:focus-within { outline: 2px solid var(--hl-primary); outline-offset: 1px; }
html body .hl-search { display: flex; align-items: center; gap: 7px; height: var(--hl-h-sm); padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--mut); }
html body .hl-search svg { width: 14px; height: 14px; flex: none; }
html body .hl-search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: var(--hl-fs-body); width: 100%; min-width: 0; }
html body .hl-search:focus-within { outline: 2px solid var(--hl-primary); outline-offset: 1px; }
html body .hl-tbtn { flex: none; }
html body .hl-heading { display: flex; align-items: baseline; gap: 8px; margin: 2px 2px 8px; }
html body .hl-heading h2 { font-size: 15px; font-weight: 800; margin: 0; color: var(--ink); }
html body .hl-heading .hl-count { font-size: var(--hl-fs-body); font-weight: 600; }

html body .hl-ov { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
html body .hl-ov-c { all: unset; box-sizing: border-box; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
html body button.hl-ov-c { cursor: pointer; }
html body button.hl-ov-c:hover { background: var(--gold-bg); }
html body button.hl-ov-c:focus-visible { outline: 2px solid var(--hl-primary); outline-offset: 1px; }
html body .hl-ov-c.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
html body .hl-ov-l { font-size: var(--hl-fs-micro); font-weight: 700; color: var(--mut); overflow-wrap: anywhere; }
html body .hl-ov-v { font-size: 18px; line-height: 1.15; font-weight: 800; font-family: var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
html body .hl-ov-v.long { font-size: var(--hl-fs-lede); }
html body .hl-ov-s { font-size: var(--hl-fs-micro); font-weight: 600; color: var(--mut); overflow-wrap: anywhere; }
html body .hl-delta { font-style: normal; font-weight: 800; color: var(--mut); }
html body .hl-delta.good { color: var(--green-ink); }
html body .hl-delta.bad { color: var(--red); }

html body .hl-colpop { padding: 8px; min-width: 200px; }
html body .hl-colpop-h { font-size: var(--hl-fs-micro); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); padding: 4px 6px 6px; }
html body .hl-colpop-r { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 7px; font-size: var(--hl-fs-body); font-weight: 600; color: var(--ink); cursor: pointer; }
html body .hl-colpop-r:hover { background: var(--gold-bg); }
html body .hl-colpop-r input { width: 16px; height: 16px; margin: 0; }
html body .hl-colpop-reset { margin-top: 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--mut); font: inherit; font-size: var(--hl-fs-micro); font-weight: 700; padding: 8px 6px 2px; text-align: left; cursor: pointer; }
html body .hl-only-phone { display: none; }
html body .hl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body table.hl-lt tbody tr.hl-lt-state { display: table-row; }
html body table.hl-lt tbody tr.hl-lt-state:hover td { background: transparent; }
html body table.hl-lt .c-client, html body table.hl-lt .c-who { width: 17%; }
html body table.hl-lt .c-number { width: 24%; }
html body table.hl-lt .c-property { width: 21%; }
html body table.hl-lt .c-schedule, html body table.hl-lt .c-created { width: 120px; }
html body table.hl-lt .c-expires { width: 104px; }
html body table.hl-lt .c-owner { width: 130px; }
@media (max-width: 700px) {
  html body .hl-only-phone { display: inline-flex; }
  html body table.hl-lt tbody tr.hl-lt-state { display: block; min-height: 0; padding: 0; }
  html body table.hl-lt[data-hl-table] tbody tr { grid-template-columns: 28px minmax(0, 1fr) auto auto 40px; grid-template-areas: "pick num status total act" "pick client client client act"; }
  html body table.hl-lt[data-hl-table] td.c-number { grid-area: num; font-size: var(--hl-fs-body); }
  html body table.hl-lt[data-hl-table] td.c-client { grid-area: client; font-size: var(--hl-fs-micro); color: var(--mut); font-weight: 700; }
  html body table.hl-lt td:not(.c-pick):not(.c-number):not(.c-client):not(.c-status):not(.c-total):not(.c-act):not(.c-state) { display: none; }
  html body table.hl-lt .hl-sub { display: inline; margin-left: 6px; }
  html body .hl-ov { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

/* Estimates: the saved-estimate source card is hidden (its row buttons live in the table's menus) unless it has an error to show. */
html body #ef-native-list.ef-saved-src { display: none; }
html body #ef-native-list.ef-saved-src.has-err { display: block; margin-bottom: 10px; padding: 12px; }
html body .hl-tb { flex-wrap: wrap; row-gap: 8px; }
html body #view-estimates .efl-head { padding: 4px 2px 10px; flex-wrap: wrap; }
html body #view-estimates .efl-head h1 { font-size: 22px; }
html body .hl-btn-danger { color: var(--red); border-color: var(--red); }
/* The "move open Jobber quotes" card, when it still has work to ask for: a thin bar, not a hero card. */
html body .ejm { padding: 8px 12px; border-left-width: 3px; border-radius: 10px; margin-bottom: 8px; }
html body .ejm-main { align-items: center; gap: 12px; flex-wrap: nowrap; }
html body .ejm-text { flex: 1 1 auto; min-width: 0; }
html body .ejm-title { font-size: var(--hl-fs-body); margin: 0; }
html body .ejm-body { font-size: var(--hl-fs-micro); margin: 1px 0 0; max-width: none; color: var(--mut); }
html body .ejm-go { padding: 6px 12px; font-size: var(--hl-fs-micro); white-space: nowrap; }
html body .ejm-stats { margin-top: 6px; }
html body .ejm-stat { padding: 3px 10px; font-size: var(--hl-fs-micro); }
@media (max-width: 700px) { html body .ejm-main { flex-wrap: wrap; } html body .ejm-go { width: 100%; } }

html body .hl-tb [hidden], html body .hl-tb-end [hidden] { display: none !important; }
/* Jobs "All jobs" tab has its own search and filters; the board's shared search steps aside. */
html body #view-jobs.jv-all-on :is(#jwb-q, #jwb-q-clear, #jwb-division, #jwb-q-summary) { display: none !important; }
html body #view-jobs.jv-all-on > .kpis { display: none; }
html body #view-jobs > .kpis { gap: 8px; margin-bottom: 8px; }
html body #view-jobs > .kpis .kpi { padding: 8px 12px; }
html body #view-jobs > .kpis .kpi .v { font-size: 18px; }
/* Clients */
html body #view-clients .cdb-head { padding-bottom: 6px; }
html body #view-clients .cdb-head-t > p { display: none; }
html body #view-clients .cdb-card > h3 { margin: 0 0 8px; font-size: 15px; }
html body #view-clients .cdb-bar { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
html body #view-clients .cdb-bar .hl-tb-end { margin-left: auto; }
html body #view-clients .hl-strip-d .statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
html[data-hl-density="compact"] body #view-clients .cdb-name .rav { width: 24px; height: 24px; font-size: 10px; }
html[data-hl-density="compact"] body #view-clients .cdb-sub { display: none; }
html[data-hl-density="compact"] body #view-clients .cdb-name { gap: 8px; }
html body #view-clients .cdb-foot { padding-top: 8px; }
html body #view-clients .cdb-head { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
html body #view-clients .cdb-head-t { flex: 1; min-width: 0; }
html body #view-clients .cdb-head-t > h1 { margin: 0; font-size: 22px; }
html body #view-clients .cdb-head-btns { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
html body #view-clients .cdb-search { flex: 1 1 220px; min-width: 160px; }
@media (max-width: 700px) {
  html body #view-clients .cdb-head { flex-wrap: wrap; }
  html body #view-clients .cdb-head-t { flex: 1 1 100%; }
  html body #view-clients .cdb-head-btns { margin-left: 0; width: 100%; justify-content: flex-start; }
  html body #view-clients .cdb-head-btns > .btn-save, html body #view-clients .cdb-head-btns > .gbtn { flex: 1 1 auto; }
}
@media (max-width: 700px) {
  html body .hl-tb .hl-tb-end { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  html body table.hl-lt[data-hl-table] tbody tr { grid-template-columns: 40px minmax(0, 1fr) auto auto 40px; padding-left: 0; }
  html body table.hl-lt td.c-pick input { margin: 0; }
}
/* The Leads board paints its status bar with light-card tokens in dark mode; the thin strip uses the page's own dark tokens. */
html body.hl-dark :is(#rlv-leads-live, #rlv-jobs-live, #rlv-financial-live)[data-hl-strip] { --ink: #c9d3e4; --mut: #8fa0bd; --line: #26304a; --green-ink: #5ccf9b; color: #c9d3e4; background: var(--card) !important; border-color: var(--line) !important; }
html body.hl-dark :is(#rlv-leads-live, #rlv-jobs-live, #rlv-financial-live)[data-hl-strip] span { color: #c9d3e4 !important; }
html body :is(#rlv-leads-live, #rlv-jobs-live, #rlv-financial-live)[data-hl-strip] { background: var(--card) !important; border: 1px solid var(--line) !important; }
html body :is(#rlv-leads-live, #rlv-jobs-live, #rlv-financial-live)[data-hl-strip] > span:first-child:not([id$="summary"]) { color: var(--green-ink) !important; }
html body .hl-strip, html body .hl-strip-d, html body .hl-strip-row, html body .hl-ov, html body #efl-ui-top, html body #efl-ui-list, html body #jv-all { min-width: 0; max-width: 100%; box-sizing: border-box; }
html body .hl-strip-d { overflow: hidden; }
html body .hl-lt-wrap { position: relative; }
html body #ef-native-list.ef-saved-src.has-note { display: block; margin-bottom: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
html body #ef-native-list.ef-saved-src.has-note > :not(.ef-sl-note) { display: none; }
html body #ef-native-list.ef-saved-src.has-note > .ef-sl-note { margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font-size: var(--hl-fs-body); font-weight: 600; }
html body table.hl-lt .efl-sent { font-weight: 500; color: inherit; }

/* Crew column: overlapping initials, the names in the tooltip. Tokens only. */
html body table.hl-lt .hl-crew { display: inline-flex; align-items: center; vertical-align: middle; }
html body table.hl-lt .hl-crew i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 24px; height: 24px; border-radius: 50%; margin-left: -5px; border: 2px solid var(--card); background: var(--line); color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: 0; line-height: 1; }
html body table.hl-lt .hl-crew i:first-child { margin-left: 0; }
html body table.hl-lt .hl-crew i.more { background: var(--card); border-color: var(--line); color: var(--mut); }

/* Widths for the data columns (fixed table layout: a column with no width shares what is left, which is how Client keeps the room). */
html body table.hl-lt .c-number { width: 150px; }
html body table.hl-lt .c-property { width: 17%; }
html body table.hl-lt .c-schedule, html body table.hl-lt .c-next, html body table.hl-lt .c-created, html body table.hl-lt .c-expires { width: 104px; }
html body table.hl-lt .c-crew { width: 120px; }
html body table.hl-lt .c-balance { width: 104px; }
html body table.hl-lt .c-salesperson { width: 130px; }
html body table.hl-lt td.c-property { color: var(--mut); }

/* Infinite scroll: the count says how much is loaded, a small spinner says more is coming. */
html body .hl-lt-foot .hl-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--mut); animation: hl-rot .8s linear infinite; }
@keyframes hl-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html body .hl-lt-foot .hl-spin { animation: none; } }
html body table.hl-lt tr.hl-sentinel td { height: 1px; padding: 0; border: 0; }

/* An inline notice above a list: one sentence and its Retry. */
html body .hl-inline-warn { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--amber, #b45309); border-radius: var(--hl-r); background: var(--card); color: var(--ink); font-size: var(--hl-fs-body); font-weight: 600; }
html body .hl-inline-warn[hidden] { display: none; }

/* "More filters": the rarely used filters sit one click away, not in the main bar. */
html body .hl-tb-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 10px; }
html body .hl-tb-more[hidden] { display: none; }

/* Opening an estimate: answers the click at once, then closes when the editor is on screen. */
.est-opening{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.45)}
.est-opening-card{background:var(--paper,#fff);color:#0f172a;border-radius:14px;padding:28px 24px;width:min(400px,100%);text-align:center;box-shadow:0 20px 50px rgba(15,23,42,.3);box-sizing:border-box}
.est-opening-card .t{font-weight:900;font-size:16px}
.est-opening-card .s{color:#1f2536;font-size:13px;font-weight:600;line-height:1.45;margin-top:8px;overflow-wrap:anywhere}
.est-opening-bar{height:4px;border-radius:2px;background:#e2e8f0;overflow:hidden;margin:16px 0 4px}
.est-opening-bar span{display:block;height:100%;width:40%;background:#2563eb;border-radius:2px;animation:est-opening-slide 1.1s ease-in-out infinite}
@keyframes est-opening-slide{0%{transform:translateX(-100%)}100%{transform:translateX(260%)}}
.est-opening-act{display:flex;gap:10px;justify-content:center;margin-top:18px}
@media (prefers-reduced-motion:reduce){.est-opening-bar span{animation:none;width:100%}}
