/* Receipts & materials on a job (public/job-receipts.js). One look for the desktop job drawer and every phone app.
   Colours come from the tokens on .hlr; tone="dark" swaps them. Every text/background pair is at least 4.5:1. */
.hlr, .hlr-ov, .hlr-card, .hlra-home {
  --hlr-bg: #ffffff; --hlr-surface: #f5f6f8; --hlr-fg: #16181d; --hlr-mut: #566070; --hlr-line: #dde1e7;
  --hlr-brand: #17613f; --hlr-brand-fg: #ffffff; --hlr-brand-soft: #e4f3ec; --hlr-brand-soft-fg: #0f4a2f;
  --hlr-warn-bg: #fdf1d4; --hlr-warn-fg: #6b4300; --hlr-danger: #b42318; --hlr-danger-soft: #fdeceb;
  --hlr-info-bg: #e8eefc; --hlr-info-fg: #1f3a8a; --hlr-shadow: 0 12px 40px rgba(16, 24, 40, .22);
  font-family: inherit; color: var(--hlr-fg); box-sizing: border-box; text-align: left;
}
.hlr[data-tone="dark"], .hlr-ov[data-tone="dark"], .hlr-card[data-tone="dark"], .hlra-home[data-tone="dark"] {
  --hlr-bg: #14171c; --hlr-surface: #1d2128; --hlr-fg: #f2f4f7; --hlr-mut: #a6afbc; --hlr-line: #2f3640;
  --hlr-brand: #4cc78f; --hlr-brand-fg: #05210f; --hlr-brand-soft: #173326; --hlr-brand-soft-fg: #9be3c0;
  --hlr-warn-bg: #3a2c0c; --hlr-warn-fg: #f6d58a; --hlr-danger: #ff8a80; --hlr-danger-soft: #3a1b19;
  --hlr-info-bg: #1c2744; --hlr-info-fg: #b9c9f5; --hlr-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.hlr *, .hlr-ov *, .hlr-card *, .hlra-home * { box-sizing: border-box; }
.hlr { background: var(--hlr-bg); line-height: 1.45; font-size: 14px; }
.hlr button, .hlr input, .hlr select, .hlr textarea, .hlr-ov button, .hlr-ov input, .hlr-ov select, .hlr-ov textarea, .hlr-card button { font: inherit; }

/* ---- head + actions */
.hlr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hlr-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--hlr-fg); }
.hlr-sub { margin: 2px 0 0; font-size: 13px; color: var(--hlr-mut); }
.hlr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hlr-btn { appearance: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--hlr-line); background: var(--hlr-bg); color: var(--hlr-fg); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.hlr-btn:hover { background: var(--hlr-surface); }
.hlr-btn:focus-visible, .hlr-iconbtn:focus-visible, .hlr-seg button:focus-visible, .hlr-opt:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }
.hlr-btn.hlr-pri { background: var(--hlr-brand); border-color: var(--hlr-brand); color: var(--hlr-brand-fg); }
.hlr-btn.hlr-pri:hover { filter: brightness(1.08); }
.hlr-btn.hlr-dng { background: var(--hlr-danger); border-color: var(--hlr-danger); color: #fff; }
[data-tone="dark"] .hlr-btn.hlr-dng { color: #2a0705; }
.hlr-btn.hlr-quiet { border-color: transparent; background: transparent; }
.hlr-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.hlr-btn[disabled] { opacity: .55; cursor: not-allowed; }
.hlr-btn svg, .hlr-iconbtn svg { width: 18px; height: 18px; flex: none; }
.hlr-iconbtn { appearance: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--hlr-mut); cursor: pointer; }
.hlr-iconbtn:hover { background: var(--hlr-surface); color: var(--hlr-fg); }

/* ---- totals */
.hlr-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.hlr-total { background: var(--hlr-surface); border: 1px solid var(--hlr-line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.hlr-total b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hlr-total span { display: block; font-size: 12px; color: var(--hlr-mut); margin-top: 2px; }

/* ---- sections + rows */
.hlr-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 8px; }
.hlr-sec h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hlr-mut); }
.hlr-sec span { font-size: 13px; color: var(--hlr-mut); }
.hlr-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hlr-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-bg); }
.hlr-row.pending { border-style: dashed; background: var(--hlr-surface); }
.hlr-thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--hlr-surface); border: 1px solid var(--hlr-line); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--hlr-mut); font-size: 12px; font-weight: 700; padding: 0; cursor: pointer; position: relative; }
.hlr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hlr-thumb .n { position: absolute; right: 3px; bottom: 3px; background: rgba(0, 0, 0, .72); color: #fff; border-radius: 6px; padding: 0 6px; font-size: 11px; line-height: 18px; }
.hlr-main { min-width: 0; }
.hlr-name { margin: 0; font-size: 15px; font-weight: 650; color: var(--hlr-fg); overflow-wrap: anywhere; }
.hlr-meta { margin: 3px 0 0; font-size: 13px; color: var(--hlr-mut); overflow-wrap: anywhere; }
.hlr-note { margin: 6px 0 0; font-size: 13px; color: var(--hlr-fg); overflow-wrap: anywhere; }
.hlr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hlr-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--hlr-surface); color: var(--hlr-fg); border: 1px solid var(--hlr-line); }
.hlr-chip.ok { background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); border-color: transparent; }
.hlr-chip.wait { background: var(--hlr-warn-bg); color: var(--hlr-warn-fg); border-color: transparent; }
.hlr-chip.info { background: var(--hlr-info-bg); color: var(--hlr-info-fg); border-color: transparent; }
.hlr-chip.bad { background: var(--hlr-danger-soft); color: var(--hlr-danger); border-color: transparent; }
.hlr-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hlr-amt { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hlr-fg); }
.hlr-amt.muted { font-size: 12px; font-weight: 500; color: var(--hlr-mut); }
.hlr-rowacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hlr-rowacts .hlr-btn { flex: 0 0 auto; }
.hlr-mat { grid-template-columns: minmax(0, 1fr) auto; }

/* ---- states */
.hlr-state { text-align: center; padding: 36px 20px; border: 1px dashed var(--hlr-line); border-radius: 14px; background: var(--hlr-surface); }
.hlr-state .ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlr-state .ico svg { width: 28px; height: 28px; }
.hlr-state.err .ico { background: var(--hlr-danger-soft); color: var(--hlr-danger); }
.hlr-state h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--hlr-fg); }
.hlr-state p { margin: 0 auto 16px; max-width: 420px; font-size: 14px; color: var(--hlr-mut); }
.hlr-state .hlr-actions { justify-content: center; }
.hlr-skel { height: 88px; border-radius: 12px; background: linear-gradient(90deg, var(--hlr-surface) 25%, var(--hlr-line) 37%, var(--hlr-surface) 63%); background-size: 400% 100%; animation: hlr-sk 1.3s ease infinite; }
@keyframes hlr-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .hlr-skel { animation: none; } }
.hlr-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--hlr-warn-bg); color: var(--hlr-warn-fg); margin-bottom: 12px; }
.hlr-banner.bad { background: var(--hlr-danger-soft); color: var(--hlr-danger); }

/* ---- sheets */
.hlr-ov { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 14, 20, .55); padding: 0; }
.hlr-sheet { width: 100%; max-width: 560px; max-height: 94vh; max-height: 94dvh; overflow-y: auto; background: var(--hlr-bg); color: var(--hlr-fg); border-radius: 20px 20px 0 0; box-shadow: var(--hlr-shadow); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
.hlr-sheet.wide { max-width: 720px; }
.hlr-sheet.full { max-width: none; height: 100%; max-height: none; border-radius: 0; }
@media (min-width: 700px) { .hlr-ov { align-items: center; padding: 24px; } .hlr-sheet { border-radius: 18px; padding: 22px 24px; } .hlr-sheet.full { height: auto; max-height: 94vh; max-width: 760px; border-radius: 18px; } }
.hlr-sh-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hlr-sh-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--hlr-fg); }
.hlr-f { display: block; margin: 0 0 14px; }
.hlr-f > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--hlr-fg); }
.hlr-f > span em { font-style: normal; font-weight: 400; color: var(--hlr-mut); }
.hlr-in { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--hlr-line); background: var(--hlr-bg); color: var(--hlr-fg); font-size: 16px; }
textarea.hlr-in { min-height: 76px; resize: vertical; }
.hlr-in:focus { outline: 3px solid var(--hlr-brand); outline-offset: 1px; border-color: var(--hlr-brand-soft-fg); }
.hlr-in::placeholder { color: var(--hlr-mut); opacity: 1; }
.hlr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .hlr-grid2 { grid-template-columns: 1fr; gap: 0; } .hlr-totals { grid-template-columns: 1fr; } }
.hlr-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--hlr-surface); border: 1px solid var(--hlr-line); }
.hlr-seg button { appearance: none; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--hlr-mut); font-weight: 600; font-size: 14px; cursor: pointer; padding: 0 8px; }
.hlr-seg button[aria-pressed="true"] { background: var(--hlr-bg); color: var(--hlr-fg); box-shadow: 0 1px 3px rgba(16, 24, 40, .18); }
.hlr-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 10px; }
.hlr-page { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--hlr-line); background: var(--hlr-surface); display: flex; align-items: center; justify-content: center; color: var(--hlr-mut); font-weight: 700; font-size: 12px; }
.hlr-page img { width: 100%; height: 100%; object-fit: cover; }
.hlr-page .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .72); color: #fff; font-size: 16px; line-height: 28px; cursor: pointer; padding: 0; }
.hlr-page .x:focus-visible { outline: 3px solid #fff; }
.hlr-pickrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.hlr-pickrow label.hlr-btn { cursor: pointer; }
.hlr-pickrow input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hlr-err { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--hlr-danger-soft); color: var(--hlr-danger); font-size: 13px; font-weight: 600; }
.hlr-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 6px; position: sticky; bottom: 0; padding: 12px 0 2px; background: var(--hlr-bg); box-shadow: 0 -10px 12px -8px var(--hlr-bg); }
.hlr-hint { margin: -6px 0 14px; font-size: 12px; color: var(--hlr-mut); }
.hlr-item { position: relative; padding: 12px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-surface); margin-bottom: 10px; }
.hlr-item .hlr-f { margin-bottom: 10px; }
.hlr-item-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
@media (max-width: 420px) { .hlr-item-grid { grid-template-columns: 1fr 1fr; } .hlr-item-grid .hlr-f:last-child { grid-column: 1 / -1; } }
.hlr-item .rm { position: absolute; top: 6px; right: 6px; }
.hlr-ta { position: relative; }
.hlr-opts { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 220px; overflow-y: auto; background: var(--hlr-bg); border: 1px solid var(--hlr-line); border-radius: 10px; box-shadow: var(--hlr-shadow); }
.hlr-opt { display: flex; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; align-items: center; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--hlr-fg); text-align: left; cursor: pointer; }
.hlr-opt:hover, .hlr-opt[aria-selected="true"] { background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlr-opt small { color: var(--hlr-mut); }
.hlr-viewer { display: flex; flex-direction: column; gap: 12px; }
.hlr-view-stage { min-height: 260px; max-height: 66vh; border-radius: 12px; background: var(--hlr-surface); border: 1px solid var(--hlr-line); display: flex; align-items: center; justify-content: center; overflow: auto; }
.hlr-view-stage img { max-width: 100%; max-height: 66vh; display: block; }
.hlr-view-tools { display: flex; justify-content: flex-end; }
.hlr-view-tools[hidden] { display: none; }
.hlr-view-tools .hlr-btn svg { width: 16px; height: 16px; margin-right: 6px; }
.hlr-view-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---- the compact card inside a phone job screen */
.hlr-card { display: block; width: 100%; background: var(--hlr-bg); border: 1px solid var(--hlr-line); border-radius: 14px; padding: 14px; margin: 12px 0 0; }
.hlr-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hlr-card-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); display: flex; align-items: center; justify-content: center; flex: none; }
.hlr-card-ico svg { width: 24px; height: 24px; }
.hlr-card h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--hlr-fg); }
.hlr-card p { margin: 2px 0 0; font-size: 13px; color: var(--hlr-mut); }
.hlr-card .hlr-btn { width: 100%; }
.hlr-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2147483600; max-width: min(92vw, 440px); padding: 12px 16px; border-radius: 12px; background: #16181d; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.hlr-pick-list { display: grid; gap: 8px; margin-top: 10px; }
.hlr-pick { appearance: none; text-align: left; padding: 12px 14px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-bg); color: var(--hlr-fg); cursor: pointer; min-height: 56px; }
.hlr-pick:hover { background: var(--hlr-surface); }
.hlr-pick b { display: block; font-size: 15px; }
.hlr-pick span { font-size: 13px; color: var(--hlr-mut); }

@media (max-width: 520px) {
  .hlr-row { grid-template-columns: 56px minmax(0, 1fr); }
  .hlr-thumb { width: 56px; height: 56px; }
  .hlr-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; border-top: 1px solid var(--hlr-line); padding-top: 8px; }
  .hlr-mat { grid-template-columns: minmax(0, 1fr); }
  .hlr-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .hlr-actions .hlr-btn { padding: 0 10px; }
  .hlr-state .hlr-actions { grid-template-columns: 1fr; }
}

/* ---- Receipts from anywhere (public/receipts-anywhere.js): the Add receipt flow, the job picker, the split screen, the inbox */
.hlra-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hlra-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hlra-lede { margin: 0 0 16px; font-size: 15px; color: var(--hlr-fg); }
.hlra-bigpick { display: grid; gap: 10px; margin-bottom: 12px; }
.hlra-bigpick .hlr-btn { min-height: 56px; font-size: 16px; }
.hlra-addpage { margin: -2px 0 14px; }
.hlra-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.hlra-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hlra-chips button { appearance: none; min-height: 44px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--hlr-line); background: var(--hlr-bg); color: var(--hlr-fg); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.hlra-chips button[aria-pressed="true"] { background: var(--hlr-brand); border-color: var(--hlr-brand); color: var(--hlr-brand-fg); }
.hlra-chips button:focus-visible, .hlra-dest:focus-visible, .hlra-opt:focus-visible, .hlra-job:focus-visible, .hlra-big:focus-visible, .hlra-links button:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }
.hlra-dest, .hlra-opt { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; text-align: left; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-bg); color: var(--hlr-fg); cursor: pointer; }
.hlra-dest:hover, .hlra-opt:hover { background: var(--hlr-surface); }
.hlra-dest.warn { border-color: var(--hlr-danger); }
.hlra-dest > svg, .hlra-opt > svg { width: 18px; height: 18px; flex: none; color: var(--hlr-mut); margin-left: auto; }
.hlra-opt-main { display: block; min-width: 0; flex: 1; }
.hlra-opt-main b { display: block; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.hlra-opt-main small { display: block; margin-top: 2px; font-size: 13px; color: var(--hlr-mut); overflow-wrap: anywhere; }
.hlra-opt-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); display: flex; align-items: center; justify-content: center; }
.hlra-opt-ic svg { width: 20px; height: 20px; margin: 0; color: inherit; }
.hlra-grp { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hlr-mut); }
.hlra-grp svg { width: 16px; height: 16px; }
.hlra-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hlra-search { margin-bottom: 0; }
.hlr-banner svg { width: 18px; height: 18px; flex: none; }
.hlr-banner b { font-weight: 700; }
.hlra-total { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--hlr-surface); border: 1px solid var(--hlr-line); }
.hlra-total span { font-size: 13px; color: var(--hlr-mut); }
.hlra-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.hlra-parts { display: grid; gap: 12px; margin: 16px 0 12px; padding: 0; list-style: none; }
.hlra-part { display: grid; grid-template-columns: minmax(0, 1fr) 118px 44px; gap: 8px; align-items: center; }
.hlra-job { appearance: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; text-align: left; border: 1px solid var(--hlr-line); border-radius: 10px; background: var(--hlr-bg); color: var(--hlr-fg); cursor: pointer; min-width: 0; }
.hlra-job b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hlra-job.empty b { color: var(--hlr-mut); font-weight: 500; }
.hlra-job svg { width: 16px; height: 16px; flex: none; color: var(--hlr-mut); }
.hlra-val { position: relative; display: block; }
.hlra-val .hlr-in { text-align: right; font-variant-numeric: tabular-nums; }
.hlra-val i { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--hlr-mut); pointer-events: none; }
.hlra-val.pre i { left: 11px; }
.hlra-val.pre .hlr-in { padding-left: 24px; }
.hlra-val.suf i { right: 11px; }
.hlra-val.suf .hlr-in { padding-right: 26px; }
.hlra-eq { grid-column: 1 / -1; margin: -4px 0 0 4px; font-size: 12px; color: var(--hlr-mut); font-variant-numeric: tabular-nums; }
.hlra-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hlra-sum { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--hlr-warn-bg); color: var(--hlr-warn-fg); }
.hlra-sum.ok { background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlra-sum svg { width: 18px; height: 18px; flex: none; }
.hlra-copy { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0; font-size: 13px; color: var(--hlr-warn-fg); background: var(--hlr-warn-bg); border-radius: 8px; padding: 6px 8px; }
.hlra-copy svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.hlra-tabs { margin-bottom: 14px; }
.hlra-tabs.hlr-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hlra-tabs.hlr-seg button { padding: 0 6px; line-height: 1.2; }
.hlra-body { min-height: 120px; }

/* the card on a Today / Home screen */
.hlra-home { display: block; width: 100%; margin: 0 0 14px; font-family: inherit; }
.hlra-big { appearance: none; width: 100%; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 18px; border: 0; border-radius: 16px; background: var(--hlr-brand); color: var(--hlr-brand-fg); text-align: left; cursor: pointer; box-shadow: 0 6px 18px rgba(23, 97, 63, .28); font: inherit; }
.hlra-big:hover { filter: brightness(1.06); }
.hlra-big > svg { width: 32px; height: 32px; flex: none; }
.hlra-big span { display: block; min-width: 0; }
.hlra-big b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.hlra-big small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; opacity: .95; }
.hlra-links { display: grid; gap: 6px; margin-top: 8px; }
.hlra-links button { appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-bg); color: var(--hlr-fg); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.hlra-links button svg { width: 16px; height: 16px; margin-left: auto; color: var(--hlr-mut); flex: none; }
.hlra-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--hlr-brand); color: var(--hlr-brand-fg); font-size: 13px; font-weight: 700; }
.hlra-links .hlra-badge + svg { margin-left: auto; }
.hlra-links .hlra-badge { margin-left: 2px; }
.hlra-wait { margin: 8px 2px 0; font-size: 13px; color: var(--hlr-mut); }
.hlra-wait[hidden] { display: none; }

@media (max-width: 520px) {
  /* the receipt lists: the amount stays at the right of the row instead of dropping into its own strip */
  .hlra-list .hlr-row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; }
  .hlra-list .hlr-side { grid-column: auto; flex-direction: column; align-items: flex-end; justify-content: flex-start; border-top: 0; padding-top: 0; }
  .hlra-list .hlr-row.pending { grid-template-columns: 56px minmax(0, 1fr); }
  .hlra-list .hlr-head .hlr-actions { grid-template-columns: 1fr; }
  .hlra-part { grid-template-columns: minmax(0, 1fr) 104px 40px; }
  .hlra-bigpick { gap: 8px; }
}

/* the Finances > Receipts to sort screen on the desktop */
.hlra-desk { max-width: 1000px; margin: 0 auto 32px; padding: 6px 0; }
.hlra-desk > div { padding: 22px 24px; border: 1px solid var(--hlr-line); border-radius: 16px; }
@media (max-width: 600px) { .hlra-desk > div { padding: 16px 14px; } }

/* Closed months (public/closed-months.js) and the link under Receipts to sort */
.hlra-closed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hlr-line); }
.hlra-closed span { font-size: 13px; color: var(--hlr-mut); }
.hlrc-intro { margin: 0 0 14px; font-size: 14px; color: var(--hlr-fg); }
.hlrc-top { margin-bottom: 14px; }
.hlrc-ico { width: 64px; height: 64px; border-radius: 10px; background: var(--hlr-surface); border: 1px solid var(--hlr-line); display: flex; align-items: center; justify-content: center; color: var(--hlr-mut); }
.hlrc-ico svg { width: 26px; height: 26px; }
@media (max-width: 520px) { .hlrc-ico { width: 56px; height: 56px; } }

/* Sales tax on purchases (public/purchase-tax.js) */
.hlrt-panel { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-surface); }
.hlrt-h { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hlr-mut); }
.hlrt-line { margin: 0 0 6px; font-size: 15px; color: var(--hlr-fg); }
.hlrt-say { margin: 4px 0 0; font-size: 14px; color: var(--hlr-fg); overflow-wrap: anywhere; }
.hlrt-disc { margin: 12px 0 0; font-size: 12px; color: var(--hlr-mut); }
.hlrt-default { margin: 0 0 12px; font-size: 14px; color: var(--hlr-fg); }
.hlrt-st { font-size: 18px; font-weight: 700; color: var(--hlr-fg); letter-spacing: .02em; }

/* Sales tax report (public/sales-tax-report.js) */
.hlr-sheet.report { max-width: 1040px; }
.hlrs-disc { max-width: 78ch; }
.hlrs-controls { display: grid; grid-template-columns: minmax(0, 260px) 150px 150px minmax(0, 1fr); gap: 10px 14px; align-items: end; margin-bottom: 6px; }
.hlrs-controls .hlr-f { margin: 0; }
.hlr-seg.hlrs-seg3 { grid-template-columns: repeat(3, 1fr); }
.hlrs-basis { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.hlrs-basis .hlr-btn[disabled] { opacity: 1; cursor: default; color: var(--hlr-mut); }
.hlrs-basis .hlr-btn[aria-pressed="true"] { background: var(--hlr-surface); border-color: var(--hlr-brand); color: var(--hlr-fg); }
.hlrs-subtext { margin: 0 0 12px; }
.hlrs-dl { margin: 10px 0 14px; }
.hlrs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.hlrs-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-surface); min-width: 0; }
.hlrs-tile span { font-size: 12px; font-weight: 600; color: var(--hlr-mut); }
.hlrs-tile b { font-size: 20px; font-weight: 700; color: var(--hlr-fg); letter-spacing: -.01em; overflow-wrap: anywhere; }
.hlrs-tile small { font-size: 12px; color: var(--hlr-mut); }
.hlrs-tile.warn { background: var(--hlr-warn-bg); border-color: transparent; }
.hlrs-tile.warn span, .hlrs-tile.warn small, .hlrs-tile.warn b { color: var(--hlr-warn-fg); }
.hlrs-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--hlr-info-bg); color: var(--hlr-info-fg); font-size: 13px; }
.hlrs-sec { margin-top: 8px; }
.hlrs-scroll { overflow-x: auto; border: 1px solid var(--hlr-line); border-radius: 12px; }
.hlrs-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.hlrs-table th, .hlrs-table td { padding: 9px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--hlr-line); color: var(--hlr-fg); }
.hlrs-table thead th { font-size: 12px; font-weight: 700; color: var(--hlr-mut); background: var(--hlr-surface); }
.hlrs-table th:first-child, .hlrs-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--hlr-bg); }
.hlrs-table thead th:first-child { background: var(--hlr-surface); }
.hlrs-table tfoot th, .hlrs-table tfoot td { font-weight: 700; background: var(--hlr-surface); border-bottom: 0; }
.hlrs-table tfoot th:first-child { background: var(--hlr-surface); }
.hlrs-table tbody tr:last-child th, .hlrs-table tbody tr:last-child td { border-bottom: 1px solid var(--hlr-line); }
.hlrs-county th, .hlrs-county td { font-size: 12px; color: var(--hlr-mut); }
.hlrs-county td, .hlrs-county th { border-bottom-style: dashed; }
.hlrs-name, .hlrs-cell { appearance: none; background: none; border: 0; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; font: inherit; color: var(--hlr-fg); cursor: pointer; }
.hlrs-name { font-weight: 650; text-align: left; }
.hlrs-name.sub { font-weight: 500; padding-left: 18px; color: var(--hlr-mut); }
span.hlrs-name { cursor: default; }
.hlrs-cell:hover, .hlrs-name:hover { background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlrs-cell:focus-visible, .hlrs-name:focus-visible, .hlrs-scroll:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }
.hlrs-zero { color: var(--hlr-mut); }
.hlrs-tot { font-weight: 600; }
.hlrs-empty { margin: 4px 0 14px; font-size: 14px; color: var(--hlr-mut); text-align: left !important; white-space: normal !important; }
.hlrs-item { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 860px) { .hlrs-controls { grid-template-columns: 1fr 1fr; } .hlr-seg.hlrs-seg3, .hlrs-basis { grid-column: 1 / -1; } .hlrs-basis { justify-content: flex-start; } .hlrs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hlrs-tiles .hlrs-tile:first-child, .hlrs-tiles .hlrs-tile:last-child:nth-child(even) { grid-column: 1 / -1; } }
@media (max-width: 520px) { .hlrs-dl { display: grid; grid-template-columns: 1fr; } .hlrs-dl .hlr-btn { white-space: normal; } .hlrs-controls { gap: 10px; } }
.hlrs-table .hlrs-cell, .hlrs-table .hlrs-name { background: transparent; box-shadow: none; border: 0; }
.hlrs-table .hlrs-cell:hover, .hlrs-table .hlrs-name:hover { background: var(--hlr-brand-soft); }

/* Add receipt, after the photo: one big Done, details tucked away. */
.hlr-pages.one { grid-template-columns: 1fr; }
.hlr-pages.one .hlr-page { aspect-ratio: auto; height: min(34vh, 260px); }
.hlr-pages.one .hlr-page img { object-fit: contain; background: var(--hlr-surface); }
.hlra-addpage .hlr-btn { width: 100%; }
.hlra-done { width: 100%; min-height: 60px; font-size: 17px; font-weight: 700; border-radius: 14px; white-space: normal; text-align: center; }
.hlra-donehint { margin: 10px 0 18px; font-size: 14px; color: var(--hlr-mut); text-align: center; }
.hlra-more { border: 1px solid var(--hlr-line); border-radius: 14px; background: var(--hlr-bg); margin-bottom: 8px; }
.hlra-more > summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--hlr-fg); border-radius: 14px; }
.hlra-more > summary::-webkit-details-marker { display: none; }
.hlra-more > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--hlr-mut); border-bottom: 2px solid var(--hlr-mut); transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.hlra-more[open] > summary::after { transform: rotate(-135deg); }
.hlra-more > summary:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }
.hlra-more > summary em { font-style: normal; font-weight: 500; color: var(--hlr-mut); margin: 0 auto 0 6px; }
.hlra-more-body { padding: 14px 14px 14px; border-top: 1px solid var(--hlr-line); }
@media (prefers-reduced-motion: reduce) { .hlra-more > summary::after { transition: none; } }

/* The strip at the top of Receipts: what Reina is reading, and what is ready to approve. */
.hlra-strip { appearance: none; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--hlr-line); border-radius: 14px; background: var(--hlr-surface); color: var(--hlr-fg); text-align: left; font: inherit; box-sizing: border-box; }
.hlra-strip b { display: block; font-size: 15px; font-weight: 700; }
.hlra-strip small { display: block; margin-top: 2px; font-size: 13px; color: var(--hlr-mut); }
.hlra-strip > span:not(.hlrr-spin):not(.hlra-badge) { flex: 1; min-width: 0; }
.hlra-strip > svg { width: 20px; height: 20px; flex: none; color: var(--hlr-mut); }
button.hlra-strip { cursor: pointer; min-height: 56px; }
.hlra-strip.ready { background: var(--hlr-brand-soft); border-color: var(--hlr-brand); }
.hlra-strip.ready b, .hlra-strip.ready small { color: var(--hlr-brand-soft-fg); }
button.hlra-strip:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }

/* A split part that goes to a truck / the shelf or overhead shows a small icon before its words. */
.hlra-pic { display: inline-flex; flex: none; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px; background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlra-pic svg { width: 14px; height: 14px; color: inherit; }

/* "Remind me about charges with no receipt": a switch kept on the person (receipts-anywhere.js). */
.hlra-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px; border: 1px solid var(--hlr-line); border-radius: 14px; background: var(--hlr-surface); }
.hlra-switch b { display: block; font-size: 15px; font-weight: 600; color: var(--hlr-fg); }
.hlra-switch small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--hlr-mut); }
.hlra-sw { appearance: none; flex: none; position: relative; width: 52px; height: 32px; border-radius: 999px; border: 0; background: #7b8696; cursor: pointer; transition: background .15s; }
.hlra-sw i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
.hlra-sw[aria-checked="true"] { background: var(--hlr-brand); }
.hlra-sw[aria-checked="true"] i { transform: translateX(20px); }
.hlra-sw:disabled { opacity: .6; cursor: default; }
.hlra-sw:focus-visible { outline: 2px solid var(--hlr-brand); outline-offset: 2px; }

/* Close a month: the checklist of what is still open (public/closed-months.js). It warns; it never blocks. */
.hlr-banner.ok { background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlrc-h { margin: 18px 0 10px; font-size: 15px; font-weight: 700; color: var(--hlr-fg); }
.hlrc-checks { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.hlrc-chk { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-bg); }
.hlrc-chk[data-open="true"] { background: var(--hlr-warn-bg); border-color: transparent; }
.hlrc-chk[data-open="true"] .hlr-name, .hlrc-chk[data-open="true"] .hlr-meta { color: var(--hlr-warn-fg); }
.hlrc-dot { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--hlr-brand-soft); color: var(--hlr-brand-soft-fg); }
.hlrc-dot svg { width: 18px; height: 18px; }
.hlrc-chk[data-open="true"] .hlrc-dot { background: var(--hlr-warn-fg); color: var(--hlr-warn-bg); }
.hlrc-sample { grid-column: 1 / -1; display: grid; gap: 6px; margin: 10px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px solid rgba(0, 0, 0, .12); }
.hlrc-sample li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--hlr-warn-fg); overflow-wrap: anywhere; }
.hlrc-sample small { display: block; font-size: 12px; opacity: .85; }
.hlrc-sample b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hlrc-sample li.more { font-size: 13px; opacity: .85; }
@media (max-width: 520px) { .hlrc-chk { grid-template-columns: 32px minmax(0, 1fr); } .hlrc-chk > .hlr-btn { grid-column: 2; justify-self: start; } }

/* ---- a receipt's name opens its own screen */
.hlr-open { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.hlr-open:hover { text-decoration: underline; }
.hlr-open:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; border-radius: 4px; }
.hlr-row[data-r] { cursor: pointer; }

/* ---- "Review receipts waiting" inside Add receipt (desktop): the way from adding one to finishing the pile */
.hlra-review { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--hlr-line); border-radius: 12px; background: var(--hlr-surface); color: var(--hlr-fg); text-align: left; cursor: pointer; }
.hlra-review:hover { border-color: var(--hlr-brand); }
.hlra-review:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }
.hlra-review > svg:first-child { width: 22px; height: 22px; flex: none; color: var(--hlr-brand); }
.hlra-review > svg:last-child { width: 18px; height: 18px; flex: none; margin-left: auto; color: var(--hlr-mut); }
.hlra-review span { display: grid; gap: 1px; min-width: 0; }
.hlra-review b { font-size: 15px; font-weight: 700; }
.hlra-review small { font-size: 13px; color: var(--hlr-mut); }

/* ---- "Waiting on you" preview inside Add receipt (desktop): the newest receipts the team added, so the count is something you can see */
.hlra-wait { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hlr-line); }
.hlra-wait-h { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hlr-mut); }
.hlra-wait-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hlra-wait-row { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border: 1px solid var(--hlr-line); border-radius: 10px; background: var(--hlr-bg); color: var(--hlr-fg); font: inherit; text-align: left; cursor: pointer; }
.hlra-wait-row:hover { background: var(--hlr-surface); }
.hlra-wait-row:focus-visible { outline: 3px solid var(--hlr-brand); outline-offset: 2px; }
.hlra-wait-main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.hlra-wait-main b { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.hlra-wait-main small { font-size: 13px; color: var(--hlr-mut); overflow-wrap: anywhere; }
.hlra-wait-st { flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--hlr-warn-bg); color: var(--hlr-warn-fg); }
.hlra-wait-more { margin: 8px 2px 0; font-size: 13px; color: var(--hlr-mut); }
.hlra-wait .hlra-review { margin-top: 10px; }
.hlr-toast .hlr-toast-act { margin-left: 14px; min-height: 32px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.hlr-toast .hlr-toast-act:hover { background: rgba(255, 255, 255, .14); }

/* ---- returns: a credit, never mistaken for a purchase ---- */
.hlr-chip.ret { background: var(--hlr-info-fg); color: var(--hlr-bg); border-color: transparent; font-weight: 700; letter-spacing: .01em; }
.hlr-amt.credit { color: var(--hlr-brand-soft-fg); }
