.cma-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;margin-bottom:24px;border:1px solid #d7e5e5;border-radius:16px;background:linear-gradient(110deg,#eaf4f2,#f7fafb)}.cma-entry strong{display:block;color:#244d54;font-size:18px}.cma-entry span{display:block;color:#647b83;font-size:14px;margin-top:5px}.cma-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:24px}.cma-stat{display:grid;gap:14px;border:1px solid #dce6e8;border-radius:16px;padding:24px;text-align:left;background:white;color:#687f87;cursor:pointer;font:inherit}.cma-stat strong{font-size:30px;color:#203e48}.cma-stat:hover{border-color:#79aaa8;background:#f4f9f8}.cma-section,.cma-detail{margin-bottom:22px}.cma-section .card-body,.cma-detail .card-body{padding:22px}.cma-progress{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:24px}.cma-progress span{font-size:13px;padding:7px 10px;border-radius:7px;background:#f0f4f6;color:#84959b}.cma-progress .done{background:#e6f2ef;color:#38776c}.cma-progress .current{background:#286e70;color:white}.cma-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.cma-facts span{display:block;font-size:14px;color:#758991;margin-bottom:7px}.cma-facts strong{font-size:15px;word-break:break-word}.cma-roles{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.cma-roles .pill{opacity:.55}.cma-roles .pill.teal{opacity:1}.cma-actionbar{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px;padding-top:20px;border-top:1px solid #e4ecee}.cma-dl{display:grid;grid-template-columns:120px 1fr;gap:14px;margin:0}.cma-dl dt{color:#758991}.cma-dl dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.cma-record{padding:18px;background:#f4f7f8;border:1px solid #e1e9eb;border-radius:10px;white-space:pre-wrap;max-height:360px;overflow:auto}.cma-history{list-style:none;padding:0;margin:0}.cma-history li{padding:15px 0 15px 20px;border-left:2px solid #cce1df;position:relative}.cma-history li:before{content:'';position:absolute;left:-5px;top:22px;width:8px;height:8px;border-radius:50%;background:#5a9693}.cma-history strong{font-size:15px}.cma-history span{margin-left:14px;font-size:13px;color:#799099}.cma-history p{margin:8px 0 0;color:#607981;white-space:pre-wrap}.cma-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:220px;overflow:auto;padding:10px;border:1px solid #dae6e8;border-radius:9px}.cma-checks label{display:flex;align-items:center;gap:8px;padding:7px;font-size:14px}.cma-checks input{width:16px;min-height:16px;flex:0 0 16px}.cma-log{padding:16px 0;border-bottom:1px solid #e4ecee}.cma-log strong{font-size:15px}.cma-log p{white-space:pre-wrap}.cma-log .btn{margin-left:12px}.cma-section td small{display:block;color:#82939a;margin-top:5px}@media(max-width:900px){.cma-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cma-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.cma-entry{align-items:flex-start;flex-direction:column}.cma-checks{grid-template-columns:1fr}}@media(max-width:600px){.cma-facts{grid-template-columns:1fr}.cma-dl{grid-template-columns:1fr;gap:6px}.cma-history span{display:block;margin:6px 0 0}.cma-stat{padding:16px}}
.cma-report-actions{display:flex;gap:8px;flex-wrap:wrap}.cma-purpose-note{font-size:12px;line-height:1.7;color:#6f848a;margin:8px 0 16px}[data-cma-qualification]{margin:14px 0}[data-cma-qualification][hidden]{display:none}.cma-preview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 0 18px;color:#667b82;font-size:12px}.modal:has(.cma-report-preview){width:min(1040px,96vw);max-width:1040px}.modal-content:has(.cma-report-preview){background:#e8edef;padding:20px 24px}.cma-report-pages{overflow-x:auto;padding:2px 4px 8px}.cma-paper{box-sizing:border-box;position:relative;width:210mm;min-height:297mm;margin:0 auto 24px;padding:13mm 14mm 11mm;background:#fff;box-shadow:0 3px 18px #203d471c;color:#171717;font-family:"SimSun","Songti SC",serif;font-size:12px;line-height:1.6;display:flex;flex-direction:column;overflow:hidden}.cma-paper:last-child{margin-bottom:0}.cma-paper *{box-sizing:border-box}.cma-report-header{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.1fr) 27mm;gap:5mm;align-items:start;border-bottom:1.2px solid #171717;padding-bottom:4mm}.cma-report-identity{display:flex;flex-direction:column;align-items:flex-start;gap:2mm;min-width:0}.cma-report-identity>strong{font:600 12px/1.4 Arial,sans-serif;overflow-wrap:anywhere}.cma-report-identity>small{font-size:10px;line-height:1.5;overflow-wrap:anywhere}.cma-mark{width:35mm;height:16mm;color:#172b47;display:block}.cma-research-mark{font:600 15px/1.5 "Microsoft YaHei",sans-serif;letter-spacing:1px}.cma-research-mark small{font:11px/1.6 sans-serif;letter-spacing:0;font-weight:400}.cma-report-reference{margin:2mm 0 0;font:11px/1.7 Arial,"Microsoft YaHei",sans-serif;min-width:0}.cma-report-reference>div{margin-bottom:2mm}.cma-report-reference dt{color:#666;font-size:10px}.cma-report-reference dd{margin:0;font-weight:600;overflow-wrap:anywhere}.cma-report-qr{display:flex;flex-direction:column;align-items:center;font:9px/1.5 Arial,sans-serif;min-width:0}.cma-report-qr svg{width:24mm;height:24mm;display:block}.cma-report-qr strong{font-size:9px;letter-spacing:.1px;white-space:nowrap}.cma-no-qr{display:block;color:#777;text-align:center;width:24mm;padding:6mm 1mm}.cma-report-title{text-align:center;margin:5mm 0}.cma-report-title h1{font:700 24px/1.5 "SimHei","Microsoft YaHei",sans-serif;color:#111;margin:0;letter-spacing:2px}.cma-report-title p{font-size:12px;margin:2mm 0 0;color:#333}.cma-report-body{position:relative;z-index:1;flex:1}.cma-paper table{table-layout:fixed;border-collapse:collapse;white-space:normal;width:100%;margin:0 0 3mm;font-size:12px}.cma-paper th,.cma-paper td{border:1px solid #555!important;padding:2mm 2.5mm;color:#171717;font:inherit;vertical-align:top;overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.55;text-align:left}.cma-paper th{font-weight:600;background:#f5f5f5}.cma-report-facts th{width:33mm}.cma-result-table th{font-size:11px;text-align:center}.cma-result-table td:first-child{text-align:center}.cma-paper tbody tr:hover{background:transparent}.cma-correction{border:1px solid #b45d5d;background:#fff8f8;color:#8f3939;padding:3mm;margin-bottom:3mm}.cma-correction strong{font-size:12px}.cma-correction p{font-size:11px;margin:1mm 0 0;line-height:1.7}.cma-subtitle{font:bold 12px/1.7 "Microsoft YaHei",sans-serif;margin:3mm 0 2mm}.cma-signatures{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5mm;padding:5mm 0 8mm;margin-top:2mm;min-height:30mm;border-top:1px solid #777}.cma-signature{display:flex;flex-direction:column;gap:2mm;position:relative;z-index:1}.cma-signature>span{font-size:11px}.cma-signature strong{font:500 20px/1.5 "KaiTi","STKaiti",serif;color:#28365b;overflow-wrap:anywhere}.cma-signature small{font-size:10px;color:#333}.cma-seal{position:absolute;right:1mm;top:-2mm;width:39mm;height:39mm;color:#c12c29;opacity:.66;transform:rotate(-12deg);z-index:2;pointer-events:none}.cma-report-footer{padding-top:3mm;border-top:1px solid #555;color:#555;font-size:9px;line-height:1.8;position:relative;z-index:1;margin-top:5mm}.cma-report-footer p{margin:0}.cma-void-watermark{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;flex-direction:column;transform:rotate(-30deg);pointer-events:none;color:rgba(178,30,30,.19);font-family:"Microsoft YaHei",sans-serif;text-align:center}.cma-void-watermark>span{font-size:68px;font-weight:700;letter-spacing:8px}.cma-void-watermark>small{font-size:22px;letter-spacing:1px}@media(max-width:600px){.modal-content:has(.cma-report-preview){padding:12px}.cma-preview-toolbar{align-items:flex-start;flex-direction:column}.cma-report-pages{padding:0 0 8px}.cma-preview-toolbar .btn{width:100%}}@media print{@page{size:A4 portrait;margin:0}body:has(.cma-report-preview){background:#fff!important;overflow:visible!important}body:has(.cma-report-preview)>:not(#modal-root){display:none!important}#modal-root:has(.cma-report-preview),#modal-root:has(.cma-report-preview) .modal-backdrop,#modal-root:has(.cma-report-preview) .modal,#modal-root:has(.cma-report-preview) .modal-content{display:block!important;position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important;background:#fff!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}#modal-root:has(.cma-report-preview) .modal-header,#modal-root:has(.cma-report-preview) .cma-preview-toolbar,#modal-root:has(.cma-report-preview) .form-error{display:none!important}.cma-report-pages{overflow:visible;padding:0}.cma-paper{width:210mm;min-height:297mm;margin:0!important;box-shadow:none!important;break-after:page;page-break-after:always;print-color-adjust:exact;-webkit-print-color-adjust:exact}.cma-paper:last-child{break-after:auto;page-break-after:auto}.cma-paper tr,.cma-signatures,.cma-report-header{break-inside:avoid;page-break-inside:avoid}.cma-void-watermark{display:flex!important}}
/* CMA 2023 metrology, traceability and structured records. */
.cma-equipment-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:6px;font-size:12px;font-weight:650;line-height:1.3;vertical-align:middle}.cma-equipment-badge i{width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 7px}.cma-equipment-badge.green{color:#20764d;background:#e7f5ec;border:1px solid #b8dfc8}.cma-equipment-badge.yellow{color:#946c12;background:#fff7dc;border:1px solid #e9d494}.cma-equipment-badge.red{color:#a73636;background:#fcecec;border:1px solid #ebc0c0}.cma-contract-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:16px 0;padding:18px;border-radius:10px;border:1px solid #dce8e8;background:#f6faf9}.cma-material-select{max-height:270px}.cma-material-select label{align-items:flex-start}.cma-material-select input{margin-top:3px}.cma-material-select strong,.cma-material-select small{display:block;line-height:1.6}.cma-material-select strong{font-weight:600;color:#2c4852}.cma-material-select small{color:#70858b;font-size:12px;overflow-wrap:anywhere}.cma-material-select .is-disabled{background:#f4f5f5;opacity:.65;cursor:not-allowed}.cma-material-reference{padding:12px 14px;background:#f1f7f5;border-radius:8px;color:#4d6b70;font-size:13px;line-height:1.8;overflow-wrap:anywhere}.cma-result-editor{margin:18px 0;border:1px solid #dce7e9;border-radius:10px;overflow:hidden}.cma-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f4f8f8;padding:12px 15px}.cma-result-editor .table-wrap{margin:0}.cma-result-editor table{min-width:960px;width:100%;table-layout:fixed}.cma-result-editor th,.cma-result-editor td{padding:10px 7px;vertical-align:top}.cma-result-editor th:first-child{width:18%}.cma-result-editor th:nth-child(2){width:14%}.cma-result-editor th:nth-child(3){width:9%}.cma-result-editor th:nth-child(4){width:18%}.cma-result-editor th:nth-child(5){width:17%}.cma-result-editor th:nth-child(6){width:16%}.cma-result-editor th:last-child{width:8%}.cma-result-editor input{min-width:0;width:100%;font-size:13px;padding:9px 8px;min-height:39px}.cma-result-editor .btn{padding:9px 7px;white-space:nowrap}[data-cma-validation][hidden]{display:none}@media(max-width:720px){.cma-contract-options{grid-template-columns:1fr;gap:8px;padding:14px}.cma-editor-head{align-items:flex-start;gap:12px}.cma-material-select{grid-template-columns:1fr}}

/* Keep the formal paper width inside its own touch-scroll viewport. */
.cma-report-preview,.cma-report-pages{min-width:0;max-width:100%}
.cma-report-pages{-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
@media screen and (max-width:720px){
 .modal:has(.cma-report-preview){width:100%;max-width:100%}
 .cma-preview-toolbar{align-items:stretch;flex-direction:column}
 .cma-report-pages{width:100%;padding:0 0 12px}
 .cma-report-pages .cma-paper{width:210mm;min-width:210mm;max-width:none}
 .cma-editor-head{flex-wrap:wrap}
}
