/* 2026-07-24b: hospital-document gate, DWG conversion state, marker menu */
.audit-identity-state{
  display:grid;
  gap:5px;
  margin-top:10px;
  border-left:4px solid #82908c;
  background:rgba(238,242,240,.82);
  padding:10px 12px;
  color:#52615d;
  font-size:12px;
  line-height:1.55;
}
.audit-identity-state b{color:#34443f;font-size:13px}
.audit-identity-state span{display:block}
.audit-identity-state ul{display:grid;gap:3px;margin:2px 0 0;padding-left:18px}
.audit-identity-state.checking{border-left-color:#2f7184;background:rgba(47,113,132,.08)}
.audit-identity-state.verified{border-left-color:#26754a;background:rgba(38,117,74,.08)}
.audit-identity-state.verified b{color:#1f6840}
.audit-identity-state.confirmed{border-left-color:#b65b22;background:rgba(182,91,34,.09)}
.audit-identity-state.confirmed b{color:#8a3d15}
.audit-identity-state.suspect{border-left-color:#b3342d;background:rgba(179,52,45,.08)}
.audit-identity-state.suspect b{color:#982c26}

.audit-identity-modal{
  position:fixed;
  inset:0;
  z-index:180;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(9,18,20,.58);
  backdrop-filter:blur(5px);
}
.audit-identity-modal[hidden]{display:none!important}
.audit-identity-dialog{
  width:min(620px,calc(100vw - 32px));
  max-height:min(760px,calc(100dvh - 32px));
  overflow:auto;
  border:1px solid rgba(179,52,45,.28);
  border-radius:8px;
  background:#fbfaf6;
  box-shadow:0 30px 90px rgba(7,18,19,.38);
  padding:18px;
}
.audit-identity-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.audit-identity-dialog-head>div{display:grid;gap:4px}
.audit-identity-dialog-head span{color:#b3342d;font-size:12px;font-weight:900}
.audit-identity-dialog-head b{color:#243531;font-size:21px;line-height:1.25}
.audit-identity-dialog-head>button{
  flex:0 0 auto;
  width:36px;
  height:36px;
  border:1px solid rgba(28,40,39,.16);
  border-radius:8px;
  background:#fff;
  color:#384642;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.audit-identity-dialog>p{margin:14px 0 8px;color:#52615d;line-height:1.65}
.audit-identity-dialog>ul{display:grid;gap:5px;margin:0;padding:11px 11px 11px 28px;background:rgba(179,52,45,.05);color:#5d4541;font-size:13px;line-height:1.55}
.audit-identity-warning{margin-top:12px;border-left:4px solid #b65b22;background:rgba(182,91,34,.08);padding:9px 11px;color:#6e3a1f;font-size:12px;line-height:1.6}
.audit-identity-check{display:flex;align-items:flex-start;gap:9px;margin-top:14px;color:#243531;font-size:13px;font-weight:800;line-height:1.55;cursor:pointer}
.audit-identity-check input{flex:0 0 auto;width:19px;height:19px;margin-top:1px;accent-color:#b65b22}
.audit-identity-dialog-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:16px}
.audit-identity-dialog-actions button:disabled{opacity:.42;cursor:not-allowed}

#drawingAuditApp[aria-busy="true"] .audit-actions .btn{cursor:progress}
#auditDownloadConverted[hidden]{display:none!important}

.audit-marker-popover{
  position:absolute;
  z-index:9;
  width:min(420px,calc(100% - 20px));
  max-height:calc(100% - 16px);
  overflow:auto;
  overscroll-behavior:contain;
  border-radius:8px;
  box-shadow:0 22px 54px rgba(8,22,24,.34);
  cursor:default;
  touch-action:pan-y;
}
.audit-marker-popover[hidden]{display:none!important}
.audit-marker-popover .audit-issue-detail{
  border-color:rgba(24,58,88,.24);
  background:rgba(255,255,255,.98);
}
.audit-marker-popover .detail-head{position:sticky;top:0;z-index:2;background:#f7f8f5}
.audit-marker-popover .detail-head b{min-width:0;line-height:1.4}
.audit-marker-popover [data-detail-close]{
  margin-left:auto;
  flex:0 0 auto;
  width:30px;
  height:30px;
  border:1px solid rgba(28,40,39,.16);
  border-radius:7px;
  background:#fff;
  color:#384642;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.audit-marker-popover .detail-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  padding:10px 12px;
  border-top:1px solid rgba(28,40,39,.08);
  background:#f7f8f5;
}
.audit-marker-popover .detail-actions button{
  min-height:34px;
  border:1px solid rgba(28,40,39,.15);
  border-radius:7px;
  background:#fff;
  color:#40504c;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.audit-marker-popover .detail-actions button.on{
  border-color:#183a58;
  background:#183a58;
  color:#fff;
}
.audit-marker-popover .detail-actions button[data-detail-decision="revise"].on{border-color:#b65b22;background:#b65b22}
.audit-marker-popover .detail-actions button[data-detail-decision="pass"].on{border-color:#26754a;background:#26754a}

@media(max-width:720px){
  .audit-identity-modal{padding:0}
  .audit-identity-dialog{
    width:100%;
    max-height:100dvh;
    min-height:100dvh;
    border:0;
    border-radius:0;
    padding:calc(16px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  }
  .audit-identity-dialog-actions{display:grid;grid-template-columns:1fr}
  .audit-identity-dialog-actions .btn{width:100%}
  html.is-mobile .audit-marker-popover{
    left:8px!important;
    right:8px;
    top:auto!important;
    bottom:8px;
    width:auto;
    max-height:min(74%,520px);
  }
  html.is-mobile .audit-marker-popover .audit-issue-detail .detail-row{grid-template-columns:1fr;gap:3px}
}
