/* site.css — shared shell + components for every page of the Site Manager app.
   Mobile-first: phones get a compact header and a fixed 5-tab bottom bar (the rest of the menu opens in a "More"
   sheet, built by shell.js); ≥768px gets the sticky sidebar with everything listed.
   Page-specific rules live in <page>.css. House style (30/09/2026): BCP red on a light neutral canvas, Arial,
   no serif headings. Colours are tokens — change them here, not in page files. */
:root{
  --red:#C00A27; --red-hover:#A80922; --oxblood:#8A0A1C; --oxblood-dark:#6E0816;
  --gold:#5F6570; --gold-light:#F7DDE0;
  --cream:#F4F5F7; --surface-2:#EEF0F3; --panel:#FFFFFF;
  --border:#D5D9DF; --border-strong:#7E8791;
  --ink:#1B1F24; --muted:#5B6068;
  --ok:#1F6B3A; --ok-bg:#E3F3E8; --warn:#8A4B00; --warn-bg:#FFF1DB; --bad:#C00A27; --bad-bg:#F7DDE0; --muted-bg:#EEF0F3;
  --font:Arial,"Helvetica Neue",Helvetica,-apple-system,"Segoe UI",Roboto,sans-serif;
  --r-sm:8px; --r:12px; --r-pill:999px;
  --header-h:56px; --nav-h:64px; --safe-b:env(safe-area-inset-bottom,0px);
  --shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.10); --shadow-hover:0 8px 24px rgba(16,24,40,.12);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(138,10,28,.15)}   /* BCP red, never the browser's blue tap flash */
/* the picked day / month / year in a date box: BCP red, not the browser's blue */
/* the focused day / month / year / hour / minute segment in BCP red, not the browser's blue — Chromium only honours :focus-within on
   these segments, not :focus (audit3 UI-01) */
input::-webkit-datetime-edit-day-field:focus-within,input::-webkit-datetime-edit-month-field:focus-within,input::-webkit-datetime-edit-year-field:focus-within,input::-webkit-datetime-edit-hour-field:focus-within,input::-webkit-datetime-edit-minute-field:focus-within,input::-webkit-datetime-edit-ampm-field:focus-within{background:#8A0A1C;color:#fff}
html,body{margin:0;min-height:100%}
body{font-family:var(--font);font-size:16px;line-height:1.45;background:var(--cream);color:var(--ink)}
h1,h2,h3{font-family:inherit;font-weight:700;letter-spacing:-.01em;margin:0}
button{font-family:inherit}
:focus-visible{outline:3px solid var(--red);outline-offset:2px;border-radius:4px}
#loading{padding:60px 20px;text-align:center;color:var(--muted)}

/* ---------- header ---------- */
header{position:sticky;top:0;z-index:30;height:var(--header-h);background:var(--panel);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 14px}
header .logo{display:flex;align-items:center;flex:0 0 auto;min-height:44px}   /* 44px tap target (house rule) */
header img{height:26px}
header .title{flex:1;min-width:0;font-weight:700;font-size:14px;color:var(--oxblood);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
header .title-job{display:none;font-weight:normal;color:var(--muted)}
header .who{display:none;text-align:right;font-size:13px;line-height:1.25;color:var(--ink)}
header .who .role{font-size:12px;color:var(--muted)}
header .signout{flex:0 0 auto;min-height:44px;padding:6px 10px;background:none;border:1px solid var(--oxblood);color:var(--oxblood);border-radius:var(--r-sm);font:bold 12px var(--font);cursor:pointer}
header select{width:auto;max-width:40%;font-size:16px;min-height:44px;padding:6px 8px;border:1px solid var(--border-strong);border-radius:var(--r-sm);background:#fff;font-family:inherit}
#netbar{display:none;position:sticky;top:var(--header-h);z-index:29;background:var(--warn-bg);color:var(--warn);font-size:14px;font-weight:bold;padding:10px 16px;text-align:center}
body.offline #netbar{display:block}

/* ---------- shell: phone = single column + fixed bottom tab bar ---------- */
.shell{display:block}
main{padding:16px 16px calc(var(--nav-h) + 24px + var(--safe-b))}
.page-wrap{max-width:920px}
.page-wrap.narrow{max-width:600px}
nav.sidebar{position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(var(--nav-h) + var(--safe-b));padding:0 4px var(--safe-b);background:var(--panel);border-top:1px solid var(--border);box-shadow:0 -2px 8px rgba(16,24,40,.06);display:flex;align-items:stretch;overflow:hidden}
nav.sidebar .navitem{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px 2px;background:none;border:0;border-top:3px solid transparent;color:var(--muted);font:12px/1.1 var(--font);text-align:center;text-decoration:none;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}   /* 12px, never smaller (audit 01/11/2026, D10) */
nav.sidebar .navitem svg{width:22px;height:22px;flex:0 0 22px;stroke:currentColor}
nav.sidebar .navitem.active{color:var(--red);border-top-color:var(--red);font-weight:bold}
nav.sidebar .navitem.nav-overflow{display:none}   /* on phones these live in the More sheet (shell.js) */
/* audit 19/11/2026 (design-brand-02): the Buyer's 'Material orders' was cut to 'Material order…' — it wraps to two lines, its icon level with the rest */
@media (max-width:767px){nav.sidebar #navOrders{white-space:normal;justify-content:flex-start;gap:2px;padding-top:11px;line-height:1.05}}
nav.sidebar .spacer{display:none}
nav.sidebar .bottom{display:contents}
/* one order for every page, grouped by how often the work comes up (the owner 30/10/2026: "too many items, make it collapsable,
   organise better by relevance"); shell.js adds the group headings on desktop and in the More sheet:
   TODAY  Dashboard · Site calendar · Deliveries · Site sign-in · Site diary · Notices  |  SAFETY  Permits · Checklists · Inductions ·
   Environment  |  DESIGN & QUALITY  RFIs · QA  |  TEAM & TRADES  Team · Personnel · Trades · Directory · Site feedback  |
   COMMERCIAL & REPORTS  On Site Hire · Monthly report (Material orders: in Today, after Deliveries — 02/11/2026)  |  ADMIN  Projects · Settings  |  UNDER DEVELOPMENT (the Super Admin) */
nav.sidebar .nav-group{order:0}
nav.sidebar .nav-group[data-group="today"]{order:1} nav.sidebar #navDashboard,nav.sidebar #navFirm,nav.sidebar #navDesign{order:2} nav.sidebar #navCalendar{order:3} nav.sidebar #navDeliveries{order:4} nav.sidebar #navOrders{order:4} nav.sidebar #navDiary{order:6} nav.sidebar #navNotices{order:7}
nav.sidebar .nav-group[data-group="safety"]{order:10} nav.sidebar #navPermits{order:11} nav.sidebar #navChecklists{order:12} nav.sidebar #navInductions{order:13} nav.sidebar #navOnsite{order:14} nav.sidebar #navTbt{order:15} nav.sidebar #navHavs{order:16} nav.sidebar #navMeter{order:17} nav.sidebar #navHsPack{order:18}
nav.sidebar .nav-group[data-group="quality"]{order:20} nav.sidebar #navRfi{order:21} nav.sidebar #navQA{order:22}
nav.sidebar .nav-group[data-group="team"]{order:30} nav.sidebar #navTeam{order:31} nav.sidebar #navPersonnel{order:32} nav.sidebar #navTrades,nav.sidebar #navTrade{order:33} nav.sidebar #navDirectory{order:34} nav.sidebar #navFeedback{order:35}
nav.sidebar .nav-group[data-group="commercial"]{order:40} nav.sidebar #navHire{order:41} nav.sidebar #navMonthly{order:42}
nav.sidebar .nav-group[data-group="admin"]{order:50} nav.sidebar #navProjects{order:51} nav.sidebar #navSettings{order:52}
nav.sidebar .nav-group[data-group="dev"]{order:60} nav.sidebar #navPhasing{order:61} nav.sidebar #navMeeting{order:62} nav.sidebar #navTrailDev{order:63} nav.sidebar #navOffice{order:64} nav.sidebar #navRemoved{order:66} nav.sidebar #navPhotoRecovery{order:67} nav.sidebar #navAudit{order:68}
body.nav-dev-rfi nav.sidebar #navRfi{order:65}   /* RFIs: under development for the Super Admin until released */
body.nav-no-dev nav.sidebar #navOffice{order:44}   /* a director's Head office: Commercial & reports (Material orders are there for everyone) */
nav.sidebar .spacer{order:70} nav.sidebar .bottom{order:80}
nav.sidebar .nav-more{order:99}   /* More is always the last tab on a phone (audit 07/10: it sat between Permits and QA for contractors) */
nav.sidebar .nav-group{display:none}
body.in-wizard nav.sidebar{display:none}
body.in-wizard main{padding-bottom:24px}

/* "More" bottom sheet (phones) */
.more-sheet{position:fixed;inset:0 0 calc(var(--nav-h) + var(--safe-b)) 0;z-index:40;display:none}   /* above the tab bar, so More closes it again (audit 01/11/2026, D04) */
.more-sheet.open{display:block}
.more-sheet .ms-bg{position:absolute;inset:0;background:rgba(16,24,40,.45)}
.more-sheet .ms-panel{position:absolute;left:0;right:0;bottom:0;background:var(--panel);border-radius:16px 16px 0 0;padding:10px 12px calc(16px + var(--safe-b));box-shadow:0 -8px 30px rgba(16,24,40,.2);max-height:82vh;overflow:auto}
.more-sheet .ms-handle{display:block;width:40px;height:4px;border-radius:2px;background:var(--border-strong);margin:0 auto 10px}
/* the top of the sheet: the grey handle (a button now — tap it to close) and a plain Close button, both 44px (audit 01/11/2026, D04) */
.more-sheet .ms-top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;margin:-4px 0 4px}
.more-sheet button.ms-handle{grid-column:2;position:relative;width:88px;height:44px;margin:0;padding:0;border:0;border-radius:var(--r-sm);background:none;cursor:pointer}
.more-sheet button.ms-handle::before{content:"";position:absolute;left:24px;right:24px;top:20px;height:4px;border-radius:2px;background:var(--border-strong)}
.more-sheet .ms-close{grid-column:3;justify-self:end;display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:6px 12px;border:1px solid var(--border-strong);border-radius:var(--r-pill);background:var(--panel);color:var(--ink);font:bold 14px var(--font);cursor:pointer}
.more-sheet .ms-close span{font-size:20px;line-height:1;color:var(--oxblood)}
.more-sheet .ms-who{font-size:13px;color:var(--muted);padding:2px 8px 10px;border-bottom:1px solid var(--border);margin-bottom:6px}
.more-sheet .ms-who b{color:var(--ink)}
.more-sheet .navitem{display:flex;flex-direction:row;align-items:center;gap:14px;width:100%;min-height:52px;padding:10px 12px;border:0;border-radius:var(--r-sm);background:none;color:var(--ink);font:16px var(--font);text-align:left;text-decoration:none;cursor:pointer}
.more-sheet .navitem svg{width:22px;height:22px;flex:0 0 22px;stroke:currentColor;color:var(--oxblood)}
.more-sheet .navitem.active{background:var(--gold-light);color:var(--oxblood);font-weight:bold}
/* group headings in the More sheet, folding like the desktop menu's */
.ng-chev{width:14px;height:14px;flex:0 0 14px;stroke:currentColor;transition:transform .15s}
[aria-expanded="false"] > .ng-chev{transform:rotate(-90deg)}
.more-sheet .ms-group{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin:6px 0 0;padding:10px 12px 4px;border:0;background:none;color:var(--muted);font:bold 12px var(--font);letter-spacing:.1em;text-transform:uppercase;text-align:left}
.more-sheet button.ms-group{cursor:pointer}
.more-sheet .navitem.ng-shut{display:none}
.more-sheet .ms-signout{margin-top:8px;border-top:1px solid var(--border);padding-top:10px}
.more-sheet .ms-signout button{width:100%}

@media (min-width:768px){
  :root{--header-h:60px}
  body{font-size:15px}
  header{padding:0 22px;gap:14px}
  header img{height:32px}
  header .title{font-size:16px}
  header .title-job{display:inline}
  .shell{display:flex;align-items:stretch;min-height:calc(100vh - var(--header-h))}
  /* the menu holds beside the page with its own scroll, and its scrollbar always shows (a Mac hides the default one, so the Super Admin
     menu — taller than a laptop screen — looked cut off). Rolling the page also rolls the menu the same way, so the bottom sections
     arrive as the page goes down and come back as it goes up (shell.js navFollow; Janis 30/10/2026: "I can't roll down to the
     bottom sections" … "ok to have scroll, just need to get to the bottom") */
  nav.sidebar{position:sticky;top:var(--header-h);left:auto;right:auto;bottom:auto;align-self:flex-start;height:calc(100vh - var(--header-h));width:240px;flex:0 0 240px;flex-direction:column;align-items:stretch;overflow:auto;overflow-x:hidden;padding:18px 0;border-top:0;border-right:1px solid var(--border);box-shadow:none;scrollbar-width:thin;scrollbar-color:#cfc6c4 transparent}
  nav.sidebar::-webkit-scrollbar{width:8px}
  nav.sidebar::-webkit-scrollbar-track{background:transparent}
  nav.sidebar::-webkit-scrollbar-thumb{background:#cfc6c4;border-radius:8px;border:2px solid var(--panel)}
  nav.sidebar::-webkit-scrollbar-thumb:hover{background:var(--muted)}
  nav.sidebar .navitem{flex:0 0 auto;min-width:0;width:100%;flex-direction:row;justify-content:flex-start;gap:12px;padding:11px 22px;min-height:44px;border-top:0;border-left:3px solid transparent;color:var(--ink);font-size:14px;line-height:1.2;text-align:left;font-weight:normal;white-space:normal;overflow:visible}
  nav.sidebar .navitem.nav-overflow{display:flex}
  nav.sidebar .navitem.nav-more{display:none}
  nav.sidebar .navitem svg{width:18px;height:18px;flex-basis:18px;color:var(--oxblood)}
  nav.sidebar .navitem.active{background:var(--gold-light);border-left-color:var(--red);color:var(--oxblood);font-weight:bold}
  nav.sidebar .spacer{display:block;flex:1}
  nav.sidebar .nav-group{display:block;font-size:12px;font-weight:bold;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:16px 22px 4px}
  nav.sidebar .nav-group[data-group="today"]{padding-top:0}
  /* a group heading folds its items away (shell.js remembers it on this device); Today always stays open */
  nav.sidebar button.nav-group{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;width:100%;min-height:44px;margin:0;padding:14px 14px 6px 22px;border:0;border-radius:0;background:none;font-family:var(--font);text-align:left;cursor:pointer}
  nav.sidebar button.nav-group:hover{color:var(--oxblood)}
  nav.sidebar button.nav-group:focus-visible{outline-offset:-3px}
  nav.sidebar .navitem.ng-shut,nav.sidebar .nav-group.empty{display:none}
  /* the section headings stand out as BCP-red bars, their pages sit indented underneath (Janis 30/10/2026: "make the drop down
     sections coloured so they stand out the topic and then info below separate to the title") */
  nav.sidebar .nav-group,nav.sidebar button.nav-group{display:flex;align-items:center;justify-content:space-between;gap:8px;width:auto;min-height:32px;margin:10px 10px 2px;padding:5px 12px;border:1px solid var(--border);border-top:3px solid var(--red);border-radius:8px;background:var(--panel);box-shadow:0 1px 2px rgba(0,0,0,.05);color:var(--oxblood);font-size:12px;letter-spacing:.06em}   /* 12px (audit 01/11/2026, D10) */
  nav.sidebar .nav-group[data-group="today"]{margin-top:0;padding:7px 12px}
  nav.sidebar button.nav-group{min-height:36px}
  @media (pointer:coarse){nav.sidebar button.nav-group{min-height:44px}}   /* a finger on the iPad: 44px (audit 01/11/2026, D09) */
  nav.sidebar button.nav-group:hover{background:var(--gold-light);color:var(--oxblood)}
  nav.sidebar button.nav-group:focus-visible{outline:3px solid var(--red);outline-offset:-3px}
  nav.sidebar .nav-group svg{color:var(--oxblood);stroke:var(--oxblood)}
  nav.sidebar .navitem{padding:9px 22px 9px 30px;margin:0 10px 0 0}
  nav.sidebar .nav-group.empty{display:none}
  nav.sidebar .bottom{display:contents}   /* Directory and Settings sit in their groups (Team & trades, Admin) */
  main{flex:1;min-width:0;padding:28px 30px 60px}
  body.in-wizard nav.sidebar{display:flex}
  body.in-wizard main{padding-bottom:60px}
  .more-sheet{display:none!important}
  /* centre the page in the space beside the menu (it used to sit against the menu with a gap on the right) */
  main > .page-wrap, main > .section{margin-left:auto;margin-right:auto}
  main > .section{max-width:1180px}
  .quiz-wrap{margin-left:auto;margin-right:auto}
}
/* wide screens and second monitors: use more of the width */
@media (min-width:1280px){
  .page-wrap{max-width:1120px}
  main{padding-left:40px;padding-right:40px}
}

/* ---------- page furniture ---------- */
.page-title{font-size:24px;color:var(--ink);font-weight:700;margin:0 0 4px;letter-spacing:-.02em}
.page-sub{margin:0 0 18px;font-size:14px;color:var(--muted)}
h2.section-h{font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:24px 0 10px;font-weight:700}
h2.section-h:first-child{margin-top:0}
.empty-note{font-size:14px;color:var(--muted)}
.count-banner{background:var(--gold-light);border:0;border-radius:var(--r-sm);padding:10px 14px;font-size:14px;color:var(--oxblood);font-weight:bold;margin-bottom:16px}
.note,.hint{font-size:13px;color:var(--muted);margin-top:10px;line-height:1.5}
.hint a,.note a{color:var(--oxblood)}
a:not([class]),.set-note a,.exp-h a{color:var(--oxblood)}   /* never browser blue (audit 07/10) */
.msg{font-size:14px;margin-top:10px}
.msg.error{color:var(--red)}
.msg.ok{color:var(--ok)}
.date-label{font-size:12px;font-weight:bold;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin:14px 0 6px}
.date-label:first-child{margin-top:0}
.skeleton{height:56px;border-radius:var(--r);margin-bottom:8px;background:linear-gradient(90deg,var(--surface-2) 25%,#fff 50%,var(--surface-2) 75%);background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{from{background-position:200% 0}to{background-position:-200% 0}}

/* ---------- cards (dashboard tiles, permit types, projects) ---------- */
.grid{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width:520px){.grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}}
.card{display:block;background:var(--panel);border:1px solid var(--border);border-radius:var(--r);padding:16px 18px;box-shadow:var(--shadow);color:inherit;text-decoration:none;text-align:left;font-family:inherit;font-size:15px;width:100%}
.card h3{font-size:16px;color:var(--ink);font-weight:700;margin:0 0 4px}
.card p{margin:0;font-size:13px;color:var(--muted);line-height:1.45}
.card.link{cursor:pointer;transition:box-shadow .15s,transform .15s}
.soon{display:inline-block;margin-top:10px;font-size:12px;font-weight:bold;background:var(--warn-bg);color:var(--warn);padding:3px 10px;border-radius:var(--r-pill);text-transform:uppercase;letter-spacing:.05em}
.placeholder{background:var(--panel);border-radius:var(--r);border:1px dashed var(--border-strong);padding:44px 20px;text-align:center;color:var(--muted)}

/* ---------- list rows (permits, deliveries, records) ---------- */
.list-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;margin-bottom:8px;box-shadow:var(--shadow);min-height:56px}
.list-row.link{cursor:pointer}
.list-row .lr-main{flex:1 1 200px;min-width:0}   /* the text keeps ≥200px; badges drop underneath on a narrow phone instead of crushing it */
@media (max-width:519px){.list-row .chev{display:none}}
.list-row b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;color:var(--ink);line-height:1.3}
.list-row .lr-sub{font-size:13px;color:var(--muted);margin-top:3px}
.list-row .chev{flex:0 0 auto;color:var(--muted);font-size:22px;line-height:1}
.status-badge{flex:0 0 auto;font-size:12px;font-weight:bold;padding:4px 10px;border-radius:var(--r-pill);text-transform:uppercase;white-space:nowrap;letter-spacing:.03em;border:0}
.status-badge.in_progress{background:var(--warn-bg);color:var(--warn)}
.status-badge.issued,.status-badge.ok{background:var(--ok-bg);color:var(--ok)}
.status-badge.expired,.status-badge.closed,.status-badge.bad{background:var(--bad-bg);color:var(--red)}
.status-badge.muted{background:var(--muted-bg);color:var(--muted)}

/* ---------- panels & wizard chrome ---------- */
.panel,section.panel,.quiz-wrap{background:var(--panel);border:1px solid var(--border);border-radius:var(--r);padding:18px;margin-bottom:18px;box-shadow:var(--shadow)}
.quiz-wrap{max-width:720px}
@media (min-width:768px){.panel,section.panel,.quiz-wrap{padding:22px}}
.panel>h2,section.panel>h2{font-size:17px;color:var(--ink);font-weight:700;border-bottom:1px solid var(--border);padding-bottom:8px;margin:0 0 14px}
.quiz-wrap h2{font-size:18px;color:var(--ink);margin:0 0 14px}
.quiz-progress{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.quiz-bar{height:6px;background:var(--surface-2);border-radius:3px;overflow:hidden;margin-bottom:20px}
.quiz-bar-fill{height:100%;background:var(--red);transition:width .2s}
.quiz-nav{display:flex;gap:10px;margin-top:22px;position:sticky;bottom:calc(var(--nav-h) + var(--safe-b));background:var(--panel);padding:10px 0 4px;border-top:1px solid var(--border);z-index:2}
body.in-wizard .quiz-nav{bottom:var(--safe-b)}
@media (min-width:768px){.quiz-nav,body.in-wizard .quiz-nav{bottom:0}}
.quiz-nav button{flex:1}
.review-item{font-size:14px;margin-bottom:6px}
.review-item b{color:var(--oxblood)}
.finish-result{text-align:center;padding:20px 0}
.finish-result .big-tick{width:64px;height:64px;margin:0 auto 10px;border-radius:50%;background:var(--ok-bg);color:var(--ok);font-size:36px;line-height:64px;font-weight:bold}
.finish-result h2{color:var(--ok)}

/* ---------- forms ---------- */
.panel label,.quiz-wrap label,label.fl{display:block;font-size:13px;font-weight:bold;color:var(--ink);margin:14px 0 6px}
.panel label:first-child,.quiz-wrap label:first-child,label.fl:first-child{margin-top:0}
input[type=text],input[type=date],input[type=time],input[type=datetime-local],input[type=number],input[type=email],input[type=password],input[type=tel],input[type=search],input:not([type]),textarea,select{width:100%;min-height:48px;padding:12px 14px;font-size:16px;border:1px solid var(--border-strong);border-radius:var(--r-sm);font-family:inherit;background:#fff;color:var(--ink)}
@media (min-width:768px){input[type=text],input[type=date],input[type=time],input[type=datetime-local],input[type=number],input[type=email],input[type=password],input[type=tel],input[type=search],input:not([type]),textarea,select{font-size:15px;min-height:44px;padding:10px 12px}}
textarea{min-height:88px}
input[type=file]{padding:8px 0;font-size:14px;max-width:100%;min-height:0;border:0}
.row2{display:flex;gap:12px}
.row2>div{flex:1;min-width:0}
@media (max-width:519px){.row2{flex-direction:column;gap:0}}
/* audit 04/11/2026 E-02 (05/11/2026): a label at the top of a two-column row lost its 14px top gap (the :first-child rule above), so it read
   as the caption of the box above — rows after a box or another row get it back, and so does the second box of a row stacked on a phone;
   the shared field grids get a 14px row gap */
.row2~.row2>div>label:first-child,:is(input,select,textarea)+.row2>div>label:first-child{margin-top:14px}
@media (max-width:519px){.row2>div+div>label:first-child{margin-top:14px}.row2>div:not(:last-child)>p:last-child{margin-bottom:0}}   /* a hint under the first box does not add to the 14px */
div.co-grid,div.wl-grid{row-gap:14px}
/* date and time boxes on an iPhone (Janis 13/10/2026: the "When?" box stuck out past the edge and sat centred): Safari gives them
   its own width and centres the text — make them fill the column like every other box, text on the left */
input[type=date],input[type=time],input[type=datetime-local]{display:block;min-width:0;max-width:100%}
@supports (-webkit-touch-callout:none){input[type=date],input[type=time],input[type=datetime-local]{-webkit-appearance:none;appearance:none;text-align:left}}
input[type=date]::-webkit-date-and-time-value,input[type=time]::-webkit-date-and-time-value,input[type=datetime-local]::-webkit-date-and-time-value{text-align:left;margin:0}

/* ---------- buttons: four treatments only ---------- */
.btn-primary,.btn-secondary,.btn-outline,.btn-danger,.btn-text{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 18px;border-radius:10px;font:bold 15px var(--font);line-height:1.2;cursor:pointer;text-decoration:none}
.btn-primary{background:var(--oxblood);color:#fff;border:1px solid var(--oxblood)}
.btn-primary:active{background:var(--red);border-color:var(--red)}
.btn-secondary{background:var(--panel);color:var(--ink);border:1px solid var(--border-strong)}   /* grey: Cancel, Close and Back only; every other secondary action is .btn-outline (Janis, audit 05/11/2026 E-06) */
.btn-outline{background:none;color:var(--oxblood);border:1px solid var(--oxblood)}
.btn-danger{background:var(--panel);color:var(--red);border:2px solid var(--red)}
.btn-danger:active{background:var(--red);color:#fff}
.btn-text{background:none;border:0;color:var(--muted);min-height:44px}
.btn-block{width:100%}
.btn-primary[disabled],.btn-secondary[disabled],.btn-outline[disabled],.btn-danger[disabled]{opacity:.6;cursor:default}
.btn-cancel{background:none;border:0;color:var(--muted);font:bold 14px var(--font);text-decoration:underline;cursor:pointer;padding:12px;min-height:44px}
.btn-mini,.ck-mini,.hire-mini,.dir-mini{min-height:44px!important;padding:8px 14px!important;font-size:14px!important;width:auto!important}
@media (hover:hover){
  .btn-primary:hover{background:var(--oxblood-dark)}
  .btn-secondary:hover{background:var(--surface-2)}
  .btn-outline:hover{background:var(--gold-light)}
  .btn-danger:hover{background:var(--red);color:#fff}
  .btn-text:hover,.btn-cancel:hover{color:var(--ink)}
  header .signout:hover{background:var(--gold-light)}   /* red outline like every secondary button (audit 05/11/2026 E-06) */
  nav.sidebar .navitem:hover{background:var(--surface-2)}
  .card.link:hover{box-shadow:var(--shadow-hover);transform:translateY(-1px)}
  .list-row.link:hover{background:var(--surface-2)}
}
.card.link:active,.list-row.link:active{opacity:.85}
.more-sheet .ms-signout .btn-secondary{color:var(--oxblood);border-color:var(--oxblood)}   /* the phone menu's Sign out, as the header's (audit 05/11/2026 E-06) */

/* ---------- tabs: two patterns only (Janis, audit 05/11/2026 E-07) ----------
   .tabs-u  underlined text tabs for the sections of a page (as Deliveries and Environment);
   .tabs-bar a red segmented bar to switch the view of the same thing (as Checklists). The picked one is .on / .active / .sel. */
.tabs-u{display:flex;flex-wrap:wrap;gap:2px;margin:0 0 16px;border-bottom:1px solid var(--border)}
.tabs-u button{flex:0 0 auto;width:auto;min-height:48px;padding:10px 16px;border:0;border-bottom:3px solid transparent;border-radius:0;margin-bottom:-1px;background:none;font:bold 15px var(--font);color:var(--muted);cursor:pointer}
.tabs-u button:is(.on,.active,.sel){background:none;color:var(--oxblood);border-bottom-color:var(--red)}
.tabs-u button:focus-visible,.tabs-bar button:focus-visible{outline:3px solid var(--red);outline-offset:-3px}
.tabs-bar{display:inline-flex;max-width:100%;margin:0 0 14px;border:1px solid var(--oxblood);border-radius:10px;overflow:hidden;background:#fff}
.tabs-bar button{flex:1 1 auto;width:auto;min-height:44px;padding:8px 18px;border:0;border-radius:0;background:#fff;color:var(--oxblood);font:bold 14px var(--font);cursor:pointer}
.tabs-bar button:is(.on,.active,.sel){background:var(--oxblood);color:#fff}
.tabs-u[hidden],.tabs-bar[hidden],.tabs-u [hidden],.tabs-bar [hidden]{display:none}
@media (hover:hover){.tabs-u button:hover:not(.on,.active,.sel){color:var(--ink)}.tabs-bar button:hover:not(.on,.active,.sel){background:var(--gold-light)}}
@media (max-width:560px){
  .tabs-u{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:0}   /* a phone: one row of equal tabs, the words wrap — never one tab alone on a line (E-09) */
  .tabs-u button{padding:6px 4px;font-size:13px;line-height:1.2;text-align:center}
  .tabs-bar{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
  .tabs-bar button{padding:6px 8px;line-height:1.2}
}

/* ---------- wizard widgets shared by permits, deliveries, checklists, QA ---------- */
.sigwrap{border:2px dashed var(--border-strong);border-radius:var(--r-sm);background:#fff;margin-top:6px;position:relative}
.sigwrap canvas{display:block;width:100%;height:160px;touch-action:none;border-radius:var(--r-sm) var(--r-sm) 0 0;cursor:crosshair}
.sigwrap .clr{display:block;margin:0 0 0 auto;font:bold 14px var(--font);padding:10px 16px;min-height:44px;border:0;border-top:1px solid var(--border);border-radius:0;background:#fff;color:var(--muted);cursor:pointer}
.phthumbs{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.pht{position:relative;width:calc(33.33% - 6px)}
.pht img{width:100%;border-radius:var(--r-sm);border:1px solid var(--border);display:block;aspect-ratio:1;object-fit:cover}
.pht button{position:absolute;top:-8px;right:-8px;background:var(--red);color:#fff;border:2px solid #fff;border-radius:50%;width:32px;height:32px;font-size:14px;line-height:1;cursor:pointer}
/* the remove-photo × stays small over the corner, but its tap area is 44px (gloves — audit 28/10/2026) */
.pht button::after{content:'';position:absolute;inset:-8px;border-radius:50%}
/* a gate photo missing from storage (delivery-media emptied by mistake 29/10/2026): a clear placeholder, never a broken image */
.photo-gone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;aspect-ratio:1;padding:8px;border:1px solid var(--border);border-radius:var(--r-sm);background:#f4f4f4;color:var(--muted);font:12px/1.3 var(--font);text-align:center;box-sizing:border-box;min-height:96px}
.photo-gone svg{width:26px;height:26px;flex:0 0 auto}
.pd-ph .photo-gone{width:calc(33.33% - 6px)}
.pht .photo-gone{width:100%}
@media (max-width:700px){.pd-ph .photo-gone{width:calc(50% - 4px)}}
@media print{.pd-ph .photo-gone{width:calc(25% - 6px);min-height:0}}
.btn-photo{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:10px 16px;border-radius:10px;border:1px solid var(--oxblood);background:var(--panel);color:var(--oxblood);font:bold 15px var(--font);cursor:pointer}

/* ---------- tables & badges ---------- */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.data{width:100%;border-collapse:collapse;font-size:14px}
table.data th,table.data td{text-align:left;padding:10px;border-bottom:1px solid var(--border);white-space:nowrap}
table.data th{background:var(--surface-2);color:var(--muted);font-size:12px}
tr.inactive{opacity:.5}
.badge{font-size:12px;font-weight:bold;padding:3px 8px;border-radius:var(--r-pill);text-transform:uppercase;white-space:nowrap}
.badge.project_manager{background:var(--oxblood);color:#fff}
.badge.site_manager,.badge.assistant_site_manager{background:var(--gold);color:#fff}
.badge.contractor,.badge.labourer{background:var(--muted-bg);color:#3E444C}
.badge.super_admin{background:var(--ink);color:#fff}
/* the access levels of 28/10/2026 — BCP palette only: dark red, red, tint and grey */
.badge.director{background:var(--oxblood);color:#fff;box-shadow:inset 0 0 0 2px var(--gold-light)}
.badge.drawings_manager{background:var(--red);color:#fff}
.badge.design_team,.badge.structural_engineer,.badge.breeam_assessor{background:#fff;color:var(--oxblood);box-shadow:inset 0 0 0 1px var(--oxblood)}
.badge.contractor_supervisor{background:var(--muted-bg);color:#3E444C;box-shadow:inset 0 0 0 1px var(--border-strong)}
.table-search{display:block;width:100%;margin:0 0 12px;padding:12px 12px 12px 40px;font-size:16px;min-height:48px;border:1px solid var(--border-strong);border-radius:var(--r-sm);font-family:inherit;color:var(--ink);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6068' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center/18px}
.table-search{text-overflow:ellipsis}   /* a search hint too long for a phone ends in "…", not cut mid-word (audit 05/11/2026 E-14) */

/* ---------- stat tiles + number tables (dashboard, hire, environment) ---------- */
.stat-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:12px}
@media (min-width:768px){.stat-cards{grid-template-columns:repeat(4,1fr);gap:14px}}
.stat-card{background:var(--panel);border:1px solid var(--border);border-radius:var(--r);padding:14px 16px;box-shadow:var(--shadow)}
.stat-card .stat-n{display:block;font-size:clamp(22px,7vw,28px);font-weight:800;color:var(--ink);line-height:1.1;font-variant-numeric:tabular-nums;letter-spacing:-.02em;overflow-wrap:anywhere}
.stat-card .stat-l{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.stat-card.bad .stat-n{color:var(--red)}
table.stats{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
table.stats th,table.stats td{padding:9px 12px;border-bottom:1px solid var(--border);text-align:right;white-space:nowrap}
table.stats th:first-child,table.stats td:first-child{text-align:left;white-space:normal}
table.stats thead th{background:var(--surface-2);color:var(--muted);font-size:12px}
table.stats thead th small{display:block;font-weight:normal;font-size:12px;margin-top:2px}
table.stats td small.since{display:block;font-size:12px;color:var(--muted);margin-top:2px}
table.stats tbody th{font-weight:normal;color:var(--ink)}
table.stats tr:last-child td,table.stats tr:last-child th{border-bottom:0}

/* ---------- toasts ---------- */
.toast{position:fixed;left:50%;bottom:calc(var(--nav-h) + 16px + var(--safe-b));transform:translateX(-50%);z-index:60;background:var(--ink);color:#fff;font-size:14px;font-weight:bold;padding:12px 18px;border-radius:var(--r-pill);box-shadow:var(--shadow-hover);max-width:calc(100% - 32px);opacity:0;transition:opacity .2s;pointer-events:none}
.toast.show{opacity:1}
.toast.error{background:var(--red)}
.toast.ok{background:var(--ok)}
@media (min-width:768px){.toast{bottom:24px}}
@media (max-width:560px){.toast{left:16px;right:16px;transform:none;max-width:none;text-align:center;border-radius:var(--r)}}   /* a phone: the full width, not a narrow three-line pill (audit 05/11/2026 E-19) */

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media print{
  header,nav.sidebar,#netbar,.more-sheet,.toast{display:none!important}
  main{padding:0!important}
  body{background:#fff}
}

/* ---------- profile pictures ---------- */
.hdr-av{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--oxblood);color:#fff;font:bold 13px var(--font);text-decoration:none;border:2px solid var(--panel);box-shadow:0 0 0 1px var(--border-strong);position:relative}
/* audit 04/11/2026 E-01 (05/11/2026): no overflow:hidden on the circle (it clipped the 44px hit area and the dot) — the picture rounds itself;
   the "no picture" dot is ::before, top-right, so ::after (below) is only the 44px hit area */
.hdr-av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.hdr-av.missing::before{content:"";position:absolute;top:-3px;right:-3px;left:auto;bottom:auto;z-index:1;width:10px;height:10px;border-radius:50%;background:var(--red);border:2px solid var(--panel)}
.av{flex:0 0 auto;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--surface-2);color:var(--oxblood);font-weight:bold;vertical-align:middle;object-fit:cover}
.av img{width:100%;height:100%;object-fit:cover}
.cam-modal{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.cam-modal-card{background:#111;border-radius:16px;padding:12px;width:100%;max-width:520px;text-align:center}
.cam-modal video{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;background:#000}
.cam-modal video.mirror{transform:scaleX(-1)}
.cam-modal-btns{display:flex;gap:8px;justify-content:center;margin-top:10px;flex-wrap:wrap}
.cam-modal-btns button{width:auto;min-height:48px;padding:8px 22px}
@media print{.hdr-av,.cam-modal{display:none!important}}

/* ---------- card camera (cardcam.js): a card-shaped frame, only the card is kept ---------- */
.cardcam{position:fixed;inset:0;z-index:95;background:#000}
.cardcam[hidden]{display:none}
.cardcam video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.cardcam .cc-frame{position:absolute;border-radius:14px;box-shadow:0 0 0 100vmax rgba(0,0,0,.6);outline:2px solid rgba(255,255,255,.85);pointer-events:none}
.cardcam .cc-frame i{position:absolute;width:30px;height:30px;border:5px solid #fff}
.cardcam .cc-frame .tl{left:-5px;top:-5px;border-right:0;border-bottom:0;border-top-left-radius:14px}
.cardcam .cc-frame .tr{right:-5px;top:-5px;border-left:0;border-bottom:0;border-top-right-radius:14px}
.cardcam .cc-frame .bl{left:-5px;bottom:-5px;border-right:0;border-top:0;border-bottom-left-radius:14px}
.cardcam .cc-frame .br{right:-5px;bottom:-5px;border-left:0;border-top:0;border-bottom-right-radius:14px}
.cardcam .cc-top{position:absolute;top:0;left:0;right:0;padding:calc(14px + env(safe-area-inset-top,0px)) 16px 12px;color:#fff;text-align:center;font-family:var(--font)}
.cardcam .cc-top b{display:block;font-size:17px}
.cardcam .cc-top span{display:block;font-size:13px;opacity:.85;margin-top:2px}
.cardcam .cc-bar{position:absolute;left:0;right:0;bottom:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:16px 18px calc(20px + env(safe-area-inset-bottom,0px))}
.cardcam .cc-cancel{justify-self:start;width:auto;min-height:44px;padding:8px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.7);background:rgba(0,0,0,.35);color:#fff;font:bold 14px var(--font);cursor:pointer}
.cardcam .cc-shutter{width:78px;height:78px;min-height:0;border-radius:50%;border:5px solid #fff;background:var(--red);cursor:pointer;padding:0}
.cardcam .cc-shutter:active{transform:scale(.94)}
.cardcam .cc-torch{justify-self:end;width:auto;min-height:44px;padding:8px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.7);background:rgba(0,0,0,.35);color:#fff;font:bold 14px var(--font);cursor:pointer}
.cardcam .cc-torch.on{background:#FFD54A;color:#000;border-color:#FFD54A}
html.cardcam-open,html.cardcam-open body{overflow:hidden}
/* line up the card (cardcam.js, 02/10/2026): the photo behind a card-shaped window, drag / pinch / turn, Use this */
.cardadj{position:fixed;inset:0;z-index:96;background:#111;touch-action:none;user-select:none;-webkit-user-select:none}
.cardadj[hidden]{display:none}
.cardadj .ca-canvas{position:absolute;inset:0;touch-action:none;cursor:grab}
.cardadj .ca-canvas:active{cursor:grabbing}
.cardadj .ca-top{position:absolute;top:0;left:0;right:0;padding:calc(14px + env(safe-area-inset-top,0px)) 16px 12px;color:#fff;text-align:center;font-family:var(--font);pointer-events:none}
.cardadj .ca-top b{display:block;font-size:17px;margin-bottom:4px}
.cardadj .ca-top span{font-size:14px;opacity:.9}
.cardadj .ca-bar{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px calc(18px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,rgba(0,0,0,.65))}
.cardadj button{min-height:48px;border-radius:999px;font:bold 15px var(--font);cursor:pointer}
.cardadj .ca-back{padding:8px 16px;border:1px solid rgba(255,255,255,.7);background:rgba(0,0,0,.35);color:#fff}
.cardadj .ca-use{padding:8px 24px;border:0;background:#fff;color:#8A0A1C}
/* the visible height, so Safari's bars never sit over the buttons (Janis 07/10/2026: buttons were off the screen on a phone) */
.cardcam,.cardadj{bottom:auto;height:100vh;height:100dvh}
.cardadj .ca-canvas{cursor:default}
.cardadj .ca-back,.cardadj .ca-use{flex:0 0 auto;white-space:nowrap}
/* "Is the photo clear?" before it is kept */
.cardadj .ca-ask{position:absolute;inset:0;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;padding:16px}
.cardadj .ca-ask[hidden]{display:none}
.cardadj .ca-askbox{background:#fff;border-radius:16px;padding:16px;max-width:440px;width:100%;max-height:100%;overflow:auto;font-family:var(--font);color:var(--ink);text-align:center}
.cardadj .ca-askbox img{display:block;width:100%;max-height:42dvh;object-fit:contain;border-radius:8px;border:1px solid var(--border);background:#fff}
.cardadj .ca-askbox p{margin:12px 0 14px;font-size:15px;line-height:1.4}
.cardadj .ca-askbox p > b:first-child{display:block;font-size:18px;color:var(--oxblood);margin-bottom:4px}
.cardadj .ca-askbtns{display:flex;gap:10px}
.cardadj .ca-askbtns button{flex:1 1 0;min-height:52px;padding:8px 12px}
.cardadj .ca-no{border:2px solid var(--oxblood);background:#fff;color:var(--oxblood)}
.cardadj .ca-yes{border:0;background:var(--red);color:#fff}

/* a person's site attendance on their induction record (05/10/2026) */
table.att-t{width:100%;max-width:560px;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.att-t th{text-align:left;font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding:6px 8px;border-bottom:1px solid var(--border)}
.att-t td{padding:7px 8px;border-bottom:1px solid var(--surface-2)}
.att-t tr.att-wk th{background:var(--gold-light);color:var(--oxblood);font-size:13px;letter-spacing:0;text-transform:none;padding:8px;border-bottom:1px solid var(--border)}
.att-t tr.att-wk th:last-child{text-align:left;white-space:nowrap}
.att-weeks{max-width:420px}

/* the Super Admin's site switcher is the header title itself (09/10/2026): it reads like the title, with a small arrow */
header .title .proj-switch{width:auto;max-width:100%;min-height:44px;border:1px solid transparent;border-radius:var(--r-sm);background:transparent;font:bold 16px var(--font);color:var(--oxblood);padding:4px 26px 4px 8px;margin:0;cursor:pointer;appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--oxblood) 50%),linear-gradient(135deg,var(--oxblood) 50%,transparent 50%);background-position:calc(100% - 13px) 55%,calc(100% - 8px) 55%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;text-overflow:ellipsis}
header .title .proj-switch:hover,header .title .proj-switch:focus{border-color:var(--border-strong);background-color:#fff}
/* the title clips long names; with the switcher in it the select does that itself, so its border and focus ring are never cut (Janis 09/10/2026: "lines are disappearing") */
header .title.has-switch{overflow:visible;display:flex;align-items:center}
header .title .proj-switch:focus-visible{outline:2px solid var(--red);outline-offset:1px}
@media (max-width:520px){header .title .proj-switch{font-size:14px}}
.pc-feat{display:flex;gap:10px;align-items:center;font-size:14px;min-height:44px;cursor:pointer;margin:0}
.pc-feat input{width:22px;height:22px;margin:0;flex:0 0 auto}
/* another tab switched the Super Admin to a different site (shell.js siteStillSame, 09/10/2026) */
.site-moved{position:fixed;left:12px;right:12px;bottom:12px;z-index:9999;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;background:var(--oxblood,#8A0A1C);color:#fff;border-radius:10px;padding:10px 14px;font-size:14px;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.site-moved button{width:auto;min-height:44px;padding:8px 18px;border:0;border-radius:8px;background:#fff;color:#8A0A1C;font:bold 14px Arial,Helvetica,sans-serif;cursor:pointer}
/* forgotten sign-outs on a person's induction record (09/10/2026) */
.ind-strikes{display:flex;flex-direction:column;gap:6px;margin:12px 0 0;padding:10px 12px;border:1px solid var(--border);border-left:4px solid var(--warn,#8A4B00);border-radius:var(--r-sm);background:var(--warn-bg,#FFF6E5);font-size:14px}
.ind-strikes.blocked{border-left-color:var(--red);background:var(--bad-bg,#FBEAEC)}
.ind-strikes.blocked b{color:var(--red)}
.ind-strikes span{color:var(--muted);font-size:13px}
.ind-strikes button{align-self:flex-start;width:auto;min-height:44px;padding:8px 14px}
/* Settings → Emails I get (09/10/2026) */
.em-opts{display:flex;flex-direction:column;gap:4px}
.em-opts label{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:8px 0;cursor:pointer;font-size:14px}
.em-opts input{width:22px;height:22px;margin:2px 0 0;flex:0 0 auto}
.em-opts small{display:block;color:var(--muted);font-size:12.5px;font-weight:normal}
/* Site sign-in → Inducted on paper (09/10/2026) */
.os-paper{display:flex;flex-wrap:wrap;gap:10px 14px;margin:10px 0 12px}
.os-paper label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:bold;flex:0 1 200px;min-width:0}
.os-paper label.grow{flex:1 1 220px}
.os-paper label.full{flex-basis:100%}
.os-paper small{font-weight:normal;color:var(--muted)}
.os-paper input,.os-paper select{min-height:44px;width:100%}
.ind-strikes.ok{border-left-color:var(--ok,#1E7D32);background:var(--ok-bg,#EAF5EC)}
/* private message on the iPad, on an inductee's record (14/10/2026) */
.pm-list{list-style:none;margin:0 0 10px;padding:0}
.pm-item{border-top:1px solid #eee;padding:8px 0}
.pm-item p{margin:4px 0;white-space:pre-line}
.pm-item .pm-off{width:auto;min-height:44px;padding:6px 12px;margin-left:6px}
.pm-new{width:auto;min-height:44px;padding:8px 16px}
.pm-form label{display:block;font-weight:bold;font-size:14px;margin:12px 0 4px}
.pm-form input,.pm-form select,.pm-form textarea{width:100%;box-sizing:border-box;min-height:44px}
.pm-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.pm-btns button{width:auto;min-height:44px;padding:8px 16px}
/* audit 15/10/2026: the logo link and ticks in BCP red (never the browser's blue); the profile picture in the header is a 44px target */
header .logo{color:var(--oxblood,#8A0A1C)}
input[type=checkbox],input[type=radio]{accent-color:#C00A27}
.hdr-av::after{content:'';position:absolute;inset:-8px;border-radius:50%}   /* 05/11/2026 (audit 04/11/2026 E-01): -8px from the 30px inside of the 2px border = 46px (-6px gave 42px) */

/* a Buyer (Head Office) login sees, never changes (23/10/2026) — the add and change buttons are hidden; the database refuses them anyway */
body.read-only .start-btn,body.read-only .hire-top,body.read-only .hire-mini,body.read-only #addSkipBtn,body.read-only #addReadingBtn,body.read-only .w-add,body.read-only .w-missing,
body.read-only #calAdd,body.read-only .cd-add,body.read-only .cw-add,body.read-only .amend-bar,body.read-only #amendForm,body.read-only [onclick^="figuresFor"]{display:none!important}

/* the sections someone sees, ticked on their card (23/10/2026) */
.mm-secs{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:4px 12px;margin:4px 0 6px}
.mm-sec{display:flex;align-items:flex-start;gap:8px;min-height:44px;padding:8px 6px;font-weight:normal;font-size:14px;line-height:1.3;cursor:pointer;border-radius:8px}
.mm-sec:hover{background:var(--tint,#F7DDE0)}
.mm-sec input{width:20px;height:20px;min-height:0;margin:0;flex:0 0 auto;accent-color:#8A0A1C}
.mm-sec-hint{margin:0 0 4px;font-size:12.5px;color:var(--muted)}
.mm-sec-usual{min-height:44px;padding:6px 0;font-size:13px}
.badge.buyer{background:var(--tint,#F7DDE0);color:#8A0A1C}

/* Team by project (23/10/2026) */
.team-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.team-tab{min-height:44px;padding:8px 14px;border:1px solid var(--oxblood);border-radius:22px;background:#fff;color:var(--oxblood);font:bold 14px var(--font);cursor:pointer}
.team-tab span{display:inline-block;min-width:22px;margin-left:4px;padding:1px 6px;border-radius:10px;background:var(--tint,#F7DDE0);color:var(--oxblood);font-size:12px}
.team-tab.sel{background:var(--oxblood);color:#fff}
.team-tab.sel span{background:#fff}
@media (hover:hover){.team-tab:not(.sel):hover{background:var(--tint,#F7DDE0)}}

/* "View as" (Janis 26/10/2026): the Super Admin seeing the portal as one person — a BCP red bar on every page while it is on
   (shell.js), above the sticky header; the header, offline bar and desktop menu sit under it (--va-h is its height) */
.va-bar{position:sticky;top:0;z-index:40;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;background:var(--red,#C00A27);color:#fff;padding:6px 16px;font:14px/1.35 Arial,Helvetica,sans-serif}
.va-bar .va-txt{flex:1 1 220px;min-width:0;overflow-wrap:anywhere}
.va-bar b{font-weight:bold}
.va-bar .va-note{display:block;margin-top:2px;font-size:13px}
.va-bar .va-note[hidden]{display:none}
.va-bar .va-flash{font-weight:bold}
.va-bar .va-exit{flex:0 0 auto;width:auto;min-height:44px;min-width:72px;padding:8px 18px;border:0;border-radius:8px;background:#fff;color:#8A0A1C;font:bold 15px Arial,Helvetica,sans-serif;cursor:pointer}
/* the focus ring shows on the red bar (the global ring is BCP red and vanished into it — audit VA-7) */
.va-bar .va-exit:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:inset 0 0 0 3px #8A0A1C}
body.viewing-as:not(.kiosk) header{top:var(--va-h,0px)}
body.viewing-as #netbar{top:calc(var(--header-h) + var(--va-h,0px))}
body.kiosk.viewing-as .va-bar{position:fixed;left:0;right:0}
body.kiosk.viewing-as{padding-top:var(--va-h,0px)}
@media (max-width:767px){.va-bar{font-size:13px;padding:6px 16px}.va-bar .va-note{font-size:12px}}
@media (min-width:768px){
  body.viewing-as nav.sidebar{top:calc(var(--header-h) + var(--va-h,0px));height:calc(100vh - var(--header-h) - var(--va-h,0px))}
}
/* the "View as" button at the end of a name on Team (app.js) */
.va-btn{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-height:44px;margin-left:10px;padding:0 12px;border:1px solid var(--oxblood);border-radius:var(--r-sm);background:#fff;color:var(--oxblood);font:bold 13px Arial,Helvetica,sans-serif;white-space:nowrap;cursor:pointer}
.va-btn svg{width:18px;height:18px;flex:0 0 18px}
@media (hover:hover){.va-btn:hover{background:var(--tint,#F7DDE0)}}

/* the beta notice on the RFI pages (Janis 30/10/2026) */
.beta-note{margin:4px 0 12px;padding:8px 12px;background:#F7DDE0;border-left:4px solid #8A0A1C;border-radius:var(--r-sm);font-size:13.5px;line-height:1.45;color:var(--ink,#222)}
.beta-note b{color:#8A0A1C;text-transform:uppercase;letter-spacing:.04em}

/* every page fills the screen beside the menu (Janis 30/10/2026: "every section should auto stretch to fit the display") — the
   page caps above and in each page's own stylesheet are lifted on laptops and wider; forms kept narrow on purpose (.narrow, the
   sign-in kiosk, the induction and welcome pages) stay as they are */
@media (min-width:768px){
  body main > .page-wrap:not(.narrow), body main > .section, body main .cal-wrap, body main .dg-wrap, body main #hpPage,
  body main .ld-wrap, body main .mo-page, body main .wm-page, body main .ph-page, body main .rm-page, body main .rfi-page,
  body main .rfi-page.rt-wide, body main .td-page{max-width:none}
}
/* very wide screens: still wide, but held to 1440px and centred so the page sits balanced, not hard against the menu (Janis
   30/10/2026: "this could be a bit centred") */
@media (min-width:1600px){
  body main > .page-wrap:not(.narrow), body main > .section{max-width:1440px;margin-left:auto;margin-right:auto}
}

/* inside the H&S evidence pack's view-only window (shell.js EMBED, hspack.js openView): the record alone */
html.embed header,html.embed nav.sidebar,html.embed .more-sheet,html.embed #netbar{display:none!important}
html.embed .shell{display:block;min-height:0}
html.embed main{padding:14px 16px 24px}
html.embed main > .page-wrap,html.embed main > .section{max-width:none}

/* iPads and other touch screens laid out like a laptop (Janis 30/10/2026, zooming in to read the menu): a wider menu with larger
   type, and a little more size on the page text, so nothing needs pinching — a pinch-zoom is what made the page pan sideways */
@media (min-width:768px) and (pointer:coarse){
  nav.sidebar{width:256px;flex-basis:256px}
  nav.sidebar .navitem{font-size:16px;min-height:48px;padding-top:11px;padding-bottom:11px}
  nav.sidebar .nav-group,nav.sidebar button.nav-group{font-size:12px}
  main{font-size:15px}
  .page-sub,.set-note,.lr-sub{font-size:15px}
  .list-row b{font-size:16px}
}

/* the page never slides sideways on a laptop / iPad layout (Janis 30/10/2026: "press and hold on it and it moved"): the document
   cannot scroll horizontally, the menu only takes up/down gestures, and a wide table or long word is clipped or scrolls inside its
   own box (.table-scroll, .rfi-table-wrap) rather than pushing the whole page out */
@media (min-width:768px){
  /* on html only — never on body: a clipped body stops the sticky header and menu holding their places in the iPad's browser
     (Janis 30/10/2026 19:52, the menu drawn over the top bar when scrolling up) */
  html{overflow-x:clip;overscroll-behavior-x:none}
  body{max-width:100%}
  header{z-index:30}
  nav.sidebar{z-index:20}
  nav.sidebar{touch-action:pan-y;overscroll-behavior:contain}
  main{min-width:0;overflow-x:clip}
  .dash-col,.dw-fixed,.panel,.list-row,.lr-main{min-width:0}
  .lr-main b,.lr-sub{overflow-wrap:anywhere}
}

/* ---------- design audit fixes (Janis, audit 01/11/2026) ---------- */
/* D03: selected text in BCP's pale red, never the browser's blue */
::selection{background:#F7DDE0;color:#1B1F24}
/* D02: the header names the site in full on every screen. The title comes in parts (shell.js siteOf): a laptop shows
   "Hoddesdon Site Manager · Job 744"; an iPad drops "Site Manager" and the person's name and role (the picture and Settings
   have them); a phone shows "Hoddesdon" with "Job 744" under it, and its Sign out lives at the foot of the More sheet. */
header .title-site{font-weight:700}
@media (max-width:767px){
  header{gap:8px;padding:0 10px}
  header img{height:22px}
  header .title{line-height:1.15;white-space:normal}
  header .title-site,header .title-job{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  header .title-long,header .tj-dot{display:none}
  header .title-job{font-size:12px;font-weight:normal;color:var(--muted)}
  body.has-more-sheet header .signout{display:none}
  /* audit 10/11/2026 design-brand-01 (Janis 11/11/2026: "Yes apply"): a page with no More sheet (the design team, the structural
     engineers) keeps Sign out in the header, and the name was cut to "H…" — office.html's phone rule: tighter gaps, no magnifier */
  body:not(.has-more-sheet):not(.kiosk) header{gap:6px}   /* outranks notify.css's header:has(.nb-bell) 8px, with no :has here */
  body:not(.has-more-sheet):not(.kiosk) header button.hdr-search-btn{display:none}
  body:not(.has-more-sheet):not(.kiosk) header .signout{padding:6px 7px}
}
@media (min-width:768px) and (max-width:1099px){
  header .title-long{display:none}
}
@media (min-width:1100px){
  header .who{display:block}
}
/* On Site Hire: "How is this worked out?" folds the sums away (D13) */
.hire-how{margin:6px 0 0;font-size:14px}
.hire-how summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:var(--oxblood);font-weight:bold}
.hire-how .note{margin-top:0}
/* Suggest an improvement (Janis 06/11/2026: "in the top bar, right next to the bell … same size and style as the bell button"): a
   44px round icon button left of the bell (shell.js), on a laptop and on a phone. The sheet itself is suggest.css. */
/* Janis 18/11/2026: the Development board uses the same header icon style. */
.hdr-sug,.hdr-dev{position:relative;flex:0 0 auto;width:44px;height:44px;min-height:44px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:50%;color:var(--oxblood);cursor:pointer;font-family:inherit}
.hdr-sug svg,.hdr-dev svg{width:24px;height:24px}
.hdr-sug:hover,.hdr-dev:hover,.hdr-dev.on{background:var(--bad-bg)}
.hdr-sug:focus-visible,.hdr-dev:focus-visible{outline:3px solid var(--red);outline-offset:2px}
.hdr-sug .sug-count{position:absolute;top:3px;right:1px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--red);color:#fff;font:bold 11px/19px var(--font);text-align:center;box-shadow:0 0 0 2px var(--panel);pointer-events:none}
.hdr-sug .sug-count[hidden]{display:none}
nav.sidebar #navSuggestions{order:53}
@media print{.hdr-sug,.hdr-dev{display:none!important}}
/* Janis 18/11/2026: "this programme development is more of a desktop view rather than mobile" — the Development icon on a laptop or desktop only */
@media (max-width:767px){header .hdr-dev{display:none}}
