/* UI37 certificate entry: one content area; shared draft/save actions stay reachable. */
#dialog.cf-dialog{width:min(900px,calc(100vw - 24px));max-height:94dvh;}
#dialog.cf-dialog .cf-form{display:flex;flex-direction:column;gap:0;overflow:hidden;max-height:calc(92dvh - 142px);}
.cf-form>[hidden],.cf-form [hidden]{display:none!important;}
.cf-form>.cf-content{overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-gutter:stable;padding-right:6px;}
.cf-form .cf-content .eyebrow{margin:0;color:#366573;font-size:11px;}
.cf-form .cf-lead{font-size:13px;margin:7px 0 14px;line-height:1.5;}
.cf-form .cf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;}
.cf-form .cf-content label{display:flex;flex-direction:column;gap:6px;margin:10px 0;min-width:0;}
.cf-form .cf-grid>label{margin:4px 0;}
.cf-form input,.cf-form select,.cf-form textarea{max-width:100%;box-sizing:border-box;min-width:0;}
.cf-form .cf-section{margin:14px 0;padding:12px 14px;border:1px solid #d4e1e8;border-radius:8px;background:#f8fbfc;}
.cf-form .cf-section summary{cursor:pointer;font-size:14px;font-weight:650;overflow-wrap:anywhere;}
.cf-form .cf-section summary span{font-weight:400;}
.cf-form .cf-dates h3{font-size:17px;padding:0;border:0;margin:17px 0 8px;}
.cf-form .cf-equipment-list{max-height:280px;overflow-y:auto;padding:4px 10px;border:1px solid #d4e1e8;border-radius:6px;}
.cf-form .cf-equipment-list legend{font-size:12px;font-weight:600;}
.cf-form label.cf-item{display:flex;flex-direction:row;align-items:flex-start;gap:10px;line-height:1.45;margin:10px 0;border-bottom:1px solid #e2eaee;padding-bottom:10px;}
.cf-form .cf-item input{flex:none;width:20px;height:20px;min-height:20px;accent-color:#0d6972;}
.cf-form .cf-item span{min-width:0;overflow-wrap:anywhere;}
.cf-form .cf-item small{display:block;font-size:12px;font-weight:400;color:#46606c;}
.cf-form .cf-boundary{padding:10px 12px;background:#edf5f7;border-radius:6px;line-height:1.5;}
.cf-form>.actions,.cf-form>#fw-error,.cf-form>#fw-local-state{flex-shrink:0;}
.cf-form>#fw-local-state{margin:7px 0 2px;font-size:12px;line-height:1.4;}
.cf-form>#fw-error:empty{display:none;}
.cf-form>.actions{margin-top:5px;gap:8px;padding-top:8px;}
.cf-form #fw-keep{margin-right:auto;}
.cf-form :focus-visible{outline:2px solid #176b8c;outline-offset:3px;}
@media(max-width:640px){
 #dialog.cf-dialog{width:calc(100vw - 12px);max-height:97dvh;}
 #dialog.cf-dialog .modal{padding:12px;}
 #dialog.cf-dialog .modal-head{padding:8px 0;margin-bottom:5px;}
 #dialog.cf-dialog .modal-head h2{font-size:20px;}
 #dialog.cf-dialog .cf-form{max-height:calc(96dvh - 143px);}
 .cf-form .cf-grid{grid-template-columns:1fr;gap:5px;}
 .cf-form .cf-section{padding:10px;}
 .cf-form>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
 .cf-form>.actions button{font-size:12px;padding:9px;white-space:normal;margin:0;min-width:0;}
 .cf-form #fw-save{grid-column:1/-1;grid-row:1;}
 .cf-form #fw-keep{grid-column:1;grid-row:2;margin:0;}
 .cf-form #fw-discard{grid-column:2;grid-row:2;}
}
