/* Task Helper — the project navigator (job-intake.md §29 N1–N3; BRIEF-935). Copyright Rapid Surveys Pty Ltd. App tokens only.
   The same KIND of panel as the task panel (its header + button styles: .panel-head / .panel-x), on the LEFT. */
.nv-panel { position: fixed; z-index: 44;   /* under the top bar (45): its menus drop over the navigator */
   display: flex; flex-direction: column; background: var(--card); color: var(--ink); }
.nv-panel[hidden], .nv-strip[hidden] { display: none !important; }
.nv-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 8px 16px; }
@media (min-width: 768px) {
  /* the tree's width = --nvw (set by its grip when the person chose one — public/shared/edge-resize.js; else 300) */
  .nv-panel { top: var(--th-top, calc(56px + env(safe-area-inset-top))); left: 0;   /* --th-top: the top bar's measured bottom (shared/bars) — below the notice strip too */
    bottom: 0; width: var(--nvw, 300px); border-right: 1px solid var(--line); box-shadow: 8px 0 24px rgba(20,28,40,.08); }
  body.nv-open { padding-left: var(--nvw, 300px); }
  body.nv-open #overviewSheet.mapview { left: var(--nvw, 300px); }
  body.nv-folded { padding-left: 48px; }
  body.nv-folded #overviewSheet.mapview { left: 48px; }
}
/* phone: a full page above everything but the top safe area */
.nv-panel.nv-page { inset: 0; z-index: 60; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); width: auto; border: 0; box-shadow: none; }
/* folded: a thin strip on the left with one button to bring it back */
.nv-strip { position: fixed; z-index: 44; top: var(--th-top, calc(56px + env(safe-area-inset-top))); left: 0; bottom: 0; width: 48px; background: var(--card); border-right: 1px solid var(--line); }
.nv-unfold { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 48px; min-height: 96px; margin: 0; padding: 12px 0; background: none; border: 0; border-radius: 0; color: var(--ink); font-size: 12px; font-weight: 600; }
.nv-unfold span { writing-mode: vertical-rl; transform: rotate(180deg); }
.nv-unfold:hover { background: var(--hover); }
/* the tree */
.nv-tree { list-style: none; margin: 0; padding: 0; }
.nv-row { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 0 2px; padding: 0 8px 0 calc(4px + var(--lv, 0) * 16px); border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 14px; }
.nv-row:hover { background: var(--hover); }
.nv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nv-row.nv-sel { background: #e8eefc; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }   /* chosen: a bar + bold, not colour alone */
.nv-row svg { flex: none; color: var(--muted); }
.nv-tog { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 36px; color: var(--muted); }
.nv-tog.nv-leaf { visibility: hidden; }
.nv-chev { transition: transform .15s ease; }
.nv-row[aria-expanded="true"] .nv-chev { transform: rotate(90deg); }
.nv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 4px 0; }
.nv-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-row.nv-quiet .nv-name { color: var(--accent); font-weight: 600; }   /* BRIEF-1269 R6: "N quiet lists — show" */
.nv-n { flex: none; min-width: 24px; padding: 1px 7px; border-radius: 10px; background: var(--hover); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
/* the phone page: projects on top */
.nv-h { margin: 12px 8px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .nv-chev { transition: none; } }
/* managing the tree (§30 T-2) */
.nv-ret { margin: 0; font-size: 13px; color: var(--muted); }
.nv-msg { margin: 0 8px 8px; }
.nv-more { flex: none; width: 36px; height: 36px; margin: 0 -4px 0 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: var(--muted); }
.nv-more:hover { background: rgba(20,28,40,.06); color: var(--ink); }
.nv-row .nv-more { opacity: .55; } .nv-row:hover .nv-more, .nv-row:focus-within .nv-more, .nv-row:focus .nv-more { opacity: 1; }
.nv-retired .nv-name { color: var(--muted); text-decoration: line-through; }
.nv-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.nv-edit { cursor: default; gap: 6px; padding-right: 4px; }
.nv-edit input { flex: 1; min-width: 0; margin: 0; padding: 6px 8px; font-size: 14px; }
.nv-edit button { flex: none; width: auto; min-height: 36px; padding: 0 10px; font-size: 13px; }
.nv-drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--hover); }
.nv-drop-before, .nv-drop-after { position: relative; }
.nv-drop-before::after, .nv-drop-after::after { content: ''; position: absolute; left: 8px; right: 8px; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.nv-drop-before::after { top: -2px; }
.nv-drop-after::after { bottom: -2px; }
.nv-menu { position: fixed; z-index: 62; min-width: 200px; }
.nv-menu[hidden] { display: none; }
.nv-movelist { list-style: none; margin: 8px 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.nv-moveto { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0 0 2px; padding: 0 12px; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; }
.nv-moveto:hover { background: var(--hover); }
@media (pointer: coarse) { .nv-more { width: 44px; height: 44px; } .nv-edit button { min-height: 44px; } }
/* connections to the link (§30 T-3) */
.nv-moveto:disabled { color: var(--muted); background: var(--bg); }
.nv-replist { list-style: none; margin: 8px 0; padding: 0; }
.nv-replist li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.nv-replist li:first-child { border-top: 0; }
/* the heading row (BRIEF-950 P2): Jobs · [+] · [•••] · [‹] / [✕] — fits 360 */
.nv-head { gap: 2px; }
.nv-hbtn[hidden] { display: none; }
.nv-f { display: block; margin: 0 0 4px; font-size: 13px; color: var(--muted); }
#navJobName { width: 100%; margin: 0; }
.sc-proj { font-weight: 600; }
.sc-crumbs li .sc-proj { max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
/* the navigator's own sheet (New job · Move to… · Connect… · Bring in) sits ABOVE its phone page (60) */
#navMove { z-index: 63; }
/* New job · Start from (BRIEF-949) */
.nv-from { margin-top: 12px; }
#navJobFrom, #navJobWf { width: 100%; margin: 0; }
#navJobWfRow { margin-top: 12px; }   /* FOLDWF: the New folder sheet's Workflow choice */
#navJobWfRow .hint { margin: 6px 0 0; }
.nv-fromhint { margin: 6px 0 0; }
@media (pointer: coarse) { #navJobFrom, #navJobWf, #navJobName { min-height: 44px; } }
/* §35 part-shared: the path to what's shared with you — greyed, not a choice */
.nv-row.nv-path { color: var(--muted); cursor: default; }
.nv-row.nv-path:hover { background: none; }
.nv-row.nv-path .nv-name { font-weight: 500; }
/* ── TREE1 (job-intake "TOP BAR + TREE = COMPANY → PROJECTS"): every project of the company on top; no "Jobs + ···" heading row ── */
.nv-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nv-panel.nv-desk > .nv-head { display: contents; }   /* a computer: no heading row — the title stays for screen readers, the fold sits on the edge */
.nv-panel.nv-desk > .nv-head > .nv-close { display: none; }
.nv-title { min-width: 0; flex: 1 1 auto; margin: 0; }
.nv-coname { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-cobtn { flex: 1 1 auto; min-width: 0; width: auto; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 8px;
  background: none; border: 0; border-radius: 8px; color: var(--ink); font-size: 17px; font-weight: 700; text-align: left; }
.nv-cobtn[hidden] { display: none; }
.nv-cobtn:hover { background: var(--hover); }
.nv-caret { flex: none; opacity: .7; }
/* the fold: a small arrow on the panel's edge (a computer only) */
.nv-fold { position: absolute; top: 10px; right: -13px; z-index: 3;   /* above the width grip on the same edge */
   width: 26px; height: 36px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px; color: var(--muted); box-shadow: 0 1px 4px rgba(20,28,40,.12); }
.nv-fold:hover, .nv-fold:focus-visible { color: var(--ink); background: var(--hover); }
.nv-fold[hidden] { display: none; }
.nv-panel.nv-desk .nv-body { padding-top: 10px; }
/* project rows: the current one open (a down chevron), the others one line each */
.nv-tog.nv-open .nv-chev { transform: rotate(90deg); }
.nv-row.nv-prow { color: var(--ink); }
.nv-row.nv-prow .nv-name { font-weight: 500; }
.nv-row[aria-level="1"]:not(.nv-prow) .nv-name { font-weight: 700; }
.nv-pbtn { flex: none; width: 28px; height: 32px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; color: var(--muted); }
.nv-pbtn:hover, .nv-pbtn:focus-visible { background: rgba(20,28,40,.08); color: var(--ink); }
.nv-pmore { margin-right: -4px; }
.nv-prow .nv-pbtn { opacity: .55; } .nv-prow:hover .nv-pbtn, .nv-prow:focus-within .nv-pbtn, .nv-prow:focus .nv-pbtn { opacity: 1; }
/* an empty project: an indented "+ Add your first job" + one line */
.nv-empty { list-style: none; margin: 2px 0 10px; padding: 0 8px 0 calc(4px + 28px + 6px); }
.nv-first { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 40px; margin: 0; padding: 0 14px 0 10px; font-size: 14px; font-weight: 600; }
.nv-first svg { color: currentColor; }
.nv-emptyt { margin: 6px 0 0; font-size: 14px; color: var(--ink); }
.nv-emptyh { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
@media (pointer: coarse), (max-width: 767px) { .nv-pbtn { width: 44px; height: 44px; } .nv-first { min-height: 44px; } .nv-prow .nv-pbtn { opacity: 1; } }

/* PJ1: project names — a touch bigger, coloured; a LIMITED project (shared in part / Viewer-type level) in its own colour + the word "Limited".
   Contrast: --nv-proj on the card >= 7:1, --nv-ltd >= 7:1; both re-set for a dark card. */
:root { --nv-proj: #1d4ab8; --nv-ltd: #7a4a0c; }
@media (prefers-color-scheme: dark) { :root { --nv-proj: #9db8ff; --nv-ltd: #f0c27a; } }
.nv-row .nv-pname { font-size: 15.5px; font-weight: 700; color: var(--nv-proj); }
.nv-row .nv-pname.nv-pltd { color: var(--nv-ltd); font-weight: 600; }
.nv-row.nv-prow .nv-pname { font-weight: 600; } .nv-row.nv-prow .nv-pname.nv-pltd { font-weight: 600; }
.nv-ltd { align-self: flex-start; margin-top: 1px; padding: 0 6px; border: 1px solid currentColor; border-radius: 9px; font-size: 11px; font-weight: 600; line-height: 16px; color: var(--nv-ltd); white-space: nowrap; }
/* UNREAD on the tree: the red number (the bell's look, .cu-badge in comms-unread.css) beside a row's task count; a tap clears */
.nv-row .nv-unread { flex: none; width: auto; margin: 0 0 0 4px; padding: 0 6px; border: 0; cursor: pointer; min-height: 24px; min-width: 24px; line-height: 24px; border-radius: 12px; font-size: 12px; }
.nv-row .nv-unread-ro { cursor: default; display: inline-block; }   /* TREEPILL: a folded project row's number — shown, not a button */

/* OWNPROJ: the quiet "Create your own project" line under the tree (shared-only people) */
.nv-own { margin: 6px 8px 12px; padding: 8px 4px 0; border-top: 1px solid var(--line, rgba(128,128,128,.25)); }
.nv-ownbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px; background: transparent; border: 0; color: var(--accent, inherit); font-size: 14px; font-weight: 600; cursor: pointer; }
.nv-ownbtn:hover { text-decoration: underline; }
.nv-ownh { margin: 0 8px 4px 8px; font-size: 12px; opacity: .75; }
.nv-ownno { margin: 0 4px; padding: 4px 4px; background: transparent; border: 0; font-size: 12px; opacity: .7; text-decoration: underline; cursor: pointer; color: inherit; }
@media (pointer: coarse), (max-width: 767px) { .nv-ownbtn { min-height: 44px; } .nv-ownno { min-height: 36px; } }

/* TREESLIM: ⋯ → Info — the lines a tree row used to carry */
.nv-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.nv-info:first-child { border-top: 0; }
.nv-infok { flex: none; width: 92px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.nv-infov { flex: 1; min-width: 120px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.nv-info .nv-infobtn { width: auto; min-height: 36px; margin: 0; padding: 0 12px; font-size: 13px; }
.nv-tag.nv-on { color: #1d6b33; }

/* PHONEPROJ (Gary 2026-11-08): account headings on the phone's projects page + the open project marked */
.nv-cohead { margin: 14px 0 2px; padding: 6px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); list-style: none; }
.nv-cohead:first-child { margin-top: 4px; }
.nv-row.nv-curproj { box-shadow: inset 4px 0 0 var(--nv-proj, #1d4ed8); }

/* PROJLIST (Gary 2026-11-08): "+ Add new project" at the very bottom of the list */
.nv-add { margin: 8px 0 4px; }
.nv-addbtn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; background: transparent; border: 1px dashed var(--line); border-radius: 8px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.nv-addbtn:hover, .nv-addbtn:focus-visible { background: var(--hover); }
.nv-addbtn svg { width: 16px; height: 16px; flex: none; }
