:root {
  --bg: #f5f6f4; --panel: #fff; --ink: #0f1a14; --muted: #45524a; --line: #d9dfd8;
  --brand: #2f7d4f; --brand-ink: #fff; --nav: #16271e; --sun: #f5a623; --warn: #b54708; --bad: #b42318; --chip: #eef3ef;
  --radius: 10px;
  /* Buttons are light green, never white (Rick, Oct 26) */ --btn-bg: #e3f0e7; --btn-line: #b9d5c2; --btn-hover: #d2e6d8; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 40; }
/* Layers (Rick, Oct 23: the profile menu was hidden behind the project tabs): the top bar and its menus (avatar, Financials,
   Dialpad, Tasks) sit above every sticky bar on a page (tabs, toolbars, section chips: all below 40) and below pop-up windows
   (.modal 45 and up). test/layers.test.mjs checks it. */
.brand { color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sun { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px rgba(245,166,35,.25); }
.top nav { display: flex; gap: 4px; }
.top nav a { color: #cfe0d5; padding: 6px 10px; border-radius: 6px; }
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.me { margin-left: auto; color: #cfe0d5; font-size: 13px; }
main { padding: 20px; max-width: 1500px; margin: 0 auto; }
.pad { padding: 20px; }
.muted { color: var(--muted); }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=url], input[type=email], input[type=tel], select, textarea {
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #fff; width: 100%; }
textarea { min-height: 64px; resize: vertical; }
button, .btn { border: 1px solid var(--btn-line); background: var(--btn-bg); padding: 7px 12px; border-radius: 7px; cursor: pointer; }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button:disabled { opacity: .5; cursor: default; }
/* "It's working" (Rick, Nov 11; public/lib.js working()): the clicked button spins and is locked; a bar and a "Working…" pill at the top. */
button.is-busy, .btn.is-busy { position: relative; opacity: .85; cursor: progress; padding-right: 30px; }
button.is-busy::after, .btn.is-busy::after { content: ''; position: absolute; right: 9px; top: 50%; width: 12px; height: 12px; margin-top: -7px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busyspin .7s linear infinite; }
@keyframes busyspin { to { transform: rotate(360deg); } }
/* Plan set card: "Fixing the plan set…" (public/planset.js planSetCard); long notes cut to two lines (all of it on hover). */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pvspin { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busyspin .7s linear infinite; }
#busybar { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; pointer-events: none; }
#busybar .busybar-line { display: block; height: 3px; background: linear-gradient(90deg, transparent, var(--brand), var(--sun), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: busyslide 1.1s ease-in-out infinite; }
#busybar .busybar-pill { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--nav); color: #fff; font-size: 13px; padding: 5px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.2); white-space: nowrap; }
@keyframes busyslide { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { button.is-busy::after, .btn.is-busy::after, #busybar .busybar-line { animation: none; } }
/* Nothing to do (docs/ui-standards.md §9): grey, not a faded green, so it never looks clickable. */
button.btn-done, button.btn-done:disabled, button.primary:disabled { background: #eef0ee; border-color: #d6dad6; color: #59615b; opacity: 1; cursor: default; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--chip); font-size: 12px; white-space: nowrap; }
.chip.warn { background: #fff4e5; color: var(--warn); }
tr.warnrow td { background: #fff4e5; }   /* a row to look at (contract map "other", an empty contract value) */
.chip.bad { background: #fde7e5; color: var(--bad); }
/* Monitoring: one card per brand (Rick, Nov 11); click to show only that brand. */
.monbrands { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.monbrand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 10px; margin: 0; }
.monbrand.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.monbrand.err { border-color: #f0b4ad; }
.monbrand .bad { color: var(--bad); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ═══════════════ UI STANDARDS (Rick, Oct 8) — read docs/ui-standards.md ═══════════════
   Every page uses these shared pieces; no page-specific look-alikes.
   • Page title row: <div class="row pagehead"><h1>Title</h1>…buttons…</div>
   • Filter chips / section pickers: <div class="chips"><span class="chiplabel">View:</span><button class="on">All <span>65</span></button>…</div>
       .on = selected (dark filled) · <span> inside = count / status badge · .amberchip = needs a look · .warnchip = action needed now
       (.stages is the same component, used by the Pipeline toolbar.)
   • Content: <div class="panel section"> (the standard white card) */
.pagehead { gap: 8px; margin: 0 0 10px; } .pagehead h1 { margin: 0; }
:is(.chips, .stages) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stages { margin: 12px 0; } .chips { margin: 8px 0; }
:is(.chips, .stages) > button:not(.linkbtn), :is(.chips, .stages) > a.btn { border-radius: 99px; padding: 5px 12px; margin: 0; color: inherit; text-decoration: none; }
:is(.chips, .stages) > :is(button, a.btn).on { background: var(--ink); color: #fff; border-color: var(--ink); }
:is(.chips, .stages) > :is(button, a.btn) > span, .stages .n { opacity: .7; font-weight: 400; margin-left: 2px; }
:is(.chips, .stages) > :is(button, a.btn).warnchip:not(.on) { border-color: #f0b4ad; color: var(--bad); }
:is(.chips, .stages) > :is(button, a.btn).warnchip.on > span { opacity: 1; font-weight: 700; color: #ffd0ca; }
/* .amberchip = needs a look (amber, same colours as .chip.warn); .warnchip = action needed now (red). */
:is(.chips, .stages) > :is(button, a.btn).amberchip:not(.on) { border-color: #f2c25c; background: #fff8e6; color: var(--warn); }
:is(.chips, .stages) > :is(button, a.btn).amberchip.on > span { opacity: 1; font-weight: 700; color: #ffd68a; }
:is(.chips, .stages) > :is(button, a.btn).warnchip:not(.on) { background: #fdeceb; font-weight: 600; }
.chiplabel { color: var(--muted); font-size: 12px; margin-right: 2px; white-space: nowrap; }
/* .chips-green = the same chips in green, for the project page's right column only (Paul, Oct 10; docs/ui-standards.md §2).
   Count in a yellow bubble (span.cnt; Rick, Oct 10), red when Open tasks has overdue ones; .on = dark green; .flagged + span.redcnt = red count for notes edited by someone other than the creator.
   .chips-sm = the smaller size used by the Notes filter rows. */
.chips.chips-green > button:not(.linkbtn) { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid #2f7d4f; background: #e3f3e7; color: #1f5a38;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.3; padding: 7px 14px; border-radius: 999px; white-space: nowrap; box-shadow: none; }
.chips.chips-green > button:not(.linkbtn):hover { background: #d2ebd9; }
.chips.chips-green > button.on, .chips.chips-green > button.on:hover { background: #2f7d4f; color: #fff; border-color: #2f7d4f; }
.chips.chips-green > button.flagged { border-color: #c62828; }
.chips.chips-green > button > span { display: inline-block; min-width: 20px; margin: 0; padding: 0 6px; border-radius: 999px; background: #fff; color: #1f5a38; border: 1px solid #b9dcc4;
  font-size: 12px; font-weight: 700; line-height: 19px; text-align: center; opacity: 1; }
.chips.chips-green > button.on > span { border-color: #fff; }
.chips.chips-green > button > span.cnt { background: #ffd34d; color: #4a3500; border-color: #e0a800; font-weight: 700; }   /* yellow count bubble (Rick, Oct 10) */
.chips.chips-green > button > span.redcnt { background: #d32f2f; color: #fff; border-color: #d32f2f; }
.chips.chips-green > button > i.redamp { display: inline-grid; place-items: center; width: 22px; height: 22px; margin: -3px 0; border-radius: 50%; background: #d32f2f; color: #fff; font-style: normal; font-weight: 700; }   /* Notes & messages: red notes not yet read */
.chips.chips-green.chips-sm { gap: 5px; }
.chips.chips-green.chips-sm > button:not(.linkbtn) { font-size: 12.5px; padding: 3px 8px; gap: 4px; }
.chips.chips-green.chips-sm > button > span { min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 16px; }
/* Copy a dropdown's chosen value (public/selectcopy.js): the small ⧉ that appears on a dropdown under the mouse. */
.selcopy { position: fixed; z-index: 60; width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); font-size: 12px; line-height: 16px; text-align: center; cursor: copy; opacity: .9; }
.selcopy:hover { color: var(--ink); border-color: var(--brand); opacity: 1; }
/* Linked values (public/linkvalues.js): the value is plain text; the link is the small icon; ⧉ copies on hover. */
.lv { display: inline; } .lv .lvi, .lv .lvc { margin-left: 3px; }
.lv .lvt { user-select: text; -webkit-user-select: text; cursor: text; overflow-wrap: anywhere; }
.lv .lvi, .lv .lvc { user-select: none; -webkit-user-select: none; text-decoration: none; font-size: .85em; line-height: 1; }
.lv .lvi { padding: 0 2px; border-radius: 4px; } .lv .lvi:hover { background: #eef5f0; text-decoration: none; }
.lv .lvc { display: none; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 4px; padding: 0 3px; cursor: copy; }
.lv:hover .lvc, .lv:focus-within .lvc { display: inline; } .lv .lvc:hover { color: var(--ink); border-color: var(--brand); }
@media (hover: none) { .lv .lvc { display: none; } .lv .lvi { font-size: 1em; padding: 0 4px; } }
/* Formatting box (public/noteeditor.js): the standard chips as a toolbar, then the editable box. */
.rte { display: grid; gap: 4px; }
.rte .rtebar { margin: 0; gap: 4px; } .rte .rtebar > button { padding: 2px 9px; min-width: 32px; font-size: 13px; }
.rtein { min-height: 80px; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #fff; font: inherit; line-height: 1.45; outline: none; }
.rtein:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(47,125,79,.15); }
.rtein:empty::before { content: attr(data-ph); color: #8a958e; }
.rtein p, .ntext p, .ip-msg p { margin: 0 0 4px; } .rtein ul, .rtein ol, .ntext ul, .ntext ol, .ip-msg ul, .ip-msg ol, .feed ul, .feed ol { margin: 2px 0 4px; padding-left: 22px; }
@media (max-width: 560px) { .rte .rtebar > button { padding: 5px 11px; font-size: 14px; } }
/* ═══════════════ end of UI standards ═══════════════ */
/* Contractor insurance (COI) note under the installer button (public/coi.js). */
.coinote { flex-basis: 100%; font-size: 13px; padding: 5px 9px; border-radius: 8px; margin-top: 4px; background: #fff8e6; border: 1px solid #f2c25c; color: #6b4a00; }
.coinote.ok { background: #eef8ee; border-color: #b9dcb9; color: #1d5a1d; }
.coinote.red { background: #fdeceb; border-color: #f0b4ad; color: #8b1d12; } .coinote .chip { margin-right: 4px; }
.ctrrow { flex-wrap: wrap; } .coibox summary { cursor: pointer; }

/* pipeline */
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbf9; }
table.list tr:hover td { background: #f8faf8; }
table.list td.alert { max-width: 380px; color: var(--muted); font-size: 12px; white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.scope { display: flex; gap: 3px; }
.scope span { font-size: 11px; padding: 1px 5px; border-radius: 4px; background: #e8f0ff; color: #1d4ed8; }

/* project */
.phead { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.stagebar { display: flex; gap: 2px; margin: 10px 0 14px; }
.stagebar div { flex: 1; text-align: center; font-size: 11px; padding: 6px 2px; background: #e6ebe7; color: var(--muted); }
.stagebar div:first-child { border-radius: 6px 0 0 6px; } .stagebar div:last-child { border-radius: 0 6px 6px 0; }
.stagebar div.done { background: #cfe5d7; color: var(--ink); }
.stagebar div.now { background: var(--brand); color: #fff; font-weight: 600; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .pgrid { grid-template-columns: minmax(0, 1fr); } }
.section { margin-bottom: 14px; }
.section h2 { display: flex; align-items: center; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #3a4740; }
.fields label.wide { grid-column: 1 / -1; }
#cpform .fields > .wide { grid-column: 1 / -1; }
.fields label.dirty input, .fields label.dirty select, .fields label.dirty textarea { border-color: var(--sun); background: #fffbf2; }
.savebar button:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.savebar { position: sticky; bottom: 0; background: #16271e; color: #fff; padding: 10px 16px; border-radius: var(--radius); display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.side .panel { margin-bottom: 14px; }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.tlist li:last-child { border-bottom: 0; }
.tlist .sub { font-size: 12px; color: var(--muted); }
.tlist li.done .subj { text-decoration: line-through; color: var(--muted); }
.feed { max-height: 420px; overflow: auto; }
.feed .item { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed .when { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #16271e; color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; z-index: 90; }   /* above an open dialog, or its messages can't be seen */
#toast.show { opacity: 1; }
.log { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #0f1a14; color: #d6e8dc; padding: 12px; border-radius: 8px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.kpi b { display: block; font-size: 20px; }

/* v2: service, files, portal, admin tools */
.chip.ok { background: #e3f4e8; color: #1f6b3a; }
tr.click { cursor: pointer; }
.btn { display: inline-block; color: var(--ink); }
.btn:hover, :where(button:not(:disabled):not(.primary):not(.on)):hover { text-decoration: none; background: var(--btn-hover); }
a.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.modal { position: fixed; inset: 0; background: rgba(15, 26, 20, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 45; overflow: auto; }
.modal-box { width: min(860px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.drop { border: 2px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); margin: 10px 0; font-size: 13px; }
.drop.on { border-color: var(--brand); background: #f1f8f3; color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.checks label, label.inline { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; color: var(--ink) !important; font-size: 13px !important; }
.emailbody { white-space: normal; font-size: 13px; line-height: 1.5; max-height: 60vh; overflow: auto; border-top: 1px solid var(--line); padding-top: 10px; }
table.intake td { padding: 5px 10px; font-size: 13px; }

.fields .flabel { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* v3: email, installer & homeowner portals */
.edtools { display: flex; gap: 4px; margin-bottom: 4px; }
.edtools button { padding: 3px 8px; font-size: 12px; }
.editor { border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; min-height: 180px; max-height: 50vh; overflow: auto; background: #fff; font-size: 14px; line-height: 1.5; }
.editor:focus { outline: 2px solid #cfe5d7; }
.attlist { max-height: 200px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
td.shares { white-space: nowrap; } td.shares label { display: inline-flex !important; margin-right: 8px; font-size: 12px !important; }
.feed .item.vis-client { background: #f1f8f3; padding-left: 8px; border-left: 3px solid var(--brand); }
.feed .item.vis-installer { background: #f2f5ff; padding-left: 8px; border-left: 3px solid #4a6fe3; }
.trade { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.client .hero .status { font-size: 22px; font-weight: 700; color: var(--brand); margin-top: 4px; }
.panel.click { cursor: pointer; }
details summary { cursor: pointer; }

/* v4: collapsible project sections, hide empty fields, stronger text */
details.psec > summary { list-style: none; cursor: pointer; }
details.psec > summary::-webkit-details-marker { display: none; }
details.psec > summary h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
details.psec > summary h2::before { content: '▸'; font-size: 14px; color: var(--muted); transition: transform .15s; display: inline-block; }
details.psec[open] > summary h2::before { transform: rotate(90deg); }
details.psec[open] > summary { margin-bottom: 12px; }
details.psec .count { font-size: 12px; font-weight: 500; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--brand); padding: 8px 0 0; font-weight: 600; }
.secbar { margin-bottom: 10px; }
input, select, textarea { color: var(--ink) !important; font-weight: 500; }
table.list th { color: #3a4740; }
.muted { color: var(--muted); }

/* v5: auto-save */
.savestatus { position: fixed; right: 20px; bottom: 20px; background: #16271e; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 14px; z-index: 10; }
.savestatus.bad { background: var(--bad); }
.fields label.saving input, .fields label.saving select, .fields label.saving textarea { border-color: var(--sun); }
.fields label.saved input, .fields label.saved select, .fields label.saved textarea { border-color: var(--brand); background: #f1f8f3; transition: background .6s; }
.fields label.savefail input, .fields label.savefail select, .fields label.savefail textarea { border-color: var(--bad); background: #fff5f4; }

/* Notes: bordered cards, category filter */
.notesfeed { max-height: 560px; }
.notesfeed .note { border: 1px solid #b9c4bd; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fff; font-size: 14px; }
.notesfeed .note.vis-client { border-left: 4px solid var(--brand); background: #f1f8f3; }
.notesfeed .note.vis-installer { border-left: 4px solid #4a6fe3; background: #f2f5ff; }
.notesfeed .note.cat-engineering { border-left: 4px solid #8a5cd6; }
.notesfeed .note.cat-permitting { border-left: 4px solid #2f6f9f; }
.notesfeed .note.cat-utility { border-left: 4px solid #c58b00; }
.notesfeed .note.cat-old_alert { border-left: 4px solid var(--warn); background: #fffaf2; }
.notesfeed .nhead { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 5px; margin-bottom: 6px; }
.notesfeed .nhead .when { font-size: 12px; color: var(--muted); }
.notesfeed .nhead select { width: auto; font-size: 12px; padding: 2px 4px; }
.notesfeed .notedel { font-size: 12px; padding: 2px 8px; color: var(--bad); border-color: #f0c4bf; background: #fff; }
.notesfeed .notedel:hover { background: #fde7e5; }
.muted.small { font-size: 12px; }
.notesfeed .ninit { color: var(--ink); margin-right: 4px; white-space: nowrap; }
.notesubj { width: 100%; margin-bottom: 6px; font-weight: 600; }
.notesfeed .nsubj { font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 3px; }

/* Sub stage / stage pickers on the toolbar row */
.secbar { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.stagepick { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700; color: #3a4740; }
.stagepick .muted { font-weight: 400; font-size: 12px; }
.stagepick #substage { min-width: 320px; }
.stagepick #stage { min-width: 170px; }
.stagepick select.alarmsel { border: 2px solid var(--bad); color: var(--bad); font-weight: 700; }
/* Big red banner for Job in Jeopardy / On Hold / Cancelled */
.alarm { border: 3px solid var(--bad); background: #fdecea; border-radius: 10px; padding: 12px 22px; text-align: center; min-width: 320px; align-self: center; }
.alarm-name { color: var(--bad); font-size: 34px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; line-height: 1.1; }
.alarm-why { color: var(--bad); font-size: 14px; font-weight: 600; margin-top: 4px; }
/* Logo */
.brand img.logo { height: 40px; display: block; background: #fff; border-radius: 6px; padding: 3px 6px; }
.linkbtn.inline { padding: 0; margin-left: 14px; font-size: 14px; }

/* Adders + Products */
table.adders input, table.products input[type=text], table.products input[type=number], table.products select { width: 100%; padding: 4px 6px; }
.addadder { gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.addadder select { width: auto; min-width: 320px; }
.addprod { gap: 8px; flex-wrap: wrap; }
.addprod #npname { flex: 1; min-width: 220px; }
.addprod #npprice { width: 120px; }
.addprod select { width: auto; }
table.products tr.inactive td { opacity: .6; }
table.adders td, table.products td { padding-top: 3px; padding-bottom: 3px; vertical-align: middle; }
table.adders .notedel { padding: 2px 8px; }
/* Adders in the side column */
#adders .alist { margin-top: 8px; }
#adders .aitem { border: 1px solid #c9d3cc; border-radius: 6px; padding: 5px 8px; margin-bottom: 5px; }
#adders .aname { font-weight: 600; font-size: 14px; }
#adders .aedit { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
#adders .aedit input { width: 100px; padding: 3px 6px; font-size: 13px; }
#adders .notedel { font-size: 12px; padding: 1px 7px; margin-left: 6px; }
#adders .addadder { display: flex; gap: 6px; margin: 6px 0 4px; }
#adders .addadder select { flex: 1; min-width: 0; }
/* AHJ / HOA info card and directory */
.dircard { grid-column: 1 / -1; border: 1px solid #c9d3cc; background: #f7faf8; border-radius: 8px; padding: 8px 12px; margin-top: -4px; font-size: 14px; }
.dircard.empty { background: none; border: 0; padding: 0; margin-top: -6px; }
.dircard.dirpop { background: none; border: 0; padding: 0; margin-top: 4px; }   /* the Interconnection packet: a button that opens the card in a pop-up */
.dirpopbox { margin: 0; }
.dircard dl { display: grid; grid-template-columns: 130px 1fr; gap: 3px 10px; margin: 6px 0 0; }
.dircard dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.dircard dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dircard, .dircard .dirnotes { min-width: 0; overflow-wrap: anywhere; }
.dircard .dirnotes { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); white-space: normal; }
.dircard .pw { margin-left: 8px; font-family: monospace; font-weight: 700; }
.dirform { grid-template-columns: 1fr 1fr; min-width: min(640px, 90vw); }
.dirtable tr.clickrow { cursor: pointer; }
.dirtable tr.clickrow:hover td { background: #f1f8f3; }
.tabs a.btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pwrow { display: flex; gap: 6px; } .pwrow input { flex: 1; min-width: 0; } .pwrow button { padding: 4px 10px; }
#livebar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; background: #12261a; color: #fff; border-radius: 10px; padding: 10px 14px; display: flex; gap: 14px; align-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 600; max-width: calc(100vw - 32px); }

/* ───────── Phone layout ───────── */
.menubtn { display: none; }
@media (max-width: 760px) {
  main { padding: 12px; }
  .top { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .menubtn { display: block; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 22px; line-height: 1; padding: 6px 10px; border-radius: 8px; order: 2; margin-left: auto; }
  .brand { order: 1; } .brand img.logo { height: 34px; }
  .top nav { display: none; order: 3; width: 100%; flex-direction: column; gap: 2px; padding: 4px 0 6px; }
  .top nav a { padding: 10px 12px; font-size: 17px; }
  .top .me { display: none; order: 4; width: 100%; color: #cfe0d5; padding: 0 12px 8px; }
  body.navopen .top nav, body.navopen .top .me { display: flex; }
  h1 { font-size: 22px; }
  /* project page */
  .phead { gap: 10px; }
  .alarm { min-width: 0; width: 100%; padding: 8px 12px; }
  .alarm-name { font-size: 24px; }
  .stagebar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stagebar div { flex: 0 0 auto; white-space: nowrap; padding: 6px 10px; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .tabs > * { flex: 0 0 auto; white-space: nowrap; }
  .secbar .stagepick { width: 100%; }
  .stagepick #substage, .stagepick #stage { min-width: 0; width: 100%; }
  .linkbtn.inline { margin-left: 8px; }
  .notesfeed .nhead { flex-wrap: wrap; }
  .dircard dl { grid-template-columns: 96px 1fr; }
  #adders .aedit input { width: 90px; }
  /* lists become cards */
  table.list { display: block; border: 0; }
  table.list thead { display: none; }
  table.list tbody, table.list tr { display: block; }
  table.list tr { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
  table.list td { display: inline-block; border: 0 !important; padding: 2px 10px 2px 0 !important; }
  table.list td:first-child { display: block; font-size: 16px; }
  table.list td:empty { display: none; }
  table.products td { display: block; }
  /* forms and pop-ups */
  .modal-box { width: calc(100vw - 24px); max-width: none; max-height: 90vh; overflow: auto; }
  .dirform { grid-template-columns: 1fr; min-width: 0; }
  .row { flex-wrap: wrap; }
  input, select, textarea { font-size: 16px; } /* stops iPhone zooming in when you tap a box */
}
.attbox { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.attbox .row { gap: 6px; flex-wrap: wrap; }
#attchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.attchip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 13px; }
.attchip button { border: 0; background: none; padding: 0 6px; cursor: pointer; }
.picker-dialog { z-index: 2000 !important; } .picker-dialog-bg { z-index: 1999 !important; }
#previewbar { position: sticky; top: 0; z-index: 70; background: #fff4c2; color: #5a4300; border-bottom: 2px solid #e8b400; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
#previewbar button { margin-left: auto; }
.pvlinks { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.pvlinks .btn { text-align: left; }
/* Calendar */
.calhead { gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.calhead button { min-width: 40px; }
.calwrap { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
.calwrap.calloading .calgrid, .calwrap.calloading ~ .calagenda { opacity: .5; transition: opacity .15s; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.calhd { background: #eef2ef; font-weight: 700; font-size: 13px; text-align: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.calday { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px 4px 6px; cursor: pointer; }
.calday:nth-child(7n + 7) { border-right: 0; }
.calday.other { background: #f6f7f6; } .calday.other .daynum { color: #9aa49e; }
.calday.today { box-shadow: inset 0 0 0 2px var(--brand); }
.calday.holiday { background: repeating-linear-gradient(135deg, #fdf1ef 0 8px, #fbe6e2 8px 16px); }   /* company holiday: office closed */
.calday:hover { background: #f8fbf9; }
.daynum { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.calitem { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; padding: 2px 6px; margin-bottom: 3px; font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.calitem .t { font-weight: 400; }
.calside h2 { margin-top: 0; }
.calchk { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.calchk .sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.calagenda { display: none; }
/* Interactive Calendar (Rick, Nov 24): Week / By installer / Month, the visit panel, drag to move, Book, 10-second Undo */
.calviews { display: inline-flex; border: 1px solid var(--btn-line); border-radius: 8px; overflow: hidden; }
.calviews button { border: 0; border-radius: 0; min-width: 0; padding: 6px 12px; }
.calviews button.on { background: var(--brand); color: var(--brand-ink); }
.calfilters { gap: 14px; flex-wrap: wrap; margin: -2px 0 10px; align-items: center; }
.calfilt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; } .calfilt select { width: auto; max-width: 220px; }
.calmain { min-width: 0; }
.calweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.calcol { min-height: 420px; border-right: 1px solid var(--line); padding: 0 4px 8px; cursor: pointer; }
.calcol:last-child { border-right: 0; }
.calcolh, .calrh { background: #eef2ef; font-size: 13px; text-align: center; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0 -4px 6px; }
.calcol.today .calcolh, .calrh.today { background: var(--brand); color: var(--brand-ink); }
.calcol.holiday, .calcell.holiday { background: repeating-linear-gradient(135deg, #fdf1ef 0 8px, #fbe6e2 8px 16px); }
.calcol:hover, .calcell:hover { background-color: #f8fbf9; }
.calempty { display: block; text-align: center; color: #b3bcb6; font-size: 12px; }
.calcard { display: block; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 6px; padding: 4px 6px; margin-bottom: 5px; font-size: 12.5px; line-height: 1.3; cursor: pointer; }
.calcard:hover { box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.calcard.calreq { border-style: dashed; border-left-style: dashed; background: #fbfcfb; }
.calcard.onhold { opacity: .5; }
.calcard.hol { background: #fdecea; border-left-color: #c0392b; }
.calcard[draggable="true"] { cursor: grab; } .calcard.dragging { opacity: .4; }
.calcard span { display: block; overflow: hidden; text-overflow: ellipsis; }
.calcard .cc1 { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.calcard .cc2 { font-weight: 700; } .calcard .num { color: var(--muted); font-weight: 600; display: inline; }
.calcard .cc3 { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.calcard .st { display: inline; font-weight: 700; } .calcard .st-requested { color: var(--warn); } .calcard .st-confirmed { color: var(--brand); }
.calcard .grip { display: inline; float: right; color: #9aa49e; }
.dropok { outline: 2px dashed var(--brand); outline-offset: -3px; background: #eef7f1 !important; }
.calrowswrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.calrows { display: grid; grid-template-columns: 150px repeat(var(--n), minmax(120px, 1fr)); min-width: 940px; }
.calrows > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calrh { margin: 0; } .calrname { padding: 6px 8px; font-weight: 700; font-size: 13px; background: #f6f7f6; position: sticky; left: 0; z-index: 1; }
.calrh.calrname { background: #eef2ef; }
.calcell { min-height: 64px; padding: 4px; cursor: pointer; }
.calopen { display: block; font-size: 11px; color: var(--brand); border: 1px dashed var(--brand); border-radius: 5px; padding: 1px 5px; margin-bottom: 4px; }
.stp-openings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.stp-openings .stp-openday { border-style: dashed; }
.calitem.calreq { outline: 2px dashed rgba(0,0,0,.35); outline-offset: -2px; opacity: .8; }
.calpanel { position: fixed; top: 64px; right: 12px; bottom: 12px; width: min(380px, calc(100vw - 24px)); overflow-y: auto; z-index: 60; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 14px 16px; }
.calpanel .cp-job { font-size: 16px; font-weight: 700; margin: 6px 0 8px; } .calpanel .num { color: var(--muted); font-weight: 600; }
.cp-rows { display: grid; gap: 3px; margin-bottom: 10px; } .cp-r { display: flex; gap: 8px; font-size: 14px; } .cp-r span { color: var(--muted); min-width: 86px; }
.cp-l { font-weight: 700; font-size: 13px; margin: 12px 0 4px; color: var(--muted); }
.cp-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; } .cp-form input, .cp-form select { width: auto; } .cp-d { flex: 1; font-size: 14px; }
.cp-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cp-note, .cp-warn { font-size: 13.5px; padding: 8px 10px; border-radius: 8px; margin: 8px 0; } .cp-note { background: #fff8e1; } .cp-warn { background: #fdecea; color: var(--bad); }
.cp-proof { margin: 0; padding-left: 18px; font-size: 13px; } .cp-proof li.bad { color: var(--bad); }
.calundo { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1200; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px);
  background: var(--nav); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 14px; }
.calundo .cu-n { font-weight: 700; min-width: 1.2em; } .calundo button { background: #fff; color: var(--nav); font-weight: 700; }
.bk_list { max-height: 55vh; overflow-y: auto; }
.bk_job { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bk_kinds { display: flex; gap: 6px; flex-wrap: wrap; } .bk_pick .cp-form { margin-top: 10px; }
/* Ready to schedule side list (Rick, Nov 24): docked right of the calendar on a computer, a drawer on a phone. */
.calwrap.rdyopen { grid-template-columns: minmax(0, 1fr) 290px; } .calwrap .calmain { grid-column: 1; grid-row: 1 / span 2; } .calwrap .calrdy, .calwrap .calside { grid-column: 2; }
.calrdy { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 120px); position: sticky; top: 64px; } .calrdy h2 { font-size: 16px; }
.calrdy input[type=search] { width: 100%; } .rdychips { display: flex; gap: 4px; flex-wrap: wrap; } .rdychips button { font-size: 12px; padding: 2px 8px; min-width: 0; } .rdychips button.on { background: var(--brand); color: var(--brand-ink); }
.rdychips .n { opacity: .75; } .rdylist { overflow-y: auto; min-height: 80px; }
.rdyjob { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 6px; padding: 5px 7px; margin-bottom: 5px; font-size: 12.5px; line-height: 1.35; background: #fff; cursor: pointer; }
.rdyjob[draggable="true"] { cursor: grab; } .rdyjob:hover, .rdyjob:focus { box-shadow: 0 1px 4px rgba(0,0,0,.14); outline: none; } .rdyjob.dragging { opacity: .4; }
.rdyjob.rdynext { opacity: .55; border-left-color: #9aa49e; } .rdyjob.onhold { opacity: .45; }
.rdyjob .rk { color: var(--muted); font-weight: 700; } .rdyjob .num { color: var(--muted); font-weight: 600; } .rdyjob .rj2 { color: var(--muted); font-size: 11.5px; }
.rdyjob .rj3 { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 3px; } .rdyjob .chip { font-size: 11px; padding: 0 6px; }
.rpart { display: inline-block; border: 1px solid var(--brand); color: var(--brand); border-radius: 4px; padding: 0 5px; font-weight: 700; font-size: 11.5px; } .rpart[draggable="true"] { cursor: grab; } .rpart i { font-weight: 400; font-style: normal; color: var(--muted); }
.rdyh { font-weight: 700; font-size: 13px; margin: 10px 0 4px; color: var(--muted); }
#calrdybtn .n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 12px; } #calrdybtn[aria-pressed="true"] { border-color: var(--brand); }
.calday.dropok, .calcol.dropok, .calcell.dropok { background: #e3f3e7 !important; box-shadow: inset 0 0 0 2px var(--brand); }
.pk_inst { display: block; margin: 8px 0; padding: 6px 8px; background: #fff8e1; border-radius: 6px; }
@media (max-width: 1000px) { .calmode-week .calweek { grid-template-columns: 1fr; } .calmode-week .calcol { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 760px) {
  .calwrap { grid-template-columns: 1fr; } .calgrid { display: none; } .calagenda { display: block; }
  .calwrap.calmode-week ~ .calagenda, .calwrap.calmode-installer ~ .calagenda { display: none; }   /* Week stacks by day; By installer scrolls in its box */
  .calpanel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 78vh; }
  .calwrap.rdyopen { grid-template-columns: 1fr; } .calwrap .calmain, .calwrap .calside { grid-column: auto; grid-row: auto; }
  .calrdy { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; max-height: 72vh; z-index: 55; box-shadow: 0 8px 28px rgba(0,0,0,.22); }   /* a drawer */
  .calside { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; padding: 10px 12px; } .calside h2, .calside p { display: none; } .calchk { font-size: 13px; padding: 3px 0; }
  .agday { margin-bottom: 10px; } .agdate { font-weight: 700; margin: 4px 0; }
  .calagenda .calitem { white-space: normal; font-size: 14px; padding: 6px 8px; }
}
.mailfield { display: flex; gap: 6px; } .mailfield input { flex: 1; min-width: 0; }
.mailbtn { white-space: nowrap; padding: 4px 10px; font-size: 13px; }
.drivelink { padding: 7px 10px; border: 1px dashed #b9c4bd; border-radius: 6px; background: #f7faf8; font-weight: 600; }
.taskbar { gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.tpick { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700; color: #3a4740; }
.tpick select { width: auto; }
.tgroup { margin: 18px 0 6px; font-size: 16px; }
table.tasktbl { table-layout: fixed; } table.tasktbl td { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { table.tasktbl colgroup { display: none; } table.tasktbl { table-layout: auto; } }
.taskgrp { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 6px; }
.taskgrp > summary { padding: 8px 12px; cursor: pointer; font-size: 15px; }
.taskgrp > summary .count { background: var(--chip); border-radius: 99px; padding: 1px 8px; font-size: 13px; margin-left: 4px; }
.taskgrp[open] > summary { border-bottom: 1px solid var(--line); }
.taskgrp table.list { margin: 0; }
.emailframe { width: 100%; min-height: 300px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.unf { border-top: 1px solid var(--line); padding: 10px 0; }
/* Calls, texts & meetings */
.commsbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.commsbtns button { padding: 6px 10px; font-size: 13px; }
.commsbtns button:disabled { opacity: .45; cursor: not-allowed; }
.smsbody { white-space: pre-wrap; background: #f4f7f5; border-radius: 6px; padding: 5px 8px; margin-top: 3px; }
.pickbtn { display: block; width: 100%; text-align: left; margin-top: 6px; }
label.inl { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-weight: normal; }
label.inl input { width: auto; }
.sub3 { font-size: 14px; margin: 10px 0 4px; }
/* Edit buttons for tasks and notes */
.tedit { border: 0; background: none; color: var(--muted); padding: 0 4px; margin-left: 4px; font-size: 13px; cursor: pointer; }
.tedit:hover { color: var(--ink, #222); background: #eef2ef; border-radius: 4px; }
.notesfeed .noteedit { font-size: 12px; padding: 2px 8px; background: #fff; }
.notesfeed .nedit textarea { width: 100%; min-height: 90px; margin-top: 4px; }
.notesfeed .nedit input { width: 100%; }
.modal #te_del { color: var(--bad); border-color: #f0c4bf; }
/* Dealer portal: project page */
.dproj { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.dproj .panel { margin-bottom: 14px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.dgrid > div { display: flex; flex-direction: column; gap: 2px; }
.dmsgs { max-height: 380px; overflow: auto; margin-bottom: 8px; }
.dmsg { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; margin-bottom: 6px; background: #fff; font-size: 14px; }
.dmsg.mine { background: #eef6f0; border-color: #cfe5d7; }
.dmsg .when { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.dfiles { list-style: none; padding: 0; margin: 8px 0 0; }
.dfiles li { padding: 5px 0; border-bottom: 1px solid var(--line); }
#dmsg { width: 100%; }
@media (max-width: 800px) { .dproj { grid-template-columns: minmax(0, 1fr); } }
.modal [data-edel] { margin-right: 6px; }
/* Email editor toolbar (Gmail-style) */
.edtools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line); border-bottom: 0; border-radius: 7px 7px 0 0; background: #f6f8f7; }
.edtools button { padding: 3px 7px; min-width: 28px; font-size: 13px; border-color: transparent; background: transparent; }
.edtools button:hover { background: #e4ebe6; }
.edtools select { width: auto; font-size: 12px; padding: 2px 4px; }
.edtools .edsep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.edcolor { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; font-weight: 700; color: #c62828; cursor: pointer; border-radius: 5px; }
.edcolor.hl { color: #e6c200; }
.edcolor:hover { background: #e4ebe6; }
.edcolor input { position: absolute; inset: auto 0 0 0; width: 100%; height: 5px; padding: 0; border: 0; opacity: .9; cursor: pointer; }
.edtools + .editor { border-radius: 0 0 7px 7px; }
.tpl [data-tdel] { margin-right: auto; }
.tpl [data-tdel], #fdel, #edel, .modal [data-edel] { color: var(--bad); border-color: #f0c4bf; background: #fff; }
.pinfo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 14px; }
.pinfo > span { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.pausednote { margin-top: 8px; padding: 6px 9px; border-radius: 6px; background: #fff4e5; color: #8a5300; font-size: 13px; }
.pausedtoggle { background: #fff4e5; padding: 3px 8px; border-radius: 6px; }
.dirform2 fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; padding: 6px 12px 10px; }
.dirform2 legend { font-weight: 700; padding: 0 6px; }
.dirsources { font-size: 13px; overflow-wrap: anywhere; }
.dirsources div { margin-top: 2px; }
/* Project sections: text boxes are sized by layoutFields() in app.js; the Drive folder row stays at the bottom. */
.psec .fields { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px 12px; }
.psec .fields > label { min-width: 0; }
.psec .fields > label input, .psec .fields > label select { min-width: 0; width: 100%; }
.dircard.beside { margin-top: 0; align-self: start; }
.podiobtn { width: 100%; text-align: left; font-weight: 700; color: var(--brand, #1f6b3a); background: #f1f8f3; border: 1px dashed #b9d5c2; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.podiobtn:hover { background: #e3f4e8; }
/* Scope of Work */
.sowtable tr.sowcat td { background: #eef3f8; font-weight: 600; font-size: 13px; }
.sowtable tbody td { vertical-align: middle; padding-top: 4px; padding-bottom: 4px; }
.sowtable td:nth-child(2), .sowtable td:nth-child(3) { white-space: nowrap; }
.sowpanel .sowtable input.sownum { width: 88px; display: inline-block; text-align: right; padding: 4px 6px; margin: 0; }
.sowpanel .addadder { display: flex; gap: 6px; align-items: center; }
.sowpanel .addadder select { flex: 1; min-width: 0; width: auto; }
.sowacts { display: flex; flex-wrap: wrap; gap: 4px; }
.sowu { display: inline-block; width: 20px; text-align: left; padding-left: 2px; }
/* Material order (BOM) */
.bomtable input[type=text] { padding: 4px 6px; }
.bomtable td { vertical-align: middle; padding-top: 3px; padding-bottom: 3px; }
.bompanel .wide2 { grid-column: span 2; }
.bompanel #bomstatus { width: auto; }
/* Directory v1: record view + template editor */
.modal-box.wide { max-width: min(1000px, 96vw); width: 96vw; }
.recview .facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.recview .fact { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #f7faf8; }
.recview .fact b { display: block; font-size: 15px; }
.recview .fact span { color: var(--muted); font-size: 12px; }
.recview .recgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.recview .reccard { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.recview .reccard dl { display: grid; grid-template-columns: 120px 1fr; gap: 3px 10px; margin: 6px 0 0; }
.recview .reccard dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.recview .reccard dd { margin: 0; }
.recview ol.steps { margin: 6px 0 0 18px; padding: 0; } .recview ol.steps li { margin-bottom: 6px; }
.recview ul.cl { list-style: none; margin: 6px 0 0; padding: 0; } .recview ul.cl li { margin-bottom: 4px; }
.recflag { border-left: 4px solid #9db3c8; background: #f2f6fa; padding: 6px 10px; margin: 6px 0; border-radius: 4px; }
.recflag.warn { border-color: #d9a400; background: #fff8e1; } .recflag.bad { border-color: #c62828; background: #fdecea; }
.tpled { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.tpled .tpllist { margin-top: 8px; }
.tplrow { display: flex; gap: 6px; margin-top: 4px; align-items: flex-start; }
.tplrow input, .tplrow textarea { flex: 1; min-width: 0; }
@media (max-width: 760px) { .recview .facts { grid-template-columns: 1fr 1fr; } .recview .recgrid { grid-template-columns: 1fr; } }
/* Locked link / email / phone: looks like the other boxes, can't be typed in until "Change" */
.lockbox { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line, #d0d7d2); border-radius: 8px; background: #fafbfa; min-width: 0; flex: 1; }
.lockbox a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lockedit { flex: none; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line, #d0d7d2); background: #fff; color: var(--muted); cursor: pointer; }
.lockedit:hover { color: inherit; border-color: #9aa8a0; }
.mailfield .lockbox { flex: 1; }
.alertbanner { display: flex; gap: 10px; align-items: center; margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #c62828; color: #fff !important; text-decoration: none; font-size: 15px; min-width: 0; }
.alertbanner b { white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.alertbanner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 600; }
.alertbanner:hover { background: #a31515; }
.alertslot { margin: 8px 0; }
button.alertbanner { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: center; width: 100%; margin: 0; padding: 8px 12px; border-radius: 8px; background: #c62828; color: #fff; font-size: 15px; min-width: 0; cursor: pointer; }
button.alertbanner:hover { background: #a31515; } button.alertbanner:focus-visible { outline: 3px solid #e0a800; outline-offset: 2px; }
.alertbanner .ab-edit { margin-left: auto; flex: none; font-style: normal; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: rgba(255,255,255,.18); white-space: nowrap; }
.alertadd0 { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 5px 12px; border: 1px dashed #d9b4b4; border-radius: 8px; color: #a86a6a; font-size: 13px; cursor: pointer; opacity: .75; }
.alertadd0:hover, .alertadd0:focus-visible { opacity: 1; background: #fff5f5; color: #c62828; }
/* The alert pop-up (public/alertpop.js) */
.modal.alertpop { z-index: 70; }
.modal-box.ap-box { width: min(620px, 100%); padding: 14px 18px; display: grid; gap: 10px; }
.ap-top { display: flex; align-items: center; gap: 8px; } .ap-top b { color: #c62828; font-size: 16px; }
.ap-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 8px; }
.ap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ap-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid #f0c4bf; background: #fff5f5; border-radius: 8px; }
.ap-list li span { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }
.ap-list li button { flex: none; }
.ap-add { display: flex; gap: 8px; } .ap-add input { flex: 1; min-width: 0; }
.ap-edit { display: grid; gap: 4px; } .ap-edit textarea { width: 100%; box-sizing: border-box; }
.ap-btns { gap: 8px; align-items: center; flex-wrap: wrap; }
.phead > div:first-child { min-width: 0; flex: 1 1 auto; }
.pinfo > span.pinfo-sub { background: #cfe5d7; border-color: #a9cdb6; color: #1e5a37; font-size: 17px; font-weight: 700; padding: 3px 14px; }
.bomtable tr.bomspecial td:first-child input { border-left: 3px solid var(--sun, #f5a623); }
/* Group of sections under one arrow (System, Design & Electrical) */
details.psecgroup > summary { list-style: none; cursor: pointer; }
details.psecgroup > summary::-webkit-details-marker { display: none; }
details.psecgroup > summary h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
details.psecgroup > summary h2::before { content: '▸'; font-size: 14px; color: var(--muted); transition: transform .15s; display: inline-block; }
details.psecgroup[open] > summary h2::before { transform: rotate(90deg); }
details.psecgroup[open] > summary { margin-bottom: 10px; }
details.psecgroup > details.psec { margin: 8px 0 0; box-shadow: none; background: #fbfcfb; }
.pinfo > span.pinfo-hoa { background: var(--brand, #2f7d4f); border-color: var(--brand, #2f7d4f); color: #fff; display: inline-flex; align-items: center; }
/* Projects list grouped by sub stage */
.pipetable tbody.pgrp tr.prow { display: none; }
.pipetable tbody.pgrp.open tr.prow { display: table-row; }
.pipetable tr.pgrphead td { background: #f3f6f4; cursor: pointer; padding: 8px 10px; border-top: 1px solid var(--line); user-select: none; }
.pipetable tr.pgrphead:hover td { background: #e8efea; }
.pipetable tr.pgrphead .caret { display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; }
.pipetable tbody.pgrp.open tr.pgrphead .caret { transform: rotate(90deg); }
.pipetable tr.pgrphead .count { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; background: #cfe5d7; color: #1e5a37; border-radius: 999px; padding: 1px 8px; }
@media (max-width: 760px) {
  .pipetable tbody.pgrp.open tr.prow { display: block; }
  .pipetable tr.pgrphead { border: 0; padding: 0; background: none; }
  .pipetable tr.pgrphead td { display: block; border-radius: 8px; }
}
/* Two levels on All open: stage, then sub stage */
.pipetable tbody.pgrp.sclosed { display: none; }
.pipetable tr.sgrphead td { background: #e3ede6; cursor: pointer; padding: 10px 10px; border-top: 2px solid #b9d5c2; font-size: 15px; user-select: none; }
.pipetable tr.sgrphead:hover td { background: #d6e6db; }
.pipetable tr.sgrphead .caret { display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; }
.pipetable tbody.sgrp.open tr.sgrphead .caret { transform: rotate(90deg); }
.pipetable tr.sgrphead .count { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; background: var(--brand, #2f7d4f); color: #fff; border-radius: 999px; padding: 1px 8px; }
.pipetable tbody.pgrp.sub tr.pgrphead td { padding-left: 30px; }
@media (max-width: 760px) {
  .pipetable tr.sgrphead { border: 0; padding: 0; background: none; }
  .pipetable tr.sgrphead td { display: block; border-radius: 8px; }
  .pipetable tbody.pgrp.sub tr.pgrphead td { margin-left: 14px; }
}
/* Adders list scrolls inside its box instead of growing the page */
#adders .alist { max-height: 340px; overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
/* Welcome call */
.wcscript { background: #e8f6ec; border: 1px solid #a8d8b5; border-radius: 8px; padding: 8px 12px; font-size: 15px; font-weight: 600; color: #1d4d2c; }
.wchead .chip { align-self: center; }
.hoahcard { margin: 8px 0 0 22px; font-weight: 400; cursor: auto; }
.hoahcard dl { grid-template-columns: 110px 1fr 110px 1fr; }
@media (max-width: 760px) { .hoahcard { margin-left: 0; } .hoahcard dl { grid-template-columns: 100px 1fr; } }
.chip.info { background: #e6f0fb; color: #1d4f91; }
.wchead .hoachip { font-size: 13px; font-weight: 700; padding: 3px 10px; }
.hoasug { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #fff8e6; border: 1px solid #f0d58a; border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; font-size: 13.5px; }
.hoasug button { padding: 4px 10px; font-size: 13px; }
.wchead button.recording { background: #fdecec; border-color: #e5a3a3; color: #b42318; opacity: 1; }
.wcatt { display: flex; flex-direction: column; gap: 2px; }
.wcolder > summary { cursor: pointer; margin: 4px 0; }
.wcscripttext p { margin: 8px 0; line-height: 1.45; }
.wcscripttext .wcsay { background: #e8f6ec; border: 1px solid #a8d8b5; border-radius: 8px; padding: 8px 12px; font-weight: 600; color: #1d4d2c; }
.wchead { display: inline-flex; gap: 6px; margin-left: 14px; flex-wrap: wrap; vertical-align: middle; }
.wchead .btn, .wchead button { padding: 4px 10px; font-size: 13px; font-weight: 600; text-decoration: none; }
@media (max-width: 760px) { .wchead { margin-left: 0; margin-top: 6px; display: flex; } }
select.needs { border-color: #c62828; }
.wcrecs { display: flex; flex-direction: column; gap: 8px; }
.wcrec { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fafbfa; }
/* Admin: panels fold up under their heading */
/* Admin (Oct 13): the groups in a 3-column grid (2 ≤1000px, 1 ≤680px), each under a dark header like the top nav that folds it up;
   the chips stacked one per row with their status on the right. The open section takes over the screen below the top nav. */
.admhead { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; max-width: 1240px; }
.adm-all { display: flex; gap: 6px; margin-left: auto; }
.adm-all button, .adm-takebar .x, .sp-pagebar .x { font: 500 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--brand); background: var(--btn-bg); color: #1f6b3a; cursor: pointer; white-space: nowrap; }
.adm-all button:hover, .adm-takebar .x:hover, .sp-pagebar .x:hover { background: #e3f4e8; text-decoration: none; }
@media (max-width: 1000px) { .admhide { display: none; } }
@media (max-width: 480px) { .sp-find { width: 100% !important; } }

.admtool { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 14px 0 12px; max-width: 1240px; align-items: start; }
@media (max-width: 1000px) { .admtool { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .admtool { grid-template-columns: 1fr; } }
.admtool > .chips { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; background: transparent; border: 0; padding: 0; margin: 0; }

.admtool .chiplabel { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 40px; background: var(--nav); color: #fff; padding: 10px 34px; margin: 0; border-radius: 8px; border-bottom: 3px solid var(--sun); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; white-space: normal; text-align: center; cursor: pointer; user-select: none; }
.admtool .chiplabel:hover { background: #1d3427; }
.admtool .chiplabel:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.adm-n { background: rgba(255,255,255,.14); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.adm-warn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: var(--sun); color: var(--nav); border-radius: 99px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.admtool .chiplabel:has(.adm-warn:not([hidden])) { padding-right: 96px; }
.admtool .chiplabel { flex-wrap: wrap; row-gap: 3px; }
.adm-blurb { flex-basis: 100%; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.78); line-height: 1.35; }
.admtool > .chips > button[hidden], .admtool > .chips[hidden] { display: none; }
.adm-chev { position: absolute; left: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-70%) rotate(45deg); transition: transform .15s; opacity: .85; }
.chips.adm-closed .adm-chev { transform: translateY(-50%) rotate(-45deg); }
.admtool > .chips.adm-closed > button { display: none; }

.admtool > .chips > button { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0; padding: 7px 12px; text-align: left; background: var(--btn-bg); border: 1px solid var(--brand); border-radius: 8px; color: var(--ink); transition: background .12s; }
.admtool > .chips > button:hover { background: var(--btn-hover); color: #1f6b3a; }
.admtool > .chips > button.amberchip:not(.on) { background: #fff4e5; border-color: #f2c25c; color: var(--warn); }
.admtool .admb:not(:empty) { margin-left: 12px; font-size: 13px; text-align: right; }
.admtool .admb.ok { color: #1f6b3a; font-weight: 600; opacity: 1; }
.admtool .admb.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2fa865; margin-right: 6px; vertical-align: 1px; }
.admtool .admb.off { color: #78847c; opacity: 1; }

/* the open section, full screen under the top nav (--navh is measured in app.js), with its bar fixed on top */
.admpanel[hidden] { display: none !important; }
.adm-takebar { position: fixed; top: var(--navh, 46px); left: 0; right: 0; z-index: 51; height: 44px; display: flex; align-items: center; background: var(--nav); color: #fff; padding: 0 20px; border-bottom: 3px solid var(--sun); }
:is(.adm-takebar, .sp-pagebar) .t { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; max-width: calc(50% - 70px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.adm-takebar, .sp-pagebar) .x { position: absolute; left: 50%; transform: translateX(-50%); }
:is(.adm-takebar, .sp-pagebar) .crumb { position: absolute; right: 20px; font-size: 12px; opacity: .7; max-width: calc(50% - 90px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { :is(.adm-takebar, .sp-pagebar) .crumb { display: none; } }
/* A list page reached from an Admin-style page (Directory › AHJs…): the same bar, at the top of the page instead of fixed */
.sp-pagebar { position: relative; height: 44px; display: flex; align-items: center; background: var(--nav); color: #fff; padding: 0 16px; margin: 0 0 12px; border-radius: 8px; border-bottom: 3px solid var(--sun); }
body.adm-taking { overflow: hidden; }
/* what has to stay above it: the top nav's menus, popups, toasts */
body.adm-taking .top { z-index: 55; } body.adm-taking :is(.modal, .savestatus) { z-index: 80; }
body.adm-taking .admpanel:not([hidden]) { position: fixed; top: calc(var(--navh, 46px) + 44px); left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: auto; background: var(--bg); padding: 16px max(20px, calc((100% - 1200px) / 2)) 32px; }
/* Admin-style pages (public/sectionpage.js: Financials…): the group headers don't fold, so they aren't buttons */
.admtool .sp-label, .admtool .sp-label:hover { cursor: default; background: var(--nav); }
.sp-h { gap: 6px 12px; flex-wrap: wrap; margin-bottom: 10px; } .sp-h h2 { margin: 0; }   /* a section's heading row: name, what it is, its buttons */

.draftbox { border: 1px dashed #e0b84a; background: #fffaf0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }

/* Projects › All projects / Blocked / Design queue / Materials / Bottlenecks (public/pagetabs.js), between the header and the page */
#projtabsbar { padding: 8px 16px 0; }
#projtabsbar[hidden] { display: none; }
#projtabsbar .projtabs { margin: 0; flex-wrap: wrap; }
#projtabsbar .projtabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 680px) { #projtabsbar .projtabs { flex-wrap: nowrap; overflow-x: auto; } #projtabsbar .projtabs a { white-space: nowrap; } }

/* Open project tabs (like browser tabs) */
#ptabs { display: flex; gap: 4px; align-items: flex-end; padding: 6px 12px 0; background: #eef3ee; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
#ptabs[hidden] { display: none; }
.ptab { display: inline-flex; align-items: center; gap: 6px; max-width: 210px; min-width: 90px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--btn-bg); color: inherit; text-decoration: none; font-size: 13px; flex: 0 1 auto; }
.ptab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ptab.on { background: #cfe5d7; font-weight: 600; box-shadow: 0 -2px 0 #1f6b3a inset; }
.ptab:hover { background: var(--btn-hover); }
.ptab button { border: none; background: none; padding: 0 4px; font-size: 12px; color: var(--muted); cursor: pointer; line-height: 1; border-radius: 4px; }
.ptab button:hover { background: #e3e8e3; color: #000; }
.ptabclear { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 6px 8px; white-space: nowrap; }
/* Project page: find another project */
.pjumprow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pjump { position: relative; flex: 0 1 320px; min-width: 200px; }
.pjump input { width: 100%; padding: 5px 10px; font-size: 13px; }
#tsearchres { position: absolute; top: calc(100% + 2px); left: 0; right: 0; min-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 30; max-height: 360px; overflow: auto; }
#tsearchres a { display: block; padding: 7px 10px; color: inherit; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
#tsearchres a.on, #tsearchres a:hover { background: #eef6ef; }
@media (max-width: 700px) { .pjump { flex-basis: 100%; } .ptab { min-width: 80px; max-width: 150px; } }
.portalsearch { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; }
.portalsearch input { flex: 0 1 420px; min-width: 220px; }
.cdocgroup { margin-bottom: 10px; } .cdoct { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; } .cdoc { padding: 2px 0; }
.plansreview { border: 2px solid #1f6b3a; background: #f3faf4; }
.eqpending { border-color: #f0d58a; background: #fffcf2; }
/* Install › scheduling emails, Material ordering */
.ordbox { background: #f3f5f2; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; min-height: 34px; overflow-wrap: anywhere; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.ordfile { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; border-style: dashed; background: #fff; }
.sched { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.stabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #fafbf9; }
.stabs button { border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0; }
.stabs button.on { color: inherit; border-bottom-color: #1f6b3a; background: #fff; }
.spanel { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.spanel p { margin: 0; }
.slot { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.slot b { font-size: 12px; color: var(--muted); }
.slot2 { display: flex; gap: 10px; flex-wrap: wrap; } .slot2 label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 150px; flex: 1; }
.ordlog { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 2px 10px; }
.ordlog:empty { display: none; }
.ordlog > div { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; align-items: center; font-size: 13px; }
.ordlog > div:last-child { border-bottom: 0; } .ordlog > .muted { display: block; padding: 6px 0; }
.mosteps { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.mosteps div { flex: 1 1 0; min-width: 110px; padding: 7px 10px; border-right: 1px solid var(--line); font-size: 12px; display: flex; flex-direction: column; }
.mosteps div:last-child { border-right: 0; } .mosteps .done { background: #e0f0e5; } .mosteps .cur { background: #fff7dd; } .mosteps span { color: var(--muted); }
table.cmp td { vertical-align: top; } tr.cmpbad td { background: #fdf3f1; } tr.cmpwarn td { background: #fef8ec; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
@media (max-width: 640px) { .slot { grid-template-columns: 28px 1fr; } .ordlog > div { grid-template-columns: 1fr; } }
.fblock { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .fblock > .flabel { font-size: 12px; color: var(--muted); }
/* Equipment documents: folding groups */
details.eqgrp > summary { cursor: pointer; list-style: none; padding: 6px 2px; display: flex; align-items: center; gap: 8px; }
details.eqgrp > summary::-webkit-details-marker { display: none; }
details.eqgrp > summary::before { content: '▸'; color: var(--muted); font-size: 13px; transition: transform .15s; display: inline-block; }
details.eqgrp[open] > summary::before { transform: rotate(90deg); }
details.eqsub { margin-left: 18px; border-top: 1px solid #f0e6c8; }
/* Design › Business license box (city / county license for this project, with our license copy) */
.licbox { border: 1px solid #c9d3cc; background: #f7faf8; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
/* Project page: tabs, ← Projects / search and the project name stay visible while scrolling */
#ptabs { position: sticky; top: var(--toph, 52px); z-index: 5; }
.pstick { position: sticky; top: calc(var(--toph, 52px) + var(--tabh, 0px)); z-index: 4; background: var(--bg); margin: -20px -20px 10px; padding: 10px 20px 8px; border-bottom: 1px solid var(--line); }
.pstick h1 { margin: 6px 0 0; }
@media (max-width: 760px) { .pstick { margin: -12px -12px 8px; padding: 8px 12px 6px; } .pstick h1 { font-size: 17px; } }
/* Job checklists (site survey, install photos, final inspection) */
.clbox { border: 1px solid #c9d3cc; background: #f7faf8; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.clbar { display: inline-block; width: 120px; height: 8px; border-radius: 99px; background: #dfe6e1; overflow: hidden; vertical-align: middle; }
.clbar i { display: block; height: 100%; background: #3e7744; }
.cltags { margin: 10px 0 4px; }
.clsec { margin-top: 14px; }
.clsec h3 { margin: 0 0 4px; padding: 6px 10px; background: #3e7744; color: #fff; border-radius: 6px; font-size: 14px; }
.clitem { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 300px); gap: 4px 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.clitem.done .clcheck span { color: #4b6b52; }
.clitem.info { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }   /* the survey's Job details: read-only lines from the app (Rick, Nov 20) */
.clcheck { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 0; cursor: pointer; }
.clcheck input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.clans { display: flex; flex-direction: column; gap: 4px; }
.clans input { font-size: 13px; padding: 4px 6px; }
.clby { grid-column: 1 / -1; padding-left: 26px; margin-top: -2px; }
.clnote { width: 100%; min-height: 44px; margin-top: 6px; font-size: 13px; }
@media (max-width: 700px) { .clitem { grid-template-columns: minmax(0, 1fr) auto; } .clans { grid-column: 1 / -1; padding-left: 26px; } }
/* The site survey checklist card (Rick, Nov 13): under the Site Survey photos heading and on the phone Photos tab (public/checklists.js) */
.svcl { border: 2px solid #3e7744; background: #f2f8f3; border-radius: 10px; padding: 10px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.svcl.todo { border-color: #e8a33d; background: #fff8ec; }
.svcl-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.svcl-state { font-weight: 600; }
.svcl.ok .svcl-state { color: #2f6b36; }
.svcl-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.svcl-open { min-height: 44px; padding: 8px 16px; font-size: 15px; }
/* The checklist editor on a phone (public/checklists.js adds .clfull and sets the width): full screen, big touch targets, 16px inputs (no zoom on iPhone) */
.modal.clfull { padding: 0; }
.modal.clfull .modal-box.clmodal { position: fixed; top: 0; left: 0; max-width: none; max-height: none; border-radius: 0; margin: 0; overflow-y: auto; overflow-x: hidden; padding: 12px; box-sizing: border-box; }
.clfull .clwrap > .row:first-child { position: sticky; top: -12px; z-index: 2; background: var(--panel, #fff); margin: -12px -12px 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.clfull .cltags { display: flex; flex-wrap: wrap; gap: 6px; }
.clfull .cltags .cltag { white-space: normal; max-width: 100%; }
.clfull .clitem { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 4px; }
.clfull .clans { grid-column: 1 / -1; padding-left: 34px; }
.clfull .clcheck { min-height: 32px; align-items: center; }
.clfull .clcheck input { width: 26px; height: 26px; }
.clfull .clans input, .clfull .clans select, .clfull .clnote { font-size: 16px; padding: 8px; min-height: 40px; width: 100%; box-sizing: border-box; }
.clfull button, .clfull .btn { min-height: 44px; }
/* Test copy (staging): an orange bar on every page */
html.staging body { border-top: 28px solid #e8590c; }
html.staging body::before { content: 'TEST COPY \2014  changes here do not affect the live app'; position: fixed; top: 0; left: 0; right: 0; height: 28px; line-height: 28px; text-align: center; color: #fff; font: 600 13px system-ui, sans-serif; background: #e8590c; z-index: 1000; }
#toast.withbtn { pointer-events: auto; }
#toast.stay { background: #7a1f12; display: flex; gap: 12px; align-items: flex-start; text-align: left; }   /* a refusal: stays until closed */
#toast .toastclose { flex: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 0 8px; font-size: 14px; line-height: 22px; cursor: pointer; }
#toast .toastclose:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#toast .toastundo { margin-left: 10px; background: #fff; color: #16271e; border: 0; border-radius: 6px; padding: 3px 10px; font-weight: 600; cursor: pointer; }
.tlist li.done .treopen { margin-left: 8px; }
.tnote { white-space: pre-wrap; color: #4b5a50; }
.hcheck { padding: 4px 0; border-bottom: 1px solid var(--line); } .hcheck summary { cursor: pointer; } .hcheck ul { margin: 4px 0 8px 18px; font-size: 13px; }
.nextstep { font-size: 13px; line-height: 1.25; max-width: 260px; } .latedue { color: var(--bad); font-weight: 600; } .pipetable td.nextcell { min-width: 180px; }
/* Scheduling blocks */
.schblk { border: 1px solid #c9d3cc; border-radius: 8px; padding: 10px 12px; background: #fbfcfb; }
.schhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.schsteps { display: flex; gap: 4px; margin: 8px 0; flex-wrap: wrap; } .schsteps span { padding: 3px 10px; border-radius: 99px; font-size: 12px; background: #fff; border: 1px solid #d5ddd8; color: #6b776f; }
.schsteps span.done { background: #e3f4e8; border-color: #9cc9a9; color: #1f6b3a; } .schsteps span.now { background: #fff4d6; border-color: #e6c46a; color: #7a5600; font-weight: 600; }
.schconf { margin: 6px 0; font-size: 15px; } .schready { background: #fff; border: 1px dashed #d5ddd8; border-radius: 6px; padding: 6px 10px; margin: 6px 0; }
.schdates { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; } .schdate { font-weight: normal; margin: 0; display: flex; gap: 6px; align-items: center; } .schdate.past { opacity: .5; }
.schadd { gap: 6px; flex-wrap: wrap; margin: 6px 0; } .schadd input, .schadd select { width: auto; }
.schopts { gap: 10px; flex-wrap: wrap; margin: 6px 0; } .schopts input, .schopts select { width: auto; }
.schbtns { gap: 6px; flex-wrap: wrap; margin-top: 6px; } .schbar { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #fff4d6; border: 1px solid #e6c46a; }
.schblk label.schdate { flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; text-align: left; }
.schblk label.schdate > * { display: inline-block; } .schblk label.schdate input[type=radio] { width: auto; margin: 0; flex: none; } .schblk label.schdate .linkbtn { margin-left: auto; }
.schblk .schhead label { flex-direction: row; align-items: center; gap: 6px; } .schblk .schready label.inl { flex-direction: row; display: inline-flex; }
.schbtns button:disabled, .schbtns button.primary:disabled { opacity: .45; cursor: not-allowed; }
.schact div { padding: 2px 0; } .instdates { margin-top: 6px; } .instdates .ia_note { margin: 4px 0; }
/* Project status card */
.statuscard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 540px); gap: 6px 16px; align-items: center; background: #fff; border: 1px solid #d5ddd8; border-radius: 10px; padding: 7px 14px; margin: 0 0 14px; }
/* Compact strip: each label sits inline with its value */
.sc-info { display: grid; gap: 4px; min-width: 0; }
.sc-line { line-height: 1.35; font-size: 14px; }
.sc-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 2px; }
.sc-big { font-size: 15px; font-weight: 700; } .sc-next { font-weight: 600; }
.sc-blockers { display: inline; margin-left: 14px; } .sc-blockers .sc-h { color: #9b2c1f; }
.sc-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 10px; }
.sc-date { display: grid; grid-template-columns: 16px 1fr; font-size: 12px; line-height: 1.25; } .sc-date span { grid-row: span 2; }
.sc-date b { font-weight: 600; } .sc-date i { font-style: normal; color: var(--muted); grid-column: 2; }
.sc-date.todo { opacity: .55; } .sc-date.soon b { color: #7a5600; } .sc-date.done span { color: #1f6b3a; }
.sc-block { color: #9b2c1f; font-size: 13px; }
@media (max-width: 1150px) { .statuscard { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .sc-blockers { display: block; margin-left: 0; margin-top: 4px; } }
/* Status card tint (a little brighter than the Alerts rows): on track / blockers or overdue tasks / Job in Jeopardy or On Hold */
.statuscard.sc-green { background: #ecf9f0; border-color: #9fd8b1; }
.statuscard.sc-amber { background: #fff4d9; border-color: #f2c25c; }
.statuscard.sc-red { background: #fdeceb; border-color: #eea59d; }
/* Pipeline view toggle + Classic view */
.segtoggle { display: inline-flex; border: 1px solid #c9d3cc; border-radius: 8px; overflow: hidden; }
.segtoggle button { border: 0; border-radius: 0; background: var(--btn-bg); padding: 6px 12px; font-size: 13px; margin: 0; }
.segtoggle button.on { background: #1f6b3a; color: #fff; }
.pipetable.classic tr.cstage td { background: #1f4d30; color: #fff; font-weight: 700; padding: 7px 10px; }
.pipetable.classic tr.cstage .count, .pipetable.classic tr.csub .count { background: rgba(255,255,255,.2); border-radius: 99px; padding: 0 8px; font-size: 12px; margin-left: 6px; }
.pipetable.classic tr.csub td { background: #e3f0e7; color: #1d2a22; font-weight: 600; padding: 5px 10px; }
.pipetable.classic tr.csub .count { background: #fff; }
.pipetable.classic tr.crow { cursor: pointer; } .pipetable.classic tr.crow:hover td { background: #f5f9f6; }
.pipetable.classic tr.cstage, .pipetable.classic tr.csub { cursor: pointer; user-select: none; }
.pipetable.classic tbody.pgrp tr.crow { display: none; } .pipetable.classic tbody.pgrp.open tr.crow { display: table-row; }
.pipetable.classic tr.csub .caret { display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; } .pipetable.classic tbody.pgrp.open tr.csub .caret { transform: rotate(90deg); }
.ptrow.pgrpall { gap: 14px; }
.pipetable.classic td:nth-child(1), .pipetable.classic td:nth-child(5), .pipetable.classic td:nth-child(6) { white-space: nowrap; }
/* Bottlenecks */
/* Title on the left, ← Pipeline in the middle (Rick, Oct 26) */
.bn-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
@media (max-width: 640px) { .bn-head { grid-template-columns: 1fr; justify-items: start; } .bn-head > span { display: none; } }
.bn-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.bn-tiles div { background: #fff; border: 1px solid #d5ddd8; border-radius: 10px; padding: 10px 14px; } .bn-tiles b { display: block; font-size: 24px; } .bn-tiles span { color: var(--muted); font-size: 12px; }
.bn-tiles .bad b { color: #9b2c1f; }
.bn-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; align-items: start; } @media (max-width: 900px) { .bn-grid { grid-template-columns: 1fr; } }
.bn-trend { display: flex; gap: 6px; align-items: flex-end; height: 100px; margin: 8px 0; } .bn-week { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.bn-bars { display: flex; gap: 1px; align-items: flex-end; justify-content: center; height: 72px; } .bn-bar { width: 6px; border-radius: 2px 2px 0 0; min-height: 1px; }
.bn-bar.sold, .bn-key.sold { background: #8fb3d9; } .bn-bar.inst, .bn-key.inst { background: #1f6b3a; } .bn-bar.pto, .bn-key.pto { background: #e6c46a; }
.bn-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 3px 0 8px; vertical-align: middle; }
button.done { background: #e3f4e8; border-color: #9cc9a9; color: #1f6b3a; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff4d6; border: 1px solid #e6c46a; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.bn-cyc { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; } .bn-cyc h3 { font-size: 13px; margin: 4px 0; }
/* ───────── directory record cards ───────── */
.rc-page { display: grid; gap: 18px; }
.rc { container-type: inline-size; background: #fff; border: 1px solid #dfe5df; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.05); scroll-margin-top: 80px; }
.rc-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #1f2b23; color: #fff; flex-wrap: wrap; }
.rc-av { width: 46px; height: 46px; border-radius: 10px; background: #e8b84a; color: #1f2b23; display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; }
.rc-av.sm { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; } .rc-av.xs { width: 22px; height: 22px; font-size: 10px; border-radius: 6px; }
.rc-title { flex: 1; min-width: 200px; } .rc-title h2 { margin: 0; font-size: 22px; color: #fff; }
.rc-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #c9d3cc; margin-top: 2px; }
.rc-key { display: inline-block; margin-top: 4px; font-size: 11px; background: rgba(255,255,255,.1); color: #dfe6e1; padding: 1px 6px; border-radius: 4px; }
.rc-portal { display: flex; flex-direction: column; position: relative; background: #dff0e2; color: #1f2b23 !important; text-decoration: none; padding: 8px 34px 8px 12px; border-radius: 10px; max-width: 300px; }
.rc-portal b { font-size: 14px; } .rc-portal span { font-size: 12px; color: #4a5a4f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rc-portal i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 18px; }
.rc-pct { display: flex; align-items: center; gap: 8px; } .rc-pct b { display: block; font-size: 14px; } .rc-pct span { font-size: 12px; color: #c9d3cc; }
.rc-ring { width: 40px; height: 40px; } .rc-ring text { font-size: 10px; font-weight: 700; fill: #fff; }
.rc-edit, .rc-refresh { border-radius: 8px; padding: 7px 12px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; }
.rc-refresh { background: #e8b84a; color: #1f2b23; border-color: #e8b84a; }
.rc-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 18px 0; }
.rc-facts div { border: 1px solid #dfe5df; border-radius: 10px; padding: 8px 12px; } .rc-facts b { display: block; font-size: 17px; color: #1f2b23; } .rc-facts span { font-size: 12px; color: #667; }
.rc-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; padding: 12px 18px; }
.rc-main { border: 1px solid #dfe5df; border-radius: 10px; overflow: hidden; }
.rc-tabs { display: flex; border-bottom: 1px solid #dfe5df; background: #f6f8f6; overflow-x: auto; }
.rc-tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 10px; font-weight: 700; color: #667; cursor: pointer; white-space: nowrap; }
.rc-tabs button.on { color: #1f2b23; border-bottom-color: #3f7a4a; background: #fff; } .rc-n { background: #ece7d6; border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.rc-pane { padding: 12px 14px; } .rc-sum { margin: 0 0 10px; }
.rc-grp h4, .rc-box h4, .rc-linked h4 { margin: 10px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #3f7a4a; }
.rc-grp dl, .rc-box dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; margin: 0; }
.rc-grp dl div, .rc-box dl div { border-left: 2px solid #e4e9e4; padding-left: 8px; } .rc-grp dt, .rc-box dt { font-size: 12px; color: #667; } .rc-grp dd, .rc-box dd { margin: 0; overflow-wrap: anywhere; }
.rc-steps { margin: 0; padding-left: 20px; } .rc-steps li { margin-bottom: 8px; } .rc-steps .chip { margin-left: 6px; } .rc-steps div { font-size: 14px; color: #445; }
.rc-req { list-style: none; padding: 0; margin: 0; } .rc-req li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #e4e9e4; }
.rc-flag { padding: 7px 10px; border-radius: 8px; background: #f6f8f6; margin-bottom: 6px; } .rc-flag.warn { background: #fff7e0; } .rc-flag.bad { background: #fdecea; }
.rc-web { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #e4e9e4; border-radius: 10px; margin-bottom: 6px; text-decoration: none; color: inherit; }
.rc-web span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .rc-web small { color: #667; } .rc-web em { font-style: normal; font-size: 12px; } .rc-web em.ok { color: #2f6b3a; } .rc-web em.bad { color: #b3261e; } .rc-web i { font-style: normal; }
.rc-side { display: grid; gap: 10px; align-content: start; }
.rc-box { border: 1px solid #dfe5df; border-radius: 10px; padding: 8px 12px 10px; background: #fbfcfb; text-align: left; }
.rc-proj { background: #f2f7f2; } .rc-proj dl { grid-template-columns: 1fr 1fr; }
.rc-count { display: flex; align-items: center; gap: 12px; cursor: pointer; width: 100%; font: inherit; }
.rc-count > b { font-size: 24px; color: #3f7a4a; } .rc-count span { flex: 1; display: flex; flex-direction: column; } .rc-count small { color: #667; } .rc-count i { font-style: normal; }
.rc-contact { padding: 4px 0 6px; } .rc-crow { display: flex; gap: 8px; align-items: center; font-size: 14px; } .rc-crow span:first-child { color: #667; width: 70px; flex: none; }
.rc-copy { margin-left: auto; background: none; border: 0; cursor: pointer; color: #667; }
.rc-linked { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 18px 10px; } .rc-linked h4 { margin: 0 6px 0 0; }
.rc-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dfe5df; border-radius: 999px; padding: 3px 10px 3px 4px; background: var(--btn-bg); cursor: pointer; font: inherit; font-size: 14px; }
.rc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #d99a2b; } .rc-dot.ok { background: #3f7a4a; } .rc-dot.bad { background: #c0392b; }
.rc-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 8px 18px; background: #f6f8f6; border-top: 1px solid #e4e9e4; font-size: 13px; color: #667; }
.rc-foot code { background: #ece7d6; border-radius: 4px; padding: 0 5px; font-size: 11px; }
.modal-box.rcwide { max-width: min(1240px, 97vw); width: 97vw; padding: 12px; } .rc-modal .rc { box-shadow: none; }
@media (max-width: 900px) { .rc-body { grid-template-columns: 1fr; } .rc-facts { grid-template-columns: 1fr 1fr; } .rc-portal { max-width: none; flex: 1 1 100%; } }

.rc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.rc-count i { flex: none; } .rc-count span { min-width: 0; }
@container (max-width: 860px) { .rc-body { grid-template-columns: 1fr; } .rc-facts { grid-template-columns: 1fr 1fr; } .rc-portal { order: 3; flex: 1 1 100%; max-width: none; } .rc-actions { margin-left: auto; } }
/* Interconnection packet */
.icp { display: grid; gap: 14px; }
.ichead { padding: 14px 16px; }
.icpto { padding: 12px 16px; margin-bottom: 12px; border-left: 4px solid var(--warn); }   /* Pre-PTO check (public/ptocheck.js) */
.icpto.ok { border-left-color: var(--brand); }
.icpto-list { list-style: none; margin: 8px 0 0; padding: 0; }
.icpto-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 4px 0; }
.icpto-i { width: 1.2em; text-align: center; font-weight: 700; }
.icpto-list li.ok .icpto-i { color: var(--brand); }
.icpto-list li.miss .icpto-i, .icpto-list li.miss > b { color: var(--bad); }
.icring { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#2e7d4f calc(var(--p) * 1%), #e6ebe6 0); position: relative; flex: none; }
.icring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.icring b { position: relative; font-size: 13px; }
.icfacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.icfact { background: #f5f7f4; border: 1px solid #e3e8e2; border-radius: 10px; padding: 6px 10px; display: grid; min-width: 120px; }
.icfact span { font-size: 11px; color: var(--muted, #6b746b); text-transform: uppercase; letter-spacing: .03em; }
.icfact b { font-weight: 600; font-size: 13px; }
.icgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.icsec { padding: 12px 14px; }
.icsec h3 { margin: 0 0 8px; font-size: 15px; }
.icdocs { grid-column: 1 / -1; }
.icrow { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; border-bottom: 1px solid #eef1ee; }
.icrow:last-child { border-bottom: 0; }
.icrow > label { font-size: 13px; color: #3c463c; }
.icrow.miss { background: #fff6e8; }
.icrow.miss > label { color: #8a4b00; font-weight: 600; }
.icval { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.icval input, .icval select { flex: 1; min-width: 120px; padding: 5px 8px; }
.icdocs .icval select { flex: 0 1 200px; }
.icv { flex: 1; word-break: break-word; }
.icc { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
@media (max-width: 640px) { .icrow { grid-template-columns: 1fr; gap: 4px; } .icgrid { grid-template-columns: 1fr; } }
/* Directory card: History tab */
.rc-hist { border: 1px solid #e3e8e2; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.rc-hist.undone { opacity: .6; }
.rc-hhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-hist ul { margin: 6px 0 4px; padding-left: 18px; font-size: 13px; }
.rc-hist li { margin: 2px 0; word-break: break-word; }
.rc-hist s { color: #8a8f8a; }
.rc-refresh.rc-claude { background: #fff; color: #1f2b23; border-color: #fff; }
/* Project › Monitoring */
.monbox { border: 1px solid #e3e8e2; background: #fafbf9; border-radius: 10px; padding: 10px 12px; }
.monbox.ok { background: #eef7f0; border-color: #cfe7d6; }
.monbox ol { list-style: none; padding: 0; margin: 6px 0; }
.monbox li { margin: 2px 0; color: #6b746b; } .monbox li.done { color: #1f6b3a; }
/* Homeowner portal › monitoring */
.cmon { display: flex; gap: 10px; align-items: center; }
.monlive { margin: 4px 0; padding: 4px 8px; border-radius: 6px; font-size: 13px; } .monlive.ok { background: #e3f4e8; } .monlive.bad { background: #fde7e5; }
tr.monbad td { background: #fff6f5; }
.req { color: #b42318; font-size: 15px; font-weight: 800; line-height: 1; margin-left: 2px; }   /* required: a red * after the label */
label > .lt { display: inline; white-space: nowrap; }   /* the label text and its * stay on one line */
label.reqmiss input, label.reqmiss select { border-color: #e5484d; background: #fff5f5; }
/* Project header, tidier: name + back + search on one line; key dates live in the stage bar */
.pstick .pjumprow h1 { margin: 0; }
.pstick .pjumprow { flex-wrap: nowrap; } .pstick .pjump { min-width: 200px; }
.stagebar div { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.stagebar .sb-date { display: block; font-size: 10.5px; font-weight: 500; opacity: .9; } .stagebar .sb-date i { font-style: normal; }
.stagebar div.now .sb-date { color: #fff; }
.sc-picks { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; align-items: end; } .sc-picks .stagepick { display: grid; gap: 1px; font-size: 11px; color: var(--muted); min-width: 0; }
.sc-picks .stagepick .muted { font-size: 11px; }
.sc-picks select, .sc-picks .stagepick #substage, .sc-picks .stagepick #stage { width: 100%; min-width: 0; font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 480px) { .sc-picks { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .pstick .pjumprow { flex-wrap: wrap; } .pstick .pjump { min-width: 0; flex: 1; } }
.pstick .pback { margin-left: 14px; white-space: nowrap; } .pstick .pjump { flex: 0 1 320px; }
/* HOA tag in the info bar opens the HOA card when an HOA is picked */
.pinfo > button.pinfo-hoa { border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04); background: var(--brand, #2f7d4f); border: 1px solid var(--brand, #2f7d4f); color: #fff; font-size: 17px; font-weight: 700; padding: 3px 14px; cursor: pointer; }
.pinfo > button.pinfo-hoa:hover { filter: brightness(1.1); }
/* ───────── Installer & dealer portals (same look as the Directory record cards) ───────── */
.ip { display: grid; gap: 12px; max-width: 1100px; }
.ip-hero { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #1f2b23; color: #fff; border-radius: 14px; padding: 14px 18px; }
.ip-hero > div { flex: 1; min-width: 200px; } .ip-hero h1 { margin: 0; color: #fff; font-size: 22px; border: 0; padding: 0; } .ip-hero .ip-sub { color: #c9d3cc; font-size: 13px; margin-top: 2px; }
.ip-back { color: var(--muted); font-size: 14px; }
.ip-card { background: #fff; border: 1px solid #dfe5df; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.ip-ch { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #f6f8f6; border-bottom: 1px solid #e4e9e4; border-left: 6px solid #3f7a4a; }
.ip-ch b { font-size: 15px; } .ip-cb { padding: 10px 14px 12px; display: grid; gap: 10px; }
.ip-minhead { cursor: pointer; user-select: none; } .ip-mintw { display: inline-block; width: 12px; font-size: 11px; color: #667; transform: rotate(90deg); transition: transform .15s; }
.ip-fmtbox { max-width: 560px; } .ip-badfiles { margin: 4px 0 8px; padding-left: 20px; } .ip-badfiles li { overflow-wrap: anywhere; }
.ip-fmthelp { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; } .ip-fmthelp > div { border: 1px solid #e4e9e4; border-radius: 10px; padding: 8px 12px; background: #fbfcfb; } .ip-fmthelp h4 { margin: 0 0 4px; } .ip-fmthelp ol { margin: 0; padding-left: 20px; } .ip-fmthelp li { margin: 3px 0; }
a.ip-helpbtn.ip-getapp, .ip-hero a.ip-helpbtn.ip-getapp { background: #1f5a38; color: #ffd34d; border: 1px solid #1f5a38; font-weight: 700; }
.ip-seenby { font-size: 12.5px; color: #c9d3cc; margin: 2px 0 4px; }
.ip-hero > .ip-seenby, .pagehead > .ip-seenby { flex: 1 1 100%; order: 99; text-align: center; margin: 2px 0 0; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); }
.pagehead > .ip-seenby { border-top-color: var(--line); } .ip-seenby b { color: #fff; font-weight: 600; } .ip-seenme { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #ffd34d; color: #3a2a00; font-weight: 700; font-size: 11.5px; }
.pagehead .ip-seenby { color: var(--muted); margin: 0; } .pagehead .ip-seenby b { color: var(--ink); }
.ip-allbar { display: flex; justify-content: flex-end; gap: 8px; margin: -2px 0 -4px; } .ip-allbar button { font-size: 14px; font-weight: 600; padding: 7px 14px; min-height: 40px; border-radius: 10px; color: #1f5a38; background: var(--btn-bg); border: 1px solid #b9dcc4; }
.ip-jumpbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 2px; margin: 0 -2px; background: var(--bg, #f4f6f5); }   /* wraps: every pill shows (Rick, Oct 30) */
.ip-jumpbar button { flex: none; font-size: 13px; font-weight: 600; padding: 6px 12px; min-height: 36px; border-radius: 999px; color: #1f5a38; background: var(--btn-bg); border: 1px solid #b9dcc4; white-space: nowrap; }   /* installer quick menu */
@media (max-width: 760px) { .ip-jumpbar { position: static; gap: 5px; padding: 6px 2px; }   /* 4 rows on a phone: scrolls away instead of covering the page (Rick, Oct 30) */ .ip-jumpbar button { font-size: 12.5px; padding: 3px 10px; min-height: 30px; } }
.dp .ip-card.dp-shut > .ip-cb { display: none; }   /* dealer job page: a collapsed card */
.dp-sdate { display: block; font-size: 11px; font-weight: 500; opacity: .8; margin-top: 1px; }   /* a date under each stage on the dealer stage bar */
.dp-maxwell { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin: 8px 0; border-radius: 10px; background: #f3f7f4; }
.ip-card.ip-min > :not(.ip-ch) { display: none; } .ip-card.ip-min > .ip-ch { border-bottom: 0; } .ip-card.ip-min .ip-mintw { transform: none; }
details.ip-card > summary { list-style: none; cursor: pointer; } details.ip-card > summary::-webkit-details-marker { display: none; }
details.ip-card.done > summary { border-bottom: 0; } details.ip-card.done[open] > summary { border-bottom: 1px solid #e4e9e4; }
.ip-doneline { color: #2f6b3a; font-size: 13px; } .ip-more { margin-left: auto; color: var(--muted); font-size: 12px; } details[open] > summary .ip-more { visibility: hidden; }
.ip-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #dfe5df; background: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12.5px; white-space: nowrap; color: #333; }
.ip-pill.p-ok { background: #e6f2e8; border-color: #a9d3b2; color: #1f6b3a; } .ip-pill.p-warn { background: #fff4d9; border-color: #f2c25c; color: #7a5600; }
.ip-pill.p-date { background: #eef4fa; border-color: #bcd3e8; color: #24557f; } .ip-pill.p-today { background: #1f6b3a; color: #fff; border-color: #1f6b3a; }
.ip-pill.p-bad { background: #fdeceb; border-color: #eea59d; color: #9b2c1f; }
/* phase colours */
.ph-ss .ip-ch, .ip-ch.ph-ss { border-left-color: #2f6f9f; background: #edf4fa; } .ph-in .ip-ch { border-left-color: #3f7a4a; background: #edf6ef; }
.ph-insp .ip-ch { border-left-color: #b07d12; background: #fcf4e2; } .ph-roof .ip-ch { border-left-color: #8a4b2a; background: #f8eee8; } .ph-docs .ip-ch { border-left-color: #6a4c93; background: #f3eef9; }
.ph-photos .ip-ch { border-left-color: #1f7a7a; background: #e8f4f4; } .ph-notes .ip-ch { border-left-color: #8a6d1f; background: #faf5e4; }
.ph-svc .ip-ch, .ip-ch.ph-svc { border-left-color: #b3261e; background: #fbeeec; } .ph-pay .ip-ch { border-left-color: #1f6b3a; background: #eef6f0; }
.ph-need .ip-ch { border-left-color: #c7801a; background: #fff6e3; } .ph-status .ip-ch { border-left-color: #1f2b23; background: #eef2ef; }
.ip-nextstep { display: flex; gap: 10px; align-items: baseline; background: #fffbea; border: 1px solid #f1df9f; border-radius: 10px; padding: 8px 12px; font-size: 14.5px; }
.ip-nextstep > span:first-child { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6d1f; flex: none; }
.ip-btn { font-size: 15px; padding: 9px 14px; border-radius: 10px; }
.ip-trades { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ip-blk:empty { display: none; } .ip-blk { border-top: 1px dashed #e4e9e4; padding-top: 8px; } .ip-blk .trade { padding: 4px 0; }
.ip-note { background: #f6f8f6; border-radius: 8px; padding: 7px 10px; font-size: 13.5px; color: #445; }
/* summary card */
.ip-sumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; padding: 12px 16px 6px; }
.ip-sumgrid dl { margin: 0; display: grid; gap: 6px; align-content: start; }
.ip-sumgrid dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; border-left: 2px solid #e4e9e4; padding-left: 8px; }
.ip-sumgrid dt { font-size: 12px; color: #667; padding-top: 2px; } .ip-sumgrid dd { margin: 0; overflow-wrap: anywhere; font-size: 14.5px; } .ip-sumgrid dd .ip-pill { margin: 0 4px 3px 0; }
.ip-big { font-size: 17px; letter-spacing: .04em; }
#icheck:empty { display: none; }
.ip-checkin { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 16px 12px; border-top: 1px solid #eef1ee; } .ip-checkin button.done { opacity: .6; }
/* job list */
.ip-search input { width: 100%; font-size: 16px; padding: 10px 14px; border-radius: 12px; }
.pk-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pk-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; } .ip, .ip > * { min-width: 0; }
.pk-tab { border: 1px solid #dfe5df; background: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 700; color: #445; cursor: pointer; font-size: 13.5px; }
.pk-tab span { background: #ece7d6; border-radius: 999px; padding: 0 7px; font-size: 11.5px; margin-left: 3px; color: #333; }
.pk-tab.on { background: #1f2b23; color: #fff; border-color: #1f2b23; } .pk-tab.on span { background: #e8b84a; color: #1f2b23; }
.pk-tab.warn:not(.on) span { background: #f2c25c; } .pk-tab.bad:not(.on) span { background: #eea59d; } .pk-tab.amber:not(.on) span { background: #f2c25c; }
.pk-sort { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); } .pk-sort select { width: auto; }
.ip-list { display: grid; gap: 8px; }
.ip-job { display: flex; gap: 12px; align-items: stretch; background: #fff; border: 1px solid #dfe5df; border-left: 6px solid #9aa79f; border-radius: 12px; padding: 10px 14px; color: inherit !important; text-decoration: none; }
.ip-job:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.ip-jmain { flex: 1; min-width: 0; display: grid; gap: 3px; } .ip-jname b { font-size: 16px; } .ip-jaddr { color: #556; font-size: 13.5px; }
.ip-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.ip-acts { font-size: 13px; color: #7a5600; background: #fff7e0; border-radius: 8px; padding: 4px 8px; margin-top: 3px; }
.ip-newmsg { font-size: 13px; font-weight: 600; color: #1f4f8a; background: #e8f0fb; border-radius: 8px; padding: 3px 8px; margin: 3px 0; display: inline-block; }
.ip-jside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ip-stage { border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 800; white-space: nowrap; background: #eef1ef; color: #445; }
.ip-next { display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 14px; color: #24557f; } .ip-next small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.ip-next.today { color: #1f6b3a; } .ip-next.past { color: #778; } .ip-next.none { color: #99a; font-weight: 500; font-size: 12.5px; }
.ip-empty { padding: 24px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #dfe5df; border-radius: 12px; }
.ip-row { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #e4e9e4; color: inherit !important; text-decoration: none; flex-wrap: wrap; }
/* bucket colours (list stripe + stage chip) */
.ip-job.b-ss { border-left-color: #2f6f9f; } .ip-stage.b-ss { background: #e3eef8; color: #24557f; }
.ip-job.b-sched { border-left-color: #1f7a7a; } .ip-stage.b-sched { background: #dff1f1; color: #145c5c; }
.ip-job.b-prog { border-left-color: #3f7a4a; } .ip-stage.b-prog { background: #e2f1e5; color: #1f6b3a; }
.ip-job.b-insp { border-left-color: #b07d12; } .ip-stage.b-insp { background: #fbefd3; color: #7a5600; }
.ip-job.b-done { border-left-color: #1f2b23; } .ip-stage.b-done { background: #1f6b3a; color: #fff; }
.ip-job.b-cxl { border-left-color: #9aa0a6; opacity: .8; } .ip-stage.b-cxl { background: #e3e5e8; color: #555; }
.ip-hero .ip-stage { font-size: 14px; padding: 5px 14px; }
/* photos */
.ip-req { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ip-req > b { width: 100%; color: #445; }
.ip-reqi { display: inline-flex; gap: 5px; align-items: center; border-radius: 10px; padding: 6px 10px; border: 1px solid #a9d3b2; background: #eef7f0; font-size: 13.5px; cursor: pointer; color: #1f4d2c; }
.ip-reqi.miss { border-color: #f2c25c; background: #fff4d9; color: #7a5600; font-weight: 600; } .ip-reqi span { font-size: 11.5px; opacity: .85; } .ip-reqi i { font-style: normal; font-weight: 800; margin-left: 2px; }
.ip-add { background: #e8b84a; border-color: #e8b84a; color: #1f2b23; font-weight: 800; border-radius: 10px; padding: 7px 12px; }
.ip-fphase { display: grid; gap: 4px; } .ip-fph { font-weight: 800; font-size: 13px; letter-spacing: .03em; color: #445; margin-top: 2px; }
details.ip-fphase > summary.ip-fph { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; user-select: none; padding: 6px 0; min-height: 36px; }
details.ip-fphase > summary.ip-fph::-webkit-details-marker { display: none; }
.ip-ftw { display: inline-block; width: 12px; font-size: 11px; color: #667; transition: transform .15s; } details.ip-fphase[open] > summary .ip-ftw { transform: rotate(90deg); }
details.ip-fphase[open] > .ip-fgrid { margin-bottom: 6px; }
.ip-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; } .ip-folder.has[open] { grid-column: 1 / -1; }
.ip-reqi.later, .ip-folder.later { border-style: dashed; } .ip-reqi.later { background: #fff; border-color: #c9d3cc; color: #667; }
.ip-folder { border: 1px solid #e4e9e4; border-radius: 10px; background: #fbfcfb; } .ip-folder.miss { border-color: #f2c25c; background: #fffaeb; }
.ip-folder > summary { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; cursor: pointer; list-style: none; font-size: 14px; } .ip-folder > summary::-webkit-details-marker { display: none; }
.ip-folder > summary > span:first-child { flex: 1; } .ip-fn { font-size: 12px; background: #ece7d6; border-radius: 999px; padding: 0 8px; } .ip-folder.miss .ip-fn { background: #f2c25c; }
.ip-fn.ok { background: #d6efdc; color: #1f4d2c; font-weight: 700; }
.ip-folder, details.ip-fphase, #photoscard { scroll-margin-top: 12px; }
/* Phase card → its photos in the Photos card at the top (Rick, Oct 16: no photo checklist on the phase cards). */
.ip-gophotos { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 6px 0 2px; border-radius: 10px; padding: 7px 12px; min-height: 40px; border: 1px solid #f2c25c; background: #fff4d9; color: #7a5600; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.ip-gophotos span { font-size: 12px; background: #f2c25c; border-radius: 999px; padding: 0 8px; } .ip-gophotos i { font-style: normal; font-weight: 800; }
.ip-gophotos.ok { border-color: #a9d3b2; background: #eef7f0; color: #1f4d2c; font-weight: 500; }
.ip-plus { width: 34px; height: 30px; padding: 0; border-radius: 8px; font-size: 18px; font-weight: 800; background: #fff; }
.pfthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; padding: 0 8px 8px; }
.pfthumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: #eef1ee; }
.pffile { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid #e4e9e4; border-radius: 8px; font-size: 22px; text-decoration: none; overflow: hidden; }
.pffile span { font-size: 10.5px; padding: 0 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; color: #445; }
.ip-srcbox { max-width: 380px; } .ip-srcpick { display: flex; flex-direction: column; gap: 10px; } .ip-srcpick button { min-height: 52px; font-size: 16px; } .ip-srcpick small { display: block; font-size: 12px; font-weight: 400; color: #667; }
.ip-pickbox { max-width: 640px; } .ip-pick { margin-bottom: 10px; } .ip-pick > b { display: block; margin-bottom: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #445; }
.ip-pick > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ip-pickb { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 84px; justify-content: center; border-radius: 12px; border: 2px solid #dfe5df; background: #fff; font-size: 26px; cursor: pointer; }
.ip-pickb span { font-size: 14px; font-weight: 700; color: #1f2b23; text-align: center; } .ip-pickb small { font-size: 11px; color: var(--muted); }
.ip-pickb.miss { border-color: #f2c25c; background: #fff8e6; } .ip-pickb.miss small { color: #7a5600; font-weight: 700; }
.ph-ss.ip-pick > b { color: #24557f; } .ph-in.ip-pick > b { color: #1f6b3a; } .ph-insp.ip-pick > b { color: #7a5600; } .ph-roof.ip-pick > b { color: #8a4b2a; }
/* documents & notes */
.ip-docg { display: grid; gap: 3px; } .ip-docg > b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6a4c93; }
.ip-doc { display: block; padding: 6px 10px; border: 1px solid #e4e9e4; border-radius: 8px; text-decoration: none; overflow-wrap: anywhere; }
.ip-feed { display: grid; gap: 6px; max-height: 420px; overflow: auto; } .ip-msg { background: #f6f8f6; border-radius: 10px; padding: 7px 10px; font-size: 14px; margin-right: 40px; }
.ip-msg.mine { background: #fffbea; margin: 0 0 0 40px; } .ip-msg .when { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg-feed .ip-msg [data-unread] { visibility: hidden; } .msg-feed .ip-msg:hover [data-unread], .msg-feed .ip-msg [data-unread]:focus { visibility: visible; }   /* Mark unread (Nov 16): on hover; the header button on phones */
.ip-ticket { border-bottom: 1px dashed #e4e9e4; padding-bottom: 8px; }
/* project Files tab: photo folders */
.pfbar { display: grid; gap: 6px; margin: 8px 0; } .pfphase { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .pfphase > b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; min-width: 92px; }
.pfphase.ph-ss > b { color: #24557f; } .pfphase.ph-in > b { color: #1f6b3a; } .pfphase.ph-insp > b { color: #7a5600; } .pfphase.ph-roof > b { color: #8a4b2a; } .pfphase.ph-other > b { color: #667; } .pfphase.ph-des > b { color: #6a4c93; }
.pfchip { display: inline-flex; gap: 5px; align-items: center; border: 1px solid #dfe5df; background: var(--btn-bg); border-radius: 999px; padding: 2px 10px; font-size: 13px; cursor: pointer; }
.pfchip span { background: #ece7d6; border-radius: 999px; padding: 0 6px; font-size: 11px; } .pfchip.on { background: #1f2b23; color: #fff; border-color: #1f2b23; } .pfchip.on span { background: #e8b84a; color: #1f2b23; }
.pfchip.miss { border-color: #f2c25c; background: #fff4d9; } .pfchip.need { border-color: #f2c25c; } .pfchip.need i { font-style: normal; font-size: 10.5px; color: #7a5600; } .pfadmin { display: grid; gap: 6px; }
.panel .pfthumbs { padding: 0 0 8px; }
@media (max-width: 760px) {
  .ip-sumgrid { grid-template-columns: 1fr; gap: 6px; } .ip-sumgrid dl > div { grid-template-columns: 96px minmax(0, 1fr); }
  .ip-job { flex-direction: column; } .ip-jside { flex-direction: row; align-items: center; justify-content: space-between; } .ip-next { align-items: flex-start; }
  .pk-bar { flex-direction: column; align-items: stretch; } .pk-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; max-width: 100%; } .pk-tab { flex: none; } .pk-sort { justify-content: flex-end; }
  .ip-hero { padding: 12px 14px; } .ip-hero h1 { font-size: 20px; }
}
/* Dealer portal */
.dp-new { background: #e8b84a; color: #1f2b23 !important; font-weight: 800; border-radius: 10px; padding: 9px 14px; text-decoration: none; }
.dp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dp-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 1px solid #dfe5df; border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.04); font: inherit; cursor: pointer; }
div.dp-kpi { cursor: default; } .dp-kpi > span { font-size: 12px; color: #667; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; } .dp-kpi b { font-size: 28px; color: #1f2b23; line-height: 1.1; } .dp-kpi small { color: #778; font-size: 12px; }
.dp-kpi.warn { border-color: #f2c25c; background: #fffaeb; } .dp-kpi.warn b { color: #9a6400; } .dp-kpi.money { background: #1f2b23; border-color: #1f2b23; } .dp-kpi.money span, .dp-kpi.money small { color: #c9d3cc; } .dp-kpi.money b { color: #e8b84a; }
.dp-flag { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; border-radius: 10px; padding: 6px 12px; margin-bottom: 4px; }
.dp-flag b { font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; } .dp-flag span { font-size: 13.5px; font-weight: 600; }
.dp-flag.big { padding: 12px 18px; border-radius: 14px; } .dp-flag.big b { font-size: 22px; } .dp-flag.big span { font-size: 15px; }
.dp-flag.fl-hold { background: #fff1cc; color: #7a5200; border: 2px solid #f0b429; } .dp-flag.fl-jeop { background: #c62828; color: #fff; border: 2px solid #c62828; } .dp-flag.fl-cxl { background: #e3e5e8; color: #3c4043; border: 2px solid #9aa0a6; }
.ip-job.fl-hold { border-left-color: #f0b429; } .ip-job.fl-jeop { border-left-color: #c62828; } .ip-job.fl-cxl { border-left-color: #9aa0a6; opacity: .85; }
.ip-job.t-installed { border-left-color: #3f7a4a; } .ip-job.t-pto { border-left-color: #1f2b23; } .ip-job.t-active { border-left-color: #2f6f9f; }
.ip-stage.fl-hold { background: #f0b429; color: #3d2a00; } .ip-stage.fl-jeop { background: #c62828; color: #fff; } .ip-stage.fl-cxl { background: #9aa0a6; color: #fff; }
.dp-status { font-size: 14px; display: flex; gap: 4px 10px; flex-wrap: wrap; } .dp-status span { color: #556; }
.dp-mini { display: flex; align-items: center; gap: 3px; } .dp-mini i { width: 14px; height: 6px; border-radius: 3px; background: #dfe5df; } .dp-mini i.done { background: #8fbf99; } .dp-mini i.now { background: #1f6b3a; width: 22px; }
.dp-mini.flagged i.now { background: #c7801a; } .dp-mini span { font-size: 11.5px; color: #556; margin-left: 4px; font-weight: 700; }
.dp-money { display: flex; flex-direction: column; align-items: flex-end; } .dp-money b { font-size: 15px; color: #1f6b3a; } .dp-money small { font-size: 11.5px; color: var(--muted); }
.dp-bar.flagged div.now { background: #c7801a; } .dp-bar.flagged.fl-jeop div.now { background: #c62828; }
.dp-now { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .dp-now b { font-size: 18px; }
.dp-need { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid #f1df9f; background: #fffbea; border-radius: 10px; padding: 8px 12px; font-size: 14.5px; }
.ph-need.done .ip-ch { background: #eef6f0; border-left-color: #3f7a4a; color: #1f6b3a; border-bottom: 0; }
.dp-fin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dp-finbig { border: 1px solid #dfe5df; border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; } .dp-finbig span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #667; font-weight: 700; }
.dp-finbig b { font-size: 26px; color: #1f2b23; } .dp-finbig small { color: #667; } .dp-finbig.com { background: #1f2b23; border-color: #1f2b23; } .dp-finbig.com span, .dp-finbig.com small { color: #c9d3cc; } .dp-finbig.com b { color: #e8b84a; }
.dp-split { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #eef1ee; } .dp-split i { min-width: 3px; }
.s-epc { background: #6b8f78; } .s-fee { background: #c9a227; } .s-com { background: #1f6b3a; }
.dp-legend { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13.5px; } .dp-legend div { display: flex; gap: 6px; align-items: center; } .dp-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .dp-legend small { color: var(--muted); }
.dp-mss { display: flex; align-items: stretch; gap: 0; } .dp-msline { flex: 0 0 18px; align-self: center; height: 3px; background: #dfe5df; }
.dp-ms { flex: 1; display: grid; gap: 2px; justify-items: start; border: 1px solid #dfe5df; border-radius: 12px; padding: 10px 12px; background: #fff; }
.dp-ms b { font-size: 14px; } .dp-ms > span { font-size: 18px; font-weight: 800; color: #1f2b23; } .dp-ms small { color: #667; font-size: 12px; }
.dp-msdot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: #eef1ee; color: #556; }
.dp-ms.ms-paid { background: #eef7f0; border-color: #a9d3b2; } .dp-ms.ms-paid .dp-msdot { background: #1f6b3a; color: #fff; }
.dp-ms.ms-approved { background: #fffaeb; border-color: #f2c25c; } .dp-ms.ms-approved .dp-msdot { background: #e8b84a; color: #1f2b23; } .dp-ms.ms-not_yet { opacity: .75; } .dp-ms.ms-due { background: #eef4fa; border-color: #bcd3e8; } .dp-ms.ms-due .dp-msdot { background: #2f6f9f; color: #fff; }
.dp-sow summary { cursor: pointer; font-weight: 700; color: #1f6b3a; } .dp-sow table { margin-top: 6px; } .dp-tot td { font-weight: 800; border-top: 2px solid #dfe5df; }
.dp-other { display: flex; gap: 6px; flex-wrap: wrap; } .p-exp { border-style: dashed; }
details.ip-card.ph-other > summary { list-style: none; cursor: pointer; } .ph-other .ip-ch { border-left-color: #9aa79f; }
@media (max-width: 900px) { .dp-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .dp-fin { grid-template-columns: 1fr; } .dp-mss { flex-direction: column; } .dp-msline { flex: 0 0 10px; width: 3px; height: auto; margin-left: 24px; align-self: stretch; } .dp-flag.big b { font-size: 18px; } .dp-kpi b { font-size: 22px; } }

/* HOA: dates with countdown and Today / Yesterday, decision-due countdown, progress steps, documents, timeline */
.sdate { display: flex; flex-direction: column; gap: 3px; }
.sdmeta { font-size: 12px; color: var(--muted); font-weight: 400; }
.sdmeta:empty { display: none; }
.sdq { display: flex; gap: 4px; }
.sdq[hidden] { display: none; }
.sdq button { padding: 1px 8px; font-size: 12px; font-weight: 600; }
.sdue { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 36px; font-weight: 400; }
.sdue > span { color: var(--muted); font-size: 13px; }
.sdue.late b, .sdue.late > span { color: var(--bad); font-weight: 700; }
.hoasteps { display: flex; gap: 6px; margin: 8px 0 2px 22px; flex-wrap: wrap; }
.hstep { flex: 1; min-width: 120px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 13px; display: flex; flex-direction: column; font-weight: 400; }
.hstep b { font-weight: 700; }
.hstep small { color: var(--muted); font-size: 12px; }
.hstep.done { background: #e8f6ec; border-color: #a8d8b5; color: #1d4d2c; }
.hstep.cur { background: #fff8e6; border-color: #f0d58a; color: #5a4300; }
.hstep.bad { background: #fde7e5; border-color: #f3b4ad; color: var(--bad); }
.hoadocs { display: flex; flex-direction: column; gap: 4px; }
.hoadoc { display: grid; grid-template-columns: 250px 190px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-weight: 400; font-size: 14px; }
.hoadoc > label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.hoadoc > label input { width: auto; margin: 0; }
.hoadocc { display: flex; gap: 4px; flex-wrap: wrap; }
.hoadocf { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; min-width: 0; }
label.btn.hoaup { display: inline-block; width: auto; margin: 0; white-space: nowrap; font-weight: 600; }
@media (max-width: 760px) { .hoadoc { grid-template-columns: 1fr auto; } .hoadocc, .hoadocf { grid-column: 1 / -1; } }
.hoatl > div { padding: 2px 0; }
.hoatli { display: inline-block; width: 22px; }
.hoaup { margin-top: 8px; display: inline-block; cursor: pointer; font-size: 13px; padding: 4px 10px; }
.hoaprow { padding: 6px 0; border-bottom: 1px solid var(--line); gap: 10px; }
/* Portal job pages: contact line in the black band, action strip under the name, summary tiles across the full width */
.ip-hero h1 small { font-size: 13px; font-weight: 500; color: #c9d3cc; margin-left: 6px; }
.ip-hcontact { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 6px; } .ip-hcontact > * { min-width: 0; overflow-wrap: anywhere; }
.ip-hlink { color: #fff !important; text-decoration: none; font-size: 15px; font-weight: 600; border-bottom: 1px dotted rgba(255,255,255,.45); }
.ip-hlink:hover { color: #e8b84a !important; border-bottom-color: #e8b84a; } a.ip-call.ip-hlink { color: #e8b84a !important; }
span.ip-hlink.ip-hmuted { color: #c9d3cc !important; font-weight: 500; border-bottom: 0; }
.ip-strip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid #dfe5df; border-radius: 14px; padding: 8px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.04); }
.ip-strip:empty { display: none; } .ip-strip .ip-checkin { padding: 0; border: 0; width: 100%; }
.ip-strip button, .ip-strip .btn { border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.ip-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 2px 0; padding: 4px 6px; }
.ip-fact { margin: 0; padding: 5px 10px; border-left: 2px solid #e4e9e4; min-width: 0; } .ip-fact.wide { grid-column: span 2; }
.ip-fact dt { font-size: 11.5px; color: #667; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; } .ip-fact dd { margin: 1px 0 0; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.ip-today { background: #1f6b3a; color: #fff; border-radius: 6px; padding: 0 6px; font-weight: 700; } .dp-planned { color: #24557f; } .dp-planned small { color: var(--muted); }
@media (max-width: 760px) { .ip-facts { grid-template-columns: 1fr 1fr; } .ip-fact.wide { grid-column: 1 / -1; } .ip-strip button, .ip-strip .btn { flex: 1 1 auto; } }
/* Weekly Pipeline (dealer commission board) */
.wp { max-width: none; } .wp-hbtns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wp-hbtns button, .wp-hbtns .btn { border-radius: 10px; font-weight: 700; background: var(--btn-bg); color: #1f2b23 !important; border: 1px solid var(--btn-line); padding: 8px 12px; } .wp-hbtns button.on { background: #e8b84a; border-color: #e8b84a; color: #1f2b23; }
.wp-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .wp-tools .pk-bar { flex: 0 1 auto; }
.wp-since { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fffbea; border: 1px solid #f1df9f; border-radius: 10px; padding: 6px 12px; font-size: 13.5px; } .wp-since select { width: auto; }
.wp-scroll { overflow-x: scroll; overflow-y: auto; max-height: calc(100vh - 230px); border: 1px solid #dfe5df; border-radius: 0 0 12px 12px; background: #fff; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: auto; scrollbar-color: #9aa79f #eef1ee; }
.wp-scroll:focus { outline: 2px solid #e8b84a; outline-offset: -2px; } .wp-scroll.dragging { cursor: grabbing; user-select: none; }
.wp-scroll::-webkit-scrollbar, .wp-topbar::-webkit-scrollbar { height: 14px; width: 12px; } .wp-scroll::-webkit-scrollbar-track, .wp-topbar::-webkit-scrollbar-track { background: #eef1ee; }
.wp-scroll::-webkit-scrollbar-thumb, .wp-topbar::-webkit-scrollbar-thumb { background: #9aa79f; border-radius: 8px; border: 3px solid #eef1ee; } .wp-scroll::-webkit-scrollbar-thumb:hover, .wp-topbar::-webkit-scrollbar-thumb:hover { background: #6d7c72; }
.wp-topbar { overflow-x: scroll; overflow-y: hidden; height: 16px; border: 1px solid #dfe5df; border-bottom: 0; border-radius: 12px 12px 0 0; background: #f6f8f6; scrollbar-color: #9aa79f #eef1ee; } .wp-topbar > div { height: 1px; }
.wp-topbar[hidden] + .wp-scroll { border-radius: 12px; }
.wp-colbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .wp-colbar > b { font-size: 13px; color: #445; }
.wp-gchip { border: 1px solid #cfd8d1; background: var(--btn-bg); border-radius: 999px; padding: 3px 11px; font-weight: 700; font-size: 13px; color: #778; cursor: pointer; } .wp-gchip span { font-size: 11px; opacity: .7; }
.wp-gchip.on { color: #1f2b23; border-width: 2px; } .wp-gchip.on.g-job { border-color: #2f6f9f; background: #edf4fa; } .wp-gchip.on.g-finance { border-color: #1f6b3a; background: #eef6f0; } .wp-gchip.on.g-m1 { border-color: #b07d12; background: #fcf4e2; }
.wp-gchip.on.g-m2 { border-color: #c7801a; background: #fff6e3; } .wp-gchip.on.g-pay { border-color: #2d6a2d; background: #eaf5ea; } .wp-gchip.on.g-miles { border-color: #1f7a7a; background: #e8f4f4; } .wp-gchip.on.g-comments { border-color: #6a4c93; background: #f3eef9; }
.wp-gall { font-size: 12.5px; padding: 3px 10px; } .wp-scrollbtns { display: inline-flex; gap: 4px; } .wp-scrollbtns button { font-size: 16px; padding: 3px 14px; font-weight: 800; } .wp-hint { flex-basis: 100%; text-align: right; }
.wp-table { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.wp-table th { position: sticky; top: 0; z-index: 4; background: #1f2b23; color: #fff; font-weight: 700; padding: 7px 8px; text-align: left; white-space: nowrap; cursor: pointer; user-select: none; border-right: 1px solid #34443a; }
.wp-table th.on { background: #2f4a38; color: #e8b84a; } .wp-table th.num, .wp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.wp-table td { padding: 5px 8px; border-bottom: 1px solid #eef1ee; border-right: 1px solid #f3f5f3; vertical-align: top; white-space: nowrap; }
.wp-table tbody tr:hover td { background: #f6faf7; } .wp-table td.wp-name { white-space: normal; min-width: 150px; }
/* Commission bills (public/jobcosts.js): fits the box and wraps, so This job / Not this job stay on screen (a max-content table put them ~800px off to the right). */
.wp-table.jc-comm { width: 100%; } .wp-table.jc-comm td { white-space: normal; } .wp-table.jc-comm td:first-child, .wp-table.jc-comm td.num { white-space: nowrap; } .wp-table.jc-comm td:last-child { min-width: 340px; }
.wp-table tfoot td { position: sticky; bottom: 0; background: #eef2ef; border-top: 2px solid #1f2b23; padding: 7px 8px; white-space: nowrap; }
.wp-table td.wp-hl { background: #fff3c4 !important; } .wp-new td:first-child { box-shadow: inset 4px 0 #1f6b3a; }
.wp-newchip { background: #1f6b3a; color: #fff; border-radius: 4px; font-size: 10.5px; font-weight: 800; padding: 0 5px; }
tr.wp-fl-on_hold td { background: #fff8e1; } tr.wp-fl-on_hold td:first-child { box-shadow: inset 6px 0 #f0b429; }
tr.wp-fl-job_in_jeopardy td { background: #fdecea; } tr.wp-fl-job_in_jeopardy td:first-child { box-shadow: inset 6px 0 #c62828; }
.wp-stage { display: inline-block; border-radius: 999px; padding: 1px 9px; font-weight: 700; background: #eef1ee; color: #334; white-space: nowrap; }
.wp-stage.st-hold { background: #f0b429; color: #3d2a00; font-weight: 900; text-transform: uppercase; padding: 2px 10px; }
.wp-stage.st-risk { background: #c62828; color: #fff; font-weight: 900; text-transform: uppercase; padding: 2px 10px; }
.wp-stage.st-done { background: #1f6b3a; color: #fff; } .wp-stage.st-cxl { background: #9aa0a6; color: #fff; } .wp-stage.st-pto { background: #dff1f1; color: #145c5c; }
.wp-stage.st-inst { background: #e2f1e5; color: #1f6b3a; } .wp-stage.st-cx { background: #fff4d9; color: #7a5600; }
.wp-com { min-width: 230px; max-width: 300px; white-space: normal !important; }
.wp-combtn { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.wp-combtn:hover { color: #1f6b3a; } .wp-cd { font-weight: 800; color: #24557f; margin-right: 3px; } .wp-more { display: block; font-size: 11px; color: var(--muted); }
.wp-cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0; } .wp-cgrid h3 { margin: 0 0 6px; font-size: 14px; }
.wp-ch { border-left: 3px solid #e4e9e4; padding: 4px 8px; margin-bottom: 6px; font-size: 14px; } .wp-cadd { border-top: 1px solid #e4e9e4; padding-top: 10px; display: grid; gap: 6px; }
.wp-h { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 16px; } .wp-h span { background: #ece7d6; border-radius: 999px; padding: 0 9px; font-size: 13px; }
.wp-rest > summary { list-style: none; cursor: pointer; } .wp-rest > summary::-webkit-details-marker { display: none; }
.wp-mcard { background: #fff; border: 1px solid #dfe5df; border-left: 6px solid #9aa79f; border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; display: grid; gap: 6px; }
.wp-mcard.wp-fl-on_hold { border-left-color: #f0b429; background: #fffaeb; } .wp-mcard.wp-fl-job_in_jeopardy { border-left-color: #c62828; background: #fdf1f0; }
.wp-mhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .wp-mhead b { font-size: 15px; }
.wp-att { color: #7a5600; font-size: 13.5px; font-weight: 600; } .wp-chg { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: #24557f; font-weight: 600; }
.wp-mcoms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .wp-mcoms .wp-combtn { border: 1px solid #eef1ee; border-radius: 8px; padding: 6px 8px; -webkit-line-clamp: 2; }
.wp-meet textarea { width: 100%; } tr.pi-un td { background: #fff8e6; }
@media (max-width: 760px) { .wp-cgrid, .wp-mcoms { grid-template-columns: 1fr; } .wp-scroll { max-height: none; } }
.wp-table td.wp-stick { position: sticky; z-index: 1; background: #fff; } .wp-table th.wp-stick { position: sticky; z-index: 3; } .wp-table tfoot td.wp-stick { background: #eef2ef; z-index: 2; }
tr.wp-fl-on_hold td.wp-stick { background: #fff8e1; } tr.wp-fl-job_in_jeopardy td.wp-stick { background: #fdecea; } .wp-table td.wp-stick.wp-hl { background: #fff3c4 !important; }
.wp-table .wp-stick-last { box-shadow: 3px 0 0 #c9d3cc; }
.wp-table th.wp-stick { z-index: 6 !important; }
.wp-table .wp-grow th { padding: 3px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; text-align: center; cursor: default; border-bottom: 1px solid #34443a; }
.wp-table .wp-grow th.g-job { background: #24557f; } .wp-table .wp-grow th.g-finance { background: #1f6b3a; } .wp-table .wp-grow th.g-m1 { background: #8a6200; } .wp-table .wp-grow th.g-m2 { background: #a5620f; }
.wp-table .wp-grow th.g-pay { background: #2d6a2d; } .wp-table .wp-grow th.g-miles { background: #145c5c; } .wp-table .wp-grow th.g-comments { background: #533a78; }
.wp-table .wp-grow th.wp-stick { text-align: left; }
.wp-nl { font-weight: 800; color: #1f2b23 !important; text-decoration: none; border-bottom: 1px dotted #9aa79f; } .wp-nl:hover { color: #24557f !important; border-bottom-color: #24557f; }
.wp-table td.wp-hasnote { position: relative; } .wp-table td.wp-hasnote::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent #e8a33d transparent transparent; }
.wp-note { border: 0; background: none; padding: 0 2px; color: #b07d12; font-size: 12px; cursor: pointer; }
.wp-hover { position: fixed; z-index: 3000; max-width: min(460px, calc(100vw - 16px)); max-height: 60vh; overflow: auto; background: #fff; color: #1d2a22; border: 1px solid #cfd8d2; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.18); padding: 10px 12px; font-size: 15px; line-height: 1.45; pointer-events: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.wp-hover .wp-hv { margin-bottom: 8px; } .wp-hover .wp-hv.old { font-size: 13px; opacity: .75; border-top: 1px dashed #dfe5e1; padding-top: 6px; }
.wp-combtn.hist { border-left: 3px solid #b39ddb; padding-left: 6px; } .wp-ch.same { opacity: .6; }
/* Comment history: one panel, at most 60% of the screen, with its own scroll bar (newest at the top); the page never grows */
.wp-histwrap { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #e4e9e4; border-radius: 10px; padding: 0 10px 8px; margin: 10px 0; background: #fff; }
.wp-histwrap .wp-cgrid { margin: 0; align-items: start; } .wp-histwrap h3 { position: sticky; top: 0; z-index: 1; background: #fff; padding: 8px 0 6px; margin: 0; border-bottom: 1px solid #eef1ee; }
.wp-histwrap > .wp-ch:first-child { margin-top: 8px; } .wp-histwrap .wp-othernotes summary { position: sticky; top: 0; background: #fff; padding: 6px 0; }
.wp-ch { overflow-wrap: anywhere; }
/* Comment cells: latest entry clamped (3 lines in the table, 2 in meeting mode), then "more" / "N earlier" */
.wp-cell { display: grid; gap: 1px; min-width: 0; } .wp-cell .wp-combtn { max-height: calc(1.4em * 3); line-height: 1.4; overflow-wrap: anywhere; }
.wp-cmore { justify-self: start; border: 0; background: none; padding: 0; font-size: 11.5px; font-weight: 700; color: #5b3f8c; cursor: pointer; } .wp-cmore:hover { text-decoration: underline; }
.wp-mcoms .wp-cell { border: 1px solid #eef1ee; border-radius: 8px; padding: 6px 8px; } .wp-mcoms .wp-cell .wp-combtn { border: 0; padding: 0; -webkit-line-clamp: 2; max-height: calc(1.4em * 2); }
.wp-side { font-size: 11px; color: #556; } .pi-coms { max-height: 40vh; overflow: auto; }
.wp-othernotes { margin-top: 10px; } .wp-othernotes summary { cursor: pointer; font-weight: 700; }
.wp-yes { color: #1f6b3a; }
.ip-reqi.open { background: #fff; border-color: #c9d3cc; color: #445; }
/* ───────── Homeowner portal (same look as the installer & dealer portals; phone first) ───────── */
.ho-hero { align-items: flex-start; } .ho-hero h1 small { font-size: 13px; font-weight: 500; color: #c9d3cc; margin-left: 6px; }
.ho-pm { display: flex; flex-direction: column; gap: 2px; flex: none !important; min-width: 0 !important; background: rgba(255,255,255,.07); border-radius: 10px; padding: 8px 12px; }
.ho-pm > span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #c9d3cc; } .ho-pm b { font-size: 16px; color: #fff; }
.ho-bandbtns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: none !important; min-width: 0 !important; align-self: center; }
.ho-bandbtn { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 13px; }
.ho-bandbtn:hover { background: rgba(255,255,255,.24); }   /* Need service / Monitoring jump buttons in the homeowner band */
.ho-switch { margin-top: 8px; width: auto; max-width: 100%; font-size: 14px; }
.ho-flag { display: grid; gap: 4px; background: #fff6df; border: 2px solid #f0b429; color: #6b4a00; border-radius: 14px; padding: 12px 16px; }
.ho-flag b { font-size: 18px; font-weight: 900; } .ho-flag span { font-size: 15px; line-height: 1.4; }
.ho-track { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); padding: 14px 10px 12px; }
.ho-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 0 3px; }
.ho-step::before { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 4px; background: #e4e9e4; z-index: 0; }
.ho-step:first-child::before { display: none; } .ho-step.done::before, .ho-step.now::before { background: #3f7a4a; }
.ho-step i { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 14px; background: #fff; border: 3px solid #d3dad4; color: #889; }
.ho-step.done i { background: #3f7a4a; border-color: #3f7a4a; color: #fff; } .ho-step.now i { background: #e8b84a; border-color: #1f2b23; color: #1f2b23; box-shadow: 0 0 0 4px rgba(232,184,74,.3); }
.ho-step.paused i { background: #fff1cc; border-color: #f0b429; color: #7a5200; }
.ho-step b { font-size: 12.5px; line-height: 1.2; color: #1f2b23; } .ho-step.todo b { color: #778; font-weight: 600; } .ho-step small { font-size: 11.5px; color: #667; line-height: 1.2; }
.ho-step.now b { font-size: 13.5px; font-weight: 900; } .ho-step.now small { color: #7a5600; font-weight: 700; }
.ho-next { font-size: 17px; font-weight: 700; line-height: 1.35; color: #1f2b23; }
.ho-nextmeta { display: flex; gap: 18px; flex-wrap: wrap; } .ho-nextmeta span { display: flex; flex-direction: column; font-weight: 700; font-size: 14.5px; }
.ho-nextmeta small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #667; font-weight: 700; }
.ho-wifi { display: flex; gap: 6px; flex-wrap: wrap; } .ho-wifi input { width: 160px; }
.ho-appt { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid #e4e9e4; border-left: 5px solid #2f6f9f; border-radius: 10px; padding: 8px 12px; }
.ho-appt.today { border-left-color: #1f6b3a; background: #f1f8f2; } .ho-appt.done { border-left-color: #c9d3cc; opacity: .75; }
.ho-adate, .ho-alabel { display: flex; flex-direction: column; } .ho-adate b { font-size: 15px; color: #24557f; } .ho-appt.today .ho-adate b { color: #1f6b3a; }
.ho-adate small, .ho-alabel small { font-size: 12px; color: #667; } .ho-alabel b { font-size: 15px; }
.ho-abtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .ho-abtns button { font-size: 13px; padding: 6px 10px; }
.ho-ready { display: grid; gap: 4px; } .ho-ready > b { font-size: 14px; color: #6b5413; }
.ho-tick { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border: 1px solid #ece3c4; border-radius: 10px; background: #fffdf5; font-size: 14.5px; cursor: pointer; }
.ho-tick input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; } .ho-tick:has(input:checked) span { text-decoration: line-through; color: #889; }
.ip-facts.ho-facts { border: 0; box-shadow: none; padding: 0; }
.ho-subh { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #556; border-top: 1px dashed #e4e9e4; padding-top: 8px; }
.ip-cb > .ho-subh:first-child { border-top: 0; padding-top: 0; }
.ho-docg { display: grid; gap: 4px; } .ho-doct { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6a4c93; }
.ho-doc { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid #e4e9e4; border-radius: 10px; text-decoration: none; color: inherit !important; background: #fff; }
.ho-doc:hover { background: #f6f3fb; } .ho-doc span { flex: 1; min-width: 0; overflow-wrap: anywhere; } .ho-doc small { color: #778; font-size: 12px; white-space: nowrap; }
.ho-doc b { font-size: 13px; color: #6a4c93; white-space: nowrap; }
.ho-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.ho-payrow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: #f3f8f4; font-size: 14.5px; } .ho-payrow.next { background: #fffbea; border: 1px solid #f1df9f; }
.ho-warr { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #e4e9e4; }
.ho-warr > div { display: flex; flex-direction: column; } .ho-warr > div:last-child { text-align: right; align-items: flex-end; } .ho-warr small { font-size: 12px; color: #667; }
.ho-warr > div:last-child > span { font-weight: 800; color: #7a5600; }
.ho-warr .ho-spec { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid #c8d6e8; border-radius: 20px; background: #f3f7fd; color: #1d4f91; font-weight: 700; font-size: 14px; text-decoration: none; }
.ho-ticket { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px dashed #e4e9e4; padding-bottom: 6px; } .ho-ticket small { width: 100%; color: #667; }
.ho-faq { border: 1px solid #e4e9e4; border-radius: 10px; padding: 8px 12px; } .ho-faq summary { cursor: pointer; font-weight: 700; } .ho-faq p { margin: 6px 0 0; color: #445; line-height: 1.45; }
@media (max-width: 760px) {
  .ho-pm { width: 100%; } .ho-hero h1 small { display: block; margin: 2px 0 0; }
  .ho-track { grid-template-columns: 1fr; padding: 10px 14px; gap: 0; }
  .ho-step { flex-direction: row; text-align: left; gap: 10px; padding: 5px 0 5px 0; flex-wrap: wrap; }
  .ho-step::before { top: -50%; left: 15px; width: 4px; height: 100%; }
  .ho-step i { width: 32px; height: 32px; flex: none; } .ho-step b { font-size: 14.5px; flex: 1; } .ho-step.now b { font-size: 15.5px; } .ho-step small { font-size: 12.5px; }
  .ho-step.todo { padding: 3px 0; }
  .ho-appt { grid-template-columns: 1fr; gap: 4px; } .ho-abtns { justify-content: flex-start; }
  .ho-next { font-size: 16px; }
}
/* ───────── Intake sheets (Approval intake on a deal, PM intake on a project) ───────── */
.ik .ip-back { text-decoration: none; } .ik .ip-hero h1 small { font-size: 13px; font-weight: 500; color: #c9d3cc; margin-left: 6px; }
.ik-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; } .ik-col { display: grid; gap: 12px; }
.ik-row { display: grid; gap: 3px; min-width: 0; } .ik-row > span { font-size: 12px; color: #556; font-weight: 700; } .ik-row > span small { font-weight: 500; color: #889; }
.ik-row > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; } .ik-row input, .ik-row select, .ik-row textarea { width: 100%; min-width: 0; }
.ik-row > div > .ik-pills + input { width: 140px; flex: 1; }
.ik-row.need input { border-color: #e0574b; background: #fff5f4; } select.need { border: 2px solid #e0574b; background: #fff5f4; }
.ik-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; } .ik-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.ik-pillgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
.ik-subh { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #556; border-top: 1px dashed #e4e9e4; padding-top: 8px; }
.ik-pills { display: inline-flex; gap: 4px; flex-wrap: wrap; } .ik-pills button { border: 1px solid #cfd8d1; background: var(--btn-bg); border-radius: 999px; padding: 5px 13px; font-weight: 700; font-size: 13.5px; color: #445; cursor: pointer; }
.ik-pills button.on { background: #1f2b23; border-color: #1f2b23; color: #fff; } .ik-pills button:disabled { opacity: .6; cursor: default; }
.ik-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.ik-flag { border-radius: 10px; padding: 7px 12px; font-weight: 800; font-size: 14px; } .ik-flag.red { background: #c62828; color: #fff; } .ik-flag.amber { background: #fff1cc; color: #7a5200; border: 2px solid #f0b429; }
.ik-flag.ok { background: #e6f2e8; color: #1f6b3a; border: 2px solid #a9d3b2; }
.ik-dupes { font-size: 14px; background: #fff5f5; border: 1px solid #eea59d; border-radius: 10px; padding: 7px 12px; } .ik-dupes a { font-weight: 700; }
.ik-sugg { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; text-align: left; width: 100%; background: #eaf6ec; border: 1px dashed #5aa66b; border-radius: 10px; padding: 8px 12px; color: #1f4d2c; cursor: pointer; font: inherit; }
.ik-sugg b { color: #1f6b3a; } .ik-sugg span { font-size: 13.5px; } .ik-sugg small { color: #557; font-size: 11.5px; } .ik-sugg.in { cursor: default; margin-top: 4px; }
.ik-sbtn { display: inline-flex; gap: 4px; margin-left: auto; } .ik-sbtn button { padding: 4px 10px; }
.ik-ok { color: #1f6b3a; font-size: 13.5px; font-weight: 600; }
.ik-big { font-size: 18px; color: #1f2b23; } .ik-big.bad { color: #c62828; } .ik-row > div > small { color: #667; font-size: 12px; }
.ik-adders { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; } .ik-adders b { margin-left: 4px; }
.ik-doc { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border-radius: 10px; padding: 7px 12px; border: 1px solid #e4e9e4; }
.ik-doc b { min-width: 140px; } .ik-doc.ok { background: #f3faf4; border-color: #a9d3b2; } .ik-doc.ok b { color: #1f6b3a; } .ik-doc.red { background: #fff5f4; border-color: #eea59d; } .ik-doc.red b { color: #c62828; }
.ik-doc.amber { background: #fffaeb; border-color: #f2c25c; } .ik-doc.amber b { color: #7a5200; } .ik-doc small { color: #778; } .ik-doc a { overflow-wrap: anywhere; }
.ik-decide .ip-cb { gap: 12px; } .ik-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .ik-decline { color: #b42318; border-color: #eea59d; }
.ik-chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: #445; } .ik-chk input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ik-warnline { color: #b42318; font-weight: 700; } .ik i.req { font-style: normal; color: #b42318; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ik-done { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #e6f2e8; border: 2px solid #a9d3b2; color: #1f4d2c; border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.ik-conf { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px dashed #e4e9e4; }
.ik-conf:last-child { border-bottom: 0; } .ik-cl { font-size: 13px; font-weight: 700; color: #445; padding-top: 2px; } .ik-cv { display: grid; gap: 2px; min-width: 0; } .ik-cv > b { font-size: 15px; overflow-wrap: anywhere; }
.ik-cv small { font-size: 12px; color: #667; } .ik-okby { color: #1f6b3a !important; font-weight: 700; } .ik-chg { margin-top: 4px; } .ik-chg select, .ik-chg input { width: 100%; }
.ik-conf.ok .ik-cl::before { content: '✓ '; color: #1f6b3a; } .ik-conf.miss .ik-cv > b { color: #b07d12 !important; } .ik-conf.sugg { background: linear-gradient(90deg, #f3faf4, transparent); }
.ik-acts { display: flex; gap: 4px; } .ik-acts button { padding: 4px 10px; font-size: 13px; }
.ik-tick { background: #1f6b3a !important; color: #fff !important; border-color: #1f6b3a !important; font-weight: 900; min-width: 38px; }
.ik-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 12px; } .ik-facts span { display: flex; flex-direction: column; border-left: 2px solid #e4e9e4; padding-left: 8px; }
.ik-facts small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #667; font-weight: 700; } .ik-facts b { font-size: 14px; overflow-wrap: anywhere; }
.ik-bills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ik-exp { display: flex; gap: 6px; flex-wrap: wrap; }
.ik-banner { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-top: 6px; background: #fff6e3; border: 2px solid #c7801a; border-radius: 10px; padding: 7px 12px; color: #6b4a00 !important; text-decoration: none; }
.ik-banner b { font-weight: 900; } .ik-plink { display: inline-block; margin-top: 4px; font-size: 13px; }
@media (max-width: 900px) { .ik-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .ik-2, .ik-3 { grid-template-columns: 1fr; } .ik-conf { grid-template-columns: 1fr auto; } .ik-cl { grid-column: 1 / -1; padding: 0; }
  .ik-btns .ip-btn { flex: 1 1 100%; }
}
/* Email preview before sending */
.emprev { width: min(760px, 94vw); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.emprev label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 13px; }
.emprev .embody { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 180px; max-height: 45vh; overflow: auto; background: #fff; font-size: 14px; line-height: 1.45; }
.emprev .embody:focus { outline: 2px solid var(--brand, #2f7d4f); outline-offset: 1px; }
/* Clearer that each part can be changed (Rick, Nov 3: Paul read the window as a read-only preview). */
.emprev-hint { margin: 2px 0 4px; padding: 8px 12px; border-radius: 8px; background: #eef6f0; color: #1f5a37; font-size: 14px; font-weight: 600; }
.emprev .emprev-edit { font-weight: 500; font-size: 12px; color: var(--brand, #2f7d4f); }
.emprev label input { border: 1.5px solid #9fbfaa; background: #fffef6; }
.emprev label input:hover, .emprev .embody:hover { border-color: var(--brand, #2f7d4f); }
.emprev label input:focus { outline: 2px solid var(--brand, #2f7d4f); outline-offset: 1px; }
.emprev .embody { border: 1.5px solid #9fbfaa; }
.ctrbtn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border: 1px solid #a8d8b5; border-radius: 10px; background: linear-gradient(#f3faf5, #e6f4ea); color: #1d4d2c; cursor: pointer; text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.06); font-size: 14px; line-height: 1.15; max-width: 260px; }
.ctrbtn:hover { border-color: var(--brand, #2f7d4f); box-shadow: 0 2px 6px rgba(47,125,79,.18); }
.ctrbtn.empty { background: #fff8e6; border-color: #f0d58a; color: #5a4300; }
.ctricon { font-size: 18px; }
.ctrtxt { display: flex; flex-direction: column; min-width: 0; }
.ctrtxt small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.ctrtxt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctrtxt .ctrinst { font-size: 12px; font-weight: 500; color: #8a5a00; white-space: nowrap; }
.ctrmenu { position: absolute; z-index: 60; min-width: 240px; max-width: 320px; max-height: 360px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 6px; }
.ctrmhead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px 6px; }
.ctrmenu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 7px; font-size: 14px; cursor: pointer; }
.ctrmenu button:hover { background: #eef6f0; }
.ctrmenu button.on { background: #e6f4ea; font-weight: 700; color: #1d4d2c; }
.ctrmenu button.clear { color: var(--bad); border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 4px; }
.ctrmnote { font-size: 12px; color: var(--muted); padding: 6px 10px 2px; }
@media (max-width: 760px) { .ctrbtn { margin-left: 0; } }
/* Weekly Pipeline: "＋ Add" in every comment cell, the quick add box, and the add box on top of the history */
.wp-cfoot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .wp-cfoot:empty { display: none; }
.wp-cadd1 { border: 1px solid #a9d3b2; background: #eef7f0; color: #1f6b3a; border-radius: 999px; padding: 0 8px; font-size: 11.5px; font-weight: 800; line-height: 1.6; cursor: pointer; white-space: nowrap; }
.wp-cadd1:hover { background: #1f6b3a; color: #fff; border-color: #1f6b3a; } span.wp-cadd1.in { display: inline-block; }
.wp-qadd { display: grid; gap: 6px; margin-top: 10px; padding: 10px 12px; border: 1px solid #a9d3b2; background: #f3faf4; border-radius: 10px; }
.wp-qadd textarea { width: 100%; min-height: 64px; } .wp-qlast { margin-top: 8px; font-size: 13.5px; background: #f6f8f6; border-radius: 8px; padding: 6px 10px; max-height: 6.5em; overflow: auto; }
.wp-sugg { font-size: 12px; padding: 2px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ik-flag.pending { background: #f1f3f2; color: #667; border: 1px dashed #b8c1bb; font-weight: 700; } .ik-pending { display: inline-block; background: #f1f3f2; color: #667; border: 1px dashed #b8c1bb; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; }

/* ───── Email: inbox, conversations, suggestions ───── */
.navbadge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 99px; background: #d93025; color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.mboxtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; border-bottom: 1px solid var(--line); }
.mboxtabs button { border: 0; background: none; padding: 8px 12px; border-bottom: 3px solid transparent; cursor: pointer; color: var(--muted); font-weight: 600; }
.mboxtabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.mboxtabs button:hover { color: var(--ink); }
.convtable { width: 100%; }
.convtable tr.conv td { padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid #edf0ec; vertical-align: top; }
.convtable tr.conv:hover td { background: #f6faf7; box-shadow: inset 0 1px 0 #e3ebe5; }
.convtable tr.conv.unread td { background: #fff; }
.convtable tr.conv:not(.unread) td { background: #fafbfa; }
.convtable tr.conv.unread .cwho, .convtable tr.conv.unread .csubj, .convtable tr.conv.unread .cwhen { font-weight: 700; color: var(--ink); }
.convtable .cwho { width: 210px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.convtable .csubj { font-size: 14px; }
.convtable .cprev { font-size: 13px; }
.convtable .cwhen { width: 80px; text-align: right; font-size: 12px; white-space: nowrap; color: var(--muted); }
.convtable .esel { width: 28px; }
.star { border: 0; background: none; font-size: 18px; line-height: 1; color: #b8bfb9; cursor: pointer; padding: 0 2px; }
.star.on { color: #f4b400; }
.star:hover { color: #f4b400; }
.projchip { background: #e8f1ec; color: var(--brand); font-weight: 600; }
.pchip { background: #eef0fb; color: #3949ab; margin-top: 3px; font-size: 11px; }
.tabnew { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: #d93025; color: #fff; font-size: 11px; font-weight: 700; }
.convmodal .modal-box { width: min(1000px, 100%); }
.convhead { gap: 8px; }
.convhead .star { font-size: 22px; }
.convlist { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cmsg { border-top: 1px solid var(--line); background: #fafbfa; }
.cmsg:first-child { border-top: 0; }
.cmsg.open { background: #fff; }
.cmsghead { display: flex; align-items: center; gap: 6px; padding: 10px 14px 2px; }
.cmsgsum { padding: 0 14px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmsg.open .cmsgsum { display: none; }
.cmsgbody { display: none; padding: 0 14px 14px; }
.cmsg.open .cmsgbody { display: block; }
.cmsgbody .emailframe { width: 100%; border: 0; min-height: 120px; }
.sugg { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0 0 8px; border: 1px solid #f5d79e; background: #fffaf0; border-radius: 10px; font-size: 14px; flex-wrap: wrap; }
.sugg .sicon { font-size: 18px; }
.psugg { margin-bottom: 10px; }
.sendlater { display: inline-flex; gap: 6px; align-items: center; }
.sendlater input[type=datetime-local] { padding: 5px 6px; }
table.rules tr.off td { opacity: .55; }
.rchip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; margin: 0 4px 4px 0; border-radius: 99px; background: #f1f3f1; }
.rchip.on { background: #e3f4e8; color: #1f6b3a; }
@media (max-width: 700px) { .convtable .cwho { width: 110px; max-width: 110px; } .convtable .cprev { display: none; } }
/* Approval intake: SolarLink price (dealer price list) */
.ik-span { grid-column: 1 / -1; } .ik-slp { display: grid; gap: 2px; }
.ik-slrow { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 4px 8px; border-bottom: 1px dashed #e4e9e4; font-size: 14px; } .ik-slrow small { color: #667; }
.ik-slrow > b { white-space: nowrap; } .ik-slbase { background: #f3f8f4; border-radius: 8px; font-weight: 600; } .ik-sltot { border-bottom: 0; border-top: 1px solid #c9d3cc; }
.ik-slrow.good { background: #eef7f0; color: #1f6b3a; border-radius: 8px; } .ik-slrow.bad { background: #fdecea; color: #b42318; border-radius: 8px; }
.wp-table td.wp-fromlist { color: #778; font-style: italic; }
/* Price lists › Dealer price list (Exhibit B) and the dealer portal price list */
.dp-panel > summary { cursor: pointer; list-style: none; } .dp-panel > summary::-webkit-details-marker { display: none; }
.dp-vinfo { background: #f6f8f6; border: 1px solid #e4e9e4; border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 13.5px; }
.dp-sec { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #24557f; }
table.dp-items input[type=text] { width: 100%; } table.dp-items td { vertical-align: middle; } .dp-btns { display: flex; gap: 6px; flex-wrap: wrap; } .dp-btns .btn, .dp-btns button { font-size: 13px; padding: 4px 10px; }
.dp-plist { gap: 0 !important; } .dp-prow { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed #e4e9e4; } .dp-prow > b { white-space: nowrap; color: #1f2b23; }
/* Financials (Phase 1) */
.fn-note { font-size: 13px; color: #556; background: #f6f8f6; border: 1px solid #e4e9e4; border-radius: 10px; padding: 6px 12px; }
.fn-flags { display: flex; gap: 6px; flex-wrap: wrap; } .fn-kpis .dp-kpi b { font-size: 24px; }
.fn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.fn-fin { border-bottom: 1px dashed #e4e9e4; padding-bottom: 8px; } .fn-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 12px; margin-top: 6px; }
.fn-facts span { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; } .fn-facts small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #667; font-weight: 700; }
table.fn-ms, table.fn-cost { font-size: 13.5px; } table.fn-ms td, table.fn-cost td { vertical-align: top; } .fn-tot td { font-weight: 800; border-top: 2px solid #c9d3cc; } .fn-bad { color: #b42318; font-weight: 700; }
.fn-week > summary { display: grid; grid-template-columns: 150px minmax(0, 1fr) 120px 70px; gap: 10px; align-items: center; cursor: pointer; padding: 4px 0; list-style: none; } .fn-week > summary::-webkit-details-marker { display: none; }
.fn-week > summary b { text-align: right; } .fn-bar { height: 12px; background: #eef1ee; border-radius: 6px; overflow: hidden; } .fn-bar i { display: block; height: 100%; background: #3f7a4a; border-radius: 6px; }
.fn-recon { border-bottom: 1px dashed #e4e9e4; padding: 6px 0; display: grid; gap: 4px; }
/* Financials page (Admin layout): the totals under the title; a section's body */
.fn-top { max-width: 1240px; margin: 4px 0 6px; }
.fn-sec { display: grid; gap: 10px; } .wp-scroll.fn-tall { max-height: calc(100vh - var(--navh, 46px) - 170px); border-radius: 12px; }
@media (max-width: 900px) { .fn-grid { grid-template-columns: 1fr; } .fn-week > summary { grid-template-columns: 110px minmax(0, 1fr) 90px; } .fn-week > summary small { display: none; } }
/* "＋ Add" in comment cells: a clear, solid button (Rick: not tiny / greyed) */
.wp-cadd1 { background: #1f6b3a; color: #fff; border: 1px solid #1f6b3a; border-radius: 8px; padding: 2px 10px; font-size: 12.5px; font-weight: 800; line-height: 1.6; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.wp-cadd1:hover { background: #17552d; border-color: #17552d; color: #fff; } span.wp-cadd1.in { display: inline-block; margin-top: 1px; }
.wp-cfoot { margin-top: 3px; } .wp-sidepick button { font-size: 12.5px; padding: 3px 10px; }
.hol-rules { display: flex; gap: 6px 16px; flex-wrap: wrap; } .hol-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.hol-years h3 { margin: 4px 0; } .hol-day { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px dashed #e4e9e4; font-size: 13.5px; }

/* Field shown as a button that opens its choices (MPU main breaker / bus) */
.pickfield { display: block; }
.pickfield .pickbtn { width: auto; }
.pickbtn { display: inline-flex; align-items: center; min-width: 130px; padding: 7px 14px; border: 1px solid #a8d8b5; border-radius: 10px; background: linear-gradient(#f3faf5, #e6f4ea); color: #1d4d2c; font-weight: 700; cursor: pointer; }
.pickbtn:hover { border-color: var(--brand); box-shadow: 0 2px 6px rgba(47,125,79,.18); }
.pickbtn.empty { background: #fff8e6; border-color: #f0d58a; color: #5a4300; font-weight: 600; }
.pickmenu { min-width: 150px; }
/* Lenders menu (top bar, Rick only) and Admin › Lender Links */
.ll-table input { width: 100%; } .ll-table td:first-child button { padding: 2px 6px; font-size: 11px; }

/* G-Drive link in the Project section header */
.gdrive { margin: 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border: 1px solid #dadce0; border-radius: 99px; background: #fff; color: #3c4043; font-size: 13px; font-weight: 600; line-height: 20px; cursor: pointer; text-decoration: none; }
.gdrive:hover { background: #f6f8fc; border-color: #c4c7c5; box-shadow: 0 1px 3px rgba(60,64,67,.15); text-decoration: none; }
.gdrive.empty { opacity: .55; border-style: dashed; }
.gdrive.empty:hover { opacity: .9; }
.gdrive.start { margin: 0; }
.lockbox .gdrive { flex: 0 0 auto; width: auto; }
.gdriverow { padding: 2px 0; }

/* Admin › Google Drive import */
.di-steps { margin: 8px 0 12px 18px; padding: 0; } .di-steps li { margin: 6px 0; line-height: 1.6; }
.di-job { border: 1px solid #e4e9e4; border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: #fff; }
.di-job table.list td { vertical-align: top; } .di-job select { width: auto; padding: 3px 6px; }

/* "Connect / reconnect my Gmail" bar under the menu */
#gmailstrip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 20px; background: #fff8e6; border-bottom: 1px solid #f0d58a; color: #5a4300; font-size: 14px; }
#gmailstrip span { flex: 1; min-width: 220px; }
#gmailstrip .btn { padding: 5px 12px; }
/* Financials Phase 2: commissions */
.cm-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 8px; } .cm-sum span { display: flex; flex-direction: column; font-size: 12px; color: #667; } .cm-sum b { font-size: 16px; color: #1f2b23; }
.cm-sum .cm-cb b { color: #a15c00; }
.cm-checks { list-style: none; margin: 4px 0; padding: 0; font-size: 13px; } .cm-checks li { padding: 2px 0; } .cm-checks .cm-ok b { color: #2f7d4a; } .cm-checks .cm-warn b { color: #a15c00; } .cm-checks .cm-fail b { color: #b3261e; }
.cm-chkrow td { background: #fafbfa; } .cm-ms td { vertical-align: top; }
.cm-feeadd { gap: 6px; flex-wrap: wrap; margin-top: 6px; } .cm-feeadd input, .cm-feeadd select { width: auto; max-width: 180px; }
.cm-rules td { vertical-align: top; } .cm-rules select { width: auto; max-width: 210px; margin-top: 4px; }
.cm-sched { border: 1px solid #e4e9e4; border-radius: 10px; padding: 10px; margin: 10px 0; background: #fff; } .cm-sched input[type=text] { width: auto; }
.cm-log { padding: 4px 0; border-bottom: 1px solid #f0f2f0; }

/* Email bodies: plain text keeps its line breaks; quoted history folds away */
.emailtext { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; }
.emailquote summary { cursor: pointer; display: inline-block; padding: 0 8px; border-radius: 8px; background: #eef1ee; color: #556; font-size: 12px; list-style: none; margin-top: 6px; }
.emailquote summary::-webkit-details-marker { display: none; } .emailquote .emailtext { color: #667; border-left: 3px solid #dfe5df; padding-left: 10px; margin-top: 6px; }

/* Photos (project tab + portals): folders by phase, thumbnail grid, large view */
.pf-phases { display: grid; gap: 12px; }
.pf-phase { border: 1px solid #e4e9e4; border-radius: 12px; padding: 10px; background: #fff; }
.pf-phh { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: #4a5a4f; margin-bottom: 8px; }
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pf-tile { position: relative; display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; border: 1px solid #dfe5df; border-radius: 10px; background: #f8faf8; cursor: pointer; min-height: 48px; }
.pf-tile:hover, .pf-tile.pf-over { border-color: #2f7d4a; background: #eef6f0; }
.pf-tile.empty { background: #fff; color: #667; } .pf-tile .pf-ic { font-size: 20px; } .pf-tile .pf-lb { flex: 1; font-size: 13.5px; line-height: 1.25; }
.pf-tile .pf-n { font-weight: 700; font-size: 14px; color: #1f2b23; } .pf-tile.empty .pf-n { color: #99a; }
.pf-tile.missing { border-color: #e7b3ae; background: #fff6f5; } .pf-red { color: #c62828; font-size: 12px; margin-left: 2px; }
.pf-req { font-size: 10.5px; color: #8a8f99; border: 1px solid #e0e3e8; border-radius: 6px; padding: 0 4px; }
.pf-openhead { gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; } .pf-cam { padding: 6px 10px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; min-height: 90px; border-radius: 10px; }
.pf-grid.pf-drop { border: 2px dashed transparent; padding: 4px; } .pf-grid.pf-over { border-color: #2f7d4a; background: #eef6f0; }
.pf-th { padding: 0; border: 1px solid #e4e9e4; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #f2f4f2; cursor: zoom-in; }
.pf-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: #667; padding: 6px; text-align: center; }
.pf-noimg.big { min-height: 200px; font-size: 14px; }
.pf-emptymsg { grid-column: 1 / -1; padding: 18px; }
.pf-lbmodal .modal-box { max-width: min(1100px, 96vw); width: 96vw; }
.pf-lbhead { gap: 10px; align-items: center; } .pf-lbname { overflow-wrap: anywhere; }
/* The picture box is one fixed height (Rick, Nov 6): portrait, landscape or still loading, ‹ › and everything under it stay put. */
.pf-lbimg { position: relative; display: flex; align-items: center; justify-content: center; background: #111; border-radius: 10px; margin: 8px 0; height: 70vh; min-height: 240px; }
.pf-lbimg img { max-width: 100%; max-height: 100%; display: block; }
.pf-lbimg.pf-lbloading::after { content: 'Loading…'; position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; pointer-events: none; opacity: 0; animation: pf-lbshow 0s .25s forwards; }
@keyframes pf-lbshow { to { opacity: 1; } }
.pf-lbimg .pf-lbfail { color: #ccd; padding: 0 60px; }
.pf-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 8px; background: rgba(255,255,255,.85); font-size: 32px; line-height: 1; cursor: pointer; }
.pf-nav[data-prev] { left: 8px; } .pf-nav[data-next] { right: 8px; } .pf-nav:disabled { opacity: .25; cursor: default; }
.pf-lbfoot { gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-lbwhere { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line, so a long slot name doesn't push the photo down */
.pf-lbhead [data-notes].on { background: var(--chip); border-color: var(--brand); }
/* Notes beside the photo (photonotes.js): the photo keeps its place, the notes scroll on their own. */
.pf-lbmodal.pf-lbnotes .modal-box { max-width: min(1500px, 98vw); width: 98vw; }
.pf-lbcols { display: block; } .pf-lbnotes .pf-lbcols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.pf-lbside { display: flex; flex-direction: column; gap: 8px; height: calc(70vh + 90px); min-height: 0; border-left: 1px solid var(--line); padding-left: 14px; }
.pf-lbside textarea { width: 100%; resize: vertical; } .pf-lnadd { display: grid; gap: 6px; } .pf-lnadd .row { gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-lnhead { gap: 8px; align-items: baseline; }
.pf-lnlist { flex: 1; min-height: 0; overflow: auto; display: grid; gap: 8px; align-content: start; }
.pf-ln { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.pf-lnsubj { font-weight: 600; } .pf-lnbody ul, .pf-lnbody ol { margin: 2px 0; padding-left: 20px; }
@media (max-width: 1000px) { .pf-lbnotes .pf-lbcols { grid-template-columns: 1fr; } .pf-lbside { height: auto; max-height: 60vh; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; } }
/* Zoom and pan in the large view (public/zoom.js). */
.pf-zstage { overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; }
.pf-zstage .pf-zimg { cursor: zoom-in; transform-origin: 50% 50%; will-change: transform; -webkit-user-drag: none; }
.pf-zstage.pf-zoomed .pf-zimg { cursor: grab; } .pf-zstage.pf-zdrag .pf-zimg { cursor: grabbing; }
.pf-zstage .pf-nav { z-index: 2; }
.pf-zbar { position: absolute; z-index: 3; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.pf-zbar button { min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: #1a2a20; }
.pf-zbar button[data-zreset] { font-size: 14px; font-weight: 600; } .pf-zbar button:hover:not(:disabled) { background: rgba(0,0,0,.08); } .pf-zbar button:disabled { opacity: .35; cursor: default; }
.pf-zpct { min-width: 48px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: #1a2a20; }
.pf-zhint { position: absolute; z-index: 3; top: 10px; left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.7); color: #fff; font-size: 12.5px; pointer-events: none; }
.pf-drivemodal .modal-box { max-width: min(1100px, 96vw); width: 96vw; }
.pf-drivegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; margin-top: 10px; }
.pf-dt { display: flex; flex-direction: column; gap: 4px; border: 1px solid #e4e9e4; border-radius: 10px; padding: 6px; background: #fff; font-size: 12.5px; }
.pf-dt img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #f2f4f2; } .pf-dt.done { opacity: .55; }
.pf-dtimg { position: relative; display: block; } .pf-dtimg img { display: block; }
.pf-dtzoom { position: absolute; right: 4px; bottom: 4px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(0,0,0,.25); font-size: 20px; cursor: zoom-in; }
.pf-dt select { width: 100%; font-size: 12px; padding: 3px; } .pf-dtn { overflow-wrap: anywhere; }
.pf-dt.dup { border-color: #f2c25c; background: #fffaf0; }
.pf-dtdup { font-size: 12px; color: var(--warn); overflow-wrap: anywhere; } .pf-dtdup.exact { font-weight: 600; }
.pf-dupnote { margin: 4px 0; padding: 6px 10px; border-radius: 8px; background: #fff4e5; color: var(--warn); }
@media (max-width: 600px) { .pf-tiles { grid-template-columns: 1fr 1fr; } .pf-grid { grid-template-columns: repeat(3, 1fr); } .pf-nav { width: 36px; height: 52px; font-size: 26px; } .pf-lbimg { height: 58vh; } }

.cm-rules tr.cm-unconf td { background: #fffaf0; }
/* Scheduling blocks: date chip on the section header, "mark done" on a step, Record a date */
.schhdr { font-weight: 600; vertical-align: middle; }
.schsteps .schmark { font-size: 11px; margin-left: 4px; text-decoration: underline; color: inherit; opacity: .8; }
.schold { background: #fff4e5; border: 1px solid #f0d3a8; border-radius: 6px; padding: 6px 10px; margin: 6px 0; }
.schrec { margin: 6px 0; } .schrec .row { gap: 6px; flex-wrap: wrap; align-items: center; } .schrec input, .schrec select { width: auto; }
.schrecwrap > summary, .schblk details > summary { cursor: pointer; }
.schhint { margin-top: 4px; }
/* Calendar hover pop-up */
.calpop { position: absolute; z-index: 1000; max-width: 360px; min-width: 240px; padding: 12px 16px; border-radius: 10px; background: #fff; color: #1d2a22; border: 1px solid #c9d3cc;
  box-shadow: 0 8px 28px rgba(0,0,0,.18); font-size: 15px; line-height: 1.5; pointer-events: none; }
.calpop-h { font-weight: 700; font-size: 16px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.calpop .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.chip.schhdr.done { background: #1f6b3a; color: #fff; }
details.psec > summary h2:has(> .schhdr), details.psecgroup > summary h2:has(> .schhdr) { flex-wrap: wrap; row-gap: 6px; }

/* Installer portal › Materials card (materials.js) */
.ph-mat .ip-ch { border-left-color: #a35a12; background: #fbf1e6; }
.m-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 1px solid #dfe5df; border-radius: 10px; overflow: hidden; }
.m-fact { padding: 8px 12px; border-right: 1px solid #dfe5df; min-width: 0; } .m-fact:last-child { border-right: 0; }
.m-fact dt { font-size: 11.5px; color: #667; letter-spacing: .04em; text-transform: uppercase; }
.m-fact dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.m-fact.big dd { font-size: 17px; } .m-fact .sub { display: block; font-weight: 400; font-size: 12.5px; color: #667; } .m-bad { color: #b42318; }
.m-fact.lead { background: #eef4fa; } .m-fact.lead dt, .m-fact.lead dd { color: #24557f; }
.m-fact.lead.late { background: #fff4d9; } .m-fact.lead.late dt, .m-fact.lead.late dd { color: #7a5600; }
.m-fact.lead.unset { background: #f6f8f6; } .m-fact.lead.unset dt, .m-fact.lead.unset dd { color: #667; }
@media (max-width: 560px) { .m-facts { grid-template-columns: 1fr 1fr; } .m-fact:nth-child(2) { border-right: 0; } .m-fact:nth-child(-n+2) { border-bottom: 1px solid #dfe5df; } }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 560px) { .m-actions { grid-template-columns: 1fr; } }
.m-act { display: grid; gap: 6px; align-content: start; }
.m-act button { width: 100%; padding: 13px 14px; font-size: 16px; border-radius: 11px; font-weight: 600; }
.m-act button:disabled { opacity: .5; cursor: not-allowed; }
.m-act p { margin: 0; font-size: 12.5px; color: #556; line-height: 1.4; } .m-act p b { color: #1f2b23; }
button.m-danger { background: #fdeceb; color: #9b2c1f; border: 1px solid #eea59d; }
button.m-send { background: #b42318; color: #fff; border-color: #b42318; font-weight: 600; } button.m-send:disabled { opacity: .5; }
.m-banner { border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.m-banner.ok { background: #e6f2e8; border: 1px solid #a9d3b2; color: #1f6b3a; }
.m-banner .t { flex: 1; min-width: 200px; } .m-banner .t b { display: block; font-size: 15px; } .m-banner button { padding: 5px 10px; font-size: 13px; }
.m-reps { display: grid; gap: 8px; }
.m-issue { border: 1px solid #eea59d; border-radius: 10px; overflow: hidden; } .m-issue.res { border-color: #dfe5df; }
.m-issue .h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 12px; background: #fdeceb; } .m-issue.res .h { background: #f6f8f6; }
.m-issue ul { margin: 0; padding: 8px 12px 8px 30px; display: grid; gap: 3px; font-size: 14px; }
.m-issue .n { padding: 0 12px 8px; font-size: 13.5px; color: #556; overflow-wrap: anywhere; }
.m-issue .f { padding: 0 12px 10px; display: flex; flex-wrap: wrap; gap: 8px; } .m-issue .f button { padding: 5px 10px; font-size: 13px; }
details.m-bom { border: 1px solid #dfe5df; border-radius: 10px; }
details.m-bom > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.m-bom > summary::-webkit-details-marker { display: none; }
details.m-bom > summary .chev { transition: transform .15s; color: #667; font-size: 11px; } details.m-bom[open] > summary .chev { transform: rotate(90deg); }
.m-prog { display: block; flex-basis: 100%; height: 6px; background: #eef2ef; border-radius: 99px; overflow: hidden; }
.m-prog i { display: block; height: 100%; background: #2f7d4f; border-radius: 99px; transition: width .2s; }
.m-bomtools { display: flex; gap: 8px; padding: 0 12px 8px; } .m-bomtools button { padding: 4px 10px; font-size: 13px; }
.m-tablewrap { overflow-x: auto; border-top: 1px solid #dfe5df; }
table.m-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.m-t th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #667; font-weight: 600; padding: 7px 12px; background: #f6f8f6; }
.m-t td { padding: 7px 12px; border-top: 1px solid #e4e9e4; vertical-align: middle; }
.m-t td.q, .m-t th.q { text-align: right; font-variant-numeric: tabular-nums; width: 60px; }
.m-t tr.sec td { background: #f6f8f6; font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #667; padding-top: 5px; padding-bottom: 5px; }
.m-t tr.got td.item span { color: #778; text-decoration: line-through; text-decoration-color: #a9d3b2; }
.m-t tr.short td { background: #fdeceb; }
.m-t label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.m-t input[type=checkbox] { width: 20px; height: 20px; accent-color: #2f7d4f; flex: none; }
.m-t .flag { color: #9b2c1f; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.modal-box.m-modal { max-width: 640px; display: grid; gap: 12px; }
.m-modal .lbl { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; } .m-modal textarea { width: 100%; }
.m-attest { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #dfe5df; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.m-attest input { width: 22px; height: 22px; accent-color: #2f7d4f; margin-top: 1px; flex: none; }
.m-warn { background: #fff4d9; border: 1px solid #f2c25c; color: #7a5600; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.m-err { background: #fdeceb; border: 1px solid #eea59d; color: #9b2c1f; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.mi-list { border: 1px solid #dfe5df; border-radius: 10px; overflow: hidden; max-height: 46vh; overflow-y: auto; }
.mi { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px 10px; border-top: 1px solid #e4e9e4; }
.mi:first-child { border-top: 0; } .mi.on { background: #fdeceb; }
.mi input[type=checkbox] { width: 20px; height: 20px; accent-color: #b42318; }
.mi .nm { min-width: 0; font-size: 14px; cursor: pointer; } .mi .nm small { display: block; color: #667; font-size: 12px; }
.mi .ctl { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.mi .ctl input[type=number] { width: 72px; } .mi .ctl select { flex: 1; min-width: 150px; width: auto; }
.m-seg { display: inline-flex; border: 1px solid #dfe5df; border-radius: 9px; overflow: hidden; }
.m-seg button { border: 0; border-radius: 0; padding: 7px 12px; background: var(--btn-bg); }
.m-seg button[aria-pressed="true"] { background: #b42318; color: #fff; font-weight: 600; } .m-seg button.g[aria-pressed="true"] { background: #2f7d4f; }
/* Email (Oct 6): mailbox filter, Needs reply, one collapsible row per message, folded quotes in HTML emails */
.mboxfilter { margin: 6px 0 2px; }
.mboxtabs .mcount { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: #f6c35b; color: #4a3500; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.navbadge.reply { background: #f6c35b; color: #4a3500; }
.navbadge.amber { background: #f6c35b; color: #4a3500; }
.cmsghead .ccaret { display: inline-block; width: 14px; color: #778; font-size: 12px; }
.cmsghead .ccaret::before { content: '▸'; }
.cmsg.open .cmsghead .ccaret::before { content: '▾'; }
.cmsgsum { padding-left: 34px; }
.convtools { padding: 4px 14px; border-bottom: 1px solid var(--line); }
.emailquotebtn { display: inline-block; padding: 0 8px; border-radius: 8px; background: #eef1ee; color: #556; font-size: 12px; border: 0; margin-top: 4px; cursor: pointer; }
.emailquotebtn.on { background: #dfe5df; }
.flagwho { padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }
.mboxfilter button.nc { border-style: dashed; }
/* Private mailbox (rick@) */
.chip.privchip { background: #f1ecfb; border-color: #cdbdf0; color: #4a2f86; }
.privbox { background: #f6f2fd; border: 1px solid #ddd0f5; border-radius: 10px; padding: 8px 12px; margin: 8px 0; color: #3d2a6b; }
.dealerbtns { margin-top: -4px; align-items: center; }
.dealerbtns .btn { padding: 4px 12px; border-radius: 99px; }

/* ───────── Compact layout (Oct 6): one-line nav, sticky toolbar, one-line list rows. Same fonts and colours, less space. ───────── */
.top { gap: 12px; padding: 6px 16px; }
.brand img.logo { height: 34px; padding: 2px 6px; }
.top nav { gap: 2px; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a, .top .tdd-btn, .top .taskbtn { white-space: nowrap; padding: 5px 8px; font-size: 14px; }
.me { position: relative; flex: 0 0 auto; }
.me .avatar { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.me .avatar:hover { background: rgba(255,255,255,.22); }
.me .avatarmenu { position: absolute; right: 0; top: 36px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 200px; box-shadow: 0 6px 20px rgba(0,0,0,.18); z-index: 20; }
@media (max-width: 760px) { .top nav { overflow: visible; } .me .avatarmenu { position: static; box-shadow: none; } }

/* Pipeline toolbar: one row, sticky under the top bar */
.ptoolbar { position: sticky; top: var(--navh, 48px); z-index: 4; background: var(--bg); display: flex; align-items: center; gap: 8px; padding: 6px 0; margin: -6px 0 4px; flex-wrap: nowrap; }
.ptoolbar .ptitle { font-size: 16px; white-space: nowrap; }
.ptoolbar .chiprow { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; margin: 0; scrollbar-width: thin; padding-bottom: 2px; }
.ptoolbar .chiprow button { white-space: nowrap; padding: 3px 10px; font-size: 13px; flex: 0 0 auto; }
.ptoolbar .pdealer { width: auto; flex: 0 0 auto; max-width: 190px; padding: 5px 6px; font-size: 13px; }
.ptoolbar .iconbtn { padding: 4px 8px; flex: 0 0 auto; text-decoration: none; }
.ptoolbar .pcount { white-space: nowrap; flex: 0 0 auto; }
.vmenuwrap { position: relative; flex: 0 0 auto; }
#pviewbtn { padding: 5px 10px; font-size: 13px; white-space: nowrap; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
#pviewbtn.on { border-color: var(--ink); }
.vmenu { position: absolute; right: 0; top: 34px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.vmenu > button { text-align: left; } .vmenu > button.on { background: var(--ink); color: #fff; }
@media (max-width: 760px) { .ptoolbar { flex-wrap: wrap; position: static; } .ptoolbar .chiprow { flex-basis: 100%; } }

/* Shared compact list: one-line rows (~36px), slim group headers, sticky column headings */
table.list.compact th, table.list.compact td, .compactlist table.list th, .compactlist table.list td { padding: 6px 8px; font-size: 14px; line-height: 1.35; vertical-align: middle; }
table.list.compact th, .compactlist table.list th { font-size: 12px; }
table.list.compact .clip, .compactlist .clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.tiny { font-size: 11px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.chip.tiny.more { background: #e3e9e4; }
.ini { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 22px; border-radius: 11px; background: #e6eee8; color: #24402f; font-size: 11px; font-weight: 700; cursor: default; }

/* Pipeline table */
table.list.pipetable { table-layout: fixed; overflow: visible; }
.pipetable thead th { position: sticky; top: calc(var(--navh, 48px) + var(--tbh, 44px)); z-index: 3; }
.pipetable col.c-proj { width: 30%; } .pipetable col.c-sub { width: 12%; } .pipetable col.c-days { width: 60px; } .pipetable col.c-dealer { width: 10%; }
.pipetable col.c-kw { width: 46px; } .pipetable col.c-scope { width: 96px; } .pipetable col.c-pm { width: 44px; } .pipetable col.c-next { width: 24%; } .pipetable col.c-alert { width: auto; }
.pipetable td.pcell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipetable td.pcell .psel { width: auto; margin: 0 6px 0 0; vertical-align: -2px; }
.pipetable .pnum { font-size: 12px; color: var(--muted); margin-left: 4px; }
.pipetable .paddr { font-size: 12px; color: var(--muted); }
.pipetable td.nextcell { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; cursor: default; }
.pipetable td.nextcell .ns1 { display: inline-block; max-width: calc(100% - 82px); overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
table.list.pipetable td.alert { display: table-cell; -webkit-line-clamp: unset; max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.pipetable .scope { flex-wrap: nowrap; }
.pipetable tr.pgrphead td { padding: 4px 10px; font-size: 14px; }
.pipetable tr.sgrphead td { padding: 5px 10px; font-size: 14px; }
.pipetable tbody.pgrp.sub tr.pgrphead td { padding-left: 26px; }
#taskpop { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 8px 10px; width: 360px; max-height: 320px; overflow: auto; }
#taskpop .tp { display: flex; flex-direction: column; padding: 4px 0; border-top: 1px solid #eef1ee; font-size: 13px; }
.pipetable.classic thead th { position: sticky; top: calc(var(--navh, 48px) + var(--tbh, 44px)); z-index: 3; }
.pipetable.classic td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { table.list.pipetable { table-layout: auto; } .pipetable thead th { position: static; } .pipetable td.pcell, .pipetable td.nextcell, table.list.pipetable td.alert { white-space: normal; } }
/* Compact look on the other lists (same content, less space) */
.convtable.compact { table-layout: fixed; }
.convtable.compact td.esel { width: 30px; } .convtable.compact tr.conv td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.convtable.compact tr.conv td:nth-child(3) { width: 220px; }
.convtable.compact tr.conv td:nth-child(4) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convtable.compact tr.conv td:last-child { width: 92px; white-space: nowrap; text-align: right; }
.convtable.compact .cwho { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convtable.compact .cwho > div { display: inline; margin-left: 4px; }
.convtable.compact tr:first-child th:nth-child(1), .convtable.compact tr:first-child th:nth-child(2) { width: 30px; }
.wp-table td { padding: 3px 8px; line-height: 1.3; font-size: 13.5px; } .wp-table th { padding: 5px 8px; }
@media (max-width: 760px) { .convtable.compact { table-layout: auto; } .convtable.compact tr.conv td:nth-child(4) { white-space: normal; } }
.ptoolbar .dchips { flex: 0 0 auto; flex-wrap: nowrap; margin: 0; gap: 4px; }
.ptoolbar .dchips button { white-space: nowrap; padding: 3px 9px; font-size: 13px; }
/* Pipeline toolbar in two sticky rows (Rick, Oct 6): 1 = title, search, dealers, View, Bottlenecks; 2 = the stage chips at normal size */
.ptoolbar { flex-direction: column; align-items: stretch; gap: 4px; }
.ptoolbar .ptrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ptoolbar .ptrow .chiprow { flex: 1 1 auto; padding-bottom: 0; }
.ptoolbar .ptrow .chiprow { gap: 4px; }
.ptoolbar .ptrow .chiprow button { padding: 4px 8px; font-size: 13.5px; }
.ptoolbar .ptrow .dchips button { padding: 4px 11px; font-size: 14px; }
.ptoolbar .pcount { margin-left: auto; }
.ptoolbar .chiprow.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); }
@media (max-width: 760px) { .ptoolbar .ptrow { flex-wrap: wrap; } }
@media (max-width: 760px) { .ptoolbar .dchips { flex-wrap: wrap; flex: 1 1 100%; } .ptoolbar .ptrow .chiprow { min-width: 0; max-width: 100%; } .ptoolbar .pcount { margin-left: 0; } }
.ptoolbar, .ptoolbar .ptrow { min-width: 0; max-width: 100%; }
.ptoolbar .ptrow .chiprow { min-width: 0; }
/* Stage chips: dark green with white letters (Rick, Oct 26); the picked stage is a brighter green with a white ring */
.ptoolbar .chiprow > button { background: #1f4d30; color: #fff; border-color: #1f4d30; }
.ptoolbar .chiprow > button:hover { background: #2a6340; border-color: #2a6340; }
.ptoolbar .chiprow > button.on { background: #3a9a5e; border-color: #3a9a5e; color: #fff; font-weight: 700; box-shadow: inset 0 0 0 2px #fff; }
.ptoolbar .chiprow > button .n { opacity: .85; }

/* Weekly Pipeline: a dealer that pays SolarLink (Arcasa) */
.wp-nosow { color: #8a5a00; background: #fff3d6; border-radius: 4px; padding: 0 5px; font-size: 12px; white-space: nowrap; }
.wp-overdue { color: #a11; font-weight: 600; }

/* In-page "Are you sure?" dialog (lib.js ask / askText / tell): above any open modal */
.modal.askdlg { z-index: 10050; }
.askdlg .modal-box { max-width: 520px; width: calc(100% - 32px); }
.askdlg .askmsg { white-space: pre-wrap; line-height: 1.45; margin: 2px 0 12px; overflow-wrap: anywhere; }
.askdlg .askin { width: 100%; margin-bottom: 12px; }
.askdlg .askbtns { gap: 8px; }

/* ESA CompanyCam: background copy progress */
.ccprogress { margin: 8px 0; }
.ccbar { height: 10px; background: #e6ece8; border-radius: 6px; overflow: hidden; margin-bottom: 4px; }
.ccbar span { display: block; height: 100%; background: #2d7a46; transition: width .4s; }
/* Re-roof cards (public/roof.js) */
.roofnote { background: #f3eef9; border: 1px solid #ddd0ee; color: #4b3470; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.roofwarn { background: #fff4e5; border: 1px solid #f3cf9a; color: #8a5300; border-radius: 6px; padding: 6px 10px; margin: 4px 0; font-size: 13px; }
.rooflic { display: flex; flex-wrap: wrap; gap: 8px; } .rooflic label { flex: 1 1 140px; font-size: 12px; }
.rooffile { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rooffile .rfpick { display: inline-flex; gap: 6px; align-items: center; } .rooffile select { width: auto; max-width: 260px; }
.roofco { display: flex; gap: 6px; margin-bottom: 4px; } .roofco [data-co=amount] { width: 120px; flex: none; } .roofco [data-co=reason] { flex: 1; }
.rooffee { display: flex; gap: 6px; align-items: center; } .rooffee input { flex: 1; min-width: 90px; } .rooffee button { padding: 4px 8px; } .rooffee button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.roofphotos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .roofphotos .chip.muted { opacity: .6; }
.chip.roofchip { margin-left: 6px; font-weight: 500; white-space: normal; max-width: 100%; }
.roofco input, .rooffile select, .rooffile .btn { font-size: 14px; padding: 6px 8px; }
@media (max-width: 600px) { .roofco { flex-wrap: wrap; } .roofco [data-co=reason] { flex: 1 1 100%; order: 3; } .rooffee { flex-wrap: wrap; } }
[data-t=roofgap] .chip, .roofphotos .chip { white-space: normal; }
/* SGIP tag (public/sgip.js) */
.chip.sgipchip { background: #e8f1fb; color: #1d4f91; font-weight: 600; margin-left: 6px; } .chip.sgipchip.tiny { font-size: 10.5px; padding: 0 6px; }
.scope .sgip { background: #e8f1fb; color: #1d4f91; font-weight: 600; } .pinfo > span.pinfo-sgip { background: var(--brand, #2f7d4f); border-color: var(--brand, #2f7d4f); color: #fff; font-size: 17px; font-weight: 700; padding: 3px 14px; display: inline-flex; align-items: center; }
.chip.hoachip, .chip.hdmchip { font-weight: 600; font-size: 10.5px; padding: 0 6px; margin-left: 4px; } .chip.hoachip { background: #e3f1e8; color: #1e5a37; } .chip.hdmchip { background: #fff4b8; color: #5c4b00; }
.scope .hdm { background: #fff4b8; color: #5c4b00; font-weight: 600; }
.pinfo > span.pinfo-hdm { background: var(--brand, #2f7d4f); border-color: var(--brand, #2f7d4f); color: #fff; font-size: 17px; font-weight: 700; padding: 3px 14px; display: inline-flex; align-items: center; }   /* HOA, SGIP and HDM header chips: one style, brand green with white letters (Rick, Nov 7) */
.pinfo > b.pinfo-u12 { align-self: center; background: #fff3cd; border: 1px solid #e0b84c; color: #7a5300; border-radius: 999px; padding: 3px 12px; font-size: 14px; }   /* Under 12 months of usage (public/under12.js) */
.pinfo > b.pinfo-sgipchk { align-self: center; background: #fff3cd; border: 1px solid #e0b84c; color: #7a5300; border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.hsgip { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 4px 0 8px; }
/* Email suggestions on a project: one compact line under the address (opens to show them) */
.psuggline { margin: 6px 0 0; font-size: 14px; } .psuggline > summary { cursor: pointer; display: inline-flex; gap: 8px; align-items: baseline; padding: 3px 10px; border-radius: 99px; background: #fff8e1; border: 1px solid #f1d58a; }
.psuggline[open] > summary { margin-bottom: 6px; } .psuggline .sugg { margin: 4px 0; }
.arsale td { background: #fffbe8; }
/* "New version available — Reload" (a newer deploy is live) */
.newbuild { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9999; display: flex; gap: 12px; align-items: center; background: #1f6b3a; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-weight: 600; }
.newbuild button { background: #ffe100; color: #1a1a1a; border: 0; font-weight: 700; }
.newbuild button.nb-later { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); font-weight: 600; }

/* Installer portal on the phone (Paul, Oct 7): send-queue bar, "put it on your phone" card, photo markup, staff crew box */
#outbox { position: sticky; top: 0; z-index: 42; padding: 9px 16px; padding-top: calc(9px + env(safe-area-inset-top, 0px)); font-size: 13.5px; }
#outbox.off { background: #fff4d9; color: #7a5600; border-bottom: 1px solid #f2c25c; }
#outbox.sending { background: #eef4fa; color: #24557f; border-bottom: 1px solid #bcd3e8; }
#outbox button { margin-left: 8px; padding: 2px 10px; }
/* The send bar stays while anything is waiting (Rick, Nov 25): counts, the send going now with its %, "Don't close the app". */
#outbox.bad { background: #fdecea; color: #8a2d22; border-bottom: 1px solid #e8b4ad; }
#outbox.done { background: #eaf6ee; color: #1f6b3a; border-bottom: 1px solid #a9d3b2; }
#outbox .ob-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
#outbox .ob-nums { font-weight: 600; } #outbox .ob-prog, #outbox .ob-prep { font-size: 12.5px; opacity: .9; overflow-wrap: anywhere; }
#outbox .ob-btns { margin-left: auto; display: flex; gap: 6px; } #outbox .ob-btns button { margin-left: 0; min-height: 32px; }
#outbox .ob-line { margin-top: 3px; } #outbox .ob-bad { color: #8a2d22; }
.jv-phones { margin: 8px 0; padding: 8px 12px; border: 1px solid #f2c25c; border-left: 4px solid var(--sun, #f2b705); background: #fff8e6; border-radius: 8px; font-size: 13.5px; }
.ip-safari { margin: 6px 0; padding: 8px 10px; border-left: 4px solid var(--sun, #f2b705); background: #fff8e6; border-radius: 8px; font-size: 13.5px; }
.ia-card { border-color: #a9d3b2; background: #f3faf5; }
.ia-grid { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
@media (max-width: 560px) { .ia-grid { grid-template-columns: minmax(0, 1fr); } }
.ia-qr { width: 120px; height: 120px; background: #fff; border-radius: 8px; padding: 4px; }
.ia-qr svg { width: 100%; height: 100%; display: block; }
.ia-txt { display: grid; gap: 6px; min-width: 0; }
.ia-link { font-size: 12.5px; background: #fff; border: 1px solid #dfe5df; border-radius: 6px; padding: 3px 8px; overflow-wrap: anywhere; }
.ia-more summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 13.5px; }
.ia-how { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
@media (max-width: 620px) { .ia-how { grid-template-columns: minmax(0, 1fr); } }
.ia-how > div { border: 1px solid #e4e9e4; border-radius: 10px; padding: 8px 12px; background: #fff; }
.ia-how h4 { margin: 0 0 4px; }
.ia-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; }
/* Help › Getting started and the crew sign-in steps (Rick, Oct 8): big text, plain steps, iPhone and Android side by side even on a phone. */
.ia-gs .ip-cb { display: grid; gap: 14px; font-size: 17px; line-height: 1.45; }
.ia-gsi { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; }
.ia-gsn { width: 34px; height: 34px; border-radius: 50%; background: #1f6b3a; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 17px; }
.ia-gsi h3 { margin: 4px 0 2px; font-size: 19px; } .ia-gsi p { margin: 0; }
.ia-gs .ia-how { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ia-gs .ia-how > div { padding: 8px; } .ia-gs .ia-how h4 { font-size: 17px; } .ia-gs .ia-steps { font-size: 15px; padding-left: 18px; gap: 6px; }
@media (max-width: 420px) { .ia-gsi { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; } .ia-gsn { width: 26px; height: 26px; font-size: 15px; margin-top: 2px; } .ia-gs .ia-steps { font-size: 14px; padding-left: 16px; } }
.ia-gsno, .hs-help { font-size: 17px; font-weight: 600; margin: 4px 0 0; }
.ip-helpbtn { background: var(--btn-bg); color: #1f2b23; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.hs-steps { font-size: 18px; line-height: 1.45; padding-left: 24px; margin: 6px 0 12px; display: grid; gap: 6px; }
.homesignin input { font-size: 18px; }
.hs-typo { margin-top: 10px; padding: 10px 12px; border: 1px solid #f2c25c; border-left: 4px solid var(--sun); background: #fff8e6; border-radius: 8px; font-size: 17px; } .hs-typo p { margin: 0 0 8px; } .hs-typo b { word-break: break-all; }
.hs-big { font-size: 20px; } .hs-nomail { display: block; margin-top: 10px; padding: 10px 12px; background: #f6f8f6; border-radius: 8px; border-left: 4px solid var(--sun); }
.sih-tries td { vertical-align: top; } .sih-tries .warn { color: #a5431c; font-weight: 600; }
.kbd { font-family: ui-monospace, Menlo, monospace; background: #f6f8f6; border: 1px solid #dfe5df; border-radius: 5px; padding: 0 5px; font-size: 12px; }
.ip-th { position: relative; display: block; }
.ip-wait img { opacity: .75; }
.ip-wtag { position: absolute; left: 4px; top: 4px; right: 4px; background: rgba(36,85,127,.92); color: #fff; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 2px 5px; text-align: center; }
.ip-wait.bad .ip-wtag { background: rgba(176,58,46,.95); }
.ip-wait.going .ip-wtag { background: rgba(31,107,58,.92); }
.ip-wait.sent .ip-wtag { background: rgba(31,107,58,.95); } .ip-wait.sent img { opacity: 1; }
.ip-wbar { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.7); overflow: hidden; }
.ip-wbar > i { display: block; height: 100%; width: 0; background: #1f6b3a; transition: width .25s; }
.ip-wait.bad .ip-wbar { display: none; }
.ip-wwhy { display: block; font-size: 11px; color: #8a2d22; margin-top: 3px; line-height: 1.25; overflow-wrap: anywhere; }
.ip-wbtns { display: flex; gap: 4px; margin-top: 3px; }
.ip-wbtns button { flex: 1; padding: 3px 4px; font-size: 12px; }
.ip-wfile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; background: #eef1ee; font-size: 11px; padding: 4px; overflow-wrap: anywhere; text-align: center; }
.ip-mk { position: absolute; right: 4px; bottom: 4px; border: 0; background: rgba(255,255,255,.92); border-radius: 999px; width: 30px; height: 30px; padding: 0; font-size: 15px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.mkmodal .modal-box { width: min(900px, 100%); display: grid; gap: 10px; }
.mkhead { display: flex; align-items: center; gap: 8px; }
.mktools { display: inline-flex; border: 1px solid #dfe5df; border-radius: 10px; padding: 2px; gap: 2px; }
.mktools button { border: 0; background: none; border-radius: 8px; padding: 6px 12px; font-weight: 600; }
.mktools button.on { background: var(--brand); color: #fff; }
.mkwrap { background: #111; border-radius: 10px; overflow: hidden; display: flex; justify-content: center; }
.mkwrap canvas { max-width: 100%; max-height: 70vh; touch-action: none; cursor: crosshair; display: block; }
.ia-admin { display: grid; gap: 6px; }
.ia-arow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; border: 1px solid #e4e9e4; border-radius: 10px; padding: 6px 10px; }
.ia-seg { display: inline-flex; border: 1px solid #dfe5df; border-radius: 10px; padding: 2px; gap: 2px; background: #f6f8f6; }
.ia-seg button { border: 0; background: none; border-radius: 8px; padding: 5px 10px; font-weight: 600; color: #556; }
.ia-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.crewbox { display: grid; gap: 8px; }
.crewfeed { border: 1px solid #e4e9e4; border-radius: 10px; overflow: hidden; max-height: 320px; overflow-y: auto; }
.crewit { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; padding: 6px 10px; border-bottom: 1px solid #eef1ee; font-size: 13.5px; }
.crewit:last-child { border-bottom: 0; }
.crewit time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* Opened from the home screen: room for the phone's status bar. */
@media (display-mode: standalone) { .top { padding-top: calc(10px + env(safe-area-inset-top, 0px)); } }

/* Photo quality: too dark / blurry (public/photoquality.js) */
.pq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pq-item { display: grid; gap: 3px; border: 1px solid #e4e9e4; border-radius: 10px; padding: 6px; background: #fff; font-size: 12.5px; }
.pq-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #111; }
.pq-why { font-weight: 700; color: #9b2c1f; text-transform: capitalize; }
.pf-th { position: relative; } .pf-qflag { position: absolute; left: 4px; top: 4px; z-index: 1; background: #fff4d9; color: #7a5600; border: 1px solid #f2c25c; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 6px; }
.ia-ai { margin-top: 14px; border-top: 1px solid #e4e9e4; padding-top: 10px; } .ia-ai h3 { margin: 0 0 4px; font-size: 15px; }
.ia-aibar { height: 8px; background: #e6ece8; border-radius: 6px; overflow: hidden; margin: 6px 0 4px; } .ia-aibar span { display: block; height: 100%; background: #2d7a46; }

/* ───────── Project page theme (Oct 2026): info pills, tab tray, status card, project search, side panel, sections ───────── */
/* 1) Info pills under the address (Dealer, Financing, SGIP, Installer). Dealer and Installer open a menu. */
.pinfo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pinfo > span:not(.pinfo-sub):not(.pinfo-hoa):not(.pinfo-sgip):not(.pinfo-hdm) { background: var(--btn-bg); border: 0; box-shadow: none; border-radius: 999px;
  padding: 4px 16px; line-height: 1.15; text-align: center; position: relative; }
.pinfo > span .muted { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #7a867e; }
.pinfo > span b { font-size: 14px; color: #1d2a22; }
.pinfo > span.pinfo-edit { cursor: pointer; padding: 4px 20px; }
.pinfo > span.pinfo-edit:hover { background: var(--btn-hover); }
.pinfo > span.pinfo-edit:focus-visible { outline: 2px solid #1f5c3a; outline-offset: 1px; }
.pinfo > span.pinfo-edit .car { position: absolute; right: 7px; bottom: 6px; font-size: 10px; opacity: .6; }
.pinfo-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 999; background: #fff; border: 1px solid #d6dfd9; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 4px; min-width: 220px; text-align: left; max-height: 320px; overflow-y: auto; cursor: default; }
.pinfo-menu div { padding: 6px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; font-size: 14px; color: #1d2a22; }
.pinfo-menu div:hover { background: #eef5f0; }
.pinfo-menu div.on { background: #2f7d4f; color: #fff; }

/* 2) Tab row: one tray, the open tab raised in green with yellow text. Scrolls sideways instead of wrapping. */
.tabs.ptray { display: flex; flex-wrap: nowrap; gap: 1px; background: #eef3ef; border-radius: 12px; padding: 4px; overflow-x: auto; scrollbar-width: thin; }
.tabs.ptray button { flex: 1 0 auto; justify-content: center; background: var(--btn-bg); border: 1px solid #1f5c3a; border-radius: 9px; padding: 6px 6px; font: inherit; font-size: 13.5px; color: #3c4a41;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; transition: background .12s; }   /* thin dark green outline; 6px sides so all 13 tabs fit the column at desktop width */
.tabs.ptray button:hover { background: var(--btn-hover); }
.tabs.ptray button.on { background: #2f7d4f; color: #ffe100; font-weight: 700; box-shadow: 0 2px 6px rgba(47,125,79,.35); }
.tabs.ptray button .n { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; background: #dfe8e2; color: #3c4a41; }
.tabs.ptray button.on .n { background: #ffe100; color: #2f7d4f; }
.tabs.ptray .tabnew { margin-left: 0; }

/* 3) "Where it stands" card: colored stripe, stage › sub stage headline, days chip, blockers, next step; picker tray on the right. */
.statuscard { --sc-c: #5d6b62; --sc-tray: #eef1ef; --sc-chip: #d5ddd8; grid-template-columns: minmax(0, 1fr) auto; border-left: 5px solid #8a958e; background: #fff; border-color: #d5ddd8; min-height: 62px; }
.statuscard.sc-green { --sc-c: #2f7d4f; --sc-tray: #dcefe2; --sc-chip: #9fd8b1; background: #ecf9f0; border-color: #9fd8b1; border-left-color: #2f7d4f; }
.statuscard.sc-amber { --sc-c: #7a5600; --sc-tray: #f7e3b0; --sc-chip: #f2c25c; background: #fff4d9; border-color: #f2c25c; border-left-color: #b07a00; }
.statuscard.sc-red { --sc-c: #9b2c1f; --sc-tray: #f6d3cf; --sc-chip: #eea59d; background: #fdeceb; border-color: #eea59d; border-left-color: #9b2c1f; }
.statuscard .sc-info { gap: 2px; }
.statuscard .sc-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.statuscard .sc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.statuscard .sc-stage { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--sc-c); }
.statuscard .sc-big { flex: none; font-size: 17px; font-weight: 800; color: var(--sc-c); }
.statuscard:not(.sc-green):not(.sc-amber):not(.sc-red) .sc-big { text-decoration: line-through; text-decoration-thickness: 1px; }   /* cancelled */
.statuscard .sc-days .chip { background: #fff; border: 1px solid var(--sc-chip); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--sc-c); padding: 1px 8px; }
.statuscard .sc-days .chip.bad { color: #9b2c1f; border-color: #eea59d; }
.statuscard .sc-dmeta { flex: none; font-size: 12px; color: #5d6b62; margin-left: -4px; }
.statuscard .sc-dmeta:empty { display: none; }
.statuscard .sc-blockers { margin-left: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.statuscard .sc-blockers .sc-h { font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; color: var(--sc-c); }
.statuscard .sc-block { font-size: 13px; color: var(--sc-c); }
.statuscard .sc-nextl { font-size: 13px; color: #5d6b62; }
.statuscard .sc-nextl b { color: #1d2a22; font-weight: 700; }
.statuscard .sc-picks { display: block; position: relative; }
.sc-tray { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--sc-tray); }
.sc-tray .sc-pick { background: transparent; border: 1px solid #1f5c3a; border-radius: 9px; padding: 5px 11px; font-size: 13px; color: #3c4a41; white-space: nowrap; }
.sc-tray .sc-pick:hover { background: #fff; }
.sc-tray .sc-pick b { color: #1d2a22; }
.statuscard.sc-red .sc-pickstage { background: #9b2c1f; color: #fff; } .statuscard.sc-red .sc-pickstage b { color: #fff; }
.statuscard.sc-red .sc-pickstage:hover { background: #86251a; }
.sc-menu { position: absolute; z-index: 999; width: 300px; max-height: 300px; overflow-y: auto; overflow-x: hidden; background: #fff; border: 1px solid #d6dfd9; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16); padding: 4px; text-align: left; }
.sc-menu .sc-mhead { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #7a867e; padding: 8px 10px 3px; }
.sc-menu .sc-mitem { padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: #1d2a22; white-space: normal; overflow-wrap: anywhere; }
.sc-menu .sc-mitem:hover { background: #eef5f0; }
.sc-menu .sc-mitem.on { background: #2f7d4f; color: #ffe100; font-weight: 700; }
@media (max-width: 1150px) { .statuscard { grid-template-columns: minmax(0, 1fr); } .statuscard .sc-picks { justify-self: start; } }
/* In Service (Rick, Nov 13): only when the job is complete. Dark green band, "In Service" large, white and centered; the stage
   prefix and the days chip go; the card's other lines stay folded under a small More ▾. Change status stays at the right (to reopen a job). */
.statuscard.sc-done { --sc-c: #fff; --sc-tray: rgba(255,255,255,.14); background: #1f5c3a; border-color: #1f5c3a; border-left-color: #143d27; position: relative; grid-template-columns: minmax(0, 1fr); min-height: 58px; }
.statuscard.sc-done .sc-info { justify-content: center; }
.statuscard.sc-done .sc-top { justify-content: center; }
.statuscard.sc-done .sc-big { font-size: 26px; letter-spacing: .02em; color: #fff; }
.statuscard.sc-done .sc-stage, .statuscard.sc-done .sc-days, .statuscard.sc-done .sc-dmeta,
body:not(.jm-scopen) .statuscard.sc-done .sc-line:not(.sc-top) { display: none !important; }
/* A small More ▾ stays (Rick, Nov 13); opened, the card's lines read white on the green. */
.statuscard.sc-done .jm-scmore { font-size: 12px; color: #d8efe0; opacity: .9; } .statuscard.sc-done .jm-scmore:hover { color: #fff; opacity: 1; }
.statuscard.sc-done .sc-line:not(.sc-top), .statuscard.sc-done .sc-line b, .statuscard.sc-done .sc-line .linkbtn { color: #fff; text-align: center; }
.statuscard.sc-done .sc-info { padding-right: 0; }
.statuscard.sc-done .sc-catch { color: #1f5c3a; }
.statuscard.sc-done .sc-picks { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.statuscard.sc-done .sc-tray .sc-pick { border-color: rgba(255,255,255,.7); color: #fff; } .statuscard.sc-done .sc-tray .sc-pick b { color: #fff; }
.statuscard.sc-done .sc-tray .sc-pick:hover { background: rgba(255,255,255,.18); }
@media (max-width: 700px) { .statuscard.sc-done .sc-picks { position: static; transform: none; justify-self: center; } }
@media (max-width: 700px) { .statuscard .sc-line { white-space: normal; } .statuscard .sc-top { flex-wrap: wrap; } .statuscard .sc-dmeta { margin-left: 0; } .sc-tray { flex-wrap: wrap; } .sc-menu { width: min(300px, calc(100vw - 40px)); } }

/* 4) Project name row: name + "← Projects" on the left, the project search centered. Also at the top of the Calendar. */
.pjumprow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.pjumprow .pjleft { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pjumprow h1, .pstick .pjumprow h1 { font-size: 28px; font-weight: 800; line-height: 1.1; margin: 0; }
.pstick .pjumprow .pback { margin-left: 0; }
.pjumprow .pjump, .pstick .pjumprow .pjump { position: relative; width: 420px; max-width: 100%; min-width: 0; flex: none; }
.pjump .pjicon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #2f7d4f; pointer-events: none; }
.pjump kbd, #tsearchres kbd { font: inherit; font-size: 11px; line-height: 1; background: #fff; border: 1px solid #d6dfd9; border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: #5d6b62; }
.pjump .pjkbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
#tsearchres { top: calc(100% + 6px); left: 0; right: auto; width: 100%; min-width: 420px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #d6dfd9; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16); padding: 6px; z-index: 60; }
#tsearchres .pjhead { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #7a867e; padding: 4px 10px 6px; }
#tsearchres a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; border-bottom: 0; color: #1d2a22; text-decoration: none; }
#tsearchres a:hover, #tsearchres a.on { background: #eef5f0; }
#tsearchres .pjmain { flex: 1; min-width: 0; display: grid; }
#tsearchres .pjmain b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tsearchres .pjsub { font-size: 12px; color: #6b7a70; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tsearchres .pjstage { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #dcefe2; color: #2f7d4f; white-space: nowrap; }
#tsearchres a.on .pjstage { background: #2f7d4f; color: #ffe100; }
#tsearchres mark { background: #fff3a6; color: inherit; border-radius: 3px; padding: 0 1px; }
#tsearchres .pjmsg { padding: 8px 10px; font-size: 13px; color: #6b7a70; }
#tsearchres .pjfoot { border-top: 1px solid #edf2ee; margin-top: 4px; padding: 7px 10px 3px; font-size: 11px; color: #7a867e; }
#tsearchres .pjfoot span { margin-left: 12px; }
@media (max-width: 900px) { .pjumprow { grid-template-columns: minmax(0, 1fr); } .pjumprow > span:empty { display: none; } .pjumprow .pjump, .pstick .pjumprow .pjump { width: 100%; } #tsearchres { min-width: 0; } .pjump .pjkbd { display: none; } .pjumprow h1, .pstick .pjumprow h1 { font-size: 22px; } }

/* 5) Right side panel and sections (project page only: .side, .psec, .psecgroup). */
.side > .panel { background: #fff; border: 1px solid #d9dfd8; border-left: 5px solid #2f7d4f; border-radius: 12px; padding: 12px 14px; box-shadow: none; }
.side > .panel h2 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #2f7d4f; margin: 0 0 8px; }
.side > .panel > .row:first-child { align-items: center; margin-bottom: 6px; }
.side > .panel > .row:first-child h2 { margin: 0; }
.side button, .side a.btn, .side a.gdrive { font: inherit; font-size: 13px; background: #eef3ef; border: 0; border-radius: 999px; padding: 6px 13px; color: #1d2a22; cursor: pointer;
  box-shadow: none; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.side button:hover, .side a.btn:hover { background: #e3ece6; }
.side #addtask, .side #addnote, .side button.primary { background: #2f7d4f; color: #ffe100; font-weight: 700; }
.side #addtask:hover, .side #addnote:hover, .side button.primary:hover { background: #286b44; }
.side .tlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.side .tlist li { background: #f6f9f7; border: 0; border-radius: 10px; padding: 8px 10px; display: flex; gap: 10px; align-items: flex-start; }
.side .tlist li.muted { background: transparent; padding: 4px 0; }
.side .tlist input[type=checkbox] { accent-color: #2f7d4f; width: 16px; height: 16px; margin-top: 2px; flex: none; }
.side .tlist .subj { font-weight: 700; }
.side .tlist .tedit { background: transparent; padding: 0 4px; color: #7a867e; }
.side .tlist .sub { font-size: 12px; color: #6b7a70; margin-top: 2px; }
.side .chip.warn { background: #fff4d9; color: #7a5600; border: 1px solid #f2c25c; border-radius: 999px; font-weight: 700; font-size: 11px; padding: 1px 8px; }
.side .commsbtns { display: flex; flex-wrap: wrap; gap: 2px; background: #eef3ef; border-radius: 12px; padding: 4px; }
.side .commsbtns button { background: transparent; border-radius: 9px; padding: 6px 10px; }
.side .commsbtns button:hover:not(:disabled) { background: var(--btn-hover); }
.side #notesubj, .side #note, .side select { font: inherit; font-size: 13px; background: #eef3ef; border: 1px solid #c9d6cd; border-radius: 10px; padding: 7px 11px; outline: none; color: #1d2a22; box-sizing: border-box; }
.side #notesubj { width: 100%; margin-bottom: 6px; }
.side #note { width: 100%; min-height: 64px; }
.side select { border-radius: 999px; padding: 5px 10px; }
.side #notesubj:focus, .side #note:focus, .side select:focus { background: #fff; border-color: #ffe100; box-shadow: 0 0 0 3px rgba(47,125,79,.18); }
/* Right column chips (public/sidechips.js): sticky light green box at the top of the column, 8px below the app's sticky header rows. */
.side > .sidechips { position: sticky; top: calc(var(--toph, 52px) + var(--tabh, 0px) + var(--pstickh, 0px) + 8px); z-index: 3; margin: 0 0 14px;
  background: #eef3ef; border: 1px solid #c9d6cd; border-radius: 12px; padding: 12px; gap: 8px; justify-content: center; }   /* rows centred, like the Details section chips */
/* Notes filters: category row, then who created it (public/app.js notesFeed). */
.side .notefilter { margin: 8px 0 12px; }
.side .notewho { margin: 0 0 12px; }
.side .notesfeed .note { background: #f6f9f7; border: 0; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.side .notesfeed .nhead { font-size: 11px; color: #6b7a70; gap: 6px; align-items: flex-start; flex-wrap: nowrap; }
/* Note header: name, time and category on the left (they wrap); Read / Edit / Delete stay on the right of the same line. */
.notesfeed .nhead .nmeta { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.notesfeed .nhead .nacts { flex: none; display: flex; gap: 4px; white-space: nowrap; }
/* Edited by someone other than the creator, and not yet read by you (db/0103_note_reads.sql). */
.side .notesfeed .note.flag { background: #fdecec; border-left: 4px solid #d32f2f; }
.notesfeed .chip.noteflag { background: #d32f2f; color: #fff; font-weight: 600; margin: 0 0 6px; }
.side .notesfeed .noteread { font-size: 11px; padding: 3px 9px; background: #d32f2f; border: 1px solid #d32f2f; color: #fff; font-weight: 700; }
.side .notesfeed .noteread:hover { background: #b71c1c; }
/* One note large (click a note, public/app.js): the note in the shared pop-out, bigger text; Read / Edit / Delete work there too. */
.pgrid > .side .notesfeed .note { cursor: pointer; }
.pgrid > .side .notesfeed .note:hover { box-shadow: 0 0 0 2px rgba(47,125,79,.25); }
.modal-box.notepopbox { width: min(760px, 100%); padding: 16px 20px; }
.modal.notepopwrap .modal-box.notepopbox { margin: auto 0; }   /* centred top to bottom; a long note still scrolls from its top */
@media (min-width: 1001px) { .modal.notepopwrap { justify-content: flex-end; padding-right: var(--popright, 16px); } }   /* toward the right column */
/* Right-column pop-outs (a note, a task; popBeside in app.js): centred top to bottom (a long one still scrolls from its top),
   right edge lined up with the right column so it opens out to the left; phones keep it centred. */
.modal.popside .modal-box { margin: auto 0; }
@media (min-width: 1001px) { .modal.popside { justify-content: flex-end; padding-right: var(--popright, 16px); } }
.modal.popside .modal-box:not(.notepopbox) { width: min(560px, 100%); }
/* Open tasks: the whole task opens the edit pop-out (no ✎). */
.pgrid > .side .tlist li[data-tpop] { cursor: pointer; }
.pgrid > .side .tlist li[data-tpop]:hover { box-shadow: 0 0 0 2px rgba(47,125,79,.25); }
.notepopbox .notepop-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: #2f7d4f; }
.notepopbox .notepop-top button { text-transform: none; letter-spacing: 0; white-space: nowrap; flex: none; }
.notepopbox .notesfeed { max-height: none; }
.notepopbox .notesfeed .note { font-size: 16px; line-height: 1.55; padding: 14px 18px; margin: 0; }
.notepopbox .notesfeed .nsubj { font-size: 19px; }
.notepopbox .notesfeed .nhead { font-size: 13px; }
.notepopbox .notesfeed .nhead .when { font-size: 13px; }
.notepopbox .notesfeed :is(.noteread, .noteedit, .notedel) { font-size: 13px; padding: 5px 12px; }
.notepopbox .notesfeed .nedit .rtein { min-height: 160px; }
.side .notesfeed .nhead select { font-size: 11px; padding: 2px 8px; background: #fff; }
.side .notesfeed .noteedit, .side .notesfeed .notedel { font-size: 11px; padding: 3px 9px; background: #fff; border: 1px solid #d9dfd8; }
.side .notesfeed .notedel { color: #9b2c1f; border-color: #eea59d; }
.side .notesfeed .notedel:hover { background: #fdeceb; }
.side .pvlinks { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }


details:is(.psec, .psecgroup) { background: #fff; border: 1px solid #d9dfd8; border-left: 5px solid #2f7d4f; border-radius: 12px; box-shadow: none; }
details:is(.psec, .psecgroup) > summary h2 { font-size: 15px; font-weight: 800; color: #1d2a22; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details:is(.psec, .psecgroup) > summary h2::before { color: #2f7d4f; }   /* the ▸ marker */
details:is(.psec, .psecgroup) > summary:hover h2 { color: #2f7d4f; }
details:is(.psec, .psecgroup)[open] > summary { border-bottom: 1px solid #edf2ee; margin-bottom: 8px; padding-bottom: 8px; }
details:is(.psec, .psecgroup) .count { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #dcefe2; color: #2f7d4f; }
details:is(.psec, .psecgroup) summary a.gdrive { background: #eef3ef; border: 0; border-radius: 999px; padding: 4px 12px; }
details:is(.psec, .psecgroup) > summary button, details:is(.psec, .psecgroup) > summary .btn { font: inherit; font-size: 13px; font-weight: 500; background: #eef3ef; border: 0; border-radius: 999px;
  padding: 5px 12px; color: #1d2a22; box-shadow: none; }
details:is(.psec, .psecgroup) > summary button:hover { background: #e3ece6; }
details:is(.psec, .psecgroup) > summary button.primary { background: #2f7d4f; color: #ffe100; font-weight: 700; }
details:is(.psec, .psecgroup) > summary .chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: #eef3ef; color: #3c4a41; border: 0; }
.wchead { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wchead .chip { background: #fff4d9; color: #7a5600; }
details.psecgroup details.psec { border: 1px solid #e3ebe5; border-left: 3px solid #9fd8b1; background: #fbfdfb; border-radius: 10px; }
details.psecgroup details.psec > summary h2 { font-size: 14px; }
details:is(.psec, .psecgroup) .fields input:not([type=checkbox]):not([type=radio]),
details:is(.psec, .psecgroup) .fields select,
details:is(.psec, .psecgroup) .fields textarea { background: #eef3ef; border: 1px solid #c9d6cd; border-radius: 9px; outline: none; box-shadow: none; }
details:is(.psec, .psecgroup) .fields input:focus,
details:is(.psec, .psecgroup) .fields select:focus,
details:is(.psec, .psecgroup) .fields textarea:focus { background: #fff; border-color: #ffe100; box-shadow: 0 0 0 3px rgba(47,125,79,.18); }
details:is(.psec, .psecgroup) .fields label { color: #5d6b62; }
details:is(.psec, .psecgroup) input[type=checkbox] { accent-color: #2f7d4f; }
/* the auto-save colors still show on top of the soft fill */
details:is(.psec, .psecgroup) .fields label.dirty :is(input, select, textarea) { border-color: var(--sun); background: #fffbf2; }


/* Open project tabs (top bar): dark green outline and ✕; the open project's tab light green (like Expand all). */
a.ptab { border: 1.5px solid #1f5c3a; border-bottom: 0; border-radius: 8px 8px 0 0; margin-right: 4px; }
a.ptab:hover { background: #eef5f0; text-decoration: none; }
a.ptab [data-ptabx] { color: #1f5c3a; opacity: 1; font-weight: 700; }
a.ptab [data-ptabx]:hover { background: #dcefe2; border-radius: 50%; color: #1f5c3a; }
a.ptab.is-current { background: #dcefe2; color: #1d2a22; font-weight: 700; box-shadow: none; }
a.ptab.is-current [data-ptabx] { color: #1f5c3a; }
a.ptab.is-current [data-ptabx]:hover { background: #cfe6d6; color: #1f5c3a; }

/* Installer picker inside the section (moved out of the section header) */
.ctrrow { display: flex; margin: 0 0 10px; }
.ctrrow .ctrbtn { margin-left: 0; background: #eef3ef; border: 1px solid #d9dfd8; border-radius: 999px; padding: 4px 14px 4px 8px; }
.ctrrow .ctrbtn:hover { background: #e3ece6; border-color: #2f7d4f; }
.ctrrow .ctrbtn.empty { background: #fff4d9; border-color: #f2c25c; color: #7a5600; }

/* Section header status chip (replaces the "filled / total" count) */
.secst { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #eef3ef; color: #5d6b62; white-space: nowrap; }
.secst.ok { background: #dcefe2; color: #2f7d4f; }
.secst.warn { background: #fff4d9; color: #7a5600; }
.secst.bad { background: #fdeceb; color: #9b2c1f; }

/* MPU group: utility / AHJ card buttons inside the group, above its steps */
.mpulinks { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.mpulinks button { font: inherit; font-size: 13px; background: #eef3ef; border: 0; border-radius: 999px; padding: 5px 12px; color: #1d2a22; cursor: pointer; }
.mpulinks button:hover { background: #e3ece6; }
details.psecgroup[data-group="mpu"] > .hoasteps { margin: 0 0 10px; }
/* Headers show one status chip only: the scheduling / appointment date chips stay inside the sections */
details:is(.psec, .psecgroup) > summary .schhdr { display: none; }

/* Project header row: SL # · address · phone · email, then the Dealer … Installer pills on the same line */
.pline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.pline .pinfo { margin-top: 0; }
.phead > div:first-child { flex: 1 1 0; min-width: 0; } .phead > .spacer { display: none; }   /* the header row runs the full width (an ON HOLD box stays at its right)… */
.pline .pinfo { margin-left: auto; }                          /* …so the Dealer … Installer pills sit at its right end */

/* ON HOLD / CANCELLED / JOB IN JEOPARDY: a stamp laid over the header (tilted, see-through, clicks pass through),
   so the address row and the Dealer … Installer pills stay where they are */
.phead { position: relative; }
.phead > .alarm { position: absolute; z-index: 3; right: 400px; top: 100%; transform: translateY(-28%) rotate(-6deg); min-width: 0; width: auto;
  padding: 6px 24px; background: rgba(253, 236, 234, .6); border-width: 4px; pointer-events: none; }   /* over the stage bar */
.phead > .alarm .alarm-name { font-size: 38px; white-space: nowrap; }
.phead > .alarm .alarm-why { font-size: 13px; max-width: 340px; }
@media (max-width: 1100px) { .phead > .alarm { right: 16px; } .phead > .alarm .alarm-name { font-size: 28px; } }

/* Dealer … Installer pills: thin dark green outline; the row's text sizes in one place */
.pinfo > span:not(.pinfo-sub):not(.pinfo-hoa):not(.pinfo-sgip):not(.pinfo-hdm) { border: 1px solid #1f5c3a; }
.pline { --pl-val: 16px; --pl-lab: 11px; }   /* size option B */
.pstick .paddr { font-size: 17px; margin-top: 6px; }   /* address · email · phone: in the frozen header under the name (Rick, Oct 28) */
.pline .pinfo > span b { font-size: var(--pl-val); }
.pline .pinfo > span .muted { font-size: var(--pl-lab); }

/* Side column (Open tasks …) starts level with the Alerts box */
@media (min-width: 1001px) { .pgrid > .side { margin-top: 10px; } }   /* the tab row now runs above both columns; this matches the gap above Alerts */

/* Tab row (Details … History) across the full page width: a little bigger, a small gap between tabs, and free room at the right for more tabs later */
.tabs.ptray { gap: 5px; padding: 5px; margin-bottom: 12px; }
.tabs.ptray button { flex: 0 0 auto; font-size: 14.5px; padding: 7px 11px; }
.tabs.ptray button .n { font-size: 12px; }

/* Name row: "← Projects" first (larger), then the project name and its SL #; the search moves right when the name needs the room */
.pjumprow { grid-template-columns: minmax(max-content, 1fr) auto 1fr; }
.pjumprow .pjleft { gap: 14px; align-items: baseline; }
.pjumprow .pjleft .pback, .pstick .pjumprow .pback { font-size: 17px; font-weight: 600; color: #2f7d4f; white-space: nowrap; }
.pjumprow .pjleft .pnum { font-size: 18px; font-weight: 600; color: #5d6b62; white-space: nowrap; }
@media (max-width: 900px) { .pjumprow { grid-template-columns: minmax(0, 1fr); } .pjumprow .pjleft { flex-wrap: wrap; } }

/* Welcome call script: a panel docked on the right that stays open until Close / ✕ (it doesn't block the page) */
.wcscriptpanel { position: fixed; z-index: 900; right: 16px; top: calc(var(--toph, 52px) + 12px); width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - var(--toph, 52px) - 28px);
  overflow-y: auto; background: #fff; border: 1px solid #d9dfd8; border-left: 5px solid #2f7d4f; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 14px 16px; }
.wcscriptpanel h2 { margin: 0 70px 10px 0; font-size: 16px; font-weight: 800; color: #1d2a22; }
.wcscriptpanel .wcsp-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #1f5c3a; background: #eef3ef; color: #1f5c3a; font-weight: 700; cursor: pointer; padding: 0; }
.wcscriptpanel .wcsp-x:hover { background: #dcefe2; }
.wcscriptpanel .wcsp-min { position: absolute; top: 10px; right: 44px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #1f5c3a; background: #eef3ef; color: #1f5c3a; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; }
.wcscriptpanel .wcsp-min:hover { background: #dcefe2; }
/* minimized: just the title bar, bottom right */
.wcscriptpanel.min { top: auto; bottom: 16px; width: 300px; max-height: none; overflow: hidden; cursor: pointer; padding: 10px 14px; }
.wcscriptpanel.min h2 { margin: 0 70px 0 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcscriptpanel.min > :not(h2):not(.wcsp-x):not(.wcsp-min) { display: none; }
.wcscriptpanel.min .wcsp-x, .wcscriptpanel.min .wcsp-min { top: 7px; }

/* Header: address line on the left, the Dealer … Installer pills on their own row below it (also left) */
.pline { flex-direction: column; align-items: flex-start; gap: 8px; }
.pline .pinfo { margin-left: 0; }
.pline .pinfo { align-self: center; }   /* the Dealer … Installer row centered under the address line */

/* ===== Project › Details: Welcome & Site Survey (#onbhub) — projhubs.js ===== */
#onbhub { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
#onbhub .ob-hero { background: #9cc8ad; color: var(--ink); padding: 16px 18px; min-height: 159px; display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 16px; align-items: stretch; cursor: pointer; }
#onbhub .ob-id { display: flex; gap: 12px; align-items: flex-start; align-self: center; }
#onbhub .ob-avcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#onbhub .ob-av { width: 46px; height: 46px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
#onbhub .ob-open { background: #fff; border: 1px solid rgba(47,125,79,.35); color: var(--brand); font: inherit; font-size: 11px; font-weight: 700; padding: 2px 0; width: 46px; border-radius: 6px; cursor: pointer; }
#onbhub.collapsed .ob-open { background: #e9b949; border-color: #e9b949; color: #15241b; }
#onbhub .ob-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
#onbhub .ob-sub { font-size: 12.5px; color: #24362b; margin-top: 3px; }
#onbhub .ob-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#onbhub .ob-step { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.55); border: 1px solid rgba(47,125,79,.25); color: var(--ink); border-radius: 999px; padding: 3px 10px 3px 4px; font: inherit; font-size: 12px; cursor: pointer; }
#onbhub .ob-step:hover { background: rgba(255,255,255,.85); }
#onbhub .ob-step b { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 800; }
#onbhub .ob-step.on { background: var(--brand); color: #fff; border-color: var(--brand); }
#onbhub .ob-step.on b { background: #fff; color: var(--brand); }
#onbhub .ob-step i { font-style: normal; opacity: .85; }
#onbhub .ob-step .dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa79f; }
#onbhub .ob-step .dot.ok { background: #2f9a5a; } #onbhub .ob-step .dot.warn { background: #d48a00; } #onbhub .ob-step .dot.bad { background: var(--bad); }
#onbhub .ob-step.on .dot.ok { background: #8fe0a8; }
#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips { display: grid; grid-template-columns: repeat(2, minmax(0,210px)); gap: 8px; align-self: center; justify-self: end; }
/* Header buttons in every combined section: the same light green as the Customer & Deal Arcasa / Drive buttons. */
#onbhub .ob-chip, #onbhub .ob-chips .ctrbtn, :is(#syshub, #mpuhub) .sy-chip, :is(#syshub, #mpuhub) .sy-chips .ctrbtn { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; width: 100%; padding: 0 12px; border-radius: 999px; background: #e7f2ea; color: #15241b; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
#onbhub .ob-chip:hover, #onbhub .ob-chips .ctrbtn:hover, :is(#syshub, #mpuhub) .sy-chip:hover, :is(#syshub, #mpuhub) .sy-chips .ctrbtn:hover { background: #d6ecdc; }
#onbhub .ob-chip span, :is(#syshub, #mpuhub) .sy-chip span { font-weight: 500; opacity: .92; overflow: hidden; text-overflow: ellipsis; }
/* AHJ / Business license chips (Welcome & Site Survey): open their Directory cards; the license chip is tinted by its status. */
#onbhub .ob-chip .ob-ar { font-weight: 600; opacity: .6; }
#onbhub .ob-chip.warn { background: #fdf0d3; } #onbhub .ob-chip.warn:hover { background: #fae5b5; }
#onbhub .ob-chip.bad { background: #fbe3e1; color: #7a1a12; } #onbhub .ob-chip.bad:hover { background: #f7d0cc; }
#onbhub .ob-chip.mut { background: #eef1ef; color: #5b6b61; }
#onbhub .ob-ld { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #2f9a5a; }
#onbhub .ob-ld.warn { background: #d48a00; } #onbhub .ob-ld.bad { background: var(--bad); }
:is(#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips) .ctrrow { margin: 0; display: block; }
:is(#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips) .ctrbtn .ctricon { display: none; }
:is(#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips) .ctrbtn .ctrtxt { display: flex !important; flex-direction: row !important; align-items: baseline !important; gap: 5px; }
:is(#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips) .ctrbtn .ctrtxt :is(small, b) { display: inline !important; line-height: 1 !important; margin: 0 !important; font-size: 13px; color: #15241b; text-transform: none; letter-spacing: 0; }
:is(#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips) .ctrbtn .ctrtxt small { font-weight: 500; opacity: .92; }
:is(#onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips) .ctrbtn .ctrtxt small::after { content: ':'; }
#onbhub.collapsed .ob-body { display: none; }
#onbhub .ob-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 0 12px; }
#onbhub .ob-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 11px 14px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; display: flex; gap: 7px; align-items: center; }
#onbhub .ob-tab.on { color: var(--ink); border-bottom-color: var(--brand); }
#onbhub .ob-tab .n { width: 18px; height: 18px; border-radius: 50%; background: var(--chip); font-size: 11px; display: grid; place-items: center; }
#onbhub .ob-tab.on .n { background: var(--brand); color: #fff; }
#onbhub .ob-allbtns { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 12.5px; }   /* Open all / Close all, like Install & Final */
#onbhub .ob-pane { display: none; padding: 14px 16px; } #onbhub .ob-pane.on { display: block; }
#onbhub .ob-pane > details.psec { margin: 0 0 10px; }
#onbhub .ob-next { display: flex; justify-content: flex-end; margin-top: 10px; }
#onbhub .ob-next button { background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; color: var(--brand); }
#onbhub .ob-layout { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; background: #fbfcfb; }
#onbhub .ob-layout b { font-size: 13px; } #onbhub .ob-layout small { color: var(--muted); font-size: 12px; display: block; }
#onbhub .ob-layout .sp { flex: 1; }
#onbhub .ob-layout :is(a, button) { border: 1px solid var(--line); background: var(--btn-bg); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; cursor: pointer; }

/* ===== Project › Details: System, MPU & Battery (:is(#syshub, #mpuhub)) — projhubs.js ===== */
:is(#syshub, #mpuhub) { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
:is(#syshub, #mpuhub) .sy-hero { background: rgba(47,125,79,.82); color: #fff; padding: 10px 14px; display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 12px; align-items: stretch; cursor: pointer; }
:is(#syshub, #mpuhub) .sy-id { display: flex; gap: 12px; align-items: flex-start; align-self: center; }
:is(#syshub, #mpuhub) .sy-avcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
:is(#syshub, #mpuhub) .sy-av { width: 46px; height: 46px; border-radius: 10px; background: #e9b949; color: #15241b; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
:is(#syshub, #mpuhub) .sy-open { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; font: inherit; font-size: 11px; font-weight: 700; padding: 2px 0; width: 46px; border-radius: 6px; cursor: pointer; }
:is(#syshub, #mpuhub).collapsed .sy-open { background: #e9b949; border-color: #e9b949; color: #15241b; }
:is(#syshub, #mpuhub) .sy-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
:is(#syshub, #mpuhub) .sy-sub { font-size: 13px; opacity: .96; margin-top: 3px; }
:is(#syshub, #mpuhub) .sy-sub2 { font-size: 12px; color: #e3f1e8; margin-top: 2px; }
:is(#syshub, #mpuhub) .sy-sub2 .warn { color: #ffd27a; font-weight: 700; }
:is(#syshub, #mpuhub).collapsed .sy-body { display: none; }
:is(#syshub, #mpuhub) .sy-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
:is(#syshub, #mpuhub) .sy-sec { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; overflow: hidden; background: #fff; }
:is(#syshub, #mpuhub) .sy-sechead { display: grid; grid-template-columns: auto auto minmax(0,1fr); gap: 10px; align-items: center; padding: 6px 10px; background: #f3f8f4; cursor: pointer; }
:is(#syshub, #mpuhub) .sy-sectitle { display: flex; align-items: center; gap: 8px; min-width: 150px; }
:is(#syshub, #mpuhub) .sy-sectitle b { font-size: 15px; }
:is(#syshub, #mpuhub) .sy-secst { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-weight: 600; white-space: nowrap; }
:is(#syshub, #mpuhub) .sy-secst.ok { background: #dcefe2; color: #1d5a35; } :is(#syshub, #mpuhub) .sy-secst.warn { background: #fff3dc; color: var(--warn); }
:is(#syshub, #mpuhub) .sy-secst:not(.ok)::before { content: 'Next: '; font-weight: 500; }
:is(#syshub, #mpuhub) .sy-tog { all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--brand); font-size: 13px; transition: transform .15s; margin-right: -4px; }
:is(#syshub, #mpuhub) .sy-sec.shut .sy-tog { transform: rotate(-90deg); }
:is(#syshub, #mpuhub) .sy-sec.shut .sy-secbody { display: none; }
:is(#syshub, #mpuhub) .sy-steps { display: flex; gap: 4px; min-width: 0; }
:is(#syshub, #mpuhub) .sy-step { all: unset; cursor: pointer; flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; font-size: 12px; line-height: 1.25; }
:is(#syshub, #mpuhub) .sy-step b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#syshub, #mpuhub) .sy-step small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#syshub, #mpuhub) .sy-step.done { background: #dcefe2; border-color: #dcefe2; }
:is(#syshub, #mpuhub) .sy-step.done b::before { content: '✓ '; color: var(--brand); }
:is(#syshub, #mpuhub) .sy-step.cur { background: #fff3dc; border-color: var(--sun); }
:is(#syshub, #mpuhub) .sy-step.gap { border: 1px dashed #d9a441; }
:is(#syshub, #mpuhub) .sy-step.gap small { color: var(--warn); }
:is(#syshub, #mpuhub) .sy-secbody { padding: 8px 12px 10px; border-top: 1px solid var(--line); }
:is(#syshub, #mpuhub) .sy-pane > details.psec { margin: 0 0 6px; }
:is(#syshub, #mpuhub) .sy-pane > .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 6px 12px; }
:is(#syshub, #mpuhub) .sy-pane > .fields > label { grid-column: auto !important; }
:is(#syshub, #mpuhub) .sy-pane > .fields > :is(label:has(textarea), .flabel, .fblock) { grid-column: 1 / -1 !important; }
:is(#syshub, #mpuhub) .sy-pane > .fields :is(input, select) { width: 100%; box-sizing: border-box; }
:is(#syshub, #mpuhub) [data-p="mpu"] > .hoasteps { display: none; }
/* numbered groups (System → Electrical intake → Design; MPU in workflow order) */
:is(#syshub, #mpuhub) .sy-grp { margin: 0 0 8px; }
:is(#syshub, #mpuhub) .sy-grp:last-child { margin-bottom: 0; }
:is(#syshub, #mpuhub) .sy-grp + .sy-grp { border-top: 1px dashed var(--line); padding-top: 8px; }
:is(#syshub, #mpuhub) .sy-grpsteps { margin: 0 0 8px; }
:is(#syshub, #mpuhub) .sy-grph { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
:is(#syshub, #mpuhub) .sy-grph i, :is(#syshub, #mpuhub) .sy-num { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-size: 11px; letter-spacing: 0; }
:is(#syshub, #mpuhub) .sy-grph em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11.5px; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 1px 8px; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec { border: 0 !important; box-shadow: none !important; background: none !important; padding: 0 !important; margin: 0 0 8px !important; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec > summary { list-style: none; pointer-events: none; padding: 0 0 6px !important; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec > summary::-webkit-details-marker { display: none; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec > :is(summary, summary h2)::before, :is(#syshub, #mpuhub) [data-p="mpu"] > details.psec > summary::marker { display: none !important; content: none !important; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec > summary h2 { font-size: 12px !important; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); display: flex; align-items: center; gap: 8px; margin: 0; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec > summary h2 :is(.secst, .chip) { text-transform: none; letter-spacing: 0; font-size: 11.5px; }
:is(#syshub, #mpuhub) [data-p="mpu"] > details.psec + details.psec, :is(#syshub, #mpuhub) [data-p="mpu"] > .sy-grp { border-top: 1px dashed var(--line); padding-top: 8px !important; }
:is(#syshub, #mpuhub) [data-p="mpu"] .mpulinks { margin: 0 0 8px; }
:is(#syshub, #mpuhub) [data-p="mpu"] details .fields > label:has(.sy-date) { grid-column: span 3 !important; }
/* date fields as calendar buttons */
:is(#syshub, #mpuhub) .sdate .sdq, :is(#syshub, #mpuhub) .sdate .sdmeta { display: none !important; }
:is(#syshub, #mpuhub) .sdate { position: relative; display: block; }
:is(#syshub, #mpuhub) label:has(> input[type=date]), :is(#syshub, #mpuhub) label:has(.sdate) { position: relative; }
:is(#syshub, #mpuhub) input[type=date]:not(.schblk input) { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 38px !important; opacity: 0 !important; pointer-events: none; margin: 0 !important; }
/* The scheduler's own date boxes (Record date, Add date) keep a normal, visible date picker: the rule above hid them in the MPU
   section, so More › Record date had no date to pick (Paul, Nov 18, SL-010601). */
:is(#syshub, #mpuhub) .schblk input[type=date] { position: static !important; width: auto !important; height: auto !important; opacity: 1 !important; pointer-events: auto !important; }
:is(#syshub, #mpuhub) .sy-date { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; max-width: 240px; height: 38px; padding: 0 12px; border: 1px solid #c9d6cd; border-radius: 9px; background: #eef3ef; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
:is(#syshub, #mpuhub) .sy-date:hover { border-color: var(--brand); color: var(--brand); }
:is(#syshub, #mpuhub) .sy-date.set { color: var(--ink); }
:is(#syshub, #mpuhub) .sy-date .ic { font-size: 14px; }
:is(#syshub, #mpuhub) .sy-date .x { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
:is(#syshub, #mpuhub) .sy-date .x:hover { background: #fff; color: var(--bad); }
:is(#syshub, #mpuhub) .sy-date:not(.set) .x { display: none; }
@media (max-width: 1100px) {
  #onbhub .ob-hero, :is(#syshub, #mpuhub) .sy-hero { grid-template-columns: 1fr; }
  #onbhub .ob-chips, :is(#syshub, #mpuhub) .sy-chips { justify-self: stretch; }
  :is(#syshub, #mpuhub) .sy-sechead { grid-template-columns: auto 1fr; }
  :is(#syshub, #mpuhub) .sy-steps { grid-column: 1 / -1; flex-wrap: wrap; }
}
/* ===== Project › Details: Customer & Deal (#crmhub) — crmhub.js ===== */
#crmhub { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
#crmhub .ch-hero { position: relative; background: rgba(47,125,79,.82); color: #fff; padding: 16px 18px; display: grid; grid-template-columns: max-content 1fr auto; gap: 16px; align-items: stretch; cursor: pointer; }
#crmhub .ch-id { display: flex; gap: 12px; align-items: flex-start; }
#crmhub .ch-avcol { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
#crmhub .ch-av { width: 46px; height: 46px; border-radius: 10px; background: #e9b949; color: #15241b; font-weight: 800; font-size: 17px; display: grid; place-items: center; }
#crmhub .ch-open { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; font: inherit; font-size: 11px; font-weight: 700; padding: 2px 0; width: 46px; border-radius: 6px; cursor: pointer; }
#crmhub .ch-open:hover { background: rgba(255,255,255,.26); }
#crmhub.collapsed .ch-open { background: #e9b949; border-color: #e9b949; color: #15241b; }
#crmhub .ch-name { font-size: 20px; font-weight: 800; line-height: 1.2; }
#crmhub .ch-sub { font-size: 13px; margin-top: 3px; }
#crmhub .ch-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
#crmhub .ch-chip { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.12); white-space: nowrap; }
#crmhub .ch-chip.ok { background: #d6ecdc; color: #1d5a35; font-weight: 600; }
#crmhub .ch-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
#crmhub .ch-ring { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }
#crmhub .ch-ring span { width: 30px; height: 30px; border-radius: 50%; background: #549470; display: grid; place-items: center; }
#crmhub .ch-prog b { display: block; font-size: 13.5px; } #crmhub .ch-prog small { opacity: .7; font-size: 11.5px; }
#crmhub .ch-hscope { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); text-align: center; }
#crmhub .ch-hscope small { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 5px; font-weight: 700; }
#crmhub .ch-hscope div { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: center; }
#crmhub .ch-hscope span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #d6ecdc; color: #1d5a35; font-weight: 700; white-space: nowrap; }
#crmhub .ch-links { grid-column: 3; display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
/* Arcasa and Google Drive buttons: the same light green; a missing link keeps the background and only greys out. */
#crmhub .ch-link { background: #e7f2ea; color: #15241b; border-radius: 9px; padding: 8px 12px; text-decoration: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; }
#crmhub .ch-link small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
#crmhub .ch-link.off { color: #7d8a82; pointer-events: none; }
#crmhub .ch-stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; padding: 14px 16px 4px; }
#crmhub .ch-stat { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; }
#crmhub .ch-stat b { display: block; font-size: 16px; } #crmhub .ch-stat small { color: var(--muted); font-size: 12px; }
#crmhub .ch-body { padding: 12px 16px 16px; }
#crmhub.collapsed .ch-stats, #crmhub.collapsed .ch-body { display: none; }
#crmhub .ch-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#crmhub.collapsed .ch-tlrow, #crmhub.collapsed .ch-ctrow { display: none; }
#crmhub .ch-body > .ch-card { border: 2px solid #1d5a35; }   /* the tabbed box: dark green outline */
#crmhub .ch-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
#crmhub .ch-card.tabbox.open .ch-tabs { border-bottom: 1px solid #1d5a35; }
/* Tab buttons: each opens its details below; the open one is filled dark green. */
#crmhub .ch-tab { background: var(--tint, #e7f2ea); border: 1px solid #1d5a35; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 700; color: #1d5a35; cursor: pointer; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
#crmhub .ch-tab:hover { background: #d6ecdc; }
#crmhub .ch-tab::after { content: '▾'; font-size: 11px; }
#crmhub .ch-tab[hidden] { display: none; }
#crmhub .ch-tab.on { background: #1d5a35; color: #fff; } #crmhub .ch-tab.on::after { content: '▴'; }
#crmhub .ch-pane { padding: 14px 16px; display: none; } #crmhub .ch-pane.on { display: block; }
#crmhub .ch-h { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: var(--brand); text-transform: uppercase; margin: 4px 0 8px; }
#crmhub .ch-h + .fields { margin-bottom: 14px; }
#crmhub .fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 14px; }
#crmhub .fields.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
#crmhub .fields.c4[data-g="prop"] { grid-template-columns: 2fr 1.2fr .6fr .8fr; }
#crmhub .fields.c2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
#crmhub .fields > * { grid-column: auto; }
#crmhub .fields > .span2 { grid-column: span 2; } #crmhub .fields > .spanall { grid-column: 1 / -1; }
#crmhub .fields input, #crmhub .fields select { width: 100%; box-sizing: border-box; }
#crmhub .fields > .fblock { display: flex; flex-direction: row; align-items: center; gap: 10px; justify-content: flex-start; background: var(--chip); border-radius: 9px; padding: 8px 12px; }
#crmhub .fblock .flabel { font-weight: 700; color: var(--ink); font-size: 12.5px; margin: 0; width: auto; }
#crmhub .fblock .ownbox { display: flex; flex-direction: row; align-items: center; gap: 8px; }
#crmhub .ch-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 12px; background: #fbfcfb; }
#crmhub .ch-group .ch-h { margin-top: 0; }
#crmhub .ch-note { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
#crmhub .ch-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
#crmhub .ch-member { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; }
#crmhub .ch-member label { flex: 1; min-width: 0; }
#crmhub .ch-hint { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
#crmhub .ch-mav { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex: none; }
#crmhub .ch-mav.none { background: var(--chip); color: var(--muted); }
/* Contacts: one row of cards under the timeline (wraps on narrow screens). */
#crmhub .ch-ctrow { margin: 10px 16px 0; display: grid; gap: 8px; }
#crmhub .ch-ctrow .ch-h { margin: 0; }
#crmhub .ch-cts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
#crmhub .ch-ct { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
#crmhub .ch-ct > div:last-child { min-width: 0; overflow-wrap: anywhere; }
#crmhub .ch-ct .ch-mav { width: 30px; height: 30px; background: var(--chip); color: var(--brand); font-size: 11.5px; }
#crmhub .ch-ct b { font-size: 13.5px; display: block; } #crmhub .ch-ct small { color: var(--muted); font-size: 11.5px; display: block; }
#crmhub .ch-ct a { color: var(--brand); font-size: 12.5px; text-decoration: none; margin-right: 8px; }
#crmhub .ch-ct.empty b { color: var(--muted); font-weight: 500; }
/* Deal timeline: one row of steps joined by a line, above the tabs box. */
#crmhub .ch-tlrow { margin: 10px 16px 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
#crmhub .ch-tlrow .ch-h { margin: 0; }
#crmhub .ch-tl { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; gap: 0; min-width: 0; }
#crmhub .ch-tl li { flex: 1; display: flex; gap: 8px; align-items: center; font-size: 13px; position: relative; padding-right: 14px; min-width: 0; }
#crmhub .ch-tl li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--line); min-width: 16px; }
#crmhub .ch-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
#crmhub .ch-dot.done { background: var(--brand); border-color: var(--brand); } #crmhub .ch-dot.next { border-color: var(--sun); background: #fff3dc; }
#crmhub .ch-tl span { white-space: nowrap; font-weight: 600; } #crmhub .ch-tl em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 700px) { #crmhub .ch-tl { flex-direction: column; gap: 4px; } #crmhub .ch-tl li::after { display: none; } }
@media (max-width: 1200px) { #crmhub .ch-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { #crmhub .ch-hero { grid-template-columns: 1fr; } #crmhub .ch-hscope { position: static; transform: none; text-align: left; } #crmhub .ch-hscope div { justify-content: flex-start; flex-wrap: wrap; } #crmhub .ch-links { grid-column: auto; } }
@media (max-width: 700px) { #crmhub .fields, #crmhub .fields.c4, #crmhub .fields.c4[data-g="prop"] { grid-template-columns: 1fr 1fr; } }

/* One search box for the whole CRM, the same as the Projects page: 260px wide, compact, no label, no icon. Full width on a phone. */
input[type=search].sbar { width: 260px; flex: 0 1 260px; max-width: 100%; padding: 5px 8px; border-radius: 7px; }
.taskbar .sbar { align-self: flex-end; }
@media (max-width: 760px) { input[type=search].sbar { flex: 1 1 100%; width: 100%; } }
/* ===== Project › Details: Roof (#roofhub, roofhub.js), Permit (#permithub, permithub.js) and Install & Final (#insthub, insthub.js)
   Utility & PTO (#ptohub, ptohub.js) Monitoring (#monhub) and Commission (#comhub) (both mchub.js) share these styles. Headers alternate:
   Roof light, Permit medium (overrides below), Install & Final light, Utility & PTO medium, Monitoring light, Commission medium. ===== */
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-hero { background: #9cc8ad; color: var(--ink); padding: 16px 18px; min-height: 140px; display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 16px; align-items: stretch; cursor: pointer; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-id { display: flex; gap: 12px; align-items: flex-start; align-self: center; min-width: 0; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-avcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-av { width: 46px; height: 46px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-open { background: #fff; border: 1px solid rgba(47,125,79,.35); color: var(--brand); font: inherit; font-size: 11px; font-weight: 700; padding: 2px 0; width: 46px; border-radius: 6px; cursor: pointer; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub).collapsed .rf-open { background: #e9b949; border-color: #e9b949; color: #15241b; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-sub { font-size: 13px; color: #1d2d23; margin-top: 3px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-sub2 { font-size: 12.5px; color: #24362b; margin-top: 2px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-sub2 .warn { color: var(--warn); font-weight: 700; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-warn { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-warn:empty { display: none; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips { display: grid; grid-template-columns: repeat(2, minmax(0,210px)); gap: 8px; align-self: center; justify-self: end; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chip, :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; width: 100%; padding: 0 12px; border-radius: 999px; background: #e7f2ea; color: #15241b; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chip:hover, :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn:hover { background: #d6ecdc; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chip span { font-weight: 500; opacity: .92; overflow: hidden; text-overflow: ellipsis; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrrow { margin: 0; display: block; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn .ctricon { display: none; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn .ctrtxt { display: flex !important; flex-direction: row !important; align-items: baseline !important; gap: 5px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn .ctrtxt :is(small, b) { display: inline !important; line-height: 1 !important; margin: 0 !important; font-size: 13px; color: #15241b; text-transform: none; letter-spacing: 0; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn .ctrtxt small { font-weight: 500; opacity: .92; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips .ctrbtn .ctrtxt small::after { content: ':'; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub).collapsed .rf-body { display: none; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-flow { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 10px 12px; background: #f3f8f4; display: grid; gap: 8px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub).off .rf-flow { border-left-color: #c9d3cc; background: #f6f7f6; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-flowh { display: flex; align-items: center; gap: 8px; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-flowh b { font-size: 15px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-st { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-weight: 600; white-space: nowrap; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-st.ok { background: #dcefe2; color: #1d5a35; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-st.warn { background: #fff3dc; color: var(--warn); }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-steps { display: flex; gap: 4px; min-width: 0; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step { all: unset; cursor: pointer; flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: 12px; line-height: 1.25; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step.done { background: #dcefe2; border-color: #dcefe2; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step.done b::before { content: '✓ '; color: var(--brand); }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step.cur { background: #fff3dc; border-color: var(--sun); }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step.gap { border: 1px dashed #d9a441; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step.gap small { color: var(--warn); }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step:focus-visible, :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chip:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-offnote { font-size: 12.5px; color: var(--muted); }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-cards > details.psec { margin: 0 0 10px; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-cards > details.psec:last-child { margin-bottom: 0; }
/* Install & Final (insthub.js): Open all / Close all, the MSA card (public/msa.js) and the hold note on the Final inspection card. */
#insthub .in-cardbar { display: flex; gap: 10px; justify-content: flex-end; margin: -4px 0 -6px; font-size: 12.5px; }
#insthub details.psec[data-sec="MSA"] { border-left-color: #e9b949; }
.msachips { display: flex; gap: 6px; flex-wrap: wrap; }
.msachip { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid #c9d6cd; background: var(--btn-bg); font-size: 13px; font-weight: 700; color: #3c4a41; }
.msachip:hover { border-color: var(--brand); }
.msachip:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.msachip i { width: 9px; height: 9px; border-radius: 50%; background: #c9d6cd; }
.msachip.on[data-msast="not_needed"] { background: #eef3ef; border-color: #9fb3a6; }
.msachip.on[data-msast="needed"] { background: #fff4e5; border-color: #f2c25c; color: var(--warn); } .msachip.on[data-msast="needed"] i { background: var(--warn); }
.msachip.on[data-msast="scheduled"] { background: #fff3dc; border-color: var(--sun); color: #7a5200; } .msachip.on[data-msast="scheduled"] i { background: var(--sun); }
.msachip.on[data-msast="installed"] { background: var(--brand); border-color: var(--brand); color: #fff; } .msachip.on[data-msast="installed"] i { background: #ffe100; }
.msawin { border: 1px solid #e3ebe5; border-radius: 8px; background: #fff; padding: 8px 11px; font-size: 12.5px; margin: 0 0 10px; display: grid; gap: 4px; }
.msawin .ok { color: #1d5a35; } .msawin .warn { color: var(--warn); }
.msabar { height: 8px; border-radius: 99px; background: #eef3ef; overflow: hidden; }
.msabar i { display: block; height: 100%; background: #9cc8ad; border-radius: 99px; } .msabar i.late { background: #e9a24c; }
.msahold { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px solid #f2c25c; background: #fff8e6; color: #6b4a00; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 0 0 10px; }
.msahold.ok { border-color: #b9d9c4; background: #f3f9f5; color: #1d5a35; }
.msahold.stop { border: 2px solid var(--bad); background: #fdecea; color: #7a1d14; }   /* MSA not installed and the job is at final inspection scheduling */
.msasteps { margin: 2px 0 0; padding-left: 4px; list-style: none; display: grid; gap: 3px; }
.msasteps li.ok { color: #1d5a35; } .msasteps li.now { color: #7a5200; font-weight: 600; }
.msawin .msachk { border: 1px dashed #e0a800; background: #fff8e6; border-radius: 6px; padding: 6px 8px; }
.msatable td, .msatable th { vertical-align: top; } .msatable .small { white-space: normal; }
.msahold .linkbtn { margin-left: auto; font-weight: 700; }
@media (max-width: 1100px) { :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-hero { grid-template-columns: 1fr; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-chips { justify-self: stretch; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-steps { flex-wrap: wrap; } :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub) .rf-step { flex: 1 1 120px; } }
/* Permit and Utility & PTO: medium green header with white text, like Customer & Deal and System, MPU & Battery. */
:is(#permithub, #ichub, #ptohub, #comhub) .rf-hero { background: rgba(47,125,79,.82); color: #fff; }
:is(#permithub, #ichub, #ptohub, #comhub) .rf-av { background: #e9b949; color: #15241b; font-size: 13px; }
:is(#permithub, #ichub, #ptohub, #comhub) .rf-open { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
:is(#permithub, #ichub, #ptohub, #comhub).collapsed .rf-open { background: #e9b949; border-color: #e9b949; color: #15241b; }
:is(#permithub, #ichub, #ptohub, #comhub) :is(.rf-sub, .rf-sub2) { color: #eef7f1; }
:is(#permithub, #ichub, #ptohub, #comhub) .rf-sub2 .warn, :is(#permithub, #ichub, #ptohub, #comhub) .rf-sub .warn { color: #ffd27a; }
:is(#permithub, #ichub, #ptohub, #comhub) .rf-cards > details.psec > summary { display: none; }

/* "Not in scope" chip next to a combined section's name (projhubs.js scopeChip): System scope turned that part off. */
.scopechips { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; }
.scopechips:empty { display: none; }
.scopechip { font-size: 11.5px; font-weight: 700; line-height: 1; padding: 4px 9px; border-radius: 999px; background: #fff3dc; color: #8a4b00; border: 1px solid #f1d29a; white-space: nowrap; letter-spacing: 0; }
.scopechip::before { content: '⊘ '; }

/* System, MPU & Battery › Battery: [qty, narrow] [Battery 1 model] [Battery 2 model] … [Type of backup] on one row (projhubs.js batteryRow). */
:is(#syshub, #mpuhub) .batrow { grid-column: 1 / -1 !important; display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
:is(#syshub, #mpuhub) .batrow > label { margin: 0; min-width: 0; }
:is(#syshub, #mpuhub) .batrow > label.batqty { flex: 0 0 80px; white-space: nowrap; }
:is(#syshub, #mpuhub) .batrow > label.batqty input { width: 80px !important; text-align: center; padding-left: 4px; padding-right: 4px; -moz-appearance: textfield; }
:is(#syshub, #mpuhub) .batrow > label.batqty input::-webkit-inner-spin-button { margin-left: -14px; }
:is(#syshub, #mpuhub) .batmodels { flex: 1 1 auto; display: flex; gap: 8px; min-width: 0; }
:is(#syshub, #mpuhub) .batmodels > label { flex: 1 1 0; min-width: 120px; margin: 0; }
:is(#syshub, #mpuhub) .batrow > label.batback { flex: 0 1 220px; }
@media (max-width: 760px) { :is(#syshub, #mpuhub) .batrow { flex-wrap: wrap; } :is(#syshub, #mpuhub) .batmodels { flex: 1 1 100%; flex-wrap: wrap; order: 3; } }

#monhub .rf-av { font-size: 13px; }

/* Section chips under Alerts (sectionnav.js): centered in a green-bordered box, sticky under the project header. */

/* ═══ Project › Files table (Rick, Oct 9): never wider than its panel. Wide: fixed columns (size and date sit under the name),
   selects fill their column, the Share boxes wrap inside theirs, long notes are cut with the full text on hover.
   Narrow panel (under 760px) or phone: each file is a card — name on top, then Category / Folder / Share with, wrapping. ═══ */
.ftwrap { container-type: inline-size; max-width: 100%; }
table.list.ftable { table-layout: fixed; width: 100%; display: table; }
table.list.ftable col.c-sel { width: 34px; } table.list.ftable col.c-cat { width: 160px; } table.list.ftable col.c-fold { width: 165px; } table.list.ftable col.c-share { width: 190px; }
table.list.ftable td { overflow-wrap: anywhere; min-width: 0; }
table.list.ftable select { width: 100%; max-width: 100%; padding: 3px 6px; font-size: 13px; min-height: 0; height: auto; }
table.list.ftable .shares { display: flex; flex-wrap: wrap; gap: 2px 10px; white-space: normal; }
table.list.ftable .shares label { display: inline-flex !important; align-items: center; gap: 4px; margin: 0 !important; font-size: 12px !important; white-space: nowrap; }
table.list.ftable .fnote, table.list.ftable .fmeta { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
table.list.ftable .flabel { display: none; }
@container (max-width: 760px) {
  table.list.ftable, table.list.ftable tbody { display: block; border: 0; }
  table.list.ftable colgroup, table.list.ftable tr.fhead { display: none; }
  table.list.ftable tr { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
  table.list.ftable td { display: block; border: 0 !important; padding: 0 !important; font-size: 14px; }
  table.list.ftable td.fsel { grid-row: 1 / span 3; padding-top: 2px !important; }
  table.list.ftable td.fname { grid-column: 2 / -1; }
  table.list.ftable td.fshare { grid-column: 2 / -1; }
  table.list.ftable td.ffold:empty { display: none; }
  table.list.ftable .flabel { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
}
@container (min-width: 561px) and (max-width: 760px) {
  table.list.ftable tr { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); }
  table.list.ftable td.fsel { grid-row: 1 / span 2; }
  table.list.ftable td.fshare { grid-column: auto; }
}
@container (max-width: 480px) {
  table.list.ftable tr { grid-template-columns: 26px minmax(0, 1fr); }
  table.list.ftable td.fcat, table.list.ftable td.ffold, table.list.ftable td.fshare { grid-column: 2; }
}

/* Project › Files › E-signatures card (public/esign.js): buttons wrap, one row per document, never wider than the panel. */
#esigncard .eshead { gap: 8px; flex-wrap: wrap; align-items: center; }
#esigncard .eslist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
#esigncard .esrow { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; min-width: 0; }
#esigncard .esdoc { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
#esigncard .esst { flex: 0 1 260px; min-width: 0; text-align: right; }
#esigncard .esst .linkbtn.inline { margin-left: 0; margin-right: 8px; }
@container (max-width: 560px) { #esigncard .esst { text-align: left; flex-basis: 100%; } }
#esigncard { container-type: inline-size; }
.esrole { margin-top: 4px; }

/* SOW tab: the current SOW's e-signature status next to its Send button (public/sow.js signHtml). */
.sowsign { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }

/* ═══ Project photos (Paul, Oct 10: Project Photo Revision Build) ═══
   Staff Photos tab: Site Survey · Installation · Final (.pv-sec) › folders (.pv-folder) › sub-folders (.pv-sub) › photo slots (.pv-slot).
   Uses the shared .chips rows for Show / Slots; counts like "5/7" in .pv-cnt (.ok green, .late red). */
.ph-fin .ip-ch { border-left-color: #b07d12; background: #fcf4e2; }
.pv-bar { gap: 8px 14px; margin: 4px 0 10px; }
.pv-secs { display: grid; gap: 12px; }
.pv-sec { border: 1px solid #dfe5df; border-radius: 12px; background: #fff; overflow: hidden; }
.pv-sec > summary, .pv-folder > summary, .pv-sub > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; user-select: none; }
.pv-sec > summary::-webkit-details-marker, .pv-folder > summary::-webkit-details-marker, .pv-sub > summary::-webkit-details-marker { display: none; }
.pv-tw { display: inline-block; width: 12px; color: var(--muted); font-size: 12px; transition: transform .15s; }
details[open] > summary > .pv-tw { transform: rotate(90deg); }
.pv-sec > summary { padding: 10px 14px; border-left: 5px solid #9aa79f; background: #f6f8f6; flex-wrap: wrap; }
.pv-sec.ph-ss > summary { border-left-color: #2f6f9f; background: #edf4fa; } .pv-sec.ph-in > summary { border-left-color: #3f7a4a; background: #edf6ef; } .pv-sec.ph-fin > summary { border-left-color: #b07d12; background: #fcf4e2; }
.pv-sec.ph-des > summary { border-left-color: #6a4c93; background: #f3eef9; } .pv-sec.ph-svc > summary { border-left-color: #b4532a; background: #fbefe8; }
.pv-sectabs { margin: 2px 0 10px; } .pv-sectabs > button.pf-over { box-shadow: 0 0 0 3px rgba(47,125,79,.35); }   /* section tabs (Rick, Oct 27); drop a photo on Old Files */
.pv-old { display: grid; gap: 6px; } .pv-old h3 { margin: 8px 0 2px; font-size: 15px; }
.pv-stitle { font-size: 16px; }
.pv-when { font-size: 13px; font-weight: 600; color: #2b3a31; white-space: nowrap; } .pv-status { font-weight: 700; }
.pv-prog { width: 140px; height: 8px; border-radius: 99px; background: #dfe5df; overflow: hidden; } .pv-prog > i { display: block; height: 100%; background: var(--brand); }
.pv-sreq, .pv-pics { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pv-sbody { padding: 8px 10px 10px; display: grid; gap: 6px; }
.pv-folder { border: 1px solid #e4e9e4; border-radius: 10px; background: #fbfcfb; }
.pv-folder > summary { padding: 8px 12px; } .pv-folder[open] > summary { border-bottom: 1px solid #e4e9e4; }
.pv-fic { font-size: 17px; }
.pv-cnt { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 0 8px; background: #eef1ee; color: #445; }
.pv-cnt.ok { background: #dff1e4; color: #1f6b3a; } .pv-cnt.late { background: #fde7e5; color: var(--bad); }
.pv-folder > summary .redcnt { background: #d32f2f; color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.pv-fbody { padding: 8px; display: grid; gap: 8px; }
.pv-sub { border-left: 3px solid #dfe5df; padding-left: 8px; } .pv-sub > summary { padding: 4px 0; font-size: 13.5px; } .pv-sub > .pv-slots { margin-top: 6px; }
.pv-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.pv-slot { border: 1px solid #e4e9e4; border-radius: 10px; background: #fff; padding: 8px 10px; display: grid; gap: 4px; align-content: start; transition: box-shadow .2s; }
.pv-slot.has { border-color: #b9dcc4; } .pv-slot.miss { border-left: 3px solid #f2c25c; } .pv-slot.late { border-left: 3px solid #e57373; }
.pv-slot.st-na, .pv-slot.st-off { opacity: .6; background: #f7f8f7; }
.pv-slot.pf-over, .pv-unsorted .pf-over { border-color: var(--brand); background: #eef6f0; box-shadow: 0 0 0 2px rgba(47,125,79,.25); }
.pv-slot.pv-focus { box-shadow: 0 0 0 3px #f5a623; }
.pv-shead { display: flex; align-items: flex-start; gap: 6px; }
.pv-sfoot { display: flex; align-items: center; gap: 6px; border-top: 1px dashed #e9ece9; padding-top: 5px; margin-top: 2px; }
.pv-late { font-size: 11px; font-weight: 700; color: var(--bad); }
.pv-addtile { width: 64px; height: 64px; flex: none; padding: 0; border: 1.5px dashed #b9c6bc; border-radius: 8px; background: #fbfcfb; color: var(--brand); font-size: 20px; line-height: 1; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pv-addtile small { font-size: 10.5px; color: var(--muted); } .pv-addtile:hover { border-color: var(--brand); background: #eef6f0; }
.pv-mark { width: 16px; text-align: center; color: #99a; font-weight: 700; } .pv-slot.has .pv-mark { color: var(--brand); } .pv-slot.late .pv-mark { color: #c62828; }
.pv-slabel { font-size: 13.5px; line-height: 1.25; font-weight: 600; }
.pv-n { font-size: 11.5px; font-weight: 700; background: #dff1e4; color: #1f6b3a; border-radius: 99px; padding: 0 7px; }
.pv-flag { font-size: 11px; font-weight: 700; background: #fff4d9; color: #7a5600; border: 1px solid #f2c25c; border-radius: 99px; padding: 0 6px; }
.pv-rule { width: auto; font-size: 12px; padding: 1px 4px; border-radius: 6px; color: var(--muted); border-color: #e4e9e4; background: #fff; }
.pv-rule.st-na, .pv-rule.st-off { color: #99a; } .pv-rule.st-opt { color: #445; }
.pv-btn { padding: 2px 8px; font-size: 14px; line-height: 1.3; }
.pv-badge { font-size: 11px; color: var(--muted); }
.pv-hint { font-size: 12px; color: var(--muted); line-height: 1.35; } .pv-hint i { font-style: normal; color: #7a5600; }
.pv-na { color: #445; font-weight: 600; } .pv-new { font-size: 10.5px; font-weight: 700; color: #6a4c93; background: #f3eef9; border: 1px solid #ddd0ee; border-radius: 6px; padding: 0 5px; }
.pv-thumbs { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; border-radius: 8px; }
.pv-th { width: 64px; height: 64px; aspect-ratio: auto; flex: none; cursor: zoom-in; } .pv-th[draggable="true"] { cursor: grab; }
.pv-vid { font-size: 22px; color: #fff; background: #1f2b23; }
.pv-empty { font-size: 12px; color: #99a; border: 1.5px dashed #dfe5df; border-radius: 8px; padding: 8px 10px; width: 100%; }
.pv-unsorted { border: 1.5px dashed #f2c25c; background: #fffaeb; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; display: grid; gap: 6px; }
.pv-unsorted > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none; user-select: none; } .pv-unsorted > summary::-webkit-details-marker { display: none; }
.pv-unsorted[open] > summary { margin-bottom: 6px; }
.pv-name { flex: 1; min-width: 220px; }
.pv-tools { display: flex; align-items: center; gap: 14px; width: 100%; } .pv-tools .linkbtn { padding: 0; }
.pf-lbimg video { max-width: 100%; max-height: 100%; display: block; }
.pv-lbflag { background: #fff4d9; border: 1px solid #f2c25c; color: #7a5600; border-radius: 8px; padding: 6px 10px; font-size: 13px; display: flex; gap: 10px; align-items: center; }
@media (max-width: 600px) { .pv-slots { grid-template-columns: 1fr; } .pv-prog { width: 80px; } .pv-th { width: 56px; height: 56px; } }
/* Installer portal photos: one line per photo slot, 📷 to take it. */
.ip-slots { display: grid; gap: 4px; padding: 0 8px 8px; }
.ip-subh { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #4a5a4f; margin: 8px 0 0 2px; }
.ip-slot { border: 1px solid #e4e9e4; border-radius: 10px; background: #fff; }
.ip-slot.open { border-left: 4px solid #f2c25c; } .ip-slot.ok { border-color: #b9dcc4; } .ip-slot.na { opacity: .6; background: #f7f8f7; }
.ip-sline { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; min-height: 48px; }
.ip-smark { width: 16px; text-align: center; font-weight: 800; color: #99a; } .ip-slot.ok .ip-smark { color: #1f6b3a; }
.ip-slbl { flex: 1; font-size: 14.5px; line-height: 1.3; } .ip-slbl small { display: block; font-size: 12px; color: #667; }
.ip-slot .ip-plus { font-size: 20px; min-width: 48px; min-height: 40px; }
.ip-nabtn { font-size: 12px; padding: 5px 8px; white-space: nowrap; }
.ip-folder.ip-vids { border-style: dashed; }
.ip-pickf { border: 1px solid #e4e9e4; border-radius: 8px; margin: 4px 0; } .ip-pickf > summary { padding: 8px 10px; cursor: pointer; font-weight: 600; }
.ip-pickf > div { display: grid; gap: 6px; padding: 0 8px 8px; }
.ip-pickf .ip-pickb { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; height: auto; min-height: 44px; aspect-ratio: auto; padding: 8px 12px; text-align: left; font-size: 14.5px; font-weight: 500; }
/* Admin › Photo slots */
.pc-table input[type=text] { padding: 4px 6px; font-size: 13px; } .pc-table td { vertical-align: middle; }
.pc-table tr.pc-off td { opacity: .55; } .pc-subh td { background: #f6f8f6; font-size: 12.5px; }
.pc-add { padding: 6px 8px; gap: 6px; }
.pv-folder > table.pc-table { border: 0; border-radius: 0; }

/* Sort old photos (public/photos.js, src/photosort.js): "A" = auto-sorted, 💡 = a suggested slot; the suggestions strip. */
.pv-th { position: relative; }
.pv-th .pv-auto, .pv-th .pv-sugg { position: absolute; left: 3px; bottom: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
.pv-th .pv-auto { background: #2f7d4f; color: #ffe100; }
.pv-th .pv-sugg { background: #fff; box-shadow: 0 0 0 1px #e0a800; }
.pv-sglist { display: grid; gap: 6px; margin-top: 6px; }
.pv-sg { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pv-sg .pv-th { flex: none; }
.pv-sgtxt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pv-lbauto { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: #eef6f0; font-size: 13px; }
.pv-sortline { gap: 8px; flex-wrap: wrap; margin: 4px 0; }

/* ═══ Leads CRM (public/leads.js): GHL-style board, list and lead page. Shared chips / panel / chip tones; SolarLink green. ═══ */
.ld-bar { gap: 8px 12px; flex-wrap: wrap; align-items: center; margin: 4px 0 6px; }
.ld-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; max-width: 100%; }
.ld-col { background: #eef3ef; border: 1px solid #d5e2d9; border-radius: 12px; padding: 8px; min-width: 0; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.ld-col.side { background: #f4f5f4; }
.ld-col.over { outline: 2px dashed #2f7d4f; outline-offset: -4px; }
.ld-col > header { padding: 2px 4px 8px; } .ld-col > header b { font-size: 14px; }
.ld-n { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fff; border: 1px solid #c9d6cd; font-size: 12px; font-weight: 700; text-align: center; }
.ld-cards { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 40px; }
.ld-card { display: block; background: #fff; border: 1px solid #d9dfd8; border-left: 4px solid #2f7d4f; border-radius: 8px; padding: 8px 10px; color: inherit; text-decoration: none; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ld-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); } .ld-card.dragging { opacity: .5; }
.ld-card.late { border-left-color: #c62828; }
.ld-card b { overflow-wrap: anywhere; }
.ld-empty { padding: 6px 4px; }
.ld-list tr[data-lead] { cursor: pointer; } .ld-list tr.ld-late td:first-child { box-shadow: inset 4px 0 0 #c62828; }
.bad-t { color: var(--bad); font-weight: 600; }
.ld-stages { flex-wrap: wrap; margin: 4px 0 10px; }
.ld-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1000px) { .ld-page { grid-template-columns: minmax(0, 1fr); } }
.ld-feed { margin-top: 10px; max-height: 70vh; overflow-y: auto; } .ld-feed .item.ld-auto { opacity: .8; } .ld-feed .item.ld-stage .when { color: #1f6b3a; }
.ld-files { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.ld-sale { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; margin: 0 0 10px; border: 1px solid #d5e2d9; background: #f3f8f4; }
.ld-sale.wait { border-color: #e9c46a; background: #fff8e6; } .ld-sale.back { border: 3px solid #c62828; background: #fff5f5; } .ld-sale.won { border-color: #9cc9aa; background: #eaf5ee; }
.ld-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 10px; } @media (max-width: 1100px) { .ld-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 600px) { .ld-kpis { grid-template-columns: 1fr 1fr; } }
.ld-statwrap { overflow-x: auto; }
@media (max-width: 700px) {   /* Results stays a real table on phones (scroll sideways), not the stacked list cards */
  table.list.ld-stats { display: table; } table.list.ld-stats thead { display: table-header-group; } table.list.ld-stats tbody { display: table-row-group; }
  table.list.ld-stats tr { display: table-row; border: 0; padding: 0; margin: 0; border-radius: 0; background: none; }
  table.list.ld-stats td, table.list.ld-stats th, table.list.ld-stats td:first-child { display: table-cell; font-size: 13px; padding: 6px 8px !important; border-bottom: 1px solid var(--line) !important; } } .ld-stats td, .ld-stats th { white-space: nowrap; } .ld-stats tr.ld-total td { border-top: 2px solid #c9d6cd; font-weight: 700; background: #f3f8f4; }
.ld-imap { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: 42vh; overflow-y: auto; } .ld-imap label { display: grid; gap: 2px; min-width: 0; } .ld-imap label > span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ld-imap small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ho-reflink { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid #d5e2d9; border-radius: 10px; background: #f3f8f4; margin: 6px 0; } .ho-reflink:empty { display: none; }
.ld-camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; } .ld-camps .panel { margin: 0; }
.ld-tpl { display: grid; gap: 4px; margin: 10px 0; } .ld-tpl textarea { font-family: ui-monospace, monospace; font-size: 12px; }

/* In-app pop-ups (public/notices.js): stacked bottom-right, above the page, shared panel look. */
.notice-stack { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.notice-card { margin: 0; padding: 12px 14px; border-left: 4px solid #2f7d4f; box-shadow: 0 8px 24px rgba(0,0,0,.14); }

/* Admin › Emails (Paul, Oct 14; public/emailadmin.js): list + editor with the live preview in the side panel. */
.emtbl tr.emoff td:first-child b { color: var(--muted); }
.modal-box.emedit { width: min(1280px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.emedit .emform { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.emedit .emform label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.emedit .rtein { min-height: 180px; }
.emedit .emfields .chips { gap: 4px; } .emedit .emfields .chips button { font-size: 12px; padding: 2px 8px; }
.emedit .emside { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.emedit .emsubj { font-weight: 700; padding: 8px 10px; background: var(--chip); border-radius: 8px; overflow-wrap: anywhere; }
.emedit iframe { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 10px; background: #eef2ee; }
.emedit iframe.phone { width: 390px; max-width: 100%; align-self: center; border: 8px solid #1c1f1d; border-radius: 28px; }
@media (max-width: 900px) { .modal-box.emedit { grid-template-columns: 1fr; } .emedit .emside { position: static; } .emedit iframe { height: 70vh; } }

/* One Sheet (public/onesheet.js; Paul, Oct 15): the button in the project header's empty right cell, and the summary pop-up.
   Desktop sheet. Its own os- classes so nothing else on the page changes. Its alerts box follows the open-alerts look. */
.os-cell { justify-self: end; display: flex; align-items: center; }
@media (max-width: 900px) { .os-cell { justify-self: start; } }
.os-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #2f7d4f; background: #e3f3e7; color: #1f5a38; font: inherit; font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 999px; white-space: nowrap; line-height: 1.2; }
.os-btn:hover { background: #d2ebd9; }
.os-btn svg { width: 16px; height: 16px; flex: none; }
body.os-open { overflow: hidden; }
.os-ov { position: fixed; inset: 0; z-index: 900; overflow: auto; background: rgba(15,26,20,.55); padding: 22px 16px 40px; color: var(--ink); }
.os-ov a { color: var(--brand); text-decoration: none; } .os-ov a:hover { text-decoration: underline; }
.os-ov h2, .os-ov h3 { margin: 0; }
.os-sheet { --os-panel: #f0f5f1; --os-head: #dceadf; --os-line: #c9dbce; width: min(1120px, 100%); margin: 0 auto; background: #e4ece6; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.os-head { background: var(--nav); color: #fff; padding: 18px 22px 0; display: grid; gap: 10px; }
.os-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.os-row h2 { font-size: 24px; font-weight: 800; color: #fff; }
.os-ov a.os-name { color: #fff; text-decoration: underline; text-decoration-color: #3f6b50; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.os-ov a.os-name:hover { text-decoration-color: #9fe0b5; }
.os-ext { font-size: .7em; color: #8fa898; font-weight: 600; }
.os-num { color: #a9c2b1; font-size: 15px; }
/* The name is the status (Paul, Oct 30): red at risk, green on track. Scope chips sit at the right of the same row. */
.os-row h2.risk, .os-ov .os-row h2.risk a.os-name { color: #ff9a8f; } .os-ov .os-row h2.risk a.os-name { text-decoration-color: #7a3a33; }
.os-row h2.ok, .os-ov .os-row h2.ok a.os-name { color: #8fe0a9; }
.os-scope { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.os-sc { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: #24402f; border: 1px solid #3f6b50; color: #e3f3e7; white-space: nowrap; cursor: default; }
.os-sc::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8fe0a9; }
.os-sc.msa::before { background: #e9a24c; } .os-sc.msa.msaok::before { background: #8fe0a9; } .os-sc.msachk { border-style: dashed; }
.os-sc.solar::before { background: var(--sun); } .os-sc.bat::before { background: #7cc4ff; } .os-sc.mpu::before { background: #c9a6ff; } .os-sc.roof::before { background: #f0a36b; } .os-sc.sgip::before { background: #f2d36b; }
.os-sp { flex: 1; }
.os-ov .os-x { background: transparent; border: 1px solid #45604f; color: #fff; border-radius: 8px; width: 34px; height: 34px; padding: 0; font-size: 18px; line-height: 1; }
.os-ov .os-x:hover { background: #24402f; }
.os-contact { display: flex; flex-wrap: wrap; gap: 4px 18px; color: #cfe0d5; font-size: 13px; } .os-ov .os-contact a { color: #9fe0b5; }
.os-strip { display: flex; margin: 4px -22px 0; padding: 0 22px; background: #10201a; overflow-x: auto; }
.os-strip > div { padding: 9px 16px 9px 0; margin-right: 16px; display: grid; border-right: 1px solid #24402f; white-space: nowrap; }
.os-strip > div:last-child { border-right: 0; }
.os-strip i { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: #8fa898; }
.os-strip b { font-size: 13.5px; color: #fff; font-weight: 600; }
.os-strip > div.red i { color: #f08a80; } .os-strip > div.red b { color: #ffb4ab; }
.os-ov a.os-hlk { color: #9fe0b5; text-decoration: underline; text-decoration-color: #3f6b50; text-underline-offset: 3px; }
.os-ov a.os-hlk:hover { color: #c6f0d3; text-decoration-color: #9fe0b5; }
.os-progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 14px 22px 4px; }
.os-progress > div { display: grid; gap: 2px; min-width: 0; align-content: start; }
.os-progress .bar { height: 6px; border-radius: 3px; background: #dfe5e0; margin-bottom: 3px; }
.os-progress .done .bar { background: #8cc5a0; } .os-progress .now .bar { background: var(--brand); box-shadow: 0 0 0 3px rgba(47,125,79,.2); }
.os-progress span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .os-progress .now span { color: #1f5a38; font-weight: 800; }
.os-progress small { font-size: 10.5px; color: #3d6b4f; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.os-progress small.soon { color: #1f5a38; font-weight: 800; }
.os-sys { margin: 10px 22px 0; display: flex; align-items: stretch; background: var(--os-panel); border: 1px solid var(--os-line); border-radius: 10px; overflow: hidden; }
.os-sys .k { display: flex; align-items: center; padding: 8px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #1f5a38; font-weight: 800; background: var(--os-head); border-right: 1px solid var(--os-line); white-space: nowrap; }
.os-sys > div { display: grid; align-content: center; padding: 7px 11px; border-right: 1px solid var(--os-line); min-width: 0; flex: 1 1 auto; }
.os-sys > div:last-child { border-right: 0; }
.os-sys i { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #7b877f; white-space: nowrap; }
.os-sys b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Directory row (above the stage row) and Scheduling row: chips in one line, status and dates on hover (Paul, Oct 30). */
.os-dir, .os-sched { margin: 10px 22px 0; display: flex; align-items: stretch; background: var(--os-panel); border: 1px solid var(--os-line); border-radius: 10px; overflow: hidden; }
.os-dir { margin-top: 14px; }
.os-sheet :is(.os-dir, .os-sys, .os-sched, .os-card) { border: 1.5px solid #1f5a38; }   /* dark green line around every row and section (Paul, Oct 30) */
.os-dir .k, .os-sched .k { display: flex; align-items: center; padding: 8px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #1f5a38; font-weight: 800; background: var(--os-head); border-right: 1px solid var(--os-line); white-space: nowrap; min-width: 128px; }
.os-sys .k { min-width: 128px; }
.os-dchips, .os-schips { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; padding: 7px 10px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.os-ov a.os-dchip, .os-dchip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--btn-line); background: var(--btn-bg); color: #1f5a38; border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; flex: none; }
.os-ov a.os-dchip:hover { border-color: var(--brand); background: var(--btn-hover); text-decoration: none; }
.os-dchip.none { border-style: dashed; background: transparent; color: #7b877f; font-weight: 500; cursor: default; }
.os-ov button.os-schip { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1.5px solid #c9d8cd; background: #e3ebe5; color: #45524a; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.os-ov button.os-schip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa89f; flex: none; }
.os-ov button.os-schip:hover { border-color: var(--brand); }
.os-ov button.os-schip.ok { border-color: var(--brand); background: var(--brand); color: #fff; } .os-ov button.os-schip.ok::before { background: #fff; }
.os-ov button.os-schip.done { border-color: #8cc5a0; background: #cfe5d7; color: #1f5a38; } .os-ov button.os-schip.done::before { content: "✓"; width: auto; height: auto; background: none; font-weight: 800; font-size: 11px; }
.os-ov button.os-schip.warn { border-color: #f2c25c; background: #fdf0cf; color: #8a5a00; } .os-ov button.os-schip.warn::before { background: #e0a800; }
.os-ov button.os-schip.bad { border-color: #f0b4ad; background: #fbe0dd; color: var(--bad); } .os-ov button.os-schip.bad::before { background: var(--bad); }
.os-tip { position: fixed; z-index: 950; max-width: 320px; background: #1f2b23; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; line-height: 1.35; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; }
.os-target { animation: os-target 2.4s ease-out; border-radius: 8px; }   /* the block a One Sheet link landed on */
@keyframes os-target { 0%, 60% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: 0 0 0 3px transparent; } }
.os-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 14px 22px; align-items: start; }
.os-card { background: var(--os-panel); border: 1px solid var(--os-line); border-radius: 12px; overflow: hidden; min-width: 0; }
.os-card > h3 { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: #1f5a38; padding: 10px 14px 8px; }
.os-card > h3 .os-hgo { margin-left: auto; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.os-cnt { display: inline-block; min-width: 20px; text-align: center; background: #ffd34d; color: #4a3500; border: 1px solid #e0a800; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 17px; letter-spacing: 0; }
.os-cnt.red { background: #d32f2f; color: #fff; border-color: #d32f2f; }
.os-late { font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; background: #fdeceb; color: var(--bad); border-radius: 99px; padding: 0 7px; }
.os-empty { margin: 0; padding: 4px 14px 14px; color: var(--muted); font-size: 13px; }
.os-muted { color: #5b6860; }
.os-att { background: #fbf1ef; } .os-att > h3 { color: var(--bad); background: #f8e1dd; border-bottom: 1px solid #f0c9c3; padding-bottom: 9px; }
.os-att ul { list-style: none; margin: 0; padding: 4px 0; }
.os-att li { display: flex; gap: 10px; padding: 8px 14px; align-items: flex-start; border-top: 1px solid #f0d9d5; font-size: 13.5px; } .os-att li:first-child { border-top: 0; }
.os-att .tx { flex: 1; min-width: 0; } .os-att .os-go { flex: none; font-size: 12px; font-weight: 600; }
.os-tg { flex: none; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 4px; margin-top: 1px; }
.os-tg.al { background: #c62828; color: #fff; } .os-tg.bk { background: #fff3cd; color: #8a5a00; } .os-tg.ck { background: #eef1ff; color: #3b4cb8; }
.os-lc { display: grid; gap: 1px; padding: 0 14px 8px; } .os-lc b { font-size: 20px; font-weight: 800; } .os-lc span { font-size: 12.5px; color: #5b6860; }
.os-lcl, .os-tasks { list-style: none; margin: 0; padding: 0 0 4px; }
.os-lcl li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 7px 14px; border-top: 1px solid var(--os-line); font-size: 13px; }
.os-lcl time { font-size: 12px; color: #7b877f; white-space: nowrap; }
.os-tasks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--os-line); font-size: 13px; } .os-tasks li:first-child { border-top: 0; }
.os-tasks .who { display: block; font-size: 11.5px; color: #7b877f; }
.os-tasks .due { font-size: 12px; color: #5b6860; white-space: nowrap; font-variant-numeric: tabular-nums; } .os-tasks .late .due { color: var(--bad); font-weight: 700; }
.os-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 22px 18px; align-items: start; }
/* Link chips: the app's light green buttons with a line icon (Paul, Oct 30). */
.os-lcol { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 14px 14px; }
.os-ov a.os-lk, .os-lk { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--btn-line); border-radius: 999px; padding: 4px 11px 4px 5px; font-size: 13px; font-weight: 600; min-width: 0; max-width: 100%; background: var(--btn-bg); color: #1f5a38; }
.os-ov a.os-lk:hover { border-color: var(--brand); background: var(--btn-hover); text-decoration: none; }
.os-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #c7e0cf; color: #1f5a38; flex: none; }
.os-ic svg { width: 14px; height: 14px; }
.os-lk .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-lk.missing { color: #8a958e; border-style: dashed; background: transparent; font-weight: 500; cursor: default; } .os-lk.missing .os-ic { background: #e1e7e2; color: #9aa69e; }
.os-lkn { margin-left: 2px; font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 99px; background: #c7e0cf; color: #1f5a38; white-space: nowrap; line-height: 18px; }
.os-lkn.hot { background: #ffd34d; color: #4a3500; }
.os-foot { display: flex; gap: 8px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--os-line); background: var(--os-head); font-size: 12px; }
.os-foot button { font-weight: 600; font-size: 14px; }
@media (max-width: 1000px) { .os-grid, .os-links { grid-template-columns: minmax(0, 1fr); } .os-sys { flex-wrap: wrap; } .os-dir .k, .os-sched .k, .os-sys .k { min-width: 0; } }

/* Weekly Pipeline, Oct 15 (Rick): full page width, Full screen, Compact, resizable columns (public/weekly.js) */
main:has(> .ip.wp) { max-width: none; padding: 12px 14px; }
.ip.wp { max-width: none; }
body.wp-full header.top, body.wp-full #ptabs { display: none !important; }
body.wp-full main:has(> .ip.wp) { padding: 8px 10px; } body.wp-full .wp-scroll { max-height: calc(100vh - 170px); }
.wp-table td[data-wrap] { min-width: 180px; white-space: normal; }
.wp-rz { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.wp-rz:hover, body.wp-resizing .wp-rz { background: linear-gradient(to right, transparent 3px, #e8b84a 3px, #e8b84a 5px, transparent 5px); }
body.wp-resizing, body.wp-resizing * { cursor: col-resize !important; user-select: none; }
.wp-csw { font-size: 13px; font-weight: 700; color: #445; display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; } .wp-colbar #wpreset { font-size: 12.5px; padding: 3px 10px; }
/* Compact (on by default): smaller rows, headers on up to 2 lines, long text cut off with … */
.wp-table.wp-compact { font-size: 12px; }
.wp-table.wp-compact td { padding: 2px 6px; font-size: 12px; line-height: 1.25; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.wp-table.wp-compact .wp-lrow th { padding: 3px 6px; white-space: normal; line-height: 1.15; vertical-align: bottom; max-width: 120px; font-size: 11.5px; }
.wp-table.wp-compact .wp-thl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wp-table.wp-compact .wp-grow th { padding: 2px 6px; font-size: 10px; }
.wp-table.wp-compact td[data-wrap] { min-width: 0; white-space: nowrap; }
.wp-table.wp-compact td.wp-name { white-space: nowrap; min-width: 0; max-width: 190px; }
.wp-table.wp-compact td.wp-name .wp-nl { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.wp-table.wp-compact td.wp-name > div { overflow: hidden; text-overflow: ellipsis; }
.wp-table.wp-compact td.wp-com { min-width: 170px; max-width: 240px; }
.wp-table.wp-compact .wp-cell .wp-combtn { -webkit-line-clamp: 1; max-height: 1.3em; line-height: 1.3; }
.wp-table.wp-compact .wp-cell { grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 6px; } .wp-table.wp-compact .wp-cfoot { margin-top: 0; flex-wrap: nowrap; }
.wp-table.wp-compact .wp-cadd1 { padding: 0 6px; font-size: 11px; line-height: 1.5; }
.wp-since select { max-width: 100%; }
.wp-table.wp-compact .wp-stage { padding: 0 7px; font-size: 11.5px; }
.wp-table.wp-compact tfoot td { padding: 4px 6px; }
.wp-table td[data-k] { overflow: hidden; text-overflow: ellipsis; }
.wp-table tbody td { cursor: default; }
/* Auto-fit measuring (double-click a column edge): no caps for a moment */
.wp-table.wp-measure td, .wp-table.wp-measure th { max-width: none !important; }
.wp-pop { position: fixed; z-index: 60; max-width: min(420px, calc(100vw - 16px)); background: #1f2b23; color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: pre-wrap; overflow-wrap: anywhere; }
/* Sheet tabs on the Weekly Pipeline (public/sheettabs.js): the dealer's old Google Sheet tabs as editable grids */
.pk-tab.pk-sheet { border-style: dashed; background: #fbfcfa; font-weight: 600; } .pk-tab.pk-sheet.on { border-style: solid; background: #1f2b23; color: #fff; border-color: #1f2b23; }
.pk-tab.pk-money::before { content: '🔒 '; font-size: 11px; } .pk-tab.pk-trueup { border-color: #b7a15a; }
.wp-sheet { display: grid; gap: 8px; min-width: 0; }
.st-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .st-bar > b { font-size: 16px; } .st-bar button { font-size: 13px; padding: 4px 10px; }
.st-note { margin: 0; }
.st-scroll { overflow: auto; max-height: calc(100vh - 260px); border: 1px solid #dfe5df; border-radius: 12px; background: #fff; }
body.wp-full .st-scroll { max-height: calc(100vh - 190px); }
.st-grid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: max-content; min-width: 100%; }
.st-grid th, .st-grid td { border-right: 1px solid #edf1ed; border-bottom: 1px solid #edf1ed; padding: 3px 6px; vertical-align: top; text-align: left; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.st-grid .st-letters th { position: sticky; top: 0; z-index: 3; background: #eef2ef; color: #667; font-weight: 600; font-size: 11px; text-align: center; }
.st-grid .st-head td, .st-grid .st-head th { background: #1f2b23; color: #fff; font-weight: 700; white-space: normal; min-width: 70px; }
.st-grid th.st-rn { position: sticky; left: 0; z-index: 2; background: #eef2ef; color: #667; font-weight: 600; font-size: 11px; text-align: right; min-width: 34px; cursor: default; }
.st-grid .st-letters th.st-rn { z-index: 4; } .st-grid tbody th.st-rn[title]:not([title='']) { cursor: pointer; } .st-grid tbody th.st-rn[title]:not([title='']):hover { background: #e8b84a; color: #1f2b23; }
.st-grid td.st-ed { cursor: cell; } .st-grid td.st-ed:hover { background: #f6faf7; box-shadow: inset 0 0 0 1px #9aa79f; }
.st-grid td:has(> .st-in) { padding: 0; overflow: visible; }
.st-in { width: 260px; min-height: 26px; font: inherit; border: 2px solid #e8b84a; border-radius: 4px; padding: 2px 4px; resize: vertical; display: block; }
.st-grid .st-live { background: #f3f4f6; color: #334; } .st-grid th.st-live { background: #5b6470; color: #fff; } .st-grid .st-lh { background: #3f4650 !important; text-align: center; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.st-grid tbody tr:hover td { background: #f6faf7; } .st-grid tbody tr:hover td.st-live { background: #e9ecef; }
.st-grid .st-delta { color: #a1281c; font-weight: 700; } .st-plink { font-weight: 700; }
.st-grid tfoot td, .st-grid tfoot th { position: sticky; bottom: 0; background: #eef2ef; font-weight: 700; border-top: 2px solid #1f2b23; }
.st-picks { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 8px; } .st-pick { text-align: left; } .st-pick.on { border-color: #1f6b3a; background: #eef6f0; font-weight: 700; }
.st-tu { display: grid; gap: 10px; } .st-tuhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.st-sum, .st-lines { border-collapse: collapse; font-size: 13.5px; width: 100%; } .st-sum { max-width: 760px; }
.st-sum th, .st-sum td, .st-lines th, .st-lines td { padding: 4px 8px; border-bottom: 1px solid #edf1ed; text-align: left; } .st-sum .num, .st-lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.st-sum thead th, .st-lines thead th { background: #eef2ef; } .st-ok { color: #1f6b3a; } .st-tu .st-delta { color: #a1281c; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .st-two h4 { margin: 4px 0; } .st-lines tr.st-tot td { font-weight: 700; border-top: 2px solid #1f2b23; }
@media (max-width: 760px) { .st-two { grid-template-columns: 1fr; } .st-scroll { max-height: none; } }

/* ───────── Top bar (Rick, Oct 12): logo + ✓ Tasks left, links centered, Financials menu right of Admin, 📞 Dialpad centered
   in the space before the avatar. Menus open on click (public/topmenus.js). ───────── */
.topl, .topr { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top .taskbtn, .top .tdd-btn { color: #cfe0d5; border-radius: 6px; background: none; border: 0; font: inherit; font-size: 14px; padding: 5px 8px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.top .taskbtn:hover, .top .taskbtn.on, .top .tdd-btn:hover, .top .tdd-btn.on, .top .tdd-btn[aria-expanded="true"] { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.chk { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #2fa865; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; margin-right: 6px; vertical-align: -2px; }
.tdd { position: relative; display: inline-flex; }
.tdd-menu { position: fixed; z-index: 1000; min-width: 270px; max-height: calc(100vh - 72px); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #dfe5df; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.tdd-menu[hidden] { display: none !important; }
.tdd-menu .tdd-i { display: flex !important; align-items: center; gap: 10px; width: 100%; padding: 8px 10px !important; border-radius: 8px; color: #1f2b23 !important; background: none; border: 0; font: inherit; font-size: 14px !important; text-align: left; cursor: pointer; text-decoration: none; }
.tdd-menu .tdd-i:hover, .tdd-menu .tdd-i:focus-visible { background: #eef6f0 !important; text-decoration: none; }
.tdd-menu .tdd-i small, .tdd-who small { display: block; color: #6b766f; font-size: 11.5px; font-weight: 400; }
.tdd-menu .tdd-i[hidden] { display: none !important; }
.tdd-n { margin-left: auto; }
.tdd-sub { display: flex; flex-direction: column; gap: 1px; padding-left: 14px; }
.tdd-menu .tdd-edit { color: #24557f !important; font-size: 13px !important; }
.tdd-grp { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #6b766f; padding: 6px 10px 2px; }
.tdd-who { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: #1f2b23; }
.tdd-who:hover { background: #eef6f0; }
.tdd-ini { width: 30px; height: 30px; border-radius: 50%; background: #e3efe7; color: #1f5a37; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.tdd-call { margin-left: auto; background: var(--brand); color: #fff; border: 0; border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tdd-call:hover { background: #256640; } .tdd-call:disabled { opacity: .6; cursor: wait; }
.tdd-you { margin-left: auto; }
.tdd-note { padding: 6px 10px; }
.dp-direct { display: flex; align-items: center; gap: 6px; cursor: pointer; } .dp-direct input { width: auto; margin: 0; }
/* Dialpad menu (public/topmenus.js): the people list scrolls, the find box, "+ Add person" and the footer stay put. */
.tdd-menu.dp-menu { width: 340px; }
.dp-list { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; overscroll-behavior: contain; max-height: 480px; min-height: 0; flex: 0 1 auto; }
.dp-grp[hidden], .tdd-who[hidden] { display: none; }
.tdd-whoname { min-width: 0; flex: 1 1 auto; } .tdd-whoname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdd-who .tdd-call, .tdd-who .tdd-you { margin-left: 0; }
.tdd-x { background: none; border: 0; color: #8a948d; font-size: 13px; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; padding: 0; flex: 0 0 auto; }
.tdd-x:hover { background: #e3efe7; color: #1f2b23; } .tdd-xspace { visibility: hidden; cursor: default; }
.tdd-filter { margin: 4px 4px 6px; padding: 6px 10px; border: 1px solid #d5ddd7; border-radius: 8px; font: inherit; font-size: 13.5px; }
.tdd-form { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 8px; background: #f6faf7; border-radius: 8px; margin: 2px 0; }
.tdd-form .tdd-grp { padding: 0 2px; }
.tdd-form input, .tdd-form select { padding: 6px 8px; border: 1px solid #d5ddd7; border-radius: 6px; font: inherit; font-size: 13.5px; background: #fff; width: 100%; box-sizing: border-box; }
.tdd-formbtns { display: flex; justify-content: flex-end; gap: 6px; }
.tdd-formbtns button { font-size: 13px; padding: 4px 12px; }
@media (min-width: 761px) {
  .top { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) minmax(max-content, 1fr); }
  .topl { display: flex; }   /* logo, then My day · Tasks · Messages · Approvals (Rick, Nov 16) */
  .topr { display: flex; justify-content: flex-end; gap: 8px; }   /* Service … Financials · 📞 Dialpad · profile */
  .topr .me { margin-left: 0; }
}
@media (max-width: 760px) {
  .topl { order: 1; }
  .topr { display: none; order: 4; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; }
  body.navopen .top .topr { display: flex; }
  .top .tdd { flex-direction: column; }
  .top .tdd-btn { text-align: left; }
  .topl .brand { order: 0; }
  .tdd-menu { position: static; max-height: none; z-index: auto; box-shadow: none; min-width: 0; margin: 0 8px 8px; }
  .tdd-menu.dp-menu { width: auto; } .dp-list { max-height: 50vh; }
}

/* Tasks page (Rick, Oct 12): a new task's whole row is green until its owner opens it (tasks.opened_at). */
table.list tr.tnew td, table.list tr.tnew:hover td { background: #e6f6ec; }
table.list tr.tnew td:first-child { box-shadow: inset 4px 0 0 #2fa865; }
table.list tr.tnew td:nth-child(2) { font-weight: 700; color: #14532d; }

/* ═══════════════ Project › Files (public/filelist.js, Paul Oct 13) ═══════════════
   Company-wide sections as cards with a coloured bar (like the Photos tab), one line per file, H / I / D share toggles.
   Colours: sales = blue, design & permit = green, PTO & closeout = amber, the rest grey. */
.fl-card { position: relative; padding: 0; overflow: visible; }
.fl-card, .fsa, .fsa-tpl { --flh: #1570ef; --flh-soft: #e8f1fe; --fli: #b54708; --fli-soft: #fff0e1; --fld: #6941c6; --fld-soft: #f1ecfc; }
.fl-bar { display: grid; grid-template-columns: 1fr minmax(200px, 380px) 1fr; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fl-bar h2 { margin: 0; }
.fl-right { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.fl-right > button { white-space: nowrap; }
.fl-search { border: 1.5px solid var(--brand) !important; border-radius: 99px !important; padding: 7px 14px !important; }
.fl-search:focus { outline: none; box-shadow: 0 0 0 3px #e9f4ed; }
.fl-hint { padding: 6px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: #fafbfa; }
.fl-up { color: var(--brand); font-weight: 500; }
.fl-note { margin: 6px 14px; }
.fl-sm { padding: 3px 10px; font-size: 12.5px; }
/* drop files from the computer: the whole card */
.fl-dropov { position: absolute; inset: 0; z-index: 20; display: none; place-items: start center; padding-top: 70px; background: rgba(233,244,237,.88); border: 2px dashed var(--brand); border-radius: var(--radius); pointer-events: none; }
.fl-dropov div { position: sticky; top: 38vh; display: grid; gap: 4px; text-align: center; background: #fff; padding: 14px 22px; border-radius: 12px; box-shadow: 0 8px 24px rgba(15,26,20,.12); }
.fl-dropov b { font-size: 15px; color: var(--brand); } .fl-dropov span { font-size: 12.5px; color: var(--muted); }
.fl-card.fl-filedrag .fl-dropov { display: grid; }
.fl-card.fl-filedrag .fl-sec > summary.fl-target { position: relative; z-index: 21; }
/* to review */
.fl-review { margin: 10px 12px; border: 1px solid #f5d9a8; background: #fffaf0; border-radius: 9px; }
.fl-review > summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; list-style: none; font-size: 13.5px; flex-wrap: wrap; }
.fl-review > summary::-webkit-details-marker { display: none; }
.fl-rcount { background: #fde9c4; color: var(--warn); border-radius: 99px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
.fl-rrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 200px auto; gap: 10px; align-items: center; padding: 7px 12px; border-top: 1px solid #f7e6c6; }
.fl-rname { min-width: 0; }
.fl-rname input { width: 100%; padding: 4px 8px; }
.fl-rrow select { padding: 4px 6px; }
.fl-racts { display: flex; gap: 6px; }
.fl-was { font-size: 11px; color: var(--muted); text-decoration: line-through; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-why { font-size: 11px; color: var(--warn); display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
/* expand / collapse row and the column header */
.fl-xbar { display: flex; gap: 4px; align-items: center; padding: 6px 10px; flex-wrap: wrap; }
.fl-xbar .linkbtn { color: var(--ink); font-weight: 500; font-size: 13px; padding: 4px 8px; text-decoration: none; }
.fl-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.fl-chk { display: flex !important; gap: 6px; align-items: center; font-size: 13px !important; color: var(--ink) !important; font-weight: 500; padding: 0 8px; flex-direction: row !important; cursor: pointer; }
.fl-row { display: grid; grid-template-columns: 18px 34px minmax(0, 1fr) auto 104px 82px auto; gap: 9px; align-items: center; padding: 4px 12px 4px 14px; border-top: 1px solid #f1f4f1; min-height: 36px; touch-action: pan-y; }
.fl-row:hover { background: #f8faf8; }
.fl-row.sel { background: #eef6f1; }
.fl-row.arc { opacity: .62; }
.fl-row.fl-dragsrc { opacity: .35; }
.fl-head { margin: 0 11px; min-height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fl-head:hover { background: #fafbfa; }
.fl-head .fl-hov { visibility: hidden !important; }
.fl-tgh { display: inline-flex; gap: 3px; width: 78px; justify-content: flex-end; }
.fl-tgh b { width: 24px; text-align: center; }
.fl-row input[type=checkbox], .fl-chk input { margin: 0; width: 16px; height: 16px; accent-color: var(--brand); }
/* file type: an outlined tag */
.fl-ic { width: 32px; height: 18px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; line-height: 1; flex: none; color: var(--icc); box-shadow: inset 0 0 0 1px var(--icc); }
.fl-ic.pdf { --icc: #d92d20; } .fl-ic.doc { --icc: #2e5aac; } .fl-ic.xls { --icc: #15803d; } .fl-ic.img { --icc: #1570ef; } .fl-ic.aud { --icc: #c11574; } .fl-ic.oth { --icc: #667085; }
.fl-nm { min-width: 0; display: flex; align-items: center; gap: 6px; }
.fl-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fl-t:hover { color: var(--brand); text-decoration: underline; }
.fl-nm input { width: 100%; padding: 2px 6px; }
.fl-was2 { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-badge { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; border-radius: 4px; padding: 1px 5px; flex: none; white-space: nowrap; }
.fl-badge.cur { background: #e9f4ed; color: var(--brand); }
.fl-badge.arc { background: #eef0ee; color: var(--muted); }
.fl-badge.dup { background: #fdecea; color: var(--bad); letter-spacing: 0; font-weight: 600; }
.fl-sdefs .fl-badge { margin-right: 6px; }
/* Files › ✓ Verify (Rick, Nov 16; public/filelist.js verifyChip): green = checked / approved, amber = a signed contract nobody checked yet */
.fl-ok, .fl-nv { font-size: 11px; font-weight: 600; border-radius: 10px; padding: 1px 7px; flex: none; white-space: nowrap; }
.fl-ok { background: #e3f4e8; color: #1f6b3a; border: 1px solid #b7e0c3; }
.fl-nv { background: #fff4e5; color: var(--warn); border: 1px solid #f2c25c; }
.fl-vbtn, .fl-vx { flex: none; font-size: 11px; padding: 0 6px; border-radius: 10px; border: 1px solid var(--line, #d8ded9); background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.fl-vbtn { opacity: 0; }
.fl-row:hover .fl-vbtn, .fl-vbtn:focus-visible, .fl-vbtn.must { opacity: 1; }
.fl-vbtn.must { border-color: #f2c25c; color: var(--warn); }
.fl-vbtn:hover { border-color: #2f7d4f; color: #1f6b3a; }
.fl-vx { border: 0; padding: 0 3px; }
.fl-vx:hover { color: var(--bad); }
@media (hover: none) { .fl-vbtn { opacity: 1; } }
.fl-hov { display: flex; gap: 2px; visibility: hidden; }
.fl-row:hover .fl-hov, .fl-row:focus-within .fl-hov { visibility: visible; }
.fl-hov button { border: 0; background: transparent; padding: 2px 6px; color: var(--muted); border-radius: 5px; }
.fl-hov button:hover { background: #e7ece7; color: var(--ink); }
.fl-hov .fl-ghost { visibility: hidden; }
.fl-src { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 7px 0 5px; border-radius: 5px; border: 1px solid var(--line); background: #fafbfa; font-size: 10.5px; font-weight: 500; color: var(--muted); white-space: nowrap; justify-self: start; }
.fl-src svg { flex: none; }
.fl-src.email svg { color: #1570ef; } .fl-src.salesforce svg { color: #0b8bd1; } .fl-src.upload svg { color: var(--brand); } .fl-src.call_recording svg { color: #c11574; } .fl-src.drive svg { color: #b7791f; }
.fl-dt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-tg { display: inline-flex; gap: 3px; }
.fl-tg button { width: 24px; height: 22px; padding: 0; font-size: 11px; font-weight: 700; border-radius: 5px; color: #a3ada6; background: var(--btn-bg); border: 1px solid var(--line); }
.fl-tg button.on.h { background: var(--flh-soft); color: var(--flh); border-color: transparent; }
.fl-tg button.on.i { background: var(--fli-soft); color: var(--fli); border-color: transparent; }
.fl-tg button.on.d { background: var(--fld-soft); color: var(--fld); border-color: transparent; }
.fl-tg button:disabled { cursor: not-allowed; opacity: .8; }
.fl-tg button.forced { box-shadow: inset 0 0 0 1px var(--flh); }
/* sections */
.fl-secs { display: grid; gap: 10px; padding: 8px 10px 12px; }
.fl-sec { border: 1px solid #dfe5df; border-radius: 12px; background: #fff; overflow: hidden; }
.fl-sec > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; user-select: none; border-left: 5px solid #9aa79f; background: #f6f8f6; flex-wrap: wrap; }
.fl-sec > summary::-webkit-details-marker { display: none; }
.fl-sec[open] > summary { border-bottom: 1px solid #e4e9e4; }
.fl-sec.g-sales > summary { border-left-color: #2f6f9f; background: #edf4fa; }
.fl-sec.g-design > summary { border-left-color: #3f7a4a; background: #edf6ef; }
.fl-sec.g-close > summary { border-left-color: #b07d12; background: #fcf4e2; }
.fl-sec > summary:hover { filter: brightness(.985); }
.fl-sec > summary.fl-target { outline: 2px dashed var(--brand); outline-offset: -3px; }
.fl-sname { font-weight: 700; font-size: 15px; }
.fl-scount { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 0 8px; background: rgba(255,255,255,.75); color: #445; }
.fl-scount.zero { font-weight: 500; color: var(--muted); }
.fl-sacts { display: none; gap: 2px; }
.fl-sec > summary:hover .fl-sacts, .fl-sec > summary:focus-within .fl-sacts { display: inline-flex; }
.fl-sacts button { padding: 1px 6px; font-size: 12px; border-color: transparent; background: transparent; }
.fl-sacts button:hover { background: rgba(255,255,255,.8); }
.fl-sdefs { margin-left: auto; display: flex; align-items: center; font-size: 11px; color: var(--muted); }
.fl-sec > summary input { padding: 2px 6px; font-weight: 600; width: 240px; }
.fl-sec > .fl-row:first-of-type { border-top: 0; }
.fl-subs { display: grid; gap: 6px; padding: 8px 10px 10px 22px; background: #fafbfa; border-top: 1px solid #eef1ee; }
.fl-subsec > summary { padding: 7px 12px; font-size: 13.5px; }
.fl-empty { padding: 8px 14px 12px 36px; font-size: 12.5px; color: var(--muted); }
.fl-arch { padding: 5px 12px 7px 36px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); }
.fl-inl { padding: 8px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: #fafbfa; }
.fl-inlrow { display: flex; gap: 10px; align-items: center; padding: 4px 0 4px 20px; flex-wrap: wrap; }
/* bulk bar, toasts, drag */
.fl-bulk { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 6px; align-items: center; padding: 8px 12px; background: #16271e; color: #fff; flex-wrap: wrap; border-radius: 0 0 var(--radius) var(--radius); }
.fl-bulk button, .fl-bulk select { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 12.5px; padding: 4px 9px; width: auto; }
.fl-bulk select option { color: var(--ink); }
#fltoasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 6px; z-index: 80; width: max-content; max-width: calc(100vw - 32px); }
.fl-toast { background: #16271e; color: #fff; padding: 8px 8px 8px 14px; border-radius: 9px; display: flex; gap: 10px; align-items: center; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); flex-wrap: wrap; }
.fl-toast button { background: transparent; color: #9fe0b7; border: 0; padding: 3px 8px; font-weight: 600; }
.fl-toast button:hover { background: rgba(255,255,255,.1); }
.fl-ghostdrag { position: fixed; z-index: 90; pointer-events: none; background: #16271e; color: #fff; font-size: 12.5px; padding: 5px 10px; border-radius: 7px; box-shadow: 0 8px 20px rgba(0,0,0,.25); white-space: nowrap; }
.fl-dropbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15,26,20,.12); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 6px; flex-wrap: wrap; max-height: 40vh; overflow: auto; }
.fl-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; align-self: center; margin-right: 4px; }
.fl-dropbar span[data-drop] { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; background: #fafbfa; }
.fl-dropbar span[data-drop].fl-target { outline: 2px dashed var(--brand); background: #e9f4ed; }
/* details panel and the rename / move / share window */
.fl-scrim { position: fixed; inset: 0; background: rgba(15,26,20,.35); z-index: 60; }
.fl-side { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); background: #fff; z-index: 61; box-shadow: -12px 0 40px rgba(15,26,20,.18); display: flex; flex-direction: column; }
.fl-sh { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fl-sh b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-pv { margin: 14px; height: 200px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; background: #fafbfa; overflow: hidden; }
.fl-pv img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fl-pv .fl-ic { width: 64px; height: 30px; font-size: 13px; border-radius: 6px; }
.fl-side.haspv { width: min(760px, 100vw); overflow-y: auto; }   /* a PDF to read: wider, and the preview takes the height */
.fl-pv.doc { display: block; height: auto; flex: 1 0 min(60vh, 520px); min-height: 320px; }
.fl-pv iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.fl-side dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 7px 10px; padding: 0 14px; margin: 0; font-size: 13px; }
.fl-side dt { color: var(--muted); } .fl-side dd { margin: 0; overflow-wrap: anywhere; }
.fl-sf { margin-top: auto; display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.fl-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(15,26,20,.4); }
.fl-mbox { width: min(640px, 100%); background: #fff; border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,.28); display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.fl-mh { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.fl-mh .fl-ic { width: 38px; height: 21px; font-size: 10px; }
.fl-meta { min-width: 0; } .fl-meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fl-meta span { font-size: 12px; color: var(--muted); }
.fl-mb { padding: 14px 16px; display: grid; gap: 14px; overflow: auto; }
.fl-f, .fl-flbl { display: grid; gap: 5px; font-size: 12px !important; color: var(--muted) !important; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fl-f input, .fl-f select { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); }
.fl-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.fl-chips button { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: #fafbfa; }
.fl-chips button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.fl-chips button.first { box-shadow: 0 0 0 2px #e9f4ed, 0 0 0 3px var(--brand); }
.fl-chips button.create { border-style: dashed; color: var(--brand); }
.fl-chips button.create.on { color: #fff; }
.fl-share3 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fl-share3 button { font-size: 13px; padding: 5px 12px; border-radius: 8px; color: var(--muted); }
.fl-share3 button.on.h { background: #e8f1fe; color: #1570ef; border-color: #e8f1fe; }
.fl-share3 button.on.i { background: #fff0e1; color: #b54708; border-color: #fff0e1; }
.fl-share3 button.on.d { background: #f1ecfc; color: #6941c6; border-color: #f1ecfc; }
.fl-mf { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.fl-err { font-size: 12.5px; color: var(--bad); margin-top: -8px; }
.fl-one { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px !important; color: var(--ink) !important; }
.fl-tog { width: 34px; height: 19px; border-radius: 99px; background: #d0d5dd; position: relative; cursor: pointer; border: 0; padding: 0; flex: none; margin-top: 2px; }
.fl-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: left .15s; }
.fl-tog.on { background: var(--brand); } .fl-tog.on::after { left: 17px; }
/* E-signatures card folds (public/esign.js) */
#esigncard.esfold > summary { list-style: none; cursor: pointer; }
#esigncard.esfold > summary::-webkit-details-marker { display: none; }
#esigncard.esfold[open] .esfoldn { display: none; }
@media (max-width: 700px) {
  .fl-bar { grid-template-columns: 1fr auto; } .fl-search { grid-column: 1 / -1; grid-row: 2; }
  .fl-row { grid-template-columns: 18px 34px minmax(0, 1fr) auto; }
  .fl-row .fl-src, .fl-row .fl-dt, .fl-row .fl-hov, .fl-head .fl-colsrc, .fl-head .fl-coldt { display: none; }
  .fl-rrow { grid-template-columns: 1fr; } .fl-rrow > .fl-ic { display: none; }
  .fl-sdefs, .fl-rhint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fl-tog::after { transition: none; } }
.fl-arch .linkbtn, .fl-inl .linkbtn { padding: 0 4px; font-weight: 500; font-size: 12.5px; }
/* light checkboxes with a green tick (not the browser's black ones) */
.fl-card input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin: 0; flex: none; border: 1.5px solid #b9c3bc; border-radius: 4px; background: #fff; display: inline-grid; place-content: center; cursor: pointer; }
.fl-card input[type=checkbox]::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.fl-card input[type=checkbox]:hover { border-color: var(--brand); }
.fl-card input[type=checkbox]:checked { background: var(--brand); border-color: var(--brand); }
.fl-card input[type=checkbox]:checked::after { opacity: 1; }
.fsa-tpl { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fsa-tplrow { display: grid; grid-template-columns: 30px 130px 1fr; gap: 8px; align-items: center; padding: 7px 12px; border-top: 1px solid #f1f4f1; }
.fsa-tplrow:first-child { border-top: 0; }
@media (max-width: 600px) { .fsa-tplrow { grid-template-columns: 30px 1fr; } .fsa-tplrow > .small { grid-column: 1 / -1; } }
.fsa { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; background: #fff; }
.fsa-row { display: grid; grid-template-columns: minmax(180px, 1fr) 170px 100px 90px 110px 70px; gap: 10px; align-items: center; padding: 6px 12px; border-top: 1px solid #f1f4f1; min-width: 600px; }
.fsa-head { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #fafbfa; }
.fsa-row input[type=text] { padding: 4px 8px; }
.fsa-nm { display: flex; align-items: center; gap: 6px; } .fsa-nm input { flex: 1; min-width: 0; }
.fsa-row.sub .fsa-nm { padding-left: 18px; } .fsa-sub { color: var(--muted); }
.fsa-row select { padding: 3px 6px; font-size: 13px; max-width: 100%; }
.fsa-opts { display: grid; gap: 8px; }
.fsa-opts > label { display: flex !important; flex-direction: row !important; gap: 8px; align-items: flex-start; font-size: 13px !important; color: var(--ink) !important; }
.fsa-opts input[type=checkbox] { margin-top: 3px; accent-color: var(--brand); }

/* Pipeline: installer chips after the dealer chips, a thin divider between (Paul, Oct 13). The first toolbar row wraps when the
   chips don't fit, instead of pushing the page sideways. */
.ptoolbar .dchips .idiv { flex: 0 0 auto; align-self: stretch; width: 0; border-left: 1px solid #d5dcd6; margin: 3px 4px; }
/* Row 1: the Projects title, centered, with the filter tags and count on the right (no search box since Nov 18: the top bar has it). Row 2: dealer + installer chips in one row (scrolls
   sideways when they don't fit, like the stage chips), then View and Bottlenecks. */
.ptoolbar .psearchrow { display: grid; grid-template-columns: 1fr minmax(240px, 460px) 1fr; align-items: center; gap: 10px; }
.ptoolbar .psearchrow { grid-template-columns: 1fr minmax(0, auto) 1fr; }
.ptoolbar .psearchrow .pshead { display: flex; align-items: center; gap: 12px; justify-self: center; min-width: 0; }
.ptoolbar .psearchrow .pcount { justify-self: end; margin-left: 0; }
.ptoolbar .pfiltrow { justify-content: center; }
.ptoolbar .pfiltrow .dchips { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.ptoolbar .pfiltrow .dchips.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); }
.ptoolbar .pfiltrow > :not(.dchips) { flex: 0 0 auto; }
.ptoolbar .pfiltrow .dchips .idiv { margin: 3px 4px; }
@media (max-width: 760px) {
  .ptoolbar .psearchrow { grid-template-columns: minmax(0, 1fr) auto; } .ptoolbar .psearchrow > span:empty { display: none; }
  .ptoolbar .psearchrow .pshead { justify-self: stretch; }
  .ptoolbar .ptrow.pfiltrow { flex-wrap: nowrap; }
  .ptoolbar .pfiltrow .dchips { flex: 0 1 auto; flex-wrap: nowrap; }
}

/* Documents on business licenses / AHJs / company docs, Renewals, permit packet (Paul, Oct 13; public/dirdocs.js). */
.dd-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; border: 2px dashed var(--line); border-radius: 10px; background: #fafbf9; text-align: center; }
.dd-drop.on { border-color: var(--brand); background: #eef7f1; }
.dd-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; margin-bottom: 10px; }
.dd-status button { padding: 4px 10px; border-radius: 99px; font-size: 13px; }
.dd-status button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.dd-year h5 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.dd-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-bottom: 1px solid #eef1ed; }
.dd-row.cur { background: #f3faf5; border-radius: 6px; }
.dd-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dd-acts { white-space: nowrap; }
.dd-older summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 8px 0; }
.dd-renhead { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.dd-renhead h4 { margin: 0 0 6px; }
.dd-who { display: grid; grid-template-columns: 120px 1fr 50px 1fr; gap: 6px; align-items: center; margin-top: 4px; font-size: 13px; }
.rc-box dl.dd-counts { margin: 0; display: block; } .dd-counts div { display: flex; gap: 8px; font-size: 13px; margin: 3px 0; } .dd-counts dt { width: 130px; color: var(--muted); } .dd-counts dd { margin: 0; }
.dd-pkt > div { margin: 2px 0; } .dd-pkt > .chip { display: inline-block; margin-bottom: 4px; }
.dd-review details { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 6px 0; background: #fff; }
.dd-review summary { cursor: pointer; } .dd-review select { width: auto; max-width: 260px; }
.nowrap { white-space: nowrap; }
@media (max-width: 700px) { .dd-who { grid-template-columns: 1fr 1fr; } .dd-row { flex-direction: column; } }
.dd-check { margin-top: 10px; gap: 8px; flex-wrap: nowrap; } .dd-check input { width: auto; margin: 0; }
.dd-away { margin: 4px 0 12px 126px; font-size: 13px; } .dd-off { display: flex; gap: 8px; align-items: center; } .dd-off.past { opacity: .55; } .dd-offadd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; } .dd-offadd input { width: auto; padding: 4px 6px; } @media (max-width: 700px) { .dd-away { margin-left: 0; } }

/* Admin › QuickBooks (public/quickbooks.js) */
#qbconn a.btn { display: inline-block; color: inherit; text-decoration: none; }
#qbconn a.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.qb-steps li { margin: 6px 0; line-height: 1.5; }
.qb-copy { cursor: copy; background: #f3f5f2; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; overflow-wrap: anywhere; }
table.qb-map td:first-child { width: 40%; }
table.qb-map select { width: 100%; max-width: 420px; }
@media (max-width: 680px) { table.qb-map td:first-child { width: auto; } table.qb-map, table.qb-map tbody, table.qb-map tr, table.qb-map td { display: block; } table.qb-map thead { display: none; } table.qb-map td { border: 0; padding: 2px 0; } table.qb-map tr { border-bottom: 1px solid var(--line); padding: 6px 0; } }

/* Quotes (public/quotes.js) and Directory › Subcontractors (public/subagreements.js) */
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.qgrid > .panel { margin: 0; }
.qf { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 12px; }
.qf label, .qf4 label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.qf label > :is(input, select) { color: var(--ink, inherit); }
.qf4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
table.qlines input, table.qlines select { width: 100%; min-width: 60px; }
table.qlines input.qn { max-width: 110px; text-align: right; }
ol.qscope { margin: 0 0 8px 18px; padding: 0; } ol.qscope li { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; } ol.qscope textarea { flex: 1; min-width: 0; }
.qmv { display: flex; flex-direction: column; }
.qtot { text-align: right; margin-top: 10px; line-height: 1.7; } .qtot .big { font-size: 18px; }
.qwarn { border: 2px solid #e0a39b; background: #fff6f4; } .qwarn ul { margin: 4px 0 0 18px; }
@media (max-width: 680px) { table.qlines thead { display: none; } table.qlines tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); } table.qlines td { border: 0; padding: 0; } table.qlines td:first-child { grid-column: 1 / -1; } table.qlines input.qn { max-width: none; } }
.pquotes { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 13px; }
.pquotes .pq { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; color: inherit; text-decoration: none; background: #fff; }
.pquotes .pq:hover { border-color: var(--brand); }
.qok { border: 2px solid #9cc9a9; background: #f3faf5; }
/* Suggested adders (public/addersuggest.js) */
.adsugg { border: 1px solid #b9d3b1; background: #f6fbf4; margin: 8px 0; }
.adsugg .adsg { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.adsugg .adsg input { width: auto; margin-top: 3px; }

/* Admin › Automations (public/automations.js) */
.autotbl td { vertical-align: top; }
.autotbl td:first-child { max-width: 520px; }
h3.autoh { margin: 14px 0 4px; }
.autoprev { max-height: 46vh; overflow: auto; border: 1px solid var(--line, #ddd); border-radius: 6px; margin: 6px 0; }
details.autolog { margin-top: 12px; }

/* Price lock + "Arcasa says" on Financing › Lender 1 (owner only) */
.pricelock { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.warn-t { color: var(--warn); }
.arhook.bad { border-color: #f0b4ad; background: #fdf3f2; }
/* Roof waiver (public/roofwaiver.js): the boxes on the left, the PDF preview on the right; stacked on a phone. */
.rw-modal .modal-box { width: min(1180px, 96vw); max-height: 94vh; overflow: auto; }
.rw-grid { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 14px; align-items: start; }
.rw-form { display: flex; flex-direction: column; gap: 7px; }
.rw-form label:not(.inline) { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; }
.rw-form fieldset { border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px 7px; margin: 0; font-size: 13px; }
.rw-form legend { font-weight: 600; padding: 0 4px; }
.rw-form label.inline { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin: 2px 10px 2px 0; white-space: nowrap; }
.rw-form input[type=radio], .rw-form input[type=checkbox] { width: auto; margin: 0; }
.rw-form fieldset input:not([type=radio]):not([type=checkbox]) { margin-top: 4px; }
.rw-prev iframe { width: 100%; height: min(72vh, 820px); border: 1px solid var(--line); border-radius: 7px; background: #fff; }
@media (max-width: 820px) { .rw-grid { grid-template-columns: 1fr; } .rw-prev iframe { height: 60vh; } }
/* Portal Administrator Policy (public/portalpolicy.js) */
.policybanner { background: #fff4d6; border-bottom: 1px solid #e8c766; color: #5b4300; padding: 10px 16px; font-size: 14px; line-height: 1.45; }
.policybanner .btn { margin-left: 8px; padding: 4px 12px; }
.policystop { max-width: 720px; margin: 40px auto; }
.policystop h1 { margin-top: 0; }
.policypdf { width: 100%; height: min(70vh, 900px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 700px) { .policypdf { height: 60vh; } .policystop { margin: 16px auto; } }

/* Deal Calculator (public/dealcalc.js): phone-first, big inputs, sticky totals at the bottom. */
.dc { max-width: 760px; margin: 0 auto; padding-bottom: 96px; }
.dc .dc-card h2 { margin: 0 0 8px; }
.dc-lbl { display: block; font-weight: 600; margin: 6px 0; }
.dc-lbl select, .dc-lbl input { display: block; width: 100%; font-size: 18px; padding: 10px 12px; margin-top: 4px; border-radius: 10px; }
.dc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dc-seg button { flex: 1 1 45%; padding: 12px 8px; border-radius: 10px; border: 1px solid #cfd8cf; background: #f6f8f6; font-size: 15px; font-weight: 600; }
.dc-seg button.on { background: #1f6b3a; color: #fff; border-color: #1f6b3a; }
.dc-sec { border-top: 1px solid #e4e9e4; padding: 6px 0; }
.dc-sec > summary { font-weight: 700; font-size: 16px; padding: 8px 0; cursor: pointer; }
.dc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #edf1ed; flex-wrap: wrap; }
.dc-row > span:first-child, .dc-tog > span { flex: 1 1 180px; min-width: 0; }
.dc-row small { display: block; color: #667; font-weight: 400; font-size: 12.5px; }
.dc-tog input[type=checkbox] { width: 26px; height: 26px; flex: none; }
.dc-pr { font-weight: 700; white-space: nowrap; color: #1f6b3a; }
.dc-step { display: inline-flex; align-items: center; border: 1px solid #cfd8cf; border-radius: 12px; overflow: hidden; }
.dc-step button { width: 44px; height: 44px; font-size: 22px; border: 0; background: #f0f4f0; }
.dc-step input { width: 52px; height: 44px; text-align: center; border: 0; font-size: 18px; -moz-appearance: textfield; }
.dc-mini { display: inline-flex; flex-direction: column; font-size: 12px; font-weight: 600; }
.dc-mini input { width: 96px; font-size: 18px; padding: 8px; border-radius: 10px; }
.dc-li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #edf1ed; }
.dc-li small { display: block; color: #667; font-size: 12.5px; }
.dc-li .num { white-space: nowrap; text-align: right; font-weight: 600; }
.dc-li.tot { font-weight: 700; border-top: 2px solid #1f6b3a; border-bottom: 0; }
.dc .neg { color: #b42318; }
.dc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #14281b; color: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.2); }
.dc-bar > div { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.dc-bar small { font-size: 11px; opacity: .8; }
.dc-bar b { font-size: 18px; white-space: nowrap; }
.dc-bar .pos b { color: #9be7a8; } .dc-bar .neg b { color: #ffb4ab; }
.dc-saved { display: grid; gap: 6px; }
.dc-srow { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e4e9e4; border-radius: 10px; text-decoration: none; color: inherit; flex-wrap: wrap; }
.dc-srow > span:first-child { flex: 1 1 180px; } .dc-srow small { display: block; color: #667; font-size: 12px; }
.dc-srow .num { text-align: right; }
@media (max-width: 520px) { .dc-bar b { font-size: 16px; } .dc-two { gap: 8px; } }
/* MPU / 120% check (public/mpucheck.js) */
.mpubox { border: 1px solid #dfe5df; border-radius: 10px; padding: 8px 10px; background: #fafcfa; display: grid; gap: 3px; }
.mpuflag { font-weight: 600; font-size: 13.5px; padding: 4px 8px; border-radius: 8px; }
.mpuflag.bad { background: #fdecea; color: #a1281c; } .mpuflag.warn { background: #fff6e5; color: #8a5300; }
/* Job profit (owner only, public/financials.js jobProfitPanel) */
.jobprofit .jp-big { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 4px; }
.jobprofit .jp-big b { font-size: 26px; } .jobprofit .jp-big span { color: #667; font-size: 13px; }
.jobprofit .jp-big.ok b { color: #1f6b3a; } .jobprofit .jp-big.warn b { color: #8a5300; } .jobprofit .jp-big.bad b { color: #b42318; }
.jp-tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .jp-tbl td { padding: 3px 0; border-bottom: 1px solid #edf1ed; } .jp-tbl td.num { text-align: right; white-space: nowrap; }
.jp-tbl tr.jp-tot td { font-weight: 700; border-top: 2px solid #1f6b3a; border-bottom: 0; }
.jp-li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
/* Sales design (public/solardesign.js): uses the Deal Calculator's .dc layout */
.sd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sd-kpis > div { border: 1px solid #e4e9e4; border-radius: 10px; padding: 6px 10px; } .sd-kpis small { display: block; color: #667; font-size: 12px; } .sd-kpis b { font-size: 20px; }
.sd-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 90px; align-items: end; }
.sd-months > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.sd-months span { width: 100%; background: #f0b429; border-radius: 4px 4px 0 0; min-height: 2px; } .sd-months small { font-size: 11px; color: #667; }

/* A small marker inside a side chip (Sales design: an OpenSolar design is linked). */
.sidechips .chipmark { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: #e3f2e7; color: #1f6b3a; margin-left: 2px; }
/* Spec sheets on the crew's phone (Rick, Oct 15): a big 📘 button on each equipment / BOM line, module size in bold. */
.ip-spec { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 6px 6px 0 0; padding: 8px 14px; border: 1px solid #c8d6e8; border-radius: 10px; background: #f3f7fd; color: #1d4f91; font-weight: 700; font-size: 15px; text-decoration: none; max-width: 100%; box-sizing: border-box; flex-wrap: wrap; }
.ip-spec:active { background: #e2ecfa; } .ip-spec small { font-weight: 500; color: #667; font-size: 12px; }
.ip-modsize { margin-top: 3px; font-size: 14.5px; } .ip-modsize b { font-weight: 800; }
.m-t td.item .ip-spec { min-height: 40px; margin: 4px 0 0 30px; padding: 6px 12px; font-size: 14px; }
.ip-doc { min-height: 44px; display: flex; align-items: center; gap: 6px; }
/* Admin › Equipment list rows (Rick, Oct 15): labeled fields that wrap, so nothing is cut off at 1366 / 1568 px or on a phone. */
.eqlist { border-top: 1px solid #e4e9e4; }
.eqrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid #e4e9e4; }
.eqrow.off { opacity: .6; }
.eqcec { flex: 1 1 100%; color: #2c5a37; overflow-wrap: anywhere; }
.cectable { display: flex; flex-direction: column; }
.cecrow { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid #e4e9e4; align-items: flex-start; }
.cecrow.off { opacity: .6; }
.cecwho { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.cecsel { flex: 2 1 320px; min-width: 0; } .cecsel select { width: calc(100% - 34px); min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .cecsel select { width: calc(100% - 34px); } }
.eqf { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.eqf > span { font-size: 11.5px; color: #667; white-space: nowrap; }
.eqf input, .eqf select { width: 100%; min-width: 0; box-sizing: border-box; }
.eqname { flex: 2 1 190px; } .eqmfr { flex: 1 1 110px; } .eqmodel { flex: 2 1 150px; } .eqn { flex: 0 0 74px; } .eqin { flex: 0 0 104px; } .eqin b { white-space: nowrap; line-height: 34px; }
.eqspec { flex: 2 1 230px; } .eqnick { flex: 2 1 170px; } .eqact { flex: 0 0 auto; margin-left: auto; }
.eqspecrow, .eqactrow { display: flex; align-items: center; gap: 8px; } .eqspecrow select { flex: 1 1 auto; }
.eqopen { white-space: nowrap; font-weight: 600; text-decoration: none; }
.eqactrow label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
@media (max-width: 640px) { .eqname, .eqmodel, .eqspec, .eqnick { flex-basis: 100%; } .eqmfr { flex-basis: 45%; } .eqact { margin-left: 0; } }
/* Details › Utility & PTO = the Interconnection packet (Rick, Oct 16): waiting hint on the next date, notes full width. */
.icwait { margin-top: 2px; color: #8a5a00; font-weight: 600; }
.ptopacket .icp { margin-top: 4px; } .ptopacket .icnotes { grid-column: 1 / -1; }
.icnotes textarea { min-height: 70px; }
/* Details › Utility & PTO, compact (Rick, Oct 16): two columns that stack independently (short cards fill in under each other,
   balanced by height), full content width while the section is open, compact one-line rows with hints in small grey under the
   value, Contractor as a one-line bar, Status & dates as a small table. One column on phones. */
.ptopacket .icp { grid-template-columns: minmax(0, 1fr); }   /* never wider than the screen (phones) */
.ptopacket .icgrid { display: block; column-count: 2; column-gap: 14px; }
.ptopacket .icgrid > .icsec { break-inside: avoid; display: block; width: 100%; box-sizing: border-box; margin: 0 0 14px; }
.ptopacket .icgrid > .icdocs { column-span: all; }
.ptopacket .icsec { padding: 10px 12px; } .ptopacket .icsec h3 { margin: 0 0 4px; font-size: 14.5px; }
.ptopacket .icrow { grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px; padding: 3px 6px; }
.ptopacket .icrow > label { font-size: 12.5px; line-height: 1.25; }
.ptopacket .icval input, .ptopacket .icval select { padding: 3px 7px; min-width: 90px; }
.ptopacket .icc { padding: 2px 7px; font-size: 11.5px; }
.icvw { min-width: 0; } .ichint { font-size: 11.5px; color: #7a837a; margin-top: 1px; line-height: 1.3; } .ichint.bad { color: #a15c00; }
.icinfo { color: #7a837a; cursor: help; font-size: 11px; }
.iccontact { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; } .iccpart { display: flex; gap: 4px; align-items: center; flex: 1 1 140px; min-width: 0; } .iccpart input { min-width: 0 !important; width: 100%; }
.iccontractor > summary { list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .iccontractor > summary::-webkit-details-marker { display: none; }
.iccontractor .iccaret { margin-left: auto; color: #7a837a; transition: transform .15s; } .iccontractor[open] .iccaret { transform: rotate(90deg); }
.icstab { width: 100%; border-collapse: collapse; font-size: 12.5px; } .icstab th { text-align: left; font-weight: 600; color: #6b746b; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; padding: 2px 4px; }
.icstab td { padding: 3px 4px; border-top: 1px solid #eef1ee; vertical-align: middle; } .icstab td:first-child { width: 42%; } .icstab td:last-child { white-space: nowrap; width: 1%; }
.icstab .icval input { min-width: 0; width: 100%; } .icstab td.icwait { font-weight: 600; }
.pgrid.pwide { grid-template-columns: minmax(0, 1fr); }   /* Utility & PTO open: the section uses the full width; the side panel moves below */
@media (max-width: 760px) { .ptopacket .icgrid { column-count: 1; } }
@media (max-width: 640px) { .ptopacket .icrow { grid-template-columns: 1fr; gap: 2px; } }
@media (max-width: 640px) { .icstab { table-layout: fixed; } .icstab td:first-child { width: 36%; } .icstab td:nth-child(2) { width: 42%; } .icstab td:last-child { white-space: normal; width: auto; font-size: 11.5px; } .icstab th:last-child { width: 22%; } }

.sc-sow { font-size: 13px; overflow-wrap: anywhere; }
.sc-sow .chip { margin-right: 4px; }
/* The SOW chip on the status card's top line (Rick, Nov 14): always in sight, beside the days; a long line clips (full text on hover). */
.statuscard .sc-top .sc-sow { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.statuscard .sc-top .sc-sowchip { font-weight: 700; }
body:not(.jm-scopen) .statuscard.sc-done .sc-top .sc-sow { display: none; }   /* In Service: under More ▾ */
.statuscard.sc-done .sc-top { flex-wrap: wrap; }
@media (max-width: 700px) { .statuscard .sc-top .sc-sow { white-space: normal; } }
/* Pipeline rows (Rick, Nov 14): the SOW tag beside MPU / BAT / HDM. */
.scope .sowtag.ok { background: #e3f4e8; color: #1f6b3a; font-weight: 600; } .scope .sowtag.warn { background: #fff4e5; color: var(--warn); font-weight: 600; }
.scope .sowtag.bad { background: #fde7e5; color: var(--bad); font-weight: 600; } .chip.sowtag { font-weight: 600; font-size: 10.5px; }

/* Arcasa survey photo link box on the Photos tab (public/photostab.js surveyBox) */
.svlink{margin:8px 0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#f6faf7;display:grid;gap:4px}

/* What's new (public/whatsnew.js): the list on the "New version" banner, the card after the reload, Help › What's new. */
.newbuild.has-news { flex-wrap: wrap; max-width: min(560px, calc(100vw - 24px)); border-radius: 12px; }
.newbuild .wn-list { flex-basis: 100%; background: rgba(255,255,255,.1); border-radius: 8px; padding: 8px 10px; max-height: 45vh; overflow: auto; font-size: 13px; }
.newbuild .wn-list ul, .wn-card ul, .wn-page ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 6px; }
.newbuild .wn-list a, .newbuild .wn-date { color: #dff3e6; }
.wn-date { color: var(--muted); font-size: 12px; margin-left: 4px; }
.wn-all { font-size: 13px; }
.wn-card { position: fixed; right: 16px; bottom: 16px; z-index: 9998; width: min(380px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-left: 4px solid #1f6b3a; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.15); padding: 10px 12px; font-size: 14px; }
.wn-page li { line-height: 1.45; }
.avatarmenu .wn-menu { display: block; margin-top: 8px; font-size: 13px; }
.ptoprice { margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; } .ptoprice > span { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#permithub .pm-quick { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; font-size: 13px; }
#permithub .pm-read { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line, #e4e7e3); border-radius: 8px; background: var(--panel, #fff); } #permithub .pm-read table.list { margin: 8px 0; } #permithub .pm-q { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#es_err { margin: 8px 0 0; padding: 8px 10px; border: 1px solid #f0c4bf; border-radius: 6px; background: #fde7e5; color: var(--bad); }

/* Pipeline (Rick, Oct 25): late counts on the stage chips and group headings, amber "No open task", row labels, filter tags */
.ptoolbar .chiplabel { align-self: center; flex: 0 0 auto; }
.stages > button > i.nlatedot { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: var(--bad, #c62828); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.pipetable :is(tr.pgrphead, tr.cstage, tr.csub) .nlate { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; background: #fdeceb; color: var(--bad, #c62828); border: 1px solid #f0b4ad; border-radius: 999px; padding: 0 8px; }
/* Which jobs are late (Rick, Oct 26): a red edge on the row; the red number on a stage chip shows only those */
.pipetable tr.late > td:first-child { box-shadow: inset 4px 0 0 var(--bad, #c62828); }
.stages > button > i.nlatedot { cursor: pointer; } .stages > button > i.nlatedot:hover { outline: 2px solid #fff; }
.pipetable tr.pgrphead .pgstage { color: var(--muted); font-weight: 500; }
.notask { color: var(--warn, #9a6400); font-weight: 600; font-size: 12.5px; }
.pfilters { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.pfilters .pcount { margin-left: 4px; }
.ftag { font-size: 12.5px; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--brand, #2f7d4f); background: #e3f3e7; color: #1f5a38; cursor: pointer; white-space: nowrap; }
.ftag:hover { background: #d2ebd9; }
.pipetable thead th #pselall { margin: 0 6px 0 0; vertical-align: -2px; }
/* Scope tags wrap inside their column (MPU BAT SGIP no longer run under the PM initials) */
.pipetable .scope { flex-wrap: wrap; row-gap: 2px; } .pipetable col.c-scope { width: 110px; }
/* Phone: the Dealer and Installer rows each take a full line and scroll sideways */
@media (max-width: 760px) { .ptoolbar .ptrow.pfiltrow { flex-wrap: wrap; justify-content: flex-start; } .ptoolbar .ptrow.pfiltrow .dchips.pdi { flex: 1 1 100%; overflow-x: auto; } .ptoolbar .ptrow.pfiltrow .spacer { display: none; }
  .pfilters { margin-left: 0; } }
/* HDM / Maxwell NTP checklist (Financing tab; public/hdmntp.js) */
.hdmntp-list { list-style: none; margin: 6px 0 10px; padding: 0; }
.hdmntp-list li { padding: 3px 0; }
.hdmntp-list li.ok { color: #1f6b3a; }
.hdmntp-list li.miss { color: #b3261e; font-weight: 600; }

/* Admin › Data fixes (Rick, Oct 26): the fixes listed on the left with what's left (✓ = nothing), the picked one on the right. */
.dfwrap { display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 8px; }
.dfnav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; background: var(--panel); }
/* Rick, Nov 2: two columns so the whole list fits without scrolling; the finished ones sit behind "Done (n)" (a pop-up). */
.dfgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 4px; }
.dfgrid .dfitem { font-size: 13.5px; padding: 6px 8px; line-height: 1.25; }
.dfitem[hidden] { display: none; }
.dfdone { align-self: flex-start; border: 1px solid var(--btn-line); border-radius: 999px; background: var(--btn-bg); color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; padding: 4px 12px; cursor: pointer; }
.dfdone[hidden] { display: none; }
.modal-box.dfpop { width: min(620px, 100%); }
@media (max-width: 1200px) { .dfwrap { grid-template-columns: 340px minmax(0, 1fr); } .dfnav .dfgrid { grid-template-columns: 1fr; } }
.dfitem { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.dfitem:hover { background: var(--chip); }
.dfitem.on { background: var(--brand); color: #fff; }
.dfitem .dfn { font-size: 12px; min-width: 22px; text-align: right; }
.dfitem.done:not(.on) { color: var(--muted); }
.dfitem.done .dfn { color: var(--brand); }
.dfitem.on .dfn { color: #fff; }
.dfmain { min-width: 0; }
@media (max-width: 760px) {
  .dfwrap { grid-template-columns: 1fr; }
  .dfnav { position: static; }
  .dfnav .dfgrid { grid-template-columns: 1fr 1fr; }
  .dfitem { border: 1px solid var(--line); padding: 5px 9px; }
}
/* Monitoring › a system's actions (Link to project, Add as past customer, …): spaced, wrapping */
.monacts { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-left: 8px; } .monacts .linkbtn { padding: 0; }
/* Messages (homeowner portal conversations, public/messages.js) */
.msg-wrap { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 12px; align-items: start; }
.msg-list { padding: 4px; max-height: 75vh; overflow: auto; } .msg-thread { min-width: 0; }
.msg-row { display: block; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.msg-row:hover { background: #f4f7f4; text-decoration: none; } .msg-row.on { background: #eaf3ec; } .msg-row.unread b { color: #1f6b3a; }
.msg-snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-dot { width: 9px; height: 9px; border-radius: 50%; background: #d93025; flex: none; }
.msg-compose textarea { width: 100%; min-height: 70px; } .msg-feed { max-height: 60vh; margin-top: 8px; } .msg-back { display: none; }
@media (max-width: 760px) {
  .msg-wrap { grid-template-columns: 1fr; } .msg-wrap.has-thread .msg-list { display: none; } .msg-wrap:not(.has-thread) .msg-thread { display: none; } .msg-back { display: inline-block; }
}
.topl .topbtns { display: flex; align-items: center; gap: 2px; justify-self: center; min-width: 0; }
/* Messages' two tabs (public/msgtabs.js): Customers, installers & dealers · Team */
.msgtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 10px; border-bottom: 1px solid var(--line); }
.msgtabs a { padding: 7px 14px; border-radius: 8px 8px 0 0; color: var(--ink); text-decoration: none; font-weight: 600; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.msgtabs a:hover { background: #f4f7f4; text-decoration: none; } .msgtabs a.on { background: #fff; border-color: var(--line); color: #1f6b3a; }
/* Phone (Rick's top-menu review, Nov 16): the left-hand buttons (Search, Tasks, Messages…) go in the ☰ menu, above the main links,
   instead of running off the bar. */
@media (max-width: 760px) {
  .top .topl { display: contents; }
  .topl .topbtns { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding-top: 4px; }
  body.navopen .topl .topbtns { display: flex; }
  .topl .topbtns .taskbtn { padding: 10px 12px; font-size: 17px; }
}
/* The top bar's search box (Rick, Nov 16; public/globalsearch.js bindTopSearch): in place of the 🔍 Search button, on every staff
   page. Results drop down under it (#tsearchres, the same list the job page's box had). On a phone it's the first thing in ☰. */
.topsearch { position: relative; display: flex; align-items: center; flex: 0 1 240px; min-width: 120px; margin: 0 6px; }
.topsearch .tsicon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #cfe0d5; pointer-events: none; }
.topsearch input#tsearch { width: 100%; min-width: 0; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 6px 52px 6px 32px; font: inherit; font-size: 14px; outline: none; }
.topsearch input#tsearch::placeholder { color: #cfe0d5; opacity: 1; }
.topsearch input#tsearch::-webkit-search-cancel-button { display: none; }
.topsearch input#tsearch:focus { background: #fff; color: #1d2a22; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,225,0,.35); }
.topsearch input#tsearch:focus::placeholder { color: #7a867e; }
.topsearch:focus-within .tsicon { color: #2f7d4f; }
.topsearch .tskbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; font: inherit; font-size: 11px; line-height: 1; color: #cfe0d5; border: 1px solid rgba(255,255,255,.3); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; white-space: nowrap; }
.topsearch input#tsearch:focus ~ .tskbd { opacity: 0; }
.topsearch #tsearchres { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 460px; min-width: 0; max-width: calc(100vw - 24px); z-index: 60; color: #1d2a22; text-align: left; }
@media (min-width: 1400px) { .topsearch { flex-basis: 300px; } }
/* Top bar in three groups (Rick, Nov 16): LEFT logo · My day · Tasks · Messages · Approvals, CENTER Projects · Search · Calendar
   (the box in the middle of the bar), RIGHT Service · Directory · Admin · Sales · Financials · 📞 Dialpad · profile. The center
   column gives way first: the box shrinks (down to 120px) before anything else moves. The center can't scroll sideways: the
   results drop down out of it. */
.top nav.topc { align-items: center; justify-content: center; overflow: visible; }
/* Mid-size screens (laptops): tighter links and the box loses its Ctrl K hint, so the three groups still fit on one line.
   Staff only (the box is shown); the portals' bar stays as it was. */
@media (min-width: 761px) and (max-width: 1400px) {
  .top:has(#topsearch:not([hidden])) { gap: 8px; padding: 6px 10px; }
  .top:has(#topsearch:not([hidden])) :is(.topl, .topr) { gap: 4px; }
  .top:has(#topsearch:not([hidden])) :is(nav a, .tdd-btn, .taskbtn) { padding: 5px 6px; font-size: 13.5px; }
  .top:has(#topsearch:not([hidden])) .brand img.logo { height: 30px; padding: 2px 2px; }
  .topsearch .tskbd { display: none; } .topsearch input#tsearch { padding-right: 8px; font-size: 13px; }
  .topsearch:focus-within { flex-basis: 260px; min-width: 200px; }
}
/* Narrower (761–1250px), where the three groups can't share one line: the daily buttons and the other pages stay on the
   first line, Projects · Search · Calendar get a second line of their own, centered, with a wider box. Staff only (the box is shown): the portals' few links keep their one line. */
@media (min-width: 761px) and (max-width: 1250px) {
  .top:has(#topsearch:not([hidden])) { grid-template-columns: max-content minmax(0, 1fr) minmax(0, max-content); grid-template-areas: "l . r" "c c c"; row-gap: 2px; }
  .top:has(#topsearch:not([hidden])) > .topl { grid-area: l; } .top:has(#topsearch:not([hidden])) > nav.topc { grid-area: c; } .top:has(#topsearch:not([hidden])) > .topr { grid-area: r; }
  .topsearch { flex-basis: 320px; } .topsearch:focus-within { flex-basis: 360px; }
  .top nav.navr { overflow-x: auto; }   /* last resort on the narrowest tablets: the page links scroll, nothing overlaps */
}
@media (min-width: 761px) and (max-width: 1000px) { .top .tdd-btn .dpword { display: none; } }   /* 📞 alone; same menu */
@media (max-width: 760px) {
  /* ☰: Search first, then My day · Tasks · Messages · Approvals, then Projects · Calendar, then the rest, 📞 Dialpad and profile. */
  /* Staff: the center nav's items join the menu one by one, so Search can lead it. The portals' nav stays one block, as it was. */
  .top:has(#topsearch:not([hidden])) { row-gap: 2px; }
  body.navopen .top:has(#topsearch:not([hidden])) > nav.topc:not([hidden]) { display: contents; }
  .top nav.topc > a { order: 5; width: 100%; }
  .top nav.topc > .topsearch { order: 3; }
  .topl .topbtns { order: 4; }
  .top .topr { order: 6; }
  .top nav.navr { justify-content: flex-start; order: 0; }   /* in ☰: Service … Financials, then 📞 Dialpad, then the profile */
  .top nav a.staff-only, .top nav a.admin-only, .top .tdd-btn { padding: 10px 12px; font-size: 17px; }   /* staff ☰ lines the same size as My day, Tasks… (portals as they were) */
  .topsearch { flex: none; width: 100%; margin: 4px 0 2px; }   /* first in ☰, above My day, Tasks, Messages… */
  .topsearch input#tsearch { font-size: 16px; padding: 9px 12px 9px 34px; }   /* 16px: no zoom-in on iPhone */
  .topsearch .tskbd { display: none; }
  .topsearch #tsearchres { left: 0; transform: none; width: 100%; max-height: 60vh; }
}
.msg-row .row { flex-wrap: nowrap; min-width: 0; } .msg-row .row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .msg-row .row .muted { flex: none; }
/* Serial number scanner (public/serialscan.js) and the installer job's Serial numbers card. */
.ss-scan { position: fixed; inset: 0; z-index: 9999; background: #111; color: #fff; display: flex; flex-direction: column; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
.ss-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 18px; }
.ss-x { background: none; border: 0; color: #fff; font-size: 26px; padding: 4px 8px; }
.ss-cam { position: relative; margin: 10px 0; border-radius: 12px; overflow: hidden; background: #000; }
.ss-cam video { display: block; width: 100%; max-height: 52vh; object-fit: cover; }
.ss-aim { position: absolute; left: 10%; right: 10%; top: 35%; bottom: 35%; border: 3px solid #4ade80; border-radius: 8px; pointer-events: none; }
.ss-msg { margin: 4px 0 8px; color: #ddd; }
.ss-pick { margin: 8px 0 4px; font-weight: 600; }
.ss-code { display: block; width: 100%; margin: 6px 0; padding: 14px; font-size: 18px; font-family: ui-monospace, monospace; text-align: left; background: #fff; color: #111; border: 0; border-radius: 10px; }
.ss-bot { margin-top: auto; padding-top: 10px; }
.ss-photo { display: block; text-align: center; padding: 14px; border: 1px solid #666; border-radius: 10px; cursor: pointer; }
.ip-serial { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.ip-serial input, .ip-serial textarea { flex: 1; min-width: 0; font-size: 17px; font-family: ui-monospace, monospace; }
.ip-serial:has(textarea) { align-items: flex-start; }   /* panels: a list, the Scan button at its top */
.ip-serial button { white-space: nowrap; }

/* Pipeline › Materials (public/materialspage.js) */
.matlist td.matok { color: var(--brand); }
.matlist td.matno { color: var(--bad); }
.matlist tr.matred td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.matlist .matlbl { display: none; }
@media (max-width: 760px) {   /* phone: each row is a card (table.list), so each step says what it is */
  .matlist .matlbl { display: inline; color: var(--muted); font-size: 12px; }
  .matlist tr.matred { border-left: 4px solid var(--bad); }
  .matlist tr.matred td:first-child { box-shadow: none; }
}

/* Weekly Pipeline (Oct 29): quick filters, Waiting on, SGIP update, question / duplicate chips */
.wp-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.wp-fchip { border: 1px solid #d5ddd8; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.wp-fchip span { font-weight: 800; margin-left: 3px; } .wp-fchip.on { background: #1f6b3a; color: #fff; border-color: #1f6b3a; } .wp-fchip.clear { border-style: dashed; }
.wp-fchip.w-ask:not(.on) { border-color: #e0a100; background: #fff8e1; } .wp-fchip.w-dup:not(.on) { border-color: #c77; background: #fff1f1; }
.wp-wait { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #eef3ff; color: #24557f; margin: 0 4px; }
.wp-wait.w-sl { background: #e7f5ec; color: #1f6b3a; } .wp-wait.w-out { background: #f1f1f1; color: #555; } .wp-wait.w-ho { background: #f3ecff; color: #5b3d99; } .wp-wait.w-dl { background: #fff4e0; color: #8a5a00; }
.wp-sgip { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid #c9dcf0; background: #f3f8fd; border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.wp-sgipt { white-space: pre-wrap; } @media (max-width: 700px) { .wp-sgip { grid-template-columns: 1fr; } }
.wp-askchip { background: #fff3cd; color: #7a5600; border-radius: 6px; padding: 0 5px; font-weight: 700; } .wp-dupchip { background: #fde2e2; color: #9b2c2c; border-radius: 6px; padding: 0 5px; font-weight: 700; }
td.wp-status { min-width: 180px; max-width: 260px; white-space: normal !important; }

/* Weekly Pipeline, tidier (Rick, Oct 29): slim header, extra actions under ⋯ More, sheet tabs in one picker, columns in one menu */
.wp-tidy .ip-hero { padding: 10px 16px; align-items: center; } .wp-tidy .ip-hero h1 { font-size: 22px; margin: 0; }
.wp-tidy .ip-hero .ip-sub { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.wp-tidy .wp-hbtns { flex-wrap: nowrap; align-items: center; }
.wp-more { position: relative; } .wp-more > summary { list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.wp-more > summary::-webkit-details-marker { display: none; }
.wp-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; display: grid; gap: 4px; min-width: 230px; background: #fff; border: 1px solid #d5ddd8; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.18); padding: 6px; }
.wp-menu button { text-align: left; width: 100%; background: #fff; color: #1d2a22; border: 0; padding: 8px 10px; border-radius: 6px; font-weight: 600; font-size: 14px; } .wp-menu button:hover { background: #eef5f0; }
.wp-sheetpick { max-width: 200px; } .wp-sheetpick.on { border-color: #1f6b3a; font-weight: 700; }
.wp-colpick { position: relative; } .wp-colpick > summary { cursor: pointer; list-style: none; padding: 3px 10px; border: 1px solid #d5ddd8; border-radius: 8px; font-size: 12.5px; }
.wp-colpick > summary::-webkit-details-marker { display: none; }
.wp-colmenu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; display: flex; flex-wrap: wrap; gap: 6px; width: min(560px, 90vw); background: #fff; border: 1px solid #d5ddd8; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.15); padding: 8px; }
.wp-money.on { background: #fff4e0; border-color: #e0a100; }
td.wp-status .wp-next { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-waitbtn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.wp-waitpick { display: flex; flex-wrap: wrap; gap: 6px; } .wp-waitpick button.on { background: #1f6b3a; color: #fff; }

/* Admin › Weekly Pipeline import (Oct 29): the preview says plainly that Import is still to do */
.pi-step { background: #fff8e1; border: 1px solid #e0a100; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.pi-go { font-size: 16px; padding: 8px 16px; }
/* Weekly Pipeline Permit column (Oct 29) */
.wp-permit { display: inline-block; border-radius: 6px; padding: 0 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.wp-permit.ok { background: #e7f5ec; color: #1f6b3a; } .wp-permit.sub { background: #f1f1f1; color: #555; font-weight: 600; } .wp-permit.fix { background: #fff4e0; color: #8a5a00; }
.wp-colone { flex-basis: 100%; border-top: 1px solid #e6ebe8; padding-top: 6px; } .wp-colone > div { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; } .wp-colone label { font-size: 13px; }
.wp-mail { background: #fff8e1; border: 1px solid #f0d27a; border-radius: 8px; padding: 6px 10px; margin: 6px 0; } .wp-mail input[type=email] { padding: 3px 6px; }
/* Dealer Job history and shared notes (Oct 29) */
.dp-hist { display: grid; grid-template-columns: 96px 20px 1fr; gap: 6px; padding: 6px 0; border-bottom: 1px solid #eef1ee; } .dp-hd { color: #555; font-size: 12.5px; } .dp-hi { text-align: center; }
.dp-hist.k-status .dp-ht { color: #1f6b3a; } .dp-hist.k-note { background: #f7fbf8; }
.noteshare { font-size: 12px; } .noteshare.on { background: #e7f5ec; color: #1f6b3a; border-color: #9fd3b0; }
.wp-bulk { max-height: 50vh; overflow: auto; border: 1px solid #e6ebe8; border-radius: 8px; } .wp-bulkrow { display: block; padding: 6px 10px; border-bottom: 1px solid #f0f2f0; cursor: pointer; } .wp-bulkrow:hover { background: #f7fbf8; }
/* Warranty claim steps on a service ticket (public/service.js) */
.claimsteps { display: flex; flex-wrap: wrap; gap: 6px; }
.claimsteps button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px; font-size: 13px; }
.claimsteps button.done { background: #eef6ef; }
.claimsteps button.on { background: var(--brand, #0b6e4f); color: #fff; border-color: transparent; }
.claimsteps button.on .muted { color: #e6f2ec; }
.calitem .wx { font-size: 11px; }
/* Saved filters (public/savedfilters.js) */
.svmenu { min-width: 240px; }
.svrow { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.svrow .svpick { text-align: left; flex: 1; }
.svfoot { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
/* Global search, Ctrl+K (public/globalsearch.js): the project search's look, in a box at the top of the screen */
.gsearch { padding-top: 10vh; }
.gsbox { width: min(640px, 100%); padding: 12px; }
.gsin { font-size: 16px; padding: 10px 12px; }
.gsres { margin-top: 8px; max-height: 60vh; overflow: auto; }
.gsres .pjhead { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #7a867e; padding: 8px 10px 4px; }
.gsres a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #1d2a22; text-decoration: none; }
.gsres a:hover, .gsres a.on { background: #eef5f0; }
.gsres .pjmain { flex: 1; min-width: 0; display: grid; }
.gsres .pjmain b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsres .pjsub { font-size: 12px; color: #6b7a70; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsres .pjstage { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #dcefe2; color: #2f7d4f; white-space: nowrap; text-transform: capitalize; }
.gsres .pjmsg { padding: 12px 10px; color: #6b7a70; }
.gsbox .pjfoot { display: flex; gap: 10px; font-size: 11px; color: #7a867e; padding: 8px 10px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.gsbox kbd { font: inherit; font-size: 11px; background: #fff; border: 1px solid #d6dfd9; border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; }

/* Done by implication / marked (Rick, Nov 1; public/implied.js, public/stepmenu.js): grey "✓ done (no date)", never gold or orange. */
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub) .rf-step.done.implied, :is(#syshub, #mpuhub) .sy-step.done.implied { background: #eef0ef; border-color: #e0e4e2; border-style: solid; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub) .rf-step.done.implied b, :is(#syshub, #mpuhub) .sy-step.done.implied b { color: #5d6b62; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub) .rf-step.done.implied b::before, :is(#syshub, #mpuhub) .sy-step.done.implied b::before { color: #8a958f; }
:is(#roofhub, #permithub, #insthub, #ichub, #ptohub) .rf-step, :is(#syshub, #mpuhub) .sy-step { position: relative; }
.stm { position: absolute; top: 1px; right: 2px; padding: 0 4px; border-radius: 4px; font-size: 10px; line-height: 16px; color: #8a958f; cursor: pointer; }
.stm:hover { background: rgba(0,0,0,.08); color: var(--ink); }
#onbhub .ob-step .stm { position: static; margin-left: -2px; }
#onbhub .ob-step .dot.imp { background: #b7bfba; }
.rf-step.flash, .sy-step.flash, .ob-step.flash { outline: 2px solid var(--brand); outline-offset: 2px; }
.stm-menu { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.14); padding: 4px; min-width: 170px; display: flex; flex-direction: column; }
.stm-menu .stm-h { font-size: 11px; color: var(--muted); padding: 4px 8px 2px; font-weight: 600; }
.stm-menu button { all: unset; cursor: pointer; padding: 6px 8px; border-radius: 5px; font-size: 13px; }
.stm-menu button:hover, .stm-menu button:focus-visible { background: #eef6f0; }
.stcatch { margin-left: 10px; font-size: 12px; }
/* Permit › Fire: Not needed / Waiting / Approved */
#permithub .pm-fire { display: flex; align-items: center; gap: 4px; margin-top: 5px; white-space: nowrap; flex-wrap: wrap; cursor: default; }
#permithub .pm-fb { all: unset; cursor: pointer; color: #15241b; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(47,125,79,.3); font-size: 11.5px; background: rgba(255,255,255,.7); }
#permithub .pm-fb:hover { background: #fff; }
#permithub .pm-fb.on { background: var(--brand); color: #fff; border-color: var(--brand); }
#permithub .pm-fb:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
/* Status card: What's left */
.statuscard .sc-left { font-size: 13px; color: #5d6b62; }
.statuscard .sc-left .sc-wl { font-weight: 600; }
.statuscard .sc-wlmore { display: inline; } .statuscard .sc-wlmore summary { display: inline; cursor: pointer; color: var(--brand); }
.statuscard .sc-catch { margin-left: 8px; font-size: 12px; padding: 2px 9px; }
.stagebar .sb-date.implied i { color: #6f7b74; }

/* New project layout (public/layout2.js, test site only until Rick approves) */
body.layout2 .sc-tray { position: relative; }
body.layout2 .l2-menu { position: absolute; right: 0; top: 100%; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.14); padding: 4px; display: flex; flex-direction: column; min-width: 220px; }
body.layout2 .l2-menu button { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 5px; font-size: 13px; }
body.layout2 .l2-menu button:hover { background: #eef6f0; }
body.layout2 .l2-quotes { margin-bottom: 8px; }
.sy-bonote { font-weight: 400; color: var(--muted); font-size: 12px; }
body.layout2 .tabs.ptray #psendc.l2-sendc { flex: 0 0 auto; margin-left: 10px; background: #fff7d6; border-color: #c9a227; font-weight: 600; }
body.layout2 .tabs.ptray #psendc.l2-sendc:hover { background: #ffefb0; }
/* The tab row and Send contract share one line (Rick, Nov 3): Send contract over the right column, above Open tasks. */
body.layout2 .l2-tabline { display: flex; gap: 10px; align-items: stretch; margin-bottom: 12px; }
body.layout2 .l2-tabline > .tabs.ptray { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
body.layout2 .l2-tabline > #psendc.l2-sendc { flex: 0 0 auto; background: #fff7d6; border: 1px solid #c9a227; border-radius: 9px; font-weight: 600; font-size: 14.5px; padding: 7px 12px; white-space: nowrap; }
body.layout2 .l2-tabline > #psendc.l2-sendc:hover { background: #ffefb0; }
body.layout2 .row.secbar[hidden] { display: none; }
/* New layout: the right column stays a narrow column of buttons (also while Utility & PTO is open); a panel opens large on the right. */
@media (min-width: 1001px) {
  body.layout2 .pgrid, body.layout2 .pgrid.pwide { grid-template-columns: minmax(0, 1fr) 190px; }
  /* Send contract over the right column: the same columns and gap as .pgrid below. */
  body.layout2 .l2-tabline { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px; }
  body.layout2 .l2-tabline > #psendc.l2-sendc { width: 100%; justify-content: center; align-self: start; min-height: 46px; }
  body.layout2 .l2-tabline > .tabs.ptray { gap: 4px; flex-wrap: wrap; overflow-x: visible; }   /* too many to fit: a second line, never a hidden tab */ body.layout2 .l2-tabline > .tabs.ptray button { padding: 7px 9px; }
  body.layout2 .pgrid > .side.l2-side > .sidechips { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 8px; gap: 6px; }
  body.layout2 .pgrid > .side.l2-side > .sidechips button { width: 100%; justify-content: space-between; white-space: normal; text-align: left; }
  body.layout2 .pgrid > .side.l2-side > .panel:not([hidden]) { position: fixed; z-index: 40; top: 110px; right: 222px; max-height: calc(100vh - 100px); width: min(760px, calc(100vw - 280px)); max-height: calc(100vh - 130px);
    overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; background: #fff; padding-top: 12px; font-size: 14.5px; }
}
body.layout2 .side .l2-close { all: unset; cursor: pointer; float: right; font-size: 22px; line-height: 1; padding: 0 6px; color: #5d6b62; border-radius: 6px; position: sticky; top: 0; }
body.layout2 .side .l2-close:hover { background: #eef3ef; color: var(--ink); }
body:not(.layout2) .side .l2-close { display: none; }

body.jobmode.layout2 .pgrid > .side.l2-side { position: sticky; top: calc(var(--toph, 52px) + var(--pstickh, 0px) + 8px); }   /* Job view only: the button column stays in view while scrolling */

/* Job view (test site only, public/jobview.js) */
body.jobmode .jp-hidden { display: none !important; }
body.jobmode .stagebar .jp-stage { cursor: pointer; } body.jobmode .stagebar .jp-stage:hover { text-decoration: underline; }
body.jobmode .stagebar .jp-stage.jp-on { box-shadow: inset 0 -4px 0 #e0a800; }
.jp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .jp-h h2 { margin: 0; font-size: 16px; }
.jp-mut { color: #7a877f; font-size: 12.5px; font-weight: 400; font-style: normal; }
.jp-seg { display: flex; gap: 6px; margin-bottom: 12px; } .jp-seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.jp-filt { display: flex; gap: 4px; } .jp-filt button { all: unset; cursor: pointer; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid #c9d6cd; }
.jp-filt button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.jp-items { max-height: 520px; overflow: auto; }
.jp-item { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f0f3f1; }
.jp-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #eef3ef; display: grid; place-items: center; font-size: 12px; }
.jp-note .jp-ic { background: #fff3c4; } .jp-email .jp-ic { background: #e3eefc; } .jp-stage .jp-ic { background: #dcefe2; }
.jp-when { font-size: 11.5px; color: #7a877f; } .jp-txt { font-size: 13.5px; overflow-wrap: anywhere; }
.jp-copy { all: unset; cursor: pointer; font-size: 11.5px; color: var(--brand); }
.jp-foot { text-align: center; }
/* Job view, redesign (test site only): timeline | work area */
body.jobmode .stagebar { display: none; }
.jp2 { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; color: #1d2a22; }
.j2 { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 12px; align-items: start; }
.j2-tl { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; position: sticky; top: calc(var(--toph, 52px) + var(--pstickh, 0px) + 8px); max-height: calc(100vh - var(--toph, 52px) - var(--pstickh, 0px) - 16px); overflow: auto; }   /* fits under the sticky header, so its bottom is never off screen */
.j2-st { position: relative; }
.j2-st:not(:last-child)::before { content: ''; position: absolute; left: 19px; top: 30px; bottom: -6px; width: 2px; background: #dfe6e1; }
.j2-st.past:not(:last-child)::before { background: #9fd1b2; }
.j2-sth { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 24px 1fr; gap: 0 10px; width: 100%; padding: 6px 8px; border-radius: 10px; position: relative; }
.j2-sth:hover { background: #f3f7f4; }
.j2-dot { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c3cec7; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; z-index: 1; }
.j2-st.past .j2-dot { background: #2f9a5a; border-color: #2f9a5a; } .j2-st.now .j2-dot { background: #2f7d4f; border-color: #2f7d4f; box-shadow: 0 0 0 4px rgba(47,125,79,.18); }
.j2-stn { font-weight: 700; font-size: 14px; } .j2-std { font-size: 12px; color: #5d6b62; }
.j2-st.now .j2-stn { color: #1f5c3a; } .j2-st.future .j2-stn { color: #6b7a70; font-weight: 600; }
.j2-st.on > .j2-sth { background: #eef6f0; }
.j2-mss { margin: 2px 0 6px 34px; display: flex; flex-direction: column; gap: 2px; }
.j2-car { font-style: normal; font-size: 11px; color: #6b7a70; margin-left: 6px; font-weight: 600; }
.j2-ms { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 9px; border: 1px solid transparent; }
.j2-ms:hover { background: #f3f7f4; } .j2-ms.next { background: #fff7dc; } .j2-ms.sel { border-color: var(--brand); background: #fff; box-shadow: 0 1px 4px rgba(47,125,79,.18); }
.j2-ms b { display: block; font-size: 13px; } .j2-ms small { font-size: 11.5px; color: #6b7a70; }
.j2-box { flex: none; width: 17px; height: 17px; border-radius: 5px; border: 2px solid #c3cec7; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.j2-ms.done .j2-box { background: #2f9a5a; border-color: #2f9a5a; } .j2-ms.implied .j2-box, .j2-ms.na .j2-box { background: #b7c1bb; border-color: #b7c1bb; } .j2-ms.next .j2-box { border-color: #d9a441; }
.j2-work { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-height: 420px; }
.j2-wh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid #edf1ee; padding-bottom: 12px; margin-bottom: 12px; }
.j2-wt { font-size: 20px; font-weight: 700; } .j2-wm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: #4d5b53; }
.j2-pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; } .j2-pill.ok { background: #dcefe2; color: #1f6b3a; } .j2-pill.grey { background: #eceff0; color: #5d6b62; }
.j2-pill.next { background: #fff0c2; color: #8a5a00; } .j2-pill.open { background: #fdf3e2; color: #8a5300; }
.j2-owner { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; } .j2-owner i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; background: #2f7d4f; color: #fff; display: grid; place-items: center; font-size: 12px; }
.j2-reqh { font-size: 13px; font-weight: 700; color: #5d6b62; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.j2-reqs { display: flex; flex-direction: column; }
.j2-req { display: grid; grid-template-columns: 26px minmax(160px, 260px) minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid #f0f3f1; }
.j2-ric { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.j2-req.met .j2-ric { background: #2f9a5a; color: #fff; } .j2-req.need .j2-ric { background: #fff0c2; color: #8a5a00; border: 1px solid #e6c46a; } .j2-req.opt .j2-ric { background: #eef1ef; color: #8a958f; }
.j2-rl b { font-size: 14px; display: block; } .j2-rl small { font-size: 11.5px; color: #8a958f; }
.j2-ctl input, .j2-ctl select { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid #c9d6cd; border-radius: 9px; background: #fff; max-width: 340px; width: 100%; box-sizing: border-box; }
.j2-files { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; } .j2-files a { color: #1f5c3a; text-decoration: none; } .j2-files a:hover { text-decoration: underline; }
.j2-up { all: unset; cursor: pointer; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px dashed #8fb79d; color: #1f5c3a; }
.j2-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.j2-acts > button:not(.linkbtn) { all: unset; cursor: pointer; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid #c9d6cd; background: #fff; } .j2-acts > button:not(.linkbtn):hover { background: #e7f2ea; }
/* ✉ Write email: white on green (Rick, Nov 19: dark pills and buttons never with black lettering). The rule above unsets every
   property (all: unset) and is more specific, so this one names the button the same way plus [data-j2mail] to win the color too. */
.j2-acts > button[data-j2mail]:not(.linkbtn), .j2-acts > button[data-j2mail]:not(.linkbtn):hover { background: #2f7d4f; color: #fff; border-color: #2f7d4f; font-weight: 600; }
.j2-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid #edf1ee; padding-top: 12px; }
.j2-two h3 { margin: 0 0 6px; font-size: 14px; }
.j2-task { padding: 6px 0; border-bottom: 1px solid #f3f5f4; font-size: 13.5px; } .j2-task b { display: block; font-weight: 600; } .j2-task span { font-size: 12px; }
.j2-late { color: #c0392b; font-weight: 700; }
.j2-note { padding: 6px 0; border-bottom: 1px solid #f3f5f4; font-size: 13px; }
.j2-addnote { display: flex; gap: 6px; margin-top: 8px; } .j2-addnote textarea { flex: 1; min-height: 40px; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #c9d6cd; border-radius: 9px; }
.j2-addnote button { all: unset; cursor: pointer; align-self: flex-end; padding: 6px 12px; border-radius: 999px; background: #2f7d4f; color: #fff; font-size: 13px; }
@media (max-width: 1100px) { .j2-low, .j2-two { grid-template-columns: minmax(0, 1fr); } .j2-req { grid-template-columns: 26px 1fr; } .j2-req .j2-ctl { grid-column: 2; } }
/* Laptops (Rick, Nov 10): the timeline stays beside the work area and in view while the middle scrolls, down to the same 1001px where the
   right button column stays. A slimmer timeline from 1001 to 1100px; one column, timeline on top, only below that. */
@media (min-width: 1001px) and (max-width: 1100px) { .j2 { grid-template-columns: 230px minmax(0, 1fr); } .j2 .wcx-steps button { white-space: normal; line-height: 1.2; } .j2 .ptopacket .icgrid { column-count: 1; } }
@media (max-width: 1000px) { .j2 { grid-template-columns: minmax(0, 1fr); } .j2-tl { position: static; max-height: none; } }
.j2-next { background: #fff7dc; border: 1px solid #f0d38a; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; } .j2-next.j2-gap { background: #f4f6f5; border-color: #dfe5e1; }
.j2-tracks { border-top: 1px solid #edf1ee; margin-top: 8px; padding-top: 8px; } .j2-trh { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: #6b7a70; font-weight: 700; margin: 0 8px 4px; }
.j2-tr { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; width: 100%; padding: 5px 8px; border-radius: 8px; font-size: 13px; }
.j2-tr:hover { background: #f3f7f4; } .j2-tr span { color: #b0b9b4; font-weight: 800; } .j2-tr.ok span { color: #2f9a5a; } .j2-tr i { font-style: normal; font-size: 12px; color: #6b7a70; }
.j2-owner span small { display: block; font-size: 11px; font-weight: 400; color: #6b7a70; }
/* Phone (in the field): one column, the timeline as a short list on top, roomy touch targets */
@media (max-width: 700px) {
  .j2-work { padding: 12px; min-height: 0; } .j2-wt { font-size: 17px; }
  .j2-req { grid-template-columns: 26px 1fr; gap: 6px 10px; } .j2-req .j2-ctl { grid-column: 1 / -1; }
  .j2-ctl input, .j2-ctl select { max-width: none; font-size: 16px; padding: 9px 10px; }
  .j2-acts > button:not(.linkbtn) { padding: 9px 14px; }
  .j2-tl .j2-st:not(.on):not(.now) .j2-std { display: none; }
}
.j2-imp { background: #f1f4f8; border: 1px solid #d6dde8; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 13.5px; color: #3c4a5a; }
.j2-ms.unknown .j2-box { border-style: dashed; color: #8a958f; }

.j2-hold { background: #eef2f8; border: 1px solid #c9d4e6; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: #2d4a6b; }
.j2-lic { border: 1px solid #dfe5e1; background: #f4f6f5; border-radius: 10px; padding: 7px 12px; margin-bottom: 12px; font-size: 14px; color: #33413a; }
.j2-lic a { margin-left: 8px; white-space: nowrap; } .j2-lic.grey { color: #6b7570; } .j2-lic.ok { background: #eef7f1; border-color: #c7e3d1; }
.j2-lic.warn { background: #fff7dc; border-color: #f0d38a; color: #7a5600; } .j2-lic.bad { background: #fdecec; border-color: #f2b8b8; color: #a12626; }
/* The Portal login box on Permit / Interconnection / PTO (public/jobportal.js; Jordan, Rick's yes Nov 21). */
.j2-plog { border: 1px solid #dfe5e1; background: #fbfcfb; border-radius: 10px; padding: 7px 12px; margin-bottom: 12px; font-size: 14px; color: #33413a; }
.j2-plog summary { cursor: pointer; } .j2-plrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-top: 4px; }
.j2-plrow > span:first-child { min-width: 80px; color: #6b7570; } .j2-plrow b, .j2-plpw { overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; }
.j2-plcard { margin-top: 4px; } .j2-plcomp { border-top: 1px solid #e6ebe8; margin-top: 8px; padding-top: 6px; } .j2-plcomp a { margin-left: 6px; white-space: nowrap; }
.j2-plwarn { color: #7a5600; } .j2-plbad { color: #a12626; }
.j2-reason { background: #f6f7f6; border: 1px solid #e3e7e4; border-radius: 10px; padding: 6px 12px; margin-bottom: 12px; font-size: 13px; color: #4d5b53; }
.j2-ms.notyet .j2-box { border-style: dotted; }
@media (max-width: 700px) { .j2-box { width: 22px; height: 22px; font-size: 13px; } .j2-ms { padding: 9px 8px; } }
.j2-modal { position: fixed; inset: 0; z-index: 80; background: rgba(20,30,25,.38); display: grid; place-items: center; padding: 20px; }
.j2-mbox { position: relative; background: #fff; border-radius: 16px; width: min(820px, 100%); max-height: calc(100vh - 60px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 8px 6px 14px; }
.j2-mx { all: unset; cursor: pointer; position: absolute; top: 10px; right: 14px; font-size: 24px; color: #5d6b62; padding: 0 6px; border-radius: 6px; } .j2-mx:hover { background: #eef3ef; }
.j2-sfacts { margin: 14px 0 4px; border: 1px solid #e3e9e5; border-radius: 12px; background: #fafcfb; } .j2-sfacts > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.j2-sfg { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; padding: 0 14px 12px; }
.j2-sf { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #eef2ef; font-size: 13.5px; } .j2-sf span { flex: none; width: 96px; color: #6b7a70; font-size: 12.5px; } .j2-sf b { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.j2-ahj { background: #fff; border: 1px solid #e3e9e5; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; align-self: start; }
.j2-ahjl { display: flex; flex-wrap: wrap; gap: 6px 12px; } .j2-ahjl a { color: #1f5c3a; font-weight: 600; text-decoration: none; } .j2-ahjl a:hover { text-decoration: underline; }
.j2-ahjn { font-size: 12.5px; color: #5d6b62; background: #f6f8f7; border-radius: 8px; padding: 6px 8px; }
@media (max-width: 900px) { .j2-sfg { grid-template-columns: minmax(0, 1fr); } }
/* Job view: a stage's own section in the work area */
.j2-embed { margin-top: 12px; }
.j2-embed #pform.j2-embedding > :not(.j2-on) { display: none !important; }
.j2-acts-sm { margin: 0 0 6px; gap: 6px; } .j2-acts-sm > button:not(.linkbtn) { font-size: 12.5px; padding: 4px 10px; }
.j2-more { border-top: 1px solid #edf1ee; margin-top: 8px; padding-top: 8px; } .j2-tr.on { background: #eef6f0; }
/* In the Job view the timeline lists the milestones: the embedded section's own step row (and its Close button) would repeat it. */
.j2-embed #pform.j2-embedding .rf-open, .j2-embed #pform.j2-embedding .sy-open, .j2-embed #pform.j2-embedding .ob-open { display: none !important; }
.j2-embed #pform.j2-embedding .rf-flow { padding-bottom: 6px; }
@media (max-width: 700px) { .j2-embed #pform.j2-embedding { margin: 0 -6px; } }

/* Job view, round 3 (Grok's review, Nov 2) */
.jp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .jp-h h2 { margin: 0; font-size: 16px; }
.jp-items { max-height: none; }
.j2-feed { padding: 6px 12px; }
.j2-wh { align-items: flex-start; } .j2-wht { flex: 1; min-width: 220px; }
.j2-hsub { font-size: 12.5px; color: #4d5b53; margin-top: 4px; }
.j2-wht .j2-stcatch { display: inline-block; margin: 4px 0 0; font-size: 12.5px; }   /* a section's "Mark earlier steps done" (jobview.js) */
.j2-hacts { margin: 8px 0 4px; }
.j2-flash { outline: 3px solid #e0a800; outline-offset: 3px; border-radius: 8px; transition: outline-color .3s; }
.j2-paused b { color: #5d6b62; font-weight: 600; }
.j2-ms.next { background: #fff7dc; } .j2-ms.next .j2-box { border-color: #d9a441; } .j2-ms.na .j2-box { background: #b7c1bb; border-color: #b7c1bb; }
.j2-ms.unknown .j2-box { border-style: dashed; color: #8a958f; }
.tabs.ptray .jm-mon { flex: 0 0 auto; font-weight: 600; }   /* Monitoring, right after Service (Rick, Nov 4) */
.tabs.ptray .jm-mon span { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tabs.ptray .jm-mon.ok span { background: #dcf1e3; color: #1f6b3d; } .tabs.ptray .jm-mon.wait span { background: #fff1c2; color: #7a5a00; } .tabs.ptray .jm-mon.bad span { background: #fbdcdc; color: #a12626; }
.tabs.ptray .jm-mon.on span { background: #ffe100; color: #2f7d4f; }
/* The status card agrees with the Job view: one line (stage › sub stage, days, Change status) in its colors; the rest is below */
body.jobmode:not(.jm-scopen) .statuscard .sc-nextl, body.jobmode:not(.jm-scopen) .statuscard .sc-left, body.jobmode:not(.jm-scopen) .statuscard .sc-pace, body.jobmode:not(.jm-scopen) .statuscard .sc-blockers { display: none; }
.jm-scmore { display: none; } body.jobmode .statuscard .jm-scmore { display: inline; margin-left: 8px; font-size: 13px; }
body.jobmode .statuscard { padding-top: 8px; padding-bottom: 8px; }
/* An embedded section: its banner title and step row fold into the Job view header; its chips stay */
.j2-embed #pform.j2-embedding :is(.rf-hero .rf-id, .sy-hero .sy-id, .ob-hero .ob-id) { display: none !important; }
.j2-embed #pform.j2-embedding :is(.rf-hero, .sy-hero, .ob-hero) { background: transparent !important; padding: 0 0 8px !important; min-height: 0; display: block; }
.j2-embed #pform.j2-embedding :is(.rf-chips, .sy-chips, .ob-chips) { justify-self: start; display: flex; flex-wrap: wrap; gap: 6px; }
.j2-embed #pform.j2-embedding :is(.rf-chips, .sy-chips, .ob-chips) > * { width: auto; }   /* Welcome call too (Rick, Nov 2): its chips sit on one line beside Installer */
/* The section's workflow as one compact line at the top of its stage (Rick, Nov 2: like "Install workflow" on the Full page).
   Its steps scroll sideways on a narrow screen; a step still opens its field as on the Full page. */
.j2-embed #pform.j2-embedding .rf-flow { display: block !important; order: -1; border: 0; background: none; padding: 0 !important; margin: 0 0 10px; }
.j2-embed #pform.j2-embedding .rf-flowh { display: none; }
.j2-embed #pform.j2-embedding :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub):not(.collapsed) { display: flex; flex-direction: column; }
.j2-embed #pform.j2-embedding :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub):not(.collapsed) > .rf-body { display: contents; }
.j2-embed #pform.j2-embedding :is(#roofhub, #permithub, #insthub, #ichub, #ptohub, #monhub, #comhub):not(.collapsed) > .rf-body > .rf-cards { margin-top: 12px; }
.j2-embed #pform.j2-embedding .rf-steps { display: flex !important; flex-wrap: nowrap !important; gap: 3px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.j2-embed #pform.j2-embedding .rf-step { flex: 1 0 auto !important; padding: 3px 8px; border-radius: 6px; }
.j2-embed #pform.j2-embedding .rf-step b { font-size: 11.5px; font-weight: 600; }
.j2-embed #pform.j2-embedding .rf-step small { display: none; }
/* Phone: the test bar never covers the logo; bigger Copy targets; a shorter header before the work */
html.staging .top { top: 28px; }
@media (max-width: 700px) {
  html.staging body::before { content: 'TEST COPY'; }
  .jp-copy, .j2-sfacts .jp-copy { padding: 8px 10px; font-size: 13px; }
  body.jobmode .phead, body.jobmode .pline { margin: 4px 0; }
  body.jobmode .pinfo { gap: 4px; } body.jobmode .pinfo > span { padding: 2px 8px; }
  body.jobmode .alertbanner span { display: none; }
  /* Done buttons pinned to the bottom of the screen (Grok: sticky inside the work area didn't hold) */
  body.jobmode .j2-hacts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; margin: 0; gap: 6px; flex-wrap: nowrap; overflow-x: auto;
    padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); border-top: 1px solid #d9e1db; box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  body.jobmode .j2-hacts > button { flex: 1 0 auto; text-align: center; padding: 10px 12px !important; }
  body.jobmode .jp2 { padding-bottom: 76px; }
  body.jobmode .pgrid > .side { padding-bottom: 76px; }   /* the last row of side buttons (Links) stays above the pinned Done buttons (Rick, Nov 2) */
  /* The work area first, then the timeline ("All stages ↓" jumps to it) */
  .j2 { display: flex; flex-direction: column; } .j2-work { order: -1; } .j2-tojump { display: inline-block !important; }
  /* Embedded sections use the full width: no nested side padding, borders or indents */
  .j2-work { padding: 10px 8px; }
  .j2-embed #pform.j2-embedding :is(.rf-body, .rf-cards, .sy-body, .ob-body) { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
  .j2-embed #pform.j2-embedding :is(details.psec, .panel.section, .icpk, .ptcheck, .rf-card) { padding-left: 8px !important; padding-right: 8px !important; margin-left: 0 !important; margin-right: 0 !important; border-left-width: 2px !important; }
  .j2-embed #pform.j2-embedding label, .j2-embed #pform.j2-embedding .fblock { min-width: 0; }
  .j2-embed #pform.j2-embedding input, .j2-embed #pform.j2-embedding select { max-width: 100%; min-width: 0; }
  .j2-embed #pform.j2-embedding .fields { grid-template-columns: minmax(0, 1fr) !important; }
}

.j2-tojump { all: unset; display: none; cursor: pointer; font-size: 12.5px; color: var(--brand); margin-bottom: 6px; }
.j2-later { border: 1px dashed #d4dcd7; border-radius: 10px; padding: 8px 12px; color: #5d6b62; } .j2-later > summary { cursor: pointer; font-size: 13.5px; }
.j2-later[open] .j2-reqs { opacity: .75; margin-top: 8px; }
/* Job view: a stage the job hasn't reached says so on top (Rick, Nov 17); its section waits folded below. The SOW stage's box. */
.j2-notyet { background: #eef2f8; border: 1px solid #b9c7de; border-left: 5px solid #5b7bb0; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 15px; font-weight: 700; color: #24406a; }
.j2-later[data-j2ahead] > .j2-embed { margin-top: 8px; }
.j2-ms.missing { background: #fdecea; } .j2-ms.missing .j2-box { border-color: #c0392b; } .j2-ms.missing small { color: #a3352a; font-weight: 600; }
.j2-sowbox { border: 1px solid #dfe5e1; border-radius: 10px; padding: 10px 14px; background: #fff; } .j2-sowst { font-size: 15px; margin-bottom: 6px; } .j2-sowbox h3 { font-size: 14px; margin: 10px 0 4px; }
@media (max-width: 700px) { body.jobmode .pstick { position: static !important; } }   /* Job view on a phone: the project header scrolls away instead of covering half the screen */
/* Job view follow-ups (Grok, Nov 2): the pinned Done bar hides while a pop-up is open; dates in embedded sections show in full;
   the bar's buttons wrap instead of running off the edge */
body:has(.modal, .j2-modal, .stm-menu, .sc-menu, dialog[open]) .j2-hacts { display: none !important; }
@media (max-width: 700px) {
  body.jobmode .j2-hacts { flex-wrap: wrap; overflow-x: visible; }
  .j2-embed #pform.j2-embedding input[type="date"], .j2-ctl input[type="date"] { min-width: 10.5em; width: 100%; font-size: 16px; }
}
/* My work (public/mywork.js) */
.mw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .mw-head h2 { margin: 0; }
.mw-pick { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #5d6b62; } .mw-pick select { font: inherit; padding: 5px 10px; border-radius: 999px; border: 1px solid #c9d6cd; }
.mw-group { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: #fff; } .mw-group > summary { cursor: pointer; padding: 10px 14px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mw-group.mw-imp { background: #f7f9fb; }
.mw-row { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .8fr) minmax(0, 2fr) auto; gap: 6px 12px; align-items: center; padding: 8px 14px; border-top: 1px solid #f0f3f1; font-size: 13.5px; }
.mw-job { color: inherit; text-decoration: none; } .mw-job:hover b { text-decoration: underline; }
.mw-stage { color: #5d6b62; font-size: 12.5px; }
.mw-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.mw-step { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid #c9d6cd; color: #1f5c3a; text-decoration: none; background: #fff; } .mw-step.first { background: #fff3c4; border-color: #e6c46a; color: #5a4300; font-weight: 600; }
.mw-step:hover { background: #e7f2ea; } .mw-hold { font-size: 12px; color: #2d4a6b; } .mw-who { font-size: 12px; color: #7a877f; white-space: nowrap; }
.mw-none { padding: 4px 14px 10px; margin: 0; }
@media (max-width: 760px) { .mw-row { grid-template-columns: minmax(0, 1fr); } .mw-who { white-space: normal; } }
/* Photos link uploads waiting for staff (Rick, Nov 3): "To review" on the thumbnail until approved. */
.pv-review { position: absolute; right: 4px; bottom: 4px; z-index: 1; background: #fff4d9; color: #7a5600; border: 1px solid #f2c25c; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 0 6px; pointer-events: none; }
/* Site Survey photo package (Rick, Nov 3; public/surveypkg.js): slots 1–45, captions, N/A, x of y, Measurements. */
.sspkg { display: grid; gap: 8px; min-width: 0; }
.sp-top { display: grid; gap: 4px; }
.sp-top > div:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-prog { display: inline-block; width: 120px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.sp-prog i { display: block; height: 100%; background: #2f7d4f; }
.sp-x { font-variant-numeric: tabular-nums; }
.sp-missing ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.sp-group { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.sp-group > summary { display: flex; gap: 8px; align-items: center; padding: 8px 12px; cursor: pointer; }
.sp-cnt { margin-left: auto; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 99px; background: #fff4d9; color: #7a5600; font-variant-numeric: tabular-nums; }
.sp-cnt.ok { background: #dcefe2; color: #1d5a35; }
.sp-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; padding: 0 10px 10px; align-items: start; }   /* a card is as tall as its own photos, not its row's tallest (Nov 12) */
.sp-slot { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; min-width: 0; }
.sp-slot.miss { border-left: 3px solid #d9a21b; }
.sp-slot.ok { border-left: 3px solid #2f7d4f; }
.sp-flash { outline: 3px solid #2f7d4f; }
.sp-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.sp-head b { min-width: 0; overflow-wrap: anywhere; }
.sp-num { display: inline-block; min-width: 22px; text-align: center; font-size: 12px; border-radius: 6px; background: var(--line); padding: 0 4px; }
.sp-mark { width: 14px; color: #2f7d4f; font-weight: 700; }
.sp-tag { font-size: 11px; border-radius: 99px; padding: 0 7px; border: 1px solid var(--line); color: var(--muted); }
.sp-tag.r { border-color: #b9d8c4; color: #1d5a35; } .sp-tag.ia { border-color: #f2c25c; color: #7a5600; }
.sp-n { margin-left: auto; font-size: 12px; font-weight: 700; }
.sp-hint { font-size: 13px; color: var(--muted); }
.sp-na { font-size: 13px; background: #f1f3f0; border-radius: 6px; padding: 4px 8px; color: var(--ink); }
.sp-phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.sp-ph { display: grid; gap: 3px; min-width: 0; }
.sp-ph a { display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--line); }
.sp-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-file { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted); }
.sp-ph input { font-size: 12px; padding: 3px 5px; min-width: 0; width: 100%; }
.sp-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-btns button { padding: 8px 10px; }
.sp-measure > *:not(summary) { margin: 0 12px 10px; }
.sp-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.sp-mf { display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.sp-mf input, .sp-mf textarea { min-width: 0; width: 100%; }
.sp-req { color: #b42318; }
.sp-planes { overflow-x: auto; }
.sp-planes input { min-width: 70px; }
@media (max-width: 600px) { .sp-slots { grid-template-columns: 1fr; padding: 0 6px 8px; } .sp-mgrid { grid-template-columns: 1fr 1fr; } }

/* Monitoring › Jobs not reporting (Rick, Nov 3) */
.monjobs > summary { cursor: pointer; list-style: none; } .monjobs > summary::-webkit-details-marker { display: none; }
.monjobs .monsteps span { margin-right: 8px; white-space: nowrap; } .monjobs .monsteps .ok { color: #1f6b3d; }
/* Load calculation (public/loadcalcbox.js) */
.lcbox .lcline { line-height: 1.5; } .lcbox .lcbtns { margin-top: 4px; }
.lcform h3 { margin: 14px 0 6px; font-size: 14px; }
.lcform .lcgrid { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; margin-bottom: 6px; }
.lcform .lcgrid label { display: grid; gap: 2px; font-size: 13px; }
.lcform .lcgrid input[type=number] { width: 110px; }
.lcform .lcchk { display: flex !important; gap: 6px; align-items: center; }
.lcform .lcpeaks input { width: 80px; }
.lcform .lcapps { width: 100%; border-collapse: collapse; font-size: 13px; }
.lcform .lcapps th { text-align: left; font-weight: 600; padding: 2px 4px; }
.lcform .lcapps td { padding: 2px 4px; } .lcform .lcapps input { width: 100%; min-width: 60px; box-sizing: border-box; }
.lcform .lcquick { font-size: 13px; margin: 4px 0; }
.lcform .lcresult { margin: 14px 0 8px; padding: 8px 10px; border: 1px solid #dfe5df; border-radius: 8px; background: #fafcfa; }
.lcform .lcfoot { display: flex; gap: 8px; }
@media (max-width: 700px) { .lcform .lcapps thead { display: none; } .lcform .lcapps tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-bottom: 1px solid #e5e5e5; padding: 4px 0; } }
/* Typed answers on checklist items (Rick, Nov 4): Final › Inspection access and as-built changes. */
.pv-text textarea, .ip-txt textarea { width: 100%; min-width: 0; font: inherit; }
.ip-txt { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; }
.ip-txt textarea { flex: 1; }
/* Lender photo packages (Rick, Nov 4): job › Photos › 📦 Photo package. */
.lp-box { max-width: 760px; }
.lp-items td:first-child { width: 22px; text-align: center; }
.lp-items tr.lp-done td:first-child { color: #2f7d4f; }
.lp-items tr.lp-missing td:first-child, .lp-items tr.lp-block td:first-child { color: #b42318; }
.lp-items tr.lp-na { opacity: .6; }
/* Team chat (public/chat.js): the Chat page, a job's Chat tab and the portals' Chat page share these */
.chat-wrap .msg-list { max-height: 78vh; }
.chat-grp { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 12px 10px 4px; display: flex; gap: 8px; align-items: center; }
.chat-grp .linkbtn { text-transform: none; letter-spacing: 0; font-weight: 400; }
.msg-row.archived { opacity: .6; }
.chat-search { gap: 4px; margin: 8px 6px; flex-wrap: nowrap; } .chat-search input { flex: 1; min-width: 0; }
.chat-feed { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow: auto; margin: 8px 0; padding-right: 2px; }
#chattab .chat-feed { max-height: 55vh; }
.chat-msg { background: #f6f8f6; border-radius: 10px; padding: 7px 10px; font-size: 14px; margin-right: 40px; overflow-wrap: anywhere; }
.chat-msg.mine { background: #fffbea; margin: 0 0 0 40px; } .chat-msg.done { border-left: 3px solid #2e8b57; } .chat-msg.deleted { background: none; border: 1px dashed var(--line); }
.chat-msg .when { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; } .chat-donemark { color: #2e8b57; font-weight: 600; }
.chat-at { color: #1f6b3a; } .chat-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chat-img { max-width: 220px; max-height: 180px; border-radius: 6px; display: block; }
.chat-acts { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; margin-top: 3px; font-size: 12px; }
.chat-acts .linkbtn { padding: 0; opacity: .75; } .chat-acts .linkbtn:hover { opacity: 1; }
.chat-rx { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; line-height: 20px; cursor: pointer; } .chat-rx.on { background: #e6f2ea; border-color: #9cc8aa; }
.chat-rpick { display: inline-flex; gap: 4px; } .chat-rpick .linkbtn { font-size: 16px; opacity: 1; }
.chat-compose { position: relative; } .chat-row { gap: 6px; flex-wrap: nowrap; align-items: flex-end; } .chat-in { flex: 1; min-width: 0; min-height: 44px; resize: vertical; font-size: 16px; }
.chat-attach { font-size: 18px; padding: 6px 8px; } .chat-files { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.chat-pick { position: absolute; bottom: 100%; left: 40px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.12); display: flex; flex-direction: column; z-index: 20; min-width: 200px; }
.chat-pick button { text-align: left; border: 0; background: none; padding: 7px 12px; } .chat-pick button:first-child { background: #eef5f0; } .chat-pick button:hover { background: #eef5f0; }
.chat-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; margin: 8px 0 12px; max-height: 50vh; overflow: auto; }
.chat-unseen .msg-row { background: #fff6e0; } .chat-results { max-height: 60vh; overflow: auto; }
@media (max-width: 760px) {
  .chat-msg, .chat-msg.mine { margin: 0; } .chat-feed { max-height: 60vh; } .chat-img { max-width: 100%; }
  .chat-acts { gap: 6px 14px; font-size: 13px; } .chat-acts .linkbtn { padding: 4px 0; }   /* bigger targets on phones (installers) */
}

/* Photos tab: a photo on the website (public/webphoto.js) */
.pv-th .pv-web{position:absolute;left:4px;bottom:4px;font-size:13px;line-height:1;background:rgba(255,255,255,.9);border-radius:999px;padding:2px 4px;z-index:1}
/* Customer in the Project view (Rick, Nov 4: a section under More, no duplicates): the card's header (name, address, phone, email,
   dealer / financing / installer chips: all in the project header) and the homeowner's contact card are left out. The boxes for the
   homeowner's name, phone, email and address stay in Contract & contacts: the one place to change them (Rick, Nov 13). */
body.jobmode .jm-editho { margin-left: 6px; font-size: 12px; }
body.jobmode .j2-embed > #ctrcard { margin-bottom: 12px; }
/* A side track whose scope is No but whose section has data (public/scopedata.js): muted, never green. */
.j2-tr.j2-off { opacity: .72; } .j2-tr.j2-off b { font-weight: 500; font-style: italic; } .j2-tr.j2-off:hover, .j2-tr.j2-off.on { opacity: 1; }
body.jobmode .j2-embed #crmhub .ch-hero, body.jobmode .j2-embed #crmhub .ch-cts > .ch-ct:first-child { display: none; }
/* Blocked jobs in the Pipeline (Rick, Nov 5): the whole row is red so nobody works on it until it's unblocked (public/app.js blockedTitle) */
.pipetable tr.blocked > td, .pipetable.classic tr.crow.blocked:hover > td { background: #fde3e1; color: #7a1610; }
.pipetable tr.blocked:hover > td { background: #f9d0cc; }
.pipetable tr.blocked > td:first-child { box-shadow: inset 4px 0 0 var(--bad, #b42318); }
.pipetable tr.blocked a, .pipetable tr.blocked b { color: #8f1b13; }
.pipetable tr.blocked .muted, .pipetable tr.blocked .pnum, .pipetable tr.blocked .paddr { color: #a3423a; }
.pipetable tr.blocked + tr.blocked > td { border-top-color: #f3b8b2; }
@media (max-width: 760px) { .pipetable tr.blocked { background: #fde3e1; border-color: #e8958c; border-left: 4px solid var(--bad, #b42318); } .pipetable tr.blocked > td:first-child { box-shadow: none; } }
/* A blocked job's header (Rick, Nov 5): a red BLOCKED box like On Hold / Job in Jeopardy; the job stays editable */
.phead .alarm + .alarm-blocked { margin-left: 10px; }
/* Chat pop-ups (public/chat.js checkChatPopups): in the same stack as the other pop-ups */
.chatpop { border-left-color: #1f6b8a; } .chatpop-body { margin: 4px 0 2px; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
.chatpop-reply textarea { width: 100%; margin-top: 6px; font-size: 16px; min-height: 52px; }
/* My day sections (public/myday.js, public/mydayemail.js) */
.td-sec { margin: 12px 0; } .td-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .td-head h2 { margin: 0; flex: 1; } .td-head .count { font-size: 13px; color: var(--muted, #6b7280); font-weight: 400; }
.md-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }   /* My day's category buttons (public/mydaycats.js) */
.md-cat { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line, #d7dfda); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.md-cat .md-n { background: var(--chip, #e8efe9); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.md-cat.on { background: var(--brand, #1f7a3a); border-color: var(--brand, #1f7a3a); color: #fff; } .md-cat.on .md-n { background: rgba(255,255,255,.25); color: #fff; }
.md-cat.md-zero:not(.on) { color: var(--muted, #6b7280); opacity: .65; }
.md-email-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .md-email-row .muted { flex: 1; min-width: 180px; }   /* My day › Email (public/mydayemail.js) */
.td-group { border-top: 1px solid var(--line); padding: 6px 0; } .td-ghead { font-size: 14px; margin: 4px 0; }
.td-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 12px; align-items: center; padding: 6px 0; border-top: 1px solid #f0f3f1; font-size: 13.5px; }
.td-checks { margin: 6px 0; padding-left: 0; list-style: none; } .td-checks li { margin: 4px 0; }
.mw-rollup { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; } .mw-rollup .chip { cursor: default; }
.tk-bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fb; position: sticky; top: 0; z-index: 3; }
.tk-sel { margin-right: 6px; } .navbadge.stale { background: #9ca3af; }
.dc-table td, .dc-table th { font-size: 13px; }
@media (max-width: 640px) { .td-row { grid-template-columns: 1fr; } }

/* System & Design in four parts, MPU its own section (Rick, Nov 7; public/projhubs.js buildSystem / buildMpu) */
:is(#syshub, #mpuhub) .sy-grph em.ok { background: #dcefe2; color: #1d5a35; }
:is(#syshub, #mpuhub) .sy-grph em.warn { background: #fff3dc; color: var(--warn); }
:is(#syshub, #mpuhub) .sy-note { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
#syshub .sy-part { margin: 2px 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfa; }
#syshub .sy-part[hidden] { display: none; }
#syshub .sy-subh { font-size: 11.5px; }
#syshub .sy-scope { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
#syshub .sy-podio { margin-top: 10px; }
#mpuhub { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
#mpuhub .sy-av { background: #f2d38a; }
#mpuhub.off .sy-hero { background: rgba(93,107,98,.75); }
#mpuhub .sy-off { padding: 6px 4px; }
#mpuhub [data-sec="mpu"][hidden] { display: none; }
/* Podio & plan set check as tabs (public/designpodio.js) */
.dp-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 8px; flex-wrap: wrap; }
.dp-tabs button { all: unset; cursor: pointer; padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.dp-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.dp-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dp-tabs button[hidden] { display: none; }

/* Training (public/training.js): section tiles on one screen, search, a guide with a side list, and a clean printout. */
.tr-home { max-width: 1180px; }
.tr-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tr-top > div { flex: 1 1 220px; }
.tr-top input[type=search] { flex: 1 1 280px; max-width: 420px; width: auto; }
.tr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tr-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--panel); }
.tr-tile-h { font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tr-ico { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: var(--chip); font-size: 15px; flex: none; }
.tr-tile ul { list-style: none; margin: 0; padding: 0; }
.tr-tile li { padding: 4px 0 4px 36px; border-top: 1px solid var(--chip); line-height: 1.3; }
.tr-tile li:first-child { border-top: 0; }
.tr-tile a, .tr-side a, .tr-hit, .tr-pn a { color: inherit; text-decoration: none; }
.tr-tile a { color: var(--brand); }
.tr-tile a:hover { text-decoration: underline; }
.tr-page > .row h2 { font-size: 22px; }
.tr-vid { color: var(--brand); font-size: 11px; }
.tr-hit { display: flex; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.tr-hit:hover, .tr-pn a:hover { border-color: var(--brand); }
.tr-guide { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; max-width: 1180px; align-items: start; }
.tr-side { position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow: auto; font-size: 13px; padding: 4px 4px 12px; }
.tr-side-all { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brand) !important; }
.tr-side-m { font-weight: 600; color: var(--muted); margin: 12px 0 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.tr-side a:not(.tr-side-all) { display: block; padding: 4px 8px; border-radius: 6px; line-height: 1.3; }
.tr-side a:not(.tr-side-all):hover { background: var(--chip); }
.tr-side a.on { background: var(--btn-bg); color: var(--brand); font-weight: 600; }
.tr-crumb { margin-bottom: 6px; } .tr-crumb a { color: var(--brand); }
.tr-page { min-width: 0; }
.tr-body { line-height: 1.55; max-width: 760px; }
.tr-body h3 { margin-top: 1.3em; padding-top: .6em; border-top: 1px solid var(--chip); } .tr-body h4 { margin: 1em 0 .3em; }
.tr-body li { margin: 3px 0; }
.tr-tip { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--brand); background: var(--chip); border-radius: 4px; }
.tr-video { margin: 10px 0 14px; max-width: 760px; }
.tr-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.tr-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.tr-pn a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.tr-pn a.nx { text-align: right; }
.tr-toc { margin: 8px 0 16px; } .tr-toc ol { margin: 4px 0 0 18px; }
.tr-printonly { display: none; }
@media (max-width: 820px) {
  .tr-guide { grid-template-columns: 1fr; }
  .tr-side { display: none; }
  .tr-top input[type=search] { max-width: none; }
}
@media print {
  header.top, #toast, #newbuild, #previewbar, .tr-noprint { display: none !important; }
  .tr-printonly { display: block; }
  .tr-guide { display: block; }
  .tr-page { max-width: none; box-shadow: none; border: 0; }
  .tr-section, .tr-module { break-before: page; }
  .tr-module + .tr-section { break-before: auto; }
  .tr-body a { color: inherit; }
}

/* Permit packet (public/permitpacket.js): ready green, missing red, optional grey */
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 10px; }
@media (max-width: 760px) { .pp-grid { grid-template-columns: minmax(0, 1fr); } }
.pp-sec { padding: 10px 14px; margin-bottom: 12px; } .pp-sec h3 { margin: 0 0 6px; } .pp-sec h4 { margin: 10px 0 4px; font-size: 14px; }
.pp-items, .pp-list { list-style: none; margin: 0; padding: 0; } .pp-list { list-style: disc; padding-left: 20px; }
.pp-items li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--line); }
.pp-i { width: 1.2em; text-align: center; font-weight: 700; }
.pp-ready .pp-i { color: var(--brand); } .pp-missing .pp-i, .pp-missing > b, .pp-red { color: var(--bad); } .pp-optional { color: var(--muted); }
.pp-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--line); }
.pp-row > span { color: var(--muted); font-size: 13px; } .pp-row > b { font-weight: 500; overflow-wrap: anywhere; } .pp-row select { max-width: 220px; }
@media (max-width: 520px) { .pp-row { grid-template-columns: minmax(0, 1fr); } }
/* Arcasa: Engineer send-back and review card on the Site Survey step (public/arcasareviewui.js) */
.ar-card { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; background: var(--panel); padding: 10px 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.ar-card .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-ret { background: #fff4e5; color: var(--warn); border-radius: 6px; padding: 6px 9px; font-size: 14px; }
.ar-grp { border: 1px solid var(--line); border-radius: 7px; margin: 8px 0; padding: 6px 10px 8px; min-width: 0; }
.ar-grp legend { font-weight: 600; font-size: 13px; color: var(--muted); padding: 0 4px; }
.ar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.ar-row:last-of-type { border-bottom: 0; }
.ar-row select { width: auto; min-width: 170px; max-width: 100%; }
.ar-row > span:first-child { flex: 1 1 150px; min-width: 0; }
.ar-yn { display: inline-flex; gap: 12px; white-space: nowrap; flex: 0 0 auto; }
.ar-notes { display: grid; gap: 4px; margin: 6px 0; font-size: 14px; }
.ar-pdfrow { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }   /* ⬇ PDF and the saved copy in Files (Rick, Nov 25) */
.ar-prev { border: 1px solid var(--line); border-radius: 7px; padding: 8px; display: grid; gap: 6px; }
.ar-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.ar-backbox { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; display: grid; gap: 6px; }
.ar-opts { display: grid; gap: 2px; max-height: 220px; overflow: auto; font-size: 14px; }
@media (max-width: 600px) { .ar-row select { min-width: 0; width: 100%; } .ar-frame { height: 320px; } }
.ar-quote { margin: 4px 0; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--bg); }
.ar-differs { color: var(--warn, #b45309); font-weight: 600; }
.ar-app { margin: 6px 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.ar-app ul { margin: 4px 0 0 18px; padding: 0; }
pre.ar-quote { white-space: pre-wrap; max-height: 240px; overflow: auto; }
.ar-scroll { overflow-x: auto; }
.ar-scope input, .ar-scope select { min-width: 110px; }
/* Arcasa scope card (Rick, Nov 16; src/sowequip.js): equipment with no price-book product, red until its price is set. */
.ar-unpriced { margin-top: 8px; padding: 6px 9px; border-radius: 6px; background: #fde7e5; color: var(--bad); border: 1px solid #f0b4ad; }
tr.ar-unpriced-row td { background: #fff5f4; }
.ar-lines input[type="number"] { width: 120px; }
.ar-card .bad, .sowacts .bad { color: var(--bad); }
@media (max-width: 760px) { .ar-card tr.ar-th { display: none; } .ar-card td[data-h]::before { content: attr(data-h) ': '; color: var(--muted); font-size: 12px; } .ar-scope td[data-h="Use"] { display: block; } }

/* Site Survey step (Rick, Nov 12): Expand all / Collapse all; Scheduling and contact folds; the Arcasa box rolled up once sent. */
.j2-foldall { display: flex; justify-content: flex-end; gap: 14px; font-size: 12.5px; margin: -4px 0 8px; }
.ob-fold { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin: 0 0 8px; }
.ob-fold > summary { cursor: pointer; padding: 8px 10px; display: flex; gap: 8px; align-items: center; }
.ob-fold > .fields { padding: 0 10px 10px; }
.ar-sum { margin: 0 0 0 18px; padding: 0; display: grid; gap: 2px; }
.ar-more > summary { cursor: pointer; padding: 2px 0; }
.ar-more[open] > summary { margin-bottom: 6px; }
/* Arcasa scope & SOW as one closed fold (Rick, Nov 12): title and status chip on the fold's line. */
.ar-wrap > summary { cursor: pointer; list-style: none; align-items: center; gap: 8px; }
.ar-wrap > summary::-webkit-details-marker { display: none; }
.ar-wrap > summary::before { content: '▸'; color: var(--muted); }
.ar-wrap[open] > summary::before { content: '▾'; }
.ar-wrap[open] > summary { margin-bottom: 6px; }
.ar-rolled { border-left-color: #1f6b3a; }
.ar-card button.primary:disabled { opacity: .55; cursor: default; }
.ar-reopen { background: #fff8e1; border-radius: 6px; padding: 6px 8px; }
/* Material ordering split between suppliers (public/ordering.js drawParts): one card per supplier */
.moparts { display: flex; flex-direction: column; gap: 10px; }
.mocard { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 12px; }
.mocard.done { border-color: #9fcfae; }
.mocard-h { gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.mosteps.mini div { padding: 4px 8px; min-width: 90px; }
.moparts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; align-items: start; }
.momismatch { margin: 6px 0; padding: 8px 10px; border-left: 4px solid #c58a00; background: #fff7e0; border-radius: 6px; }
.mocard-g { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mocard-g label { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 640px) { .moparts-grid { grid-template-columns: 1fr; } }

/* System & Design as a guided flow (public/designflow.js; Rick, Nov 14): only the step being worked is open, finished steps are one
   line, later steps a greyed name. "Show everything" (.flow-all) shows the section as before. */
#syshub.flow:not(.flow-all)[data-view="intake"] [data-fs]:not([data-fs~="intake"]),
#syshub.flow:not(.flow-all)[data-view="design"] [data-fs]:not([data-fs~="design"]),
#syshub.flow:not(.flow-all)[data-view="engineer"] [data-fs]:not([data-fs~="engineer"]),
#syshub.flow:not(.flow-all)[data-view="homeowner"] [data-fs]:not([data-fs~="homeowner"]),
#syshub.flow:not(.flow-all)[data-view="bom"] [data-fs]:not([data-fs~="bom"]),
#syshub.flow:not(.flow-all)[data-view="done"] [data-fs],
#syshub.flow:not(.flow-all)[data-view="none"] [data-fs],
#syshub.flow:not(.flow-all) .sy-steps[data-row="design"],
#syshub.flow:not(.flow-all) .dp-tabs,
#syshub.flow:not(.flow-all) #plancheck .bomsteps,
#syshub.flow:not(.flow-all):not([data-view="design"]):not([data-view="engineer"]) #plansetcard,
#syshub.flow:not(.flow-all):not([data-view="homeowner"]) #dapprovals,
#syshub.flow:not(.flow-all)[data-view="homeowner"] #plancheck > :not([data-fs~="homeowner"]),
#syshub.flow:not(.flow-all)[data-view="bom"] #plancheck > :not([data-fs~="bom"]),
#syshub.flow:not(.flow-all)[data-view="design"] [data-dpp="check"],
#syshub.flow:not(.flow-all)[data-view="homeowner"] #plancheck:not(:has(> [data-fs~="homeowner"])),
#syshub.flow:not(.flow-all)[data-view="bom"] #plancheck:not(:has(> [data-fs~="bom"])) { display: none !important; }
/* The Engineer's Approve, Send back for corrections and Fix with Claude are one row, Engineer review (Jordan's App request, Nov 21):
   the step bar above only says what's next, so nothing is hidden here any more. */
#syshub.flow:not(.flow-all) .sy-grph > i { display: none; }
#syshub.flow:not(.flow-all) [data-p="design"] > .sy-grph { display: none; }   /* the step line already names it */
.dflow-step.done.gap { background: #fff7ed; color: #9a4a06; }
.dflow-step.done.gap i { background: #c2620a; border-color: #c2620a; }   /* the parts' own 1-2-3 would clash with the step numbers */
.dflow { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.dflow-after { margin-top: 12px; }
.dflow-step { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line, #e3e8e4); border-radius: 10px; background: #fff; font-size: 14px; }
.dflow-step[data-fopen] { cursor: pointer; }
.dflow-step i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex: none; border: 2px solid currentColor; }
.dflow-step.done { background: #f2f8f4; color: #2f6b46; }
.dflow-step.done i { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }
.dflow-step.done b { font-weight: 600; }
.dflow-step.cur { border: 2px solid var(--brand, #2f7d4f); }
.dflow-step.cur i { color: var(--brand, #2f7d4f); }
.dflow-step.next { color: #9aa59e; background: transparent; border-style: dashed; }
.dflow-step.open { box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 14px rgba(47,125,79,.10); }
.dflow-note { color: inherit; opacity: .85; font-size: 13px; }
.dflow-step.cur .dflow-note { color: var(--muted, #6b756f); opacity: 1; }
.dflow-now { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--brand, #2f7d4f); padding: 2px 8px; border-radius: 99px; }
.dflow-help { margin: -2px 2px 4px 46px; font-size: 13px; color: var(--muted, #6b756f); }
.dflow-done { padding: 12px 14px; border-radius: 10px; background: #eef7f1; border: 1px solid #cfe6d7; }
.dflow-tools { display: flex; justify-content: flex-end; }
@media (max-width: 640px) { .dflow-help { margin-left: 2px; } .dflow-step { flex-wrap: wrap; } }

/* Install › Material ordering, one step at a time (public/ordering.js singleFlow, public/orderflowstate.js; Rick, Nov 14). */
.moflow:not(.flow-all)[data-view="send"] [data-mfs]:not([data-mfs~="send"]),
.moflow:not(.flow-all)[data-view="quote"] [data-mfs]:not([data-mfs~="quote"]),
.moflow:not(.flow-all)[data-view="delivery"] [data-mfs]:not([data-mfs~="delivery"]),
.moflow:not(.flow-all)[data-view="done"] [data-mfs],
.moflow:not(.flow-all)[data-view="none"] [data-mfs],
.moflow:not(.flow-all) .mocard[data-view="none"] [data-pfs],
.moflow:not(.flow-all)[data-view="parts"] [data-mfs]:not([data-mfs~="parts"]),
.moflow:not(.flow-all) [data-mfs="off"],
.moflow:not(.flow-all) .mowait,
.moflow:not(.flow-all) .mocard[data-view="send"] [data-pfs]:not([data-pfs~="send"]),
.moflow:not(.flow-all) .mocard[data-view="quote"] [data-pfs]:not([data-pfs~="quote"]),
.moflow:not(.flow-all) .mocard[data-view="check"] [data-pfs]:not([data-pfs~="check"]),
.moflow:not(.flow-all) .mocard[data-view="approve"] [data-pfs]:not([data-pfs~="approve"]),
.moflow:not(.flow-all) .mocard[data-view="order"] [data-pfs]:not([data-pfs~="order"]) { display: none !important; }
.moflow .dflow { margin: 0; }
.moflow-after .dflow-tools, .moparts > .dflow-tools { margin-top: 4px; }
.mocard .mosteps.mini > [data-pstep].done, .mocard .mosteps.mini > [data-pstep].cur { cursor: pointer; }
.dflow-step.open[data-fopen], .dflow-step.open[data-mopen] { cursor: pointer; }   /* a second click folds the open step */
.mocard .mosteps.mini > .viewing { outline: 2px solid var(--brand, #2f7d4f); outline-offset: -2px; }

/* Install & Final, one step at a time (public/insthub.js flow; Rick, Nov 14). */
#insthub.flow:not(.flow-all) .rf-steps,
#insthub.flow:not(.flow-all) .rf-chips > .rf-chip,
#insthub.flow:not(.flow-all) .in-cardbar,
#insthub.flow:not(.flow-all) .rf-cards > details.psec.in-later { display: none !important; }
#insthub .in-laterline { display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; flex-wrap: wrap; }
/* My checklist (issue #1201; public/checklist.js): the row a deep link points at, and the "already done" note. */
.ck-sec { margin: 12px 0; } .ck-sec h2 { margin: 0 0 6px; } .ck-row.ck-hit td { background: #fff7d6; } .ck-row.ck-hit td:first-child { box-shadow: inset 4px 0 0 var(--brand, #1f7a3a); } .ck-gone { border-left: 4px solid #d97706; }

/* HOA approved: one line with the approval and its conditions (public/projhubs.js hoaDone; Rick, Nov 16). */
#onbhub .hoa-done { margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: #eef7f1; border: 1px solid #cfe6d7; color: #1d5a35; }
#onbhub .hoa-done .hoa-cond { margin-top: 4px; color: var(--warn, #b54708); }

/* Utility & PTO after PTO approval (public/ptohub.js; Rick, Nov 16): the packet folds to one line, and blanks aren't flagged. */
#ichub details.pto-done { margin: 6px 0; }
#ichub details.pto-done > summary { cursor: pointer; padding: 10px 14px; border-radius: 10px; background: #eef7f1; border: 1px solid #cfe6d7; color: #1d5a35; }
#ichub .pto-approved .icrow.miss, #ichub .pto-approved tr.miss, #ichub .pto-approved li.miss { background: none !important; border-color: transparent !important; }
#ichub .pto-approved .icrow.miss label, #ichub .pto-approved tr.miss td { color: inherit !important; }
/* Fire badge (Rick, Nov 16; public/firebadge.js): the Job view header pill and the Pipeline dot / filter. Red = Fire inspects onsite,
   green = it doesn't, gray = the fire department card isn't verified yet. */
.firedot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; flex: none; background: #9aa1a9; }
.firedot.red { background: #c62828; } .firedot.green { background: #2e7d32; } .firedot.gray { background: #9aa1a9; }
.pinfo > button.pinfo-fire { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-size: 15px; font-weight: 700; padding: 3px 12px; cursor: pointer; border: 1px solid; }
.pinfo > button.pinfo-fire.fire-red { background: #fde7e5; border-color: #e5a29b; color: #8e1c14; }
.pinfo > button.pinfo-fire.fire-green { background: #e3f4e8; border-color: #9fceb0; color: #1f6b3a; }
.pinfo > button.pinfo-fire.fire-gray { background: #eef0f2; border-color: #c9ced4; color: #4a525b; }
.pinfo > button.pinfo-fire:hover { filter: brightness(.97); }
.pinfo > button.pinfo-fire .firenote { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: #fff7e0; border: 1px solid #e8c873; color: #6b4e00; }
.pinfo > button.pinfo-fire .firelocal { font-size: 12px; font-weight: 500; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.pfire { margin-left: 6px; cursor: help; }
.dchips button .firedot { margin-right: 4px; }
/* Engineering review sheet (Rick, Nov 18; public/engreviewui.js): as sold vs the Engineer's finding, the survey evidence beside it. */
.ers-card { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; background: var(--panel); padding: 10px 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.ers-card .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ers-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.ers-scroll { overflow-x: auto; }
.ers-t td { vertical-align: top; } .ers-t tr.ers-g td { background: var(--chip); padding-top: 6px; }
.ers-t tr.ers-off td:first-child { border-left: 3px solid var(--warn); } .ers-t tr.ers-done td:first-child { border-left: 3px solid var(--brand); }
.ers-f { display: flex; gap: 6px; align-items: center; } .ers-f input, .ers-f select { min-width: 120px; max-width: 220px; } .ers-f textarea { width: 100%; min-width: 220px; }
.ers-ok { min-width: 34px; padding: 4px 8px; } .ers-ok.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.ers-chg { color: var(--warn); font-weight: 600; }
.ers-coneed { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 8px 10px; margin: 8px 0; } .ers-coneed label { gap: 6px; align-items: center; }
.ers-coneed textarea { width: 100%; margin-top: 6px; box-sizing: border-box; }
.ers-t tr.ers-todo td:first-child { border-left: 3px dashed var(--warn); } .ers-t tr.ers-todo td { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.ers-left { color: var(--warn); font-weight: 600; }
.ers-ev { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); display: grid; gap: 6px; font-size: 14px; }
.ers-ev ul { margin: 4px 0; padding-left: 18px; } .ers-cl { max-height: 260px; overflow: auto; }
.ers-co { border: 1px solid #f2c25c; background: #fff8e6; border-radius: 8px; padding: 8px 10px; } .ers-co ul { margin: 4px 0; padding-left: 18px; }
.ers-dec { border-radius: 8px; padding: 6px 10px; background: var(--chip); }
.ers-surveychg { background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid var(--warn); }
.ers-acts { border-top: 1px solid var(--line); padding-top: 8px; }
/* The record of a decided sheet and its Reopen (Rick, Nov 25; public/engreviewui.js) */
.ers-rec { border-radius: 8px; padding: 8px 10px; background: var(--chip); display: grid; gap: 4px; } .ers-recl { font-size: 15px; }
.ers-reo ul, .ers-wrote ul, .ers-reask ul { margin: 4px 0; padding-left: 18px; } .ers-wrote { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.ers-note { white-space: pre-wrap; } .ers-fill { color: var(--brand); font-weight: 600; }
.ers-reask { max-width: 560px; } .ers-rechk { gap: 6px; align-items: center; margin-top: 6px; }
.j2-englink { margin: 0 0 8px; }
.svcl-why { margin: 2px 0 4px; }
@media (max-width: 900px) { .ers-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .ers-t tr.ers-th { display: none; } .ers-t td[data-h]::before { content: attr(data-h) ': '; color: var(--muted); font-size: 12px; } .ers-t td { display: block; } .ers-f input, .ers-f select { max-width: 100%; flex: 1; } }
/* Financials tab (Rick, Nov 19: "Lots of noise … tighten up the wasted space"): add / read forms fold into one "+" line */
.fn details.fn-add { margin-top: 6px; }
.fn details.fn-add > summary { cursor: pointer; font-size: 13px; color: var(--brand, #2d7024); font-weight: 600; list-style: none; padding: 2px 0; }
.fn details.fn-add > summary::-webkit-details-marker { display: none; }
.fn details.fn-add[open] > summary { margin-bottom: 4px; }
.fn .ip-card { margin-bottom: 10px; }
.fn .ip-cb > p.muted.small:last-child { margin-bottom: 0; }
/* Job › Financials (Rick, Nov 19: "less open space and we do not have to scroll as far"): what it costs (left) | money moving: in,
   billing, installer and commission payments (right); each column stacks its own cards, so a short card never leaves a hole beside a tall one. One column on narrow screens. */
.fn-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.fn-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fn-col > div:empty { display: none; }
.fn-out { order: 1; } .fn-in { order: 2; }
.fn .fn-col .ip-card { margin: 0; }
.fn .ip-ch > .muted.small { display: none; }   /* "only you", "budget vs actual"…: the whole tab is the owner's */
.fn .ip-cb { padding: 8px 12px; }
.fn table.list td, .fn table.list th { padding: 4px 6px; }
.fn .dp-kpis { margin-bottom: 10px; }
.fn .cm-fees td.fn-wide { width: 100%; }
.fn .cm-fees input[type="date"] { width: 132px; }
.fn .fn-nocomm { display: block; margin-top: 6px; }
@media (max-width: 1000px) { .fn-cols { grid-template-columns: 1fr; } }

/* One Sheet: the Fire chip next to the phone (Rick, Nov 19) */
.os-contact .os-fire { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line, #ddd); }
.os-contact .os-fire.fire-red { color: #b42318; border-color: #f3b4ae; background: #fff1f0; }
.os-contact .os-fire.fire-green { color: #1f7a4d; border-color: #b6dfc6; background: #effaf3; }
.os-contact .os-fire.fire-gray { color: #555; background: #f5f5f5; }

/* Site survey note per dealer (Arcasa, Rick Nov 20; public/surveynote.js): right of the Site Survey header bar, dark green with white text and a sun-yellow edge. */
.j2-ssnote, .ip-ssnote { background: var(--nav); color: #fff; border-left: 4px solid var(--sun); border-radius: 8px; padding: 7px 11px; font-size: 13px; font-weight: 600; line-height: 1.35; max-width: 340px; overflow-wrap: anywhere; }
.j2-ssnote { align-self: center; flex: 0 1 340px; }
.ip-ssnote { margin-left: auto; font-size: 12.5px; padding: 5px 9px; flex: 0 1 300px; }
.ip-ch .ip-ssnote + .ip-more { margin-left: 8px; }
@media (max-width: 640px) { .j2-ssnote { flex-basis: 100%; max-width: none; } .ip-ch:has(.ip-ssnote) { flex-wrap: wrap; } .ip-ssnote { flex-basis: 100%; max-width: none; margin-left: 0; } }
/* The Job view's top row (Paul's App requests, Nov 21): the job's scope chips (the One Sheet's list, light here) and the Weather
   button, left of the One Sheet button. public/onesheet.js scopeChipsHtml, public/jobweather.js. */
.os-cell { gap: 8px; flex-wrap: wrap; }
.jv-scope { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.jv-scope .os-sc { background: #f1f7f3; border-color: #cfe3d6; color: #1f3d2b; font-size: 12px; padding: 3px 10px; }
.jv-scope .os-sc.sgip::before { background: #d9a400; } .jv-scope .os-sc.solar::before { background: #e0a100; }
.jvwx { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.jvwx th, .jvwx td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line, #e5e7eb); white-space: nowrap; }
.jvwx tr.risk td { background: #fff4e5; }
.jvwx-modal .modal-box { max-width: 640px; overflow-x: auto; }
/* Utility Interconnection & PTO: the main panel's busbar and main breaker, read only (Paul, Nov 21; public/ptohub.js mspLine). */
.ptomsp { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: #f4f8f5; border: 1px solid #dfe9e2; }
.ptomsp a { margin-left: 6px; }
/* Bigger chat and message boxes (Rick, Nov 23: "Please increase the Chat and message boxes so we are not scrolling much and we can
   see easier"). Size and readability only: Team chat and private messages (public/chat.js, public/pm.js), a job's chat tab,
   Messages (public/messages.js, public/instchat.js), the portals' chat (public/partnerchat.js) and message cards (client, installer,
   dealer). The lists fill most of the window; the text is 16.5px; the write boxes show several lines and grow as you type
   (field-sizing, with public/lib.js growBox for browsers without it) up to about 40% of the window, then scroll. */
.chat-feed { gap: 8px; max-height: max(60vh, calc(100vh - 290px)); max-height: max(60dvh, calc(100dvh - 290px)); }
#chattab .chat-feed { max-height: max(55vh, calc(100vh - 300px)); max-height: max(55dvh, calc(100dvh - 300px)); }
.ip-feed { gap: 8px; max-height: max(60vh, 420px); }
.msg-feed, .ip-feed.msg-feed { max-height: max(55vh, calc(100vh - 330px)); max-height: max(55dvh, calc(100dvh - 330px)); }
.msg-list, .chat-wrap .msg-list { max-height: max(75vh, calc(100vh - 140px)); }
.chat-msg, .ip-msg, .dmsg { font-size: 16.5px; line-height: 1.5; padding: 10px 14px; }
.chat-msg .when, .ip-msg .when, .dmsg .when { font-size: 13px; margin-bottom: 4px; }
.chat-img { max-width: 300px; max-height: 240px; }
.chat-in, #msgtext, .ic-text, .pc-text, #cmsg, #inote, #dmsg, .chatpop-reply textarea {
  font-size: 16px; line-height: 1.45; padding: 10px 12px; min-height: 6.2em; max-height: 40vh; max-height: 40dvh; field-sizing: content; overflow-y: auto; }
.chat-row .chat-send, .msg-compose .primary, .pc-send { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.chatpop-body { font-size: 15.5px; line-height: 1.45; max-height: 9em; }
@media (max-width: 760px) {
  .chat-feed, #chattab .chat-feed { max-height: max(50vh, calc(100vh - 300px)); max-height: max(50dvh, calc(100dvh - 300px)); }
  .ip-msg, .ip-msg.mine { margin: 0; } .chat-msg, .ip-msg, .dmsg { padding: 9px 12px; }
  .chat-in, #msgtext, .ic-text, .pc-text, #cmsg, #inote, #dmsg { min-height: 5em; max-height: 35vh; max-height: 35dvh; }
}

/* Job view: Install shows the install work, "AHJ & Fire Finals" the finals (Rick, Nov 24; public/jobview.js embed). The Full section shows both. */
#insthub[data-part="install"] .rf-cards > details.psec[data-sec="Final inspection"],
#insthub[data-part="install"] .rf-steps > :is([data-ik="fire_final"], [data-ik="ahj_final"], [data-ik="final_approved"]) { display: none !important; }
#insthub[data-part="finals"] .rf-cards > details.psec:not([data-sec="Final inspection"]):not([data-sec="MSA"]),   /* the MSA card stays reachable from the final's hold note (Paul, Nov 25, 2026) */
#insthub[data-part="finals"] .in-cardbar,
#insthub[data-part="finals"] .rf-steps > :not([data-ik="fire_final"], [data-ik="ahj_final"], [data-ik="final_approved"]) { display: none !important; }
/* The finals' status dropdowns: the scheduling blocks show and set these now (Rick, Nov 24); the value stays in the form. */
label[data-t="inspstatus"] { display: none !important; }
/* Chat pop-ups wider and taller where the screen has room (Rick, Nov 23: "Paul and I are old"; finishes #1702): the stack of
   chat / private / job-chat pop-ups is 460px wide on a desktop (380px before) and shows more of the message. Phones keep the
   full width less the 16px gutters. */
@media (min-width: 900px) {
  .notice-stack:has(.chatpop) { width: min(460px, calc(100vw - 32px)); max-height: 80vh; max-height: 80dvh; }
  .chatpop-body { max-height: 12em; }
}
/* An unsent draft (Jordan's App request 8876e41b, Nov 23; public/drafts.js): a small label on the conversation, the job's Chat tab
   and the Installer / Dealer chat chip. */
.draft-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6;
  background: #fff4e0; color: #8a4b00; border: 1px solid #f0cf96; white-space: nowrap; vertical-align: middle; }
/* Calendar drop warnings (Rick, Nov 24): listed before Confirm, never blocking. */
.pk_warns { list-style: none; margin: 8px 0 4px; padding: 0; font-size: 13.5px; } .pk_warns li { padding: 5px 8px; border-radius: 6px; margin-bottom: 4px; background: #fff8e1; }
.pk_warns li.bad { background: #fdecea; color: var(--bad); } .pk_warns li.ok { background: #e3f3e7; color: #1f5a38; }
/* Calendar: the week's target bar (Rick, Nov 24): booked vs floor / target, the same numbers as Projects › Priority › Weekly plan. */
.calbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.calbar .cb-track { position: relative; flex: 1; min-width: 120px; height: 10px; border-radius: 999px; background: #eef2ef; overflow: visible; }
.calbar .cb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.calbar .cb-floor { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #5b6660; }
.calbar.ok .cb-fill { background: #2f7d4f; } .calbar.warn .cb-fill { background: #e0a800; } .calbar.bad .cb-fill { background: #d32f2f; }
.calbar.ok { border-color: #b9dcc4; } .calbar.warn { border-color: #f0d58a; } .calbar.bad { border-color: #f1b5ae; }
/* Calendar weather strip (Rick, Nov 24): the next 7 days, Open-Meteo (free). */
.calwx { display: flex; gap: 6px; flex-wrap: wrap; align-items: stretch; margin-bottom: 8px; font-size: 12.5px; }
.calwx .cw-city { align-self: center; font-weight: 700; color: var(--muted); margin-right: 2px; }
.calwx .cw-d { border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: #fff; white-space: nowrap; }
.calwx .cw-d.risk { background: #fff8e1; border-color: #f0d58a; } .calwx .cw-d.jobs { background: #fdecea; border-color: #f1b5ae; }
.calwx .cw-p { color: #1570ef; } .calwx .cw-j { color: var(--bad); font-weight: 700; }
/* Calendar Map view (Rick, Nov 24): the week's visits by location. */
.calmapwrap { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.calmaphd { padding: 6px 10px; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.calleg { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; } .calleg .sw { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #1d2a22; }
.calleg .sw.hollow { background: #fff; border-color: #5b6660; }
.calmap { height: min(62vh, 560px); min-height: 320px; } .calmapnone { padding: 6px 10px; }
.calsvgmap { width: 100%; height: calc(100% - 24px); display: block; } .calpt { cursor: pointer; } .calpt:hover circle, .calpt:focus circle { stroke-width: 3.5; } .calpt text { fill: #1d2a22; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
@media (max-width: 760px) { .calwrap.calmode-map ~ .calagenda { display: none; } .calmap { height: 60vh; } }
/* Admin › Automations by area (Rick, Nov 26; public/automations.js, public/autofilter.js) */
.autorecent { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.autorecent ul { margin: 4px 0 0; padding-left: 18px; } .autorecent li { margin: 2px 0; } .autorecent .okc { color: #1f6b3a; }
.autorecent .linkbtn.inline { display: inline; text-align: left; padding: 0; }
.chip.autooffchip { display: block; white-space: normal; border-radius: 8px; padding: 4px 9px; margin: -4px 0 4px; }
.autotools { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 10px 0 6px; }
.autotools input[type=search] { flex: 1 1 260px; min-width: 0; max-width: 420px; margin: 0; }
.autotools .chips { margin: 0; }
details.autogroup { margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
details.autogroup > summary { cursor: pointer; padding: 9px 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
details.autogroup > summary .autogh { font-weight: 700; font-size: 15px; }
details.autogroup > summary .autogsum { font-size: 13px; color: #1f6b3a; font-weight: 600; } details.autogroup > summary .autogsum.hasoff { color: var(--warn); }
details.autogroup > table.autotbl { margin: 0; border-radius: 0 0 8px 8px; border-left: 0; border-right: 0; border-bottom: 0; }
tr.autoflash td { background: #fff4b8 !important; transition: background .4s; }
