:root{--brand:#0b5394;--brand2:#e8f0fb;--ink:#1d2433;--mute:#667085;--line:#e3e7ee;--ok:#127a3a;--warn:#b54708;--bad:#b42318;--bg:#f5f7fa}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}
body{margin:0;font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);padding-bottom:72px}
a{color:var(--brand);text-decoration:none}a:hover{text-decoration:underline}
header.top{background:var(--brand);color:#fff;padding:10px 14px;display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:20}
header.top .logo{font-weight:800;letter-spacing:.3px;color:#fff;font-size:17px}header.top .logo span{opacity:.75;font-weight:500}
header.top nav{margin-left:auto;display:none;gap:14px}header.top nav a{color:#fff;opacity:.9}
nav.bottom{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);display:flex;z-index:30;padding-bottom:env(safe-area-inset-bottom)}
nav.bottom a{flex:1;text-align:center;padding:8px 2px 9px;font-size:11.5px;color:var(--mute)}nav.bottom a b{display:block;font-size:19px;line-height:1.2}
nav.bottom a.on{color:var(--brand);font-weight:600}
main{max-width:1100px;margin:0 auto;padding:12px}
h1{font-size:21px;margin:6px 0 10px}h2{font-size:17px;margin:18px 0 8px}h3{font-size:15px;margin:10px 0 6px}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:12px}
.grid{display:grid;gap:10px}.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(2,1fr)}
.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px}.kpi small{color:var(--mute);display:block;font-size:12px}.kpi b{font-size:19px}
.muted{color:var(--mute)}.small{font-size:12.5px}.right{text-align:right}.nowrap{white-space:nowrap}
.ok{color:var(--ok)}.warn{color:var(--warn)}.bad{color:var(--bad)}
table{width:100%;border-collapse:collapse}th,td{padding:7px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{font-size:12px;color:var(--mute);font-weight:600;background:#fafbfc}td.num,th.num{text-align:right;white-space:nowrap}
.tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
input,select,textarea{font:inherit;width:100%;padding:9px 10px;border:1px solid #cfd6e0;border-radius:9px;background:#fff;min-height:42px}
textarea{min-height:70px}input[type=checkbox]{width:auto;min-height:auto;transform:scale(1.25);margin-right:6px}
label{display:block;font-size:12.5px;color:var(--mute);margin:6px 0 3px}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}.row>*{flex:1;min-width:90px}
.btn{display:inline-block;background:var(--brand);color:#fff;border:0;border-radius:9px;padding:10px 14px;font:inherit;font-weight:600;cursor:pointer;min-height:42px;text-align:center}
.btn:hover{text-decoration:none;filter:brightness(1.07)}.btn.sec{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.btn.small{padding:6px 10px;min-height:32px;font-size:13px}.btn.danger{background:#fff;color:var(--bad);border:1px solid #f1b3ad}.btn.big{width:100%;font-size:16px;padding:13px}
.pill{display:inline-block;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:600;background:#eef2f6;color:#344054;white-space:nowrap}
.s-Enquiry{background:#f2f4f7}.s-Quoted{background:#fef0c7;color:#93370d}.s-Booked{background:#d1e9ff;color:#175cd3}.s-In.progress,.s-In{background:#d1fadf;color:#027a48}
.s-Completed{background:#e9d7fe;color:#6941c6}.s-Invoiced{background:#fde2e1;color:#b42318}.s-Paid{background:#d1fadf;color:#05603a}
.flash{padding:10px 12px;border-radius:10px;margin-bottom:10px}.flash.ok{background:#ecfdf3;border:1px solid #abefc6;color:#067647}.flash.error{background:#fef3f2;border:1px solid #fecdca;color:#b42318}
.alert{background:#fffaeb;border:1px solid #fedf89;color:#93370d;padding:10px 12px;border-radius:10px;margin:8px 0}
.example{background:#fff4e5;border:1px dashed #f79009;color:#b54708;font-size:12px;font-weight:700;padding:1px 7px;border-radius:6px}
details{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:10px}details>summary{padding:11px 12px;cursor:pointer;font-weight:600;list-style:none}
details>summary::-webkit-details-marker{display:none}details>summary:before{content:"▸ ";color:var(--mute)}details[open]>summary:before{content:"▾ "}
details>.inner{padding:0 12px 12px}
.geo{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.geo span{background:var(--brand2);color:#123b6d;border-radius:8px;padding:3px 8px;font-size:12.5px}
.task{border-top:1px solid var(--line);padding:8px 0}.task:first-child{border-top:0}
.tag{font-size:11px;padding:1px 6px;border-radius:5px;background:#eef2f6;color:#475467}.tag.verified{background:#dcfae6;color:#067647}.tag.manual{background:#d1e9ff;color:#175cd3}
.tag.placeholder{background:#fee4e2;color:#b42318}.tag.historic{background:#fef0c7;color:#93370d}
.week{display:grid;gap:8px}.day{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px;min-height:90px}.day.today{border:2px solid var(--brand)}
.day h4{margin:0 0 6px;font-size:13px}.ev{background:var(--brand2);border-left:4px solid var(--brand);padding:5px 7px;border-radius:6px;margin-bottom:5px;font-size:13px}
.span{background:#f2f4f7;border-left:4px solid #98a2b3;padding:3px 7px;border-radius:6px;margin-bottom:5px;font-size:12px}
.sum td{border:0;padding:4px 6px}.sum tr.tot td{border-top:2px solid var(--ink);font-weight:700;font-size:16px}
.inline{display:inline}.stack>*+*{margin-top:8px}
@media(min-width:760px){body{padding-bottom:0}nav.bottom{display:none}header.top nav{display:flex}.g4{grid-template-columns:repeat(4,1fr)}.week{grid-template-columns:repeat(7,1fr)}main{padding:18px}}
@media print{header.top,nav.bottom,.noprint{display:none!important}body{background:#fff;padding:0}main{max-width:none;padding:0}.card{border:0;padding:0}}
/* site photos */
.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px;margin:8px 0}
.ph{position:relative;padding:0;border:0;background:#e3e7ee;border-radius:8px;overflow:hidden;aspect-ratio:1;cursor:pointer}
.ph img{width:100%;height:100%;object-fit:cover;display:block}
.ph span{position:absolute;left:0;right:0;bottom:0;background:#000a;color:#fff;font-size:11px;padding:2px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.ph i{position:absolute;top:4px;right:4px;background:#0b5394;color:#fff;font:700 10px/16px sans-serif;width:16px;border-radius:50%;font-style:normal}
.phup{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:4px 0 10px}.phup .phcap{flex:1;min-width:140px;margin:0}
.phbtn{cursor:pointer;margin:0}
#phdlg{border:0;border-radius:12px;padding:0;box-sizing:border-box;width:min(96vw,900px);max-width:none;margin:auto;inset:0;position:fixed;max-height:96vh;overflow:auto}#phdlg::backdrop{background:#000c}
.phd{padding:10px}.phd img{width:100%;max-height:65vh;object-fit:contain;background:#111;border-radius:8px}
.phd .chk{display:flex;gap:8px;align-items:center;color:var(--ink);font-size:14px;margin:8px 0}.phd .chk input{width:auto}
#phdel{margin-top:8px;text-align:right}
.gal h3{margin:12px 0 2px;font-size:14px}
/* Bluetooth laser measure (only shown when Web Bluetooth is available) */
.laserwrap{display:flex;gap:4px;align-items:stretch}.laserwrap input{flex:1;min-width:0}
.laserbtn{flex:0 0 auto;border:1px solid #0b5394;background:#fff;color:#0b5394;border-radius:8px;font:600 12px/1 inherit;padding:0 8px;cursor:pointer}
input.laser-target{outline:3px solid #f79009;outline-offset:1px;background:#fffaeb}
input.laser-filled{background:#ecfdf3!important;transition:background .3s}
.laserbar{position:fixed;left:8px;right:8px;bottom:64px;z-index:50;display:flex;gap:6px;align-items:center;background:#1d2433;color:#fff;border-radius:12px;padding:8px 10px;font-size:13px;box-shadow:0 4px 14px #0004}
.laserbar.on{background:#067647}.laserbar .ls-state{flex:1}.laserbar .btn{margin:0;padding:4px 8px}
.laserbar .ls-state{min-width:0}.laserbar button{flex:0 0 auto;width:34px;height:34px;border:0;border-radius:8px;background:#ffffff26;color:#fff;font-size:16px;cursor:pointer}
.laserbar.on .ls-re{display:none}
.card{overflow-x:auto}
table.sum td{overflow-wrap:anywhere}
