/* v2.0.9.21: isolate integrity report from app theme colors to guarantee readable contrast. */
html[data-ui-theme] #integrityReportDialog,
#integrityReportDialog {
  --report-bg:#f5f8fc;--report-panel:#fff;--report-ink:#193650;--report-muted:#435d75;
  --report-border:#c8d8e7;--report-soft:#eaf2fa;
  color-scheme:light!important;
  box-sizing:border-box!important;
  width:min(740px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  max-height:min(85dvh,850px)!important;
  padding:0!important;
  overflow:hidden!important;
  background:var(--report-bg)!important;
  color:var(--report-ink)!important;
  border:1px solid var(--report-border)!important;
  border-radius:17px!important;
  box-shadow:0 22px 70px rgba(0,10,25,.38)!important;
  font-family:Sarabun,Inter,'Noto Sans Thai',sans-serif!important;
}
#integrityReportDialog::backdrop{background:rgba(3,11,25,.74)!important}
#integrityReportDialog *:not(svg):not(path){box-sizing:border-box}
#integrityReportDialog :is(h2,p,strong,span,li,small){color:inherit!important}
#integrityReportDialog h2{font-size:clamp(19px,2.6vw,23px);font-weight:800;line-height:1.35;margin:0!important;padding:20px 22px 7px;background:var(--report-panel);color:#17344f!important}
#integrityReportDialog > p{margin:0!important;padding:0 22px 17px!important;background:var(--report-panel);border-bottom:1px solid var(--report-border);font-size:14px;line-height:1.55;color:var(--report-muted)!important}
#integrityReportBody{margin:0!important;padding:16px 20px!important;overflow-y:auto!important;overflow-x:hidden!important;max-height:calc(min(85dvh,850px) - 182px)!important;background:var(--report-bg)!important;color:var(--report-ink)!important;scrollbar-gutter:stable}
#integrityReportBody > .integrity-report-summary{margin:0 0 14px;padding:12px 14px;border:1px solid var(--report-border);background:var(--report-soft)!important;border-radius:11px;display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;color:var(--report-ink)!important;font-weight:700}
#integrityReportBody .integrity-report-item{padding:15px 16px!important;border:1px solid var(--report-border)!important;background:var(--report-panel)!important;color:var(--report-ink)!important;border-radius:11px!important;margin:0 0 11px!important;box-shadow:0 1px 3px rgba(20,48,74,.06)}
#integrityReportBody .integrity-report-item.is-ok{border-left:4px solid #18845a!important}
#integrityReportBody .integrity-report-item.is-error{border-left:4px solid #c14447!important;background:#fff9f9!important}
#integrityReportBody .integrity-report-item strong{display:block;color:#183b57!important;font-size:14px!important;line-height:1.55;font-weight:800!important;overflow-wrap:anywhere}
#integrityReportBody .integrity-report-item ul{margin:8px 0 0!important;padding:0 0 0 20px!important;color:#34536b!important}
#integrityReportBody .integrity-report-item li{color:#34536b!important;font-size:13px!important;line-height:1.6!important;overflow-wrap:anywhere}
#integrityReportBody .integrity-report-item.is-error li{color:#8d2834!important}
#integrityReportBody .integrity-report-status{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:12px;padding:3px 9px;border-radius:99px;margin-top:7px}
#integrityReportBody .is-ok .integrity-report-status{color:#0b6845!important;background:#dcf5e8!important}
#integrityReportBody .is-error .integrity-report-status{color:#992d3b!important;background:#ffe3e6!important}
#integrityReportDialog .integrity-report-actions{position:relative!important;display:flex!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;padding:14px 20px!important;margin:0!important;background:var(--report-panel)!important;border-top:1px solid var(--report-border)!important}
#integrityReportDialog .integrity-report-actions button{min-height:40px!important;padding:9px 17px!important;font-size:14px!important;font-weight:750!important;background:#eff5fc!important;color:#183c5a!important;border:1px solid #9ab5ce!important;border-radius:9px!important;opacity:1!important;cursor:pointer!important}
#integrityReportDialog #integrityReportDownload{background:#14699e!important;border-color:#14699e!important;color:#fff!important}
#integrityReportDialog .integrity-report-actions button:hover{filter:brightness(.94)}
#integrityReportDialog button:focus-visible{outline:3px solid #eea51f!important;outline-offset:3px!important}
@media(max-width:560px){#integrityReportDialog h2{padding:15px 15px 6px}#integrityReportDialog > p{padding:0 15px 14px!important}#integrityReportBody{padding:12px!important;max-height:calc(100dvh - 185px)!important}#integrityReportDialog .integrity-report-actions{padding:11px 13px!important}#integrityReportDialog .integrity-report-actions button{flex:1}}
