.card:has(.bpms-compact-register){overflow-x:auto}
.bpms-compact-register{width:100%;table-layout:auto;font-size:13px}
.bpms-compact-register th,.bpms-compact-register td{padding:7px 8px;line-height:1.25}
.bpms-compact-register th:nth-child(1),.bpms-compact-register td:nth-child(1){min-width:108px;white-space:nowrap}
.bpms-compact-register th:nth-child(2),.bpms-compact-register td:nth-child(2){min-width:92px;white-space:nowrap}
.bpms-compact-register th:nth-child(3),.bpms-compact-register td:nth-child(3){min-width:78px;white-space:nowrap}
.bpms-compact-register th:nth-last-child(3),.bpms-compact-register td:nth-last-child(3),
.bpms-compact-register th:nth-last-child(2),.bpms-compact-register td:nth-last-child(2){text-align:center;white-space:nowrap}
.bpms-compact-register .bpms-action-cell{min-width:122px;width:132px;padding:5px 6px}
.bpms-action-buttons{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.bpms-action-buttons button,.bpms-action-buttons .button{font-size:12px;line-height:1;padding:7px 9px;margin:0;border-radius:4px;white-space:nowrap;min-height:28px}
.bpms-actions-select{width:100%;min-width:112px;margin:0;padding:7px 28px 7px 9px;border:1px solid #9fb0c7;border-radius:6px;background:#f8fafc;color:#173f91;font-size:12px;font-weight:800;cursor:pointer}
.bpms-status-override{width:104px;min-width:104px;height:30px;margin:0;padding:3px 22px 3px 7px;border:1px solid #9fb1ca;border-radius:4px;background:#fff;font-size:12px;font-weight:600;color:#1f2d45}
.bpms-purpose-cell{width:180px;max-width:180px}
.bpms-preview-link{display:inline-block;max-width:100%;margin:0;padding:2px 3px;border:0;border-bottom:1px dashed #2f59ad;background:transparent;color:#234d9b;font:inherit;font-weight:700;line-height:1.25;text-align:left;cursor:pointer}
.bpms-preview-link:hover,.bpms-preview-link:focus{background:#edf4ff;outline:2px solid #b8cdf5;outline-offset:1px}
.bpms-purpose-line{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.bpms-count-link{min-width:28px;text-align:center}
.bpms-record-preview{position:fixed;z-index:10050;display:none;max-height:min(430px,70vh);overflow:auto;padding:14px 16px;border:1px solid #b7c6da;border-radius:10px;background:#fff;box-shadow:0 12px 35px rgba(15,35,70,.25);color:#17253b;font-size:13px;line-height:1.4}
.bpms-record-preview.is-visible{display:block}
.bpms-record-preview h3,.bpms-record-preview h4{margin:0 0 9px;color:#234d9b}
.bpms-record-preview h4{margin-top:12px}
.bpms-record-preview p{margin:0;white-space:normal;overflow-wrap:anywhere}
.bpms-record-preview dl{display:grid;grid-template-columns:90px 1fr;gap:5px 10px;margin:0}
.bpms-record-preview dt{font-weight:700;color:#53647b}
.bpms-record-preview dd{margin:0;overflow-wrap:anywhere}
.bpms-preview-item{padding:7px 0;border-top:1px solid #e4eaf2}
.bpms-preview-item strong,.bpms-preview-item span{display:block}
.bpms-preview-item span{margin-top:2px;color:#5b687b;font-size:12px}
.bpms-status-stack{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.bpms-audit-by{display:block;max-width:104px;margin:0;padding:0;border:0;background:transparent;color:#66758b;font-size:9px;line-height:1.15;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.bpms-audit-by:hover,.bpms-audit-by:focus{color:#234d9b;text-decoration:underline;outline:none}
.bpms-history-entry{padding:9px 0;border-top:1px solid #e1e8f1}
.bpms-history-entry:first-of-type{border-top:0;padding-top:0}
.bpms-history-entry>strong,.bpms-history-entry>span{display:block}
.bpms-history-entry>span{margin-top:2px;color:#66758b;font-size:11px}
.bpms-history-entry ul{margin:6px 0 0;padding-left:18px}
.bpms-history-entry li{margin:3px 0;overflow-wrap:anywhere}
.bpms-rfi-register{min-width:900px;table-layout:fixed}
.bpms-rfi-register th:nth-child(1),.bpms-rfi-register td:nth-child(1){width:108px}
.bpms-rfi-register th:nth-child(2),.bpms-rfi-register td:nth-child(2){width:92px}
.bpms-rfi-register th:nth-child(3),.bpms-rfi-register td:nth-child(3){width:108px}
.bpms-rfi-register th:nth-child(4),.bpms-rfi-register td:nth-child(4){width:145px}
.bpms-rfi-register th:nth-child(5),.bpms-rfi-register td:nth-child(5){width:100px}
.bpms-rfi-register th:nth-child(6),.bpms-rfi-register td:nth-child(6){width:185px}
.bpms-rfi-register th:nth-child(7),.bpms-rfi-register td:nth-child(7){width:82px;text-align:center}
.bpms-rfi-register th:nth-child(8),.bpms-rfi-register td:nth-child(8){width:210px}
.bpms-rfi-subject-cell{max-width:185px;overflow:hidden}
.bpms-rfi-subject-line{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
@media(max-width:800px){
  .card:has(.bpms-compact-register){padding:10px;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .bpms-compact-register{min-width:1040px;font-size:12px}
  .bpms-compact-register th,.bpms-compact-register td{padding:6px}
  .bpms-compact-register .bpms-action-cell{min-width:116px;width:122px}
  .bpms-action-buttons button,.bpms-action-buttons .button{font-size:11px;padding:6px 8px;min-height:26px}
  .bpms-status-override{width:98px;min-width:98px;height:28px;font-size:11px}
  .bpms-purpose-cell{width:165px;max-width:165px}
  .bpms-record-preview{font-size:13px}
  .bpms-rfi-register{min-width:900px}
}
/* 2026-09 Project Control Centre: compact PO preview */
#materialPreview.bpms-record-preview{max-height:min(360px,62vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;width:min(420px,calc(100vw - 24px))}
#materialPreview .bpms-material-preview-items{max-height:none}
.bpms-purpose-line{display:block;max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
