@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root{--ink:#152a35;--muted:#687b84;--line:#dfe8e7;--surface:#f2f6f5;--white:#fff;--green:#28a675;--green-dark:#137454;--green-pale:#e7f6ef;--amber:#d99628;--red:#c94f4f;--shadow:0 18px 50px rgba(24,57,64,.12)}

*{box-sizing:border-box}
body{margin:0;background:var(--surface);color:var(--ink);font-family:"DM Sans",Arial,sans-serif}
button,input,textarea,select{font:inherit}
.auth-pending>.topbar,.auth-pending>.workspace,.auth-required>.topbar,.auth-required>.workspace{display:none}
.auth-ready>.login-gate{display:none}
.portal-home{display:none;min-height:100vh;background:#f2f6f5}
.auth-ready.app-home>.portal-home{display:block}
.auth-ready.app-home>.topbar,.auth-ready.app-home>.workspace{display:none}
.home-header{height:78px;background:#102b35;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 42px;box-shadow:0 3px 18px #102b352b}
.home-brand{display:flex;align-items:center;gap:15px}
.home-brand img{width:128px;height:58px;object-fit:contain}
.home-brand div{display:flex;flex-direction:column}
.home-brand strong{font:800 20px Manrope}
.home-brand span{font-size:10px;color:#a9c0c6}
.home-user{display:flex;align-items:center;gap:14px}
.home-user span{font-size:12px;color:#c3d5d8}
.home-content{width:min(1080px,calc(100% - 40px));margin:0 auto;padding:70px 0}
.home-intro p,.search-heading p{margin:0 0 8px;font-size:9px;letter-spacing:.2em;color:var(--green);font-weight:800}
.home-intro h1{font:800 35px Manrope;letter-spacing:-.04em;margin:0 0 8px}
.home-intro>span{font-size:13px;color:var(--muted)}
.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:38px}
.home-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:30px;text-align:left;display:grid;grid-template-columns:54px 1fr;gap:18px;cursor:pointer;box-shadow:0 12px 35px #1839400c;transition:.2s;color:var(--ink)}
.home-card:hover{transform:translateY(-3px);border-color:#9bcbb9;box-shadow:0 18px 45px #1839401a}
.home-card-icon{width:54px;height:54px;border-radius:13px;background:var(--green-pale);color:var(--green-dark);display:grid;place-items:center;font-size:29px;font-weight:300}
.search-icon{background:#e8f0f4;color:#32677b}
.workflow-icon{background:#fff3df;color:#a86618}
.home-card div{display:flex;flex-direction:column;gap:8px}
.home-card strong{font:700 18px Manrope}
.home-card small{font-size:12px;line-height:1.55;color:var(--muted)}
.home-card b{grid-column:2;font-size:11px;color:var(--green-dark)}
.report-search{display:none;margin-top:15px}
.portal-home.search-mode .home-intro,.portal-home.search-mode .home-actions{display:none}
.portal-home.search-mode .report-search{display:block}
.search-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}
.search-heading h2{font:700 27px Manrope;margin:0}
#closeSearchBtn{min-width:128px;min-height:46px;padding:12px 24px;background:var(--green);border-radius:10px;color:#fff;font-size:15px;box-shadow:0 8px 22px #28a67538}
#closeSearchBtn:hover{background:var(--green-dark)}
.search-form{display:grid;grid-template-columns:1.4fr 1.4fr 1fr 1fr auto;gap:12px;align-items:end;background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px}
.search-form label{margin:0}
.search-form button{height:37px}
.search-status{font-size:11px;color:var(--muted);min-height:30px;padding:14px 2px 5px}
.report-results{display:grid;gap:10px}
.report-result{border:1px solid var(--line);border-radius:10px;background:#fff;padding:17px 20px;display:grid;grid-template-columns:1.4fr 1fr 1fr auto;align-items:center;gap:18px}
.report-result strong{font:700 14px Manrope}
.report-result span,.report-result small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.report-result .result-location{font-size:11px;color:#35515a}
.workflow-badge{display:inline-block;width:max-content;border-radius:999px;background:#e8f0f4;color:#32677b;padding:4px 9px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.workflow-badge.approved{background:var(--green-pale);color:var(--green-dark)}
.workflow-badge.returned{background:#fbeaea;color:var(--red)}
.result-actions{display:flex;gap:8px;align-items:center}
.button.secondary.report-delete{color:var(--red);background:#fbeaea}
.button.secondary.report-delete:hover{color:#fff;background:var(--red)}
.empty-results{background:#fff;border:1px dashed #bfd0cd;border-radius:10px;padding:45px;text-align:center;color:var(--muted);font-size:12px}
.report-context{background:#ffffff12;color:#c8d8da!important;border-radius:5px;padding:6px 9px}
.workflow-chip{background:#f2c46d;color:#4a3513!important;border-radius:999px;padding:6px 10px;font-weight:800}
.login-gate{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 15%,#2a6b6840,transparent 30%),linear-gradient(145deg,#0d2832,#173e43 58%,#1d5d51)}
.login-card{width:min(420px,100%);background:#fff;border-radius:18px;padding:40px;box-shadow:0 28px 80px #061b2370}
.login-identity{display:flex;align-items:center;gap:12px;margin-bottom:35px}
.login-identity img{width:180px;height:auto;max-height:86px;object-fit:contain;object-position:center}
.login-identity div{display:flex;flex-direction:column}
.login-identity span{font-size:9px;letter-spacing:.2em;color:var(--green-dark);font-weight:800}
.login-identity strong{font:800 23px Manrope}
.login-eyebrow{font-size:9px;letter-spacing:.2em;color:var(--green);font-weight:800;margin:0 0 8px}
.login-card h1{font:800 30px Manrope;margin:0 0 8px;letter-spacing:-.03em}
.login-intro{font-size:13px;line-height:1.55;color:var(--muted);margin:0 0 26px}
.login-card label{font-size:11px;margin-bottom:16px}
.login-card input{font-size:13px;padding:12px}
.login-submit{width:100%;padding:13px;margin-top:4px}
.login-error{display:none;background:#fbeaea;color:#9f3838;border-radius:7px;padding:10px 12px;font-size:11px;margin-bottom:16px}
.login-error.visible{display:block}
.login-note{text-align:center;color:#8b9a9e;font-size:10px;margin:20px 0 0}
.signed-user{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#c3d5d8!important}
.topbar{height:68px;background:#102b35;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:20;box-shadow:0 2px 15px #102b3533}
.brand{display:flex;align-items:center;gap:11px}
.brand img{width:112px;height:52px;object-fit:contain;object-position:center}
.brand div{display:flex;align-items:baseline;gap:7px}
.brand strong{font:800 20px Manrope}
.brand span{font-size:12px;color:#a9c0c6}
.top-actions{display:flex;align-items:center;gap:10px}
.top-actions>span{font-size:11px;color:#8da8ad;margin-right:8px}
.top-actions a.button,.home-user a.button{display:inline-flex;align-items:center;text-decoration:none}
.button{border:0;border-radius:7px;padding:10px 15px;font-weight:700;font-size:12px;cursor:pointer;transition:.2s}
.button.primary{background:var(--green);color:#fff}
.button.primary:hover{background:#218c64}
.button.secondary{background:#e8f1ef;color:#23464c}
.button.ghost{border:1px solid #ffffff36;background:transparent;color:#fff}
.workspace{display:grid;grid-template-columns:440px minmax(650px,1fr);height:calc(100vh - 68px);overflow:hidden}
.editor{background:#fff;border-right:1px solid var(--line);position:relative;height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9bfbc #fff}
.editor::-webkit-scrollbar{width:11px}
.editor::-webkit-scrollbar-track{background:#fff}
.editor::-webkit-scrollbar-thumb{background:#b8cbc8;border:3px solid #fff;border-radius:7px}
.editor::-webkit-scrollbar-thumb:hover{background:#93aba7}
.steps{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);padding:0 18px;position:sticky;top:0;z-index:10;background:#fff}
.step{background:none;border:0;border-bottom:3px solid transparent;padding:18px 4px 13px;color:#91a0a5;cursor:pointer}
.step b{display:block;font-size:9px;letter-spacing:.12em;margin-bottom:4px}
.step span{font-size:10px;font-weight:700}
.step.active{color:var(--green-dark);border-bottom-color:var(--green)}
.panel{display:none;padding:30px 32px 40px}
.panel.active{display:block}
.panel-heading p,.eyebrow{margin:0 0 5px;font-size:9px;letter-spacing:.18em;font-weight:800;color:var(--green)}
.panel-heading h2{margin:0 0 26px;font:700 22px Manrope}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.wide{grid-column:1/-1}
label{display:flex;flex-direction:column;gap:6px;color:#50656c;font-size:11px;font-weight:700;margin-bottom:15px}
input,textarea,select{width:100%;border:1px solid #d9e3e2;border-radius:6px;background:#fbfcfc;color:var(--ink);padding:10px 11px;outline:none;font-size:12px;resize:vertical}
input:focus,textarea:focus,select:focus{border-color:var(--green);box-shadow:0 0 0 3px #28a67517}
.status-card{display:flex;align-items:center;gap:11px;background:var(--green-pale);padding:13px;border-radius:8px;margin-bottom:20px}
.status-dot{width:9px;height:9px;background:var(--green);border-radius:50%;box-shadow:0 0 0 5px #28a67520}
.status-card div{display:flex;flex-direction:column}
.status-card strong{font-size:12px}
.status-card small{color:var(--green-dark);font-size:10px}
.parameter-selection-card{background:#f4f8f7;border:1px solid #d5e3e0;border-radius:9px;padding:14px;margin:18px 0 20px}
.parameter-selection-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
.parameter-selection-head>div:first-child{display:flex;flex-direction:column;gap:4px}
.parameter-selection-head>div:first-child>span{font-size:8px;font-weight:800;letter-spacing:.14em;color:var(--green-dark)}
.parameter-selection-head strong{font-size:12px;color:var(--ink)}
.parameter-selection-head small{font-size:9px;line-height:1.45;color:var(--muted)}
.parameter-selection-actions{display:flex;align-items:center;gap:10px;flex:none}
.parameter-selection-actions .button{min-width:84px;padding:8px 12px;font-size:10px}
#parameterSelectionStatus{font-size:9px;font-weight:800;color:var(--green-dark);white-space:nowrap}
.parameter-checkbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.parameter-option{display:flex;flex-direction:row;align-items:center;gap:9px;margin:0;padding:9px 10px;background:#fff;border:1px solid #dce7e5;border-radius:7px;cursor:pointer}
.parameter-option:hover{border-color:#9fc9bb}
.parameter-option input[type="checkbox"]{width:16px;height:16px;min-height:0;padding:0;margin:0;flex:none;accent-color:var(--green);cursor:pointer}
.parameter-option>span{display:flex;flex-direction:column;gap:2px;min-width:0}
.parameter-option strong{font-size:10px;color:var(--ink);line-height:1.2}
.parameter-option small{font-size:8px;color:var(--muted);font-weight:600}
.editor.read-only #selectAllParametersBtn{display:none}
.time-filter-card{background:#f4f8f7;border:1px solid #d5e3e0;border-radius:9px;padding:14px;margin:14px 0 20px}
.time-filter-head{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.time-filter-head>span{font-size:8px;font-weight:800;letter-spacing:.14em;color:var(--green-dark)}
.time-filter-head small{font-size:9px;line-height:1.45;color:var(--muted)}
.time-filter-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end}
.time-filter-fields>label{min-width:0}
.button-row{display:flex;gap:8px}
.editor.read-only .file-button,.editor.read-only .upload-zone,.editor.read-only .equipment-upload-button,.editor.read-only #importPasteBtn,.editor.read-only #removeClientLogoBtn,.editor.read-only .review-readings-btn,.editor.read-only .photo-thumb button{display:none}
.file-button input,.upload-zone input{display:none}
.divider{display:flex;align-items:center;gap:10px;color:#91a0a5;font-size:9px;margin:22px 0}
.divider:before,.divider:after{content:"";height:1px;flex:1;background:var(--line)}
.inline-fields{display:grid;grid-template-columns:1fr auto;gap:10px}
.align-end{align-self:end;margin-bottom:15px;height:37px}
.message{font-size:11px;min-height:16px;margin-top:8px;color:var(--green-dark)}
.message.error{color:var(--red)}
.map-location-field small{font-size:9px;line-height:1.45;color:#7b8c91;font-weight:400}
#mapLocationStatus{display:block;min-height:14px;color:var(--green-dark);font-size:9px;font-weight:400}
#mapLocationStatus.error{color:var(--red)}
.upload-zone{border:1.5px dashed #cbdad7;border-radius:9px;align-items:center;padding:26px;cursor:pointer;background:#fafcfb}
.upload-zone span{font-size:25px;font-weight:300;color:var(--green)}
.upload-zone strong{color:var(--ink)}
.upload-zone small{font-weight:400;color:#8a999e}
.photo-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:10px 0 20px}
.photo-thumb{height:70px;border-radius:6px;overflow:hidden;position:relative}
.photo-thumb img{width:100%;height:100%;object-fit:cover}
.photo-thumb button{position:absolute;right:3px;top:3px;border:0;background:#102b35cc;color:white;border-radius:50%;width:20px;height:20px;cursor:pointer}
.limit-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.limit-grid label{margin:0}
.fine-print{font-size:10px;line-height:1.5;color:#7b8c91;margin-top:18px}
.preview-shell{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.preview-toolbar{height:54px;padding:0 30px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.preview-toolbar>div{display:flex;align-items:center;gap:12px}
.preview-toolbar .eyebrow{margin:0}
.page-count{font-size:10px;color:#86969c}
.zoom-control{background:#fff;border:1px solid var(--line);border-radius:5px;overflow:hidden}
.zoom-control button{border:0;background:#fff;width:30px;padding:5px;cursor:pointer}
.zoom-control span{font-size:10px;width:38px;text-align:center}
.paper-wrap{flex:1;min-height:0;padding:30px 40px 80px;overflow:auto}
.report{width:210mm;margin:0 auto;background:#fff;box-shadow:var(--shadow);transform-origin:top center}
.report-page{position:relative;display:flex;flex-direction:column;height:297mm;padding:10mm 12mm 28mm;background:#fff}
.report-page.report-section{margin-top:0}
.page-number{position:absolute;left:0;right:0;bottom:0;display:block;border:0;margin:0;padding:0;color:#5a6e72;font-size:7pt;line-height:1.25;text-align:center}
.report-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:2mm;margin-bottom:4mm}
.report-brand{display:flex;align-items:center;gap:3mm;min-width:0}
.report-brand img{width:28mm;height:auto;max-height:10mm;object-fit:contain;object-position:center}
.report-brand div{display:flex;flex-direction:column;min-width:0}
.report-brand strong{font:700 8pt Manrope;max-width:75mm}
.report-brand span{font-size:5.5pt;color:var(--muted)}
.report-id{text-align:right;display:grid;gap:.5mm;justify-items:end;white-space:nowrap}
.report-ref,.report-no{display:flex;align-items:baseline;gap:1.5mm}
.report-id span{font-size:5.5pt;letter-spacing:.15em;color:var(--muted)}
.report-id strong{font-size:7pt;margin:0}
.report-id em{font-style:normal;font-size:5pt;font-weight:700;color:var(--green-dark);background:var(--green-pale);padding:.8mm 1.8mm;border-radius:2mm}
.report-title{padding:12mm 0 8mm}
.report-title p{font-size:6pt;letter-spacing:.22em;font-weight:800;color:var(--green);margin:0 0 2mm}
.report-title h1{font:800 26pt Manrope;margin:0;letter-spacing:-.035em}
.accent-line{height:1mm;width:15mm;background:var(--green);margin-top:5mm}
.client-block{display:grid;grid-template-columns:1.2fr 1fr;background:#f3f7f6;padding:6mm;border-left:1.5mm solid var(--green)}
.client-block>div>span,.narrative span{font-size:5.5pt;letter-spacing:.16em;font-weight:800;color:var(--green-dark)}
.client-block>div>strong{display:block;font:700 12pt Manrope;margin:2mm 0 1mm}
.client-block p{font-size:7pt;color:var(--muted);margin:0;max-width:70mm}
.client-block dl{margin:0;display:grid;grid-template-columns:30mm 1fr;gap:1.3mm}
.client-block dt{font-size:6pt;color:var(--muted)}
.client-block dd{font-size:6.5pt;font-weight:600;margin:0}
.report-section{margin-top:10mm}
.section-title{display:flex;gap:4mm;align-items:center;margin-bottom:5mm}
.section-title>span{height:9mm;width:9mm;border:1px solid #bfd2ce;color:var(--green-dark);display:grid;place-items:center;font-size:6.5pt;font-weight:800;border-radius:50%}
.section-title p{margin:0;color:var(--green);font-size:5.5pt;font-weight:800;letter-spacing:.17em}
.section-title h2{font:700 12pt Manrope;margin:.4mm 0 0}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:3mm}
.summary-card{border:1px solid var(--line);border-radius:2mm;padding:3.5mm}
.summary-card span{font-size:6pt;color:var(--muted)}
.summary-card strong{display:block;font:700 14pt Manrope;margin:1mm 0}
.summary-card small{font-size:5.5pt;color:#7d8c91}
.assessment{display:flex;gap:3mm;background:var(--green-pale);border-radius:2mm;padding:4mm;margin-top:4mm}
.assessment>span{width:7mm;height:7mm;background:var(--green);color:#fff;border-radius:50%;display:grid;place-items:center;font-size:8pt}
.assessment strong{font-size:7.5pt}
.assessment p{font-size:6pt;color:#526c68;margin:1mm 0 0}
.assessment.fail{background:#fbeaea}
.assessment.fail>span{background:var(--red)}
.chart-card{border:1px solid var(--line);padding:4mm;border-radius:2mm;margin-bottom:4mm}
.chart-card.compact{padding-bottom:2mm}
.chart-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:2mm}
.chart-head div{display:flex;flex-direction:column}
.chart-head strong{font-size:7.5pt}
.chart-head span{font-size:5.5pt;color:var(--muted)}
.chart-head select{width:35mm;padding:1.5mm;font-size:6pt}
.chart-card canvas{display:block;width:100%;height:auto}
.table-wrap{border:1px solid var(--line);border-radius:2mm;overflow:hidden}
table{border-collapse:collapse;width:100%;font-size:6pt}
th{background:#17343c;color:#fff;text-align:right;padding:2.4mm 2mm;font-weight:600}
th:first-child,td:first-child{text-align:left}
td{text-align:right;padding:2mm;border-bottom:1px solid #e8eeee}
tr:last-child td{border-bottom:0}
.status-pill{display:inline-block;padding:.8mm 1.5mm;border-radius:2mm;background:var(--green-pale);color:var(--green-dark);font-size:5pt;font-weight:800;text-transform:uppercase}
.status-pill.fail{background:#fbeaea;color:var(--red)}
.table-note{font-size:5.5pt;color:var(--muted);line-height:1.5}
.method-grid{display:grid;grid-template-columns:1fr 1fr;gap:3mm}
.method-grid>div{background:#f6f8f8;padding:3mm;border-radius:1mm}
.method-grid span{font-size:5.5pt;text-transform:uppercase;letter-spacing:.1em;color:var(--green-dark);font-weight:800}
.method-grid p{font-size:6pt;line-height:1.45;margin:1.2mm 0 0}
.report-photos{display:grid;grid-template-columns:1fr 1fr;gap:3mm;margin-bottom:4mm}
.report-photo{height:42mm;position:relative}
.report-photo img{width:100%;height:100%;object-fit:cover;border-radius:1mm}
.report-photo span{position:absolute;bottom:0;left:0;right:0;background:#102b35cc;color:#fff;font-size:5.5pt;padding:2mm}
.empty-evidence{grid-column:1/-1;height:20mm;border:1px dashed #cbd7d6;display:grid;place-items:center;color:#94a1a5;font-size:6pt}
.narrative{border-top:1px solid var(--line);padding-top:3mm;margin-top:3mm}
.narrative p{font-size:6.5pt;line-height:1.55;margin:1.5mm 0}
.conclusion{background:#f3f7f6;border:0;border-left:1mm solid var(--green);padding:3mm;margin-top:4mm}
.conclusion p{text-align:justify}
.signoff{display:grid;grid-template-columns:1fr 1fr;gap:18mm;margin-top:12mm}
.signoff span{font-size:5.5pt;text-transform:uppercase;color:var(--muted);letter-spacing:.1em}
.signature-line{border-bottom:1px solid #9babad;height:10mm;margin-bottom:2mm}
.signature-line img{display:block;max-width:100%;max-height:9mm;object-fit:contain;margin:0 auto}
.signoff strong{display:block;font-size:7pt}
.signoff small{display:block;font-size:5.5pt;color:var(--muted);margin-top:1mm}
.report-footer-design{display:flex;flex-direction:column;min-height:24mm}
.footer-disclaimer{padding:0 12mm;color:#74858a;font-size:6pt}
.footer-certifications{display:flex;justify-content:center;align-items:flex-end;gap:2.5mm;height:7.8mm;margin-top:auto;padding:.8mm 12mm 0;border-top:.3mm solid #d8e2df}
.footer-certifications img{height:6mm;max-width:22mm;object-fit:contain}
.footer-standards{margin-top:.3mm;color:#54a548;font-size:6.5pt;font-weight:800;letter-spacing:.03em}
.footer-band{position:relative;display:flex;justify-content:space-between;align-items:flex-end;min-height:6mm;margin-top:0;padding:2.2mm 12mm 1.5mm;background:#63ad45;color:#fff;overflow:hidden}
.footer-band::before{content:"";position:absolute;top:-3mm;left:22%;right:22%;height:6mm;background:#fff;border-radius:0 0 50% 50%}
.footer-band>*{position:relative;z-index:1}
.footer-band span,.footer-band strong{font-size:6.5pt}
.print-only{display:none}
.photo-controls{display:grid;grid-template-columns:1fr 1.5fr;gap:10px}
.photo-thumb small{position:absolute;left:3px;bottom:3px;background:#102b35cc;color:#fff;padding:2px 5px;border-radius:3px;font-size:7px;text-transform:uppercase}
.report-cover{min-height:260mm;display:flex;flex-direction:column;position:relative}
.cover-top{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:4mm}
.cover-top>img{width:46mm;height:auto;object-fit:contain}
.cover-top span{font-size:6pt;font-weight:800;letter-spacing:.18em;color:var(--green-dark)}
.cover-client-logo{flex:0 0 46mm;width:46mm;height:18mm;display:flex;align-items:center;justify-content:flex-end}
.cover-client-logo img{max-width:46mm;max-height:18mm;object-fit:contain}
.cover-main{margin-top:26mm}
.cover-main>p{font-size:7pt;letter-spacing:.22em;font-weight:800;color:var(--green);margin:0 0 4mm}
.cover-main h1{font:800 30pt Manrope;line-height:1.08;letter-spacing:-.04em;max-width:145mm;margin:0}
.cover-rule{height:1.2mm;width:20mm;background:var(--green);margin:6mm 0}
.cover-main>span,.cover-client-text>span,.cover-meta span,.cover-by>span{display:block;font-size:5.5pt;font-weight:800;letter-spacing:.15em;color:var(--muted)}
.cover-main>strong{display:block;font:700 11pt Manrope;margin-top:1mm}
.cover-report-label{margin-top:4mm}
.cover-client{display:flex;align-items:center;justify-content:space-between;gap:8mm;margin-top:14mm;padding:5mm 0 5mm 7mm;border-left:1.5mm solid var(--green);background:linear-gradient(90deg,#edf7f3,transparent)}
.cover-client-text{min-width:0}
.cover-client h2{font:800 19pt Manrope;margin:2mm 0 1mm}
.cover-client p{font-size:8pt;color:var(--muted);margin:0}
.cover-meta{display:grid;grid-template-columns:1.5fr 1.5fr .8fr .5fr;gap:4mm;margin-top:9mm;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:4mm 0}
.cover-meta strong{display:block;font-size:7pt;line-height:1.4;margin-top:1.5mm}
.cover-by{margin-top:auto;margin-bottom:6mm}
.cover-by strong{display:block;font:700 11pt Manrope;margin:1.5mm 0}
.cover-by small{font-size:6pt;color:var(--muted)}
.cover-by address{font-style:normal;font-size:8pt;line-height:1.55;color:var(--muted);margin:1mm 0 0}
.signature-cell .manager-signature{max-width:27mm;max-height:15mm;object-fit:contain}
.approved-signature{position:relative;overflow:visible}
.approved-signature .approval-stamp{position:absolute;width:50mm;height:50mm;max-width:none;max-height:none;right:-20mm;top:70%;transform:translateY(-25%) rotate(-7deg);object-fit:contain;opacity:.85;mix-blend-mode:multiply;pointer-events:none;z-index:3}
.cover-footer{margin-top:8mm;background:#14363c;color:#cfe0dd;padding:4mm;font-size:5.5pt;text-align:center;letter-spacing:.04em}
.approval-content{padding-top:8mm}
.approval-page .report-header{padding-bottom:2mm;margin-bottom:4mm}
.approval-page .approval-content{padding-top:3mm}
.approval-page .section-title{margin-bottom:4mm}
.approval-page .document-grid{margin:5mm 0}
.approval-page .approval-note{margin-top:6mm}
.document-grid{display:grid;grid-template-columns:35mm 1fr;border:1px solid var(--line);border-radius:2mm;overflow:hidden;margin:7mm 0}
.document-grid span,.document-grid strong{padding:3mm;border-bottom:1px solid var(--line);font-size:7pt}
.document-grid span{background:#f0f5f4;color:var(--muted);font-weight:700}
.document-grid span:nth-last-child(-n+2),.document-grid strong:nth-last-child(-n+2){border-bottom:0}
.approval-table{font-size:7pt;border:1px solid var(--line)}
.approval-table th,.approval-table td{text-align:left;padding:4mm 3mm;border:1px solid var(--line);height:18mm}
.approval-table th{background:#17343c}
.approval-table .signature-cell{width:42mm;text-align:center}
.signature-cell img{max-width:27mm;max-height:15mm;object-fit:contain}
.approval-note{margin-top:10mm;background:#f3f7f6;border-left:1mm solid var(--green);padding:5mm}
.approval-note strong{font-size:7pt}
.approval-note p{font-size:6pt;color:var(--muted);margin:1mm 0 0}
.section-copy,.report-prose p{font-size:7pt;line-height:1.7;color:#344b52;text-align:justify}
.report-prose h3,.photo-group h3,.raw-table-block h3{font:700 8pt Manrope;margin:5mm 0 2mm}
.particulars{display:grid;grid-template-columns:1fr 1fr;gap:3mm;margin-top:7mm}
.particulars>div{border:1px solid var(--line);padding:4mm;border-radius:1.5mm}
.particulars span{display:block;font-size:5.5pt;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.particulars strong{display:block;font-size:7pt;margin-top:1mm}
.photo-group{margin-top:7mm}
.primary-photo-group{margin-top:2mm}
.primary-photo-group .report-photos{margin-bottom:1mm}
.site-observations{margin-top:0;padding-top:2mm}
.report-photo{margin:0;height:auto}
.report-photo img{height:48mm}
.report-photo figcaption{font-size:5.5pt;color:#52676e;padding:1.5mm 0}
.map-photos{grid-template-columns:1fr}
.map-photos .report-photo img{height:100mm}
.map-photos .map-frame iframe{display:block;width:100%;height:72mm;border:0;border-radius:1mm;background:#eef3f2}
.map-unresolved{height:auto;min-height:18mm;padding:4mm;line-height:1.45}
.signoff{grid-template-columns:repeat(3,1fr);gap:8mm}
.signature-photos:empty{display:none}
.raw-table-block{margin-bottom:8mm}
.raw-table th small{display:block;color:#bcd0d2;font-size:4.5pt;margin-top:.5mm}
.raw-table td:first-child,.raw-table th:first-child{text-align:left;white-space:nowrap}
.raw-table td,.raw-table th{font-size:5.5pt;padding:1.4mm 2mm}
.annex-chart{border:1px solid var(--line);border-radius:2mm;padding:4mm;margin-bottom:5mm;break-inside:avoid}
.annex-chart>div{display:flex;justify-content:space-between;align-items:center;margin-bottom:2mm}
.annex-chart strong{font:700 8pt Manrope}
.annex-chart span{font-size:6pt;color:var(--muted)}
.annex-chart canvas{display:block;width:100%;height:auto}

.report{font-size:10pt;line-height:1.5}
.report-brand span,.report-id span,.report-id em,.report-title p,.client-block>div>span,.narrative span,.section-title p,.summary-card span,.summary-card small,.chart-head span,.method-grid span,.signoff span,.signoff small,.cover-top span,.cover-main>span,.cover-client-text>span,.cover-meta span,.cover-by>span,.cover-by small,.particulars span,.report-photo figcaption,.annex-chart span{font-size:8pt}
.report-id strong,.client-block p,.client-block dt,.client-block dd,.assessment strong,.chart-head strong,.chart-head select,.table-note,.method-grid p,.report-photo span,.empty-evidence,.approval-note p,.particulars strong,.cover-main>p,.cover-meta strong{font-size:9pt}
.report-brand strong,.client-block>div>strong,.assessment p,.narrative p,.section-copy,.report-prose p,.signoff strong,.cover-main>strong,.cover-client p,.cover-by strong,.approval-note strong{font-size:10pt}
.report .section-title>span{font-size:8pt}
.report .section-title h2{font-size:14pt}
.report .summary-card strong{font-size:14pt}
.report .assessment>span{font-size:10pt}
.report table{font-size:8.5pt}
.report .status-pill{font-size:8pt}
.report .report-footer{font-size:8pt}
.report .cover-footer{font-size:8pt}
.report .document-grid span,.report .document-grid strong,.report .approval-table{font-size:9pt}
.report .report-prose h3,.report .photo-group h3,.report .raw-table-block h3,.report .annex-chart strong{font-size:10pt}
.report .raw-table td,.report .raw-table th,.report .annexure .raw-table td,.report .annexure .raw-table th{font-size:8pt}
.report .raw-table th small,.report .annexure .raw-table th small{font-size:8pt}
.report .page-number{font-size:8pt}
.results-page .section-title{margin-bottom:4mm}
.results-page .table-wrap{margin-bottom:2mm}
.results-page .results-table{font-size:8pt;line-height:1.3}
.results-page .results-table th{padding:1.8mm 1.6mm}
.results-page .results-table td{padding:1.2mm 1.6mm}
.results-page .status-pill{padding:.5mm 1.2mm;font-size:8pt}
.results-page .table-note{margin:1.5mm 0 2mm;font-size:10pt;line-height:1.35}
.results-page .chart-card{padding:3mm;margin-bottom:0;break-inside:avoid}
.results-page .chart-head{margin-bottom:1mm}
.chart-review-page .section-title{margin-bottom:3mm}
.chart-review-page .chart-meta{margin:0 0 2mm}
.chart-review-page .annex-chart{padding:2.5mm;margin-bottom:2.5mm}
.chart-review-page .annex-chart>div{margin-bottom:1mm}
.chart-review-page .annex-chart:last-child{margin-bottom:0}

.review-readings-btn{width:100%;margin-top:10px;padding:12px}
.review-readings-btn:disabled{opacity:.5;cursor:not-allowed}
.modal-open{overflow:hidden}
.readings-modal{display:none;position:fixed;inset:0;z-index:100;background:#0c252dcc;padding:24px;align-items:center;justify-content:center}
.readings-modal.open{display:flex}
.readings-dialog{width:min(1500px,98vw);height:min(880px,94vh);background:#fff;border-radius:14px;box-shadow:0 30px 90px #06171e80;display:flex;flex-direction:column;overflow:hidden}
.readings-dialog-header{display:flex;align-items:center;justify-content:space-between;padding:22px 26px;border-bottom:1px solid var(--line)}
.readings-dialog-header p{margin:0 0 4px;font-size:8px;font-weight:800;letter-spacing:.18em;color:var(--green)}
.readings-dialog-header h2{font:700 21px Manrope;margin:0}
.readings-dialog-header span{font-size:10px;color:var(--muted)}
.modal-close{border:0;background:#edf3f2;color:#3c555c;width:34px;height:34px;border-radius:50%;font-size:21px;cursor:pointer}
.readings-help{padding:11px 26px;background:#f2f7f5;color:#557068;font-size:10px}
.readings-table-wrap{flex:1;overflow:auto}
.readings-editor-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}
.readings-editor-table th{position:sticky;top:0;z-index:3;background:#17343c;color:#fff;text-align:left;white-space:nowrap;padding:10px 8px;font-size:9px;border-right:1px solid #ffffff1c}
.readings-editor-table th small{display:block;color:#aec4c7;font-size:7px;margin-top:2px}
.readings-editor-table td{padding:5px;border-right:1px solid #e4ebea;border-bottom:1px solid #e4ebea;background:#fff}
.readings-editor-table th:first-child,.readings-editor-table td:first-child{position:sticky;left:0;z-index:2;min-width:44px;text-align:center}
.readings-editor-table th:first-child{z-index:4;background:#102b35}
.readings-editor-table td:first-child{background:#f2f6f5;font-size:9px;font-weight:700;color:var(--muted)}
.readings-editor-table input{width:92px;min-width:92px;border:1px solid transparent;border-radius:4px;background:#f7f9f9;padding:7px;font-size:10px}
.readings-editor-table td:nth-child(2) input{width:120px}
.readings-editor-table td:nth-child(3) input{width:150px}
.readings-editor-table td:nth-child(4) input{width:115px}
.readings-editor-table td:nth-child(5) input{width:190px}
.readings-editor-table input:focus{background:#fff;border-color:var(--green);box-shadow:0 0 0 2px #28a67518}
.readings-editor-table input.corrected{background:#fff9df;border-color:#e8c86b}
.readings-editor-table input.invalid{background:#fff0f0;border-color:var(--red);box-shadow:0 0 0 2px #c94f4f18}
.readings-validation{min-height:20px;padding:8px 26px 0;color:var(--red);font-size:10px}
.readings-dialog-footer{display:flex;justify-content:flex-end;gap:9px;padding:16px 26px 20px}
.equipment-upload-card{display:grid;grid-template-columns:1fr 110px;gap:14px;align-items:center;background:#f4f8f7;border:1px solid #d5e3e0;border-radius:9px;padding:14px;margin:20px 0}
.equipment-upload-card>div:first-child{display:flex;flex-direction:column;gap:4px}
.equipment-upload-card>div:first-child span{font-size:8px;font-weight:800;letter-spacing:.14em;color:var(--green-dark)}
.equipment-upload-card>div:first-child strong{font-size:12px}
.equipment-upload-card>div:first-child small{font-size:9px;line-height:1.45;color:var(--muted)}
.equipment-editor-preview{grid-row:1/3;grid-column:2;width:110px;height:82px;border:1px dashed #b9cbc7;border-radius:7px;background:#fff;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.equipment-editor-preview img{width:100%;height:60px;object-fit:contain}
.equipment-editor-preview span{font-size:7px;color:var(--muted);padding:3px 5px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.equipment-upload-button{grid-column:1;width:max-content;margin:0}
.equipment-upload-button input{display:none}
.client-logo-actions{grid-column:1;display:flex;align-items:center;gap:8px}
.client-logo-preview img{padding:5px}
.workflow-card{margin-top:24px;padding:18px;border:1px solid #d7e4e1;border-radius:10px;background:#f8fbfa}
.workflow-heading>span{font-size:9px;letter-spacing:.18em;color:var(--green-dark);font-weight:800}
.workflow-heading>strong{display:block;font:700 17px Manrope;margin-top:4px}
.workflow-heading p{font-size:11px;line-height:1.5;color:var(--muted);margin:7px 0 14px}
.workflow-fields{display:grid;gap:10px}
.workflow-fields label{margin:0}
.workflow-actions{display:grid;gap:8px;margin-top:13px}
.workflow-history{display:grid;gap:7px;margin-top:14px}
.workflow-event{border-left:2px solid #bfd5d0;padding-left:9px;color:#50666d;font-size:10px;line-height:1.45}
.workflow-event strong{display:block;font-size:10px;color:var(--ink)}
.step-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
.step-footer>span{font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#8a9a9f}
.next-step-btn{min-width:190px;padding:12px 17px}
.editor .form-grid{align-items:start;column-gap:16px;row-gap:18px}
.editor .form-grid>label{width:100%;min-width:0;margin:0}
.editor .form-grid input,.editor .form-grid textarea,.editor .form-grid select,.editor .panel>label input,.editor .panel>label textarea,.editor .panel>label select{display:block;width:100%;max-width:100%;min-width:0;background:#fff;border-color:#d5e1df}
.editor input:not([type="file"]),.editor select{min-height:40px}
.editor textarea{overflow-x:hidden}
.editor .wide{width:100%}
.editor .inline-fields>label{min-width:0;width:100%}

[hidden]{display:none!important}
.device-settings{display:none}
.portal-home.settings-mode .home-intro,.portal-home.settings-mode .home-actions,.portal-home.settings-mode .report-search{display:none}
.portal-home.settings-mode .device-settings.active{display:block}
.settings-icon{background:#eeeafb;color:#665495}
.device-settings-grid{display:grid;grid-template-columns:minmax(280px,380px) 1fr;gap:24px;margin-top:24px}
.device-form,.device-registry{background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px;box-shadow:0 12px 35px #1839400c}
.device-form h3,.device-registry h3{font:700 17px Manrope;margin:0 0 18px}
.device-form{display:flex;flex-direction:column;gap:14px}
.device-form label{display:flex;flex-direction:column;gap:7px;font-size:10px;font-weight:700;color:#50666d}
.device-form input{width:100%;border:1px solid #d7e2e1;border-radius:7px;padding:11px;background:#fff;color:var(--ink)}
.device-photo-preview{height:180px;border:1px dashed #b9ccca;border-radius:10px;background:#f4f8f7;display:grid;place-items:center;overflow:hidden;color:var(--muted);font-size:10px}
.device-photo-preview img{width:100%;height:100%;object-fit:contain}
.device-certificate-preview{min-height:76px;border:1px dashed #b9ccca;border-radius:10px;background:#f4f8f7;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;overflow:hidden;color:var(--muted);font-size:10px;padding:10px;text-align:center}
.device-certificate-preview img{max-width:100%;max-height:120px;object-fit:contain}
.device-certificate-preview>span{max-width:100%;overflow-wrap:anywhere}
.certificate-file{display:flex;align-items:center;gap:10px;width:100%;justify-content:center}
.certificate-file strong{background:#b64b4b;color:#fff;border-radius:5px;padding:5px 8px;font-size:9px;letter-spacing:.08em}
.certificate-file span{overflow-wrap:anywhere}
.device-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.device-item{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fafcfc}
.device-item>img{width:100%;height:135px;object-fit:contain;background:#edf3f2}
.device-details{display:flex;flex-direction:column;gap:6px;padding:12px}
.device-item strong{font-size:12px}
.device-item span{font-size:9px;color:var(--muted);overflow-wrap:anywhere}
.device-cert-status.has-certificate{color:var(--green-dark)}
.device-ref-row{display:flex;gap:6px;margin-top:2px}
.device-ref-input{flex:1;min-width:0;padding:7px 9px;font-size:10px}
.device-ref-row .device-save-ref{padding:7px 9px;font-size:9px;flex:none}
.device-cert-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}
.device-cert-button,.device-remove-cert{padding:7px 9px;font-size:9px;text-align:center}
.device-remove{color:var(--red);font-size:9px;padding:7px 9px}
.device-cert-button input{display:none}

.token-reveal{display:flex;flex-direction:column;gap:8px;border:1px dashed #b9ccca;border-radius:10px;background:#f4f8f7;padding:12px}
.token-reveal>span{font-size:10px;font-weight:700;color:#50666d}
.token-reveal-row{display:flex;gap:8px}
.token-reveal-row input{flex:1;min-width:0;border:1px solid #d7e2e1;border-radius:7px;padding:9px;background:#fff;color:var(--ink);font-family:monospace;font-size:11px}
.token-reveal-row .button{flex:none}

.certificate-meta{display:grid;grid-template-columns:1fr 1fr;gap:4mm;margin-bottom:4mm}
.certificate-meta>div{background:#f3f7f6;border-left:1mm solid var(--green);padding:3mm 4mm;min-width:0}
.certificate-meta span{display:block;font-size:8pt;letter-spacing:.14em;font-weight:800;color:var(--green-dark);margin-bottom:1mm}
.certificate-meta strong{font-size:9pt;overflow-wrap:anywhere}
.certificate-part{margin:-1mm 0 2mm;font-size:8pt;font-weight:700;color:var(--muted)}
.certificate-frame{flex:1;min-height:0;border:1px solid #d7e2e1;background:#f8fbfa;display:flex;align-items:center;justify-content:center;overflow:hidden}
.certificate-document{width:100%;height:100%;border:0}
.certificate-image{max-width:100%;max-height:100%;object-fit:contain;padding:3mm}

.annexure .raw-table{width:100%;table-layout:fixed}
.annexure .raw-table th,.annexure .raw-table td{padding:4px 3px;font-size:7px;line-height:1.25;text-align:center;white-space:normal}
.annexure .raw-table th:first-child,.annexure .raw-table td:first-child{width:25%;text-align:left;white-space:nowrap}
.annexure .raw-table th small{font-size:6px}
.report-page.landscape{page:landscape;width:297mm;height:210mm;padding:8mm 12mm 25mm;margin-left:-43.5mm}
.report-page.landscape.annexure{padding:6mm 12mm}
.report-page.landscape .section-title{margin-bottom:3mm}
.report-page.landscape .raw-table-block{margin-bottom:0}
.annexure-continuation .raw-table-block h3{margin-top:0}
.report-page.landscape .raw-table-block h3{margin:1mm 0 1.5mm}
.report-page.landscape .raw-table th,.report-page.landscape .raw-table td{padding:.4mm 1mm;font-size:8pt;line-height:1.15;overflow-wrap:anywhere}
.report-page.landscape .raw-table th:first-child,.report-page.landscape .raw-table td:first-child{width:15%}

@page landscape{size:A4 landscape;margin:0}

@media(max-width:1100px){.workspace{grid-template-columns:370px minmax(600px,1fr)}
.panel{padding:25px 24px}
.paper-wrap{padding:25px 20px}
.step span{display:none}
}

@media(max-width:760px){.device-settings-grid{grid-template-columns:1fr}
.readings-modal{padding:0}
.readings-dialog{width:100vw;height:100vh;max-height:none;border-radius:0}
.readings-dialog-header{padding:16px}
.readings-help{padding:10px 16px}
.readings-dialog-footer{padding:12px 16px}
.equipment-upload-card{grid-template-columns:1fr}
.parameter-selection-head{flex-direction:column}
.parameter-selection-actions{width:100%;justify-content:space-between}
.parameter-checkbox-grid{grid-template-columns:1fr}
.equipment-editor-preview{grid-column:1;grid-row:auto;width:100%;height:120px}
.equipment-editor-preview img{height:95px}
.equipment-upload-button{width:100%;text-align:center}
.step-footer{align-items:stretch;flex-direction:column}
.next-step-btn{width:100%}
.home-header{padding:0 18px}
.home-brand img{width:88px}
.home-brand div{display:none}
.home-content{padding:38px 0}
.home-actions{grid-template-columns:1fr}
.search-form{grid-template-columns:1fr}
.report-result{grid-template-columns:1fr}
.topbar{padding:0 14px}
.top-actions>span,.button.ghost{display:none}
#logoutBtn,#homeBtn{display:inline-block;padding:8px}
.workspace{display:block;height:auto;overflow:visible}
.editor{border-right:0;height:auto;overflow:visible}
.preview-shell{display:block}
.steps{position:sticky;top:68px;background:#fff;z-index:10}
.step span{display:block}
.panel{padding:24px 18px}
.preview-shell{border-top:8px solid var(--surface)}
.preview-toolbar{padding:0 18px}
.paper-wrap{padding:15px 8px;overflow-x:auto}
.report{transform:scale(.72)!important;transform-origin:top left;margin:0}
.paper-wrap{height:850px}
.form-grid{grid-template-columns:1fr}
.wide{grid-column:auto}
}

@media print{@page{size:A4;margin:0}
body{background:#fff}
.no-print{display:none!important}
.workspace{display:block;height:auto;overflow:visible}
.preview-shell,.paper-wrap{display:block;padding:0;overflow:visible;height:auto;min-height:0;flex:none}
.report{box-shadow:none;margin:0;width:210mm;transform:none!important}
.report-page{height:296.5mm;min-height:296.5mm;padding:10mm 12mm 28mm}
.report-page.landscape{height:209.5mm;min-height:209.5mm;padding:8mm 12mm 25mm;margin-left:0}
.report-page.landscape.annexure{padding:6mm 12mm}
.report-page:not(:last-child){break-after:page}
.chart-card,.client-block,.signoff,.photo-group,.annex-chart{break-inside:avoid}
.print-only{display:inline}
canvas{max-width:100%}
}

