/* CliNext 0.24 — Compact patient workflow UI.
   Presentation only. Clinical source tables, APIs and values remain unchanged. */
[hidden]{display:none!important}
#dashboard[data-workspace="patients"]{gap:8px}
#dashboard[data-workspace="patients"]>.top{display:none}
#dashboard[data-workspace="patients"]>.layout{grid-template-columns:minmax(210px,250px) minmax(0,1fr);gap:12px}
#dashboard[data-workspace="patients"]>.layout>section{min-height:0}
#dashboard[data-workspace="patients"]>.layout>aside{top:9px;max-height:calc(100vh - 18px)}
#dashboard[data-workspace="patients"] .card{padding:clamp(10px,1.4vw,19px)}
#dashboard[data-workspace="patients"] .clinic-nav{padding:6px 10px;gap:5px}
#dashboard[data-workspace="patients"] .clinic-nav button{padding:8px 13px;font-size:13px}
#dashboard .clinic-nav .cl-nav-logout{margin-left:auto;background:#f0f4f7;color:#34566d}
#dashboard[data-workspace="patients"] .cl-compact-patient>.top{display:flex;gap:11px;align-items:center;justify-content:flex-start;margin:0 0 4px;min-height:45px}
#dashboard[data-workspace="patients"] .cl-compact-patient>.top #newEncounter{margin-left:auto;flex-shrink:0;padding:8px 13px;font-size:12px}
#dashboard[data-workspace="patients"] .cl-compact-patient>.top h2{margin:0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
.cl-patient-emblem{display:flex;align-items:center;justify-content:center;flex:0 0 44px;height:44px;border-radius:50%;background:#e6f3f8;color:#126783;font-size:27px;line-height:1}
.cl-patient-headline{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
.cl-head-patient-kind{display:inline-block;background:#eaf2fa;border:1px solid #cedfec;color:#26546b;border-radius:7px;padding:4px 9px;font-size:11px;font-weight:650;white-space:nowrap}
.cl-head-patient-kind.demo{background:#fff4dd;border-color:#e6c880;color:#7b4b13}
#dashboard .cl-compact-patient #patientSubtitle{font-size:12px;margin:3px 0 5px;padding-left:55px}
#dashboard .cl-compact-patient #clPatientDemoBanner{font-size:11px;font-weight:600;padding:5px 10px;margin:6px 0}
#dashboard .cl-compact-patient #clPatientStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}
#dashboard .cl-compact-patient .cl-stat{padding:7px 9px;border-radius:8px;background:#f7fafc;border:1px solid #e0eaf0}
#dashboard .cl-compact-patient .cl-stat small{font-size:10px;margin:0 0 3px}
#dashboard .cl-compact-patient .cl-stat strong{font-size:12px}
#dashboard .cl-compact-patient .tabs{margin:10px 0 3px;padding:0 0 8px;gap:4px;border-color:#dfebf2}
#dashboard .cl-compact-patient .tabs button{padding:8px 11px;font-size:12px;border-radius:7px}
.cl-workflow-explanation{margin:5px 0 10px;font-size:11px;color:#577182;line-height:1.45}
#dashboard .cl-compact-patient #clPatientDetailGrid.cl-patient-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:10px;margin:5px 0 10px}
#dashboard .cl-compact-patient .cl-visit-nav,
#dashboard .cl-compact-patient .cl-rail{align-self:stretch;padding:11px 12px;border:1px solid #dae6ef;border-radius:10px;background:#fff;min-width:0}
#dashboard .cl-compact-patient .cl-patient-overview h3{font-size:14px;margin:0 0 8px;color:#224459}
#dashboard .cl-compact-patient .cl-visit-nav>.cl-mini{padding:12px 8px;font-size:12px;min-height:0;border:1px dashed #dce9ef;border-radius:7px;text-align:center}
#dashboard .cl-compact-patient .cl-visit-item{display:flex;flex-wrap:wrap;gap:4px;align-items:center;border:1px solid #e1eaf1;margin:5px 0;padding:7px 9px;border-radius:8px}
#dashboard .cl-compact-patient .cl-visit-item[hidden]{display:none}
#dashboard .cl-compact-patient .cl-visit-date{flex:1 1 115px;font-size:12px}
#dashboard .cl-compact-patient .cl-visit-item .cl-mini{font-size:10px}
#dashboard .cl-compact-patient .cl-visit-item button{padding:5px 8px;margin:0;font-size:11px}
#dashboard .cl-compact-patient .cl-show-more-visits{padding:6px 8px;font-size:11px;margin:6px 0}
#dashboard .cl-compact-patient .cl-visit-detail-accordion{margin:6px 0 0;padding:6px 9px;border:1px solid #e1eaf1;border-radius:7px;font-size:11px}
#dashboard .cl-compact-patient .cl-visit-detail-accordion>summary{cursor:pointer;color:#265b75}
#dashboard .cl-compact-patient .cl-visit-detail-accordion .cl-focus{padding:8px;margin:6px 0 0;font-size:11px}
#dashboard .cl-compact-patient .cl-visit-detail-accordion pre{max-height:175px;overflow:auto;font-size:11px}
#dashboard .cl-compact-patient .cl-rail{display:flex;flex-direction:column;gap:5px}
#dashboard .cl-compact-patient .cl-safety-card{position:relative;border:1px solid #e0eaf2;border-radius:8px;background:#fafcfd;padding:9px 12px;margin:0;min-width:0}
#dashboard .cl-compact-patient .cl-safety-card>strong{display:block;font-size:12px;padding-right:110px}
#dashboard .cl-compact-patient .cl-safety-card p{font-size:11px;line-height:1.4;margin:4px 0;overflow-wrap:anywhere}
#dashboard .cl-compact-patient .cl-safety-card .cl-safety-quick-action{position:absolute;top:7px;right:7px;padding:5px 6px;font-size:10px;font-weight:600;background:#e5f2f6;color:#195570;border-radius:5px}
#dashboard .cl-compact-patient .cl-safety-card:nth-child(2) p:not(:first-of-type){display:none}
#dashboard .cl-compact-patient .cl-safety-card:nth-child(3) p:not(:first-of-type){display:none}
.cl-safety-icon{display:inline-flex;align-items:center;justify-content:center;border-radius:7px;background:#e7f3f7;color:#19677b;min-width:21px;height:21px;margin-right:5px;font-weight:800}
.cl-safety-card-1 .cl-safety-icon{background:#fff0e7;color:#b45c27}
.cl-full-safety{font-size:11px;padding:6px 9px;background:#f7fafc;border:1px solid #e0eaf2;border-radius:8px}
.cl-full-safety>summary{cursor:pointer;font-size:11px;color:#24576d;font-weight:600}
#dashboard[data-workspace="patients"]>.layout>section.card>#clinicalSafety{display:none!important}
#dashboard .cl-full-safety .cl-cloned-clinical-safety{background:transparent;border:0;margin:4px 0;padding:0}
#dashboard .cl-full-safety .cl-cloned-clinical-safety strong{font-size:12px}
#dashboard .cl-full-safety .cl-cloned-clinical-safety p{font-size:11px;margin:4px 0}
#dashboard .cl-compact-patient #clReportBar{margin:0;border:0;padding:0;background:none;border-radius:0;gap:5px}
#dashboard .cl-compact-patient #clReportBar>div{display:none}
#dashboard .cl-compact-patient #clReportBar button{font-size:11px;padding:7px 10px;background:#e5f2f8;color:#235772;white-space:normal}
#dashboard .cl-compact-patient #encounterForm{border:1px solid #dce9ef;border-radius:11px;background:#fff;padding:13px 15px;margin:8px 0 10px}
#dashboard .cl-compact-patient #encounterForm h3{font-size:16px;color:#15384f;margin:0}
#dashboard .cl-compact-patient #clCompactEncounterHeading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:0 0 12px}
#dashboard .cl-compact-patient .cl-encounter-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"date complaint" "history examination" "vitals vitals" "assessment treatment" "recommendations recommendations" "footer footer";gap:10px 14px;align-items:start}
#dashboard .cl-compact-patient .cl-field-encounterDate{grid-area:date}
#dashboard .cl-compact-patient .cl-field-complaint{grid-area:complaint}
#dashboard .cl-compact-patient .cl-field-history{grid-area:history}
#dashboard .cl-compact-patient .cl-field-examination{grid-area:examination}
#dashboard .cl-compact-patient .cl-field-assessment{grid-area:assessment}
#dashboard .cl-compact-patient .cl-field-treatment{grid-area:treatment}
#dashboard .cl-compact-patient .cl-field-recommendations{grid-area:recommendations}
#dashboard .cl-compact-patient .cl-field-vitals{grid-area:vitals}
#dashboard .cl-compact-patient .cl-encounter-footer{grid-area:footer;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
#dashboard .cl-compact-patient .cl-encounter-footer #encounterStatus{width:100%;margin:0;font-size:12px;min-height:0}
#dashboard .cl-compact-patient .cl-encounter-footer button{padding:8px 12px;font-size:12px}
#dashboard .cl-compact-patient .cl-form-field{min-width:0}
#dashboard .cl-compact-patient .cl-form-field>label{display:block;font-size:12px;font-weight:650;margin:0 0 4px}
#dashboard .cl-compact-patient .cl-form-field>input,
#dashboard .cl-compact-patient .cl-form-field>textarea{display:block;padding:8px 10px;font-size:13px;line-height:1.35}
#dashboard .cl-compact-patient .cl-form-field>input{height:38px}
#dashboard .cl-compact-patient .cl-form-field>textarea{min-height:46px;height:47px}
#dashboard .cl-compact-patient .cl-form-field>.cl-mic-button{margin:3px 0 0;padding:2px 6px!important;min-height:21px}
#dashboard .cl-compact-patient .vitals{border:1px solid #dceaf2;background:#f9fcfe;margin:0;padding:9px 12px}
#dashboard .cl-compact-patient .vitals legend{font-size:12px;font-weight:700}
#dashboard .cl-compact-patient .vitals>.muted{font-size:10px;margin:0 0 5px}
#dashboard .cl-compact-patient .vitals-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px 9px}
#dashboard .cl-compact-patient .vitals-grid label{font-size:10px;font-weight:600;margin:1px 0}
#dashboard .cl-compact-patient .vitals-grid input{height:30px;min-width:0;padding:5px 7px;margin:4px 0 0;font-size:12px}
#dashboard .cl-compact-patient .vitals-grid .cl-mic-button{padding:1px 4px!important;min-height:19px;margin:2px 0}
#dashboard .cl-compact-patient #vitalPreview{font-size:10px;margin:3px 0 0}
#dashboard .cl-compact-patient .cl-workflow-explanation{margin:2px 0 8px}
#dashboard .cl-compact-patient .cl-compact-tab-area{margin-top:10px}
#dashboard .cl-compact-patient .cl-compact-tab-area #tabContent{padding:10px 12px;border:1px solid #e1eaf2;border-radius:8px}
#dashboard .cl-compact-patient .cl-compact-tab-area #tabContent.placeholder{background:#fff}
#dashboard .cl-compact-patient .cl-organized-source-details{margin:6px 0;border:1px solid #dce7ef;border-radius:9px;overflow:hidden}
#dashboard .cl-compact-patient .cl-organized-source-details>summary{padding:10px 12px;background:#f2f8fb;font-size:12px;font-weight:700;cursor:pointer}
#dashboard .cl-compact-patient .cl-organized-source-details #tabContent{padding:10px}
#dashboard .cl-compact-patient .cl-organized-source-details .organized-summary{padding-top:0}
#dashboard .cl-compact-patient #encounterChecklistForm{margin:12px 0}
#dashboard[data-workspace="patients"] #patientListTools label{font-size:11px;margin:7px 0 3px}
#dashboard[data-workspace="patients"] #patientListTools select{padding:7px 9px;font-size:12px}
#dashboard[data-workspace="patients"] #search{padding:8px;font-size:12px}
#dashboard[data-workspace="patients"] #patients button{padding:7px 8px;font-size:12px}
#dashboard[data-workspace="patients"] #patientSelectionStatus{font-size:11px}
#dashboard[data-workspace="patients"] .cl-create-patient-action{margin:7px 0 9px;padding:9px}
@media(max-width:1200px){
 #dashboard[data-workspace="patients"]>.layout{grid-template-columns:minmax(195px,225px) minmax(0,1fr)}
 #dashboard .cl-compact-patient .vitals-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:850px){
 #dashboard[data-workspace="patients"]>.layout{grid-template-columns:minmax(0,1fr)}
 #dashboard[data-workspace="patients"]>.layout>aside{position:static;max-height:none}
 #dashboard .cl-compact-patient #clPatientStats{grid-template-columns:repeat(2,minmax(0,1fr))}
 #dashboard .cl-compact-patient #clPatientDetailGrid.cl-patient-overview{grid-template-columns:1fr}
 #dashboard .cl-compact-patient .cl-encounter-fields{grid-template-columns:1fr;grid-template-areas:"date" "complaint" "history" "examination" "vitals" "assessment" "treatment" "recommendations" "footer"}
 #dashboard .cl-compact-patient .vitals-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #dashboard .clinic-nav .cl-nav-logout{margin-left:0}
}

#dashboard .cl-compact-patient .cl-checklist-accordion{border:1px solid #d9e8ef;border-radius:8px;margin:7px 0;background:#fbfdfe}
#dashboard .cl-compact-patient .cl-checklist-accordion>summary{padding:9px 11px;cursor:pointer;font-weight:650;font-size:12px;color:#245872}
#dashboard .cl-compact-patient .cl-checklist-accordion #encounterChecklistForm{margin:0;padding:12px;border-top:1px solid #e1edf2}
#dashboard .cl-compact-patient:has(#encounterForm:not([hidden])) #newEncounter{display:none!important}
