/* This app's own styles (simmons-estate#128). Copied from cash-management css/cm.css (12 Oct 2026), whose card form and PIN page
   it shares; the house look is css/style.css. This app's additions are at the end. */

.admin-only { display: none; }
body.is-admin .admin-only { display: inline-flex; }

/* The small grey second line in a cell, as Holiday & Sickness. */
.who-sub { display: block; font-size: 12px; font-weight: 400; color: var(--grey-text); margin-top: 3px; line-height: 1.35; }
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.neg { color: #B71C1C; font-weight: 600; }
.data-table td a, .detail-value a { color: var(--dark); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.data-table td a:hover, .detail-value a:hover { color: var(--red); text-decoration-color: var(--red); }
.dash-wrap { max-height: 460px; }
.login-box { max-width: 420px; margin: 60px auto; padding: 0 16px; }
.nav-signout { color: rgba(255,255,255,0.6); }
.pre { white-space: pre-wrap; line-height: 1.45; }
.star-text { color: #E0A100; letter-spacing: 1px; white-space: nowrap; }
.star-off { color: var(--border); }

/* One check, read back. */
.detail-label { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey-text); margin-bottom: 3px; }
.detail-value { font-size: 16px; line-height: 1.45; word-break: break-word; }
.answer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 18px; }
.answer-table { width: 100%; border-collapse: collapse; }
.answer-table th { text-align: left; font-weight: 500; padding: 8px 12px 8px 0; width: 60%; vertical-align: top; border-top: 1px solid var(--cream); }
.answer-table td { padding: 8px 0; vertical-align: top; border-top: 1px solid var(--cream); }
.answer-table tr:first-child th, .answer-table tr:first-child td { border-top: none; }

/* The Cash Check form: phone first - one column, big targets, the submit button always in reach. */
/* The steps (cash-management#4): one card at a time, as Holiday & Sickness's request form (its css/hs.css rq-*). */
.cc-wrap { max-width: 620px; margin: 0 auto; padding: 0 16px 24px; }
.cc-top { display: flex; align-items: center; gap: 12px; padding: 14px 40px 10px 0; } /* clear of the dark-mode button */
.cc-exit { background: none; border: none; font-size: 20px; color: var(--grey-text); cursor: pointer; min-width: 40px; min-height: 40px; }
.cc-top-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase; flex: 1; }
.cc-top-step { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-text); white-space: nowrap; }
.rq-progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.rq-progress-bar { height: 100%; width: 0; background: var(--red); transition: width 0.3s ease; }
.rq-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--red); border-radius: 8px; padding: 26px 24px; box-shadow: 0 6px 24px rgba(0,0,0,0.06); animation: rq-in 0.25s ease; }
@keyframes rq-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rq-q { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 30px; letter-spacing: 0.02em; line-height: 1.15; margin-bottom: 6px; }
.rq-help { color: var(--grey-text); font-size: 16px; line-height: 1.45; margin-bottom: 18px; }
.rq-done { text-align: center; }
.rq-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 34px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.cc-done-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cc-section + .cc-section { margin-top: 18px; }
.cc-section-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-text); padding-bottom: 4px; border-bottom: 2px solid var(--cream); }
.cc-nav { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 12px 0; margin-top: 14px; background: var(--cream); }
.cc-nav[hidden], .cc-step[hidden] { display: none; }
.cc-nav .btn { flex: 1; min-height: 52px; font-size: 18px; }
.cc-nav .btn[type="submit"] { flex: 2; }
.cc-form .field input, .cc-form .field select { min-height: 48px; font-size: 17px; }
/* The review card: each step a tappable block. */
.cc-rv-group { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; font: inherit; color: inherit; }
.cc-rv-group:hover, .cc-rv-group:focus-visible { border-color: var(--red); outline: none; }
.cc-rv-title { display: flex; justify-content: space-between; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.cc-rv-edit { color: var(--red); font-size: 14px; }
.cc-rv-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--cream); font-size: 15px; }
.cc-rv-row span { color: var(--grey-text); }
.cc-rv-row strong { text-align: right; font-weight: 600; }
.cc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cc-shop-area { font-size: 13px; margin-top: 4px; min-height: 16px; }
.cc-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--cream); }
.cc-item:first-of-type { border-top: none; }
.cc-q { font-size: 16px; line-height: 1.35; }
.cc-a { justify-self: end; }
.cc-comment-btn { grid-column: 1 / -1; justify-self: start; background: none; border: none; color: var(--red); font-size: 14px; cursor: pointer; padding: 0; }
.cc-comment { grid-column: 1 / -1; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); font-size: 16px; min-height: 40px; }
.money { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); }
.money span { padding: 0 4px 0 10px; color: var(--grey-text); }
.money input { width: 120px; border: none; background: transparent; padding: 8px 10px 8px 2px; font-size: 18px; min-height: 44px; text-align: right; }
.money:focus-within, .num-in:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red); }
.money input:focus { outline: none; }
.num-in { width: 80px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); font-size: 18px; min-height: 44px; text-align: center; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn { min-width: 76px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--border); border-radius: 22px; background: var(--surface); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.seg-btn:hover { border-color: var(--red); }
.seg-btn.on { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.seg-btn.on[data-v="No"] { background: var(--red); border-color: var(--red); color: #fff; }
.stars { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.star { background: none; border: none; font-size: 34px; line-height: 1; padding: 2px 3px; color: var(--border); cursor: pointer; min-width: 40px; min-height: 44px; }
.star.on { color: #E0A100; }
.star-n { margin-left: 8px; color: var(--grey-text); font-size: 14px; }
.cc-draft-hint { margin-top: 4px; font-size: 13px; text-align: center; }
.cc-draft-hint a { color: var(--red); }

.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.users-form { margin-top: 18px; }

/* The shop's history under the shop on The visit (cash-management#7). */
.cc-shop-info { background: var(--cream); border-radius: 6px; padding: 12px 14px; margin: 0 0 14px; font-size: 15px; }
.cc-shop-info[hidden] { display: none; }
.cc-info-block + .cc-info-block { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--border); }
.cc-info-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
/* A section folds on its heading: the heading is the whole tap target, with the summary beside it and an arrow. */
.cc-info-block > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.cc-info-block > summary::-webkit-details-marker { display: none; }
.cc-info-block > summary::after { content: "\203A"; margin-left: 4px; font-size: 22px; line-height: 1; color: var(--red); transform: rotate(90deg); transition: transform 0.15s; }
.cc-info-block:not([open]) > summary::after { transform: none; }
.cc-info-summary { flex: 1; text-align: right; font-size: 14px; color: var(--grey-text); }
.cc-info-body { padding-bottom: 2px; }
.cc-info-sub { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-text); margin: 10px 0 4px; }
.cc-info-comment { background: var(--surface); border-radius: 4px; padding: 6px 9px; margin-bottom: 5px; line-height: 1.4; word-break: break-word; }
.cc-info-order { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 5px 0; border-top: 1px solid var(--border); }
.cc-info-order span:nth-child(2) { text-align: right; }
.cc-info-order span:nth-child(3) { grid-column: 1 / -1; color: var(--grey-text); font-size: 13px; }
.cc-info-order strong { font-size: 14px; }
.cc-info-more { margin-top: 6px; }
.cc-info-more a { color: var(--red); }

/* /check, the PIN form (cash-management#10). */
body.pin-mode .menu-btn, body.pin-mode .pin-hide { visibility: hidden; }
body.pin-mode .cc-done-btns .pin-hide { display: none; }
body.pin-mode .wordmark { cursor: default; }
.pin-input { width: 100%; font-family: 'Barlow Condensed', sans-serif; font-size: 40px; letter-spacing: 0.5em; text-align: center; padding: 12px 14px; border: 2px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--dark); margin-bottom: 14px; }
.pin-input:focus { outline: none; border-color: var(--red); }
.pin-card .btn { width: 100%; min-height: 52px; font-size: 18px; }
.set-panel { max-width: 640px; }
.set-link { word-break: break-all; font-weight: 600; }

/* Admin > Import (simmons-estate#125). */
.imp-panel { max-width: 720px; }
.imp-table { max-width: 420px; margin: 10px 0; }
.imp-table td.num { text-align: right; }

/* G4S Change Orders (simmons-estate#126). */
.owed { color: #B71C1C; }
.data-table tr.ord-closed td { color: var(--grey-text); }
.data-table tr.total-row td { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; text-transform: uppercase; border-top: 2px solid var(--dark); }
.oe-content { max-width: 1000px; }
.oe-outstanding { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; min-height: 40px; display: flex; align-items: center; }
.oe-outstanding.is-paid { color: var(--ok); }
.ord-lines { margin-top: 12px; max-width: 520px; }
.ord-lines td.num { text-align: right; padding-left: 14px; white-space: nowrap; }
.dash-more { margin: 10px 0 0; }
.dash-more a { color: var(--red); }
/* The history of an order, as Holiday & Sickness's notes. */
.note { border-top: 1px solid var(--cream); padding: 10px 0; }
.note:first-of-type { border-top: none; }
.note-head { font-size: 13px; color: var(--grey-text); margin-bottom: 4px; }
.note-text { white-space: pre-wrap; line-height: 1.45; }

@media (max-width: 640px) {
  .answer-grid { grid-template-columns: 1fr; }
  .cc-wrap { padding: 0 12px 16px; }
  .rq-card { padding: 20px 16px; }
  .rq-q { font-size: 26px; }
  .cc-item { grid-template-columns: 1fr; }
  .cc-a { justify-self: stretch; }
  .seg-2 .seg-btn { flex: 1; }
  .money input { width: 100%; }
  .num-in { width: 100%; }
  .star { font-size: 30px; min-width: 36px; }
}

/* ---- Maintenance (simmons-estate#128) ---- */

/* Log a Job is for engineers and admins. */
.engineer-only { display: none; }
body.logs-jobs .engineer-only { display: inline-flex; }
body.logs-jobs .tile.engineer-only { display: block; }

/* Priority: three big buttons, coloured once chosen. */
.seg-3 .seg-btn { flex: 1; }
.rp-priority .seg-btn { min-height: 64px; font-size: 20px; }
.rp-priority .seg-btn.on.rp-p-high { background: var(--red); border-color: var(--red); color: #fff; }
.rp-priority .seg-btn.on.rp-p-medium { background: #E65100; border-color: #E65100; color: #fff; }
.rp-priority .seg-btn.on.rp-p-low { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.rp-spoke { margin-top: 18px; }
.rp-spoke input { margin-top: 10px; }
#page-report textarea { width: 100%; font-size: 17px; }

/* The photo: a big button, then the picture. */
.rp-photo-btn { width: 100%; min-height: 64px; justify-content: center; font-size: 18px; cursor: pointer; }
.rp-photo { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rp-photo[hidden] { display: none; }
.rp-photo img, .rp-review-photo, .iv-photo { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); display: block; }
.rp-review-photo { max-height: 160px; }
.iv-photo { max-height: 420px; }

/* Log a Job */
.jn-content { max-width: 760px; }
.jn-types { display: flex; flex-wrap: wrap; gap: 8px; }
.jn-types .seg-btn { font-size: 15px; }
.jn-time { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jn-time input { width: 72px; text-align: center; }
.jn-issue-text { margin-top: 8px; }
#jnOutcomeText { margin-top: 6px; max-width: 320px; }

/* The two Jotforms on one page each (maintenance#2). */
.req { color: var(--red); }
.rp-card .field { margin-bottom: 18px; }
.rp-card textarea { width: 100%; font-size: 17px; }
.rp-submit { width: 100%; min-height: 56px; font-size: 20px; margin-top: 6px; }
.rp-spoke-other { margin-top: 10px; }
.jn-issue { margin-bottom: 14px; }

/* Admin > Import: the two forms side by side, one above the other on a phone. */
.imp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.imp-panel .imp-table { margin: 10px 0; }

/* Admin > Engineers (maintenance#5). */
.en-row, .en-shop { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.en-shop select { max-width: 55%; }
.en-shop.en-none label strong { color: var(--red); }
.en-add { display: flex; gap: 8px; margin-top: 14px; }
.en-add input { flex: 1; }
#enSearch { width: 100%; margin-bottom: 6px; }

/* The engineer dashboard (maintenance#5): a phone first, big targets, one column. */
.eng-body .page { padding-bottom: 40px; }
.eng-change { color: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.eng-hello { display: flex; justify-content: space-between; align-items: flex-end; margin: 6px 0 14px; }
.eng-hello-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 30px; text-transform: uppercase; letter-spacing: 0.02em; }
.eng-big { width: 100%; min-height: 60px; font-size: 20px; margin-bottom: 18px; justify-content: center; }
.eng-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.eng-tab { flex: 1; min-height: 46px; border: 2px solid var(--border); border-radius: 23px; background: var(--surface); color: var(--dark);
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
.eng-tab.on { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.eng-card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--border);
  border-radius: 8px; padding: 14px 14px 12px; margin-bottom: 10px; cursor: pointer; color: var(--dark); font: inherit; }
.eng-card:hover, .eng-card:focus-visible { border-color: var(--red); }
.eng-card.p-high, .eng-issue.p-high { border-left-color: var(--red); }
.eng-card.p-medium, .eng-issue.p-medium { border-left-color: #E65100; }
.eng-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.eng-card-top strong { font-size: 17px; }
.eng-card-desc { margin: 6px 0; font-size: 15px; line-height: 1.4; }
.eng-card-foot { font-size: 13px; }
.eng-empty { text-align: center; padding: 40px 10px; font-size: 17px; color: var(--grey-text); }
.eng-who-list { display: flex; flex-direction: column; gap: 10px; }
.eng-who { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 16px; border: 2px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--dark); font: inherit; font-size: 18px; cursor: pointer; }
.eng-who.on, .eng-who:hover { border-color: var(--red); }
.eng-back { background: none; border: 0; color: var(--red); font: inherit; font-weight: 600; font-size: 16px; padding: 8px 0 12px; cursor: pointer; }
.eng-issue { border-left: 6px solid var(--border); }
.eng-desc { font-size: 17px; line-height: 1.45; margin: 10px 0 14px; }
.eng-photo { max-width: 100%; max-height: 360px; border-radius: 6px; border: 1px solid var(--border); display: block; margin-bottom: 12px; }
.eng-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 15px; }
.eng-row span { color: var(--grey-text); }
.eng-row strong { text-align: right; font-weight: 600; }
.eng-note { padding: 10px 0; border-top: 1px solid var(--border); }
.eng-note:first-of-type { border-top: 0; }
.eng-note-head { font-size: 13px; color: var(--grey-text); margin-bottom: 4px; }
.eng-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eng-actions .btn { flex: 1; min-height: 54px; justify-content: center; font-size: 17px; }
.eng-signoff { background: var(--ok, #2E7D32); border-color: var(--ok, #2E7D32); }
.eng-fixed { font-weight: 600; padding: 8px 0; }
#issNote { width: 100%; font-size: 16px; }

/* Meter readings on the engineer dashboard (maintenance#7). */
.eng-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.eng-two .eng-big { margin-bottom: 0; font-size: 17px; padding: 0 8px; }
.eng-big-2 { background: var(--dark); border-color: var(--dark); }
.mt-last { background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.mt-last-title { font-weight: 700; margin-bottom: 4px; }
.mt-last-row { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--border); font-size: 15px; }
.mt-meter { border-top: 1px solid var(--border); padding: 14px 0; }
.mt-meter > label:first-child { display: block; font-weight: 700; margin-bottom: 6px; }
.mt-input { width: 100%; font-size: 22px; padding: 10px 12px; letter-spacing: 0.04em; }
.mt-hint { font-size: 14px; color: var(--grey-text); margin: 6px 0 8px; min-height: 1em; }
.mt-hint.mt-warn { color: #B71C1C; font-weight: 600; }
.mt-photo-btn { width: 100%; min-height: 50px; justify-content: center; cursor: pointer; }
.mt-thumb { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.mt-thumb[hidden] { display: none; }
.mt-thumb img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* One meter reading (maintenance#7). */
.mv-table td.num, .mv-table th.num { text-align: right; }
.mv-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mv-photo { margin: 0; }
.mv-photo img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.mv-photo figcaption { font-size: 13px; color: var(--grey-text); margin-top: 4px; }
#emRecipients { width: 100%; font-family: inherit; }

/* The engineer dashboard's shop filter (maintenance#5). */
.eng-shop-filter { margin-bottom: 12px; }
.eng-shop-filter select { width: 100%; min-height: 48px; font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Bakery, GNR and 150 meters (maintenance#10). One series, one hue (the dataviz reference palette's slot 1, validated
   against both surfaces); recessive grid and axes; text in text colours, never the series colour. */
:root { --series-1: #2a78d6; --grid: #e6e4de; --axis-text: #6b6a66; }
:root[data-theme="dark"] { --series-1: #3987e5; --grid: #3a3a38; --axis-text: #a9a8a0; }
.st-sites { margin-bottom: 14px; }
.st-chart-panel { position: relative; }
.st-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-chart { width: 100%; }
.st-chart svg { display: block; overflow: visible; }
.st-grid { stroke: var(--grid); stroke-width: 1; }
.st-base { stroke: var(--axis-text); stroke-width: 1; }
.st-axis { fill: var(--axis-text); font-size: 11px; font-family: inherit; }
.st-year { font-weight: 600; }
.st-label { fill: var(--dark); font-size: 12px; font-weight: 700; font-family: inherit; }
.st-bar { fill: var(--series-1); }
.st-bar.st-part { fill-opacity: 0.4; }
.st-hit { fill: transparent; cursor: pointer; }
.st-hit.on { fill: var(--grid); fill-opacity: 0.35; }
.st-tip { position: absolute; z-index: 2; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12); font-size: 13px; pointer-events: none; min-width: 120px; }
.st-tip[hidden] { display: none; }
.st-readings th.st-sel, .st-readings td.st-sel { background: rgba(42, 120, 214, 0.06); }
.st-excluded { text-decoration: line-through; color: #B71C1C; cursor: help; }
.st-replaced { color: var(--grey-text); text-decoration: line-through; cursor: help; }
.st-jump { border-bottom: 2px dotted #E65100; cursor: help; }
.st-reset { border-bottom: 2px solid var(--series-1); cursor: help; }
.sn-where { font-size: 13px; color: var(--grey-text); margin: -2px 0 6px; }

/* The calendar (maintenance#12). Each engineer is a categorical colour, in the order they were added (the dataviz
   reference palette, validated for light and dark); the colour is a dot and a left edge, and the text stays in text
   colours. Nobody, and a ninth engineer, are grey. */
:root { --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100; --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #4a3aa7; --cat-8: #e34948; --cat-none: #9a9893; }
:root[data-theme="dark"] { --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767; --cat-none: #77756f; }
.ca-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.ca-nav { display: flex; align-items: center; gap: 6px; }
.ca-range { margin-left: 6px; font-size: 16px; }
.ca-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ca-filters select { min-height: 40px; }
.ca-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; margin-bottom: 10px; }
.ca-key { display: inline-flex; align-items: center; gap: 6px; }
.ca-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.ca-attention { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ca-att { margin-bottom: 0; }
.ca-att-over { border-left: 4px solid #B71C1C; }
.ca-att-due { border-left: 4px solid #E65100; }
.ca-att-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start; font-size: 13px; margin-top: 6px; }
.ca-chip { display: block; width: 100%; text-align: left; border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 5px; background: var(--surface);
  color: var(--dark); font: inherit; font-size: 12.5px; line-height: 1.3; padding: 3px 6px; margin-top: 3px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-chip .who-sub { white-space: normal; }
.ca-chip:hover, .ca-chip:focus-visible { border-color: var(--red); border-left-color: var(--c); }
.ca-t { font-weight: 700; }
.ca-chip.ca-done { color: var(--grey-text); text-decoration: line-through; }
.ca-chip.ca-done .who-sub { text-decoration: none; }
.ca-chip.ca-overdue { background: #FFEBEE; }
.ca-chip.ca-due { background: #FFF3E0; }
:root[data-theme="dark"] .ca-chip.ca-overdue { background: #3a2526; }
:root[data-theme="dark"] .ca-chip.ca-due { background: #3a3220; }
.ca-state { font-weight: 700; }
.ca-month { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.ca-head, .ca-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ca-head div { padding: 6px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--grey-text); border-bottom: 1px solid var(--border); }
.ca-cell { min-height: 104px; padding: 4px 5px 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.ca-cell:nth-child(7n) { border-right: 0; }
.ca-out { background: var(--cream); }
.ca-out .ca-num { color: var(--grey-text); }
.ca-num { font-size: 12px; font-weight: 700; }
.ca-today .ca-num, .ca-today > .ca-wtitle { color: var(--red); }
.ca-more { background: none; border: 0; color: var(--red); font: inherit; font-size: 12px; padding: 2px 0; cursor: pointer; }
.ca-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ca-wday, .ca-lday { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-width: 0; }
.ca-wday.ca-today, .ca-lday.ca-today { border-color: var(--red); }
.ca-wtitle { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ca-plus { background: none; border: 1px solid var(--border); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; color: var(--dark); font-size: 16px; line-height: 1; }
.ca-none { font-size: 12px; }
.ca-list { display: flex; flex-direction: column; gap: 8px; }
.ca-list .ca-chip, .ca-week .ca-chip { white-space: normal; font-size: 14px; padding: 6px 8px; }
.ca-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.ca-overlay[hidden] { display: none; }
.ca-panel { position: relative; background: var(--surface); border-radius: 10px; padding: 20px; width: 100%; max-width: 560px; box-shadow: 0 10px 40px rgba(0,0,0,0.25); }
.ca-x { position: absolute; top: 10px; right: 10px; background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--dark); }
.ca-ptitle { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 0 28px 12px 0; }
.ca-note { margin: 10px 0; padding: 8px 10px; background: var(--cream); border-radius: 6px; }
.ca-admin { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.ca-move { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.ca-kinds .seg-btn { font-size: 14px; min-width: 0; }
.ca-feed { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ca-feed > div:first-child { flex: 1; min-width: 200px; }
.ca-url { width: 100%; font-size: 12px; margin-top: 4px; }
#caPanel textarea, #caPanel input:not([type=date]):not([type=time]) { width: 100%; }
@media (max-width: 760px) {
  .ca-week { grid-template-columns: 1fr; }
  .ca-cell { min-height: 64px; padding: 2px; }
  .ca-cell .ca-chip { font-size: 0; padding: 0; height: 8px; border-left-width: 0; background: var(--c); border: 0; margin-top: 2px; }
  .ca-cell .ca-chip.ca-done { opacity: 0.4; }
}

/* My calendar on the engineer dashboard (maintenance#12). */
.eng-cal { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.eng-cal-head { display: flex; justify-content: space-between; align-items: baseline; }
.eng-cal h2, .eng-h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 6px; }
.eng-link { background: none; border: 0; color: var(--red); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0; }
.cal-item { border-top: 1px solid var(--border); }
.cal-item:first-child { border-top: 0; }
.cal-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 0; font: inherit; color: var(--dark); cursor: pointer; }
.cal-when { font-size: 13px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.03em; }
.cal-done .cal-row strong { text-decoration: line-through; color: var(--grey-text); }
.cal-overdue .cal-when { color: #B71C1C; }
.cal-more { padding: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.cal-more textarea { width: 100%; font-size: 16px; }
.cal-more .eng-signoff { min-height: 50px; justify-content: center; }
.cal-empty { padding: 6px 0; }
.eng-feed .ca-url { width: 100%; margin: 6px 0 10px; font-size: 13px; }

/* An entry for several engineers, or everyone (maintenance#12). */
.ca-who { display: flex; flex-direction: column; gap: 6px; }
.ca-who label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; min-height: 32px; }
.ca-who-all { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.ca-dot-s { width: 7px; height: 7px; margin-right: 3px; vertical-align: middle; }
.ca-chip.ca-everyone { border-left-style: dashed; }

/* Engineers, from Eliza (maintenance#15). */
.en-shops { display: flex; flex-wrap: wrap; gap: 6px; }
.en-chip { border: 1px solid var(--border); border-radius: 14px; padding: 4px 10px; font-size: 13px; background: var(--surface); }
.en-none-panel { border-left: 4px solid #E65100; }
#enSearch { width: 100%; margin: 6px 0 12px; }

/* The engineer dashboard: report an issue, plan visits (maintenance#15). */
.eng-big-3 { background: var(--surface); color: var(--dark); border: 2px solid var(--border); text-decoration: none; display: flex; align-items: center; justify-content: center; }
.plan-shops { display: flex; flex-direction: column; }
.plan-shop { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--border); cursor: pointer; }
.plan-shop input { width: 22px; height: 22px; }
.plan-shop span:nth-child(2) { flex: 1; font-weight: 600; }
.plan-more summary { padding: 12px 0; font-weight: 700; cursor: pointer; color: var(--red); }

/* The site picker at the top of the meter reading form (maintenance#15). */
.sn-sites .seg-btn { min-height: 56px; font-size: 18px; }

/* The Full Check (maintenance#17). */
.fc-jump select { width: 100%; min-height: 44px; margin: 8px 0 12px; }
.fc-allok { width: 100%; min-height: 48px; justify-content: center; margin-bottom: 8px; }
.fc-item { border-top: 1px solid var(--border); padding: 12px 0; }
.fc-q { font-size: 15px; line-height: 1.4; margin-bottom: 8px; }
.fc-ans { display: grid; grid-template-columns: 1fr 1.4fr 0.8fr; gap: 6px; }
.fc-btn { min-height: 46px; border: 2px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--dark); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px; }
.fc-btn.fc-ok.on { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.fc-btn.fc-attention.on { background: #B71C1C; border-color: #B71C1C; color: #fff; }
.fc-btn.fc-na.on { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.fc-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.fc-thumb { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fc-thumb img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.fc-card textarea, .rp-card textarea { width: 100%; }
.fc-sig { width: 100%; height: 160px; border: 2px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none; display: block; margin-bottom: 6px; }
.fc-totals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fc-totals span { border: 1px solid var(--border); border-radius: 14px; padding: 4px 10px; font-weight: 600; }
.fc-t-ok { color: #2E7D32; }
.fc-t-att, .fc-t-miss { color: #B71C1C; }
.fc-flagged { background: #FFEBEE; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
:root[data-theme="dark"] .fc-flagged { background: #3a2526; }
.fc-last-sec { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; font-size: 14px; }
.fv-sec summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fv-sec .answer-table { margin-top: 10px; }
.fv-photo { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.fv-flag { padding: 4px 0; border-top: 1px solid var(--border); }
.fv-sig { max-width: 320px; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.eng-two { grid-template-columns: 1fr 1fr; }

/* The coffee auditor's dashboard (maintenance#19). */
.cf-start { width: 100%; margin-bottom: 18px; }
.cf-types .seg-btn { font-size: 15px; flex: 1 1 40%; }
.cf-pair { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.cf-pair-q { font-weight: 700; margin-bottom: 6px; }
.cf-past { margin-bottom: 10px; }
.cf-past > div { margin-top: 4px; font-size: 14px; }

/* The Coffee Machine Check (maintenance#21): an answer that needs looking at is red, whichever of Yes or No it is. */
.mc-seg .seg-btn.on, .mc-seg .seg-btn.on[data-v="No"] { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.mc-seg .seg-btn.on.mc-bad { background: var(--red); border-color: var(--red); color: #fff; }
.mc-parts { margin-bottom: 12px; }

/* "All apps" back to the Simmons Apps landing page (maintenance#23): beside the menu button, office app only. */
.topbar-left { display: flex; align-items: center; gap: 14px; }
.apps-link { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey-text); text-decoration: none; white-space: nowrap; }
.apps-link:hover { color: var(--red); }
.apps-link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.apps-link[hidden] { display: none; }
body.pin-mode .apps-link { display: none; }

/* Documents (maintenance#25) */
.dc-form { margin-bottom: 18px; }
.dc-form [hidden] { display: none !important; }
.dc-actions { white-space: nowrap; text-align: right; }
.dc-actions .btn + .btn { margin-left: 6px; }
.dk-name { width: 100%; max-width: 320px; }
a.eng-card { color: inherit; text-decoration: none; margin-bottom: 10px; }
#page-docs .search { display: block; width: 100%; max-width: none; margin: 10px 0 14px; }
