:root{--ink:#14294c;--muted:#657a97;--line:#dce5f1;--blue:#1261ee;--soft:#eef4ff}
*{box-sizing:border-box}body.inspectionApp{margin:0;background:#f5f7fb;color:var(--ink);font:14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
[hidden]{display:none!important}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}
button,.navButton{border:1px solid var(--line);border-radius:10px;background:white;color:var(--ink);padding:10px 14px;cursor:pointer;text-decoration:none}
button:hover,.navButton:hover{background:var(--soft)}button:disabled{opacity:.5;cursor:not-allowed}
:focus-visible{outline:3px solid #86b5ff;outline-offset:2px}
input:not([type=checkbox]),select,textarea{display:block;width:100%;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:white;color:var(--ink)}
select{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23436387' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
input[type=checkbox]{accent-color:var(--blue);width:17px;height:17px;flex:0 0 17px}
label{display:block;margin:12px 0 5px;font-weight:550}h1,h2,h3,p{margin-top:0}h1{font-size:28px;letter-spacing:-.6px;margin-bottom:6px}h2{font-size:18px;margin-bottom:8px}h3{font-size:15px;margin-bottom:0}
.inspectionHeader{height:76px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:14px 32px}
.inspectionHeader img{width:230px;max-width:40vw;display:block}.headerActions{display:flex;gap:12px;align-items:center}.headerActions select{width:115px}
.reportProjectBar{background:#fff;padding:16px 32px 0;border-bottom:1px solid var(--line)}.reportProjectBar>div{max-width:650px;display:flex;align-items:center;gap:18px}.reportProjectBar label{font-size:12px;white-space:nowrap;color:var(--muted);margin:0}.reportProjectBar select{font-size:19px;font-weight:650}
.projectTabs{display:flex;gap:26px;margin-top:12px}.projectTabs a{color:var(--muted);padding:12px 2px;text-decoration:none;border-bottom:3px solid transparent;font-weight:600}.projectTabs [aria-current=page]{color:var(--blue);border-color:var(--blue)}
#reportApp{max-width:1600px;margin:auto;padding:28px 32px 60px}.pageHeading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.pageHeading p{margin-bottom:0;color:var(--muted)}.eyebrow{font-size:10px;font-weight:750;letter-spacing:1.6px;margin-bottom:6px!important}.badge{border-radius:30px;background:#e6edfa;color:#42618b;padding:5px 12px;font-size:12px}
.sectionTabs{display:flex;gap:6px;margin-bottom:22px}.sectionTabs button{border-color:transparent;background:transparent}.sectionTabs .active{background:white;border-color:var(--line);box-shadow:0 2px 6px #162e5b08;color:var(--blue)}
.card{background:white;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:0 5px 18px #13234404}.cardHeading{display:flex;align-items:center;gap:10px;margin:4px 0 16px}.cardHeading h2{margin:0}.cardHeading:has(.toggle){justify-content:space-between}.stepNumber{width:28px;height:28px;border-radius:8px;background:var(--soft);color:var(--blue);display:grid;place-items:center;font-size:12px;font-weight:bold}
.reportLayout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:22px;align-items:start}.reportBuilder .cardHeading:not(:first-child){margin-top:24px}.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.hint{font-size:12px;color:var(--muted);margin:8px 0 16px;line-height:1.6}
.scopeGrid{display:grid;grid-template-columns:1.2fr 1fr;gap:18px}.scopeList{max-height:260px;overflow:auto;padding:8px;border:1px solid var(--line);border-radius:10px}.scopeList:empty{display:none}.scopeList label{display:flex;align-items:center;gap:9px;font-weight:400;margin:5px 0;font-size:13px}.scopeList details{padding:4px 0}.scopeList details details{padding-left:12px}.scopeList details label{padding-left:16px}.scopeList summary{cursor:pointer;padding:5px;color:var(--ink)}.inlineActions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
button.textButton{border:0;color:var(--blue);padding:5px 8px;font-size:12px;background:transparent}.selectionHeading{display:flex;justify-content:space-between;align-items:center;margin:16px 0 8px}
.imageSelection{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;max-height:300px;overflow:auto}
.imageChoice{display:flex;align-items:flex-start;gap:8px;padding:9px;border:1px solid var(--line);border-radius:10px;margin:0;cursor:pointer;font-weight:400;font-size:12px}.imageChoice:has(:checked){border-color:#8eb9ff;background:#f4f8ff}.imageChoice img{width:64px;height:52px;object-fit:cover;border-radius:5px}.imageChoice span{overflow-wrap:anywhere}.imageChoice small{display:block;color:var(--muted)}
.costBox{background:#f3f7fd;border-radius:12px;padding:14px 16px;margin:20px 0 12px}.costBox p{margin-bottom:0}.checkLine,.toggle{display:flex;gap:10px;align-items:flex-start;font-weight:400;font-size:13px}.wide{width:100%;margin-top:14px}.primary{background:var(--blue);color:white;border-color:var(--blue)}.primary:hover{background:#0e50cb;color:white}
.recentReports{position:sticky;top:16px}.recentReports .cardHeading{justify-content:space-between}.reportEntry{display:block;width:100%;text-align:left;margin-bottom:8px;padding:12px}.reportEntry strong{display:block}.reportEntry small{color:var(--muted);display:block;margin-top:5px}#reportList{max-height:560px;overflow:auto}
.statRow{display:flex;gap:14px;flex-wrap:wrap;margin:20px 0}.statCard{min-width:130px;background:#f4f7fc;border:1px solid var(--line);border-radius:12px;padding:12px 18px}.statCard strong{display:block;font-size:26px;line-height:1.3}.statCard span{font-size:12px;color:var(--muted)}
.catalogList{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-top:18px}.catalogCard{border:1px solid var(--line);padding:14px;border-radius:12px;overflow-wrap:anywhere}.catalogCard img{width:100%;height:120px;object-fit:cover;border-radius:8px}.catalogCard summary{cursor:pointer;font-weight:600}.catalogCard p{font-size:13px}.catalogCard small{color:var(--muted)}
#reportNotice{padding:13px 16px;background:#eef5ff;border:1px solid #bcd3fa;border-radius:10px;margin-bottom:16px}#reportNotice.error{background:#fff1f0;border-color:#efb5b1;color:#9b332c}.gate{margin:40px auto;max-width:650px}
#reportDetail{margin-top:22px}.detailHeading{display:flex;align-items:center;justify-content:space-between;gap:18px}.reviewItem{border-top:1px solid var(--line);padding:24px 0}.reviewItem:first-child{border-top:0}.evidenceHeading{display:flex;gap:16px;align-items:center;margin-bottom:14px}.evidenceHeading img{width:150px;height:95px;object-fit:cover;border-radius:8px}.observation{padding:12px;border-left:3px solid #8caad3;background:#f5f8fd;margin:8px 0;border-radius:0 7px 7px 0}.observation.check{border-left-color:#d99425}.observation.urgent{border-left-color:#cf4444}.observation p{margin:4px 0;font-size:13px}.reviewDisclaimer{padding:14px;background:#fff8e9;border:1px solid #eddbb5;border-radius:10px;margin:16px 0}
#printReport{display:none}.empty{padding:22px 8px;color:var(--muted);text-align:center}
#costDialog{width:min(560px,calc(100vw - 32px));max-height:90dvh;overflow:auto;border:1px solid var(--line);border-radius:18px;padding:28px;color:var(--ink);box-shadow:0 24px 80px #112d5e40}
#costDialog::backdrop{background:#12264475;backdrop-filter:blur(3px)}.costAmount{font-size:24px;line-height:1.4;font-weight:700;color:var(--blue);margin:18px 0}.costActions{justify-content:flex-end;margin-top:22px}
.scopeList summary label{display:inline-flex;vertical-align:middle;padding-left:5px;margin:0}
@media(max-width:1100px){.reportLayout{grid-template-columns:minmax(0,1fr) 270px}#reportApp{padding:22px 18px}.card{padding:18px}}
@media(max-width:820px){.reportLayout{grid-template-columns:1fr}.recentReports{position:static}.scopeGrid,.formGrid{grid-template-columns:1fr}.inspectionHeader{padding:12px 16px;height:64px}.reportProjectBar{padding:12px 16px 0}.reportProjectBar>div{display:block}.reportProjectBar label{margin-bottom:5px}.reportProjectBar select{font-size:17px}h1{font-size:24px}.pageHeading{align-items:flex-start}.toggle{margin-top:10px}.cardHeading:has(.toggle){display:block}.detailHeading{display:block}.detailHeading .inlineActions{margin:12px 0}.headerActions{gap:6px}.headerActions select{width:95px}.navButton{padding:8px}.evidenceHeading img{width:95px}.imageSelection{max-height:340px}.projectTabs{gap:18px;font-size:13px}.statCard{min-width:110px;flex:1}}

/* Keep technical image labels readable, including long file/room names. */
.imageChoice{display:grid;grid-template-columns:20px minmax(0,1fr);align-content:start}
.imageChoice img{grid-column:1/-1;grid-row:1;width:100%;height:105px}
.imageChoice input{grid-column:1;grid-row:1;z-index:1;margin:5px;box-shadow:0 1px 5px #fff}
.imageChoice span{grid-column:1/-1;min-width:0}.imageChoice small{overflow-wrap:anywhere}
@media(max-width:820px){.headerActions select{width:110px}}

@media print{
 @page{size:A4;margin:16mm 14mm}
 body.inspectionApp{background:white;font:10pt/1.5 Arial,sans-serif;color:#172944}
 body.inspectionApp>header,body.inspectionApp>.reportProjectBar,#reportApp,#reportGate{display:none!important}
 #printReport{display:block!important}.printHeader{display:flex;justify-content:space-between;border-bottom:2px solid #1261ee;padding-bottom:12px;margin-bottom:18px}.printHeader img{width:175px}.printHeader span{font-size:9pt;color:#637188}
 .printTitle{font-size:23pt}.printMeta{color:#536682;font-size:10pt}.printCover{margin-bottom:24px}.printCover p{white-space:pre-wrap}.printPhoto{width:100%;max-height:95mm;object-fit:contain;background:#f3f6fb}
 .printItem{break-before:page}.printItem h2{font-size:17pt}.printItem p{white-space:pre-wrap}.printItem .observation{break-inside:avoid}
 .printFooter{border-top:1px solid #c9d6e8;margin-top:18px;font-size:8pt;color:#536682}.printWarning{border:1px solid #c9d6e8;padding:12px;margin:14px 0}
 .printRefs{font-size:9pt}.printRefs img{max-width:100%;max-height:100mm;object-fit:contain}
}
