:root{
  --bg:#08131f; --panel:#102338; --panel2:#17314d; --line:#31597f; --text:#eef5ff; --muted:#bfd1e6;
  --blue:#133553; --blue2:#1f4e79; --blue3:#4d88bf; --green:#14894c; --red:#c62828;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(180deg,#08131f,#0d1d2f);color:var(--text)}
.wrap{max-width:1080px;margin:0 auto;padding:14px 14px 88px}
.hero{background:linear-gradient(135deg,#10263c,#133553 58%,#3d7cb2 130%);border:1px solid #416a94;border-radius:24px;padding:18px;box-shadow:0 10px 24px rgba(0,0,0,.28)}
.heroRow{display:flex;gap:16px;align-items:center}
.logoBox{width:110px;height:84px;border-radius:18px;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 auto}
.logoBox img{max-width:100%;max-height:100%;display:block}
.hero h1{margin:0;font-size:1.9rem}
.hero .sub{margin-top:6px;color:#d8e7f8}
.hero .meta{margin-top:8px;color:#d8e7f8;font-size:.92rem;line-height:1.45}
.card{margin-top:14px;background:var(--panel);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 8px 22px rgba(0,0,0,.25)}
.card h2{margin:0;padding:14px 16px;border-bottom:1px solid var(--line);font-size:1rem;background:rgba(255,255,255,.03)}
.body{padding:14px}
.grid{display:grid;gap:12px}
.g2{grid-template-columns:1fr 1fr}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:900px){.g2,.g3,.g4{grid-template-columns:1fr}.heroRow{display:block}.logoBox{margin-bottom:12px}}
label{display:block;font-size:.84rem;color:var(--muted);margin:0 0 6px;font-weight:bold}
input,select,textarea{width:100%;padding:12px;border-radius:14px;border:1px solid #466a8e;background:#081827;color:var(--text);font-size:16px}
textarea{min-height:84px;resize:vertical}
button{border:none;border-radius:14px;padding:12px 14px;background:var(--blue2);color:#fff;font-weight:bold;cursor:pointer}
button.secondary{background:#244666}
button.green{background:var(--green)}
button.red{background:var(--red)}
button.ghost{background:transparent;border:1px solid #5d7fa2}
.btns{display:flex;gap:10px;flex-wrap:wrap}
.small{font-size:.82rem;color:var(--muted)}
.hidden{display:none!important}
.tabs{position:fixed;left:0;right:0;bottom:0;background:#091522;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(7,1fr);gap:8px;padding:10px 10px 14px}
.tab{padding:10px 6px;text-align:center;border-radius:14px;color:var(--muted);font-weight:bold}
.tab.active{background:#16314d;color:#fff;border:1px solid #49739d}
.item,.client,.job{background:var(--panel2);border:1px solid var(--line);padding:12px;border-radius:16px;margin-top:10px}
.top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.title{font-weight:bold}
.tag{display:inline-block;padding:4px 10px;border-radius:999px;font-size:.75rem;font-weight:bold}
.pass{background:rgba(20,137,76,.18);color:#8af0b2}
.fail{background:rgba(198,40,40,.18);color:#ffb4b4}
.report{background:#fff;color:#111;border-radius:18px;padding:16px}
.report-head{background:linear-gradient(135deg,#133553,#2a6798);color:#fff;border-radius:16px;padding:16px}
.report-head h3{margin:0;font-size:1.5rem}
.report-head .service{opacity:.95;margin-top:4px}
.report-head .contact{margin-top:8px;font-size:.92rem;line-height:1.4}
.tbl{width:100%;border-collapse:collapse;margin-top:10px;font-size:.84rem}
.tbl th,.tbl td{border:1px solid #d7dfeb;padding:6px;text-align:left;vertical-align:top}
.tbl th{background:#133553;color:#fff}
.tbl.pass th{background:#14894c}
.tbl.fail th{background:#c62828}
.notice{background:rgba(77,136,191,.12);border:1px solid rgba(77,136,191,.3);border-radius:14px;padding:12px}
.logoPrev{max-width:240px;max-height:100px;display:none;background:rgba(255,255,255,.05);padding:8px;border-radius:12px}
.labelCard{background:#fff;color:#111;border:2px solid #133553;border-radius:12px;padding:10px;width:260px}
.labelHead{background:#133553;color:#fff;padding:8px 10px;border-radius:8px;font-weight:bold}
.modalBack{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;z-index:9999;padding:18px}
.modal{width:min(92vw,420px);background:#fff;color:#111;border-radius:22px;overflow:hidden;box-shadow:0 16px 40px rgba(0,0,0,.45)}
.modalHead{background:linear-gradient(135deg,#133553,#2a6798);color:#fff;padding:14px 16px;font-weight:bold}
.modalBody{padding:18px 16px 8px;font-size:1rem;line-height:1.4}
.modalFoot{padding:14px 16px 18px;display:flex;justify-content:flex-end}
.modalBtn{min-width:92px}
#mhkModalCancel{background:#fff;color:#17314d;border:1px solid #5d7fa2;margin-right:10px}
#mhkModalCancel:hover{background:#eef4fa}

.sigCanvasWrap{background:#081827;border:1px solid #466a8e;border-radius:14px;padding:8px}
.sigCanvas{width:100%;height:180px;background:#fff;border-radius:10px;display:block;touch-action:none}
.itemActions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}

.photoThumb{max-width:120px;max-height:90px;border:1px solid #466a8e;border-radius:8px;display:block;margin-top:8px}
.reportPage{
  background:#fff;
  color:#111;
  width:190mm;
  min-height:267mm;
  margin:0 auto 8mm;
  padding:0;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  page-break-after:always;
  border:none;
  border-radius:0;
  box-shadow:none;
}
.reportPageCover {
  background:#f8fafc;
}
.reportHeaderBar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  background:#0f172a;
  color:#ffffff;
  font-size:12px;
  font-weight:600;
}

.reportHeaderLeft {
  font-weight:700;
}

.reportHeaderRight {
  font-size:11px;
  opacity:0.9;
}
.reportPage:last-child{page-break-after:auto}
.reportPageInner{
  display:flex;
  flex-direction:column;
  min-height:100%;
  border:none;
  border-radius:0;
  box-shadow:none;
  background:#fff;
}
.reportTopLine{height:5px;background:#133553;margin:0 0 10px 0}
.reportSplit{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.reportBoxSq{
  border:1px solid #c9d2dc;
  padding:9px 10px;
  margin-top:10px;
  border-radius:0;
  background:#fff;
  box-shadow:none;
}
.reportBoxSq h4,.reportSectionTitle{margin:0 0 8px 0;color:#111;font-size:1rem;font-weight:800}
.reportTable{width:100%;border-collapse:collapse;margin-top:8px;font-size:.83rem}
.reportTable th,.reportTable td{border:1px solid #c9d2dc;padding:6px;text-align:left;vertical-align:top;color:#111}
.reportTable th{background:#133553;color:#fff;font-weight:700}
.reportFoot{
  margin-top:auto;
  border-top:1px solid #c9d2dc;
  padding-top:7px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  color:#555;
  font-size:.8rem;
}
.reportMuted{color:#4f5e70}
.reportPhotoGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.reportPhotoCard{border:1px solid #c9d2dc;padding:8px;background:#fff}
.reportPhotoCard img{width:100%;max-height:185px;object-fit:contain;border:1px solid #d7dfe8;background:#fff}
.reportSignatureBox{height:44px;border:1px solid #bbb;background:#fff;margin-top:8px;padding:5px}
.lockInput{background:#fff;color:#111;border:1px solid #cfd9e6}

@page{
  size:A4;
  margin:10mm;
}

@media print{
  .keepTogether{page-break-inside:avoid;break-inside:avoid}
  .tabs,.noprint,.hero,.modalBack{display:none!important}
  body{background:#fff!important}
  .wrap{padding:0!important;max-width:none!important}
  #reportView>.card{
    border:none!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
    overflow:visible!important;
  }
  #reportView>.card>h2{display:none!important}
  #reportView>.card>.body{
    padding:0!important;
    border:none!important;
    background:#fff!important;
  }
  #reportArea,#reportBox,.reportPage,.reportPageInner,.report,.report-head{
    border:none!important;
    border-radius:0!important;
    box-shadow:none!important;
    outline:none!important;
  }
}

.labelPreviewNote{margin-top:8px;font-size:.8rem;color:var(--muted)}


.primaryActions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.primaryActions button{padding:14px 16px;font-size:1rem;box-shadow:0 6px 14px rgba(0,0,0,.22)}
.primaryActions #createJobBtn{background:var(--green)}
.primaryActions #scanQrHomeBtn{background:var(--blue3);color:#08131f}
@media(max-width:700px){
  .primaryActions{grid-template-columns:1fr}
}

.tabs{
  overflow-x:auto;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(86px,1fr);
  gap:6px;
  padding:10px 8px 12px;
  -webkit-overflow-scrolling:touch;
}
.tabs::-webkit-scrollbar{display:none}
.tab{
  min-width:86px;
  padding:10px 4px;
  font-size:.88rem;
}


/* Scanner modal buttons */
#scanModalBack .modalFoot{display:flex;gap:12px;justify-content:center;padding-top:10px}
#scanModalBack button{font-size:16px;font-weight:600;padding:12px 18px;border-radius:8px;border:none;cursor:pointer}
#scanUploadBtn{background:#1a73e8;color:#fff}
#scanLiveBtn{background:#2e7d32;color:#fff}
#scanCloseBtn{background:#444;color:#fff}
#scanUploadBtn:hover{background:#1557b0}
#scanLiveBtn:hover{background:#1e5a24}
#scanCloseBtn:hover{background:#222}
#scanModalBack .modalBody{padding-bottom:20px}
#scanUploadBtn,#scanLiveBtn{min-width:140px;text-align:center}



/* ===== Premium report polish ===== */
.reportPageInner.premium{
  padding:10mm 9mm 8mm;
  background:#fff;
}
.reportHero{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}
.reportHeroLeft{
  display:flex;
  gap:14px;
  align-items:flex-start;
  flex:1;
}
.reportBrandIconWrap{
  width:82px;
  min-width:82px;
  height:82px;
  border-radius:16px;
  background:#f5f8fb;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.reportBrandBolt{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.2rem;
  color:#f2c300;
  background:linear-gradient(135deg,#244f7f,#3b8fd1);
}
.reportCompanyName{
  font-size:1.56rem;
  font-weight:900;
  color:#132c4b;
  line-height:1.12;
}
.reportServiceLine{
  margin-top:3px;
  color:#37465b;
  font-size:1.02rem;
}
.reportCompanyMeta{
  margin-top:11px;
  color:#1f2b3a;
  line-height:1.5;
}
.reportHeroRight{
  flex:0 0 180px;
}
.reportNextCard{
  border-radius:14px;
  padding:12px 14px;
  color:#fff;
  background:linear-gradient(135deg,#254e7b,#3a98dc);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);
}
.reportNextLabel{
  font-size:.95rem;
  font-weight:800;
  opacity:.95;
}
.reportNextDate{
  margin-top:4px;
  font-size:1.25rem;
  font-weight:900;
}
.reportRibbon{
  margin-top:16px;
  border-radius:0;
  background:linear-gradient(135deg,#1f3f67,#2f72ac 58%,#8dc7ea);
  color:#fff;
  font-size:1.26rem;
  font-weight:900;
  letter-spacing:.4px;
  padding:12px 14px;
}
.reportMetaBar{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:0;
  border:1px solid #d7dfe8;
  border-top:none;
  background:#f6f8fb;
  color:#1b2735;
}
.reportMetaBar>div{
  padding:10px 12px;
  border-right:1px solid #dde5ed;
}
.reportMetaBar>div:last-child{border-right:none}

.reportSummaryCard{
  margin-top:14px;
  border:1px solid #d8e1ea;
  background:linear-gradient(135deg,#fbfcfe,#eef4f9);
  padding:14px;
  border-radius:12px;
  display:grid;
  grid-template-columns:1.2fr 1.3fr;
  gap:14px;
}
.reportClientMini{
  color:#111;
}
.reportStatGrid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  align-items:stretch;
}
.reportStat{
  border-radius:50%;
  width:108px;
  height:108px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin:0 auto;
  color:#fff;
  text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.reportStat .num{
  font-size:2rem;
  line-height:1;
  font-weight:900;
}
.reportStat .num.date{
  font-size:1.1rem;
  line-height:1.1;
  padding:0 8px;
}
.reportStat .lbl{
  margin-top:6px;
  font-size:.9rem;
  font-weight:800;
}
.reportStat.total{background:linear-gradient(135deg,#2d7b67,#3daf87)}
.reportStat.pass{background:linear-gradient(135deg,#23844d,#42b86f)}
.reportStat.fail{background:linear-gradient(135deg,#c43838,#e45151)}
.reportStat.neutral{background:linear-gradient(135deg,#214b76,#3e95d6)}

.reportSplit.premium{gap:12px}
.reportBoxSq.premium{
  border:1px solid #d7dfe8;
  border-radius:10px;
  padding:10px 12px;
  box-shadow:none;
  background:#fff;
}
.reportPageTitle{
  font-size:1.18rem;
  font-weight:900;
  color:#1d3e68;
  letter-spacing:.35px;
  padding-bottom:10px;
  border-bottom:1px solid #d8e1ea;
}
.reportTableTitle{
  margin:-12px -14px 10px;
  padding:9px 14px;
  font-size:1rem;
  font-weight:900;
  color:#fff;
  border-radius:10px 10px 0 0;
}
.reportTableTitle.pass{
  background:linear-gradient(135deg,#1e7d5b,#92c9b5);
}
.reportTableTitle.fail{
  background:linear-gradient(135deg,#bf2e38,#f0b5ba);
}
.reportTable.premium{
  margin-top:0;
  font-size:.82rem;
}
.reportTable.premium th{
  background:#f2f5f8;
  color:#445266;
  font-weight:800;
}
.reportResultPass{color:#14894c;font-weight:900}
.reportResultFail{color:#c62828;font-weight:900}
.reportPhotoGrid.premium{grid-template-columns:1fr 1fr}
.reportPhotoCard.premium{
  border:1px solid #d8e1ea;
  border-radius:10px;
  padding:10px;
  background:#fff;
}
.reportPhotoAsset{
  font-weight:900;
  color:#1d3048;
}
.reportSignatureBox.premium{
  min-height:54px;
  border:1px solid #d8e1ea;
  border-radius:10px;
  padding:8px;
  background:#fff;
}
.reportFoot.premium{
  margin-top:auto;
  border-top:1px solid #d8e1ea;
  padding-top:8px;
  color:#5c6776;
  font-size:.82rem;
}

@media print{
  .reportPageInner.premium{
    padding:8mm 7mm 7mm !important;
  }
}



/* ===== Final micro-fix: report number + dynamic footer support ===== */
.reportNoInline{
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
}
.reportMetaBar > div:first-child{
  white-space:nowrap !important;
}
@media (max-width: 900px){
  .reportMetaBar > div:first-child{
    white-space:normal !important;
  }
}
.reportLastPage{
  page-break-before:always;
}

/* ===== Premium page 1 cover redesign ===== */
.reportPageCover{
  background:#fff;
}

.reportPageCover .reportHeaderBar{
  min-height:42px;
  padding:0 18px;
  background:#082846;
  color:#fff;
  border-radius:0;
  letter-spacing:.1px;
}

.reportPageCover .reportHeaderLeft{
  font-size:.82rem;
  font-weight:800;
}

.reportPageCover .reportHeaderRight{
  font-size:.78rem;
  font-weight:800;
  opacity:1;
  text-transform:uppercase;
  letter-spacing:.4px;
}

.reportHeaderAccent{
  height:3px;
  background:#f28c28;
}

.reportPageCover .reportCoverInner{
  padding:8mm 7mm 6mm;
}

.reportPageCover .reportHero{
  align-items:center;
  gap:20px;
  padding:2mm 2mm 4mm;
  border-bottom:1px solid #d9e3ed;
}

.reportPageCover .reportHeroLeft{
  align-items:center;
}

.reportPageCover .reportBrandIconWrap{
  width:90px;
  min-width:90px;
  height:90px;
  border:1px solid #e2e9f0;
  border-radius:16px;
  background:#f8fafc;
}

.reportPageCover .reportCompanyName{
  font-size:1.72rem;
  color:#082846;
  letter-spacing:-.25px;
}

.reportPageCover .reportServiceLine{
  color:#36485d;
  font-size:1rem;
}

.reportPageCover .reportCompanyMeta{
  margin-top:9px;
  color:#34465a;
  font-size:.9rem;
  line-height:1.45;
}

.reportPageCover .reportHeroRight{
  flex:0 0 172px;
}

.reportPageCover .reportNextCard{
  background:linear-gradient(135deg,#0d4f83,#2498dc);
  border-radius:12px;
  padding:13px 15px;
  box-shadow:none;
  border:1px solid rgba(8,40,70,.08);
}

.reportPageCover .reportNextLabel{
  font-size:.74rem;
  letter-spacing:.6px;
  text-transform:uppercase;
}

.reportPageCover .reportNextDate{
  font-size:1.28rem;
  letter-spacing:.1px;
}

.reportMetaBarCover{
  margin-top:14px;
  grid-template-columns:1.1fr 1fr 1.1fr;
  border:1px solid #d9e3ed;
  border-radius:10px;
  overflow:hidden;
  background:#f8fafc;
}

.reportMetaBarCover>div{
  padding:10px 13px;
  min-height:58px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.reportMetaLabel{
  display:block;
  color:#6a7888;
  font-size:.7rem;
  line-height:1;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.55px;
  margin-bottom:5px;
}

.reportMetaValue{
  display:block;
  color:#102f50;
  font-size:.98rem;
  line-height:1.15;
  font-weight:900;
}

.reportPageCover .reportSummaryCard.reportSummaryCover{
  display:block;
  margin-top:14px;
  padding:0;
  border:1px solid #d9e3ed;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
}

.reportSummaryHeading{
  padding:9px 14px;
  background:#eef4f9;
  border-bottom:1px solid #d9e3ed;
  color:#0b3155;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.55px;
}

.reportPageCover .reportStatGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  padding:12px;
}

.reportPageCover .reportStat{
  width:auto;
  height:auto;
  min-height:88px;
  margin:0;
  border-radius:10px;
  align-items:flex-start;
  padding:15px 17px;
  text-align:left;
  justify-content:center;
  box-shadow:none;
  border:1px solid #d9e3ed;
  color:#102f50;
  background:#fff;
}

.reportPageCover .reportStat.total{
  border-left:5px solid #17608f;
  background:linear-gradient(135deg,#f7fbff,#eef6fb);
}

.reportPageCover .reportStat.pass{
  border-left:5px solid #229653;
  background:linear-gradient(135deg,#fbfffc,#edf9f2);
}

.reportPageCover .reportStat.fail{
  border-left:5px solid #d33838;
  background:linear-gradient(135deg,#fffdfd,#fff1f1);
}

.reportPageCover .reportStat .num{
  color:#0a3155;
  font-size:1.95rem;
  line-height:1;
}

.reportPageCover .reportStat.pass .num{color:#23874d}
.reportPageCover .reportStat.fail .num{color:#c82f2f}

.reportPageCover .reportStat .lbl{
  margin-top:7px;
  color:#46576a;
  font-size:.78rem;
  line-height:1;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.35px;
}

.reportDetailGrid{
  margin-top:14px !important;
  gap:12px !important;
}

.reportPageCover .reportDetailCard{
  padding:0;
  margin-top:0;
  overflow:hidden;
  border-radius:12px;
  border-color:#d9e3ed;
}

.reportDetailHeader{
  padding:9px 13px;
  background:#082846;
  color:#fff;
  font-size:.9rem;
  font-weight:900;
}

.reportDetailBody{
  padding:5px 13px 8px;
}

.reportDetailRow{
  display:grid;
  grid-template-columns:108px 1fr;
  gap:10px;
  align-items:start;
  padding:7px 0;
  border-bottom:1px solid #edf1f5;
  color:#111;
  font-size:.84rem;
}

.reportDetailRow:last-child{
  border-bottom:none;
}

.reportDetailRow span{
  color:#68778a;
  font-size:.75rem;
  font-weight:800;
}

.reportDetailRow b{
  color:#172c43;
  font-weight:800;
  overflow-wrap:anywhere;
}

.reportDetailAddress b{
  line-height:1.3;
}

.reportStatusPanel{
  margin-top:14px;
  border-radius:12px;
  padding:13px 15px;
  border:1px solid #d9e3ed;
  background:#f8fafc;
}

.reportStatusPanel.hasFailures{
  border-left:5px solid #f28c28;
  background:linear-gradient(135deg,#fffdf8,#fff8ec);
}

.reportStatusPanel.allPassed{
  border-left:5px solid #229653;
  background:linear-gradient(135deg,#fbfffc,#edf9f2);
}

.reportStatusKicker{
  color:#6a7888;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.6px;
}

.reportStatusTitle{
  margin-top:4px;
  color:#0c3155;
  font-size:.98rem;
  line-height:1.25;
  font-weight:900;
}

.reportStatusText{
  margin-top:5px;
  color:#425367;
  font-size:.78rem;
  line-height:1.45;
}

.reportCoverFooter{
  margin-top:14px;
  min-height:48px;
  padding:10px 14px;
  background:#082846;
  color:#fff;
  border-top:3px solid #f28c28;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}

.reportCoverFooter>div:first-child{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.reportCoverFooter b{
  font-size:.76rem;
}

.reportCoverFooter span{
  color:#d7e3ee;
  font-size:.68rem;
  overflow-wrap:anywhere;
}

.reportCoverFooterTag{
  flex:0 0 auto;
  color:#d7e3ee;
  font-size:.67rem;
  font-weight:900;
  letter-spacing:.7px;
}

@media print{
  .reportPageCover .reportCoverInner{
    padding:7mm 7mm 5mm !important;
  }
  .reportPageCover .reportHeaderBar{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
  .reportPageCover .reportNextCard,
  .reportPageCover .reportSummaryCard,
  .reportPageCover .reportStat,
  .reportDetailHeader,
  .reportStatusPanel,
  .reportCoverFooter,
  .reportHeaderAccent{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}



/* ===== Premium page 1 visual refinement v2 ===== */
.reportPageCover{
  position:relative;
  overflow:hidden;
  background:#fff;
}

.reportPageCover .reportHeaderBar{
  min-height:72px;
  padding:0 22px;
  background:linear-gradient(100deg,#062442 0%,#082f55 62%,#0a3b67 100%);
  align-items:center;
}

.reportPageCover .reportHeaderLeft{
  flex:0 0 32%;
  padding-right:18px;
  border-right:1px solid rgba(255,255,255,.25);
}

.reportHeaderCompany{
  display:block;
  color:#fff;
  font-size:.88rem;
  line-height:1.25;
  font-weight:900;
}

.reportPageCover .reportHeaderRight{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  padding-left:22px;
  text-align:left;
  line-height:1.05;
}

.reportPageCover .reportHeaderRight span{
  color:#fff;
  font-size:1.18rem;
  font-weight:900;
  letter-spacing:.35px;
}

.reportPageCover .reportHeaderRight strong{
  margin-top:5px;
  color:#f28c28;
  font-size:1.18rem;
  font-weight:900;
  letter-spacing:.35px;
}

.reportHeaderAccent{height:3px;background:#f28c28}

.reportPageCover .reportCoverInner{
  min-height:calc(267mm - 75px);
  display:flex;
  flex-direction:column;
  padding:7mm 7mm 0;
}

.reportPageCover .reportHero{
  padding:3mm 2mm 5mm;
  gap:22px;
}

.reportPageCover .reportBrandIconWrap{
  width:106px;
  min-width:106px;
  height:106px;
  border-radius:18px;
  border:1px solid #dbe5ee;
  box-shadow:0 8px 20px rgba(8,40,70,.06);
}

.reportPageCover .reportBrandIconWrap img{
  max-width:88px !important;
  max-height:88px !important;
}

.reportPageCover .reportCompanyName{
  font-size:1.94rem;
  line-height:1.04;
  letter-spacing:-.45px;
}

.reportPageCover .reportServiceLine{
  margin-top:6px;
  font-size:1.05rem;
}

.reportPageCover .reportCompanyMeta{
  margin-top:13px;
  font-size:.93rem;
  line-height:1.6;
}

.reportPageCover .reportHeroRight{flex:0 0 188px}

.reportPageCover .reportNextCard{
  padding:15px 17px;
  min-height:78px;
  border-radius:13px;
  background:linear-gradient(135deg,#0868a9,#1da1e8);
  box-shadow:0 8px 18px rgba(10,111,174,.16);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.reportPageCover .reportNextLabel{
  font-size:.76rem;
  letter-spacing:.7px;
}

.reportPageCover .reportNextDate{
  margin-top:6px;
  font-size:1.42rem;
}

.reportMetaBarCover{
  margin:16px 0 0;
  grid-template-columns:1fr 1fr;
  border:none;
  border-radius:0;
  background:transparent;
  overflow:visible;
  gap:16px;
}

.reportMetaBarCover>.reportMetaItem{
  position:relative;
  min-height:72px;
  padding:12px 16px 12px 66px;
  border:1px solid #dbe5ee !important;
  border-radius:14px;
  background:#fff;
  box-shadow:0 7px 16px rgba(8,40,70,.04);
}

.reportMetaBarCover>.reportMetaItem::before{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  width:36px;
  height:36px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eef4f9;
  color:#0d4e81;
  font-weight:900;
  font-size:.9rem;
}
.reportMetaBarCover>.reportMetaReport::before{content:'№'}
.reportMetaBarCover>.reportMetaDate::before{content:'D'}

.reportMetaLabel{
  margin-bottom:6px;
  color:#526479;
  font-size:.72rem;
  letter-spacing:.7px;
}
.reportMetaValue{font-size:1.08rem}

.reportPageCover .reportSummaryCard.reportSummaryCover{
  margin-top:17px;
  border-radius:16px;
  border:1px solid #cfddea;
  box-shadow:0 8px 20px rgba(8,40,70,.045);
}

.reportSummaryHeading{
  position:relative;
  padding:12px 16px 12px 68px;
  min-height:50px;
  display:flex;
  align-items:center;
  background:#fff;
  color:#092f52;
  font-size:.9rem;
  border-bottom:1px solid #dbe5ee;
}

.reportSummaryHeading::before{
  content:'✓';
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#082846;
  color:#fff;
  font-size:1.2rem;
}

.reportPageCover .reportStatGrid{
  gap:14px;
  padding:16px;
}

.reportPageCover .reportStat{
  position:relative;
  min-height:104px;
  padding:18px 16px 18px 86px;
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:auto auto;
  align-content:center;
  border-radius:14px;
  border-left-width:1px;
}

.reportPageCover .reportStat::before{
  position:absolute;
  left:18px;
  top:50%;
  transform:translateY(-50%);
  width:50px;
  height:50px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.45rem;
  font-weight:900;
  color:#fff;
}

.reportPageCover .reportStat.total{border-color:#c9d9e6;background:#fff}
.reportPageCover .reportStat.pass{border-color:#b9dfc6;background:#fff}
.reportPageCover .reportStat.fail{border-color:#efc3c3;background:#fff}
.reportPageCover .reportStat.total::before{content:'≡';background:#0d4f83}
.reportPageCover .reportStat.pass::before{content:'✓';background:#2da455}
.reportPageCover .reportStat.fail::before{content:'×';background:#df332f}

.reportPageCover .reportStat .num{
  font-size:2.2rem;
  line-height:.95;
}
.reportPageCover .reportStat .lbl{
  margin-top:9px;
  font-size:.82rem;
  color:#111;
}

.reportDetailGrid{
  margin-top:18px !important;
  gap:16px !important;
}

.reportPageCover .reportDetailCard{
  border-radius:15px;
  box-shadow:0 8px 20px rgba(8,40,70,.04);
}

.reportDetailHeader{
  position:relative;
  min-height:48px;
  display:flex;
  align-items:center;
  padding:10px 15px 10px 50px;
  font-size:.96rem;
  letter-spacing:.2px;
}

.reportDetailHeader::before{
  content:'•';
  position:absolute;
  left:14px;
  width:25px;
  height:25px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#0c5a92;
  color:#fff;
  font-size:1rem;
}

.reportDetailBody{padding:7px 15px 10px}
.reportDetailRow{
  grid-template-columns:118px 1fr;
  padding:8px 0;
  font-size:.86rem;
}
.reportDetailRow span{font-size:.76rem}

.reportAssurancePanel{
  margin-top:18px;
  display:grid;
  grid-template-columns:86px 1fr auto;
  gap:16px;
  align-items:center;
  min-height:112px;
  padding:14px 16px;
  border:1px solid #d5e0e9;
  border-radius:15px;
  background:linear-gradient(135deg,#fbfdff,#f5f9fc);
  box-shadow:0 8px 20px rgba(8,40,70,.04);
}

.reportAssurancePanel.hasFailures{border-left:5px solid #f28c28}
.reportAssurancePanel.allPassed{border-left:5px solid #2da455}

.reportAssuranceIcon{
  width:64px;
  height:64px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#0b3a63;
  color:#fff;
  font-size:2rem;
  font-weight:900;
  box-shadow:inset 0 -6px 0 rgba(242,140,40,.18);
}

.reportAssuranceKicker{
  color:#0a3155;
  font-size:.92rem;
  font-weight:900;
  letter-spacing:.2px;
}

.reportAssuranceText{
  margin-top:7px;
  color:#3e5268;
  font-size:.79rem;
  line-height:1.5;
}

.reportAssuranceBadge{
  min-width:86px;
  padding:8px 10px;
  border-radius:999px;
  text-align:center;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.45px;
  background:#fff4e7;
  color:#b85d00;
  border:1px solid #f6c98f;
}
.reportAssurancePanel.allPassed .reportAssuranceBadge{
  background:#ecf8f0;
  color:#247a45;
  border-color:#bfe2ca;
}

.reportCoverFooter{
  margin-top:auto;
  margin-left:-7mm;
  margin-right:-7mm;
  margin-bottom:0;
  min-height:76px;
  padding:15px 22px;
  border-top:3px solid #f28c28;
  background:linear-gradient(100deg,#062442,#082f55 70%,#093a65);
  align-items:center;
}

.reportCoverFooterMain{
  display:flex;
  flex-direction:column;
  gap:5px;
  max-width:66%;
}
.reportCoverFooterMain b{font-size:.8rem;color:#fff}
.reportCoverFooterMain span{font-size:.7rem;line-height:1.4;color:#dbe7f1}

.reportCoverFooterContact{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
  min-width:0;
}
.reportCoverFooterContact b{font-size:.76rem;color:#fff}
.reportCoverFooterContact span{font-size:.68rem;color:#dbe7f1;overflow-wrap:anywhere;text-align:right}

@media print{
  .reportPageCover .reportCoverInner{
    min-height:calc(267mm - 75px) !important;
    padding:6mm 7mm 0 !important;
  }
  .reportPageCover .reportHeaderBar,
  .reportPageCover .reportNextCard,
  .reportSummaryHeading::before,
  .reportDetailHeader,
  .reportAssuranceIcon,
  .reportCoverFooter{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}

/* ===== MHK report layout v2: reference-style cover + ordered pagination ===== */
.reportPage{height:267mm;min-height:267mm;max-height:267mm;overflow:hidden}
.reportPageInner{height:100%;min-height:0}
.reportPageCover .reportHeaderBar{height:56px;min-height:56px;padding:0 16px;display:grid;grid-template-columns:1.05fr 1.35fr .8fr;gap:14px;background:#062747}
.reportPageCover .reportHeaderLeft{display:flex;align-items:center;gap:9px;min-width:0}
.reportHeaderLogo{width:42px;height:42px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 42px}
.reportHeaderLogo img{max-width:100%;max-height:100%;object-fit:contain}.reportHeaderLogo .reportBrandBolt{font-size:1.45rem}
.reportPageCover .reportHeaderLeft b{display:block;font-size:.95rem;line-height:1.05}.reportPageCover .reportHeaderLeft span{display:block;font-size:.48rem;letter-spacing:.7px;margin-top:2px;opacity:.88}
.reportPageCover .reportHeaderRight{border-left:1px solid rgba(255,255,255,.25);padding-left:14px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;text-transform:uppercase}
.reportPageCover .reportHeaderRight span{font-size:.84rem;font-weight:800}.reportPageCover .reportHeaderRight strong{font-size:1rem;color:#f28c28;margin-top:2px}
.reportHeaderDue{justify-self:end;align-self:center;background:linear-gradient(135deg,#0869aa,#159fe6);border-radius:9px;padding:7px 10px;min-width:126px;text-align:center;color:#fff}
.reportHeaderDue span{display:block;font-size:.55rem;font-weight:900;letter-spacing:.45px}.reportHeaderDue b{display:block;font-size:.95rem;margin-top:2px}
.reportPageCover .reportCoverInner{padding:6mm 7mm 0!important}
.reportPageCover .reportHero{display:grid;grid-template-columns:82px 1fr;gap:15px;padding:3mm 1mm 4mm;border-bottom:1px solid #d9e3ed}
.reportPageCover .reportBrandIconWrap{width:82px;min-width:82px;height:82px}.reportPageCover .reportBrandIconWrap img{max-width:100%;max-height:100%;object-fit:contain}
.reportPageCover .reportCompanyName{font-size:1.55rem}.reportPageCover .reportCompanyMeta{font-size:.78rem;line-height:1.55;margin-top:7px}
.reportMetaBarCover{margin-top:10px;gap:10px}.reportMetaBarCover>.reportMetaItem{min-height:54px;padding:8px 12px 8px 52px;border-radius:10px}.reportMetaBarCover>.reportMetaItem::before{left:11px;width:30px;height:30px}.reportMetaLabel{font-size:.61rem;margin-bottom:4px}.reportMetaValue{font-size:.88rem}
.reportPageCover .reportSummaryCard.reportSummaryCover{margin-top:10px;border-radius:10px}.reportSummaryHeading{min-height:38px;padding:8px 12px 8px 52px;font-size:.72rem}.reportSummaryHeading::before{width:38px}.reportPageCover .reportStatGrid{gap:9px;padding:10px}.reportPageCover .reportStat{min-height:70px;padding:10px 8px 10px 62px;border-radius:9px}.reportPageCover .reportStat::before{left:11px;width:40px;height:40px;font-size:1.15rem}.reportPageCover .reportStat .num{font-size:1.65rem}.reportPageCover .reportStat .lbl{font-size:.65rem;margin-top:5px}
.reportDetailGrid{margin-top:10px!important;gap:10px!important}.reportPageCover .reportDetailCard{border-radius:9px}.reportDetailHeader{min-height:35px;padding:7px 10px 7px 40px;font-size:.72rem}.reportDetailHeader::before{left:10px;width:21px;height:21px}.reportDetailBody{padding:3px 10px 5px}.reportDetailRow{grid-template-columns:86px 1fr;padding:5px 0;font-size:.72rem}.reportDetailRow span{font-size:.65rem}
.reportAssurancePanel{margin-top:10px;grid-template-columns:58px 1fr 150px;gap:10px;min-height:76px;padding:9px 11px;border-radius:9px}.reportAssuranceIcon{width:46px;height:46px;border-radius:12px;font-size:1.45rem}.reportAssuranceKicker{font-size:.7rem}.reportAssuranceText{font-size:.61rem;line-height:1.4;margin-top:4px}.reportCoverSignature{border-left:1px solid #d8e1ea;padding-left:10px;display:flex;flex-direction:column;gap:3px;font-size:.58rem;color:#20364d}.reportCoverSignature>b{font-size:.62rem}.reportCoverSignature img{max-height:26px!important;max-width:120px!important}.reportCoverSignature span{font-size:.55rem}
.reportCoverFooter{min-height:54px;margin-top:auto;padding:9px 18px}.reportCoverFooterMain b{font-size:.66rem}.reportCoverFooterMain span{font-size:.55rem}.reportPlugMark{font-size:2rem;opacity:.25}

.continuationPage{padding:7mm!important}.reportContinuationHead{height:58px;flex:0 0 58px;background:#082846;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:8px 14px;border-bottom:3px solid #1684c5}.reportContinuationHead.green{border-bottom-color:#2da455}.reportContinuationHead.red{border-bottom-color:#df332f}.reportContinuationHead.orange{border-bottom-color:#f28c28}.reportContinuationBrand{display:flex;align-items:center;gap:9px}.reportContinuationBrand>img,.reportContinuationBrand>.reportBrandBolt{width:38px;height:38px;object-fit:contain}.reportContinuationBrand .reportBrandBolt{font-size:1.2rem}.reportContinuationBrand b{display:block;font-size:.82rem}.reportContinuationBrand span{display:block;font-size:.6rem;opacity:.8;margin-top:2px}.reportContinuationTitle{font-size:1rem;font-weight:900;letter-spacing:.5px}
.continuationBox{margin-top:10px!important;padding:10px!important;overflow:hidden}.reportTable.premium{font-size:.69rem;table-layout:fixed}.reportTable.premium th,.reportTable.premium td{padding:5px 4px;overflow-wrap:anywhere}.reportTable.premium th{font-size:.63rem}.failTable{font-size:.63rem!important}.failTable th,.failTable td{padding:4px 3px!important}.reportTableTitle{margin:-10px -10px 8px;border-radius:0;padding:8px 10px;font-size:.82rem}
.reportSimpleFooter{margin-top:auto;padding-top:7px;border-top:1px solid #d8e1ea;display:flex;justify-content:space-between;color:#6a7888;font-size:.6rem}.safetyInfoBox{margin-top:10px!important}.reportSafetyText{color:#24384d;font-size:.8rem;line-height:1.55}.reportPhotoGrid.premium{grid-template-columns:1fr 1fr;gap:9px}.reportPhotoCard.premium{padding:8px}.reportPhotoCard.premium img{height:175px;max-height:175px;object-fit:contain;margin-top:7px}.reportPhotoAsset{font-size:.78rem}.reportPhotoReason{font-size:.66rem;color:#4b5d70;margin-top:3px}.reportFinalSignature{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:center}.reportFinalSignature>div:last-child{display:flex;flex-direction:column;gap:5px;color:#24384d;font-size:.8rem}
.reportLastPage{page-break-before:auto!important}
@media print{.reportPage{height:267mm!important;min-height:267mm!important;max-height:267mm!important;margin:0!important;page-break-after:always!important;break-after:page!important}.reportPage:last-child{page-break-after:auto!important;break-after:auto!important}.reportPageCover .reportCoverInner{height:calc(267mm - 56px)!important;min-height:0!important}.continuationPage{height:267mm!important}.reportContinuationHead,.reportHeaderDue,.reportPageCover .reportHeaderBar,.reportCoverFooter{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}}


/* ===== AUTHORITATIVE PRINT LAYOUT — FINAL ===== */
.reportPageCover{
  position:relative;
  overflow:hidden;
}

.reportPageCover .reportCoverInner{
  padding-bottom:66px !important;
}

.reportCoverFooter{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  height:58px !important;
  min-height:58px !important;
  margin:0 !important;
  padding:9px 18px !important;
  display:grid !important;
  grid-template-columns:1.45fr .8fr 42px !important;
  gap:12px !important;
  align-items:center !important;
  background:#062747 !important;
  border-top:3px solid #f28c28 !important;
  color:#fff !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
  z-index:3;
}
.reportCoverFooterMain b,.reportCoverFooterMain span,
.reportCoverFooterContact b,.reportCoverFooterContact span,
.reportCoverFooterContact small{display:block}
.reportCoverFooterMain b{font-size:.68rem}
.reportCoverFooterMain span{font-size:.54rem;line-height:1.3;margin-top:2px;opacity:.92}
.reportCoverFooterContact{text-align:right;min-width:0}
.reportCoverFooterContact b{font-size:.66rem}
.reportCoverFooterContact span{font-size:.52rem;overflow-wrap:anywhere;margin-top:2px;opacity:.9}
.reportCoverFooterContact small{font-size:.48rem;margin-top:2px;opacity:.7}
.reportPlugMark{font-size:1.8rem;line-height:1;color:#1b79b5;text-align:center}

.reportSimpleFooter{
  margin-top:auto;
  display:grid !important;
  grid-template-columns:1fr 1fr 1fr;
  align-items:center;
  gap:8px;
  border-top:1px solid #d9e3ed;
  padding-top:7px;
  font-size:.62rem;
  color:#6a7888;
}
.reportSimpleFooter span:nth-child(2){text-align:center}
.reportSimpleFooter span:last-child{text-align:right}

@media print{
  @page{size:A4;margin:10mm}

  html,body{margin:0!important;padding:0!important}

  .reportPage{
    width:190mm !important;
    height:267mm !important;
    min-height:267mm !important;
    max-height:267mm !important;
    margin:0 !important;
    padding:0 !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    break-inside:avoid !important;
    page-break-inside:avoid !important;
    break-after:page !important;
    page-break-after:always !important;
  }
  .reportPage:last-child{
    break-after:auto !important;
    page-break-after:auto !important;
  }

  .reportPageInner{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    box-sizing:border-box !important;
  }

  .reportPageCover{
    position:relative !important;
    display:block !important;
  }

  .reportPageCover .reportHeaderBar{
    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;
  }

  .reportPageCover .reportCoverInner{
    height:calc(267mm - 56px) !important;
    min-height:0 !important;
    max-height:calc(267mm - 56px) !important;
    padding:6mm 7mm 66px !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  .reportCoverFooter{
    position:absolute !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    break-inside:avoid !important;
    page-break-inside:avoid !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .continuationPage{
    height:267mm !important;
    min-height:267mm !important;
    max-height:267mm !important;
    padding:7mm !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  .reportContinuationHead,.reportHeaderDue,.reportPageCover .reportHeaderBar,
  .reportCoverFooter,.reportFailureAlert,.reportSimpleFooter{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}


/* ===== PAGE 1 FINAL VISUAL POLISH — pagination-safe ===== */

/* Keep the successful 5-page print geometry untouched.
   These rules only refine content inside the existing cover bounds. */
.reportPageCover .reportCoverInner{
  display:flex !important;
  flex-direction:column !important;
}

/* Give the identity area a little more of the premium reference's breathing room. */
.reportPageCover .reportHero{
  padding-top:4mm !important;
  padding-bottom:5mm !important;
}

.reportPageCover .reportCompanyName{
  font-size:1.68rem !important;
  line-height:1.08 !important;
  letter-spacing:-.2px !important;
}

.reportPageCover .reportServiceLine{
  margin-top:3px !important;
  font-size:.86rem !important;
}

.reportPageCover .reportCompanyMeta{
  margin-top:8px !important;
  font-size:.76rem !important;
  line-height:1.5 !important;
}

/* Slightly richer cards, still compact enough to stay safely inside page 1. */
.reportMetaBarCover{
  margin-top:11px !important;
}

.reportPageCover .reportSummaryCard.reportSummaryCover{
  margin-top:11px !important;
}

.reportDetailGrid{
  margin-top:11px !important;
}

.reportAssurancePanel{
  margin-top:11px !important;
  min-height:82px !important;
  background:linear-gradient(135deg,#f9fbfd,#eef5fa) !important;
  border:1px solid #d7e2eb !important;
}

/* Proper failed-items warning strip. The HTML was already correct; this
   prevents the icon, heading and message from running into one another. */
.reportFailureAlert{
  margin-top:auto !important;
  margin-bottom:9px !important;
  min-height:48px !important;
  display:grid !important;
  grid-template-columns:34px 78px minmax(0,1fr) !important;
  gap:9px !important;
  align-items:center !important;
  padding:8px 12px !important;
  border:1px solid #f0c58f !important;
  border-left:4px solid #f28c28 !important;
  border-radius:9px !important;
  background:linear-gradient(135deg,#fffaf2,#fff4e5) !important;
  color:#24384d !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
  break-inside:avoid !important;
  page-break-inside:avoid !important;
}

.reportFailureIcon{
  width:28px !important;
  height:28px !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#f28c28 !important;
  color:#fff !important;
  font-size:1rem !important;
  line-height:1 !important;
  font-weight:900 !important;
}

.reportFailureAlert>b{
  display:block !important;
  color:#172f49 !important;
  font-size:.76rem !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
}

.reportFailureAlert>span:last-child{
  display:block !important;
  min-width:0 !important;
  color:#42566c !important;
  font-size:.62rem !important;
  line-height:1.35 !important;
}

.reportFailureAlert.reportAllPassedAlert{
  border-color:#b9dfc6 !important;
  border-left-color:#2da455 !important;
  background:linear-gradient(135deg,#f9fff9,#edf9f1) !important;
}
.reportFailureAlert.reportAllPassedAlert .reportFailureIcon{
  background:#2da455 !important;
}

/* Make the bottom band read more like the approved reference without
   altering its proven pagination geometry. */
.reportCoverFooter{
  background:linear-gradient(90deg,#062747,#07365d) !important;
  border-top:3px solid #f28c28 !important;
}
.reportCoverFooterMain b{
  font-size:.7rem !important;
  letter-spacing:.05px !important;
}
.reportCoverFooterMain span{
  font-size:.55rem !important;
  line-height:1.35 !important;
}
.reportCoverFooterContact b{
  font-size:.7rem !important;
}
.reportCoverFooterContact span{
  font-size:.54rem !important;
}
.reportPlugMark{
  font-size:2rem !important;
  opacity:.42 !important;
}

/* Print keeps the already-successful dimensions and page boundaries. */
@media print{
  .reportFailureAlert{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}


/* ===== FINAL COVER TIDY — user-approved finishing changes ===== */

/* 1) Report Number + Test Date: remove the decorative № / D circles. */
.reportMetaBarCover>.reportMetaItem{
  padding-left:14px !important;
}
.reportMetaBarCover>.reportMetaItem::before{
  display:none !important;
  content:none !important;
}

/* 2) Client Details + Test Details: remove decorative blue dot circles. */
.reportDetailHeader{
  padding-left:13px !important;
}
.reportDetailHeader::before{
  display:none !important;
  content:none !important;
}

/* 3) Footer: allow every line to be fully readable while keeping it
      anchored safely inside page 1. */
.reportPageCover .reportCoverInner{
  padding-bottom:82px !important;
}

.reportCoverFooter{
  height:72px !important;
  min-height:72px !important;
  max-height:72px !important;
  padding:9px 18px !important;
  grid-template-columns:1.35fr .9fr 36px !important;
  gap:10px !important;
  overflow:hidden !important;
}

.reportCoverFooterMain{
  max-width:none !important;
  min-width:0 !important;
  gap:2px !important;
}

.reportCoverFooterMain b{
  font-size:.66rem !important;
  line-height:1.2 !important;
}

.reportCoverFooterMain span{
  font-size:.52rem !important;
  line-height:1.28 !important;
  margin-top:2px !important;
  white-space:normal !important;
  overflow:visible !important;
}

.reportCoverFooterContact{
  min-width:0 !important;
  gap:2px !important;
}

.reportCoverFooterContact b{
  font-size:.64rem !important;
  line-height:1.15 !important;
}

.reportCoverFooterContact span{
  font-size:.50rem !important;
  line-height:1.2 !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}

.reportCoverFooterContact small{
  font-size:.46rem !important;
  line-height:1.1 !important;
}

.reportPlugMark{
  font-size:1.7rem !important;
}

/* Preserve the successful five-page print geometry. */
@media print{
  .reportPageCover .reportCoverInner{
    padding-bottom:82px !important;
  }
  .reportCoverFooter{
    height:72px !important;
    min-height:72px !important;
    max-height:72px !important;
  }
}

/* ===== A4 PRINT OPTIMISATION — SAFE VISUAL-ONLY REV1 =====
   Purpose: use more of the physical A4 sheet without changing report
   structure, page allocation, report data, or label printing.
   The existing 190mm x 267mm report geometry remains the layout basis;
   it is enlarged uniformly at print time into a 5mm A4 safe margin. */
@media print{
  @page{
    size:A4 portrait;
    margin:5mm !important;
  }

  /* Keep the proven report layout dimensions and page breaks, but enlarge
     the finished page uniformly by 200/190 = 1.05263 (about 5.3%). */
  .reportPage{
    width:190mm !important;
    height:267mm !important;
    min-height:267mm !important;
    max-height:267mm !important;
    margin:0 !important;
    transform:scale(1.052631579);
    transform-origin:top left;
  }
}

/* ===== COMMERCIAL V1 AUTH GATE ===== */
.authLocked{display:none!important}
.authGate{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:22px;background:linear-gradient(160deg,#0d2940,#133553 58%,#1d4d70);font-family:Arial,sans-serif}
.authGate.hidden{display:none!important}
.authCard{width:min(100%,430px);background:#fff;border-radius:22px;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.28)}
.authBrand{display:flex;align-items:center;gap:14px;margin-bottom:22px}.authBrand img{width:62px;height:62px;border-radius:14px;object-fit:contain}.authBrand h1{margin:0;color:#133553;font-size:1.75rem}.authSub{margin-top:3px;color:#667;font-weight:700}
.authLoading{text-align:center;padding:26px 8px;color:#445;font-weight:700}.authForm{display:grid;gap:10px}.authForm h2{margin:0;color:#133553}.authForm p{margin:0 0 8px;color:#566}.authForm label{font-weight:800;color:#263746}.authForm input{box-sizing:border-box;width:100%;padding:13px 12px;border:1px solid #b9c4ce;border-radius:10px;font-size:16px;background:#fff;color:#111}.authForm button{width:100%;margin-top:5px;padding:13px;border:0;border-radius:10px;background:#133553;color:#fff;font-size:16px;font-weight:800}.authForm .authLinkBtn{margin-top:0;background:transparent;color:#145b8c;padding:8px}.authMessage{padding:10px 12px;border-radius:9px;background:#fff0f0;color:#a51d1d;font-weight:700;font-size:.92rem}.authMessage.ok{background:#ecf8f0;color:#176b3a}
.accountStrip{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 14px;margin:0 0 12px;border:1px solid #2d5878;border-radius:10px;background:#133553;color:#fff}.accountStripEmail{font-size:.92rem;line-height:1.45;overflow-wrap:anywhere;color:#fff}.accountStripEmail strong{color:#fff}.accountSignOut{width:auto!important;padding:8px 12px!important;margin:0!important;background:#fff!important;color:#133553!important;border:1px solid #fff!important}.accountSignOut:hover{background:#eef4f8!important}


/* ===== Pre-launch mobile report preview fit (screen only) ===== */
@media screen {
  #reportArea{width:100%;max-width:100%;overflow:hidden;}
  #reportBox{transform-origin:top left;}
}
.settingsGuide{grid-column:1/-1;background:linear-gradient(135deg,rgba(31,107,171,.34),rgba(31,107,171,.18));border:1px solid #2f79b5;border-radius:16px;padding:16px 18px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)}
.settingsGuideTitle{font-size:1.25rem;font-weight:800;color:#fff;margin-bottom:4px}
.settingsGuideIntro{color:#d6e8f8;line-height:1.4;margin-bottom:14px}
.settingsGuideSteps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.settingsGuideStep{display:flex;align-items:center;gap:10px;min-width:0}
.settingsGuideNum{flex:0 0 34px;width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#2c86d1;color:#fff;font-size:1.05rem;font-weight:800}
.settingsGuideStep strong{display:block;color:#fff;line-height:1.25}
.settingsGuideStep small{display:block;color:#c7d9e8;line-height:1.3;margin-top:2px}
@media(max-width:700px){.settingsGuideSteps{grid-template-columns:1fr}.settingsGuide{padding:14px}.settingsGuideTitle{font-size:1.15rem}}
@media print{#reportBox{zoom:1!important;}}


/* ===== Privacy & account controls ===== */
.accountPrivacyCard{grid-column:1/-1;margin-top:4px;padding:16px 18px;border:1px solid #445868;border-radius:14px;background:rgba(255,255,255,.04)}
.accountPrivacyCard>div:first-child{display:grid;gap:4px;margin-bottom:12px}.accountPrivacyCard strong{font-size:1.05rem;color:#fff}.accountPrivacyCard span{color:#c7d5df;line-height:1.4}
.accountPrivacyActions{align-items:center}.privacyLinkBtn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;padding:10px 14px;border-radius:9px;background:#1f6bab;color:#fff;font-weight:800}.privacyLinkBtn:hover{filter:brightness(1.08)}.secondaryLinkBtn{background:#445868}
#deleteAccountStatus{margin-top:10px;padding:10px 12px;border-radius:9px;background:rgba(255,255,255,.06);color:#d9e6ef}
@media(max-width:700px){.accountPrivacyActions{display:grid!important;grid-template-columns:1fr}.accountPrivacyActions>*{width:100%!important;box-sizing:border-box}}


/* Support & diagnostics - local-only troubleshooting */
.supportDiagnosticsCard{grid-column:1/-1;margin-top:4px;padding:16px 18px;border:1px solid #356b8f;border-radius:14px;background:rgba(31,107,171,.12)}
.supportDiagnosticsCard>div:first-child{display:grid;gap:4px;margin-bottom:12px}
.supportDiagnosticsCard strong{font-size:1.05rem;color:#fff}
.supportDiagnosticsCard span{color:#c7d5df;line-height:1.4}
.supportDiagnosticsActions{margin-bottom:10px}
.diagnosticsOutput{margin:10px 0 0;max-height:300px;overflow:auto;white-space:pre-wrap;word-break:break-word;background:#091a27;color:#d9e8f2;border:1px solid #36546a;border-radius:10px;padding:12px;font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace}

/* ===== HELP & SUPPORT CENTRE — V5 ===== */
.supportCentreCard{background:linear-gradient(135deg,rgba(31,107,171,.16),rgba(255,255,255,.035));border-color:#3978a5;padding:18px}
.supportCentreHead{display:flex!important;align-items:flex-start;gap:12px;margin-bottom:16px!important}
.supportCentreIcon{flex:0 0 38px;width:38px;height:38px;border-radius:11px;display:flex!important;align-items:center;justify-content:center;background:#2c86d1;color:#fff;font-size:1.25rem;font-weight:900;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.supportCentreHead>div:last-child{display:grid;gap:4px;min-width:0}.supportCentreHead strong{font-size:1.12rem}.supportCentreHead span{color:#d3e1eb}
.supportFormGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.supportFormGrid>div,.supportDetailsWrap{display:grid;gap:6px}.supportCentreCard label{font-weight:800;color:#edf6fb}.supportCentreCard select,.supportCentreCard input,.supportCentreCard textarea{width:100%;box-sizing:border-box;border:1px solid #58768b;border-radius:10px;background:#fff;color:#18232b;padding:11px 12px;font:inherit}.supportCentreCard textarea{resize:vertical;min-height:104px}.supportDetailsWrap{margin-bottom:12px}
.supportConsentRow{display:flex!important;align-items:flex-start;gap:10px;padding:12px 13px;margin:0 0 14px;border:1px solid #45667d;border-radius:11px;background:rgba(0,0,0,.12);cursor:pointer}.supportConsentRow input{width:18px!important;height:18px;margin:2px 0 0;flex:0 0 18px;accent-color:#2c86d1}.supportConsentRow span{display:grid!important;gap:3px;color:#dce8f0!important}.supportConsentRow strong{font-size:.96rem!important}.supportConsentRow small{font-size:.84rem;line-height:1.38;color:#bcd0dd}
.supportPrimaryActions{align-items:center;margin-bottom:8px}.supportPrimaryActions #sendSupportRequestBtn{background:#1f7a4f}.supportRequestStatus{padding:10px 12px;border-radius:9px;background:rgba(255,255,255,.055);color:#d9e7ef}
.supportAdvanced{margin-top:14px;border-top:1px solid #3d5c71;padding-top:12px}.supportAdvanced summary{cursor:pointer;color:#b9d9ef;font-weight:800;user-select:none}.supportAdvancedBody{padding-top:10px}.supportAdvancedBody p{margin:0 0 10px;color:#c3d3de;line-height:1.42}.supportAdvanced .supportDiagnosticsActions{margin-bottom:8px}
@media(max-width:700px){.supportFormGrid{grid-template-columns:1fr}.supportPrimaryActions{display:grid!important;grid-template-columns:1fr}.supportPrimaryActions>*{width:100%!important;box-sizing:border-box}.supportCentreCard{padding:14px}.supportCentreHead{gap:10px}.supportCentreIcon{flex-basis:34px;width:34px;height:34px}}
