/* CliNext v0.19 -- purely presentational patient workspace + report editor */
.cl-patient-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0 8px}
.cl-stat{background:#f1f7fa;border:1px solid #d6e6ee;padding:13px;border-radius:12px;min-width:0}
.cl-stat small{display:block;font-size:12px;color:#5b7382;margin-bottom:5px}
.cl-stat strong{font-size:15px;color:#15364c;overflow-wrap:anywhere}
.cl-detail-grid{display:grid;grid-template-columns:minmax(170px,0.8fr) minmax(0,2.2fr) minmax(190px,0.9fr);gap:14px;margin:12px 0}
.cl-detail-grid>.cl-rail,.cl-detail-grid>.cl-visit-nav{align-self:start;border:1px solid #dbe5ec;border-radius:12px;background:#f8fbfd;padding:14px;min-width:0}
.cl-detail-grid>.cl-content{min-width:0}
.cl-detail-grid h3{font-size:15px;margin:0 0 10px;color:#24465c}
.cl-visit-item{padding:10px;margin:7px 0;border:1px solid #dae4ed;border-radius:9px;background:white}
.cl-visit-item.active{border-color:#136b83;background:#edf9fa}
.cl-visit-item button{font-size:12px;padding:6px 8px;margin:5px 3px 0 0}
.cl-visit-date{font-size:13px;font-weight:700}.cl-mini{font-size:12px;color:#667d8f}
.cl-aside-group{margin:0 0 18px;border-bottom:1px solid #e0e8ef;padding-bottom:11px}
.cl-aside-group p{font-size:12px;line-height:1.45;overflow-wrap:anywhere;margin:7px 0}
.cl-focus{border:1px solid #b2d6e3;border-radius:12px;background:#f1f8fb;padding:15px;margin-bottom:14px}
.cl-focus pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;margin:7px 0}
.cl-focus summary{cursor:pointer}.cl-report-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #bdd7e4;background:#eff8fb;padding:14px;border-radius:12px;margin:14px 0}
.cl-report-bar button{white-space:nowrap}.cl-rail .cl-alert{border-left:3px solid #bc7452;padding-left:8px}
.cl-evaluation-page{position:fixed;inset:0;z-index:500;background:#edf3f7;overflow:auto;color:#173049}
.cl-evaluation-wrap{max-width:1780px;margin:0 auto;padding:22px clamp(12px,2.3vw,38px)}
.cl-evaluation-top{background:white;border:1px solid #dce6ef;border-radius:14px;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.cl-evaluation-top h1{font-size:22px;margin:0}.cl-evaluation-top .cl-top-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cl-evaluation-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,0.9fr);gap:18px;margin-top:18px}
.cl-paper{background:white;border:1px solid #dae5ee;border-radius:14px;padding:clamp(18px,3vw,35px);min-width:0;box-shadow:0 5px 22px #24465c0a}
.cl-editor{margin:18px 0}.cl-editor label{display:flex;align-items:center;justify-content:space-between;font-size:15px;margin:0 0 7px}
.cl-editor textarea{display:block;resize:vertical;min-height:100px;font-family:inherit;font-size:14px;line-height:1.65}
.cl-editor textarea:focus{outline:2px solid #7bb9ca;outline-offset:1px}
.cl-eval-side{min-width:0}.cl-eval-panel{background:white;border:1px solid #dae5ee;border-radius:12px;padding:18px;margin-bottom:14px}
.cl-eval-panel h3{font-size:15px;margin:0 0 9px}.cl-eval-panel p,.cl-eval-panel li{font-size:13px;line-height:1.6}
.cl-eval-panel details{margin:10px 0}.cl-eval-panel details pre{font:inherit;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.cl-eval-panel select{width:100%}.cl-eval-note{border-left:3px solid #c89564;padding:9px;background:#fff9f1;font-size:12px}
.cl-eval-status{min-height:28px;font-size:13px}.cl-eval-input{font-size:13px}
.cl-evaluation-page button:disabled{opacity:.55}
@media(max-width:1180px){.cl-detail-grid{grid-template-columns:1fr 2fr}.cl-detail-grid>.cl-rail{grid-column:1/-1}.cl-patient-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:770px){.cl-detail-grid,.cl-evaluation-layout{grid-template-columns:1fr}.cl-patient-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cl-report-bar{flex-wrap:wrap}.cl-evaluation-wrap{padding:10px}.cl-evaluation-top{padding:13px}}
@media print{body>header,main,.cl-evaluation-top,.cl-eval-side,.cl-eval-status,.cl-eval-note,.cl-editor label small{display:none!important}.cl-evaluation-page{position:static;overflow:visible;background:white}.cl-evaluation-layout{display:block}.cl-paper{border:0;box-shadow:none;padding:0}.cl-editor textarea{border:0;overflow:visible;resize:none;min-height:0;height:auto!important;white-space:pre-wrap}.cl-evaluation-wrap{padding:0}}

.cl-physician-review{display:flex;align-items:flex-start;gap:8px;font-size:13px;line-height:1.5;margin:14px 0 0}
.cl-physician-review input{width:auto;min-width:18px;min-height:18px;margin-top:2px}

.cl-ai-workspace{border:1px solid #b7dae2;background:#f3fafc}
.cl-ai-workspace label{font-size:12px;margin:10px 0 5px;font-weight:600}
.cl-ai-workspace textarea{width:100%;font-size:13px;min-height:80px}
.cl-ai-workspace button{margin:8px 8px 0 0;font-size:12px}
.cl-evidence-panel>details{margin-top:13px;border:1px solid #d4e4ed;border-radius:8px;padding:10px}
.cl-evidence-panel details details{margin:6px 0 6px 10px;padding:7px 8px;border-bottom:1px solid #e2eaf0}
.cl-evidence-panel details summary{cursor:pointer;overflow-wrap:anywhere;font-size:12px}
.cl-evidence-panel details pre,.cl-ai-preview{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px;max-height:300px;overflow:auto;background:#f7fafc;border:1px solid #e3eaf0;padding:10px;border-radius:7px}
.cl-eval-side .cl-evidence-actions button{font-size:12px;margin-top:8px}
.cl-ai-proposal{padding-top:10px}.cl-ai-proposal strong{font-size:13px}

.cl-document-panel{background:#f9fcff;border:1px solid #bad4e1}
.cl-document-panel>select,.cl-document-panel>input[type=file]{display:block;width:100%;margin:8px 0}
.cl-evidence-doc{border:1px solid #dce5ec;border-radius:10px;padding:12px;margin:10px 0;background:white;min-width:0}
.cl-evidence-doc button,.cl-evidence-page button{font-size:12px;margin:7px 7px 4px 0}
.cl-evidence-doc-detail{margin-top:10px}
.cl-evidence-page{border:1px solid #d9e5ed;border-radius:8px;padding:10px;margin:7px 0;min-width:0}
.cl-evidence-page summary{cursor:pointer;overflow-wrap:anywhere;font-size:12px}
.cl-document-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:310px;overflow:auto;background:#f4f8fa;padding:10px;border:1px solid #deebf0;font-size:12px}
.cl-evidence-image{display:block;max-width:100%;height:auto;border-radius:8px;border:1px solid #d8e4ec;margin:8px 0}
.cl-qeeg-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.cl-qeeg-image{min-width:0;padding:8px;border:1px solid #d9e4ea;background:#fafcff;border-radius:8px}
.cl-qeeg-image strong{font-size:12px}
.cl-evidence-quote{border:1px solid #bcd7df;border-radius:7px;padding:8px;margin:8px 0;background:#f5fbfc}

/* New patient registration and conspicuous demo segregation */
.cl-create-patient-action{display:block;width:100%;padding:12px 15px;margin:9px 0 16px;background:#08667d;color:#fff;font-weight:750;border:0;border-radius:10px;cursor:pointer}
.cl-create-patient-action:hover{background:#064e60}
.cl-patient-create-form{border:1px solid #afced8;border-radius:12px;background:#f1f9fb;padding:14px;margin:8px 0 15px}
.cl-patient-create-form h3{font-size:15px;margin:0 0 8px}
.cl-patient-create-form label{display:block;font-size:13px;font-weight:650;margin:10px 0}
.cl-patient-create-form label input,.cl-patient-create-form label select{display:block;width:100%;margin-top:5px;padding:9px 10px}
.cl-patient-create-form .cl-test-hint{border-left:3px solid #a67a36;background:#fff8e7;padding:10px;font-size:12px;line-height:1.5}
.cl-patient-create-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.cl-patient-create-actions button{flex:1;min-width:110px}
.cl-demo-patient-item{background:#fff8e7!important;border-left:4px solid #bf8f35!important}
.cl-demo-patient-banner{border:1px solid #e2bd70;background:#fff7df;border-radius:10px;color:#69491a;font-weight:650;padding:12px 14px;margin:12px 0;font-size:13px}
#patientListTools label[for=clPatientKindFilter]{display:block;margin-top:8px}
#clPatientKindFilter{width:100%;margin:5px 0 10px}

.cl-report-demo-banner{color:#6d4510;background:#fff2d3;border:2px solid #d7a64b;border-radius:10px;padding:12px;font-weight:800;letter-spacing:.2px;text-align:center}
@media print{.cl-report-demo-banner{display:block!important;border:2px solid #111!important;color:#111!important}}

.cl-bulk-med-panel{border:1px solid #b9d3df;border-radius:13px;background:#f6fbfd;padding:18px;margin-top:14px}
.cl-bulk-med-panel h3{margin:0 0 8px}
.cl-bulk-med-panel>textarea{display:block;width:100%;min-height:165px;line-height:1.65;font-size:14px;border-radius:9px;padding:11px}
.cl-bulk-med-panel>button{margin:10px 8px 10px 0}
.cl-med-review-row{border:1px solid #d4e4ec;border-radius:11px;background:white;padding:14px;margin:13px 0;min-width:0}
.cl-med-review-row strong{display:block;font-size:13px;overflow-wrap:anywhere;margin-bottom:8px}
.cl-med-review-row select,.cl-med-review-row input{display:block;width:100%;margin:7px 0;padding:9px}
.cl-med-review-row .cl-mini{border-left:3px solid #d3a75a;background:#fff9ed;padding:8px 10px}
.cl-med-review-row .cl-physician-review input{width:auto;margin:0}
.cl-mic-button{display:inline-block;min-height:26px;margin:3px 0 7px 5px;padding:4px 7px!important;font-size:11px!important;white-space:nowrap}
.cl-mic-status{font-size:11px;color:#3e687a;margin:0 5px;max-width:230px;overflow-wrap:anywhere}
.cl-bulk-preview{max-height:70vh;overflow-y:auto}
/* A single clinician-editable document rather than a stack of fields. */
.cl-document-editor{margin:15px 0 28px}
.cl-document-editor h3{font-size:18px;margin:0 0 6px}
.cl-document-editor .cl-mini{font-size:13px;margin-bottom:12px}
.cl-document-text{width:100%;box-sizing:border-box;min-height:72vh;line-height:1.75;font-size:15px;font-family:inherit;padding:24px;border:1px solid #cbdde8;border-radius:9px;background:white;color:#20364b;resize:vertical;white-space:pre-wrap}
.cl-document-text:focus{outline:2px solid #6eacbf}
.cl-document-text:read-only{background:#fafbfd;border-color:#dce5ea}
@media print{.cl-document-text{border:0;min-height:0;overflow:visible;resize:none;padding:0;font-size:12pt}.cl-document-editor h3,.cl-document-editor .cl-mini,.cl-eval-source-original{display:none!important}}

/* One-click evaluation: readable compact draft and source separation */
.cl-document-text{min-height:260px;height:min(55vh,620px);max-height:none;overflow:auto}
.cl-eval-side details:not([open])>summary{cursor:pointer}
@media(max-width:770px){.cl-document-text{min-height:220px;height:42vh}}


/* Clinical report formatting tools: text-safe formatting with print-quality view. */
.cl-rich-toolbar{display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:10px 11px;margin:9px 0 0;border:1px solid #cbdde8;border-bottom:0;border-radius:10px 10px 0 0;background:#f4f8fb;position:relative}
.cl-evaluation-page .cl-rich-tool{border:1px solid #cedee7;background:#fff;color:#23465a;border-radius:6px;padding:7px 10px;font-size:12px;line-height:1.25;min-height:30px;cursor:pointer;margin:0}
.cl-evaluation-page .cl-rich-tool:hover:not(:disabled){background:#e6f4f7;border-color:#81bdc9}
.cl-evaluation-page .cl-rich-tool:focus-visible{outline:2px solid #257e94;outline-offset:2px}
.cl-rich-tool-bold{font-weight:800}
.cl-rich-tool-italic{font-style:italic}
.cl-rich-tool-underline{text-decoration:underline}
.cl-rich-preview-toggle{margin-left:auto!important;border-color:#8bbccc!important;color:#105267!important;font-weight:700}
.cl-document-editor>.cl-document-text{border-radius:0 0 9px 9px;margin-top:0}
.cl-rich-preview{margin:12px 0 0;background:#fff;border:1px solid #c7dbe6;border-radius:11px;box-shadow:0 3px 18px #183f5010;overflow:hidden}
.cl-rich-preview-title{font-size:12px;font-weight:750;letter-spacing:.03em;padding:12px 17px;background:#edf5f9;border-bottom:1px solid #d6e4ed;color:#20536b}
.cl-rich-preview-body{padding:25px 30px;color:#263849;font-family:Georgia,'Times New Roman',serif;font-size:14px;line-height:1.65;overflow-wrap:anywhere;min-height:70px}
.cl-rich-preview-body p{margin:0 0 9px;white-space:pre-wrap}
.cl-rich-preview-body h2,.cl-rich-preview-body h3,.cl-rich-preview-body h4{color:#1b5570;line-height:1.35;margin:19px 0 10px;font-family:inherit}
.cl-rich-preview-body h2{font-size:20px;border-bottom:1px solid #d4e2e9;padding-bottom:7px}
.cl-rich-preview-body h3{font-size:17px}
.cl-rich-preview-body h4{font-size:15px}
.cl-rich-preview-body li{margin-bottom:5px}
.cl-rich-preview-body blockquote{border-left:3px solid #90bdca;padding:10px 15px;margin:10px 0;background:#f5f9fc}
.cl-rich-table{border-collapse:collapse;max-width:100%;width:100%;font:inherit;font-size:12px;margin:15px 0 19px}
.cl-rich-table td,.cl-rich-table th{border:1px solid #cedee6;padding:8px 10px;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.cl-rich-table th{background:#eef6fa;font-weight:700;color:#1e4d65}
.cl-rich-table tr:nth-child(even) td{background:#fafcfe}
.cl-rich-preview-body .cl-rich-empty{color:#67808c}
@media(max-width:770px){.cl-rich-toolbar{gap:4px;padding:7px}.cl-evaluation-page .cl-rich-tool{padding:6px 7px;font-size:11px}.cl-rich-preview-body{padding:16px}}
@media print{
 .cl-rich-toolbar,.cl-document-editor>.cl-document-text,.cl-document-editor>.cl-mic-field,.cl-document-editor>#clEvaluationDocumentVoice{display:none!important}
 .cl-rich-preview,.cl-rich-preview[hidden]{display:block!important;border:0!important;box-shadow:none!important;margin:0!important}
 .cl-rich-preview-title{display:none!important}
 .cl-rich-preview-body{padding:0;color:#000;font-size:11pt;line-height:1.45}
 .cl-rich-table{break-inside:auto}
 .cl-rich-table tr{break-inside:avoid}
}

/* Clear report-preview closure, legible lab tables and report-letter layout. */
.cl-rich-preview[hidden]{display:none!important}
.cl-rich-preview-title{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:11px 16px;font-size:14px}
.cl-evaluation-page .cl-rich-close{background:#fff;border:1px solid #b6d1dc;color:#205268;font-size:12px;font-weight:700;border-radius:7px;padding:8px 11px;cursor:pointer;margin:0}
.cl-evaluation-page .cl-rich-close:hover{background:#e6f2f8}
.cl-rich-preview-body{font-size:15px;line-height:1.7;max-width:100%;overflow-x:auto;padding:25px 30px}
.cl-rich-preview-body p{font-size:14px;line-height:1.75}
.cl-rich-preview-body .cl-rich-table{font-size:12.5px;line-height:1.4;table-layout:auto}
.cl-rich-preview-body .cl-rich-table th,.cl-rich-preview-body .cl-rich-table td{padding:9px 10px}
.cl-rich-report-header{border-bottom:2px solid #b7d2df;padding:0 0 16px;margin:0 0 22px}
.cl-rich-report-header h2{font:700 21px/1.3 Georgia,serif;color:#20435a;margin:0 0 6px!important;border:0!important;padding:0!important}
.cl-rich-report-header .cl-rich-report-date{font:12px/1.4 system-ui,sans-serif;color:#627989;margin:4px 0 17px}
.cl-rich-report-header .cl-rich-report-greeting{font:600 15px/1.5 Georgia,serif;color:#213d52}
.cl-rich-source-ledger{margin:13px 0;color:#688092;font:11px/1.5 system-ui,sans-serif}
.cl-rich-source-ledger summary{cursor:pointer}
.cl-rich-source-ledger ul{overflow-wrap:anywhere;padding-left:22px}
@media(max-width:770px){.cl-rich-preview-title{flex-wrap:wrap}.cl-rich-preview-body{padding:18px;font-size:14px}.cl-rich-preview-body .cl-rich-table{font-size:11px}}
@media print{.cl-rich-preview[hidden]{display:block!important}.cl-rich-source-ledger{display:none!important}.cl-rich-preview-title{display:none!important}.cl-rich-report-header{break-after:avoid}}

/* Doktor Çağlayan standardized patient follow-up report: navy, gold, A4. */
.cl-rich-report-header{border-bottom:0;padding:0;margin:0 0 22px}
.cl-rich-report-header .cl-rich-brandline{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:2px solid #c59a52;padding:4px 0 14px;margin-bottom:19px}
.cl-rich-brand{display:flex;align-items:center;gap:12px;min-width:0}
.cl-rich-brand-logo{width:72px;height:72px;object-fit:contain;flex:0 0 auto}
.cl-rich-brand-name{display:flex;flex-direction:column;color:#12334d;line-height:1.25;letter-spacing:.09em}
.cl-rich-brand-name .cl-rich-brand-overline{font-size:11px;letter-spacing:.26em}
.cl-rich-brand-name strong{font-size:23px;font-weight:700;letter-spacing:.13em;font-family:Georgia,serif}
.cl-rich-brand-name small{font:11px/1.3 system-ui,sans-serif;letter-spacing:0;color:#617689;margin-top:4px}
.cl-rich-brand-motto{max-width:240px;white-space:pre-line;text-align:right;font:600 10px/1.6 Georgia,serif;letter-spacing:.14em;color:#1f4766}
.cl-rich-report-header .cl-rich-report-band{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:21px 25px;border-radius:10px;background:#14364f;color:#fff;margin-bottom:15px}
.cl-rich-report-band h2{font:700 22px/1.3 Georgia,serif!important;letter-spacing:.07em;color:#fff!important;border:0!important;margin:0 0 5px!important;padding:0!important}
.cl-rich-report-band p{font:11px/1.5 Georgia,serif!important;color:#e7edf3;letter-spacing:.08em;margin:0!important}
.cl-rich-report-band-dates{display:flex;flex-direction:column;align-items:flex-end;gap:3px;white-space:nowrap;font-size:11px;line-height:1.4;font-family:system-ui,sans-serif}
.cl-rich-report-band-dates strong{font-size:12px;color:#fff}
.cl-rich-report-patient-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 22px;padding:15px 18px;border:1px solid #d4e3ec;border-radius:10px;background:#f7fafc;margin-bottom:21px}
.cl-rich-patient-field{display:flex;flex-direction:column;gap:3px;min-width:0}
.cl-rich-patient-field span{font:700 10px/1.4 system-ui,sans-serif;color:#718394;letter-spacing:.07em}
.cl-rich-patient-field strong{font:600 13px/1.5 system-ui,sans-serif;color:#20394d;overflow-wrap:anywhere}
.cl-rich-report-header .cl-rich-report-greeting{font:600 16px/1.6 Georgia,serif;margin:0 0 17px;color:#12354c}
.cl-rich-preview-body{position:relative;isolation:isolate}
.cl-rich-watermark{pointer-events:none;position:absolute;right:8%;bottom:10%;width:34%;height:auto;opacity:.045;z-index:-1;object-fit:contain}
.cl-rich-report-end{position:relative;margin-top:30px;padding-top:15px;border-top:1px solid #d8e2e8;page-break-inside:avoid;break-inside:avoid}
.cl-rich-report-end>p{font:italic 13px/1.6 Georgia,serif;color:#526778}
.cl-rich-doctor-signature{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin:30px 16px 24px;color:#16394e}
.cl-rich-doctor-signature strong{font:700 15px/1.4 Georgia,serif}
.cl-rich-doctor-signature span{font:11px/1.4 system-ui,sans-serif;color:#697f8e}
.cl-rich-contact-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;background:#153851;color:#fff;padding:10px 14px;margin:13px -30px -25px;border-radius:0 0 10px 10px;font:11px/1.35 system-ui,sans-serif}
.cl-report-clinician-approval{margin:26px 0 10px;border:1px solid #b8d6e3;background:#f5fafd}
.cl-report-clinician-approval h3{font-size:17px;color:#1c4d67}
.cl-report-final-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 0;padding-top:16px;border-top:1px solid #d9e6ed}
.cl-report-final-actions button{min-height:43px;padding:11px 22px}
#clReportFinalActions #clEvaluationSave{background:#134f66;color:white;border-radius:8px;border:0;font-weight:750}
#clReportFinalActions #clEvaluationFinalize{background:white;border-color:#9abccc}
@media(max-width:640px){
 .cl-rich-report-header .cl-rich-report-band{padding:15px;align-items:flex-start}
 .cl-rich-brandline{align-items:flex-start!important}
 .cl-rich-brand-motto{font-size:8px;letter-spacing:.04em}
 .cl-rich-brand-logo{height:56px;width:56px}
 .cl-rich-brand-name strong{font-size:16px}
 .cl-rich-report-band h2{font-size:17px!important}
 .cl-rich-report-patient-panel{gap:9px;padding:11px}
 .cl-rich-contact-footer{margin:10px -18px -18px;font-size:10px}
}
@page{size:A4;margin:15mm 14mm 17mm}
@media print{
 body{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .cl-evaluation-page{overflow:visible;position:static;background:white}
 .cl-evaluation-wrap{max-width:none;padding:0}
 .cl-evaluation-layout{display:block;margin:0}
 .cl-paper{padding:0;border:0!important;box-shadow:none!important}
 .cl-paper>:not(.cl-document-editor){display:none!important}
 .cl-document-editor{margin:0}
 .cl-document-editor>.cl-rich-preview{display:block!important;overflow:visible!important;border:0!important;box-shadow:none!important;margin:0!important}
 .cl-rich-preview[hidden]{display:block!important}
 .cl-rich-preview-body{padding:0;overflow:visible!important;min-height:0;font-size:11pt;line-height:1.55}
 .cl-rich-report-header{margin-bottom:17px}
 .cl-rich-report-brandline{border-bottom-color:#c59a52}
 .cl-rich-report-band{border-radius:0!important;padding:15px 19px!important}
 .cl-rich-report-patient-panel{border-radius:0}
 .cl-rich-report-band h2{font-size:17pt!important}
 .cl-rich-contact-footer{margin:14px 0 0;border-radius:0;background:#153851!important;color:white!important}
 .cl-rich-watermark{position:fixed;right:9%;bottom:14%;max-width:260px;opacity:.055}
 .cl-rich-preview-body h2,.cl-rich-preview-body h3,.cl-rich-preview-body h4{break-after:avoid}
 .cl-rich-preview-body .cl-rich-table{font-size:9pt;break-inside:auto}
 .cl-rich-preview-body .cl-rich-table tr{break-inside:avoid}
 .cl-rich-preview-body .cl-rich-table thead{display:table-header-group}
 .cl-rich-report-header,.cl-rich-report-end{break-inside:avoid}
}

/* Clinician-approved A4 house style based on the uploaded five-page clinical
   report. Layout-only: no patient-specific text or therapy is copied. */
:root{--cl-print-navy:#143554;--cl-print-gold:#c69a4d;--cl-print-pale:#f0f5f9;--cl-print-ink:#213b52}
.cl-rich-brandline{min-height:82px}
.cl-rich-brand-name strong{font:700 22px/1.2 Georgia,serif!important;letter-spacing:0!important;color:var(--cl-print-navy)}
.cl-rich-brand-name small{font:600 10px/1.3 system-ui,sans-serif!important;letter-spacing:.03em!important;color:#53687b}
.cl-rich-report-header .cl-rich-report-band{display:block!important;padding:24px 24px!important;border-top:4px solid var(--cl-print-gold);background:var(--cl-print-navy)!important;border-radius:6px!important}
.cl-rich-report-header .cl-rich-report-band h2{font:700 20px/1.28 Georgia,serif!important;letter-spacing:.015em!important}
.cl-rich-report-header .cl-rich-report-band p{font:400 12px/1.4 Georgia,serif!important;letter-spacing:0!important}
.cl-rich-report-band-dates{display:none!important}
.cl-rich-report-patient-panel{grid-template-columns:repeat(3,minmax(0,1fr))!important;background:var(--cl-print-pale)!important;border:0!important;padding:16px 18px!important;margin:13px 0 25px!important}
.cl-rich-patient-field span{color:#64798b!important}
.cl-rich-patient-field strong{color:var(--cl-print-navy)!important;font-weight:750!important}
.cl-rich-report-header .cl-rich-report-greeting{font:600 15px/1.4 system-ui,sans-serif!important;color:var(--cl-print-ink);margin:18px 0 12px}
.cl-rich-preview-body{color:var(--cl-print-ink)!important;font-family:Arial,'DejaVu Sans',sans-serif!important}
.cl-rich-preview-body p{line-height:1.62!important}
.cl-rich-preview-body .cl-rich-numbered-section{display:flex!important;align-items:center!important;gap:0!important;margin:23px 0 13px!important;background:#f7f8fa!important;border-bottom:1px solid var(--cl-print-gold)!important;color:var(--cl-print-navy)!important;padding:0!important;font:800 15px/1.35 Arial,'DejaVu Sans',sans-serif!important;break-after:avoid;page-break-after:avoid}
.cl-rich-section-index{display:inline-flex;flex:0 0 39px;min-height:33px;align-items:center;justify-content:center;background:var(--cl-print-navy)!important;color:#fff!important;margin-right:14px;font-weight:800}
.cl-rich-section-title{padding:7px 8px 7px 0!important}
.cl-rich-preview-body h4.cl-rich-heading{font:700 13px/1.4 Arial,sans-serif!important;margin:17px 0 9px!important;color:var(--cl-print-navy)!important}
.cl-rich-support-card{background:var(--cl-print-pale)!important;border-left:3px solid var(--cl-print-gold)!important;padding:14px 16px;margin:12px 0 17px;break-inside:avoid-page}
.cl-rich-support-heading{color:var(--cl-print-navy)!important;font:800 13px/1.4 Arial,sans-serif}
.cl-rich-support-card p{margin:6px 0!important}
.cl-rich-preview-body .cl-rich-table{border-collapse:collapse!important;font-size:11px!important}
.cl-rich-preview-body .cl-rich-table th{background:var(--cl-print-pale)!important;color:var(--cl-print-navy)!important}
.cl-rich-preview-body .cl-rich-table tr:nth-child(odd) td{background:var(--cl-print-pale)!important}
.cl-rich-report-end{border:0!important;padding-top:8px!important}
.cl-rich-doctor-signature{align-items:flex-start!important;margin:23px 0 8px!important}
.cl-rich-contact-footer{background:transparent!important;color:#53687b!important;border-top:1px solid #e5edf2;border-radius:0!important;margin:22px 0 0!important;padding:10px 0 0!important}
@media print{
 @page{size:A4;margin:25mm 16mm 20mm}
 .cl-rich-brandline{min-height:75px;margin-bottom:12px!important}
 .cl-rich-report-header .cl-rich-report-band{padding:21px 20px!important}
 .cl-rich-report-patient-panel{border-radius:5px!important}
 .cl-rich-preview-body{font-size:10.1pt!important;line-height:1.47!important}
 .cl-rich-preview-body p{font-size:9.4pt!important;line-height:1.54!important;orphans:3;widows:3}
 .cl-rich-preview-body .cl-rich-numbered-section{font-size:10.3pt!important;margin:17px 0 10px!important}
 .cl-rich-section-index{min-height:26px;flex-basis:31px}
 .cl-rich-support-card{padding:11px 13px!important}
 .cl-rich-watermark{position:fixed;right:12%;bottom:17%;max-width:215px;opacity:.035}
 .cl-rich-contact-footer{display:none!important}
}

/* Patient-copy workflow: clinician edits and saves first; actual send locks only
   the report version and its patient-facing copy, never the whole encounter. */
.cl-patient-copy-panel{margin:22px 0!important;border:1px solid #c7d5df!important;border-top:3px solid #c69a4d!important;padding:20px!important;border-radius:8px}
.cl-patient-copy-panel>h3{color:#143554;margin-top:0}
.cl-patient-copy-panel #clPatientCopyText{min-height:350px;width:100%;font:13px/1.7 Arial,sans-serif;padding:16px;border:1px solid #cbd8e3;border-radius:7px;background:#fff;color:#213b52}
.cl-patient-copy-panel #clPatientCopyText[readonly]{background:#f1f5f8;color:#314b60}
.cl-patient-copy-panel .cl-report-final-actions{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0 8px}
.cl-patient-copy-send{border-top:1px solid #dfe7ec;margin-top:15px;padding-top:16px;display:flex;flex-direction:column;gap:10px}
.cl-patient-copy-send>h4{color:#143554;margin:0}
.cl-patient-copy-send select{padding:10px;border-radius:6px;max-width:340px}
.cl-patient-copy-send label{display:flex;gap:7px;align-items:flex-start}
.cl-patient-copy-send input[type=checkbox]{margin-top:2px}
.cl-patient-copy-send #clPatientCopySend{align-self:start;min-width:145px}
.cl-patient-manual-receipt{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:12px;background:#f0f5f9;border-left:3px solid #c69a4d}
.cl-patient-manual-receipt[hidden]{display:none}
.cl-patient-manual-receipt input{display:block;width:min(100%,390px);padding:8px;margin-top:7px}
@media print{#clPatientCopyPanel{display:none!important}}
