/* Contract editor only; the existing bilingual print document stays unchanged. */
body.gh-contract-page{font-family:-apple-system,"Segoe UI",Arial,Helvetica,sans-serif}
.gh-contract-page .q-shell{max-width:1180px;border-radius:14px;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.gh-contract-page [hidden]{display:none!important}
.gh-contract-page .cw-return{padding:12px 24px;border-bottom:1px solid #d8dee6}
.gh-contract-page .cw-return a{color:#315c7d;text-decoration:none;font-size:13px}
.cw-subject{padding:18px 24px;display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) auto;gap:12px;align-items:center;background:#fbfdff}
.cw-subject label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#46586b}
.cw-subject select{min-width:0;width:100%;height:42px;padding:8px 10px;border:1px solid #becbd6;border-radius:5px;background:#fff;color:#17212b;font:14px inherit}
.cw-subject strong{color:#183a59;font-size:14px}.cw-subject p{color:#64748b;font-size:12px;line-height:1.5}
#subjectStatus{grid-column:1/-1}#subjectStatus:empty{display:none}
.cw-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0 24px 18px;background:#fbfdff;border-bottom:1px solid #d8dee6}
.cw-tabs button{min-height:60px;padding:8px 6px;border:1px solid #c9d7e4;border-radius:7px;background:#fff;color:#315574;font:700 14px/1.4 -apple-system,"Segoe UI",Arial,sans-serif;cursor:pointer}
.cw-tabs button span{display:block;font-size:12px;font-weight:500}.cw-tabs button[aria-selected=true]{background:#183a59;color:#fff;border-color:#183a59}
.cw-tabs button:focus-visible,.cw-subject select:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.cw-editor-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.cw-editor-heading h2,.cw-history h2{font-size:17px;color:#183a59;margin:0}.cw-editor-heading span{font-size:12px;background:#eaf7ef;color:#067647;padding:4px 8px;border-radius:4px}
.gh-contract-page .q-section{background:transparent!important;border:0!important;border-bottom:1px solid #e5e9f0!important;padding:0 0 18px!important;margin-bottom:18px!important;border-radius:0!important}
.gh-contract-page .q-section h2{font-size:14px;text-transform:none;letter-spacing:0;color:#183a59!important;border:0;margin-bottom:12px}
.gh-contract-page .q-field{min-width:0}.gh-contract-page .q-field input,.gh-contract-page .q-field select{min-width:0;width:100%}
.gh-contract-page .q-field input:read-only{background:#f4f7fa;color:#506274}
.cw-source-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}.cw-source-row>.q-field{margin:0!important}.cw-source-row>div{margin:0!important}
.cw-details{padding:14px 0;border-top:1px solid #e5e9f0}.cw-details summary{color:#38506b;font-size:13px;font-weight:600;cursor:pointer}.cw-details>div{padding-top:14px}
.cw-history{padding:20px 24px}.cw-history h2{margin-bottom:14px}
.cw-history article{padding:14px 0;border-bottom:1px solid #e5e9f0;display:grid;grid-template-columns:140px minmax(0,1fr) auto;gap:14px;align-items:center;font-size:13px;overflow-wrap:anywhere}
.cw-history article small{display:block;color:#64748b;margin-top:4px}.cw-history article button,.cw-history-detail button,#subjectRetry{min-height:36px;padding:7px 12px;background:#fff;border:1px solid #cbd5df;border-radius:5px;color:#183a59;font:inherit;cursor:pointer}
.cw-history-detail{padding:16px 0;border-top:2px solid #183a59;margin-top:18px;line-height:1.7;font-size:13px}.cw-history-detail table{width:100%;border-collapse:collapse;margin:12px 0}.cw-history-detail th,.cw-history-detail td{padding:8px;border-bottom:1px solid #d8dee6;text-align:left}
.cw-history-detail pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.cw-empty{padding:30px 24px;color:#64748b;line-height:1.6}
.cw-notice{font-size:13px;padding:10px 12px;background:#fff8e5;color:#73541a;margin-bottom:18px;line-height:1.5}
.gh-contract-page .q-actions{justify-content:flex-end}.gh-contract-page .q-actions .q-btn{flex:0 1 auto;min-width:180px}.gh-contract-page button:disabled{opacity:.55;cursor:not-allowed}
.cw-payment-wrap{overflow-x:auto}.gh-contract-page .q-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}
@media(max-width:780px){.gh-contract-page .q-shell{border-radius:0;border-left:0;border-right:0}.cw-subject{grid-template-columns:1fr;padding:16px}.cw-tabs{padding:0 16px 16px;gap:5px}.cw-tabs button{font-size:13px}.cw-tabs button span{font-size:11px}.gh-contract-page .cw-return,.cw-history{padding-left:16px;padding-right:16px}.cw-editor-heading{align-items:flex-start;flex-direction:column}.cw-source-row{grid-template-columns:1fr}.cw-history article{grid-template-columns:1fr}.gh-contract-page .q-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}.gh-contract-page .q-actions .q-btn{flex:1 1 100%}.cw-payment-wrap table{min-width:550px}}
@media print{.gh-contract-page{padding:0!important}.gh-contract-page #printDoc{display:block!important}}
