/* The office ERP's styles (tenders.html), moved out of the page on 23 Nov 2026 so the page stays under the 70 KB upload limit. */
/* Look (Adam, 5 Oct 2026): the Vertex Hub prototype's style (docs/reference/hub-style.css): dark side menu, white cards
   on a light grey page, condensed headings, the brand's High Vis Green for the main buttons and the current page.
   Fonts (Adam, 5 Oct): the Hub's Google fonts, Barlow Condensed for headings and big figures, DM Sans for text. */
:root {
  /* VERTEX brand (Brand Guidelines p.9): Building Black, Cement Grey + tints, High Vis Green */
  --black: #21292b; --grey: #8e9b9f; --grey20: #eaecea; --grey5: #f7f8f6; --green: #c9dc50; --green-dark: #b8cb3e;
  --green-tint: #eef4cc;                /* soft High Vis Green, for highlights */
  --bg: #f5f6f4; --panel: #ffffff; --text: var(--black);
  --muted: #5e6a6e;                     /* darker Cement Grey so small text stays readable */
  --line: #e2e5e3; --line-2: #d3d8d4; --accent: var(--black);
  --danger: #b42318; --danger-soft: #fbe7e5; --warn: #9a4a00; --warn-soft: #fff1de; --ok: #4a540c;
  --shadow: 0 1px 3px rgba(33, 41, 43, .06);
  --side: 256px;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--ok); }
:focus-visible { outline: 3px solid rgba(201, 220, 80, .7); outline-offset: 1px; }

/* The side menu (Adam, 23 Nov 2026; nav.js): one persistent list of groups; an open job or tender sits under its list with
   its sections. Before sign-in the header is a plain dark bar with the logo. On a phone it slides in from the menu button. */
header { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--black); color: #fff; }
header .brand { height: 30px; display: block; }
.nav-toggle { display: none; margin-left: auto; align-items: center; justify-content: center; width: 42px; height: 38px; padding: 0; background: none; border: 1px solid #4a5558; color: #fff; }
.nav-toggle svg { width: 22px; height: 22px; }
.side { display: contents; }
#tabs { display: flex; flex-direction: column; gap: 1px; }
#tabs button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; border-radius: 10px; color: #dde3e4; padding: 0 12px; min-height: 40px; font-size: 15px; text-align: left; line-height: 1.2; }
#tabs button svg { width: 18px; height: 18px; flex: none; color: var(--grey); }
#tabs button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
#tabs .nv-g.has-on { color: #fff; font-weight: 600; }
#tabs .chev { margin-left: auto; width: 14px !important; height: 14px !important; transition: transform .15s; }
#tabs [aria-expanded="true"] > .chev { transform: rotate(90deg); }
#tabs .nv-items { display: none; padding: 1px 0 6px 28px; }
#tabs .nv-grp.open > .nv-items { display: block; }
#tabs .nv-i, #tabs .nv-s, #tabs .nv-sg, #tabs .nv-s2 { min-height: 32px; font-size: 14px; padding: 4px 10px; color: #c3cbcd; }
#tabs .nv-open { margin: 2px 0 4px; padding-left: 8px; border-left: 2px solid #4a5558; }
#tabs .nv-oh { display: flex; align-items: center; gap: 2px; }
#tabs .nv-oname { color: #fff; font-weight: 600; }
#tabs .nv-oname small { display: block; color: var(--grey); font-weight: 500; font-size: 12px; }
#tabs .nv-oname.on small { color: var(--black); }
#tabs button.nv-top.active, #tabs button.on { background: var(--green); color: var(--black); font-weight: 600; }
#tabs button.nv-top.active svg, #tabs button.on svg { color: var(--black); }
#tabs .nv-oname { flex-direction: column; align-items: flex-start; gap: 1px; }
#tabs .nv-x { width: 28px; min-height: 28px; padding: 0; justify-content: center; flex: none; color: var(--grey); font-size: 18px; }
#tabs .nv-ss { display: none; padding-left: 12px; }
#tabs .nv-sg[aria-expanded="true"] + .nv-ss { display: block; }
#tabs .nv-sg.has-on { color: #fff; font-weight: 600; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: auto; border-radius: 10px; background: var(--green); color: var(--black); font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
#tabs .active .badge, #tabs .on .badge { background: var(--black); color: var(--green); }
header .who { margin-left: auto; color: #cfd6d8; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
header .who button { background: none; color: #fff; border-color: #4a5558; }
header .who button:hover { border-color: var(--green); }
.role { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9px; background: #3a4447; color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.role.admin { background: var(--green); color: var(--black); }
main { padding: 18px 24px 48px; }
@media (min-width: 901px) {
  body:has(#tabs:not([hidden])) { padding-left: var(--side); }
  body:has(#tabs:not([hidden])) header { position: fixed; inset: 0 auto 0 0; z-index: 5; width: var(--side); flex-direction: column; align-items: stretch; gap: 0; padding: 24px 12px 16px; overflow-y: auto; }
  body:has(#tabs:not([hidden])) header .brand { height: 34px; align-self: flex-start; margin: 2px 10px 26px; }
  body:has(#tabs:not([hidden])) .side { display: flex; flex-direction: column; flex: 1 0 auto; }
  body:has(#tabs:not([hidden])) header .who { margin: auto 0 0; padding: 14px 10px 0; border-top: 1px solid #3a4447; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13.5px; }
  body:has(#tabs:not([hidden])) #who-name { color: #fff; font-weight: 600; }
  body:has(#tabs:not([hidden])) header .who button { padding: 5px 12px; font-size: 13px; }
  main { padding: 30px 40px 64px; }
}
@media (max-width: 900px) {
  body:has(#tabs:not([hidden])) header { position: sticky; top: 0; z-index: 20; padding: 10px 16px; }
  body:has(#tabs:not([hidden])) .nav-toggle { display: inline-flex; }
  body:has(#tabs:not([hidden])) .side { display: flex; flex-direction: column; position: fixed; top: 58px; left: 0; bottom: 0; z-index: 21; width: min(320px, 88vw); padding: 12px 12px 16px; overflow-y: auto; background: var(--black); transform: translateX(-102%); }
  body.nav-anim .side { transition: transform .2s ease; }   /* only once the menu button is used, not when the page first shows */
  body.nav-open:has(#tabs:not([hidden])) .side { transform: none; box-shadow: 8px 0 30px rgba(0, 0, 0, .35); }
  body.nav-open::after { content: ""; position: fixed; inset: 58px 0 0 0; z-index: 19; background: rgba(33, 41, 43, .45); }
  body:has(#tabs:not([hidden])) header .who { margin: auto 0 0; padding: 14px 10px 0; border-top: 1px solid #3a4447; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none !important; } }
/* The open job, tender and pricing sit in the page beside the menu (dialogs shown in place, nav.js navShowInPage) */
#app > dialog.inpage { position: static; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; box-shadow: none; color: inherit; }
#app > dialog.inpage[open] { display: block; }
#app > dialog.inpage > .dlg-body { padding: 0; background: transparent; min-height: 0; }
#app > dialog.inpage .jtabs { position: static; margin: 14px 0 0; padding: 4px 0 0; }
.vhead { margin: 0 2px 18px; }
.vhead .vtop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.vhead .vtop .tag { margin: 0; }
/* (feedback #98) the job's name is the switcher: one down arrow beside it opens the list of jobs */
.vhead .jsw { position: relative; max-width: 100%; }
.vhead .jsw-btn { border: 0; background: none; padding: 0; margin: 0; border-radius: 6px; font: inherit; letter-spacing: inherit; text-transform: inherit; line-height: inherit; color: inherit; text-align: left; cursor: pointer; }
.vhead .jsw-btn:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 4px; }
.vhead .jsw-arrow { display: inline-block; width: .5em; height: .5em; margin-left: .25em; vertical-align: .1em; color: var(--grey); transition: transform .15s, color .15s; }
.vhead .jsw-btn:hover .jsw-arrow, .vhead .jsw-btn[aria-expanded=true] .jsw-arrow { color: var(--text); }
.vhead .jsw-btn[aria-expanded=true] .jsw-arrow { transform: rotate(180deg); }
.jsw-menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: min(400px, calc(100vw - 32px)); max-height: min(60vh, 480px); display: flex; flex-direction: column; gap: 6px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(33, 41, 43, .18); }
.jsw-menu .jsw-q { margin: 0; }
.jsw-list { overflow: auto; }
.jsw-h { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.jsw-row { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; border: 0; border-radius: 8px; background: none; padding: 8px 10px; }
.jsw-row strong { flex: none; min-width: 64px; }
.jsw-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.jsw-row:hover, .jsw-row:focus-visible { background: var(--grey5); outline: none; }
.jsw-row.on { background: var(--grey20); }
.jsw-none { padding: 8px 10px; margin: 0; }
.vhead h1 { margin: 6px 0 0; font-family: var(--font-head); font-size: 40px; font-weight: 700; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.vhead .vsec { margin: 8px 0 0; font-size: 15.5px; color: var(--muted); }
@media (max-width: 640px) { .vhead h1 { font-size: 30px; } }.pagehead { margin: 0 2px 20px; }
.pagehead h1 { margin: 0; font-family: var(--font-head); font-size: 40px; font-weight: 700; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.pagehead p { margin: 6px 0 0; font-size: 15.5px; color: var(--muted); }
/* A side-menu group's pages, as tabs across the top (10 Oct 2026) */
.subtabs { display: flex; flex-wrap: wrap; gap: 2px; margin: -6px 0 18px; padding: 3px; background: var(--grey20); border-radius: 12px; width: fit-content; max-width: 100%; }
.subtabs button { border: 0; background: none; border-radius: 9px; padding: 7px 14px; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.subtabs button:hover { background: rgba(255, 255, 255, .6); }
.subtabs button.on { background: #fff; color: var(--black); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }
.subtabs .badge { margin-left: 0; }
/* Home (home.js, 10 Oct 2026): to-dos, coming up, programme */
.todo li { align-items: flex-start; }
.todo .dot { margin-top: 6px; }
.todo .what { flex: 1; min-width: 0; }
.todo .what small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 1px; }
.todo .go { flex: none; white-space: nowrap; }
.todo-h { margin: 14px 0 2px !important; font-size: 12px !important; }
.soon-list { list-style: none; margin: 0; padding: 0; }
.soon-list li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.soon-list li:first-child { border-top: 0; padding-top: 2px; }
.soon-list .d { font-weight: 700; font-size: 13px; line-height: 1.2; }
.soon-list .d small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.soon-list .d.today { color: var(--warn); }
.soon-list .t small { display: block; color: var(--muted); font-size: 12.5px; }
.soon-list button.name-link { font-weight: 600; }
.prog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; }
.prog-card { display: grid; gap: 8px; text-align: left; width: 100%; background: var(--grey5); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; }
.prog-card:hover { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.prog-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.prog-card .nm { font-weight: 700; }
.prog-card .meter { display: grid; grid-template-columns: 76px minmax(0, 1fr) 42px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.prog-card .meter .bar { margin: 0; background: var(--grey20); }
.prog-card .meter .bar span.time { background: var(--black); opacity: .55; }
.prog-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.prog-card .meta b { color: var(--text); }
.prog-card .diary { font-size: 13px; border-top: 1px solid var(--line); padding-top: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kpis.home-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 14px; }
.home-tiles .kpi:first-child .overdue { color: #ff9b8f; }
.home-hi h2 { font-size: 32px; }
@media (max-width: 640px) { .subtabs { width: 100%; } .subtabs button { flex: 1 1 auto; justify-content: center; padding: 7px 10px; }
  .kpis.home-tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .home-tiles .kpi { padding: 12px 14px; } .home-tiles .kpi .big { font-size: 26px; } }

button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; padding: 6px 13px; color: var(--text); }
button:hover { border-color: var(--grey); }
button.primary { background: var(--green); border-color: var(--green); color: var(--black); font-weight: 600; }
button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; padding: 0 4px; color: var(--ok); font-weight: 600; }
button.link:hover { text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
/* Fields (Adam, 7 Oct 2026, like the Vertex Hub): a soft grey filled box of one height everywhere, the label above it
   in dark text; boxes in a row line up along the bottom however the labels wrap (.grid below) */
input, select, textarea { font: inherit; padding: 8px 12px; min-height: 38px; border: 1px solid transparent; border-radius: 8px; background: var(--grey20); width: 100%; color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--black); box-shadow: 0 0 0 3px rgba(201, 220, 80, .55); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; padding: 0; accent-color: var(--black); }
input[type=file] { min-height: 0; padding: 7px; background: #fff; border: 1px dashed var(--line-2); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: default; }
td input, td select { min-height: 32px; padding: 4px 8px; }   /* fields inside table rows stay compact */
td.overdue, dd.overdue { color: var(--danger); font-weight: 600; }
input::placeholder, textarea::placeholder { color: #7d888b; }
textarea { resize: vertical; }
.muted { color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
#login-form, #two-step { max-width: 380px; margin: 70px auto; display: grid; gap: 12px; }
#login-form h2, #two-step h2 { margin: 0 0 4px; font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
#login-form .tagline { margin: -6px 0 6px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
#login-msg, #two-step [data-ts-msg] { color: var(--danger); margin: 0; min-height: 1em; }
/* Two-step sign-in: set up with a QR code, then a 6-digit code at each password sign-in */
#two-step p, #two-step ol { margin: 0; }
#two-step ol { padding-left: 20px; display: grid; gap: 6px; }
.ts-qr { justify-self: center; width: 184px; height: 184px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ts-key { display: block; margin-top: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--black); overflow-wrap: anywhere; background: var(--grey5); padding: 6px 8px; border-radius: 8px; }
.ts-code { font-size: 24px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

.banner { background: var(--green-tint); border: 0; color: var(--black); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.banner.ok { background: var(--green-tint); color: var(--ok); }
.banner.info { background: var(--grey20); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner button { margin-left: 8px; }

/* Figures across the top of a page: the first one dark, as in the Hub */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); }
.tiles > .tile:first-child { background: var(--black); border-color: var(--black); color: #fff; }
.tiles > .tile:first-child .label, .tiles > .tile:first-child .sub { color: #b9c2c4; }
.tile[data-filter] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tile[data-filter]:hover { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.tile .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.tile .big { font-family: var(--font-head); font-size: 32px; font-weight: 600; line-height: 1.1; margin: 4px 0 2px; }
.tile .sub { font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: var(--grey20); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 3px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; }
.filters .primary { margin-left: auto; }
/* On the grey page (not in a card) fields are white with a fine border; buttons match the fields' height */
.filters input, .filters select { background: #fff; border-color: var(--line); }
.filters button, .filters .seg { min-height: 38px; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; color: #3e494c; font-weight: 600; background: var(--grey20); border-bottom-color: var(--line-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-open], #builder-rows tr { cursor: pointer; }
tbody tr[data-open]:hover, #builder-rows tr:hover { background: var(--green-tint); }
td.num, th.num { text-align: right; white-space: nowrap; }
.count { font-size: 12px; color: var(--muted); }
.count.soon { color: var(--warn); font-weight: 600; }
.count.overdue { color: var(--danger); font-weight: 600; }
.rowcount { color: var(--muted); margin: 10px 4px; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--grey20); font-size: 12px; margin: 1px 0; white-space: nowrap; }
.chip.won { background: var(--green); color: var(--black); font-weight: 600; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; background: var(--black); color: #fff; margin-left: 5px; vertical-align: 1px; }
/* Status markers in brand tones; meaning stays consistent across the app */
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.st-not-started { background: var(--grey20); }
.st-in-progress { background: #fff; border-color: var(--black); }
.st-submitted { background: var(--black); color: #fff; }
.st-negotiating, .st-pending { background: var(--green-tint); color: var(--ok); }
.st-on-hold { background: var(--grey20); color: var(--muted); }
.st-won, .st-approved { background: var(--green); color: var(--black); font-weight: 600; }
.st-lost, .st-rejected { background: var(--danger-soft); color: #8f2a1e; }
.st-not-quoting { background: #fff; color: var(--muted); border: 1px dashed var(--grey); }
.st-letter-draft { background: var(--grey20); }
.st-letter-pending { background: var(--green-tint); color: var(--ok); }
.st-letter-approved { background: var(--green); color: var(--black); font-weight: 600; }
.st-letter-issued { background: var(--black); color: #fff; }
/* Home (home.js) and Reports (reports.js) */
.home-hi { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 2px 4px; }
#view-home .dash { margin-top: 14px; }
.home-hi h2 { margin: 0; font-family: var(--font-head); font-size: 26px; font-weight: 700; text-transform: uppercase; }
.rep { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.rep-nav { display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); position: sticky; top: 12px; }
.rep-grp { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; color: var(--muted); margin: 10px 8px 4px; }
.rep-grp:first-child { margin-top: 2px; }
.rep-nav button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; }
.rep-nav button:hover { background: var(--grey5); }
.rep-nav button.on { background: var(--green-tint); font-weight: 600; box-shadow: inset 3px 0 0 var(--black); }
.rep-body { margin: 0; min-width: 0; }
@media (max-width: 900px) { .rep { grid-template-columns: minmax(0, 1fr); } .rep-nav { position: static; } }
/* People (people.js): the six-week leave grid (scrolls sideways on phones; the list under it has the same leave) */
.away-grid { display: grid; grid-template-columns: 170px repeat(42, minmax(12px, 1fr)); gap: 2px 1px; align-items: stretch; overflow-x: auto; }
.away-grid .ag-name { font-size: 13px; padding: 3px 8px 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.away-grid .ag-h { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; }
.away-grid .ag-wk { text-align: left; border-left: 1px solid var(--line); padding-left: 4px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; }
.away-grid .ag-d { min-height: 22px; border-radius: 3px; background: var(--grey5); }
.away-grid .ag-d.ag-h { background: none; min-height: 0; }
.away-grid .ag-d.we { background: var(--grey20); opacity: .55; }
.away-grid .ag-d.today { box-shadow: inset 0 0 0 2px var(--black); }
.away-grid .ag-d.off { background: var(--green); opacity: 1; }
.away-grid .ag-d.asked { background: repeating-linear-gradient(45deg, var(--green-tint), var(--green-tint) 3px, #fff 3px, #fff 6px); opacity: 1; }
.ag-key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.ag-key.off { background: var(--green); } .ag-key.asked { background: repeating-linear-gradient(45deg, var(--green-tint), var(--green-tint) 3px, #fff 3px, #fff 6px); border: 1px solid var(--grey20); }
#view-people tr.sel td { background: var(--green-tint); }
/* Timesheets (timesheets.js): the person list beside one person's week, as the Vertex Hub lays it out */
.ts-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.ts-list { padding: 10px; } .ts-list h3 { margin: 6px 8px 10px; }
.ts-person { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; padding: 10px 8px; }
.ts-person > span:first-child { display: grid; gap: 2px; min-width: 0; }
.ts-person:last-child { border-bottom: 0; } .ts-person:hover { background: var(--grey5); }
.ts-person.on { background: var(--green-tint); box-shadow: inset 3px 0 0 var(--black); }
.ts-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: var(--grey5); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ts-add label { display: grid; gap: 4px; flex: 1 1 110px; font-size: 13px; margin: 0; }
@media (max-width: 1180px) { .ts-grid { grid-template-columns: minmax(0, 1fr); } }   /* the side menu takes ~240px */
@media (max-width: 700px) { .away-grid { grid-template-columns: 110px repeat(42, 14px); } .away-grid .ag-wk { font-size: 10px; } }
/* People → Onboarding (onboarding.js, 7 Oct 2026) */
.note { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; background: var(--grey5); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.flag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--green-tint); color: var(--ok); }
.flag.bad { background: var(--danger-soft); color: #8f2a1e; } .flag.warn { background: var(--warn-soft); color: var(--warn); }
a.btn { display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; padding: 6px 13px; color: var(--text); text-decoration: none; }
a.btn:hover { border-color: var(--black); }
.onb-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 10px 0 16px; counter-reset: s; overflow-x: auto; }
.onb-steps li { flex: 1 1 0; min-width: 62px; position: relative; padding: 26px 4px 0; text-align: center; font-size: 12.5px; color: var(--muted); counter-increment: s; }
.onb-steps li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--grey20); color: var(--muted); font-weight: 700; font-size: 12px; line-height: 22px; z-index: 1; }
.onb-steps li::after { content: ""; position: absolute; top: 10px; left: calc(-50% + 12px); right: calc(50% + 12px); height: 2px; background: var(--grey20); }
.onb-steps li:first-child::after { display: none; }
.onb-steps li.done { color: var(--ok); } .onb-steps li.done::before { content: "✓"; background: var(--green); color: var(--black); } .onb-steps li.done::after, .onb-steps li.now::after { background: var(--green); }
.onb-steps li.now { color: var(--black); font-weight: 700; } .onb-steps li.now::before { background: var(--black); color: #fff; }
.onb-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .onb-cols { grid-template-columns: minmax(0, 1fr); } }
.onb-link, .onb-act { border: 1.5px solid var(--green); border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #fff; }
.onb-url { display: flex; gap: 8px; } .onb-url input { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.onb-thumbs { display: flex; gap: 6px; flex-wrap: wrap; min-width: 154px; }
.onb-thumb { display: grid; gap: 2px; justify-items: center; padding: 3px; width: 74px; } .onb-thumb img { width: 66px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--grey20); }
.onb-thumb span { width: 66px; height: 44px; display: grid; place-items: center; background: var(--grey20); border-radius: 6px; font-weight: 700; font-size: 12px; } .onb-thumb small { font-size: 11.5px; color: var(--muted); }
.onb-history { list-style: none; margin: 0; padding: 0; } .onb-history li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; } .onb-history li:first-child { border-top: 0; }
/* Budget changes (budget.js) */
.st-bc-draft, .st-bc-withdrawn { background: var(--grey20); }
.st-bc-submitted { background: var(--green-tint); color: var(--ok); }
.st-bc-approved { background: var(--green); color: var(--black); font-weight: 600; }
.st-bc-sent_back { background: var(--warn-soft); color: var(--warn); }
.st-bc-rejected { background: var(--danger-soft); color: var(--danger); }
.kpi .big.overdue { color: var(--danger); }
.st-pre-start { background: var(--grey20); }
.st-practical-completion { background: var(--green); color: var(--black); font-weight: 600; }
.st-defects-period { background: var(--green-tint); color: var(--ok); }
.st-closed { background: #fff; color: var(--muted); border: 1px dashed var(--grey); }
#job-rows tr { cursor: pointer; }
#job-rows tr:hover { background: var(--green-tint); }
/* Contract lines, and contracts within a job (projects.js, contracts.js; 10 Oct 2026) */
.ln-row { display: grid; grid-template-columns: .8fr 2.6fr 1.2fr 1.1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.ln-row.k { grid-template-columns: .8fr 2.2fr 1fr 1.4fr 1.1fr auto; }
/* Who's on the clock, and clocking them off (feedback #87; clock-off-for.js, People → Timesheets → On the clock) */
.cof-row { padding: 12px 0; border-bottom: 1px solid var(--line); } .cof-row:last-child { border-bottom: 0; }
.cof-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.cof-form { margin-top: 10px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 12px; align-items: end; max-width: 760px; }
.cof-form .count, .cof-btns { grid-column: 1 / -1; } .cof-btns { display: flex; gap: 8px; } .cof-open { margin-top: 8px; }
@media (max-width: 640px) { .cof-form { grid-template-columns: 1fr; } }
/* Employment documents on an onboarding (feedback #90; onboarding-docs.js) */
.onbdoc-list { list-style: none; margin: 0 0 10px; padding: 0; } .onbdoc-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.onbdoc-btns { display: flex; gap: 10px; } .onbdoc-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .onbdoc-add select { width: auto; } .onbdoc-add input[type=file] { flex: 1 1 220px; min-width: 0; }
/* Uniform and PPE (feedback #86; ppe.js, People → Uniform and PPE) */
.ppe-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; align-items: end; }
.ppe-form .ppe-wide { grid-column: 1 / -1; }
.ppe-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 110px; gap: 8px; margin-bottom: 6px; }
@media (max-width: 640px) { .ppe-form { grid-template-columns: 1fr; } .ppe-line { grid-template-columns: minmax(0, 1fr) 90px 80px; } }
.ln-row.ln-gone input, .ln-row.ln-gone select { opacity: .45; text-decoration: line-through; pointer-events: none; }
.ln-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.ln-btns { display: flex; gap: 4px; align-items: center; min-width: 96px; }   /* the same width on every row, so the columns line up */
.k-card { padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--grey5); }
.k-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
@media (max-width: 640px) { .ln-row, .ln-row.k { grid-template-columns: 1fr 1fr; grid-auto-flow: dense; } .ln-row > [name=description], .ln-row > select { grid-column: 1 / -1; } .ln-head { display: none; } }

dialog { width: min(1040px, 96vw); max-height: 92vh; border: 0; border-radius: 16px; padding: 0; overflow: auto; color: var(--text); box-shadow: 0 20px 50px rgba(33, 41, 43, .25); }
dialog::backdrop { background: rgba(33, 41, 43, .55); }
.dlg-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--black); color: #fff; }
.dlg-head h2 { margin: 0; font-size: 18px; flex: 1; font-weight: 700; }
.dlg-head > button { background: none; color: #fff; border-color: #4a5558; }
.dlg-head > button:hover { border-color: var(--green); }
.dlg-head > button.primary { background: var(--green); border-color: var(--green); color: var(--black); }
.dlg-head .tag { background: var(--green); color: var(--black); }
.dlg-head .st-letter-issued, .dlg-head .st-submitted { border-color: #6b777b; }
/* Light status chips would inherit the header's white text */
.dlg-head .st-in-progress, .dlg-head .st-pre-start, .dlg-head .st-not-started, .dlg-head .st-letter-draft { color: var(--black); }
.dlg-body { padding: 18px 20px 24px; background: var(--bg); }
.dlg-body section, .panel, #view-home section, #view-findash section, .rep-body { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.dlg-body h3, .panel h3, #view-home h3, #view-findash h3, .rep-body h3 { margin: 0 0 10px; font-family: var(--font-head); font-size: 19px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.dlg-body h4, .panel h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 16px; align-items: end; }
.grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text); }
.grid label.span2 { grid-column: span 2; }
.grid .wide { grid-column: 1 / -1; }
.grid label.check { flex-direction: row; align-items: center; gap: 8px; min-height: 38px; font-weight: 400; }
.grid label.check input { width: auto; }
.grid > .actions, .grid > button { min-height: 38px; }
.grid button { min-height: 38px; }
@media (max-width: 560px) { .grid label.span2 { grid-column: 1 / -1; } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pkg { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--grey5); }
.quotes td, .quotes th { padding: 6px 8px; }
.inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.inline > * { width: auto; flex: 1 1 130px; }
.inline button { flex: 0 0 auto; }
.history ul { margin: 6px 0 0; padding-left: 18px; }
.log { list-style: none; margin: 12px 0 0; padding: 0; }
.log li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.log li div { flex: 1; }
.changes { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.changes summary { cursor: pointer; color: var(--muted); }
.changes table td, .changes table th { padding: 6px 8px; font-size: 13px; }

.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.contact { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--grey5); }
.contact .name { font-weight: 600; }
.contact .role-line { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.contact .line { font-size: 13px; }
.contact .line a { text-decoration: none; }
.contact .foot { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
button.name-link { border: 0; background: none; padding: 0; color: var(--black); text-align: left; text-decoration: underline; text-decoration-color: var(--grey); text-underline-offset: 2px; }
button.name-link:hover { text-decoration-color: var(--green); text-decoration-thickness: 2px; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.lock { font-size: 12px; color: var(--muted); margin: 0 0 10px; }

.req { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: var(--grey5); }
.req-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.req .reason { margin: 6px 0; font-style: italic; }
.diff { margin: 8px 0; }
.diff td, .diff th { padding: 5px 8px; font-size: 13px; }

.int-list { list-style: none; margin: 8px 0 0; padding: 0; }
.int-list li { padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.int-list li:hover { background: var(--green-tint); }
.kind { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--grey20); white-space: nowrap; border: 1px solid transparent; }
.kind-lunch, .kind-event, .kind-gift { background: var(--green-tint); color: var(--ok); }
.kind-meeting, .kind-site-visit { background: var(--black); color: #fff; }
.kind-phone-call, .kind-email { background: #fff; border-color: var(--grey); }
#int-rows tr { cursor: pointer; }
#int-rows tr:hover { background: var(--green-tint); }
label.check-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); margin-right: 10px; }
label.check-inline input { width: auto; }
fieldset.contents { display: contents; border: 0; margin: 0; padding: 0; }

/* Cashflow grid (forecast.js): forecasts in italics on grey, this month marked green */
.cf td, .cf th { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
.cf td.fc, .fc-key { font-style: italic; color: var(--muted); background: var(--grey5); }
.cf .now { box-shadow: inset 2px 0 0 var(--green); }
.cf tr.total td { font-weight: 700; border-top: 2px solid var(--black); background: var(--grey5); }
.cf tr.sub td { color: var(--muted); font-size: 12px; }
.cf .stick { position: sticky; left: 0; background: var(--panel); }
.cf tbody tr[data-job] { cursor: pointer; }
.cf tbody tr[data-job]:hover td { background: var(--green-tint); }
.fc-key { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; }

#toast { position: fixed; inset: auto; margin: 0; border: 0; overflow: visible; bottom: 24px; left: 50%; transform: translateX(-50%); background: rgba(33, 41, 43, .94); color: #fff; padding: 11px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; }
#toast.error { background: var(--danger); }

/* Project page (project-page.js, 5 Oct 2026): the job fills the screen, with grouped tabs and a dashboard */
dialog.page { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; border-radius: 0; box-shadow: none; }
dialog.page::backdrop { background: var(--bg); }
dialog.page .dlg-body { min-height: calc(100vh - 56px); padding: 0 32px 48px; }
dialog.page .dlg-head { padding: 12px 32px; }
dialog.page .dlg-head h2 { font-size: 15px; }
.jhero { padding: 24px 0 10px; }
.jhero h1 { margin: 4px 0 14px; font-family: var(--font-head); font-size: 40px; font-weight: 700; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.jfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 18px; font-size: 14.5px; }
.jfacts span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 0; }
.kpi { padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.kpi:first-child { background: var(--black); border-color: var(--black); color: #fff; }
.kpi:first-child .label, .kpi:first-child .sub { color: #b9c2c4; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .big { font-family: var(--font-head); font-size: 32px; font-weight: 600; line-height: 1.1; margin: 4px 0 2px; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.jtabs { position: sticky; top: 52px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg); border-bottom: 1px solid var(--line-2); margin: 18px -32px 0; padding: 6px 32px 0; }
.jtabs button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 9px 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.jtabs button:hover { color: var(--black); }
.jtabs button.on { color: var(--black); border-bottom-color: var(--green); }
.jsubs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 14px 0; padding: 3px; background: var(--grey20); border-radius: 12px; max-width: 100%; }
.jsubs button { border: 0; background: none; border-radius: 9px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; }
.jsubs button:hover { background: rgba(255, 255, 255, .6); }
.jsubs button.on { background: #fff; color: var(--black); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }
.jsubs button.planned:not(.on) { color: var(--muted); font-style: italic; }
.planned-page { border-style: dashed !important; box-shadow: none !important; }
.dash { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 14px; }
.issues { list-style: none; margin: 0; padding: 0; }
.issues li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.issues li:first-child { border-top: 0; padding-top: 0; }
.issues .dot { width: 9px; height: 9px; border-radius: 50%; background: #c7ccc9; flex: none; }
.issues .overdue .dot { background: var(--danger); }
.issues .soon .dot { background: #ff9500; }
/* Ready to claim on a job's Overview (job-view.js jobReadySection, 26 Nov 2026) */
.ready-claim { border-left: 4px solid var(--green); }
.rc-list { list-style: none; margin: 10px 0 0; padding: 0; }
.rc-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.rc-list li:first-child { border-top: 0; }
.rc-list strong { display: block; }
.rc-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; }
.rc-ic.ok { background: var(--green-tint); color: var(--ok); }
.rc-ic.no { background: var(--warn-soft); color: var(--warn); }
.rc-ic.opt { background: var(--grey20); color: var(--muted); }
/* Projects list: cards grouped by stage */
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--grey20); }
.seg button { border: 0; border-radius: 8px; background: none; padding: 5px 14px; font-weight: 500; }
.seg button.on { background: #fff; color: var(--black); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }
.pgroup-h { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 4px 10px; }
.pgroup-h h3 { margin: 0; font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.pgroup-h h3 .count { margin-left: 4px; font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 4px 14px rgba(33, 41, 43, .08); }
.pcard > span { display: block; }
.pcard .top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.pcard .nm { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; margin: 8px 0 2px; }
.pcard .who, .pcard .addr { font-size: 13px; color: var(--muted); }
.pcard .val { font-family: var(--font-head); font-size: 28px; font-weight: 600; line-height: 1.1; margin: auto 0 4px; padding-top: 12px; }   /* value, progress and footer sit at the bottom, so cards in a row line up */
.pcard .prog { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.pcard .prog .bar { flex: 1; margin: 0; }
.pcard .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; font-size: 13px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--green-tint); color: var(--ok); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.overdue { background: var(--danger-soft); color: #8f2a1e; }
.pill.soon { background: var(--warn-soft); color: var(--warn); }
.pill.plain, .pill.info { background: var(--grey20); color: var(--muted); }
.pill.bad { background: var(--danger-soft); color: #8f2a1e; }
/* Project delivery (delivery.js) */
.ck-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(160px, 260px); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ck-row.done label { color: var(--muted); text-decoration: line-through; }
.log-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ph { height: 90px; border-radius: 10px; background: var(--grey20); text-align: left; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; font-size: 12.5px; }
.ph span { color: var(--muted); font-size: 11.5px; }
.ph { cursor: zoom-in; }
/* Site diary entries (feedback #7, 8 Oct 2026): each reads on its own, photos as thumbnails that open full size */
.dy-entry { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; background: #fff; }
.dy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dy-head h4 { margin: 0 0 2px; font-size: 15px; }
.dy-body { margin: 10px 0 0; display: grid; gap: 8px; }
.dy-body dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dy-body dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dy-pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dy-pic { padding: 0; width: 120px; height: 90px; overflow: hidden; border: 1px solid var(--line); background: var(--grey20); cursor: zoom-in; }
.dy-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
dialog.ph-zoom { width: auto; max-width: 96vw; max-height: 96vh; background: transparent; box-shadow: none; overflow: visible; cursor: zoom-out; }
dialog.ph-zoom::backdrop { background: rgba(16, 20, 21, .88); }
.ph-zoom figure { margin: 0; display: grid; gap: 8px; justify-items: center; }
.ph-zoom img { display: block; max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: 8px; background: #fff; }
.ph-zoom figcaption { color: #fff; font-size: 13px; text-align: center; }
.ph-zoom figcaption span { display: block; opacity: .7; font-size: 12px; }
.dw-tbl { width: 100%; max-width: 640px; margin-bottom: 4px; }
.dw-tbl td, .dw-tbl th { padding: 4px 6px; }
canvas.sigpad { width: 100%; max-width: 600px; height: 180px; border: 1px dashed var(--line-2); border-radius: 10px; background: #fff; display: block; margin: 10px 0; }
@media (max-width: 640px) { .ck-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } }
/* a bill checked in the ERP (erp-bill-view.js, feedback #36): the PDF fixed on the left, everything else scrolling on the right */
#dlg-ebill[open] { display: flex; flex-direction: column; overflow: hidden; }
#dlg-ebill .eb-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); gap: 14px; padding: 12px 20px 0; }
.eb-left { display: flex; flex-direction: column; min-height: 0; margin: 0 0 12px; padding: 10px; }
.eb-pdf { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.eb-pdf iframe { flex: 1; width: 100%; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.eb-pdf-open { font-size: 12px; margin-top: 6px; }
.eb-right { overflow-y: auto; min-height: 0; padding: 0 4px 40px 0; }
.eb-right section { padding: 12px 16px; margin-bottom: 10px; }
.eb-right h3 { font-size: 16px; margin-bottom: 8px; }
.eb-right .banner { margin: 0 0 8px; }
.eb-checks details summary { cursor: pointer; }
.eb-checks details p { margin: 4px 0 0; }
.eb-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; align-items: end; }
.eb-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 500; color: var(--muted); }
.eb-form input, .eb-form select { min-height: 34px; padding: 6px 10px; color: var(--text); }
.eb-form .s2 { grid-column: span 2; } .eb-form .s3 { grid-column: span 3; } .eb-form .s4 { grid-column: 1 / -1; }
.eb-lines-head { display: flex; align-items: baseline; gap: 12px; } .eb-lines-head h3 { flex: 1; }
.eb-all { display: flex; align-items: center; gap: 6px; } .eb-all input { width: auto; min-height: 0; }
.eb-cols, .eb-l1 { display: grid; grid-template-columns: minmax(0, 1fr) 70px 100px 100px; gap: 8px; align-items: start; }
.eb-cols.edit, .eb-l1.edit { grid-template-columns: 18px 18px minmax(0, 1fr) 70px 100px 100px 22px; }
.eb-cols { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 10px 4px; }
.eb-line { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; background: var(--panel); }
.eb-line.sel { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.eb-line input, .eb-line select, .eb-line textarea { min-height: 32px; padding: 5px 8px; font-size: 13px; }
.eb-l1 input[type=checkbox] { width: auto; min-height: 0; margin-top: 9px; }
.eb-l1 .num { text-align: right; }
.eb-no { font-size: 11px; color: var(--muted); margin-top: 9px; text-align: center; }
.eb-item { display: flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; } .eb-item textarea { flex: 1 1 180px; min-width: 0; } .eb-item .eb-code { flex: 0 1 90px; min-width: 60px; }
.eb-ok { font-weight: 400; font-family: var(--font-body, inherit); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.eb-l1 .link { margin-top: 6px; }
.eb-l2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 8px; margin: 6px 0 0 44px; }
.eb-l2 label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
.eb-coded { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.eb-sum { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.eb-bulk { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--grey5, #f3f5f5); box-shadow: var(--shadow); }
.eb-bulk select { max-width: 220px; }
@media (max-width: 900px) {
  #dlg-ebill[open] { display: block; overflow: auto; }
  #dlg-ebill .eb-split { display: block; padding: 10px 12px 0; }
  .eb-pdf iframe { flex: none; height: 55vh; }
  .eb-right { overflow: visible; padding: 0 0 40px; }
  .eb-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .eb-form .s3 { grid-column: 1 / -1; }
  .eb-cols { display: none; }
  .eb-l1.edit { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 22px; }
  .eb-l1.edit .eb-no { display: none; } .eb-l1.edit .eb-item { grid-row: 1; grid-column: 2 / 5; } .eb-l1.edit .link { grid-row: 1; grid-column: 5; }
  .eb-l1.edit [data-eb-l=qty] { grid-row: 2; grid-column: 2; } .eb-l1.edit [data-eb-l=unit_price] { grid-row: 2; grid-column: 3; } .eb-l1.edit [data-eb-l=amount] { grid-row: 2; grid-column: 4; }
  .eb-l1:not(.edit) { grid-template-columns: repeat(3, minmax(0, 1fr)); } .eb-l1:not(.edit) > div:first-child { grid-column: 1 / -1; }
  .eb-l2 { margin-left: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Purchase orders (purchase-orders.js, 6 Oct 2026): list with a preview, progress steps, totals (as in the Vertex Hub) */
.po-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.po-split.with-prev { grid-template-columns: minmax(0, 1fr) 340px; }
.po-prev { margin: 0; position: sticky; top: 16px; }
tr.sel td { background: var(--green-tint); }
.po-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.po-steps > div { display: flex; gap: 10px; align-items: flex-start; }
.po-steps .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.po-steps .on .tick { background: var(--green); border-color: var(--green); color: var(--black); }
.seg { flex-wrap: wrap; max-width: 100%; }   /* every page (10 Oct 2026: Feedback's filters ran off a phone screen) */
.seg button { white-space: nowrap; }
/* Settings → Purchasing: the accounts for purchase orders and bills */
.set-accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 18px; }
.set-acc { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; margin: 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.set-acc input { margin-top: 3px; }
#view-bills tbody tr[data-bill-row]:hover td { background: var(--green-tint); }
/* Settings: the team as a people list + one person's card (role, switches like the Who Can Do What cheat sheet, details) */
#view-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
#view-settings .panel { margin: 0; min-width: 0; }
.set-cols { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .set-cols { grid-template-columns: minmax(0, 1fr); } }
.set-list { display: grid; gap: 8px; min-width: 0; }
.set-people { list-style: none; margin: 0; padding: 0; max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.set-people li + li { border-top: 1px solid var(--line); }
.set-people button { width: 100%; text-align: left; border: 0; border-radius: 0; background: #fff; padding: 9px 12px; display: grid; gap: 1px; }
.set-people button:hover { background: var(--grey5); }
.set-people button b { font-weight: 600; }
.set-people button > span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.set-people button[aria-current="true"] { background: var(--green-tint); box-shadow: inset 3px 0 0 var(--black); }
.set-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; }
.set-head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.set-head h2 { margin: 0 0 2px; font-family: var(--font-head); font-size: 28px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.set-head > div { min-width: 0; max-width: 100%; } .set-head h2, .set-head .count { overflow-wrap: anywhere; }   /* a long email as the name fits a phone */
.set-rolepick { display: grid; gap: 4px; font-size: 13px; font-weight: 600; min-width: 220px; }
.set-rolepick .count { font-weight: 400; }
.set-grp { margin: 18px 0 4px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 15px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.set-row small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.set-row.custom { background: var(--green-tint); }
.set-row.dirty { box-shadow: inset 0 0 0 2px var(--green-dark); }
.set-ctl { display: grid; grid-template-columns: 160px 200px; align-items: center; gap: 14px; }
.set-ctl select { width: 100%; min-width: 0; }
@media (max-width: 640px) { .set-row { grid-template-columns: minmax(0, 1fr); } .set-ctl { grid-template-columns: minmax(0, 160px) minmax(0, 1fr); } }
.pm { border-collapse: separate; border-spacing: 0; width: 100%; }
.pm th, .pm td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pm thead th { text-align: center; font-weight: 600; white-space: normal; border-bottom: 1px solid var(--black); }
.pm tbody th { text-align: left; min-width: 200px; max-width: 300px; font-weight: 600; white-space: normal; }
.pm tbody th small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; line-height: 1.35; margin-top: 2px; }
.pm td { text-align: center; }
.pm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green-dark); margin-left: 6px; vertical-align: middle; }
.tg { width: 42px; height: 24px; border-radius: 999px; border: 0; background: var(--grey20); position: relative; padding: 0; vertical-align: middle; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .15s; }
.tg[aria-checked="true"] { background: var(--black); }
.tg[aria-checked="true"]::after { left: 21px; background: var(--green); }
.tg:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.pm-bar { position: sticky; bottom: 12px; z-index: 4; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; background: var(--black); color: #fff; border-radius: 12px; }
.pm-bar button:not(.primary) { background: transparent; color: #fff; border-color: #5b6669; }
.pm-roles thead th { min-width: 100px; font-size: 12.5px; }
.pm-roles td { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .tg::after { transition: none; } }
.po-totals { display: grid; grid-template-columns: auto 130px; gap: 4px 16px; justify-content: end; margin-top: 10px; text-align: right; }
@media (max-width: 1100px) { .po-split.with-prev { grid-template-columns: minmax(0, 1fr); } .po-prev { position: static; } }

/* Feedback page (Owner; feedback-admin.js). The button and its window style themselves (feedback.js) */
.fbx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.fbx-detail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; border-radius: 16px; }
.fbx-row { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); }
.fbx-row:hover { border-color: var(--grey); }
.fbx-row.sel { border-color: var(--black); box-shadow: 0 0 0 2px var(--green); }
.fbx-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.fbx-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fbx-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.fbx-triage { background: var(--grey5); border-radius: 10px; padding: 8px 10px; font-size: 13px; display: grid; gap: 2px; }
.fbx-thumb { width: 96px; height: 64px; object-fit: cover; object-position: top left; border-radius: 8px; border: 1px solid var(--line); flex: none; background: var(--grey20); }
.fbx-pics { display: flex; gap: 10px; flex-wrap: wrap; }
.fbx-pics a { display: grid; gap: 4px; text-decoration: none; }
.fbx-pics img { width: 220px; max-width: 100%; height: 140px; object-fit: cover; object-position: top left; border-radius: 10px; border: 1px solid var(--line); background: var(--grey20); }
.fbx-h { margin: 18px 0 8px; font-family: var(--font-head); text-transform: uppercase; font-size: 16px; letter-spacing: .02em; }
.fbx-hist { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.fbx-note { margin-top: 4px; padding: 6px 10px; background: var(--grey5); border-radius: 8px; white-space: pre-wrap; }
.fbx-log { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; display: grid; gap: 4px; word-break: break-word; }
.fbx-back { display: none; }
@media (max-width: 1100px) { .fbx-split { grid-template-columns: minmax(0, 1fr); } .fbx-split.has-sel .fbx-list { display: none; } .fbx-detail { position: static; max-height: none; } .fbx-back { display: inline; } }

@media (max-width: 640px) {
  header, main { padding-left: 16px; padding-right: 16px; }
  dialog.page .dlg-body { padding: 0 16px 40px; }
  dialog.page .dlg-head { padding: 12px 16px; }
  .jtabs { margin: 14px -16px 0; padding: 4px 16px 0; }
  .pagehead h1, .jhero h1 { font-size: 32px; }
  .grid label.span2 { grid-column: 1 / -1; }
  .filters .primary { margin-left: 0; }
  .facts { grid-template-columns: 1fr; }
  .dlg-head { flex-wrap: wrap; row-gap: 8px; }   /* a long title, its status and Close fit a phone (10 Oct 2026: Close was off the edge) */
  .dlg-head h2 { min-width: 0; flex: 1 1 60%; overflow-wrap: anywhere; }
}

/* Job cashflow (job-cashflow.js, 26 Nov 2026): tiles, actual months shaded, forecast months in italics, groups that open */
.kpis.jc-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 14px; }
.jc-tiles .kpi { padding: 12px 16px; } .jc-tiles .kpi .big { font-size: 24px; }
.cf.jc td.past, .cf.jc th.past { background: var(--grey5); }
.cf.jc td.ahead { font-style: italic; }
.cf.jc td.neg { color: var(--danger); }
.cf.jc tr.jc-head td { border: 0; background: none; padding-top: 14px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cf.jc tr.jc-code td:first-child, .cf.jc tr.sub td:first-child { padding-left: 26px; }
.cf.jc tr.jc-edit td:first-child { padding-left: 8px; }
.cf.jc tr.jc-grp button.link { font-weight: 700; color: inherit; text-decoration: none; }
.cf.jc tr.jc-net td { font-weight: 700; border-top: 1px solid var(--line); }
.cf.jc tr.jc-run td { font-weight: 700; background: var(--green-tint); }
.cf.jc tr.jc-run td.stick { background: var(--green-tint); }
.cf.jc tr.jc-edit input { width: 92px; text-align: right; padding: 3px 5px; font-style: normal; }
.cf.jc td.stick { white-space: normal; min-width: 210px; max-width: 290px; }
@media (max-width: 640px) {
  .kpis.jc-tiles { grid-template-columns: 1fr 1fr; gap: 8px; } .jc-tiles .kpi { padding: 10px 12px; } .jc-tiles .kpi .big { font-size: 19px; }
  .cf.jc td.stick, .cf.jc th.stick { min-width: 0; max-width: 150px; white-space: normal; } }

/* ---------- Tables (Adam's #95, Gareth's #92, 27 Nov 2026; table-tools.js) ---------- */
/* A long table scrolls inside its box, so its headings stay in view; the box is never taller than the screen */
.table-wrap { max-height: calc(100vh - 96px); overflow: auto; }
.table-wrap > table > thead th { position: sticky; top: 0; z-index: 2; background-clip: padding-box; box-shadow: inset 0 -1px 0 var(--line-2); }
.table-wrap > table > thead th.stick, .table-wrap > table > thead th.lb-name { z-index: 3; }
.cf td.stick { z-index: 1; }
/* Drag a heading's right edge to change the column's width */
.tt-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 4; touch-action: none; }
.tt-grip::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: 0; width: 1px; background: var(--line-2); }
.tt-grip:hover::after, .tt-grip.on::after { top: 0; bottom: 0; width: 3px; right: 0; background: var(--green-dark); }
body.tt-resizing, body.tt-resizing * { cursor: col-resize !important; user-select: none; }
.tt-fixed th, .tt-fixed td { overflow: hidden; text-overflow: ellipsis; }
/* A scroll bar you can see under a box wider than the screen (iPads and phones hide their own) */
.tt-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 6px; margin: 4px 0 0; padding: 4px 2px; background: var(--panel); border-radius: 10px; }
.tt-bar button { min-height: 30px; width: 34px; padding: 0; justify-content: center; font-size: 18px; line-height: 1; }
.tt-bar button:disabled { opacity: .35; }
.tt-track { position: relative; flex: 1; height: 12px; border-radius: 6px; background: var(--grey20); cursor: pointer; }
.tt-thumb { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--grey); cursor: grab; touch-action: none; }
.tt-thumb.on, .tt-thumb:hover { background: var(--black); }
/* The cost plan's Line column wraps instead of pushing the months off the screen (#92) */
.cf td.stick, .cf th.stick { white-space: normal; width: 300px; min-width: 220px; }
@media (max-width: 640px) { .cf td.stick, .cf th.stick { width: 170px; min-width: 150px; } }

/* ---------- Approvals: bills waiting on a project manager (#97) ---------- */
details.appr-team > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
details.appr-team > summary::-webkit-details-marker { display: none; }
details.appr-team > summary h3 { margin: 0; }
details.appr-team > summary h3::before { content: "▸ "; color: var(--grey); }
details.appr-team[open] > summary h3::before { content: "▾ "; }
details.appr-team[open] > summary { margin-bottom: 10px; }

/* ---------- Side menu: headings and the pages under them read as two levels (Adam's #96) ---------- */
#tabs .nv-sg, #tabs .nv-open > .nv-s { font-family: var(--font-head); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #eef1f1; margin-top: 4px; }
#tabs .nv-sg.has-on { color: var(--green); }
#tabs .nv-ss { margin: 0 0 4px 10px; padding-left: 8px; border-left: 1px solid #4a5558; }
#tabs .nv-s2 { min-height: 30px; font-size: 13.5px; color: #a9b3b5; }
#tabs .nv-s2:hover { color: #fff; }
#tabs .nv-items .nv-i { font-size: 14px; color: #b5bec0; }
.cf td.ct-line .ct-more { display: block; }   /* (#92) qty, POs and billed under the description */
